Contact3DNtS class - Implemented CheckContactStatus method

--- ISAAR.MSolve.PreProcessor/Elements/Contact3DNtS.cs
+++ ISAAR.MSolve.PreProcessor/Elements/Contact3DNtS.cs
@@ -9,7 +9,7 @@

 namespace ISAAR.MSolve.PreProcessor.Elements
 {
-    class Contact3DNtS
+    class Contact3DNtS : IStructuralFiniteElement
     {
         private static readonly DOFType[] nodalDOFTypes = new DOFType[3] { DOFType.X, DOFType.Y, DOFType.Z };
         private static readonly DOFType[][] dofs = new DOFType[][] { nodalDOFTypes, nodalDOFTypes, nodalDOFTypes, nodalDOFTypes };
@@ -24,9 +24,15 @@
         private bool isInitializedK = false;
         private bool isInitializedF = false;

+        private IMatrix2D<double> A;
+        private Dictionary<int, IMatrix2D<double>> dA;
+        private Dictionary<int, IMatrix2D<double>> ddA;
+
         public Contact3DNtS(IFiniteElementMaterial3D material)
         {
-
+            this.material = material;
+            this.node1GlobalDisplacementVector = new double[3];
+            this.node2GlobalDisplacementVector = new double[3];
         }

         public Contact3DNtS(IFiniteElementMaterial3D material, IFiniteElementDOFEnumerator dofEnumerator)
@@ -214,5 +220,45 @@
             double ksi3 = xUpdated.DotProduct(A * n);
             return ksi3;
         }
+
+        private bool CheckContactStatus(Vector<double> xUpdated)
+        {
+            bool contactStatus;
+            Vector<double> ksi = CPP(xUpdated);
+            if (Math.Abs(ksi[0])>=1.05 && Math.Abs(ksi[1])>=1.05 )
+            {
+                Console.WriteLine("Projection point out of surface. No contact occurs");
+                contactStatus = false;
+                return contactStatus;
+            }
+            Tuple<Dictionary<int, double>, Dictionary<int, double>, Dictionary<int, double>> shapeFunctions = CalculateShapeFunctions(ksi[0], ksi[1]);
+            Dictionary<int, double> N = shapeFunctions.Item1;
+            Dictionary<int, double> dN = shapeFunctions.Item2;
+            Dictionary<int, double> ddN = shapeFunctions.Item3;
+            Tuple<IMatrix2D<double>, Dictionary<int, IMatrix2D<double>>, Dictionary<int, IMatrix2D<double>>> positionMatrices = PositionMatrices(N, dN, ddN);
+            IMatrix2D<double> A = positionMatrices.Item1;
+            Dictionary<int, IMatrix2D<double>> dA = positionMatrices.Item2;
+            Dictionary<int, IMatrix2D<double>> ddA = positionMatrices.Item3;
+            Tuple<Dictionary<int, Vector<double>>, Dictionary<int, Vector<double>>, Vector<double>, Matrix2D<double>, double> surfaceProperties = SurfaceGeometry(xUpdated, dA, ddA);
+            Dictionary<int, Vector<double>> dRho = surfaceProperties.Item1;
+            Dictionary<int, Vector<double>> ddRho = surfaceProperties.Item2;
+            Vector<double> n = surfaceProperties.Item3;
+            Matrix2D<double> m = surfaceProperties.Item4;
+            double detm = surfaceProperties.Item5;
+            double ksi3 = Penetration((Matrix2D<double>)A, xUpdated, n);
+            if (ksi3 >= 0.0)
+            {
+                Console.WriteLine("No penetration. No contact occurs");
+                contactStatus = false;
+                return contactStatus;
+            }
+            contactStatus = true;
+            return contactStatus;
+        }
+
+        public IMatrix2D<double> StiffnessMatrix(Element element)
+        {
+
+        }
     }
 }


AggregateIndentedLines string extention method

--- Illias.NET4.5/ExtentionMethods/StringExtentions.cs
+++ Illias.NET4.5/ExtentionMethods/StringExtentions.cs
@@ -139,19 +139,70 @@
         /// Converts the given enumeration of strings into an enumeration of key-value-pairs.
         /// </summary>
         /// <param name="Text">An enumeration of strings.</param>
+        public static IEnumerable<String> AggregateIndentedLines(this IEnumerable<String> Text)
+        {
+
+            #region Initial checks
+
+            if (Text == null)
+                yield break;
+
+            #endregion
+
+            var Enumerator   = Text.GetEnumerator();
+            var CurrentLine  = String.Empty;
+
+            while (Enumerator.MoveNext())
+            {
+
+                if (Enumerator.Current.StartsWith(" ") || Enumerator.Current.StartsWith("\t"))
+                    CurrentLine = CurrentLine + Enumerator.Current.TrimStart();
+
+                else
+                {
+
+                    if (CurrentLine != String.Empty)
+                        yield return CurrentLine;
+
+                    CurrentLine = Enumerator.Current;
+
+                }
+
+            }
+
+            yield return CurrentLine;
+
+        }
+
+        #endregion
+
+        #region ToKeyValuePairs(Text, Delimiters)
+
+        /// <summary>
+        /// Converts the given enumeration of strings into an enumeration of key-value-pairs.
+        /// </summary>
+        /// <param name="Text">An enumeration of strings.</param>
+        /// <param name="Delimiters">The delimiter(s) between keys and values.</param>
         public static IEnumerable<KeyValuePair<String, String>> ToKeyValuePairs(this IEnumerable<String>  Text,
-                                                                                params Char[]             Delimiter)
-        {
-
-            if (Delimiter == null || Delimiter.Length == 0)
+                                                                                params Char[]             Delimiters)
+        {
+
+            #region Initial checks
+
+            if (Text == null)
+                yield break;
+
+            if (Delimiters == null || Delimiters.Length == 0)
                 throw new ArgumentNullException("The given delimiter must not be null or empty!");

             String[] Tokens;

+            #endregion
+
             foreach (var line in Text)
             {

-                Tokens = line.Split(Delimiter, 2);
+                Tokens = line.Split(Delimiters, 2);

                 if (Tokens.Length == 2)
                     yield return new KeyValuePair<String, String>(Tokens[0].Trim(), Tokens[1].Trim());


手の離し方を変えた

手の離し方を変えた

--- Inferno/InfernoScripts/Player/PlayerGripVehicle.cs
+++ Inferno/InfernoScripts/Player/PlayerGripVehicle.cs
@@ -19,7 +19,7 @@
         protected override void Setup()
         {
             OnTickAsObservable
-                .Where(_ => this.IsGamePadPressed(GameKey.Aim))
+                .Where(_ => this.IsGamePadPressed(GameKey.Jump))
                 .Subscribe(_ => GripAction());

             OnTickAsObservable
@@ -31,7 +31,7 @@
                 });

             OnTickAsObservable
-                .Where(_ => _isGriped && !this.IsGamePadPressed(GameKey.Aim))
+                .Where(_ => _isGriped && !this.IsGamePadPressed(GameKey.Jump))
                 .Subscribe(_ => GripRemove());
         }

@@ -44,9 +44,8 @@
             player.IsInvincible = false;
             _isGriped = false;
             Function.Call(Hash.DETACH_ENTITY, player, false, false);
-            player.Task.Skydive();
-            player.Task.ClearAll();
-
+            player.Task.ClearAllImmediately();
+            player.SetToRagdoll();
         }

         /// <summary>


--- Infrastructure/CSharpGL.Models/EZM/EZMAnimTrack.cs
+++ Infrastructure/CSharpGL.Models/EZM/EZMAnimTrack.cs
@@ -9,7 +9,7 @@
     {
         // <AnimTrack name="RootNode" count="61" has_scale="true">
         /// <summary>
-        ///
+        /// Tracks a bone's states of all frames in one pose.
         /// </summary>
         /// <param name="xAnimTrack"></param>
         /// <returns></returns>


Change DisabledProgramSource class to inherit ProgramSource

--- Plugins/Wox.Plugin.Program/Settings.cs
+++ Plugins/Wox.Plugin.Program/Settings.cs
@@ -33,14 +33,6 @@
             public string UniqueIdentifier { get; set; }
         }

-        public class DisabledProgramSource
-        {
-            private string name;
-
-            public string Location { get; set; }
-            public string Name { get => name ?? new DirectoryInfo(Location).Name; set => name = value; }
-            public bool Enabled { get; set; } = true;
-            public string UniqueIdentifier { get; set; }
-        }
+        public class DisabledProgramSource : ProgramSource { }
     }
 }


mainline : Removed remarks

mainline : Removed remarks

git-svn-id: 6d1cac2d86fac78d43d5e0dd3566a1010e844f91@68783 81fbe566-5dc4-48c1-bdea-7421811ca204

--- mainline/SocketEngine/TcpSocketServerBase.cs
+++ mainline/SocketEngine/TcpSocketServerBase.cs
@@ -53,10 +53,8 @@

             client.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, true);
             client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, true);
