Final tweaks because I don't know when to stop

--- osu.Game.Rulesets.Mania/Skinning/Argon/ArgonKeyArea.cs
+++ osu.Game.Rulesets.Mania/Skinning/Argon/ArgonKeyArea.cs
@@ -189,9 +189,10 @@
             Color4 lightingColour = getLightingColour();

             background
+                .FlashColour(accentColour.Value.Lighten(0.8f), 200, Easing.OutQuint)
                 .FadeTo(1, lighting_fade_in_duration, Easing.OutQuint)
                 .Then()
-                .FadeTo(0.6f, 500, Easing.In);
+                .FadeTo(0.8f, 500);

             hitTargetLine.FadeColour(Color4.White, lighting_fade_in_duration, Easing.OutQuint);
             hitTargetLine.TransformTo(nameof(EdgeEffect), new EdgeEffectParameters


Fix incorrect json mapping for preview urls

--- osu.Game/Online/API/Requests/GetBeatmapSetsResponse.cs
+++ osu.Game/Online/API/Requests/GetBeatmapSetsResponse.cs
@@ -15,7 +15,7 @@
         [JsonProperty(@"covers")]
         private BeatmapSetOnlineCovers covers { get; set; }

-        [JsonProperty(@"previewUrl")]
+        [JsonProperty(@"preview_url")]
         private string preview { get; set; }

         [JsonProperty(@"play_count")]


Change loose api ordering requirement to throw instead

--- osu.Game/Online/API/Requests/Responses/APIScoreInfo.cs
+++ osu.Game/Online/API/Requests/Responses/APIScoreInfo.cs
@@ -50,8 +50,11 @@
             set
             {
                 // in the deserialisation case we need to ferry this data across.
-                if (Beatmap is APIBeatmap apiBeatmap)
-                    apiBeatmap.BeatmapSet = value;
+                // the order of properties returned by the API guarantees that the beatmap is populated by this point.
+                if (!(Beatmap is APIBeatmap apiBeatmap))
+                    throw new InvalidOperationException("Beatmap set metadata arrived before beatmap metadata in response");
+
+                apiBeatmap.BeatmapSet = value;
             }
         }


Nicer syntax for IsValid

Nicer syntax for IsValid

--- Realm.Shared/RealmObject.cs
+++ Realm.Shared/RealmObject.cs
@@ -48,7 +48,7 @@
         /// If the object has been deleted (say, on another thread), it is no longer valid and accessing properties on it
         /// will throw an exception.
         /// </summary>