-            //Aviram
             client.DontFragment = false;
             client.UseOnlyOverlappedIO = true;
-            //Aviram

             TAppSession appSession = this.AppServer.CreateAppSession(session);


Update Pokemon.cs

Update Pokemon.cs

Pokerus affects EV gain
Shadow pkmns cant gain EV

--- PokemonUnity.Shared/Monster/Pokemon.cs
+++ PokemonUnity.Shared/Monster/Pokemon.cs
@@ -2125,6 +2125,10 @@
         /// </summary>
         private string name { get; set; }
         /// <summary>
+        /// Nickname
+        /// </summary>
+        public bool IsNicknamed { get { return !string.IsNullOrEmpty(name); } }
+        /// <summary>
         /// Nickname;
         /// Returns Pokemon species name if not nicknamed.
         /// </summary>
@@ -2166,27 +2170,19 @@
         /// Why not just change from `INT` to `(enum)Pokemons`?
         public int Form { get; set; }//{ get { return _base.Form; } set { if (value >= 0 && value <= _base.Forms) _base.Form = value; } }

-        /*// <summary>
+		/*// <summary>
         /// Returns the species name of this Pokemon
         /// </summary>
         public string SpeciesName { get { return this._base.Species; } }*/

-        /// <summary>
-        /// Returns the markings this Pokemon has
-        /// </summary>
-        /// <returns>6 Markings</returns>
-        /*public bool[] Markings()
-        {
-            return markings;
-        }
-        public bool[] Markings { get { return this.markings; } }
-        /// <summary>
-        /// Markings
-        /// </summary>*/
-        public bool[] Markings { get; set; }
-
-        /// <summary>
-        /// Returns a string stathing the Unown form of this Pokemon
+		/// <summary>
+		/// Returns the markings this Pokemon has checked
+		/// </summary>
+		/// <returns>●, ▲, ■, ♥, ★, and ♦.</returns>
+		public bool[] Markings { get; set; }
+
+        /// <summary>
+        /// Returns a string stating the Unown form of this Pokemon
         /// </summary>
         /// <returns></returns>
         public char UnknownShape()
@@ -2224,28 +2220,33 @@
         /// <summary>
         /// Heals all HP of this Pokemon
         /// </summary>
-        public void HealHP()
-        {
-            if (this.isEgg) return;     //ToDo: Throw exception error on returns
-            this.HP = TotalHP;          //ToDo: Return 'true' on success?
+        public bool HealHP()
+        {
+            if (this.isEgg)
+				return false;
+            this.HP = TotalHP;
+			return true;
         }

         /// <summary>
         /// Heals the status problem of this Pokemon
         /// </summary>
-        public void HealStatus()
-        {
-            if (this.isEgg) return;
+        public bool HealStatus()
+        {
+            if (this.isEgg)
+				return false;
             this.Status = 0; StatusCount = 0; //remove status ailments
+			return true;
         }

         /// <summary>
         /// Heals all PP of this Pokemon
         /// </summary>
         /// <param name="index"></param>
-        public void HealPP(int index = -1)
-        {
-            if (this.isEgg) return;
+        public bool HealPP(int index = -1)
+        {
+            if (this.isEgg)
+				return false;
             if (index >= 0) moves[index] = moves[index]; // ToDo: pp = totalpp
             else
             {
@@ -2254,17 +2255,20 @@
                     moves[index] = moves[index]; // ToDo: pp = totalpp
                 }
             }
+			return true;
         }

         /// <summary>
         /// Heals all HP, PP, and status problems of this Pokemon
         /// </summary>
-        public void Heal()
-        {
-            if (this.isEgg) return;
+        public bool Heal()
+        {
+            if (this.isEgg)
+				return false;
             HealHP();
             HealStatus();
             HealPP();
+			return true;
         }

         /// <summary>
@@ -2318,13 +2322,21 @@
                     if (Happiness < 200) gain = -15;
                     break;
                 default:
-                    break;
+					//break;
+					//If not listen above, then stop
+					//Otherwise rest of code will add points
+					return;
             }
             gain += luxury && this.ballUsed == Items.LUXURY_BALL ? 1 : 0;
             if (this.Item == Items.SOOTHE_BELL && gain > 0)
                 gain = (int)Math.Floor(gain * 1.5f);
             Happiness += gain;
-            Happiness = Happiness > 255 ? 255 : Happiness < 0 ? 0 : Happiness; //Max 255, Min 0
+            Happiness = //Max 255, Min 0
+				Happiness > 255 ?	//if
+					255
+				: Happiness < 0 ?	//if else
+					0
+				: Happiness;		//else
         }
 		#endregion

@@ -2336,7 +2348,7 @@
 		public void GainEffort(Pokemons DefeatedPokemon)
 		{
 			int allEV = EV[(int)Stats.HP] + EV[(int)Stats.ATTACK] + EV[(int)Stats.DEFENSE] + EV[(int)Stats.SPATK] + EV[(int)Stats.SPDEF] + EV[(int)Stats.SPEED];
-			if (allEV >= EVLIMIT)
+			if (allEV >= EVLIMIT || isShadow) //Shadow Pkmns dont earn EV from battles?...
 				return;

 			int maxEVgain = EVLIMIT - allEV;
@@ -2350,45 +2362,45 @@
 			int gainEVSpDefense = Game.PokemonData[DefeatedPokemon].evYieldSPD;
 			int gainEVSpeed = Game.PokemonData[DefeatedPokemon].evYieldSPE;

-			int EVfactor = 1;
-
-			var itemNumber = 0;
-			if (Item != Items.NONE)
-				itemNumber = (int)Item;
-
-			switch (itemNumber) //ToDo: Redo with Item.Enum, and correct id values below
+			int EVfactor = PokerusStage.HasValue && PokerusStage.Value ? 2 : 1; //if pokerus, ev values are doubled
+
+			//var itemNumber = 0;
+			//if (Item != Items.NONE)
+			//	itemNumber = (int)Item;
+
+			switch (Item) //ToDo: Redo with Item.Enum, and correct id values below
 			{
-				case 581:
+				case Items.MACHO_BRACE:
 					{
-						EVfactor *= 2;
+						EVfactor *= 2; //with pokerus, should be up to x4
 						break;
 					}
-				case 582:
+				case Items.POWER_WEIGHT:
 					{
-						gainEVHP += 8;
+						gainEVHP += 8;
 						break;
 					}
-				case 583:
+				case Items.POWER_BRACER:
 					{
 						gainEVAttack += 8;
 						break;
 					}
-				case 584:
+				case Items.POWER_BELT:
 					{
 						gainEVDefense += 8;
 						break;
 					}
-				case 585:
+				case Items.POWER_LENS:
 					{
 						gainEVSpAttack += 8;
 						break;
 					}
-				case 586:
+				case Items.POWER_BAND:
 					{
 						gainEVSpDefense += 8;
 						break;
 					}
-				case 587:
+				case Items.POWER_ANKLET:
 					{
 						gainEVSpeed += 8;
 						break;


Modified structure and moved caching to a different method from constructor.

--- CSCache/CSCacheLib.cs
+++ CSCache/CSCacheLib.cs
@@ -9,6 +9,7 @@
 {
     public class CSCache
     {
+        string[] inputArgs = null;

         string compilerName = null;
         string compilerInfo = null;
@@ -22,9 +23,8 @@
         List<string> moduleFiles = new List<string>();

         Config configuration = new Config();
-
-        public CSCache(string[] args)
-		{
+        public void Cache()
+        {
             int error = -1;
             bool showHelp = false;
             bool doClearCache = false;
@@ -37,7 +37,7 @@
             List<string> extra = new List<string>();
             try
             {
-                extra = options.Parse(args);
+                extra = options.Parse(inputArgs);
             }
             catch (OptionException e)
             {
@@ -72,7 +72,7 @@
                     break;
                 }
             }
-
+

             if (error == 0)
             {
@@ -89,10 +89,16 @@
             }
             else
             {
-            	ConsoleTools.Error("Error getting the version of the compiler. Check the configuration file.", 2);
-            }
-
-        }
+                ConsoleTools.Error("Error getting the version of the compiler. Check the configuration file.", 2);
+            }
+
+        }
+
+        public CSCache(string[] args)
+		{
+            inputArgs = args;
+        }
+
         void CompareCache(byte[] combinedCache)
         {
             string filename = BitConverter.ToString(combinedCache).Replace("-", string.Empty);


Fix NegatedPattern logic in IgnoreHandler

Signed-off-by: caytchen <ca59561fa77cc334f9dc87c948859fdefc6442a3@gmail.com>

--- Core/IgnoreHandler.cs
+++ Core/IgnoreHandler.cs
@@ -88,19 +88,26 @@
             }
         }

-        private static bool IsIgnored(string path, IEnumerable<IPattern> patterns)
+        private static bool IsIgnored(string path, IEnumerable<IPattern> patterns, bool ret)
         {
-            return patterns.Any(p => p.IsIgnored(path));
+            // if ret is true, path was marked as ignored by a previous pattern, so only NegatedPatterns can still change this
+            if (ret)
+            {
+                return !patterns.Any(p => (p is NegatedPattern) && p.IsIgnored(path));
+            }
+
+            return patterns.Any(p => !(p is NegatedPattern) && p.IsIgnored(path));
         }

         public bool IsIgnored(string path)
         {
+            bool ret = false;
+
             //TODO: read path specific patterns

-            if (IsIgnored(path, _excludePatterns))
-                return true;
+            ret = IsIgnored(path, _excludePatterns, ret);

-            return false;
+            return ret;
         }

         private static void AddPattern(string line, ICollection<IPattern> to)
@@ -151,7 +158,7 @@

             public bool IsIgnored(string path)
             {
-                return !(_original.IsIgnored(path));
+                return _original.IsIgnored(path);
             }
         }
     }


Remove mono warnings.

Remove mono warnings.

--- AuroraService/addon-modules/AuroraWebUI/Modules/WebUIHandler.cs
+++ AuroraService/addon-modules/AuroraWebUI/Modules/WebUIHandler.cs
@@ -80,7 +80,6 @@
             m_log.Debug("[WebUI]: Sending image jpeg");
             int statuscode = 200;
             byte[] jpeg = new byte[0];
-            byte[] myMapImageJPEG;
             IAssetService m_AssetService = m_registry.RequestModuleInterface<IAssetService>();

             MemoryStream imgstream = new MemoryStream();
@@ -114,7 +113,6 @@

                     // Write the stream to a byte array for output
                     jpeg = imgstream.ToArray();
-                    myMapImageJPEG = jpeg;
                 }
             }
             catch (Exception)
@@ -168,9 +166,7 @@
             m_log.Debug("[WebUI]: Sending map image jpeg");
             int statuscode = 200;
             byte[] jpeg = new byte[0];
-            byte[] myMapImageJPEG;
-            IAssetService m_AssetService = m_registry.RequestModuleInterface<IAssetService>();
-
+
             MemoryStream imgstream = new MemoryStream();
             Bitmap mapTexture = CreateZoomLevel(zoom, x, y);
             EncoderParameters myEncoderParameters = new EncoderParameters();
@@ -181,7 +177,6 @@

             // Write the stream to a byte array for output
             jpeg = imgstream.ToArray();
-            myMapImageJPEG = jpeg;

             // Reclaim memory, these are unmanaged resources
             // If we encountered an exception, one or more of these will be null
@@ -448,14 +443,13 @@
             bool Verified = false;
             string Name = map["Name"].AsString();
             string PasswordHash = map["PasswordHash"].AsString();
-            string PasswordSalt = map["PasswordSalt"].AsString();
+            //string PasswordSalt = map["PasswordSalt"].AsString();
             string HomeRegion = map["HomeRegion"].AsString();
             string Email = map["Email"].AsString();
             string AvatarArchive = map["AvatarArchive"].AsString();

-            ILoginService loginService = m_registry.RequestModuleInterface<ILoginService>();
             IUserAccountService accountService = m_registry.RequestModuleInterface<IUserAccountService>();
             if (accountService == null)
                 return null;
@@ -466,6 +460,13 @@

             accountService.CreateUser(Name, PasswordHash, Email);
             UserAccount user = accountService.GetUserAccount(UUID.Zero, Name);
+            IAgentInfoService agentInfoService = m_registry.RequestModuleInterface<IAgentInfoService> ();
+            IGridService gridService = m_registry.RequestModuleInterface<IGridService> ();
+            if (agentInfoService != null && gridService != null)
+            {
+                GridRegion r = gridService.GetRegionByName (UUID.Zero, HomeRegion);
+                agentInfoService.SetHomePosition (user.PrincipalID.ToString (), r.RegionID, new Vector3 (r.RegionSizeX / 2, r.RegionSizeY / 2, 20), Vector3.Zero);
+            }

             Verified = user != null;
             UUID userID = UUID.Zero;
@@ -473,14 +474,14 @@
             if (Verified)
             {
                 // could not find a way to save this data here.
-                DateTime RLDOB = map["RLDOB"].AsDate();
+                /*DateTime RLDOB = map["RLDOB"].AsDate();
                 string RLFirstName = map["RLFisrtName"].AsString();
                 string RLLastName = map["RLLastName"].AsString();
                 string RLAdress = map["RLAdress"].AsString();
                 string RLCity = map["RLCity"].AsString();
                 string RLZip = map["RLZip"].AsString();
                 string RLCountry = map["RLCountry"].AsString();
-                string RLIP = map["RLIP"].AsString();
+                string RLIP = map["RLIP"].AsString();*/
                 // could not find a way to save this data here.

@@ -644,8 +645,6 @@
         /// <returns>Verified</returns>
         byte[] SaveEmail(OSDMap map)
         {
-            string uuid = String.Empty;
-            uuid = map["UUID"].AsString();
             string email = map["Email"].AsString();

             IUserAccountService accountService = m_registry.RequestModuleInterface<IUserAccountService>();
@@ -972,8 +971,9 @@
             List<UserAccount> accounts = m_registry.RequestModuleInterface<IUserAccountService>().GetUserAccounts(UUID.Zero, Query);

             OSDArray users = new OSDArray();
-            foreach (UserAccount acc in accounts)
-            {
+            for(int i = start; i < end && i < accounts.Count; i++)
+            {
+                UserAccount acc = accounts[i];
                 OSDMap userInfo = new OSDMap();
                 userInfo["PrincipalID"] = acc.PrincipalID;
                 userInfo["UserName"] = acc.Name;


defined a new class BroadcastState to replace Tuple

--- Protocols/WebSocket/WebSocketServer.cs
+++ Protocols/WebSocket/WebSocketServer.cs
@@ -736,7 +736,7 @@
                         continue;
                 }

-                Task.Factory.StartNew(SendRawDataToSession, Tuple.Create(s, encodedPackage, sendFeedback));
+                Task.Factory.StartNew(SendRawDataToSession, new BroadcastState(s, encodedPackage, sendFeedback));
             }
         }

@@ -759,17 +759,45 @@
                     encodingProcessor = s.ProtocolProcessor;
                 }

-                Task.Factory.StartNew(SendRawDataToSession, Tuple.Create(s, encodedPackage, sendFeedback));
+                Task.Factory.StartNew(SendRawDataToSession, new BroadcastState(s, encodedPackage, sendFeedback));
             }
         }

         private void SendRawDataToSession(object state)
         {
-            var param = state as Tuple<TWebSocketSession, IList<ArraySegment<byte>>, Action<TWebSocketSession, bool>>;
-            var session = param.Item1;
-            var sendFeedback = param.Item3;
-            sendFeedback(param.Item1, param.Item1.TrySendRawData(param.Item2));
-        }
+            var param = state as BroadcastState;
+            var session = param.Session;
+            var sendFeedback = param.FeedbackFunc;
+            var sendOk = false;
+
+            try
+            {
+                sendOk = session.TrySendRawData(param.Data);
+            }
+            catch (Exception e)
+            {
+                session.Logger.Error(e);
+            }
+
+            sendFeedback(session, sendOk);
+        }
+
+        class BroadcastState
+        {
+            public TWebSocketSession Session { get; private set; }
+
+            public IList<ArraySegment<byte>> Data { get; private set; }
+
+            public Action<TWebSocketSession, bool> FeedbackFunc { get; private set; }
+
+            public BroadcastState(TWebSocketSession session, IList<ArraySegment<byte>> data, Action<TWebSocketSession, bool> feedbackFunc)
+            {
+                Session = session;
+                Data = data;
+                FeedbackFunc = feedbackFunc;
+            }
+        }
+

         #endregion broadcast


writig pad: stroke ends on mouseleave

writig pad: stroke ends on mouseleave

--- DND.Gui/WritingPad.cs
+++ DND.Gui/WritingPad.cs
@@ -178,7 +178,7 @@
             return (float)Math.Sqrt(dx * dx + dy * dy);
         }

-        public override bool DoMouseUp(Point p, MouseButtons button)
+        private void doStrokeOver()
         {
             if (currentPoints.Count > 1)
             {
@@ -197,7 +197,17 @@
             currentPoints.Clear();
             MakeMePaint(false, RenderMode.Invalidate);
             if (StrokesChanged != null) StrokesChanged(this, Strokes);
+        }
+
+        public override bool DoMouseUp(Point p, MouseButtons button)
+        {
+            doStrokeOver();
             return true;
+        }
+
+        public override void DoMouseLeave()
+        {
+            doStrokeOver();
         }
     }
 }


Actually add Undefined RestartPolicy

Actually add Undefined RestartPolicy