-        public bool IsValid => _rowHandle != null &&_rowHandle.IsAttached;
+        public bool IsValid => _rowHandle?.IsAttached == true;

         internal void _Manage(Realm realm, RowHandle rowHandle)
         {


edit whitespace

edit whitespace


Removed debugging code that accidently got commited

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

--- src/MonoTorrent.Common/Torrent.cs
+++ src/MonoTorrent.Common/Torrent.cs
@@ -513,11 +513,7 @@
                 BEncodedDictionary dict = null;
                 try
                 {
-                    Console.WriteLine("A");
-                    Console.ReadLine();
                     dict = (BEncodedDictionary)BEncode.Decode(reader);
-                    Console.WriteLine("B");
-                    Console.ReadLine();
                     LoadTorrent(dict);
                 }
                 catch (BEncodingException ex)


no message

no message


Add missing 'Then's

Add missing 'Then's

--- test/Microsoft.TemplateEngine.Core.UnitTests/ConditionalTests.VBStyleEvaluator.cs
+++ test/Microsoft.TemplateEngine.Core.UnitTests/ConditionalTests.VBStyleEvaluator.cs
@@ -11,7 +11,7 @@
         public void VBVerifyIfEndifTrueCondition()
         {
             string value = @"Hello
-    #If (VALUE)
+    #If (VALUE) Then
 value
     #End If
 There";
@@ -35,7 +35,7 @@
         public void VBVerifyIfEndifFalseCondition()
         {
             string value = @"Hello
-    #If (VALUE)
+    #If (VALUE) Then
 value
     #End If
 There";
@@ -58,7 +58,7 @@
         public void VBVerifyIfEndifTrueAndFalseCondition()
         {
             string value = @"Hello
-    #If (VALUE1 And Value2)
+    #If (VALUE1 And Value2) Then
 value
     #End If
 There";
@@ -85,7 +85,7 @@
         public void VBVerifyIfEndifNotNotTrueAndFalseCondition()
         {
             string value = @"Hello
-    #If (Not (Not VALUE1 And VALUE2))
+    #If (Not (Not VALUE1 And VALUE2)) Then
 value
     #End If
 There";
@@ -113,7 +113,7 @@
         public void VBVerifyIfEndifTrueAndAlsoTrueCondition()
         {
             string value = @"Hello
-    #If (VALUE1 AndAlso VALUE2)
+    #If (VALUE1 AndAlso VALUE2) Then
 value
     #End If
 There";
@@ -141,7 +141,7 @@
         public void VBVerifyIfEndifTrueAndAlsoNotFalseCondition()
         {
             string value = @"Hello
-    #If (VALUE1 AndAlso Not VALUE2)
+    #If (VALUE1 AndAlso Not VALUE2) Then
 value
     #End If
 There";
@@ -169,7 +169,7 @@
         public void VBVerifyIfEndifNotFalseAndNotFalseAndNotFalseCondition()
         {
             string value = @"Hello
-    #If (Not VALUE1 And Not VALUE2 And Not VALUE3)
+    #If (Not VALUE1 And Not VALUE2 And Not VALUE3) Then
 value
     #End If
 There";
@@ -198,7 +198,7 @@
         public void VBVerifyIfEndifNotFalseAndNotFalseAndNotTrueCondition()
         {
             string value = @"Hello
-    #If (Not VALUE1 And Not VALUE2 And Not VALUE3)
+    #If (Not VALUE1 And Not VALUE2 And Not VALUE3) Then
 value
     #End If
 There";
@@ -226,7 +226,7 @@
         public void VBVerifyIfEndifNotFalseOrTrueCondition()
         {
             string value = @"Hello
-    #If (Not VALUE1 Or VALUE2)
+    #If (Not VALUE1 Or VALUE2) Then
 value
     #End If
 There";
@@ -254,7 +254,7 @@
         public void VBVerifyIfEndifNotFalseOrElseTrueCondition()
         {
             string value = @"Hello
-    #If (Not VALUE1 OrElse VALUE2)
+    #If (Not VALUE1 OrElse VALUE2) Then
 value
     #End If
 There";
@@ -282,7 +282,7 @@
         public void VBVerifyIfEndifNotNotFalseAndNotFalseAndNotTrueCondition()
         {
             string value = @"Hello
-    #If (Not (Not VALUE1 And Not VALUE2 And Not VALUE3))
+    #If (Not (Not VALUE1 And Not VALUE2 And Not VALUE3)) Then
 value
     #End If
 There";
@@ -311,7 +311,7 @@
         public void VBVerifyIfEndifExponentiateEqualsCondition()
         {
             string value = @"Hello
-    #If (2^3 = 8)
+    #If (2^3 = 8) Then
 value
     #End If
 There";
@@ -340,7 +340,7 @@
         public void VBVerifyIfEndifNotExponentiateNotEqualsCondition()
         {
             string value = @"Hello
-    #If (Not (2^3 <> 8))
+    #If (Not (2^3 <> 8)) Then
 value
     #End If
 There";


NamedParameters are converted to a "?" instead of being wrapped with
"[<" and ">]"

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@538

--- src/NHibernate/Hql/WhereParser.cs
+++ src/NHibernate/Hql/WhereParser.cs
@@ -434,8 +434,7 @@
 			else if (token.StartsWith(ParserHelper.HqlVariablePrefix)) //named query parameter
 			{
 				q.AddNamedParameter(token.Substring(1));
-				//TODO: H2.0.3 why token is not '?' ??
-				AppendToken(q, "[<" + token.Substring(1) + ">]"); // THEO
+				AppendToken(q, StringHelper.SqlParameter);
 			}
 			else
 			{


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

--- Ivony.Html.JQuery/jQuery.cs
+++ Ivony.Html.JQuery/jQuery.cs
@@ -44,19 +44,19 @@

     public jQuery attr( string name, string value )
     {
-      _elements.SetAttribute( name ).Value( value );
+      _elements.SetAttribute( name, value );
       return this;
     }

     public jQuery attr( string name, Func<string, string> evaluator )
     {
-      _elements.SetAttribute( name ).Value( evaluator );
+      _elements.SetAttribute( name, evaluator );
       return this;
     }

     public jQuery attr( string name, Func<int, string, string> evaluator )
     {
-      _elements.SetAttribute( name ).Value( evaluator );
+      _elements.SetAttribute( name, evaluator );
       return this;
     }

@@ -72,7 +72,7 @@
       var elements = _elements.ToArray();

       foreach ( var pair in properties )
-        elements.SetAttribute( pair.Key ).Value( pair.Value );
+        elements.SetAttribute( pair.Key, pair.Value );

       return this;
     }
@@ -80,7 +80,7 @@

     public jQuery removeAttr( string name )
     {
-      ForAll( e => e.SetAttribute( name ).Remove() );
+      ForAll( e => e.Attribute( name ).Remove() );
       return this;
     }


Rephrase separator-and-next-item parsers as trivial Maps.

--- src/Parsley/Grammar.Repetition.cs
+++ src/Parsley/Grammar.Repetition.cs
@@ -80,9 +80,7 @@
             }

             var separatorAndNextItem =
-                from _ in separator
-                from next in item
-                select next;
+                Map(separator, item, (_, next) => next);

             return Repeat(accumulator, separatorAndNextItem, input, ref index, out succeeded, out expectation);
         };
@@ -112,9 +110,7 @@
             }

             var separatorAndNextItem =
-                from _ in separator
-                from next in item
-                select next;
+                Map(separator, item, (_, next) => next);

             return Repeat(accumulator, separatorAndNextItem, input, ref index, out succeeeded, out expectation);
         };


Use the correct transport when re-connecting using the AutoReconnect option

--- JabbR.Client/JabbRClient.cs
+++ JabbR.Client/JabbRClient.cs
@@ -398,7 +398,7 @@
         {
             TaskAsyncHelper.Delay(TimeSpan.FromSeconds(5)).Then(() =>
             {
-                _connection.Start().Then(() =>
+                _connection.Start(_transport).Then(() =>
                 {
                     // Join JabbR
                     _chat.Invoke("Join", false);


1. added FirstLine()

1. added FirstLine()

--- Jasily.Core/JasilyString.cs
+++ Jasily.Core/JasilyString.cs
@@ -77,5 +77,29 @@
         {
             return str == null ? null : string.Concat(Enumerable.Repeat(str, count));
         }
+
+        public static string FirstLine(this string source)
+        {
+            if (source == null)
+                return null;
+
+            var index = source.IndexOf('\n');
+
+            if (index == -1)
+            {
+                return source;
+            }
+            else
+            {
+                if (index > 0 && source[index - 1] == '\r')
+                {
+                    return source.Substring(0, index - 1);
+                }
+                else
+                {
+                    return source.Substring(0, index);
+                }
+            }
+        }
     }
 }


Adjust sample bass counter location

Adjust sample bass counter location

--- osu.Framework/Audio/Sample/SampleBass.cs
+++ osu.Framework/Audio/Sample/SampleBass.cs
@@ -22,13 +22,21 @@
             if (customPendingActions != null)
                 PendingActions = customPendingActions;

-            EnqueueAction(() => { sampleId = loadSample(data); });
+            EnqueueAction(() =>
+            {
+                sampleId = loadSample(data);
+                loaded_sample_bytes.Value += loadedBytes = data.Length;
+            });
         }

         protected override void Dispose(bool disposing)
         {
-            loaded_sample_bytes.Value -= loadedBytes;
-            Bass.SampleFree(sampleId);
+            if (IsLoaded)
+            {
+                Bass.SampleFree(sampleId);
+                loaded_sample_bytes.Value -= loadedBytes;
+            }
+
             base.Dispose(disposing);
         }

@@ -49,8 +57,6 @@
         {
             const BassFlags flags = BassFlags.Default | BassFlags.SampleOverrideLongestPlaying;

-            loaded_sample_bytes.Value += loadedBytes = data.Length;
-
             if (RuntimeInfo.SupportsJIT)
                 return Bass.SampleLoad(data, 0, data.Length, PlaybackConcurrency, flags);


Use nekodex's regex from osu-web

Use nekodex's regex from osu-web

--- osu.Game/Online/Chat/MessageFormatter.cs
+++ osu.Game/Online/Chat/MessageFormatter.cs
@@ -43,7 +43,8 @@
             RegexOptions.IgnoreCase);

         // 00:00:000 (1,2,3) - test
-        private static readonly Regex time_regex = new Regex(@"\d\d:\d\d:\d\d\d? \((\d,?)+\)");
+        // regex from https://github.com/ppy/osu-web/blob/651a9bac2b60d031edd7e33b8073a469bf11edaa/resources/assets/coffee/_classes/beatmap-discussion-helper.coffee#L10
+        private static readonly Regex time_regex = new Regex(@"\b(((\d{2,}):([0-5]\d)[:.](\d{3}))(\s\((?:\d+[,|])*\d+\))?)");

         // #osu
         private static readonly Regex channel_regex = new Regex(@"(#[a-zA-Z]+[a-zA-Z0-9]+)");


Should be ok now

Should be ok now

--- osu.Game/Rulesets/UI/RulesetContainer.cs
+++ osu.Game/Rulesets/UI/RulesetContainer.cs
@@ -67,6 +67,7 @@
         /// </summary>
         public readonly CursorContainer Cursor;

+
         protected readonly Ruleset Ruleset;

         private IRulesetConfigManager rulesetConfig;
@@ -165,7 +166,7 @@
     public abstract class RulesetContainer<TObject> : RulesetContainer
         where TObject : HitObject
     {
-
+
         public event Action<Judgement> OnJudgement;
         public event Action<Judgement> OnJudgementRemoved;

@@ -193,7 +194,7 @@
         /// Whether the specified beatmap is assumed to be specific to the current ruleset.
         /// </summary>
         public readonly bool IsForCurrentRuleset;
-
+
         public override ScoreProcessor CreateScoreProcessor() => new ScoreProcessor<TObject>(this);

         protected override Container<Drawable> Content => content;
@@ -218,6 +219,7 @@
             applyMods(Mods, config);

             loadObjects();
+
         }

         /// <summary>


Don't inherit ReplayPlayer to make results screen work correctly

--- osu.Game/Screens/Play/SpectatorPlayer.cs
+++ osu.Game/Screens/Play/SpectatorPlayer.cs
@@ -11,11 +11,16 @@

 namespace osu.Game.Screens.Play
 {
-    public class SpectatorPlayer : ReplayPlayer
+    public class SpectatorPlayer : Player
     {
+        private readonly Score score;
+
+        protected override bool CheckModsAllowFailure() => false; // todo: better support starting mid-way through beatmap
+
         public SpectatorPlayer(Score score)
-            : base(score)
+            : base(true, true)
         {
+            this.score = score;
         }

         protected override ResultsScreen CreateResults(ScoreInfo score)
@@ -32,9 +37,14 @@
             spectatorStreaming.OnUserBeganPlaying += userBeganPlaying;
         }

+        protected override void PrepareReplay()
+        {
+            DrawableRuleset?.SetReplayScore(score);
+        }
+
         private void userBeganPlaying(int userId, SpectatorState state)
         {
-            if (userId == Score.ScoreInfo.UserID)
+            if (userId == score.ScoreInfo.UserID)
                 Schedule(this.Exit);
         }

@@ -49,7 +59,7 @@
         protected override GameplayClockContainer CreateGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart)
         {
             // if we already have frames, start gameplay at the point in time they exist, should they be too far into the beatmap.
-            double? firstFrameTime = Score.Replay.Frames.FirstOrDefault()?.Time;
+            double? firstFrameTime = score.Replay.Frames.FirstOrDefault()?.Time;

             if (firstFrameTime == null || firstFrameTime <= gameplayStart + 5000)
                 return base.CreateGameplayClockContainer(beatmap, gameplayStart);


minor changes for monotouch and mono-for-android

--- mono-for-mac/3.5/PubNub-Messaging/PubNub-Console/Pubnub.cs
+++ mono-for-mac/3.5/PubNub-Messaging/PubNub-Console/Pubnub.cs
@@ -1,4 +1,4 @@
-//Build Date: December 4, 2013
+//Build Date: December 6, 2013
 #if (UNITY_STANDALONE || UNITY_WEBPLAYER || UNITY_ANDROID)
 #define USE_JSONFX
 #elif (UNITY_IOS)
@@ -2174,7 +2174,7 @@
                                         }
                                         else
                                         {
-											result = WrapResultBasedOnResponseType<T> (cea.pubnubRequestState.Type, cea.message, cea.pubnubRequestState.Channels, cea.pubnubRequestState.Reconnect, cea.pubnubRequestState.Timetoken, cea.pubnubRequestState.ErrorCallback);
+                                            result = WrapResultBasedOnResponseType<T> (cea.pubnubRequestState.Type, cea.message, cea.pubnubRequestState.Channels, cea.pubnubRequestState.Reconnect, cea.pubnubRequestState.Timetoken, cea.pubnubRequestState.ErrorCallback);
                                             ProcessResponseCallbacks<T> (result, cea.pubnubRequestState);
                                         }
                                         LoggingMethod.WriteToLog(string.Format("DateTime {0}, Response:{1}", DateTime.Now.ToString(), responseFromServer), LoggingMethod.LevelVerbose);
@@ -2477,7 +2477,7 @@
                     PubnubErrorCode errorType = PubnubErrorCodeHelper.GetErrorType(webEx);
                     int statusCode = (int)errorType;
                     string errorDescription = PubnubErrorCodeDescription.GetStatusCodeDescription(errorType);
-					PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Warn, true, webEx.Message, webEx, PubnubMessageSource.Client, null, null, errorDescription, channels);
+                    PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Warn, true, webEx.Message, webEx, PubnubMessageSource.Client, null, null, errorDescription, channels);
                     Action<PubnubClientError> errorCallback = asynchRequestState.ErrorCallback;
                     GoToCallback(error, errorCallback);
                 }
@@ -2490,7 +2490,7 @@
                     PubnubErrorCode errorType = PubnubErrorCodeHelper.GetErrorType(ex);
                     int statusCode = (int)errorType;
                     string errorDescription = PubnubErrorCodeDescription.GetStatusCodeDescription(errorType);
-					PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Warn, true, ex.Message, ex, PubnubMessageSource.Client, null, null, errorDescription, channels);
+                    PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Warn, true, ex.Message, ex, PubnubMessageSource.Client, null, null, errorDescription, channels);
                     Action<PubnubClientError> errorCallback = asynchRequestState.ErrorCallback;
                     GoToCallback(error, errorCallback);
                 }
@@ -2549,7 +2549,7 @@
                     PubnubErrorCode errorType = PubnubErrorCodeHelper.GetErrorType(webEx);
                     int statusCode = (int)errorType;
                     string errorDescription = PubnubErrorCodeDescription.GetStatusCodeDescription(errorType);
-					PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Warn, true, webEx.Message, webEx, PubnubMessageSource.Client, null, null, errorDescription, channels);
+                    PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Warn, true, webEx.Message, webEx, PubnubMessageSource.Client, null, null, errorDescription, channels);
                     Action<PubnubClientError> errorCallback = asynchRequestState.ErrorCallback;
                     GoToCallback(error, errorCallback);
                 }
@@ -2562,7 +2562,7 @@
                     PubnubErrorCode errorType = PubnubErrorCodeHelper.GetErrorType(ex);
                     int statusCode = (int)errorType;
                     string errorDescription = PubnubErrorCodeDescription.GetStatusCodeDescription(errorType);
-					PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Warn, true, ex.Message, ex, PubnubMessageSource.Client, null, null, errorDescription, channels);
+                    PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Warn, true, ex.Message, ex, PubnubMessageSource.Client, null, null, errorDescription, channels);
                     Action<PubnubClientError> errorCallback = asynchRequestState.ErrorCallback;
                     GoToCallback(error, errorCallback);
                 }
@@ -2903,11 +2903,11 @@
                                 errorResult = _jsonPluggableLibrary.DeserializeToListOfObject(jsonString);

                                 errorResult.Add(activeChannel);*/
-								PubnubChannelCallback<T> currentPubnubCallback = _channelCallbacks[activeChannel] as PubnubChannelCallback<T>;
-								PubnubErrorCode errorType = PubnubErrorCodeHelper.GetErrorType(ex);
-								int statusCode = (int)errorType;
-								string errorDescription = PubnubErrorCodeDescription.GetStatusCodeDescription(errorType);
-								PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Critical, true, ex.Message, ex, PubnubMessageSource.Client, requestState.Request, requestState.Response, errorDescription, channel);
+                                PubnubChannelCallback<T> currentPubnubCallback = _channelCallbacks[activeChannel] as PubnubChannelCallback<T>;
+                                PubnubErrorCode errorType = PubnubErrorCodeHelper.GetErrorType(ex);
+                                int statusCode = (int)errorType;
+                                string errorDescription = PubnubErrorCodeDescription.GetStatusCodeDescription(errorType);
+                                PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Critical, true, ex.Message, ex, PubnubMessageSource.Client, requestState.Request, requestState.Response, errorDescription, channel);

                                 if (currentPubnubCallback != null && currentPubnubCallback.ErrorCallback != null)
                                 {
@@ -2923,10 +2923,10 @@
                         string jsonString = string.Format("[2, \"{0}\"]", ex.ToString().Replace("\r\n", " ").Replace("\r", " ").Replace("\n", " ").Replace("\\", "\\\\").Replace("\"", "\\\""));
                         errorResult = _jsonPluggableLibrary.DeserializeToListOfObject(jsonString);
                         errorResult.Add(channel);*/
-						PubnubErrorCode errorType = PubnubErrorCodeHelper.GetErrorType(ex);
-						int statusCode = (int)errorType;
-						string errorDescription = PubnubErrorCodeDescription.GetStatusCodeDescription(errorType);
-						PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Critical, true, ex.Message, ex, PubnubMessageSource.Client, requestState.Request, requestState.Response, errorDescription, channel);
+                        PubnubErrorCode errorType = PubnubErrorCodeHelper.GetErrorType(ex);
+                        int statusCode = (int)errorType;
+                        string errorDescription = PubnubErrorCodeDescription.GetStatusCodeDescription(errorType);
+                        PubnubClientError error = new PubnubClientError(statusCode, PubnubErrorSeverity.Critical, true, ex.Message, ex, PubnubMessageSource.Client, requestState.Request, requestState.Response, errorDescription, channel);

                         GoToCallback(error, requestState.ErrorCallback);