--- Docker.DotNet/Models/RestartPolicy.cs
+++ Docker.DotNet/Models/RestartPolicy.cs
@@ -4,6 +4,9 @@
 {
     public enum RestartPolicyKind
     {
+        [EnumMember(Value = "")]
+        Undefined,
+
         [EnumMember(Value = "no")]
         No,


Inherit MediaMention from UrlMention

Inherit MediaMention from UrlMention

--- LinqToTwitterAg/Common/Entities/MediaMention.cs
+++ LinqToTwitterAg/Common/Entities/MediaMention.cs
@@ -4,7 +4,7 @@

 namespace LinqToTwitter
 {
-    public class MediaMention : MentionBase
+    public class MediaMention : UrlMention
     {
         /// <summary>
         /// ID of the media
@@ -22,21 +22,6 @@
         public string MediaUrlHttps { get; set; }

         /// <summary>
-        /// Media Url extracted
-        /// </summary>
-        public string Url { get; set; }
-
-        /// <summary>
-        /// String to display for Url
-        /// </summary>
-        public string DisplayUrl { get; set; }
-
-        /// <summary>
-        /// Media Url that has been fully resolved
-        /// </summary>
-        public string ExpandedUrl { get; set; }
-
-        /// <summary>
         /// Supported media sizes
         /// </summary>
         public List<PhotoSize> Sizes { get; set; }


Add implementation of Allocate

Add implementation of Allocate

--- LogicalShift.Reason/Solvers/ByteCodeExecutor.cs
+++ LogicalShift.Reason/Solvers/ByteCodeExecutor.cs
@@ -137,6 +137,9 @@
                     break;

                 case Operation.Allocate:
+                    Allocate(codePoint.Arg1, codePoint.Arg2);
+                    break;
+
                 case Operation.Deallocate:
                 case Operation.Proceed:
                 case Operation.CallAddress:
@@ -154,6 +157,59 @@
         }

         /// <summary>
+        /// Allocates space for a number of permanent and argument variables.
+        /// </summary>
+        /// <remarks>
+        /// Permanent variables are stored in the environment and are numbered from 0.
+        /// Arguments occur after the temporary variables and have their values preserved
+        /// from the previous state by this call.
+        /// </remarks>
+        private void Allocate(int numPermanent, int numArguments)
+        {
+            // Allocate a new environment
+            var newEnvironment = new ByteCodeEnvironment(numPermanent, _environment);
+
+            // Make sure that we don't overwrite arguments in the previous environment by replacing them with new temporary variables
+            if (numPermanent + numArguments < _environment.Variables.Length)
+            {
+                for (int oldPermanent = numPermanent + numArguments; oldPermanent < _environment.Variables.Length; ++oldPermanent)
+                {
+                    _registers[oldPermanent] = new SimpleReference();
+                }
+            }
+
+            // Move arguments to their new position
+            int oldArgStart = _environment.Variables.Length;
+
+            if (oldArgStart > numPermanent)
+            {
+                // Moving arguments 'down', leaving a hole
+                for (int argument = 0; argument < numArguments; ++argument)
+                {
+                    _registers[argument + numPermanent] = _registers[argument + oldArgStart];
+                    _registers[argument + oldArgStart] = new SimpleReference();
+                }
+            }
+            else if (oldArgStart < numPermanent)
+            {
+                // Moving arguments 'up', old locations will be overwritten by new permanent variables
+                for (int argument = numArguments-1; argument >=0; --argument)
+                {
+                    _registers[argument + numPermanent] = _registers[argument + oldArgStart];
+                }
+            }
+
+            // Copy in the new permanent variables
+            for (int permanent = 0; permanent < numPermanent; ++permanent)
+            {
+                _registers[permanent] = newEnvironment.Variables[permanent];
+            }
+
+            _environment = newEnvironment;
+            throw new NotImplementedException();
+        }
+
+        /// <summary>
         /// In write mode, writes the value of a variable to the current structure. In read mode,
         /// unifies the value in the current structure with the value of a variable.
         /// </summary>


Remove experimental service version of Content-Item Message

--- LtiLibrary.Core/ContentItems/ContentItemsHelper.cs
+++ LtiLibrary.Core/ContentItems/ContentItemsHelper.cs
@@ -120,38 +120,5 @@

             return webRequest;
         }
-
-        /// <summary>
-        /// Send content-item response to Tool Consumer content-item service. This is experimental.
-        /// </summary>
-        /// <param name="url">The content-item service URL (from content-item message).</param>
-        /// <param name="consumerKey">The OAuth consumer key to use to sign the request.</param>
-        /// <param name="consumerSecret">The OAuth consumer secret to use to sign the request.</param>
-        /// <param name="contentItems">The ContentItemPlacementResponse to POST.</param>
-        /// <param name="data">The data received in the original content-item message.</param>
-        /// <returns>Return True if the POST request is successful.</returns>
-        public static bool PostContentItems(
-            string url, string consumerKey, string consumerSecret,
-            ContentItemPlacementResponse contentItems, string data)
-        {
-            var serviceResponse = new ContentItemsServiceResponse
-            {
-                ContentItems = contentItems,
-                Data = data
-            };
-
-            try
-            {
-                var webRequest = CreateContentItemsRequest(url, consumerKey, consumerSecret, serviceResponse);
-                using (var webResponse = webRequest.GetResponse() as HttpWebResponse)
-                {
-                    return webResponse != null && webResponse.StatusCode == HttpStatusCode.OK;
-                }
-            }
-            catch (Exception)
-            {
-                return false;
-            }
-        }
     }
 }


Update version

Update version

--- Mailgun.AspNet.Identity/Properties/AssemblyInfo.cs
+++ Mailgun.AspNet.Identity/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("0.3.0")]
 [assembly: AssemblyFileVersion("0.3.0")]
-[assembly: AssemblyInformationalVersion("0.3.0-alpha")]
+[assembly: AssemblyInformationalVersion("0.3.0")]


pomiary ładowania edycji produktu: czas na który mam wpływ to 15-5 ms. reszta to nawigacja (500ms) i ładowanie kontrolek (250/100 ms).

dodana obsługa błędnej nawigacji

--- Dietphone/App.xaml.cs
+++ Dietphone/App.xaml.cs
@@ -124,6 +124,12 @@
             {
                 System.Diagnostics.Debugger.Break();
             }
+            else
+            {
+                var exception = e.Exception;
+                SendExceptionQuestion(exception.ToString());
+                e.Handled = true;
+            }
         }

         private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)


Unparsed -> Remainder in example.

Unparsed -> Remainder in example.

--- docs/guides/samples/module.cs
+++ docs/guides/samples/module.cs
@@ -7,7 +7,7 @@
 {
     // ~say hello -> hello
     [Command("say"), Summary("Echos a message.")]
-    public async Task Say([Unparsed, Summary("The text to echo")] string echo)
+    public async Task Say([Remainder, Summary("The text to echo")] string echo)
     {
         // ReplyAsync is a method on ModuleBase
         await ReplyAsync(echo);
@@ -39,4 +39,4 @@
         var userInfo = user ?? Context.Client.CurrentUser;
         await ReplyAsync($"{userInfo.Username}#{userInfo.Discriminator}");
     }
-}+}


Moved DbEntityMapper cache to static

Moved DbEntityMapper cache to static

--- MongoFramework/Infrastructure/DbEntityMapper.cs
+++ MongoFramework/Infrastructure/DbEntityMapper.cs
@@ -10,6 +10,7 @@
 using System.Text;
 using System.Threading.Tasks;
 using MongoFramework.Attributes;
+using System.Collections.Concurrent;

 namespace MongoFramework.Infrastructure
 {
@@ -18,7 +19,12 @@
 		public Type EntityType { get; private set; }
 		private BsonClassMap ClassMap { get; set; }

-		private IEnumerable<IDbEntityPropertyMap> EntityPropertyMapCache { get; set; }
+		private static ConcurrentDictionary<Type, IEnumerable<IDbEntityPropertyMap>> EntityMapCache { get; set; }
+
+		static DbEntityMapper()
+		{
+			EntityMapCache = new ConcurrentDictionary<Type, IEnumerable<IDbEntityPropertyMap>>();
+		}

 		public DbEntityMapper(Type entityType)
 		{
@@ -156,7 +162,7 @@
 				}
 			}
 		}
-
+
 		public string GetCollectionName()
 		{
 			var tableAttribute = EntityType.GetCustomAttribute<TableAttribute>();
@@ -190,15 +196,7 @@

 		public IEnumerable<IDbEntityPropertyMap> GetEntityMapping()
 		{
-			if (EntityPropertyMapCache != null)
-			{
-				return EntityPropertyMapCache;
-			}
-			else
-			{
-				EntityPropertyMapCache = GetEntityMapping(true);
-				return EntityPropertyMapCache;
-			}
+			return GetEntityMapping(true);
 		}

 		public IEnumerable<IDbEntityPropertyMap> GetEntityMapping(bool includeInherited)
@@ -211,11 +209,14 @@
 			}
 			else
 			{
-				return ClassMap.DeclaredMemberMaps.Select(m => new EntityPropertyMap
-				{
-					IsKey = m == ClassMap.IdMemberMap,
-					ElementName = m.ElementName,
-					Property = m.MemberInfo as PropertyInfo
+				return EntityMapCache.GetOrAdd(EntityType, t =>
+				{
+					return ClassMap.DeclaredMemberMaps.Select(m => new EntityPropertyMap
+					{
+						IsKey = m == ClassMap.IdMemberMap,
+						ElementName = m.ElementName,
+						Property = m.MemberInfo as PropertyInfo
+					});
 				});
 			}
 		}


Fix grenades throwing (#1205)

Fix grenades throwing (#1205)

Exceptions

Co-authored-by: Metal Gear Sloth <5a6002283f4d0ed17bed24ee1f9d131baf85176c@gmail.com>

--- Content.Server/GameObjects/Components/GUI/InventoryComponent.cs
+++ Content.Server/GameObjects/Components/GUI/InventoryComponent.cs
@@ -408,7 +408,7 @@
             {
                 foreach (var entity in slot.ContainedEntities)
                 {
-                    var exActs = entity.GetAllComponents<IExAct>();
+                    var exActs = entity.GetAllComponents<IExAct>().ToList();
                     foreach (var exAct in exActs)
                     {
                         exAct.OnExplosion(eventArgs);


Resolve test project readability issues.

--- Nancy.AttributeRouting.Tests/UrlBuilderTests.cs
+++ Nancy.AttributeRouting.Tests/UrlBuilderTests.cs
@@ -150,8 +150,11 @@
         {
             get
             {
-                yield return new ExceptionTestCase<MyViewModel, MultipleRouteAttributesException>(m => m.GetByTwoRoutings());
-                yield return new ExceptionTestCase<MyViewModel, NoRouteAttributeException>(m => m.GetWithoutRoutings());
+                yield return new ExceptionTestCase<MyViewModel, MultipleRouteAttributesException>(
+                    m => m.GetByTwoRoutings());
+
+                yield return new ExceptionTestCase<MyViewModel, NoRouteAttributeException>(
+                    m => m.GetWithoutRoutings());
             }
         }

@@ -181,7 +184,7 @@

         public class TestCase<T> : ITestCase where T : class
         {
-            protected readonly Expression<Func<T, object>> expression;
+            protected readonly Expression<Func<T, object>> Expression;

             private readonly IDictionary<string, string> dictionary;

@@ -191,25 +194,25 @@

             public TestCase(Expression<Func<T, object>> expression)
             {
-                this.expression = expression;
+                this.Expression = expression;
             }

             public TestCase(Expression<Func<T, object>> expression, string url)
             {
-                this.expression = expression;
+                this.Expression = expression;
                 this.url = url;
             }

             public TestCase(Expression<Func<T, object>> expression, object parameters, string url)
             {
-                this.expression = expression;
+                this.Expression = expression;
                 this.parameters = parameters;
                 this.url = url;
             }

             public TestCase(Expression<Func<T, object>> expression, IDictionary<string, string> dictionary, string url)
             {
-                this.expression = expression;
+                this.Expression = expression;
                 this.dictionary = dictionary;
                 this.url = url;
             }
@@ -223,10 +226,10 @@
             {
                 // Act
                 string url = this.parameters != null
-                    ? Url.Builder.GetUrl<T>(this.expression, this.parameters)
+                    ? Url.Builder.GetUrl<T>(this.Expression, this.parameters)
                     : this.dictionary != null
-                    ? Url.Builder.GetUrl<T>(this.expression, this.dictionary)
-                    : Url.Builder.GetUrl<T>(this.expression);
+                    ? Url.Builder.GetUrl<T>(this.Expression, this.dictionary)
+                    : Url.Builder.GetUrl<T>(this.Expression);

                 // Assert
                 Assert.Equal(this.url, url);
@@ -234,7 +237,7 @@

             public override string ToString()
             {
-                return string.Format("{0} {1}", typeof(T).Name, this.expression);
+                return string.Format("{0} {1}", typeof(T).Name, this.Expression);
             }
         }

@@ -249,7 +252,7 @@

             public override void Run()
             {
-                Assert.Throws<U>(() => Url.Builder.GetUrl<T>(this.expression));
+                Assert.Throws<U>(() => Url.Builder.GetUrl<T>(this.Expression));
             }
         }
     }


modify: 組み込み型の名前を指定するよう変更

modify: 組み込み型の名前を指定するよう変更

--- src/Extension.cs
+++ src/Extension.cs
@@ -36,7 +36,7 @@
         /// </summary>
         /// <param name="value">バイトオーダが逆転される Int16 値。</param>
         /// <returns>バイトオーダが逆転された結果。</returns>
-        public static Int16 ToLittleEndian(this Int16 value)
+        public static short ToLittleEndian(this short value)
         {
             var array = BitConverter.GetBytes(value);
             Array.Reverse(array);
@@ -48,7 +48,7 @@
         /// </summary>
         /// <param name="value">バイトオーダが逆転される Int32 値。</param>
         /// <returns>バイトオーダが逆転された結果。</returns>
-        public static Int32 ToLittleEndian(this Int32 value)
+        public static int ToLittleEndian(this int value)
         {
             var array = BitConverter.GetBytes(value);
             Array.Reverse(array);
@@ -60,7 +60,7 @@
         /// </summary>
         /// <param name="value">バイトオーダが逆転される UInt32 値。</param>
         /// <returns>バイトオーダが逆転された結果。</returns>
-        public static UInt32 ToLittleEndian(this UInt32 value)
+        public static uint ToLittleEndian(this uint value)
         {
             var array = BitConverter.GetBytes(value);
             Array.Reverse(array);


Fixed bug when trying to create a GraphicalUiElement from Compoentns in Gum.


We need to go deeper

We need to go deeper

--- EDDiscovery/DB/VisitedSystemsClass.cs
+++ EDDiscovery/DB/VisitedSystemsClass.cs
@@ -368,9 +368,10 @@
             }
         }

-        public static void UpdateSys(List<VisitedSystemsClass> visitedSystems, bool usedistancedb)          // oldest system is lowest index
-        {
-            SystemClass.FillVisitedSystems(visitedSystems);                 // first try and populate with SystemClass info
+        public static void UpdateSys(List<VisitedSystemsClass> visitedSystems, bool usedistancedb, bool matchsystems)          // oldest system is lowest index
+        {
+            if (matchsystems)
+                SystemClass.FillVisitedSystems(visitedSystems);                 // first try and populate with SystemClass info

             foreach (VisitedSystemsClass vsc in visitedSystems)
             {


Update Assembly Information

Update Assembly Information

--- Rollbar.Net/Properties/AssemblyInfo.cs
+++ Rollbar.Net/Properties/AssemblyInfo.cs
@@ -1,18 +1,15 @@
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;

 // General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("Rollbar.Net")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyDescription("C# Rollbar Payload, post it whenever and however it makes sense")]
+[assembly: AssemblyCompany("Valetude LLC")]
 [assembly: AssemblyProduct("Rollbar.Net")]
 [assembly: AssemblyCopyright("Copyright ©  2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
+[assembly: AssemblyCulture("en-US")]

 // Setting ComVisible to false makes the types in this assembly not visible
 // to COM components.  If you need to access a type in this assembly from
@@ -31,6 +28,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.0.*")]
+[assembly: AssemblyFileVersion("1.0.*")]


testing Extensions

testing Extensions

--- EncodeBlob_SingleOut_Function/run.csx
+++ EncodeBlob_SingleOut_Function/run.csx
@@ -58,9 +58,13 @@
         // Step 1:  Copy the Blob into a new Input Asset for the Job
         // ***NOTE: Ideally we would have a method to ingest a Blob directly here somehow.
         // using code from this sample - https://azure.microsoft.com/en-us/documentation/articles/media-services-copying-existing-blob/
+
+        StorageCredentials mediaServicesStorageCredentials =
+            new StorageCredentials(_storageAccountName, _storageAccountKey);

-        IAsset newAsset = CreateAssetFromBlob(inputBlob, fileName, log).GetAwaiter().GetResult();
-
+        //IAsset newAsset = CreateAssetFromBlob(inputBlob, fileName, log).GetAwaiter().GetResult();
+        IAsset newAsset = this.context.Assets.CreateFromBlob(inputBlob, mediaServicesStorageCredentials, AssetCreationOptions.None);
+
         // Step 2: Create an Encoding Job

         // Check for existing Notification Endpoint with the name "FunctionWebHook"
@@ -141,8 +145,6 @@
         log.Info($"Output Asset Id:{outputAsset.Id}");

         //Get a reference to the storage account that is associated with the Media Services account.
-        StorageCredentials mediaServicesStorageCredentials =
-            new StorageCredentials(_storageAccountName, _storageAccountKey);
         _destinationStorageAccount = new CloudStorageAccount(mediaServicesStorageCredentials, false);

         IAccessPolicy readPolicy = _context.AccessPolicies.Create("readPolicy",


Update ImportProvider_DataGouvFr.cs

Update ImportProvider_DataGouvFr.cs

Some better handling of higher current Type 2.

--- Import/OCM.Import.Common/Providers/ImportProvider_DataGouvFr.cs
+++ Import/OCM.Import.Common/Providers/ImportProvider_DataGouvFr.cs
@@ -114,6 +114,7 @@
                             poi.GeneralComments = additionalInfo;

                             //TODO: Operator and Operators Reference
+                            // Actually, Operators Reference is the reference field, it's in the standard OCPP/OCHP format provider's reference should perhaps be the 'source' field

                             if (usageType.Contains("payant", StringComparison.InvariantCultureIgnoreCase)) usageType = "payant";

@@ -194,6 +195,15 @@
                                 if (parsedKw > 0)
                                 {
                                     connection.PowerKW = parsedKw;
+                                    if ((connection.PowerKW > 7.5) && (connection.CurrentTypeID == (int)StandardCurrentTypes.SinglePhaseAC) && (connection.ConnectionTypeID == (int)StandardConnectionTypes.MennekesType2))
+                                    {
+                                        connection.CurrentTypeID == (int)StandardCurrentTypes.ThreePhaseAC;
+                                    }
+                                    if ((connection.PowerKW >= 22) && (connection.ConnectionTypeID == (int)StandardConnectionTypes.MennekesType2))
+                                    {
+                                        // Type 2 connectors aren't allowed to be socketed for >32A
+                                        connection.ConnectionTypeID = (int)StandardConnectionTypes.MennekesType2Tethered;
+                                    }
                                 }
                                 else
                                 {
@@ -227,4 +237,4 @@
             return outputList;
         }
     }
-}+}


Modify the LocalPrincipalManager ctor so it can take multiple group names

--- IronFoundry.Container.Shared/Utilities/LocalPrincipalManager.cs
+++ IronFoundry.Container.Shared/Utilities/LocalPrincipalManager.cs
@@ -35,8 +35,8 @@
             this.wardenUserGroups = userGroupNames ?? new String[0];
         }

-        public LocalPrincipalManager(string userGroupName)
-            : this(new DesktopPermissionManager(), userGroupName)
+        public LocalPrincipalManager(params string [] userGroupNames)
+            : this(new DesktopPermissionManager(), userGroupNames)
         {
         }


Allow notification of updates to the current language by Localizer subclasses.

--- Sandra.UI.WF/Localization/Localizer.cs
+++ Sandra.UI.WF/Localization/Localizer.cs
@@ -38,6 +38,17 @@
         /// Generates and formats a localized string given a <see cref="LocalizedStringKey"/> and an array of parameters.
         /// </summary>
         public abstract string Localize(LocalizedStringKey localizedStringKey, string[] parameters);
+
+        /// <summary>
+        /// Notifies localizers that the translations of this language were updated.
+        /// </summary>
+        protected void NotifyChanged()
+        {
+            if (Current == this)
+            {
+                event_CurrentChanged.Raise(null, EventArgs.Empty);
+            }
+        }

         private sealed class DefaultLocalizer : Localizer
         {


Avoid null data

Avoid null data

--- Scripts/GameApi/BaseInterestManager.cs
+++ Scripts/GameApi/BaseInterestManager.cs
@@ -54,6 +54,8 @@

         public virtual bool ShouldSubscribe(LiteNetLibIdentity subscriber, LiteNetLibIdentity target, bool checkRange = true)
         {
+            if (subscriber == null || target == null)
+                return false;
             return subscriber.ConnectionId != target.ConnectionId && !target.IsIdentityHideFromThis(subscriber) && (!checkRange || target.AlwaysVisible || Vector3.Distance(subscriber.transform.position, target.transform.position) <= GetVisibleRange(target));
         }


v5.7.0 - Tweaked OverlaySound to use a defined delegate type

--- Services/OverlaySounds/OverlaySound.cs
+++ Services/OverlaySounds/OverlaySound.cs
@@ -10,6 +10,14 @@
 	/// Provides a way to create ambient sound effects that overlay existing game sounds and music.
 	/// </summary>
 	public partial class OverlaySound {
+		/// <summary>
+		/// </summary>
+		/// <returns></returns>
+		public delegate (float VolumeOverride, float PanOverride, bool IsEnded) SoundLooper();
+
+
+
+
 		/// <summary></summary>
 		/// <param name="sourceMod"></param>
 		/// <param name="soundPath"></param>
@@ -22,7 +30,7 @@
 				string soundPath,
 				int fadeTicks,
 				int playDurationTicks=-1,
-				Func<(float VolumeOverride, float PanOverride, bool IsEnded)> customCondition=null ) {
+				SoundLooper customCondition =null ) {
 			return new OverlaySound( sourceMod, soundPath, fadeTicks, playDurationTicks, customCondition );
 		}

@@ -40,7 +48,7 @@
 		private int MaxPlayDurationTicks;
 		private int FadeTicks;

-		private Func<(float VolumeOverride, float PanOverride, bool IsEnded)> CustomCondition = null;
+		private SoundLooper CustomCondition = null;

 		////////////////
@@ -60,7 +68,7 @@
 				string soundPath,
 				int fadeTicks,
 				int playDurationTicks,
-				Func<(float VolumeOverride, float PanOverride, bool IsEnded)> customCondition ) {
+				SoundLooper customCondition ) {
 			this.SourceMod = sourceMod;
 			this.SoundPath = soundPath;
 			this.FadeTicks = fadeTicks <= 1 ? 3 : fadeTicks;


Prevent null reference exception on missing guest db

--- SetupWizard/CopyGuestProfilesToUser.cs
+++ SetupWizard/CopyGuestProfilesToUser.cs
@@ -68,7 +68,7 @@
 			var byCheckbox = new Dictionary<CheckBox, PrinterInfo>();

 			var guestProfileManager = ProfileManager.LoadGuestDB();
-			if (guestProfileManager.Profiles.Count > 0)
+			if (guestProfileManager?.Profiles.Count > 0)
 			{
 				container.AddChild(new TextWidget("Existing Printers:")
 				{


fix example

fix example

--- Examples/NetCore/Converter/Program.cs
+++ Examples/NetCore/Converter/Program.cs
@@ -16,7 +16,7 @@

                 Id = 1,

-                Trials = new List<Trail>
+                Trails = new List<Trail>
                 {
                     new Trail()
                     {


IE11 hidden diqus fix.

IE11 hidden diqus fix.

Disqus is loaded after clicking on the respective button. So it will
load within a visible space, and height won't be 0.

--- Sibelius.Web/Views/Courses/Show.cshtml
+++ Sibelius.Web/Views/Courses/Show.cshtml
@@ -96,13 +96,21 @@
         var disqus_identifier = '@Model.Id';
         var disqus_title = '@Model.Title - @Model.Year - @Model.Semester';
         var disqus_url = 'http://thescienceofcode.azurewebsites.net/Courses/Show/@Model.Id';
+        var disqus_ready = false;

         /* * * DON'T EDIT BELOW THIS LINE * * */
-        (function () {
-            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
-            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
-            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
-        })();
+        $(function () {
+            $('a[data-toggle="#course-diqus"]').click(function(){
+                (function () {
+                    if (disqus_ready) return;
+                    disqus_ready = true;
+                    var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+                    dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+                    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+                })();
+            });
+        });
+
     </script>
     Please enable JavaScript to view the comments powered by Disqus.
 }


Test correction codecov result

Test correction codecov result

--- NetTelebot.Tests/MockServerObject/MockServer.cs
+++ NetTelebot.Tests/MockServerObject/MockServer.cs
@@ -1,7 +1,9 @@
 using Mock4Net.Core;
+using NUnit.Framework;

 namespace NetTelebot.Tests.MockServerObject
 {
+    [TestFixture]
     internal static class MockServer
     {
         internal static FluentMockServer ServerOkResponse { get; private set; }


Convert base sst string to unicode if the continuation is unicode. Use 1250 instead of UTF8 for non multibyte strings, the same as XlsFormattedUnicodeString.

--- Excel/Core/BinaryFormat/XlsBiffSST.cs
+++ Excel/Core/BinaryFormat/XlsBiffSST.cs
@@ -6,141 +6,147 @@
 #endif
 namespace ExcelDataReader.Portable.Core.BinaryFormat
 {
-	/// <summary>
-	/// Represents a Shared String Table in BIFF8 format
-	/// </summary>
-	internal class XlsBiffSST : XlsBiffRecord
-	{
-		private readonly List<uint> continues = new List<uint>();
-		private readonly List<string> m_strings;
-		private uint m_size;
+    /// <summary>
+    /// Represents a Shared String Table in BIFF8 format
+    /// </summary>
+    internal class XlsBiffSST : XlsBiffRecord
+    {
+        private readonly List<uint> continues = new List<uint>();
+        private readonly List<string> m_strings;
+        private uint m_size;

-		internal XlsBiffSST(byte[] bytes, uint offset, ExcelBinaryReader reader)
-			: base(bytes, offset, reader)
-		{
-			m_size = RecordSize;
-			m_strings = new List<string>();
-		}
+        internal XlsBiffSST(byte[] bytes, uint offset, ExcelBinaryReader reader)
+            : base(bytes, offset, reader)
+        {
+            m_size = RecordSize;
+            m_strings = new List<string>();
+        }

-		/// <summary>
-		/// Returns count of strings in SST
-		/// </summary>
-		public uint Count
-		{
-			get { return base.ReadUInt32(0x0); }
-		}
+        /// <summary>
+        /// Returns count of strings in SST
+        /// </summary>
+        public uint Count
+        {
+            get { return base.ReadUInt32(0x0); }
+        }

-		/// <summary>
-		/// Returns count of unique strings in SST
-		/// </summary>
-		public uint UniqueCount
-		{
-			get { return base.ReadUInt32(0x4); }
-		}
+        /// <summary>
+        /// Returns count of unique strings in SST
+        /// </summary>
+        public uint UniqueCount
+        {
+            get { return base.ReadUInt32(0x4); }
+        }

-		/// <summary>
-		/// Reads strings from BIFF stream into SST array
-		/// </summary>
-		public void ReadStrings()
-		{
-			uint offset = (uint)m_readoffset + 8;
-			uint last = (uint)m_readoffset + RecordSize;
-			int lastcontinue = 0;
-			uint count = UniqueCount;
-			while (offset < last)
-			{
+        /// <summary>
+        /// Reads strings from BIFF stream into SST array
+        /// </summary>
+        public void ReadStrings()
+        {
+            uint offset = (uint)m_readoffset + 8;
+            uint last = (uint)m_readoffset + RecordSize;
+            int lastcontinue = 0;
+            uint count = UniqueCount;
+            while (offset < last)
+            {
                 //var str = new XlsFormattedUnicodeString(m_bytes, offset, reader.Encoding);
                 var str = XlsStringFactory.CreateXlsString(m_bytes, offset, reader);
-				uint prefix = str.HeadSize;
-				uint postfix = str.TailSize;
-				uint len = str.CharacterCount;
-				uint size = prefix + postfix + len + ((str.IsMultiByte) ? len : 0);
-				if (offset + size > last)
-				{
-					if (lastcontinue >= continues.Count)
-						break;
-					uint contoffset = continues[lastcontinue];
-					byte encoding = Buffer.GetByte(m_bytes, (int)contoffset + 4);
-					byte[] buff = new byte[size * 2];
-					Buffer.BlockCopy(m_bytes, (int)offset, buff, 0, (int)(last - offset));
-					if (encoding == 0 && str.IsMultiByte)
-					{
-						len -= (last - prefix - offset) / 2;
-                        string temp = Encoding.UTF8.GetString(m_bytes,
-																 (int)contoffset + 5,
-																 (int)len);
-						byte[] tempbytes = Encoding.Unicode.GetBytes(temp);
-						Buffer.BlockCopy(tempbytes, 0, buff, (int)(last - offset), tempbytes.Length);
-						Buffer.BlockCopy(m_bytes, (int)(contoffset + 5 + len), buff, (int)(last - offset + len + len), (int)postfix);
-						offset = contoffset + 5 + len + postfix;
-					}
-					else if (encoding == 1 && str.IsMultiByte == false)
-					{
-						len -= (last - offset - prefix);
-						string temp = Encoding.Unicode.GetString(m_bytes,
-																 (int)contoffset + 5,
-																 (int)(len + len));
-                        byte[] tempbytes = Encoding.UTF8.GetBytes(temp);
-						Buffer.BlockCopy(tempbytes, 0, buff, (int)(last - offset), tempbytes.Length);
-						Buffer.BlockCopy(m_bytes, (int)(contoffset + 5 + len + len), buff, (int)(last - offset + len), (int)postfix);
-						offset = contoffset + 5 + len + len + postfix;
-					}
-					else
-					{
-						Buffer.BlockCopy(m_bytes, (int)contoffset + 5, buff, (int)(last - offset), (int)(size - last + offset));
-						offset = contoffset + 5 + size - last + offset;
-					}
-					last = contoffset + 4 + BitConverter.ToUInt16(m_bytes, (int)contoffset + 2);
-					lastcontinue++;
+                uint prefix = str.HeadSize;
+                uint postfix = str.TailSize;
+                uint len = str.CharacterCount;
+                uint size = prefix + postfix + len + ((str.IsMultiByte) ? len : 0);
+                if (offset + size > last)
+                {
+                    if (lastcontinue >= continues.Count)
+                        break;
+                    uint contoffset = continues[lastcontinue];
+                    byte encoding = Buffer.GetByte(m_bytes, (int)contoffset + 4);
+                    byte[] buff = new byte[size * 2];
+                    Buffer.BlockCopy(m_bytes, (int)offset, buff, 0, (int)(last - offset));
+                    if (encoding == 0 && str.IsMultiByte)
+                    {
+                        len -= (last - prefix - offset) / 2;
+                        string temp = Encoding.GetEncoding("windows-1250").GetString(m_bytes,
+                                                                 (int)contoffset + 5,
+                                                                 (int)len);
+                        byte[] tempbytes = Encoding.Unicode.GetBytes(temp);
+                        Buffer.BlockCopy(tempbytes, 0, buff, (int)(last - offset), tempbytes.Length);
+                        Buffer.BlockCopy(m_bytes, (int)(contoffset + 5 + len), buff, (int)(last - offset + tempbytes.Length), (int)postfix);
+                        offset = contoffset + 5 + len + postfix;
+                    }
+                    else if (encoding == 1 && str.IsMultiByte == false)
+                    {
+                        len -= (last - offset - prefix);
+
+                        string temp = Encoding.GetEncoding("windows-1250").GetString(m_bytes, (int)(offset + prefix), (int)(last - offset - prefix));
+                        byte[] tempbytes = Encoding.Unicode.GetBytes(temp);
+                        Buffer.BlockCopy(tempbytes, 0, buff, (int)prefix, tempbytes.Length);
+                        int buffOffset = (int)(prefix + tempbytes.Length);
+                        temp = Encoding.Unicode.GetString(m_bytes,
+                                                                 (int)contoffset + 5,
+                                                                 (int)(len + len));
+                        tempbytes = Encoding.Unicode.GetBytes(temp);
+                        Buffer.BlockCopy(tempbytes, 0, buff, buffOffset, tempbytes.Length);
+                        Buffer.BlockCopy(m_bytes, (int)(contoffset + 5 + len + len), buff, buffOffset + tempbytes.Length, (int)postfix);
+                        buff[2] = (byte)((XlsFormattedUnicodeString.FormattedUnicodeStringFlags)buff[2] | XlsFormattedUnicodeString.FormattedUnicodeStringFlags.MultiByte);
+                        offset = contoffset + 5 + len + len + postfix;
+                    }
+                    else
+                    {
+                        Buffer.BlockCopy(m_bytes, (int)contoffset + 5, buff, (int)(last - offset), (int)(size - last + offset));
+                        offset = contoffset + 5 + size - last + offset;
+                    }
+                    last = contoffset + 4 + BitConverter.ToUInt16(m_bytes, (int)contoffset + 2);
+                    lastcontinue++;

                     //str = new XlsFormattedUnicodeString(buff, 0, reader.Encoding);
-					str = new XlsFormattedUnicodeString(buff, 0);
-				}
-				else
-				{
-					offset += size;
-					if (offset == last)
-					{
-						if (lastcontinue < continues.Count)
-						{
-							uint contoffset = continues[lastcontinue];
-							offset = contoffset + 4;
-							last = offset + BitConverter.ToUInt16(m_bytes, (int)contoffset + 2);
-							lastcontinue++;
-						}
-						else
-							count = 1;
-					}
-				}
-				m_strings.Add(str.Value);
-				count--;
-				if (count == 0)
-					break;
-			}
-		}
+                    str = new XlsFormattedUnicodeString(buff, 0);
+                }
+                else
+                {
+                    offset += size;
+                    if (offset == last)
+                    {
+                        if (lastcontinue < continues.Count)
+                        {
+                            uint contoffset = continues[lastcontinue];
+                            offset = contoffset + 4;
+                            last = offset + BitConverter.ToUInt16(m_bytes, (int)contoffset + 2);
+                            lastcontinue++;
+                        }
+                        else
+                            count = 1;
+                    }
+                }
+                m_strings.Add(str.Value);
+                count--;
+                if (count == 0)
+                    break;
+            }
+        }

-		/// <summary>
-		/// Returns string at specified index
-		/// </summary>
-		/// <param name="SSTIndex">Index of string to get</param>
-		/// <returns>string value if it was found, empty string otherwise</returns>
-		public string GetString(uint SSTIndex)
-		{
-			if (SSTIndex < m_strings.Count)
-				return m_strings[(int)SSTIndex];
+        /// <summary>
+        /// Returns string at specified index
+        /// </summary>
+        /// <param name="SSTIndex">Index of string to get</param>
+        /// <returns>string value if it was found, empty string otherwise</returns>
+        public string GetString(uint SSTIndex)
+        {
+            if (SSTIndex < m_strings.Count)
+                return m_strings[(int)SSTIndex];

-			return string.Empty;
-		}
+            return string.Empty;
+        }

-		/// <summary>
-		/// Appends Continue record to SST
-		/// </summary>
-		/// <param name="fragment">Continue record</param>
-		public void Append(XlsBiffContinue fragment)
-		{
-			continues.Add((uint)fragment.Offset);
-			m_size += (uint)fragment.Size;
-		}
-	}
+        /// <summary>
+        /// Appends Continue record to SST
+        /// </summary>
+        /// <param name="fragment">Continue record</param>
+        public void Append(XlsBiffContinue fragment)
+        {
+            continues.Add((uint)fragment.Offset);
+            m_size += (uint)fragment.Size;
+        }
+    }
 }


fix ExceptionLogic.LogException

fix ExceptionLogic.LogException

--- Signum.Engine/Basics/ExceptionLogic.cs
+++ Signum.Engine/Basics/ExceptionLogic.cs
@@ -47,12 +47,7 @@

 		public static ExceptionEntity LogException(this Exception ex)
 		{
-
-            System.IO.File.WriteAllText(@"c:\SeleniumScreenshot\Error_{0}.txt".FormatWith(TimeZoneManager.Now.Ticks), ex.Message);
-
-
             var entity = GetEntity(ex);
-
 			return entity.SaveForceNew();
 		}


Remove redundant If modified since check.

--HG--
extra : rebase_source : 1d9d798183e55e0f7d2f7de973a96ef53c24aeab

--- NuPack.Server/Controllers/PackagesController.cs
+++ NuPack.Server/Controllers/PackagesController.cs
@@ -20,12 +20,6 @@
             string fullPath = Path.Combine(physicalPath, p);

             DateTime lastModified = new FileInfo(fullPath).LastAccessTimeUtc;
-            DateTime ifModifiedSince;
-            if (DateTime.TryParse(Request.Headers["If-Modified-Since"], out ifModifiedSince) &&
-                lastModified > ifModifiedSince) {
-                Response.StatusCode = 304;
-                return new EmptyResult();
-            }

             HttpCachePolicyBase cachePolicy = Response.Cache;
             cachePolicy.SetCacheability(HttpCacheability.Public);
@@ -44,12 +38,6 @@

             // Get the last modified of the package directory
             DateTime lastModified = new DirectoryInfo(fullPath).LastWriteTimeUtc;
-            DateTime ifModifiedSince;
-            if (DateTime.TryParse(Request.Headers["If-Modified-Since"], out ifModifiedSince) &&
-                lastModified > ifModifiedSince) {
-                Response.StatusCode = 304;
-                return new EmptyResult();
-            }

             SyndicationFeed packageFeed = PackageSyndicationFeed.Create(
                 fullPath,


fixed password in Manage/Index.cshtml

fixed password in Manage/Index.cshtml

--- Favor/Favor/Views/Manage/Index.cshtml
+++ Favor/Favor/Views/Manage/Index.cshtml
@@ -12,8 +12,7 @@

Change your account settings

-
Password:

-

+            Password:
                 [
                 @if (Model.HasPassword)
                 {
@@ -24,7 +23,6 @@
                     @Html.ActionLink("Create", "SetPassword")
                 }
                 ]
-


New Buttons for the NuspecView

New Buttons for the NuspecView

--- NuspecReleaseNotes/Views/NuspecView.Designer.cs
+++ NuspecReleaseNotes/Views/NuspecView.Designer.cs
@@ -30,6 +30,9 @@
         {
             this.PathLabel = new System.Windows.Forms.Label();
             this.ReleaseNotesTextbox = new System.Windows.Forms.TextBox();
+            this.ReplaceButton = new System.Windows.Forms.Button();
+            this.PrefixButton = new System.Windows.Forms.Button();
+            this.SuffixButton = new System.Windows.Forms.Button();
             this.SuspendLayout();
             //
             // PathLabel
@@ -48,17 +51,50 @@
             this.ReleaseNotesTextbox.Location = new System.Drawing.Point(6, 26);
             this.ReleaseNotesTextbox.Multiline = true;
             this.ReleaseNotesTextbox.Name = "ReleaseNotesTextbox";
-            this.ReleaseNotesTextbox.Size = new System.Drawing.Size(88, 39);
+            this.ReleaseNotesTextbox.Size = new System.Drawing.Size(309, 39);
             this.ReleaseNotesTextbox.TabIndex = 1;
+            //
+            // ReplaceButton
+            //
+            this.ReplaceButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.ReplaceButton.Location = new System.Drawing.Point(321, 26);
+            this.ReplaceButton.Name = "ReplaceButton";
+            this.ReplaceButton.Size = new System.Drawing.Size(75, 23);
+            this.ReplaceButton.TabIndex = 2;
+            this.ReplaceButton.Text = "&Replace all";
+            this.ReplaceButton.UseVisualStyleBackColor = true;
+            //
+            // PrefixButton
+            //
+            this.PrefixButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.PrefixButton.Location = new System.Drawing.Point(402, 26);
+            this.PrefixButton.Name = "PrefixButton";
+            this.PrefixButton.Size = new System.Drawing.Size(75, 23);
+            this.PrefixButton.TabIndex = 3;
+            this.PrefixButton.Text = "&Prefix all";
+            this.PrefixButton.UseVisualStyleBackColor = true;
+            //
+            // SuffixButton
+            //
+            this.SuffixButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.SuffixButton.Location = new System.Drawing.Point(483, 26);
+            this.SuffixButton.Name = "SuffixButton";
+            this.SuffixButton.Size = new System.Drawing.Size(75, 23);
+            this.SuffixButton.TabIndex = 4;
+            this.SuffixButton.Text = "S&uffix all";
+            this.SuffixButton.UseVisualStyleBackColor = true;
             //
             // NuspecView
             //
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.SuffixButton);
+            this.Controls.Add(this.PrefixButton);
+            this.Controls.Add(this.ReplaceButton);
             this.Controls.Add(this.ReleaseNotesTextbox);
             this.Controls.Add(this.PathLabel);
             this.Name = "NuspecView";
-            this.Size = new System.Drawing.Size(150, 83);
+            this.Size = new System.Drawing.Size(598, 78);
             this.ResumeLayout(false);
             this.PerformLayout();

@@ -68,5 +104,8 @@

         private System.Windows.Forms.Label PathLabel;
         private System.Windows.Forms.TextBox ReleaseNotesTextbox;
+        private System.Windows.Forms.Button ReplaceButton;
+        private System.Windows.Forms.Button PrefixButton;
+        private System.Windows.Forms.Button SuffixButton;
     }
 }


[Debugger] Make sure the right-hand ValueReference is non-null

Fixes bug #4293.

--- Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs
+++ Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryEvaluator.cs
@@ -656,7 +656,7 @@
 					if (!(bool)val)
 						return LiteralValueReference.CreateObjectLiteral (ctx, name, false);
 					ValueReference vr = (ValueReference) rightExp.AcceptVisitor (this, data);
-					if (ctx.Adapter.GetTypeName (ctx, vr.Type) != "System.Boolean")
+					if (vr == null || ctx.Adapter.GetTypeName (ctx, vr.Type) != "System.Boolean")
 						throw CreateParseError ("Right operand of logical And must be a boolean");
 					return vr;
 				}
@@ -667,7 +667,7 @@
 					if ((bool)val)
 						return LiteralValueReference.CreateObjectLiteral (ctx, name, true);
 					ValueReference vr = (ValueReference) rightExp.AcceptVisitor (this, data);
-					if (ctx.Adapter.GetTypeName (ctx, vr.Type) != "System.Boolean")
+					if (vr == null || ctx.Adapter.GetTypeName (ctx, vr.Type) != "System.Boolean")
 						throw CreateParseError ("Right operand of logical Or must be a boolean");
 					return vr;
 				}


Add lambda delegate method

Add lambda delegate method

--- OOP_Review_2017_1/OOP_Review_2017_10/Program.cs
+++ OOP_Review_2017_1/OOP_Review_2017_10/Program.cs
@@ -161,6 +161,7 @@
             // 3. return type으로 전달 가능

             ConsoleWrite(method);
+            ConsoleWrite(() => "blah blah");
             DelegateMethod juice4 = GetJuice();
             string juice5 = juice4();