@@ -4431,8 +4431,8 @@
         }

         public void EnableMachineSleepModeForTestingOnly()
-		{
-			#if (!SILVERLIGHT && !WINDOWS_PHONE && !MONOTOUCH &&!__IOS__ && !MONODROID && !__ANDROID__ && !UNITY_STANDALONE && !UNITY_WEBPLAYER && !UNITY_IOS && !UNITY_ANDROID)
+        {
+            #if (!SILVERLIGHT && !WINDOWS_PHONE && !MONOTOUCH &&!__IOS__ && !MONODROID && !__ANDROID__ && !UNITY_STANDALONE && !UNITY_WEBPLAYER && !UNITY_IOS && !UNITY_ANDROID)
             PowerModeChangedEventArgs powerChangeEvent = new PowerModeChangedEventArgs(PowerModes.Suspend);
             SystemEvents_PowerModeChanged(null, powerChangeEvent);
 #endif
@@ -4443,7 +4443,7 @@

         public void DisableMachineSleepModeForTestingOnly()
         {
-			#if (!SILVERLIGHT && !WINDOWS_PHONE && !MONOTOUCH &&!__IOS__&& !MONODROID && !__ANDROID__&& !UNITY_STANDALONE && !UNITY_WEBPLAYER && !UNITY_IOS && !UNITY_ANDROID)
+            #if (!SILVERLIGHT && !WINDOWS_PHONE && !MONOTOUCH &&!__IOS__&& !MONODROID && !__ANDROID__&& !UNITY_STANDALONE && !UNITY_WEBPLAYER && !UNITY_IOS && !UNITY_ANDROID)
             PowerModeChangedEventArgs powerChangeEvent = new PowerModeChangedEventArgs(PowerModes.Resume);
             SystemEvents_PowerModeChanged(null, powerChangeEvent);
 #endif
@@ -5472,7 +5472,7 @@
                 _machineSuspendMode = value;
             }
         }
-		#if(__MonoCS__ && !UNITY_IOS && !UNITY_ANDROID)
+        #if(__MonoCS__ && !UNITY_IOS && !UNITY_ANDROID)
         static UdpClient udp;
         #endif

@@ -6849,27 +6849,27 @@
 #if (USE_JSONFX)
     public class JsonFXDotNet : IJsonPluggableLibrary
     {
-		public bool IsArrayCompatible(string jsonString){
-			return false;
-		}
-		public bool IsDictionaryCompatible(string jsonString){
-			return false;
-		}
+        public bool IsArrayCompatible(string jsonString){
+            return false;
+        }
+        public bool IsDictionaryCompatible(string jsonString){
+            return false;
+        }

         public string SerializeToJsonString(object objectToSerialize)
         {
-			#if(__MonoCS__)
-			var writer = new JsonFx.Json.JsonWriter();
-			string json = writer.Write(objectToSerialize);
-			return json;
-			#else
+            #if(__MonoCS__)
+            var writer = new JsonFx.Json.JsonWriter();
+            string json = writer.Write(objectToSerialize);
+            return json;
+            #else
             string json = "";
             var resolver = new CombinedResolverStrategy(new DataContractResolverStrategy());
             DataWriterSettings dataWriterSettings = new DataWriterSettings(resolver);
             var writer = new JsonFx.Json.JsonWriter(dataWriterSettings, new string[] { "PubnubClientError" });
             json = writer.Write(objectToSerialize);
             return json;
-			#endif
+            #endif
         }

         public List<object> DeserializeToListOfObject(string jsonString)
@@ -6929,12 +6929,12 @@
 #elif (USE_DOTNET_SERIALIZATION)
     public class JscriptSerializer : IJsonPluggableLibrary
     {
-		public bool IsArrayCompatible(string jsonString){
-			return false;
-		}
-		public bool IsDictionaryCompatible(string jsonString){
-			return false;
-		}
+        public bool IsArrayCompatible(string jsonString){
+            return false;
+        }
+        public bool IsDictionaryCompatible(string jsonString){
+            return false;
+        }

         public string SerializeToJsonString(object objectToSerialize)
         {
@@ -6994,12 +6994,12 @@
 #elif (USE_MiniJSON)
     public class MiniJSONObjectSerializer : IJsonPluggableLibrary
     {
-		public bool IsArrayCompatible(string jsonString){
-			return false;
-		}
-		public bool IsDictionaryCompatible(string jsonString){
-			return false;
-		}
+        public bool IsArrayCompatible(string jsonString){
+            return false;
+        }
+        public bool IsDictionaryCompatible(string jsonString){
+            return false;
+        }

         public string SerializeToJsonString(object objectToSerialize)
         {
@@ -7024,12 +7024,12 @@
 #elif (USE_JSONFX_FOR_UNITY)
     public class JsonFxUnitySerializer : IJsonPluggableLibrary
     {
-		public bool IsArrayCompatible(string jsonString){
-			return false;
-		}
-		public bool IsDictionaryCompatible(string jsonString){
-			return false;
-		}
+        public bool IsArrayCompatible(string jsonString){
+            return false;
+        }
+        public bool IsDictionaryCompatible(string jsonString){
+            return false;
+        }
         public string SerializeToJsonString(object objectToSerialize)
         {
             return JsonWriter.Serialize(objectToSerialize);


brandID

brandID

--- src/Plivo/Resource/Brand/Brand.cs
+++ src/Plivo/Resource/Brand/Brand.cs
@@ -199,6 +199,8 @@
     {
         [JsonProperty("api_id")]
         public new string ApiId {get; set;}
+        [JsonProperty("brand_id")]
+        public string BrandId { get; set; }

         [JsonProperty("use_cases")]
         public List<BrandUsecase> BrandUsecase {get; set;}


WIP skinning fixes #29504: Skinning, image dependency type, if uploading png, transparency is lost

[TFS Changeset #80231]

--- umbraco/presentation/umbraco/LiveEditing/Modules/SkinModule/ImageUploader.aspx.cs
+++ umbraco/presentation/umbraco/LiveEditing/Modules/SkinModule/ImageUploader.aspx.cs
@@ -108,6 +108,11 @@
                 x = x * 2;
                 y = y * 2;
             }
+
+            g.SmoothingMode = SmoothingMode.AntiAlias;
+            g.InterpolationMode = InterpolationMode.HighQualityBicubic;
+
+
             g.DrawImage(imgToResize, x, y, destWidth, destHeight);

             g.Dispose();
@@ -120,9 +125,13 @@
             if (!updir.Exists)
                 updir.Create();

+            FileInfo img = new FileInfo(IO.IOHelper.MapPath(Image.Value));
             // Copy metadata
             ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders();
             ImageCodecInfo codec = null;
+
+
+
             for (int i = 0; i < codecs.Length; i++)
             {
                 if (codecs[i].MimeType.Equals("image/jpeg"))
@@ -133,8 +142,10 @@
             EncoderParameters ep = new EncoderParameters();
             ep.Param[0] = new EncoderParameter(Encoder.Quality, 90L);

-
-            ((System.Drawing.Image)b).Save(updir.FullName + "/" + FileName.Value, codec, ep);
+            if(img.Extension.ToLower() == "png")
+                ((System.Drawing.Image)b).Save(updir.FullName + "/" + FileName.Value,ImageFormat.Png);
+            else
+                ((System.Drawing.Image)b).Save(updir.FullName + "/" + FileName.Value, codec, ep);

             Image.Value = this.ResolveUrl("~/media/upload/" + id) + "/" + FileName.Value;
             Image1.ImageUrl = Image.Value;


Added UseHarmony parameter to MSBuild task

--- src/React.MSBuild/TransformJsx.cs
+++ src/React.MSBuild/TransformJsx.cs
@@ -31,12 +31,21 @@
 		public string SourceDir { get; set; }

 		/// <summary>
+		/// A value indicating if es6 syntax should be rewritten.
+		/// </summary>
+		/// <returns><c>true</c> if support for es6 syntax should be rewritten.</returns>
+		public bool UseHarmony { get; set; }
+
+		/// <summary>
 		/// Executes the task.
 		/// </summary>
 		/// <returns><c>true</c> on success</returns>
 		public override bool Execute()
 		{
 			MSBuildHost.EnsureInitialized();
+			var config = React.AssemblyRegistration.Container.Resolve<IReactSiteConfiguration>();
+			config.UseHarmony = UseHarmony;
+
 			_environment = React.AssemblyRegistration.Container.Resolve<IReactEnvironment>();

 			Log.LogMessage("Starting TransformJsx");


Converts float to int.

Converts float to int.

--- osu.Game/Rulesets/Objects/Legacy/ConvertHitObjectParser.cs
+++ osu.Game/Rulesets/Objects/Legacy/ConvertHitObjectParser.cs
@@ -41,14 +41,14 @@

                 if (type.HasFlag(ConvertHitObjectType.Circle))
                 {
-                    result = CreateHit(new Vector2(int.Parse(split[0]), int.Parse(split[1])), combo);
+                    result = CreateHit(new Vector2((int)float.Parse(split[0]), (int)float.Parse(split[1])), combo);

                     if (split.Length > 5)
                         readCustomSampleBanks(split[5], bankInfo);
                 }
                 else if (type.HasFlag(ConvertHitObjectType.Slider))
                 {
-                    var pos = new Vector2(int.Parse(split[0]), int.Parse(split[1]));
+                    var pos = new Vector2((int)float.Parse(split[0]), (int)float.Parse(split[1]));

                     CurveType curveType = CurveType.Catmull;
                     double length = 0;
@@ -170,7 +170,7 @@
                         readCustomSampleBanks(string.Join(":", ss.Skip(1)), bankInfo);
                     }

-                    result = CreateHold(new Vector2(int.Parse(split[0]), int.Parse(split[1])), combo, endTime + offset);
+                    result = CreateHold(new Vector2((int)float.Parse(split[0]), (int)float.Parse(split[1])), combo, endTime + offset);
                 }

                 if (result == null)


Better represent properties in search results.

--- src/StructuredLogViewer/Search.cs
+++ src/StructuredLogViewer/Search.cs
@@ -69,8 +69,7 @@
             var nameValueNode = node as NameValueNode;
             if (nameValueNode != null)
             {
-                addSearchField(nameValueNode.Name);
-                addSearchField(nameValueNode.Value);
+                addSearchField(nameValueNode.Name + " = " + nameValueNode.Value);
             }

             var diagnostic = node as AbstractDiagnostic;


Got editor previews working in boundary system inspector

--- Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/BoundarySystemInspector.cs
+++ Assets/MixedRealityToolkit/Inspectors/ServiceInspectors/BoundarySystemInspector.cs
@@ -10,39 +10,96 @@
     [MixedRealityServiceInspector(typeof(MixedRealityBoundarySystem))]
     public class BoundarySystemInspector : BaseMixedRealityServiceInspector
     {
-        private const string ShowBoundaryInSceneViewKey = "MRTK_BoundarySystemInspector_ShowBoundaryInSceneView";
-        private static bool ShowBoundaryInSceneView = false;
+        private static readonly Color enabledColor = GUI.backgroundColor;
+        private static readonly Color disabledColor = Color.Lerp(enabledColor, Color.clear, 0.5f);
+
+        private const string ShowCeilingInSceneViewKey = "MRTK_BoundarySystemInspector_ShowCeilingInSceneView";
+        private const string ShowWallsInSceneViewKey = "MRTK_BoundarySystemInspector_ShowWallsInSceneView";
+        private const string ShowFloorInSceneViewKey = "MRTK_BoundarySystemInspector_ShowFloorInSceneVieww";
+        private const string ShowPlayAreaInSceneViewKey = "MRTK_BoundarySystemInspector_ShowPlayAreaInSceneView";
+        private const string ShowTrackedAreaInSceneViewKey = "MRTK_BoundarySystemInspector_ShowTrackedAreaInSceneView";
+
+        private static bool ShowCeilingInSceneView = false;
+        private static bool ShowWallsInSceneView = false;
+        private static bool ShowFloorInSceneView = false;
+        private static bool ShowPlayAreaInSceneView = false;
+        private static bool ShowTrackedAreaInSceneView = false;
+
+        private static readonly Color BoundaryPlaneColor = Color.Lerp(Color.magenta, Color.clear, 0.65f);
+        private static readonly Color BoundaryEdgeColor = Color.cyan;
+
         private static Vector3[] boundaryPlane = new Vector3[4];
+        private static Vector3 P1;
+        private static Vector3 P2;
+        private static Vector3 P3;
+        private static Vector3 P4;
+
+        // When playing, the profile is no longer relevant
+        // Show the options below instead
+        public override bool DrawProfileField { get { return !Application.isPlaying; } }

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

         public override void DrawInspectorGUI(object target)
         {
-            IMixedRealityBoundarySystem boundary = (IMixedRealityBoundarySystem)target;
+            MixedRealityBoundarySystem boundary = (MixedRealityBoundarySystem)target;

             EditorGUILayout.Space();
             EditorGUILayout.LabelField("Boundary Settings", EditorStyles.boldLabel);
             EditorGUILayout.LabelField("Source", boundary.SourceName);

-            EditorGUILayout.Space();
-            EditorGUILayout.LabelField("Editor Settings", EditorStyles.boldLabel);
-            ShowBoundaryInSceneView = SessionState.GetBool(ShowBoundaryInSceneViewKey, false);
-            ShowBoundaryInSceneView = EditorGUILayout.Toggle("Show boundary in scene view", ShowBoundaryInSceneView);
-            SessionState.SetBool(ShowBoundaryInSceneViewKey, ShowBoundaryInSceneView);
-
             Edge[] edge = boundary.Bounds;
             if (edge.Length == 0)
             {
-                EditorGUILayout.HelpBox("No boundary edges found. You may not have a mixed reality device plugged in, or it's not configured to use a boundary.", MessageType.Info);
-                return;
+                EditorGUILayout.HelpBox("No boundary edges found. You may not have a mixed reality device plugged in, or the device is not configured to use a boundary.", MessageType.Info);
+            }
+
+            EditorGUILayout.Space();
+            EditorGUILayout.LabelField("Editor Settings", EditorStyles.boldLabel);
+
+            ShowCeilingInSceneView = SessionState.GetBool(ShowCeilingInSceneViewKey, false);
+            ShowWallsInSceneView = SessionState.GetBool(ShowWallsInSceneViewKey, false);
+            ShowFloorInSceneView = SessionState.GetBool(ShowFloorInSceneViewKey, false);
+            ShowPlayAreaInSceneView = SessionState.GetBool(ShowPlayAreaInSceneViewKey, false);
+            ShowTrackedAreaInSceneView = SessionState.GetBool(ShowTrackedAreaInSceneViewKey, false);
+
+            ShowCeilingInSceneView = EditorGUILayout.Toggle("Show Ceiling", ShowCeilingInSceneView);
+            ShowWallsInSceneView = EditorGUILayout.Toggle("Show Walls", ShowWallsInSceneView);
+            ShowFloorInSceneView = EditorGUILayout.Toggle("Show Floor", ShowFloorInSceneView);
+            ShowPlayAreaInSceneView = EditorGUILayout.Toggle("Show Play Area", ShowPlayAreaInSceneView);
+            ShowTrackedAreaInSceneView = EditorGUILayout.Toggle("Show Tracked Area", ShowTrackedAreaInSceneView);
+
+            SessionState.SetBool(ShowCeilingInSceneViewKey, ShowCeilingInSceneView);
+            SessionState.SetBool(ShowWallsInSceneViewKey, ShowWallsInSceneView);
+            SessionState.SetBool(ShowFloorInSceneViewKey, ShowFloorInSceneView);
+            SessionState.SetBool(ShowPlayAreaInSceneViewKey, ShowPlayAreaInSceneView);
+            SessionState.SetBool(ShowTrackedAreaInSceneViewKey, ShowTrackedAreaInSceneView);
+
+            EditorGUILayout.Space();
+            EditorGUILayout.LabelField("Runtime Settings", EditorStyles.boldLabel);
+
+            if (Application.isPlaying)
+            {
+                GUI.color = enabledColor;
+                boundary.ShowBoundaryCeiling = EditorGUILayout.Toggle("Show Ceiling", boundary.ShowBoundaryCeiling);
+                boundary.ShowBoundaryWalls = EditorGUILayout.Toggle("Show Walls", boundary.ShowBoundaryWalls);
+                boundary.ShowFloor = EditorGUILayout.Toggle("Show Floor", boundary.ShowFloor);
+                boundary.ShowPlayArea = EditorGUILayout.Toggle("Show Play Area", boundary.ShowPlayArea);
+                boundary.ShowTrackedArea = EditorGUILayout.Toggle("Show Tracked Area", boundary.ShowTrackedArea);
+            }
+            else
+            {
+                GUI.color = disabledColor;
+                EditorGUILayout.Toggle("Show Ceiling", false);
+                EditorGUILayout.Toggle("Show Walls", false);
+                EditorGUILayout.Toggle("Show Floor", false);
+                EditorGUILayout.Toggle("Show Play Area", false);
+                EditorGUILayout.Toggle("Show Tracked Area", false);
             }
         }

         public override void DrawSceneGUI(object target, SceneView sceneView)
         {
-            if (!ShowBoundaryInSceneView)
-                return;
-
             IMixedRealityBoundarySystem boundary = (IMixedRealityBoundarySystem)target;

             Edge[] edge = boundary.Bounds;
@@ -52,22 +109,57 @@

             float boundaryFloorHeight = (boundary.FloorHeight ?? 0);

-            for (int i = 0; i < edge.Length; i++)
+            if (ShowWallsInSceneView)
             {
-                Vector2 pointA = edge[i].PointA;
-                Vector2 pointB = edge[i].PointB;
-                Vector3 pointABot = new Vector3(pointA.x, boundaryFloorHeight, pointA.y);
-                Vector3 pointATop = new Vector3(pointA.x, boundary.BoundaryHeight, pointA.y);
-                Vector3 pointBBot = new Vector3(pointB.x, boundaryFloorHeight, pointB.y);
-                Vector3 pointBTop = new Vector3(pointB.x, boundary.BoundaryHeight, pointB.y);
+                for (int i = 0; i < edge.Length; i++)
+                {
+                    Vector2 pointA = edge[i].PointA;
+                    Vector2 pointB = edge[i].PointB;
+                    boundaryPlane[0] = new Vector3(pointA.x, boundaryFloorHeight, pointA.y);
+                    boundaryPlane[1] = new Vector3(pointB.x, boundaryFloorHeight, pointB.y);
+                    boundaryPlane[2] = new Vector3(pointB.x, boundary.BoundaryHeight, pointB.y);
+                    boundaryPlane[3] = new Vector3(pointA.x, boundary.BoundaryHeight, pointA.y);

-                boundaryPlane[0] = pointABot;
-                boundaryPlane[1] = pointATop;
-                boundaryPlane[2] = pointBTop;
-                boundaryPlane[3] = pointBBot;
+                    Handles.DrawSolidRectangleWithOutline(boundaryPlane, BoundaryPlaneColor, BoundaryEdgeColor);
+                }
+            }

-                Handles.DrawSolidRectangleWithOutline(boundaryPlane, Color.Lerp(Color.cyan, Color.clear, 0.5f), Color.magenta);
+            if (ShowTrackedAreaInSceneView)
+            {
+                Vector2 center;
+                float angle;
+                float width;
+                float height;
+
+                if (boundary.TryGetRectangularBoundsParams(out center, out angle, out width, out height))
+                {
+                    Quaternion rotation = Quaternion.Euler(0, -angle, 0);
+                    Vector3 boundsCenter = new Vector3(center.x, 0, center.y);
+                    float xExtents = width * 0.5f;
+                    float zExtents = height * 0.5f;
+
+                    P1 = RotatePointAroundPivot(new Vector3(center.x + xExtents, 0, center.y + zExtents), boundsCenter, rotation);
+                    P2 = RotatePointAroundPivot(new Vector3(center.x + xExtents, 0, center.y - zExtents), boundsCenter, rotation);
+                    P3 = RotatePointAroundPivot(new Vector3(center.x - xExtents, 0, center.y - zExtents), boundsCenter, rotation);
+                    P4 = RotatePointAroundPivot(new Vector3(center.x - xExtents, 0, center.y + zExtents), boundsCenter, rotation);
+
+                    P1.y = boundaryFloorHeight;
+                    P2.y = boundaryFloorHeight;
+                    P3.y = boundaryFloorHeight;
+                    P4.y = boundaryFloorHeight;
+
+                    boundaryPlane[0] = P1;
+                    boundaryPlane[1] = P2;
+                    boundaryPlane[2] = P3;
+                    boundaryPlane[3] = P4;
+                    Handles.DrawSolidRectangleWithOutline(boundaryPlane, BoundaryPlaneColor, BoundaryEdgeColor);
+                }
             }
+        }
+
+        public Vector3 RotatePointAroundPivot(Vector3 point, Vector3 pivot, Quaternion rotation)
+        {
+            return rotation * (point - pivot) + pivot;
         }
     }
 }


fixed warning for a local variable which never uses.

--- Assets/QuickSheet/GDataPlugin/Editor/GDataDB/GDataDB/Impl/GDataDBRequestFactory.cs
+++ Assets/QuickSheet/GDataPlugin/Editor/GDataDB/GDataDB/Impl/GDataDBRequestFactory.cs
@@ -43,7 +43,6 @@
                 AccessType = "offline",
                 TokenType = "refresh"
             };
-            string authUrl = OAuthUtil.CreateOAuth2AuthorizationUrl(parameters);
             return new GOAuth2RequestFactory("spreadsheet", "MySpreadsheetIntegration-v1", parameters);
         }


Update Framework.cs

Update Framework.cs

--- Runtime/LibEcs/Framework.cs
+++ Runtime/LibEcs/Framework.cs
@@ -62,7 +62,12 @@
 	{
 		public GroupCore this[int index] => globals[index];

-		internal static GroupCore[] globals = new GroupCore[32];
+		public static bool has(int index)
+		{
+			return globals.Length > index && globals[index] != null;
+		}
+
+		public static GroupCore[] globals = new GroupCore[32];
 		internal static CacheGroup All = new CacheGroup();
 		internal static FamilyGroupTags ByTag = new FamilyGroupTags();
 		internal static FamilyGroupTags ByType = new FamilyGroupTags();


Add overload to retrieve specific template

--- Core/OfficeDevPnP.Core/Framework/Provisioning/BaseTemplates/BaseTemplateManager.cs
+++ Core/OfficeDevPnP.Core/Framework/Provisioning/BaseTemplates/BaseTemplateManager.cs
@@ -20,11 +20,17 @@
             web.Context.Load(web, p => p.WebTemplate, p => p.Configuration);
             web.Context.ExecuteQueryRetry();

+            return GetBaseTemplate(web, web.WebTemplate, web.Configuration);
+        }
+
+        public static ProvisioningTemplate GetBaseTemplate(this Web web, string webTemplate, short configuration)
+        {
+
             ProvisioningTemplate provisioningTemplate = null;

             try
             {
-                string baseTemplate = string.Format("OfficeDevPnP.Core.Framework.Provisioning.BaseTemplates.v{0}.{1}{2}Template.xml", GetSharePointVersion(), web.WebTemplate, web.Configuration);
+                string baseTemplate = string.Format("OfficeDevPnP.Core.Framework.Provisioning.BaseTemplates.v{0}.{1}{2}Template.xml", GetSharePointVersion(), webTemplate, configuration);
                 using (Stream stream = typeof(BaseTemplateManager).Assembly.GetManifestResourceStream(baseTemplate))
                 {
                     // Get the XML document from the stream
@@ -34,13 +40,14 @@
                     provisioningTemplate = formatter.ToProvisioningTemplate(stream);
                 }
             }
-            catch(Exception)
+            catch (Exception)
             {
                 //TODO: log message
             }

             return provisioningTemplate;
         }
+

         private static int GetSharePointVersion()
         {


fix group provisioning

fix group provisioning

--- Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectSiteSecurity.cs
+++ Core/OfficeDevPnP.Core/Framework/Provisioning/ObjectHandlers/ObjectSiteSecurity.cs
@@ -275,7 +275,7 @@
                 ))
                 {
                     Group group;
-                    var allGroups = web.Context.LoadQuery(web.SiteGroups.Include(gr => gr.LoginName));
+                    var allGroups = web.Context.LoadQuery(web.SiteGroups.Include(gr => gr.LoginName, gr => gr.Id));
                     web.Context.ExecuteQueryRetry();

                     string parsedGroupTitle = parser.ParseString(siteGroup.Title);


bug fix in truncate node

bug fix in truncate node

--- GraphQL/Implementations/SonesGraphQueryLanguage/StatementNodes/DML/TruncateNode.cs
+++ GraphQL/Implementations/SonesGraphQueryLanguage/StatementNodes/DML/TruncateNode.cs
@@ -69,11 +69,11 @@
             {
                 var stat = myGraphDB.Truncate(mySecurityToken, myTransactionToken, new RequestTruncate(_TypeName), (stats) => stats);

-                qresult = new QueryResult(myQuery, SonesGQLConstants.GQL, Convert.ToUInt64(stat.ExecutionTime.Milliseconds), ResultType.Successful);
+                result = new QueryResult(myQuery, SonesGQLConstants.GQL, Convert.ToUInt64(stat.ExecutionTime.Milliseconds), ResultType.Successful);
             }
             catch(ASonesException e)
             {
-                qresult = new QueryResult(myQuery, SonesGQLConstants.GQL, 0, ResultType.Failed, null, e);
+                result = new QueryResult(myQuery, SonesGQLConstants.GQL, 0, ResultType.Failed, null, e);
             }

             return result;


Add input event to dotnetcore2.0 example function

--- examples/dotnetcore2.0/Function.cs
+++ examples/dotnetcore2.0/Function.cs
@@ -4,12 +4,7 @@
 // Run with:
 // docker run --rm -v "$PWD"/pub:/var/task lambci/lambda:dotnetcore2.0 test::test.Function::FunctionHandler "some"

-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
 using Amazon.Lambda.Core;
-using System.IO;

 [assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]

@@ -17,10 +12,10 @@
 {
     public class Function
     {
-        public string FunctionHandler(Stream stream, ILambdaContext context)
+        public string FunctionHandler(object inputEvent, ILambdaContext context)
         {
-            context.Logger.Log("Log Hello world");
-            return "Hallo world!";
+            context.Logger.Log($"inputEvent: {inputEvent}");
+            return "Hello World!";
         }
     }
 }


Changed GetCustomXmlPart to use LastOrDefault instead of SingleOrDefault.

--- OpenXmlExtensions/OpenXmlExtensions/Extensions/WordprocessingDocumentExtensions.cs
+++ OpenXmlExtensions/OpenXmlExtensions/Extensions/WordprocessingDocumentExtensions.cs
@@ -53,7 +53,7 @@
             if (document != null && document.MainDocumentPart != null)
                 return document.MainDocumentPart
                     .GetPartsOfType<CustomXmlPart>()
-                    .SingleOrDefault(p => p.GetRootNamespace() == ns);
+                    .LastOrDefault(p => p.GetRootNamespace() == ns);
             else
                 return null;
         }
@@ -174,8 +174,16 @@
                 string childElementName = sdt.SdtProperties.GetFirstChild<Tag>().Val.Value;
                 XElement leafElement = destRoot.Descendants().First(e => e.Name.LocalName == childElementName);

+                // Define the list of path elements, using one of the following two options:
+                // 1. The following statement is used as the basis for building the full path
+                // expression (the same as built by Microsoft Word).
+                List<XElement> pathElements = leafElement.AncestorsAndSelf().Reverse().ToList();
+
+                // 2. The following statement is used as the basis for building the short xPath
+                // expression "//ns0:leafElement[1]".
+                // List<XElement> pathElements = new List<XElement>() { leafElement };
+
                 // Build list of namespace names for building the prefix mapping later on.
-                List<XElement> pathElements = leafElement.AncestorsAndSelf().Reverse().ToList();
                 List<string> nsList = pathElements
                     .Where(e => e.Name.Namespace != XNamespace.None)
                     .Aggregate(new HashSet<string>(), (set, e) => set.Append(e.Name.NamespaceName))
@@ -191,9 +199,18 @@
                         sb.Append("xmlns:ns").Append(t.index).Append("='").Append(t.ns).Append("' "))
                     .ToString().Trim();

-                // Build xPath, assuming we will always take the first element.
+                // Build xPath, assuming we will always take the first element and using one
+                // of the following two options (see above):
+                // 1. The following statement defines the prefix for building a full path
+                // expression "/ns0:path[1]/ns0:to[1]/ns0:leafElement[1]".
                 Func<string, string> prefix = localName =>
                     nsDict[localName] >= 0 ? "/ns" + nsDict[localName] + ":" : "/";
+
+                // 2. The following statement defines the prefix for building the short path
+                // expression "//ns0:leafElement[1]".
+                // Func<string, string> prefix = localName =>
+                //     nsDict[localName] >= 0 ? "//ns" + nsDict[localName] + ":" : "//";
+
                 string xPath = pathElements
                     .Select(e => prefix(e.Name.LocalName) + e.Name.LocalName + "[1]")
                     .Aggregate(new StringBuilder(), (sb, pc) => sb.Append(pc)).ToString();


多客服  修改获取用户聊天记录接口

多客服  修改获取用户聊天记录接口

--- Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceAPI.cs
+++ Senparc.Weixin.MP/Senparc.Weixin.MP/AdvancedAPIs/CustomService/CustomServiceAPI.cs
@@ -53,7 +53,7 @@
         {
             return ApiHandlerWapper.TryCommonApi(accessToken =>
             {
-                var urlFormat = "https://api.weixin.qq.com/cgi-bin/customservice/getrecord?access_token={0}";
+                var urlFormat = " https://api.weixin.qq.com/customservice/msgrecord/getrecord?access_token={0}";

                 //规范页码
                 if (pageSize <= 0)


Fixed device list where bottom device collasping div would not open

--- Source/Applications/openECA/openECAClient/wwwroot/UserDefinedOutputMappings.cshtml
+++ Source/Applications/openECA/openECAClient/wwwroot/UserDefinedOutputMappings.cshtml
@@ -848,7 +848,7 @@

                             var pa = '';
                             try{
-                                pa = $.grep(deviceData, function (d) { return d.Acronym == measurement.DeviceAcronym; })[0].ParentAcronym;
+                                pa = $.grep($scope.deviceList, function (d) { return $.grep(d.Devices, function (dd) { return dd.Acronym == measurement.DeviceAcronym }).length > 0 })[0].ParentAcronym;
                             }
                             catch(ex){
                                 pa = '';
@@ -942,7 +942,7 @@
             }

             $scope.fixAcronyms = function (string) {
-                return string.replace(/!/g, '_')
+                return string.replace(/[^a-zA-Z0-9]/g, '')
             }

             $scope.showAddSignals = function () {


Fix errors in SA1407 tests

Fix errors in SA1407 tests

--- StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1407UnitTests.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1407UnitTests.cs
@@ -199,22 +199,35 @@
 {
     public void Bar()
     {
+        int b = 1;
         int x = 1 * 1 + 1 * 1;
-        int y = 5 + y * b / 6 % z - 2;
+        int y = 5 + x * b / 6 % x - 2;
         // the following test makes sure the code fix doesn't alter spacing
-        int z = z ? 4*3+-1 :false;
-    }
-}";
-            var fixedCode = @"public class Foo
-{
-    public void Bar()
-    {
+        int z = y==1 ? 4*3+-1 :0;
+    }
+}";
+            var fixedCode = @"public class Foo
+{
+    public void Bar()
+    {
+        int b = 1;
         int x = (1 * 1) + (1 * 1);
-        int y = 5 + ((y * b / 6) % z) - 2;
+        int y = 5 + ((x * b / 6) % x) - 2;
         // the following test makes sure the code fix doesn't alter spacing
-        int z = z ? (4*3)+-1 :false;
-    }
-}";
+        int z = y==1 ? (4*3)+-1 :0;
+    }
+}";
+
+            DiagnosticResult[] expected =
+                {
+                    this.CSharpDiagnostic().WithLocation(6, 17),
+                    this.CSharpDiagnostic().WithLocation(6, 25),
+                    this.CSharpDiagnostic().WithLocation(7, 21),
+                    this.CSharpDiagnostic().WithLocation(7, 21),
+                    this.CSharpDiagnostic().WithLocation(9, 24),
+                };
+
+            await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None);

             await this.VerifyCSharpFixAsync(testCode, fixedCode);
         }


One minor fix as per sonarqube

One minor fix as per sonarqube

--- Tests/Glav.CognitiveServices.UnitTests/ComputerVision/ImageAnalysisParsingTests.cs
+++ Tests/Glav.CognitiveServices.UnitTests/ComputerVision/ImageAnalysisParsingTests.cs
@@ -10,7 +10,7 @@
 {
     public class ImageAnalysisParsingTests
     {
-        private TestDataHelper _testHelper = new TestDataHelper();
+        private readonly TestDataHelper _testHelper = new TestDataHelper();
         private readonly string _visionImageAnalysisResponse;

         public ImageAnalysisParsingTests()


fix of powershell adding modules when drive mapping

--- WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
+++ WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
@@ -1753,26 +1753,19 @@
         {
             HostedSolutionLog.LogStart("OpenRunspace");

-            bool isModulesImported = true;
-
             if (runspaceConfiguration == null)
             {
                 runspaceConfiguration = RunspaceConfiguration.Create();
-
-                isModulesImported = false;
-            }
-
+            }
+
             Runspace runSpace = RunspaceFactory.CreateRunspace(runspaceConfiguration);
             //
             runSpace.Open();
             //
             runSpace.SessionStateProxy.SetVariable("ConfirmPreference", "none");

-            if (!isModulesImported)
-            {
-                ImportGroupPolicyMolude(runSpace);
-                ImportActiveDirectoryMolude(runSpace);
-            }
+            ImportGroupPolicyMolude(runSpace);
+            ImportActiveDirectoryMolude(runSpace);

             HostedSolutionLog.LogEnd("OpenRunspace");
             return runSpace;
@@ -1785,7 +1778,7 @@
                 if (runspace != null && runspace.RunspaceStateInfo.State == RunspaceState.Opened)
                 {
                     runspace.Close();
-                    //runspaceConfiguration = null;
+                    runspaceConfiguration = null;
                 }
             }
             catch (Exception ex)


allow commands to be a prefix to another

--- src/CMenu.cs
+++ src/CMenu.cs
@@ -202,11 +202,18 @@
 				throw new ArgumentNullException ("cmd");
 			}

-			var its = _Menu
-				.Where (it => it.Execute != null)
-				.Where (it => it.Selector.StartsWith (cmd, StringComparison.InvariantCultureIgnoreCase))
-				.OrderBy (it => it.Selector)
+			var from = _Menu.Where (it => it.Execute != null);
+
+			var its = from
+				.Where (it => cmd.Equals (it.Selector, StringComparison.InvariantCultureIgnoreCase))
 				.ToArray ();
+			if (its.Length == 0) {
+				its = from
+					.Where (it => cmd.StartsWith (it.Selector, StringComparison.InvariantCultureIgnoreCase))
+					.OrderBy (it => it.Selector)
+					.ToArray ();
+			}
+
 			if (its.Length == 1) {
 				return its[0];
 			}


Update to MD5 hash PR.

Update to MD5 hash PR.

--- Gibe.DittoProcessors/Processors/StringToMd5HashAttribute.cs
+++ Gibe.DittoProcessors/Processors/StringToMd5HashAttribute.cs
@@ -12,10 +12,8 @@

 			var stringValue = Value as string;

-			// byte array representation of that string
 			byte[] encodedValue = new UTF8Encoding().GetBytes(stringValue);

-			// need MD5 to calculate the hash
 			byte[] hashValue = ((HashAlgorithm)CryptoConfig.CreateFromName("MD5")).ComputeHash(encodedValue);

 			// string representation (similar to UNIX format)


Delete AssemblyInfo.cs

Delete AssemblyInfo.cs

[skip ci]

--- apps/Core2D.Avalonia.Direct2D/Properties/AssemblyInfo.cs
+++ apps/Core2D.Avalonia.Direct2D/Properties/AssemblyInfo.cs
@@ -1,20 +0,0 @@
-// Copyright (c) Wiesław Šoltés. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyCompany("Wiesław Šoltés")]
-[assembly: AssemblyCopyright("Copyright © Wiesław Šoltés 2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyVersion("0.4.0")]
-[assembly: AssemblyFileVersion("0.4.0")]
-[assembly: AssemblyInformationalVersion("0.4.0")]
-
-[assembly: AssemblyTitle("Core2D.Avalonia.Direct2D")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyProduct("Core2D.Avalonia.Direct2D")]
-[assembly: AssemblyCulture("")]
-
-[assembly: ComVisible(false)]
-[assembly: Guid("4868069e-3ad4-497e-9b8e-148d1eeacfd7")]


mercurial test

mercurial test

Former-commit-id: 15dce1153453ab48003de3836ccb0d6a53adcaf8


Saving and loading playlists implemented. Also removing path moved to another project as a string extension method.

--- NaudioPlayer/NaudioPlayer/ViewModels/MainWindowViewModel.cs
+++ NaudioPlayer/NaudioPlayer/ViewModels/MainWindowViewModel.cs
@@ -1,20 +1,17 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
+using System.Collections.ObjectModel;
 using System.ComponentModel;
-using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Input;
-using System.Windows.Threading;
 using Microsoft.Win32;
 using Microsoft.WindowsAPICodePack.Dialogs;
+using MyLibrary.CustomCollections.ExtensionMethods;
+using MyLibrary.StringOperations.ExtensionMethods;
 using NaudioPlayer.Annotations;
 using NaudioPlayer.Models;
+using NaudioPlayer.Services;
 using NaudioWrapper;

 namespace NaudioPlayer.ViewModels
@@ -120,6 +117,8 @@
         public ICommand ExitApplicationCommand { get; set; }
         public ICommand AddFileToPlaylistCommand { get; set; }
         public ICommand AddFolderToPlaylistCommand { get; set; }
+        public ICommand SavePlaylistCommand { get; set; }
+        public ICommand LoadPlaylistCommand { get; set; }

         public ICommand RewindToStartCommand { get; set; }
         public ICommand StartPlaybackCommand { get; set; }
@@ -201,6 +200,8 @@
             ExitApplicationCommand = new RelayCommand(ExitApplication,CanExitApplication);
             AddFileToPlaylistCommand = new RelayCommand(AddFileToPlaylist, CanAddFileToPlaylist);
             AddFolderToPlaylistCommand = new RelayCommand(AddFolderToPlaylist, CanAddFolderToPlaylist);
+            SavePlaylistCommand = new RelayCommand(SavePlaylist, CanSavePlaylist);
+            LoadPlaylistCommand = new RelayCommand(LoadPlaylist, CanLoadPlaylist);

             // Player commands
             RewindToStartCommand = new RelayCommand(RewindToStart, CanRewindToStart);
@@ -215,6 +216,7 @@
             VolumeControlValueChangedCommand = new RelayCommand(VolumeControlValueChanged, CanVolumeControlValueChanged);
         }

+        // Menu commands
         private void ExitApplication(object p)
         {
             _audioPlayer.Dispose();
@@ -254,11 +256,11 @@
             if (result == CommonFileDialogResult.Ok)
             {
                 var folderName = cofd.FileName;
-                var audioFiles = Directory.EnumerateFiles(folderName, "*.", SearchOption.AllDirectories)
+                var audioFiles = Directory.EnumerateFiles(folderName, "*.*", SearchOption.AllDirectories)
                                           .Where(f=>f.EndsWith(".wav") || f.EndsWith(".wav") || f.EndsWith(".wma") || f.EndsWith(".ogg") || f.EndsWith(".flac"));
                 foreach (var audioFile in audioFiles)
                 {
-                    var removePath = RemovePath(audioFile);
+                    var removePath = audioFile.RemovePath();
                     var friendlyName = removePath.Remove(removePath.Length - 4);
                     var track = new Track(audioFile, friendlyName);
                     Playlist.Add(track);
@@ -267,21 +269,6 @@
             }
         }

-        private string RemovePath(string input)
-        {
-            if (input.Contains("\\"))
-            {
-                var modifiedInput = input.SkipWhile(s => s != '\\').Skip(1);
-                string output = string.Empty;
-                var enumerable = modifiedInput as char[] ?? modifiedInput.ToArray();
-                for (int i = 0; i < enumerable.Count(); i++)
-                {
-                    output += enumerable[i];
-                }
-                return RemovePath(output);
-            }
-            return input;
-        }
         private bool CanAddFolderToPlaylist(object p)
         {
             if (_playbackState == PlaybackState.Stopped)
@@ -291,6 +278,40 @@
             return false;
         }

+        private void SavePlaylist(object p)
+        {
+            var sfd = new SaveFileDialog();
+            sfd.CreatePrompt = false;
+            sfd.OverwritePrompt = true;
+            sfd.Filter = "PLAYLIST files (*.playlist) | *.playlist";
+            if (sfd.ShowDialog() == true)
+            {
+                var ps = new PlaylistSaver();
+                ps.Save(Playlist, sfd.FileName);
+            }
+        }
+
+        private bool CanSavePlaylist(object p)
+        {
+            return true;
+        }
+
+        private void LoadPlaylist(object p)
+        {
+            var ofd = new OpenFileDialog();
+            ofd.Filter = "PLAYLIST files (*.playlist) | *.playlist";
+            if (ofd.ShowDialog() == true)
+            {
+                Playlist = new PlaylistLoader().Load(ofd.FileName).ToObservableCollection();
+            }
+        }
+
+        private bool CanLoadPlaylist(object p)
+        {
+            return true;
+        }
+
+        // Player commands
         private void RewindToStart(object p)
         {
             _audioPlayer.SetPosition(0);


Fix FB.Init

Fix FB.Init

Don't need to use InvokeOnAppThread here, already calling from main thread.

--- SharedSource/Facebook/FB.cs
+++ SharedSource/Facebook/FB.cs
@@ -209,7 +209,7 @@
             if (_client != null)
             {
                 if (onInitComplete != null)
-                    Dispatcher.InvokeOnAppThread(() => onInitComplete());
+                    onInitComplete();
                 return;
             }
             if (_web == null) throw new MissingPlatformException();
@@ -248,7 +248,7 @@
             }

             if (onInitComplete != null)
-                Dispatcher.InvokeOnAppThread(() => onInitComplete());
+                onInitComplete();
 #else
             throw new PlatformNotSupportedException("");
 #endif


Additional proxy commute test.

Additional proxy commute test.

--- ShieldedTests/ProxyTests.cs
+++ ShieldedTests/ProxyTests.cs
@@ -21,6 +21,7 @@
                 if (Name == "conflicting")
                     // see test below.
                     Assert.AreEqual("testing conflict...", value);
+                // this should be avoided! see ProxyCommuteTest for reason.
                 NameChanges.Commute((ref int i) => i++);
             }
         }
@@ -112,6 +113,21 @@
             // commutes never conflict (!)
             Assert.AreEqual(100, transactionCount);
             Assert.Greater(commuteCount, 100);
+
+            try
+            {
+                Shield.InTransaction(() => {
+                    test.Commute(() => {
+                        // this will throw, because it tries to run a commute on NameChanges, which
+                        // is a separate shielded obj from the backing storage of the proxy.
+                        // test.Commute can only touch the virtual fields, or non-shielded objects.
+                        // a setter that commutes over another shielded field should be avoided!
+                        test.Name = "something";
+                        Assert.Fail();
+                    });
+                });
+            }
+            catch (InvalidOperationException) { }
         }
     }
 }


Delete Program.cs

Delete Program.cs

--- SimulationWinner/Program.cs
+++ SimulationWinner/Program.cs
@@ -1,128 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace SimulationWinner
-{
-    class Program
-    {
-        // data structures
-        class Rope
-        {
-            private Point _start;
-            private Point _end;
-
-            public Rope(Point start, Point end)
-            {
-                Start = start;
-                End = end;
-            }
-
-            public Point Start { get { return _start; } set  {_start = value; } }
-            public Point End { get { return _end; } set { _end = value; } }
-            public override bool Equals(object obj)
-            {
-                Rope r = obj as Rope;
-                if (r == null) return false;
-                return r.GetType() == GetType() &&
-                       r.Start == this.Start &&
-                       r.End == this.End;
-            }
-        }
-
-        class Point
-        {
-            private float _y;
-            private float _x;
-
-            public Point(float x, float y)
-            {
-                X = x;
-                Y = y;
-
-            }
-
-            public float X { get { return _x; } set { _x = value; } }
-            public float Y { get { return _y; } set { _y = value; } }
-            public override bool Equals(object obj)
-            {
-                Point pt = obj as Point;
-                if (pt == null) return false;
-                return pt.GetType() == GetType() &&
-                       pt.X == this.X &&
-                       pt.Y == this.Y;
-            }
-        }
-
-        //Bat Man Joker Problem. Find number of intersections of ropes between two buildings
-        static void Main(string[] args)
-        {
-
-
-            List<Rope> ropes = GetRopes().ToList();
-            //Build Points in 2 D space
-
-            int outputIntersections = 0;
-            //Calculate number of intersections
-            for (int i = 0; i < ropes.Count; i++)
-            {
-                for (int j = i; j < ropes.Count; j++)
-                {
-                    if (i == j) continue;
-                    if (FindIntersection(ropes[i], ropes[j]))
-                        outputIntersections += 1;
-                }
-            }
-            Console.WriteLine(outputIntersections);
-            Console.Read();
-        }
-
-        private static IEnumerable<Rope> GetRopes()
-        {
-            int numOfRopes = 0;
-            int.TryParse(Console.ReadLine(), out numOfRopes);
-            List<Rope> ropes = new List<Rope>();
-
-            //Let two buildings are separated by length sep=10 /seed value randomly taken
-            //This helps to construct points in 2d space
-            int sep = 10;
-
-            while (numOfRopes != 0)
-            {
-                var ropeStartEnds = Console.ReadLine();
-
-                var res = ropeStartEnds.Split(' ').Select(Int32.Parse).ToList();
-                //Validate rope start and end points are only given and nothing else
-                if (res.Count != 2)
-                {
-                    return new List<Rope>();
-                }
-                // Assuming start point is on the y plane which means x=0 and
-                // end point is at a separated distance sep=10 which means x=>x+sep=10
-                // start point on y axis, x=0;
-                Point start = new Point(0, res[0]);
-                Point end = new Point(sep, res[1]);
-                Rope r = new Rope(start, end);
-                if (!ropes.Any(x => r.Start.Equals(x.Start) && r.End.Equals(x.End)))
-                    ropes.Add(r);
-                numOfRopes--;
-            }
-            return ropes;
-        }
-
-        private static bool FindIntersection(Rope r1, Rope r2)
-        {
-            float distXr1 = r1.End.X - r1.Start.X;
-            float distYr1 = r1.End.Y - r1.Start.Y;
-            float distXr2 = r2.End.X - r2.Start.X;
-            float distYr2 = r2.End.Y - r2.Start.Y;
-
-            // Solve for t1 and t2
-            float dist = (distYr1 * distXr2 - distXr1 * distYr2);
-
-            float res = ((r1.Start.X - r2.Start.X) * distYr2 + (r2.Start.Y - r1.Start.Y) * distXr2) / dist;
-            return !float.IsInfinity(res);
-        }
-
-    }
-}


Population now adds self to System.Population in the consructor

--- Pulsar4X/Pulsar4X.Lib/Entities/StarSystem/Population.cs
+++ Pulsar4X/Pulsar4X.Lib/Entities/StarSystem/Population.cs
@@ -485,6 +485,7 @@

         public Population(Planet a_oPlanet, Faction a_oFaction, String a_oName = "Earth", Species a_oSpecies = null)
         {
+            Id = Guid.NewGuid();
             // initialise minerials:
             m_aiMinerials = new float[Constants.Minerals.NO_OF_MINERIALS];
             for (int i = 0; i < Constants.Minerals.NO_OF_MINERIALS; ++i)
@@ -512,6 +513,8 @@

             Faction = a_oFaction;
             Planet = a_oPlanet;
+
+
             if (a_oSpecies == null)
             {
                 Species = Faction.Species;
@@ -521,7 +524,7 @@
                 Species = a_oSpecies;
             }
             Planet.Populations.Add(this); // add us to the list of pops on the planet!
-
+            Planet.Position.System.Populations.Add(this);
             Contact = new SystemContact(Faction, this);

             GovernorPresent = false;


removed data length

removed data length

--- RemoteTaskServer/Api/Network/Messages/MessageBuilder.cs
+++ RemoteTaskServer/Api/Network/Messages/MessageBuilder.cs
@@ -85,7 +85,6 @@
                                         binaryWriter.Write(Endpoint.Length);
                                         binaryWriter.Write(Endpoint);
                                         binaryWriter.Write(EncryptionType.CBC.ToString());
-                                        binaryWriter.Write(encryptedData.Length);
                                         binaryWriter.Write(encryptedData);
                                     }
                                     encryptedData = memoryStream.ToArray();
@@ -133,7 +132,6 @@
                             binaryWriter.Write(Endpoint.Length);
                             binaryWriter.Write(Endpoint);
                             binaryWriter.Write(EncryptionType.OFB.ToString());
-                            binaryWriter.Write(encryptedData.Length);
                             binaryWriter.Write(encryptedData);
                         }
                         encryptedData = memoryStream.ToArray();


Added conversion of UnityEngine.Objects to string in convert_args using GetID

--- MiscUtils.cs
+++ MiscUtils.cs
@@ -11,6 +11,7 @@
 using System.Text.RegularExpressions;
 using System.Diagnostics;
 using UnityEngine;
+using Object = UnityEngine.Object;

 namespace AT_Utils
 {
@@ -350,6 +351,9 @@
                     case Transform t:
                         args[i] = $"{t.name}: pos {t.position}, rot {t.rotation.eulerAngles}";
                         break;
+                    case Object obj:
+                        args[i] = obj.GetID();
+                        break;
                     case IEnumerable enumerable:
                     {
                         var arr = enumerable.Cast<object>().ToArray();


Added rabbit

Added rabbit

--- Skylight.Static/Auth/Bot.cs
+++ Skylight.Static/Auth/Bot.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using PlayerIOClient;
 using Skylight.Miscellaneous;
+using Rabbit;

 namespace Skylight
 {
@@ -213,42 +214,13 @@
         /// <param name="createRoom"></param>
         public void Join(bool createRoom = true)
         {
-            // Update the game version.
-            Refresh();
-
-            if (!IsConnected)
-            {
-                // Log in
-                LogIn();
-
-                // If you didn't connect, it must have failed.
-                if (!IsConnected)
-                {
-                    return;
-                }
-            }

             // Parse the level ID (because some people like to put full URLs in).
             R.Id = Tools.ParseUrl(R.Id);

-            try
-            {
-                if (createRoom)
-                {
-                    // Join room
-                    Connection = Client.Multiplayer.CreateJoinRoom(
-                        R.Id, // RoomId   (URL)
-                        _storedVersion, // RoomType (Server)
-                        true, // Visible
-                        new Dictionary<string, string>(), // RoomData
-                        new Dictionary<string, string>()); // JoinData
-                }
-                else
-                {
-                    Connection = Client.Multiplayer.JoinRoom(
-                        R.Id,
-                        new Dictionary<string, string>());
-                }
+           var rabbitAuth = new Rabbit.Auth();
+
+            Connection = rabbitAuth.LogIn("EMAILORTOKEN", "PASSWORD", R.Id);
                 // Update room data
                 Room.JoinedRooms.Add(R);


Added accessor methods to CCGrid3DAction as well that takes an int x and int y so that we do not have keep creating CCGridSize struct all over the place just to Get and Set the Grid vertices.

--- cocos2d/actions/action_grid/CCGrid3DAction.cs
+++ cocos2d/actions/action_grid/CCGrid3DAction.cs
@@ -51,20 +51,53 @@

         #endregion Constructors

-
+		/// <summary>
+		/// returns the vertex at a given position
+		/// </summary>
         public CCVertex3F Vertex(CCGridSize pos)
         {
             return m_pGrid.Vertex(pos);
         }

+		/// <summary>
+		/// returns the vertex at a given position
+		/// </summary>
+		public CCVertex3F Vertex(int x, int y)
+		{
+			return m_pGrid.Vertex(x,y);
+		}
+
+		/// <summary>
+		/// returns the original (non-transformed) vertex at a given position
+		/// </summary>
         public CCVertex3F OriginalVertex(CCGridSize pos)
         {
             return m_pGrid.OriginalVertex(pos);
         }

+		/// <summary>
+		/// returns the original (non-transformed) vertex at a given position
+		/// </summary>
+		public CCVertex3F OriginalVertex(int x, int y)
+		{
+			return m_pGrid.OriginalVertex(x,y);
+		}
+
+		/// <summary>
+		/// sets a new vertex at a given position
+		/// </summary>
         public void SetVertex(CCGridSize pos, ref CCVertex3F vertex)
         {
             m_pGrid.SetVertex(pos, ref vertex);
         }
+
+		/// <summary>
+		/// sets a new vertex at a given position
+		/// </summary>
+		public void SetVertex(int x, int y, ref CCVertex3F vertex)
+		{
+			m_pGrid.SetVertex(x,y, ref vertex);
+		}
+
     }
 }


save updated

save updated

--- RunApproachStatistics/ViewModel/MeasurementViewModel.cs
+++ RunApproachStatistics/ViewModel/MeasurementViewModel.cs
@@ -457,11 +457,16 @@
                 newVault.gymnast_id = gymnastIds[Gymnasts.IndexOf(Gymnast)];
             }

-            String vaultNumber = VaultNumber;
-            if (vaultNumber == null || vaultNumber.Equals("") || GetErrorArr("VaultNumber") != null)
-            {
-                vaultNumber = null;
-            }
+            if (VaultNumber == null || VaultNumber.Equals("") || GetErrorArr("VaultNumber") != null)
+            {
+                newVault.vaultnumber = null;
+            }
+            else
+            {
+                newVault.vaultnumber_id = vaultNumberIds[VaultNumbers.IndexOf(VaultNumber)];
+            }
+
+

             RatingViewModel ratingVM = (RatingViewModel)RatingControl;
             int rating = ratingVM.getScore();


Verify CRC if possible when constructing RuneTek5CacheFile

--- RuneScapeCacheTools/Cache/RuneTek5/RuneTek5CacheFile.cs
+++ RuneScapeCacheTools/Cache/RuneTek5/RuneTek5CacheFile.cs
@@ -3,6 +3,7 @@
 using System.IO.Compression;
 using System.Linq;
 using ICSharpCode.SharpZipLib.BZip2;
+using ICSharpCode.SharpZipLib.Checksums;
 using Org.BouncyCastle.Crypto.Engines;
 using Org.BouncyCastle.Crypto.Parameters;
 using Villermen.RuneScapeCacheTools.Cache.RuneTek5.Enums;
@@ -36,10 +37,27 @@
         /// <summary>
         /// </summary>
         /// <param name="data"></param>
-        /// <param name="referenceTableEntry"></param>
+        /// <param name="referenceTableFile"></param>
         /// <param name="key"></param>
-        public RuneTek5CacheFile(byte[] data, ReferenceTableFile referenceTableEntry, uint[] key = null)
-        {
+        public RuneTek5CacheFile(byte[] data, ReferenceTableFile referenceTableFile, uint[] key = null)
+        {
+            ReferenceTableFile = referenceTableFile;
+
+            // Verify data where possible
+            if (ReferenceTableFile != null)
+            {
+                // Calculate and verify crc
+                var crc = new Crc32();
+                crc.Update(data);
+
+                CRC = (int)crc.Value;
+
+                if (CRC != ReferenceTableFile.CRC)
+                {
+                    throw new CacheException($"Calculated checksum (0x{CRC:X}) did not match expected (0x{ReferenceTableFile.CRC:X}).");
+                }
+            }
+
             Key = key;

             var dataReader = new BinaryReader(new MemoryStream(data));
@@ -124,23 +142,14 @@
                 continuousData = uncompressedBytes;
             }

-            if ((referenceTableEntry != null) && (referenceTableEntry.Entries.Count > 1))
-            {
-                Entries = DecodeEntries(continuousData, referenceTableEntry.Entries.Count);
+            if ((referenceTableFile != null) && (referenceTableFile.Entries.Count > 1))
+            {
+                Entries = DecodeEntries(continuousData, referenceTableFile.Entries.Count);
             }
             else
             {
                 Entries = new[] { continuousData };
             }
-
-            // Obtain the version if available
-            Version = -1;
-            if (dataReader.BaseStream.Length - dataReader.BaseStream.Position - 1 >= 2)
-            {
-                Version = dataReader.ReadInt16BigEndian();
-            }
-
-            // TODO: CRC goes here
         }

         public CompressionType CompressionType { get; set; }
@@ -150,6 +159,8 @@
         /// </summary>
         public uint[] Key { get; set; }

+        public ReferenceTableFile ReferenceTableFile { get; private set; }
+
         public byte[] Encode()
         {
             throw new NotImplementedException();


POI：Bug 58133 - Agile encryption - wrong checksum calculation

--- main/POIFS/Crypt/ChunkedCipherOutputStream.cs
+++ main/POIFS/Crypt/ChunkedCipherOutputStream.cs
@@ -124,7 +124,7 @@
                 base.Close();

                 int oleStreamSize = (int)(fileOut.Length + LittleEndianConsts.LONG_SIZE);
-                CalculateChecksum(fileOut, oleStreamSize);
+                CalculateChecksum(fileOut, (int)_pos);
                 dir.CreateDocument(Decryptor.DEFAULT_POIFS_ENTRY, oleStreamSize, new EncryptedPackageWriter(this));
                 CreateEncryptionInfoEntry(dir, fileOut);
             } catch (Exception e) {


[SharpDX] Add Utilities.TryCreateComInstance internal method

--- Source/SharpDX/Utilities.cs
+++ Source/SharpDX/Utilities.cs
@@ -1043,6 +1043,20 @@
             comObject.NativePointer = localQuery.IUnknownPointer;
         }

+        internal unsafe static bool TryCreateComInstance(Guid clsid, CLSCTX clsctx, Guid riid, ComObject comObject)
+        {
+            MultiQueryInterface localQuery = new MultiQueryInterface()
+            {
+                InterfaceIID = new IntPtr(&riid),
+                IUnknownPointer = IntPtr.Zero,
+                ResultCode = 0,
+            };
+
+            var result = CoCreateInstanceFromApp(clsid, IntPtr.Zero, clsctx, IntPtr.Zero, 1, ref localQuery);
+            comObject.NativePointer = localQuery.IUnknownPointer;
+            return result.Success && localQuery.ResultCode.Success;
+        }
+
 #else
         [DllImport("ole32.dll", ExactSpelling = true, EntryPoint = "CoCreateInstance", PreserveSig = true)]
         private static extern Result CoCreateInstance([In, MarshalAs(UnmanagedType.LPStruct)] Guid rclsid, IntPtr pUnkOuter, CLSCTX dwClsContext, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, out IntPtr comObject);
@@ -1053,6 +1067,14 @@
             var result = CoCreateInstance(clsid, IntPtr.Zero, clsctx, riid, out pointer);
             result.CheckError();
             comObject.NativePointer = pointer;
+        }
+
+        internal static bool TryCreateComInstance(Guid clsid, CLSCTX clsctx, Guid riid, ComObject comObject)
+        {
+            IntPtr pointer;
+            var result = CoCreateInstance(clsid, IntPtr.Zero, clsctx, riid, out pointer);
+            comObject.NativePointer = pointer;
+            return result.Success;
         }
 #endif


Always allow Portal emoteset, similar to Death emoteset (#3012)

--- Source/ACE.Server/WorldObjects/Managers/EmoteManager.cs
+++ Source/ACE.Server/WorldObjects/Managers/EmoteManager.cs
@@ -1669,6 +1669,8 @@

         public void OnPortal(Creature activator)
         {
+            IsBusy = false;
+
             ExecuteEmoteSet(EmoteCategory.Portal, null, activator);
         }


Fix the scrolling of MessageList doesn't work when new message is added.

--- Source/Accelerider.Windows/Controls/MessageList.xaml.cs
+++ Source/Accelerider.Windows/Controls/MessageList.xaml.cs
@@ -63,6 +63,7 @@
                         HeadUri = item.HeadUri
                     });
                 }
+                PART_ScrollViewer.ScrollToEnd(); // Upexpected: The ScrollToEnd() method will trigger the IsArrivedTop property change, and cause the LoadPreviousMessages() method to be called.
             }
         }


remove comment causing conflict

remove comment causing conflict

--- Source/Actions/Microsoft.Deployment.Common/Constants.cs
+++ Source/Actions/Microsoft.Deployment.Common/Constants.cs
@@ -23,7 +23,6 @@
         public const string MicrosoftClientId        = "6b317a7c-0749-49bd-9e8c-d906aa43f64b";
         public const string ASClientId               = "ecbb98ca-18e7-4f63-bb90-4534267a71b7";
         public const string MicrosoftClientIdCrm     = "affab8de-076f-4b2c-b62d-29860cb41ff8";
-        //public const string MicrosoftClientIdPowerBI = "5f9d6083-686c-44ac-b3ea-1c0b8d07bfb2";
         public const string MicrosoftClientIdPowerBI = "728cc6b6-9854-4601-a95a-152077d65d58";
         public const string MicrosoftClientSecret    = "";
         public const string WebsiteRedirectPath      = "/redirect.html";


Update for .NET 6 rc2

Update for .NET 6 rc2

--- Source/Csla.Axml.Android/Resources/Resource.Designer.cs
+++ Source/Csla.Axml.Android/Resources/Resource.Designer.cs
@@ -14,7 +14,7 @@
 {

-	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.1.0.10")]
+	[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.1.0.11")]
 	public partial class Resource
 	{


Wizard- default size for panel

Wizard- default size for panel

--- Source/Engine/AGS.Engine/Game/Factories/AGSUIFactory.cs
+++ Source/Engine/AGS.Engine/Game/Factories/AGSUIFactory.cs
@@ -45,7 +45,9 @@
         }

         [MethodWizard]
-        public IPanel GetPanel(string id, float width, float height, float x, float y,
+        public IPanel GetPanel(string id,
+                               [MethodParam(Default = 100f)]float width, [MethodParam(Default = 50f)]float height,
+                               float x, float y,
                                [MethodParam(Browsable = false)]IObject parent = null,
                                [MethodParam(Browsable = false, Default = false)]bool addToUi = true)
         {


Updated predefined scopes to use defined scopes instead of reflection

--- Source/IdentityServer.MongoDb.AdminModule/ReadScopes.cs
+++ Source/IdentityServer.MongoDb.AdminModule/ReadScopes.cs
@@ -31,15 +31,15 @@
             }
         }

-        public static List<Scope> BuiltInScopes(bool alwaysInclude = false)
+        public static IEnumerable<Scope> BuiltInScopes()
         {
-            var scopeAccessors =
-                typeof (StandardScopes).GetProperties(BindingFlags.Static | BindingFlags.Public)
-                    .Where(x => x.PropertyType == typeof (Scope)
-                    && alwaysInclude == x.Name.EndsWith("AlwaysInclude")
-                    );
-            var builtin = scopeAccessors.Select(scopeAccessor => (Scope) scopeAccessor.GetValue(null)).ToList();
-            return builtin;
+            foreach (var scope in StandardScopes.All)
+            {
+                yield return scope;
+            }
+            yield return StandardScopes.AllClaims;
+            yield return StandardScopes.OfflineAccess;
+            yield return StandardScopes.Roles;
         }
     }
 }


GSF.Core: Optimized internal GetInterpretedPropertyValue

--- Source/Libraries/GSF.Core/Data/Model/TableOperations.cs
+++ Source/Libraries/GSF.Core/Data/Model/TableOperations.cs
@@ -1768,7 +1768,7 @@
             if ((object)s_fieldDataTypeTargets == null)
                 return value;

-            return GetInterpretedValue(property, property.GetValue(record));
+            return GetInterpretedValue(property, value);
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]


Bugfix Type in DynamicDataProviderBase - #2216

--- Source/LinqToDB/DataProvider/DynamicDataProviderBase.cs
+++ Source/LinqToDB/DataProvider/DynamicDataProviderBase.cs
@@ -45,9 +45,8 @@
 		{
 			var p = Expression.Parameter(typeof(string));
 			var l = Expression.Lambda<Func<string, IDbConnection>>(
-				Expression.New(connectionType.GetConstructor(new[] { typeof(string) }), p),
+				Expression.Convert(Expression.New(connectionType.GetConstructor(new[] { typeof(string) }), p), typeof(IDbConnection)),
 				p);
-
 			return l;
 		}