fixed clipboard error

fixed clipboard error

--- TCC.Core/ViewModels/BossGageWindowViewModel.cs
+++ TCC.Core/ViewModels/BossGageWindowViewModel.cs
@@ -228,7 +228,14 @@
                     sb.Append("\\");
                 }
             }
-            Clipboard.SetText(sb.ToString());
+            try
+            {
+                Clipboard.SetText(sb.ToString());
+            }
+            catch
+            {
+                ChatWindowViewModel.Instance.AddTccMessage("Failed to copy boss HP.");
+            }
         }
         public void ClearBosses()
         {


Updated error text for logged accessibility errors

--- TabulateSmarterTestContentPackage/Tabulator.cs
+++ TabulateSmarterTestContentPackage/Tabulator.cs
@@ -1552,13 +1552,14 @@
         }

         // Acceptable sub-elements: textToSpeechPronunciation, textToSpeechPronunciationAlternate, audioText, audioSortDesc, audioLongDesc
-        void CheckForNonEmptyReadAloudSubElement(ItemContext it, XmlNode xml)
+        void CheckForNonEmptyReadAloudSubElement(ItemContext it, XmlNode xml, string id, string src)
         {
             if(!new List<string> {"textToSpeechPronunciation", "textToSpeechPronunciationAlternate", "audioText", "audioShortDesc", "audioLongDesc"}
                 .Select(t => $"relatedElementInfo/readAloud/{t}") // Select sub-elements from list above
                 .Any(element => ElementExistsAndIsNonEmpty(xml, element))) // Check if the sub-element exists and has a value
             {
-                ReportError(it, ErrCat.Item, ErrSeverity.Degraded, "Img tag is missing alt tag content from the <readAloud> sub-element");
+                ReportError(it, ErrCat.Item, ErrSeverity.Degraded,
+                    "Img tag is missing alternative text in the <readAloud> accessibility element.", "id ='{0}' src='{1}'", id, src);
             }

         }
@@ -1579,7 +1580,8 @@
                 }
                 if (string.IsNullOrEmpty(img.Id))
                 {
-                    ReportError(it, ErrCat.Item, ErrSeverity.Degraded, "Img tag is missing id attribute");
+                    ReportError(it, ErrCat.Item, ErrSeverity.Degraded,
+                        "Img tag is missing id attribute to associate with alternative text.", "src = '{0}'", img.Source);
                 }
                 else
                 {
@@ -1591,13 +1593,14 @@
                         .ToList();
                     if (!accessibilityNodes.Any())
                     {
-                        ReportError(it, ErrCat.Item, ErrSeverity.Degraded, "Img tag does not have an alt attribute", "id='{0}' src='{1}'", img.Id, img.Source);
+                        ReportError(it, ErrCat.Item, ErrSeverity.Degraded,
+                            "Img tag does not have associated alternative text.", "id ='{0}' src='{1}'", img.Id, img.Source);
                     }
                     else
                     {
                         foreach (var node in accessibilityNodes)
                         {
-                            CheckForNonEmptyReadAloudSubElement(it, node.ParentNode);
+                            CheckForNonEmptyReadAloudSubElement(it, node.ParentNode, img.Id, img.Source);
                         }
                     }
                 }


Get Refactoring.

Get Refactoring.

--- MIMWebClient/Core/Events/ManipulateObject.cs
+++ MIMWebClient/Core/Events/ManipulateObject.cs
@@ -17,9 +17,9 @@
         private static string lookItem { get; } = "item";
         private static string FindInventory { get; } = "inventory";
         private static string Findkillable { get; } = "killable";
-        private static string FindAll { get; } = "all";
-
-
+        private static string FindAll { get; } = "all";
+
+
         /// <summary>
         /// Finds Objects in room, inventory, containers or mobs and players
         /// </summary>
@@ -58,6 +58,7 @@
             }

             Item foundItem = null;
+            Item foundContainer = null;
             Player foundMob = null;
             Player foundPlayer = null;

@@ -86,14 +87,14 @@
                 {

                     //look in room
-                    var foundContainer = (nthContainer == -1) ? roomItems.Find(x => x.name.ToLower().Contains(comntainerToFind) && x.container == true)
+                     foundContainer = (nthContainer == -1) ? roomItems.Find(x => x.name.ToLower().Contains(comntainerToFind) && x.container == true)
                                           : roomItems.FindAll(x => x.name.ToLower().Contains(comntainerToFind) && x.container == true).Skip(nthContainer - 1).FirstOrDefault();

                     if (foundContainer != null)
-                    {
-
-                      foundItem = FindItem.Item(foundContainer.containerItems, nth, itemToFind);
+                    {
+
+                        foundItem = FindItem.Item(foundContainer.containerItems, nth, itemToFind);

                     }

@@ -108,10 +109,10 @@

                     }

-
-                }
-
-
+
+                }
+
+

             }
             else if (itemToFind == "all" && roomItems.Count == 0 && command == "get")
@@ -127,7 +128,7 @@
             #region find item in player inventory for commands such as drop, equip, wield etc
             else if (objectTypeToFind == FindInventory)
             {
-                Item foundContainer = null;
+
                 if (string.IsNullOrEmpty(itemContainer))
                 {

@@ -222,7 +223,7 @@
                 else
                 {
                     //look in room
-                    var foundContainer = (nthContainer == -1) ? roomItems.Find(x => x.name.ToLower().Contains(comntainerToFind) && x.container == true)
+                     foundContainer = (nthContainer == -1) ? roomItems.Find(x => x.name.ToLower().Contains(comntainerToFind) && x.container == true)
                                           : roomItems.FindAll(x => x.name.ToLower().Contains(comntainerToFind) && x
                       .container == true).Skip(nthContainer - 1).FirstOrDefault();

@@ -291,7 +292,7 @@

-            return new KeyValuePair<Item, Item>(null, null);
+            return new KeyValuePair<Item, Item>(foundContainer, foundItem);
         }

         /// <summary>
@@ -304,113 +305,74 @@
         {

             //TODO handle container
-
             var currentRoom = room;
             var currentPlayer = player;
             string[] all = userInput.Split();
-
-            if (all[0].Equals("all", StringComparison.InvariantCultureIgnoreCase))
-            {
-
-                var returnedItem = (KeyValuePair<Item, Item>)FindObject(room, player, commandKey, userInput, type);
-                var container = returnedItem.Key;
-                var item = returnedItem.Value;
-
+            var returnedItem = (KeyValuePair<Item, Item>)FindObject(room, player, commandKey, userInput, type);
+            var container = returnedItem.Key;
+            var item = returnedItem.Value;
+
+            if (item == null)
+            {
+                return;
+            }
+
+            if (all[0].Equals("all", StringComparison.InvariantCultureIgnoreCase) && container == null)
+            {
+                var roomItems = room.items;
+                var roomItemsCount = roomItems.Count;
+
+                for (int i = roomItemsCount - 1; i >= 0; i--)
+                {
+
+                    //Get all Items from the room
+                    roomItems[i].location = Item.ItemLocation.Inventory;
+                    player.Inventory.Add(roomItems[i]);
+                    room.items.Remove(roomItems[i]);
+                    BroadcastPlayerAction.BroadcastPlayerActions(player.HubGuid, player.Name, room.players, "You pick up a " + roomItems[i].name, player.Name + " picks up a " + roomItems[i].name);
+
+
+                }
+
+
+            }
+            else if (all[0].Equals("all", StringComparison.InvariantCultureIgnoreCase) && container != null)
+            {
+                //get all from container
+                var containerItems = container.containerItems;
+                var containerCount = containerItems.Count;
+
+                for (int i = containerCount - 1; i >= 0; i--)
+                {
+                    containerItems[i].location = Item.ItemLocation.Inventory;
+                    player.Inventory.Add(containerItems[i]);
+
+                    BroadcastPlayerAction.BroadcastPlayerActions(player.HubGuid, player.Name, room.players, "You get a " + containerItems[i].name + " from a " + container.name, player.Name + " get a " + containerItems[i].name + " from a " + container.name);
+
+                    containerItems.Remove(containerItems[i]);
+                }
+
+
+            }
+
+            else if (item != null)
+            {
+                //get single Item

                 if (container == null)
                 {

-                    var roomItems = room.items;
-                    var roomItemsCount = roomItems.Count;
-
-                    for (int i = roomItemsCount - 1; i >= 0; i--)
-                    {
-                        if (roomItems[i].type != Item.ItemType.Gold || roomItems[i].type != Item.ItemType.Silver
-                            || roomItems[i].type != Item.ItemType.Copper)
-                        {
-
-
-
-                            roomItems[i].location = Item.ItemLocation.Inventory;
-                            player.Inventory.Add(roomItems[i]);
-
-                        }
-                        else
-                        {
-                            if (roomItems[i].type == Item.ItemType.Gold)
-                            {
-                                player.Gold += roomItems[i].count;
-                            }
-
-                            if (roomItems[i].type == Item.ItemType.Silver)
-                            {
-                                player.Silver += roomItems[i].count;
-                            }
-
-                            if (roomItems[i].type == Item.ItemType.Copper)
-                            {
-                                player.Copper += roomItems[i].count;
-                            }
-
-                        }
-
-                        BroadcastPlayerAction.BroadcastPlayerActions(player.HubGuid, player.Name, room.players, "You pick up a " + roomItems[i].name, player.Name + " picks up a " + roomItems[i].name);
-
-                        room.items.Remove(roomItems[i]);
-                    }
-
-                }
-                else
-                {
-
-                    var containerItems = container.containerItems;
-                    var containerCount = containerItems.Count;
-
-
-                    for (int i = containerCount - 1; i >= 0; i--)
-                    {
-                        containerItems[i].location = Item.ItemLocation.Inventory;
-                        player.Inventory.Add(containerItems[i]);
-
-                        BroadcastPlayerAction.BroadcastPlayerActions(player.HubGuid, player.Name, room.players, "You get a " + containerItems[i].name + " from a " + container.name, player.Name + " get a " + containerItems[i].name + " from a " + container.name);
-
-                        containerItems.Remove(containerItems[i]);
-                    }
-
-                }
-            }
-            else
-            {
-
-                KeyValuePair<Item, Item> returnedItem = (KeyValuePair<Item, Item>)FindObject(room, player, commandKey, userInput, type);
-
-                var container = returnedItem.Key;
-                var item = returnedItem.Value;
-
-                if (container == null)
-                {
-                    if (item == null)
-                    {
-                        return;
-                    }
-
                     room.items.Remove(item);
                     item.location = Item.ItemLocation.Inventory;
                     player.Inventory.Add(item);

-

                     BroadcastPlayerAction.BroadcastPlayerActions(player.HubGuid, player.Name, room.players, "You pick up a " + item.name, player.Name + " picks up a " + item.name);

                 }
                 else
                 {
-                    if (item == null)
-                    {
-                        return;
-                    }
-
-
+                    //Get item from container
                     container.containerItems.Remove(item);
                     container.location = Item.ItemLocation.Inventory;
                     player.Inventory.Add(item);
@@ -453,11 +415,13 @@
                 for (int i = playerInvCount - 1; i >= 0; i--)
                 {
                     playerInv[i].location = Item.ItemLocation.Room;
-
+

                     if (container == null)
                     {
+                        playerInv[i].location = Item.ItemLocation.Room;
                         room.items.Add(playerInv[i]);
+

                         BroadcastPlayerAction.BroadcastPlayerActions(player.HubGuid, player.Name, room.players, "You drop a " + playerInv[i].name, player.Name + " drops a " + playerInv[i].name);
                     }


switched img tag collection to use Linq

switched img tag collection to use Linq

--- TabulateSmarterTestContentPackage/Tabulator.cs
+++ TabulateSmarterTestContentPackage/Tabulator.cs
@@ -1544,16 +1544,15 @@
                 terms.Add(term);
             }

-            // For img tag validation
+            // Assemble img tags and map their src and id attributes for validation
             var imgList = new List<HtmlImageTagModel>();
-            foreach (XmlElement node in html.SelectNodes("//img"))
-            {
-                    imgList.Add(new HtmlImageTagModel
-                    {
-                        Source = node.Attributes["src"]?.InnerText ?? string.Empty,
-                        Id = node.Attributes["id"]?.InnerText ?? string.Empty
-                    });
-            }
+            imgList.AddRange(html.SelectNodes("//img")
+                .Cast<XmlNode>()
+                .Select(x => new HtmlImageTagModel
+                    {
+                        Source = x.Attributes["src"]?.InnerText ?? string.Empty,
+                        Id = x.Attributes["id"]?.InnerText ?? string.Empty
+                    }));
             return imgList;
         }


default country for speakers - ukraine

default country for speakers - ukraine

--- TeamSpark.AzureDay.WebSite.CLI/Data/Speaker.cs
+++ TeamSpark.AzureDay.WebSite.CLI/Data/Speaker.cs
@@ -12,6 +12,8 @@
 			{
 				Id = Guid.NewGuid()
 			};
+
+			speaker.CountryId = Guid.Parse("fbac873c-4bfd-4f45-bc2e-a02f8435240d");

 			Console.Write("First Name: ");
 			speaker.FirstName = Console.ReadLine();


Changed front camera (only one hooked up to a webcam stream) to start off (hidden).

--- MarsRover/MarsRoverClient/Pages/Main.xaml.cs
+++ MarsRover/MarsRoverClient/Pages/Main.xaml.cs
@@ -45,7 +45,6 @@
             cvm.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(ShowHideCamera);
             cvm.CameraName = "Back";
             cvm.VideoSource = WebCamStreamManager.Instance.GetBackCameraStream();
-            cvm.VideoSource.Start();
             ((MainViewModel)DataContext).VMBackCamera = cvm;

             cvm = this.camLeft.DataContext as CameraViewModel;
@@ -64,8 +63,8 @@
             this.FocusVisualStyle = new Style();//Get rid of dotted rectangle that indicates its focused

             //Start or hide the cameras depending on configuration
-            ((MainViewModel)DataContext).VMFrontCamera.VideoSource.Start();
-            //this.layoutFrontCam.Hide();
+            //((MainViewModel)DataContext).VMFrontCamera.VideoSource.Start();
+            this.layoutFrontCam.Hide();
             ((MainViewModel)DataContext).VMBackCamera.VideoSource.Start();
             //this.layoutBackCam.Hide();
             this.layoutLeftCam.Hide();


update

update

--- CSharpGL/0Foundations/OpenGLObjects/Rendering/Renderer/PropertyNameMap.cs
+++ CSharpGL/0Foundations/OpenGLObjects/Rendering/Renderer/PropertyNameMap.cs
@@ -10,9 +10,6 @@
     /// 持有从<see cref="IBufferable"/>到GLSL中in/uniform变量名的对应关系。
     /// 每个<see cref="IBufferable"/>和每个GLSL的代表（Renderer）都有一个Map关系。
     /// 这里存储的内容需要OpenGL开发者和APP开发者协商对接。
-    /// 策略A：如果没有，或者map中有的名字不存在，就默认为两者使用的名字相同。
-    /// 策略B：如果没有，或者map中有的名字不存在， 就说明此map不完整，即OpenGL开发者和APP开发者没有完全协商。
-    /// 现在选择策略A。
     /// </summary>
     public class PropertyNameMap : IEnumerable<PropertyNameMap.NamePair>
     {


ApplicationPkcs7Mime.Decrypt() needs to pas the *decoded* content to SecureMimeContext.Decrypt

--- MimeKit/Cryptography/ApplicationPkcs7Mime.cs
+++ MimeKit/Cryptography/ApplicationPkcs7Mime.cs
@@ -139,7 +139,7 @@
 				throw new InvalidOperationException ();

 			using (var memory = new MemoryStream ()) {
-				ContentObject.WriteTo (memory);
+				ContentObject.DecodeTo (memory);
 				memory.Position = 0;

 				return ctx.Decrypt (memory, out signatures);
@@ -168,14 +168,9 @@
 			if (SecureMimeType != SecureMimeType.EnvelopedData)
 				throw new InvalidOperationException ();

-			using (var memory = new MemoryStream ()) {
-				IList<IDigitalSignature> signatures;
-
-				ContentObject.WriteTo (memory);
-				memory.Position = 0;
-
-				return ctx.Decrypt (memory, out signatures);
-			}
+			IList<IDigitalSignature> signatures;
+
+			return Decrypt (ctx, out signatures);
 		}

 		/// <summary>


Creating challenge saves successfully file description.

--- CodeIt/CodeIt.Web/Areas/Administration/Controllers/ChallengeController.cs
+++ CodeIt/CodeIt.Web/Areas/Administration/Controllers/ChallengeController.cs
@@ -1,6 +1,8 @@
 using System.Web.Mvc;
 using System.Linq;
 using Bytes2you.Validation;
+
+using System.Web.Hosting;

 using CodeIt.Data.Models;
 using CodeIt.Services.Data.Contracts;
@@ -12,6 +14,7 @@
 using System.Threading.Tasks;
 using System;
 using System.IO;
+using CodeIt.Web.Infrastructure.FileSystem;

 namespace CodeIt.Web.Areas.Administration.Controllers
 {
@@ -23,18 +26,26 @@
         private readonly IChallengesService challenges;
         private readonly IMappingProvider mapper;
         private readonly IFileSystemService fileSystem;
+        private readonly IFileUnits fileUtils;

-        public ChallengeController(ITracksService tracks, IChallengesService challenges, IFileSystemService fileSystem, IMappingProvider mapper)
+        public ChallengeController(
+            ITracksService tracks,
+            IChallengesService challenges,
+            IFileSystemService fileSystem,
+            IMappingProvider mapper,
+            IFileUnits fileUtils)
         {
             Guard.WhenArgument(tracks, nameof(tracks)).IsNull().Throw();
             Guard.WhenArgument(mapper, nameof(mapper)).IsNull().Throw();
             Guard.WhenArgument(challenges, nameof(challenges)).IsNull().Throw();
             Guard.WhenArgument(fileSystem, nameof(fileSystem)).IsNull().Throw();
+            Guard.WhenArgument(fileUtils, nameof(fileUtils)).IsNull().Throw();

             this.tracks = tracks;
             this.mapper = mapper;
             this.challenges = challenges;
             this.fileSystem = fileSystem;
+            this.fileUtils = fileUtils;
         }

         [HttpGet]
@@ -66,8 +77,11 @@
             }
             else
             {
-                var dbChallenge = this.challenges.CreateWithFileDescription(challenge.Title, challenge.Description, challenge.CategoryId, challenge.Language, challenge.TimeLimitInMs, challenge.MemoryInMb, tests, file.FileName, "exe", FileDescriptionSystemPath);
-                //await this.fileSystem.SaveFileAsync(this.Server.MapPath(FileDescriptionSystemPath), file.InputStream);
+                string fileName = this.fileUtils.ExtractFileName(file.FileName);
+                string fileExtension = this.fileUtils.ExtractFileExtension(file.FileName);
+
+                var dbChallenge = this.challenges.CreateWithFileDescription(challenge.Title, challenge.Description, challenge.CategoryId, challenge.Language, challenge.TimeLimitInMs, challenge.MemoryInMb, tests, fileName, fileExtension, FileDescriptionSystemPath);
+                await this.fileSystem.SaveFileAsync(FileDescriptionSystemPath + dbChallenge.FileDecription.FileName + "." + fileExtension, file.InputStream);
             }

             return this.Redirect("/");


Miner settings window shouldn't be sizeable

--- MultiMiner.Win/MinerSettingsForm.Designer.cs
+++ MultiMiner.Win/MinerSettingsForm.Designer.cs
@@ -399,6 +399,7 @@
             this.Controls.Add(this.groupBox1);
             this.Controls.Add(this.disableGpuCheckbox);
             this.Controls.Add(this.panel1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.MaximizeBox = false;
             this.MinimizeBox = false;


Correct implementation of the builder for settings and comparer when building an equalTo constraint

--- NBi.NUnit/Builder/ExecutionEqualToBuilder.cs
+++ NBi.NUnit/Builder/ExecutionEqualToBuilder.cs
@@ -102,31 +102,36 @@
                 throw new ArgumentException();

             //Manage settings for comparaison
-            ISettingsResultSetComparison settings = null;
+            var builder = new ResultSetComparisonBuilder();
             if (ConstraintXml.Behavior == EqualToXml.ComparisonBehavior.SingleRow)
             {
-                var builder = new ResultSetComparisonBuilder();
+
                 builder.Setup(false, 0, null, 0, null,
                     ConstraintXml.ValuesDefaultType,
                     new NumericToleranceFactory().Instantiate(ConstraintXml.Tolerance),
                     ConstraintXml.ColumnsDef
                 );
-                builder.Build();
-                settings = builder.GetSettings();
-                ctr = ctr.Using(builder.GetComparer());
+
             }
             else
             {
-                settings = new SettingsResultSetComparisonByIndex(
+                builder.Setup(
+                    true,
                     ConstraintXml.KeysDef,
+                    ConstraintXml.KeyName,
                     ConstraintXml.ValuesDef,
+                    ConstraintXml.ValueName,
                     ConstraintXml.ValuesDefaultType,
                     new NumericToleranceFactory().Instantiate(ConstraintXml.Tolerance),
                     ConstraintXml.ColumnsDef
                 );
             }
-
-            ctr.Using(settings);
+
+            builder.Build();
+            ctr = ctr.Using(builder.GetComparer());
+
+            var settings = builder.GetSettings();
+            ctr = ctr.Using(settings);

             //Manage transformations
             var transformationProvider = new TransformationProvider();


Updated examples.

Updated examples.

--- NtObjectManager/GetAccessibleObjectCmdlet.cs
+++ NtObjectManager/GetAccessibleObjectCmdlet.cs
@@ -44,6 +44,14 @@
     /// <example>
     ///   Get-AccessibleObject -Win32Path \ -Recurse
     ///   <para>Check recursively for accessible objects under the user's based named objects for the current process token.</para>
+    /// </example>
+    /// <example>
+    ///   Get-AccessibleObject \ -Recurse -RequiredAccess GenericWrite
+    ///   <para>Check recursively for accessible objects under with write access.</para>
+    /// </example>
+    /// <example>
+    ///   Get-AccessibleObject \ -Recurse -RequiredAccess GenericWrite -AllowPartialAccess
+    ///   <para>Check recursively for accessible objects under with partial write access.</para>
     /// </example>
     /// <example>
     ///   $token = Get-NtToken -Primary -Duplicate -IntegrityLevel Low
Get-AccessibleObject \BaseNamedObjects -Recurse -Tokens $token -AccessRights GenericWrite


Default values for properties in Models.List to avoid having to specify them all in client code

--- MailChimp.Net/Models/List.cs
+++ MailChimp.Net/Models/List.cs
@@ -10,125 +10,139 @@

 namespace MailChimp.Net.Models
 {
-    /// <summary>
-    /// The list.
-    /// </summary>
-    public class List
-    {
-        /// <summary>
-        /// Initializes a new instance of the <see cref="List"/> class.
-        /// </summary>
-        public List()
-        {
-            this.Links = new HashSet<Link>();
-        }
+	/// <summary>
+	/// The list.
+	/// </summary>
+	public class List
+	{
+		/// <summary>
+		/// Initializes a new instance of the <see cref="List"/> class.
+		/// </summary>
+		public List()
+		{
+			this.Links = new HashSet<Link>();
+			BeamerAddress = string.Empty;
+			DateCreated = string.Empty;
+			Id = string.Empty;
+			NotifyOnSubscribe = string.Empty;
+			NotifyOnUnsubscribe = string.Empty;
+			Stats = new Stats()
+			{
+				CampaignLastSent = string.Empty,
+				LastSubDate = string.Empty,
+				LastUnsubDate = string.Empty
+			};
+			SubscribeUrlLong = string.Empty;
+			SubscribeUrlShort = string.Empty;
+			Visibility = "prv";
+		}

-        /// <summary>
-        /// Gets or sets the beamer address.
-        /// </summary>
-        [JsonProperty("beamer_address")]
-        public string BeamerAddress { get; set; }
+		/// <summary>
+		/// Gets or sets the beamer address.
+		/// </summary>
+		[JsonProperty("beamer_address")]
+		public string BeamerAddress { get; set; }

-        /// <summary>
-        /// Gets or sets the campaign defaults.
-        /// </summary>
-        [JsonProperty("campaign_defaults")]
-        public CampaignDefaults CampaignDefaults { get; set; }
+		/// <summary>
+		/// Gets or sets the campaign defaults.
+		/// </summary>
+		[JsonProperty("campaign_defaults")]
+		public CampaignDefaults CampaignDefaults { get; set; }

-        /// <summary>
-        /// Gets or sets the contact.
-        /// </summary>
-        [JsonProperty("contact")]
-        public Contact Contact { get; set; }
+		/// <summary>
+		/// Gets or sets the contact.
+		/// </summary>
+		[JsonProperty("contact")]
+		public Contact Contact { get; set; }

-        /// <summary>
-        /// Gets or sets the date created.
-        /// </summary>
-        [JsonProperty("date_created")]
-        public string DateCreated { get; set; }
+		/// <summary>
+		/// Gets or sets the date created.
+		/// </summary>
+		[JsonProperty("date_created")]
+		public string DateCreated { get; set; }

-        /// <summary>
-        /// Gets or sets a value indicating whether email type option.
-        /// </summary>
-        [JsonProperty("email_type_option")]
-        public bool EmailTypeOption { get; set; }
+		/// <summary>
+		/// Gets or sets a value indicating whether email type option.
+		/// </summary>
+		[JsonProperty("email_type_option")]
+		public bool EmailTypeOption { get; set; }

-        /// <summary>
-        /// Gets or sets the id.
-        /// </summary>
-        [JsonProperty("id")]
-        public string Id { get; set; }
+		/// <summary>
+		/// Gets or sets the id.
+		/// </summary>
+		[JsonProperty("id")]
+		public string Id { get; set; }

-        /// <summary>
-        /// Gets or sets the links.
-        /// </summary>
-        [JsonProperty("_links")]
-        public IEnumerable<Link> Links { get; set; }
+		/// <summary>
+		/// Gets or sets the links.
+		/// </summary>
+		[JsonProperty("_links")]
+		public IEnumerable<Link> Links { get; set; }

-        /// <summary>
-        /// Gets or sets the list rating.
-        /// </summary>
-        [JsonProperty("list_rating")]
-        public int ListRating { get; set; }
+		/// <summary>
+		/// Gets or sets the list rating.
+		/// </summary>
+		[JsonProperty("list_rating")]
+		public int ListRating { get; set; }

-        /// <summary>
-        /// Gets or sets the modules.
-        /// </summary>
-        [JsonProperty("modules")]
-        public object[] Modules { get; set; }
+		/// <summary>
+		/// Gets or sets the modules.
+		/// </summary>
+		[JsonProperty("modules")]
+		public object[] Modules { get; set; }

-        /// <summary>
-        /// Gets or sets the name.
-        /// </summary>
-        [JsonProperty("name")]
-        public string Name { get; set; }
+		/// <summary>
+		/// Gets or sets the name.
+		/// </summary>
+		[JsonProperty("name")]
+		public string Name { get; set; }

-        /// <summary>
-        /// Gets or sets the notify on subscribe.
-        /// </summary>
-        [JsonProperty("notify_on_subscribe")]
-        public string NotifyOnSubscribe { get; set; }
+		/// <summary>
+		/// Gets or sets the notify on subscribe.
+		/// </summary>
+		[JsonProperty("notify_on_subscribe")]
+		public string NotifyOnSubscribe { get; set; }

-        /// <summary>
-        /// Gets or sets the notify on unsubscribe.
-        /// </summary>
-        [JsonProperty("notify_on_unsubscribe")]
-        public string NotifyOnUnsubscribe { get; set; }
+		/// <summary>
+		/// Gets or sets the notify on unsubscribe.
+		/// </summary>
+		[JsonProperty("notify_on_unsubscribe")]
+		public string NotifyOnUnsubscribe { get; set; }

-        /// <summary>
-        /// Gets or sets the permission reminder.
-        /// </summary>
-        [JsonProperty("permission_reminder")]
-        public string PermissionReminder { get; set; }
+		/// <summary>
+		/// Gets or sets the permission reminder.
+		/// </summary>
+		[JsonProperty("permission_reminder")]
+		public string PermissionReminder { get; set; }

-        /// <summary>
-        /// Gets or sets the stats.
-        /// </summary>
-        [JsonProperty("stats")]
-        public Stats Stats { get; set; }
+		/// <summary>
+		/// Gets or sets the stats.
+		/// </summary>
+		[JsonProperty("stats")]
+		public Stats Stats { get; set; }

-        /// <summary>
-        /// Gets or sets the subscribe url long.
-        /// </summary>
-        [JsonProperty("subscribe_url_long")]
-        public string SubscribeUrlLong { get; set; }
+		/// <summary>
+		/// Gets or sets the subscribe url long.
+		/// </summary>
+		[JsonProperty("subscribe_url_long")]
+		public string SubscribeUrlLong { get; set; }

-        /// <summary>
-        /// Gets or sets the subscribe url short.
-        /// </summary>
-        [JsonProperty("subscribe_url_short")]
-        public string SubscribeUrlShort { get; set; }
+		/// <summary>
+		/// Gets or sets the subscribe url short.
+		/// </summary>
+		[JsonProperty("subscribe_url_short")]
+		public string SubscribeUrlShort { get; set; }

-        /// <summary>
-        /// Gets or sets a value indicating whether use archive bar.
-        /// </summary>
-        [JsonProperty("use_archive_bar")]
-        public bool UseArchiveBar { get; set; }
+		/// <summary>
+		/// Gets or sets a value indicating whether use archive bar.
+		/// </summary>
+		[JsonProperty("use_archive_bar")]
+		public bool UseArchiveBar { get; set; }

-        /// <summary>
-        /// Gets or sets the visibility.
-        /// </summary>
-        [JsonProperty("visibility")]
-        public string Visibility { get; set; }
-    }
+		/// <summary>
+		/// Gets or sets the visibility.
+		/// </summary>
+		[JsonProperty("visibility")]
+		public string Visibility { get; set; }
+	}
 }


# bug fix

# bug fix

--- Maptool/Maptool/Form/Main.cs
+++ Maptool/Maptool/Form/Main.cs
@@ -148,7 +148,6 @@

         private void XMLCreate(string FileName)
         {
-            // 생성할 XML 파일 경로와 이름, 인코딩 방식을 설정합니다.
             SortBitmapID();
             XmlTextWriter textWriter = new XmlTextWriter(@"map.xml", Encoding.UTF8);

@@ -257,7 +256,7 @@
             foreach (string file in files)
                 File.Delete(file);
         }
-        private void XMLRead(string FileName)//(String fileName)
+        private void OpenCSMFile(string FileName)//(String fileName)
         {
             int usedTileSetCount = 0;
             string zipToUnpack = FileName;
@@ -360,7 +359,7 @@

             if (openFileDialog1.ShowDialog() == DialogResult.OK)
             {
-                XMLRead(openFileDialog1.FileName);
+                OpenCSMFile(openFileDialog1.FileName);
                 //                 string zipToUnpack = "c:\\test\\1000.zip";
                 //                 string unpackDirectory = "c:\\test\\temp\\";
                 //


imageDirs default: images

imageDirs default: images

--- OpenKh.Command.MapGen/Models/MapGenConfig.cs
+++ OpenKh.Command.MapGen/Models/MapGenConfig.cs
@@ -21,7 +21,7 @@

         public float scale { get; set; } = 1;

-        public string[] imageDirs { get; set; }
+        public string[] imageDirs { get; set; } = new string[] { "images" };

         /// <summary>
         /// options for imgtool if needed


Comments added

Comments added

--- PART/Source/Core/Engine/AutoUpdate/Facade.cs
+++ PART/Source/Core/Engine/AutoUpdate/Facade.cs
@@ -53,6 +53,13 @@

 namespace CprBroker.Engine
 {
+    /// <summary>
+    /// This class represents one type/aspect of data that is returned from a data provider
+    /// This data is retrieves as one block from a data provider
+    /// More than one data provider can implement the needed methods, and the same provider can support more than one facade
+    /// But the point is that this data aspect is treated as independent unit that is moved across the broker
+    /// Examples could be CPR data, UUID data, GeoLocationData
+    /// </summary>
     public abstract class Facade
     {
         public abstract Type AutoUpdateType { get; }


ResetPassword wrong redirect (#2043)

ResetPassword wrong redirect (#2043)

Fixes #2042

--- src/OrchardCore.Modules/OrchardCore.Users/Controllers/ResetPasswordController.cs
+++ src/OrchardCore.Modules/OrchardCore.Users/Controllers/ResetPasswordController.cs
@@ -69,11 +69,11 @@
                 if (user == null || !(await _userManager.IsEmailConfirmedAsync(user)))
                 {
                     // returns to confirmation page anyway: we don't want to let scrapers know if a username or an email exist
-                    return RedirectToLocal(Url.Action("ForgotPasswordConfirmation", "Password"));
+                    return RedirectToLocal(Url.Action("ForgotPasswordConfirmation", "ResetPassword"));
                 }

                 user.ResetToken = Convert.ToBase64String(Encoding.UTF8.GetBytes(user.ResetToken));
-                var resetPasswordUrl = Url.Action("ResetPassword", "Password", new { code = user.ResetToken }, HttpContext.Request.Scheme);
+                var resetPasswordUrl = Url.Action("ResetPassword", "ResetPassword", new { code = user.ResetToken }, HttpContext.Request.Scheme);
                 // send email with callback link
                 await SendEmailAsync(user.Email, T["Reset your password"], new LostPasswordViewModel() { User = user, LostPasswordUrl = resetPasswordUrl }, "TemplateUserLostPassword");
             }


Add more logging to MessageSequenceBuilder

--- src/RawRabbit.Extensions/MessageSequence/Configuration/MessageSequenceBuilder.cs
+++ src/RawRabbit.Extensions/MessageSequence/Configuration/MessageSequenceBuilder.cs
@@ -52,7 +52,9 @@
 			_logger.LogDebug($"Registering handler for '{_globalMessageId}' of type '{typeof(TMessage).Name}'. Optional: {optionBuilder.Configuration.Optional}, Aborts: {optionBuilder.Configuration.AbortsExecution}");
 			_dispatcher.AddMessageHandler(_globalMessageId, func, optionBuilder.Configuration);
 			var bindTask = _chainTopology.BindToExchange<TMessage>(_globalMessageId);
+			bindTask.ConfigureAwait(false);
 			Task.WaitAll(bindTask);
+			_logger.LogDebug($"Sucessfully bound Sequence Queue for GlobalMessageId '{_globalMessageId}' of type '{typeof(TMessage).Name}.");
 			return this;
 		}


Clarify comment in 3-byte processing

Clarify comment in 3-byte processing

--- src/System.Private.CoreLib/shared/System/Text/Unicode/Utf8Utility.Transcoding.cs
+++ src/System.Private.CoreLib/shared/System/Text/Unicode/Utf8Utility.Transcoding.cs
@@ -506,8 +506,8 @@
                             if (outputCharsRemaining > 1 && (nint)(void*)Unsafe.ByteOffset(ref *pInputBuffer, ref *pFinalPosWhereCanReadDWordFromInputBuffer) >= 3)
                             {
                                 // We're going to attempt to read a second 3-byte sequence and write them both out simultaneously using PEXT.
-                                // Since we already validated the first byte of the second DWORD (it's the same as the final byte of the
-                                // first DWORD), the only checks that remain are the overlong + surrogate checks. If the overlong or surrogate
+                                // We need to check the continuation bit mask on the remaining two bytes (and we may as well check the leading
+                                // byte mask again since it's free), then perform overlong + surrogate checks. If the overlong or surrogate
                                 // checks fail, we'll fall through to the remainder of the logic which will transcode the original valid
                                 // 3-byte UTF-8 sequence we read; and on the next iteration of the loop the validation routine will run again,
                                 // fail, and redirect control flow to the error handling logic at the very end of this method.


Added comments and fixed border drawing bug

--- TheGiraffeGame/TheGiraffeGame/StartingPoint.cs
+++ TheGiraffeGame/TheGiraffeGame/StartingPoint.cs
@@ -19,18 +19,22 @@
                 case ConsoleKey.UpArrow:
                     if (GiraffesHeadVar.Row > 0)
                     {
-                        Screen[GiraffesHeadVar.Row, GiraffesHeadVar.Col+1] = emptySpace;
-                        Screen[GiraffesHeadVar.Row - 1, GiraffesHeadVar.Col+1] = giraffeHeadChar;
                         GiraffesHeadVar.Row--;
+                        Screen[GiraffesHeadVar.Row + 1, GiraffesHeadVar.Col] = emptySpace;//clearing heads last position if its next to a border
+                        Screen[GiraffesHeadVar.Row + 1, GiraffesHeadVar.Col + 1] = emptySpace;//clearing the heads last position
+                        Screen[GiraffesHeadVar.Row, GiraffesHeadVar.Col + 1] = giraffeHeadChar;
+
                     }
                     break;

                 case ConsoleKey.DownArrow:
                     if (GiraffesHeadVar.Row < rows - 1)
                     {
-                        Screen[GiraffesHeadVar.Row, GiraffesHeadVar.Col+1] = emptySpace;
-                        Screen[GiraffesHeadVar.Row + 1, GiraffesHeadVar.Col+1] = giraffeHeadChar;
                         GiraffesHeadVar.Row++;
+                        Screen[GiraffesHeadVar.Row - 1, GiraffesHeadVar.Col] = emptySpace;//clearing heads last position if its next to a border
+                        Screen[GiraffesHeadVar.Row - 1, GiraffesHeadVar.Col + 1] = emptySpace;//clearing heads last position
+                        Screen[GiraffesHeadVar.Row, GiraffesHeadVar.Col + 1] = giraffeHeadChar;
+
                     } break;
                 default:
                     break;
@@ -49,29 +53,29 @@

             for (int row = 0; row < rows; row++)
             {
-                char[] buffer = new char[rows];
-
-                for (int i = 0; i < columns-1; i++)
+                for (int i = 0; i < columns - 1; i++)
                 {
                     if (GiraffesHeadVar.Col == i)
                     {
-                        if (screen[GiraffesHeadVar.Row, GiraffesHeadVar.Col + 1]=='#') {//checks if the head of the giraffe is hit by a particle
+                        if (screen[GiraffesHeadVar.Row, GiraffesHeadVar.Col + 1] == '#')
+                        {//checks if the head of the giraffe is hit by a particle
                             isHit = true;
                             break;
                         }
                         screen[GiraffesHeadVar.Row, GiraffesHeadVar.Col] = emptySpace;
-                        screen[GiraffesHeadVar.Row, GiraffesHeadVar.Col+1] = giraffeHeadChar;
+                        screen[GiraffesHeadVar.Row, GiraffesHeadVar.Col + 1] = giraffeHeadChar;
                     }
-                    screen[row,i] = screen[row, i + 1];
+                    screen[row, i] = screen[row, i + 1];//shifting the array on every row one index left example: {0,1,2,3,4} becomes {1,2,3,4,4}
                 }
                 if (particleX == columns && particleY == row)
                 {
-                    screen[row, columns - 1] = particleChar;
+                    screen[row, columns - 1] = particleChar;//setting the last element of the shifted array to be a partlcle
                 }
-                else {
+                else
+                {
                     screen[row, columns - 1] = ' ';
                 }
-
+
             }
         }

@@ -109,7 +113,7 @@

             Screen[GiraffesHeadVar.Row, GiraffesHeadVar.Col] = '@';
             //lolo
-            while (true)
+            while (true)
             {
                 Console.Clear();
                 if (Console.KeyAvailable) // true if a key press is available in the input stream
@@ -124,13 +128,14 @@
                 }
                 PrintMatrix(Screen);
                 particleMove(Screen);
-                if (isHit) {
+                if (isHit)
+                {
                     Console.WriteLine("Game over");
                     break;
                 }
                 Thread.Sleep(250);
             }
-
+
         }

     }


Removed unused ctrl action which caused issues. Removed unsued repo from ctor args.

--- UI.MVC4/Controllers/API/ItProjectController.cs
+++ UI.MVC4/Controllers/API/ItProjectController.cs
@@ -17,14 +17,12 @@
         private readonly IItProjectService _itProjectService;
         private readonly IGenericRepository<TaskRef> _taskRepository;
         private readonly IGenericRepository<ItSystemUsage> _itSystemUsageRepository;
-        private readonly IGenericRepository<Organization> _orgRepository;
         private readonly IGenericRepository<OrganizationUnit> _orgUnitRepository;

-        public ItProjectController(IGenericRepository<ItProject> repository, IItProjectService itProjectService, IGenericRepository<Organization> orgRepository, IGenericRepository<OrganizationUnit> orgUnitRepository, IGenericRepository<TaskRef> taskRepository, IGenericRepository<ItSystemUsage> itSystemUsageRepository)
+        public ItProjectController(IGenericRepository<ItProject> repository, IItProjectService itProjectService, IGenericRepository<OrganizationUnit> orgUnitRepository, IGenericRepository<TaskRef> taskRepository, IGenericRepository<ItSystemUsage> itSystemUsageRepository)
             : base(repository)
         {
             _itProjectService = itProjectService;
-            _orgRepository = orgRepository;
             _taskRepository = taskRepository;
             _itSystemUsageRepository = itSystemUsageRepository;
             _orgUnitRepository = orgUnitRepository;
@@ -36,20 +34,6 @@
             {
                 var project = Repository.GetByKey(id);
                 return Ok(_itProjectService.HasWriteAccess(KitosUser, project));
-            }
-            catch (Exception e)
-            {
-                return Error(e);
-            }
-        }
-
-        public HttpResponseMessage GetPublic()
-        {
-            try
-            {
-                var projects = _itProjectService.GetAll();
-
-                return Ok(Map(projects));
             }
             catch (Exception e)
             {


撰寫String2CharArray方法

撰寫String2CharArray方法

撰寫String2CharArray方法

--- UartOscilloscope/CSharpFiles/DataProcessing.cs
+++ UartOscilloscope/CSharpFiles/DataProcessing.cs
@@ -3,14 +3,20 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows.Forms;                                                     //	使用System.Windows.Forms函式庫

-namespace UartOscilloscope
-{
-	public class DataProcessing
-	{
-		public char[] String2CharArray(string InputData)
-		{
-			return InputData.ToCharArray();
-		}
-	}
-}
+namespace UartOscilloscope                                                      //	UartOscilloscope命名空間
+{                                                                               //	進入命名空間
+	public class DataProcessing                                                 //	DataProcessing類別
+	{                                                                           //	進入DataProcessing類別
+		public char[] String2CharArray(string InputData)                        //	String2CharArray方法
+		{                                                                       //	進入String2CharArray方法
+			char[] OutputData = InputData.ToCharArray();                        //	宣告OutputData
+			foreach (char C in OutputData)
+			{
+				MessageBox.Show(C.ToString());
+			}
+			return OutputData;													//	回傳轉換結果
+		}                                                                       //	結束String2CharArray方法
+	}                                                                           //	結束DataProcessing類別
+}                                                                               //	結束命名空間


bump default texture size

bump default texture size

--- Voxalia/ClientGame/CommandSystem/ClientCVar.cs
+++ Voxalia/ClientGame/CommandSystem/ClientCVar.cs
@@ -88,7 +88,7 @@
             r_good_graphics = Register("r_good_graphics", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether to use 'good' graphics."); // TODO: Callback to auto-set
             r_skybox = Register("r_skybox", "default", CVarFlag.ServerControl | CVarFlag.Textual, "What skybox to use.");
             r_blocktexturelinear = Register("r_blocktexturelinear", "true", CVarFlag.Boolean | CVarFlag.Delayed, "Whether block textures are to use a linear blur or nearest-pixel mode.");
-            r_blocktexturewidth = Register("r_blocktexturewidth", "128", CVarFlag.Numeric | CVarFlag.Delayed, "What texture width (pixels) block textures should use.");
+            r_blocktexturewidth = Register("r_blocktexturewidth", "256", CVarFlag.Numeric | CVarFlag.Delayed, "What texture width (pixels) block textures should use.");
             r_toonify = Register("r_toonify", "false", CVarFlag.Boolean, "Whether to use a 'toonify' post-processing effect.");
             r_transplighting = Register("r_transplighting", "true", CVarFlag.Boolean, "Whether transparent objects should be lit properly (otherwise, fullbright).");
             r_transpshadows = Register("r_transpshadows", "false", CVarFlag.Boolean, "Whether transparent objects should be lit using HD shadows (Requires r_shadows true).");


1) Added OpenID relay code

1) Added OpenID relay code

--HG--
extra : convert_revision : svn%3A0c8f8e23-1b2a-6648-8c08-788e51663503/trunk%4042

--- Web/OpenID/Extensions/Interfaces/IExtension.cs
+++ Web/OpenID/Extensions/Interfaces/IExtension.cs
@@ -56,3 +56,4 @@
         #endregion
     }
 }
+


fix for centering text with RTL language

--- System.Drawing.Html/CssBox.cs
+++ System.Drawing.Html/CssBox.cs
@@ -3203,8 +3203,11 @@
 						case CssConstants.Right:
 							actualRect.Offset(0 - (InitialContainer.Bounds.Width - actualRect.Width), 0);
 							break;
-						/*case CssConstants.Center:
-						case CssConstants.Justify:*/
+						case CssConstants.Center:
+							if(Words.Count > 0)
+								actualRect.Offset(0 - actualRect.Width, 0);
+							break;
+						/*case CssConstants.Justify:*/
 						default:
 							actualRect.Offset(InitialContainer.Bounds.Width - actualRect.Width, 0);
 							break;


Update VS2012LightDockPaneStrip.cs

Update VS2012LightDockPaneStrip.cs

Fixed if conditions.

--- WinFormsUI/Docking/VS2012LightDockPaneStrip.cs
+++ WinFormsUI/Docking/VS2012LightDockPaneStrip.cs
@@ -1384,13 +1384,14 @@

             base.OnMouseHover(e);

-            bool needUpdate = false;
+            bool tabUpdate = false;
+            bool buttonUpdate = false;
             if (index != -1)
             {
                 var tab = Tabs[index] as TabVS2012Light;
                 if (Appearance == DockPane.AppearanceStyle.ToolWindow || Appearance == DockPane.AppearanceStyle.Document)
                 {
-                    needUpdate = SetMouseOverTab(tab.Content == DockPane.ActiveContent ? null : tab.Content);
+                    tabUpdate = SetMouseOverTab(tab.Content == DockPane.ActiveContent ? null : tab.Content);
                 }

                 if (!String.IsNullOrEmpty(tab.Content.DockHandler.ToolTipText))
@@ -1402,14 +1403,15 @@
                 var tabRect = GetTabRectangle(index);
                 var closeButtonRect = GetCloseButtonRect(tabRect);
                 var mouseRect = new Rectangle(mousePos, new Size(1, 1));
-                needUpdate = needUpdate || SetActiveClose(closeButtonRect.IntersectsWith(mouseRect) ? closeButtonRect : Rectangle.Empty);
-            }
-            else
-            {
-                needUpdate = SetMouseOverTab(null) || SetActiveClose(Rectangle.Empty);
-            }
-
-            if (needUpdate)
+                buttonUpdate = SetActiveClose(closeButtonRect.IntersectsWith(mouseRect) ? closeButtonRect : Rectangle.Empty);
+            }
+            else
+            {
+                tabUpdate = SetMouseOverTab(null);
+                buttonUpdate = SetActiveClose(Rectangle.Empty);
+            }
+
+            if (tabUpdate || buttonUpdate)
                 Invalidate();

             if (m_toolTip.GetToolTip(this) != toolTip)
@@ -1425,7 +1427,9 @@

         protected override void OnMouseLeave(EventArgs e)
         {
-            if (SetMouseOverTab(null) || SetActiveClose(Rectangle.Empty))
+            var tabUpdate = SetMouseOverTab(null);
+            var buttonUpdate = SetActiveClose(Rectangle.Empty);
+            if (tabUpdate || buttonUpdate)
                 Invalidate();

             base.OnMouseLeave(e);
@@ -1437,4 +1441,4 @@
             PerformLayout();
         }
     }
-}+}


Remapped keys.

Remapped keys.

--- TankDriver/TankDriver/Game.cs
+++ TankDriver/TankDriver/Game.cs
@@ -89,12 +89,12 @@
 			bool turning = false;
 			if (keyboardState.IsKeyDown(Keys.A))
 			{
-				_tank.TurnLeft();
+				_tank.TurnRight();
 				turning = true;
 			}
 			if (keyboardState.IsKeyDown(Keys.D))
 			{
-				_tank.TurnRight();
+				_tank.TurnLeft();
 				turning = !turning;
 			}
 			if (!turning)


ResourceManagerのリソース集

ResourceManagerのリソース集

--- WindowsDesktopView/Resource/ResourceManager.cs
+++ WindowsDesktopView/Resource/ResourceManager.cs
@@ -1,9 +1,12 @@
 using System;
+using System.Collections.Generic;

 namespace MifuminSoft.funyak.View.Resource
 {
     public class ResourceManager : IDisposable
     {
+        public Dictionary<string, ImageResource> Images { get; protected set; } = new Dictionary<string, ImageResource>();
+        public Dictionary<string, AudioResource> Audios { get; protected set; } = new Dictionary<string, AudioResource>();

         #region IDisposable Support
         private bool disposedValue = false; // 重複する呼び出しを検出するには


Typo in Message.ReplyToMessage

Typo in Message.ReplyToMessage

--- Telegram.Bot/Types/Message.cs
+++ Telegram.Bot/Types/Message.cs
@@ -52,7 +52,7 @@
         /// Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
         /// </summary>
         [JsonProperty(PropertyName = "reply_to_message", Required = Required.Default)]
-        public Message ReplayToMessage { get; internal set; }
+        public Message ReplyToMessage { get; internal set; }

         /// <summary>
         /// Optional. For text messages, the actual UTF-8 text of the message


Gauge colors.

Gauge colors.

--- XamlBrewer.Uwp.Squares/Views/GaugePage.xaml.cs
+++ XamlBrewer.Uwp.Squares/Views/GaugePage.xaml.cs
@@ -1,5 +1,7 @@
-using Windows.UI.Xaml;
+using Windows.UI;
+using Windows.UI.Xaml;
 using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Media;
 using WinRTXamlToolkit.Controls;
 using XamlBrewer.Uwp.Controls;

@@ -18,7 +20,11 @@
             foreach (var square in SquareOfSquares.Squares)
             {
                 var gauge = new Gauge() { Height = square.ActualHeight, Width = square.ActualWidth };
-                //grid.Background = new SolidColorBrush(square.RandomColor());
+                gauge.TrailBrush = new SolidColorBrush(square.RandomColor());
+                gauge.TickBrush = new SolidColorBrush(Colors.Transparent);
+                gauge.ScaleTickBrush = new SolidColorBrush(Colors.LemonChiffon);
+                gauge.NeedleBrush = new SolidColorBrush(Colors.OrangeRed);
+                gauge.Maximum = 50;
                 var side = square.Side();
                 gauge.Value = side;
                 square.Content = gauge;


- Added FSAA property for Anti-Aliased Render Textures, not used yet.

git-svn-id: ad71a101fa69fb252e58119732bf51384d5dbd95@1177 bb9bf1cf-960d-0410-9a3a-baeba60cf407

--- Projects/Axiom/Source/Engine/Core/Texture.cs
+++ Projects/Axiom/Source/Engine/Core/Texture.cs
@@ -561,6 +561,26 @@
 		}

 		#endregion
+
+		#region FSAA Property
+
+		///
+		private int _fsaa = 0;
+		///
+		/// <ogre name="getFSAA" />
+		public int FSAA
+		{
+			get
+			{
+				return _fsaa;
+			}
+			protected set
+			{
+				_fsaa = value;
+			}
+		}
+
+		#endregion FSAA Property

 		///
         ///    Specifies whether this texture is 32 bits or not.


Renamed a function here ...

Renamed a function here ...

The function name was not intuitive.. changed it

--- ProtoTest.Golem/Purple/PurpleCore/Locator.cs
+++ ProtoTest.Golem/Purple/PurpleCore/Locator.cs
@@ -78,7 +78,7 @@
             return ByPurplePath.GetChildren(presumedParent);
         }

-        public static string GetLocatorString(AutomationElement element)
+        public static string FindPurplePath(AutomationElement element)
         {
             return ByPurplePath.getPurplePath(element);
         }


Add comments

Add comments

--- src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/AbstractTypeImportCompletionService.CacheEntry.cs
+++ src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/AbstractTypeImportCompletionService.CacheEntry.cs
@@ -74,8 +74,9 @@
                         item = GetAppropriateAttributeItem(info.Item, isCaseSensitive);
                     }

-                    // A project with different language than when the cache entry was created for,
-                    // then we will change the generic suffix accordingly.
+                    // C# and VB the display text is different for generics, i.e. <T> and (Of T). For simpllicity, we only cache for one language.
+                    // But when we trigger in a project with different language than when the cache entry was created for, we will need to
+                    // change the generic suffix accordingly.
                     if (!isSameLanguage && info.IsGeneric)
                     {
                         // We don't want to cache this item.


added moar tests

added moar tests

--- test/ImTools.UnitTests/Experimental.ImMap234Tests.cs
+++ test/ImTools.UnitTests/Experimental.ImMap234Tests.cs
@@ -49,6 +49,29 @@
             Assert.IsInstanceOf<ImHashMap234<int, string>.Leaf2>(mr);
             Assert.AreEqual("a", mr.GetValueOrDefault(1));
             Assert.AreEqual("c", mr.GetValueOrDefault(3));
+
+            m = m.AddOrUpdate(4, "d");
+            Assert.IsInstanceOf<ImHashMap234<int, string>.Leaf4>(m);
+            Assert.AreEqual("c",  m.GetValueOrDefault(3));
+            Assert.AreEqual("b",  m.GetValueOrDefault(2));
+            Assert.AreEqual("a",  m.GetValueOrDefault(1));
+            Assert.AreEqual("d",  m.GetValueOrDefault(4));
+            Assert.AreEqual(null, m.GetValueOrDefault(10));
+
+            Assert.AreSame(m, m.AddOrKeep(3, "aa").AddOrKeep(2, "bb").AddOrKeep(1, "cc"));
+            Assert.AreSame(m, m.Remove(0));
+
+            m = m.AddOrUpdate(5, "e");
+            Assert.IsInstanceOf<ImHashMap234<int, string>.Leaf5>(m);
+            Assert.AreEqual("c",  m.GetValueOrDefault(3));
+            Assert.AreEqual("b",  m.GetValueOrDefault(2));
+            Assert.AreEqual("a",  m.GetValueOrDefault(1));
+            Assert.AreEqual("d",  m.GetValueOrDefault(4));
+            Assert.AreEqual("e",  m.GetValueOrDefault(5));
+            Assert.AreEqual(null, m.GetValueOrDefault(10));
+
+            Assert.AreSame(m, m.AddOrKeep(3, "aa").AddOrKeep(2, "bb").AddOrKeep(1, "cc"));
+            Assert.AreSame(m, m.Remove(0));
         }

         public class XKey<K>


Switch to Uri.TryCreate.

Switch to Uri.TryCreate.

--- src/VisualStudio/Core/Def/Implementation/ProjectSystem/MetadataReferences/VisualStudioFrameworkAssemblyPathResolverFactory.cs
+++ src/VisualStudio/Core/Def/Implementation/ProjectSystem/MetadataReferences/VisualStudioFrameworkAssemblyPathResolverFactory.cs
@@ -55,7 +55,11 @@
                             // Codebase specifies where the assembly is on disk.  However, it's in
                             // full URI format (i.e. file://c:/...). This will allow us to get the
                             // actual local in the normal path format.
-                            return new Uri(assembly.CodeBase).LocalPath;
+                            Uri uri;
+                            if (Uri.TryCreate(assembly.CodeBase, UriKind.RelativeOrAbsolute, out uri))
+                            {
+                                return uri.LocalPath;
+                            }
                         }
                         catch (InvalidOperationException)
                         {


Fix a few failure cases

Fix a few failure cases

--- osu.Framework/Graphics/Containers/TableContainer.cs
+++ osu.Framework/Graphics/Containers/TableContainer.cs
@@ -131,16 +131,18 @@
             }
         }

-        public override void InvalidateFromChild(Invalidation invalidation, Drawable source = null)
-        {
-            base.InvalidateFromChild(invalidation, source);
-
-            if ((invalidation & Invalidation.MiscGeometry) > 0)
-                updateAnchors();
-        }
-
         private int totalRows => content.GetLength(0) + (ShowHeaders ? 1 : 0);
-        private int totalColumns => content.GetLength(1);
+
+        private int totalColumns
+        {
+            get
+            {
+                if (columns == null || !showHeaders)
+                    return content.GetLength(1);
+
+                return Math.Max(columns.Length, content.GetLength(1));
+            }
+        }

         private void updateContent()
         {
@@ -163,20 +165,20 @@
         /// <returns>The content, with headers added if required.</returns>
         private Drawable[,] getContentWithHeaders()
         {
-            if (!ShowHeaders)
+            if (!ShowHeaders || Columns == null || Columns.Length == 0)
                 return content;

-            int rows = totalRows;
-            int cols = totalColumns;
-
-            var result = new Drawable[rows, cols];
-
-            for (int row = 0; row < rows; row++)
-            for (int col = 0; col < cols; col++)
+            int rowCount = totalRows;
+            int columnCount = totalColumns;
+
+            var result = new Drawable[rowCount, columnCount];
+
+            for (int row = 0; row < rowCount; row++)
+            for (int col = 0; col < columnCount; col++)
             {
                 if (row == 0)
-                    result[row, col] = CreateHeader(col, Columns?[col]);
-                else
+                    result[row, col] = CreateHeader(col, col >= Columns?.Length ? null : Columns?[col]);
+                else if (col < content.GetLength(1))
                     result[row, col] = content[row - 1, col];
             }

@@ -191,12 +193,12 @@
             if (grid.Content == null)
                 return;

-            int rows = totalRows;
-            int cols = totalColumns;
-
-            for (int row = 0; row < rows; row++)
-            {
-                for (int col = 0; col < cols; col++)
+            int rowCount = totalRows;
+            int columnCount = totalColumns;
+
+            for (int row = 0; row < rowCount; row++)
+            {
+                for (int col = 0; col < columnCount; col++)
                 {
                     if (col >= columns.Length)
                         break;


Fix crash due to init order

Fix crash due to init order

--- osu.Framework/Graphics/OpenGL/Textures/TextureGL.cs
+++ osu.Framework/Graphics/OpenGL/Textures/TextureGL.cs
@@ -63,9 +63,9 @@
         /// <param name="initialisationColour">The colour to initialise texture levels with (in the case of sub region initial uploads).</param>
         public TextureGL(OpenGLRenderer renderer, int width, int height, bool manualMipmaps = false, All filteringMode = All.Linear, Rgba32 initialisationColour = default)
         {
+            Renderer = renderer;
             Width = width;
             Height = height;
-            Renderer = renderer;
             this.manualMipmaps = manualMipmaps;
             this.filteringMode = filteringMode;
             this.initialisationColour = initialisationColour;


prevent null reference on KeyBindings

prevent null reference on KeyBindings

--- osu.Framework/Input/Bindings/KeyBindingContainer.cs
+++ osu.Framework/Input/Bindings/KeyBindingContainer.cs
@@ -122,7 +122,7 @@
                 pressedCombination = new KeyCombination(pressedCombination.Keys.Concat(new[] { newKey }));

             bool handled = false;
-            var bindings = repeat ? KeyBindings : KeyBindings.Except(pressedBindings);
+            var bindings = (repeat ? KeyBindings : KeyBindings?.Except(pressedBindings)) ?? Enumerable.Empty<KeyBinding>();
             var newlyPressed = bindings.Where(m =>
                 m.KeyCombination.Keys.Contains(newKey) // only handle bindings matching current key (not required for correct logic)
                 && m.KeyCombination.IsPressed(pressedCombination, simultaneousMode == SimultaneousBindingMode.NoneExact));


Use better initial value for closestEndTime

--- osu.Game.Rulesets.Mania/Difficulty/Skills/Strain.cs
+++ osu.Game.Rulesets.Mania/Difficulty/Skills/Strain.cs
@@ -37,7 +37,7 @@
             var maniaCurrent = (ManiaDifficultyHitObject)current;
             double endTime = maniaCurrent.EndTime;
             int column = maniaCurrent.BaseObject.Column;
-            double closestEndTime = 100;
+            double closestEndTime = endTime - maniaCurrent.LastObject.StartTime; // Lowest value we can assume with the current information

             double holdFactor = 1.0; // Factor to all additional strains in case something else is held
             double holdAddition = 0; // Addition to the current note in case it's a hold and has to be released awkwardly


CI Fixes

CI Fixes

--- osu.Game/Graphics/Containers/BeatSyncedContainer.cs
+++ osu.Game/Graphics/Containers/BeatSyncedContainer.cs
@@ -18,10 +18,6 @@
         private const int seek_tolerance = 20;
         private const double min_beat_length = 1E-100;

-        public BeatSyncedContainer()
-        {
-        }
-
         protected override void Update()
         {
             if (beatmap.Value != null)
@@ -33,23 +29,23 @@
                 if (controlPoint != null)
                 {
                     double oldTimingPointStart = timingPointStart;
-                    double beatLenght = double.MinValue;
+                    double beatLength;
                     int oldBeat = beat;
-                    bool kiai = false;
+                    bool kiai;

-                    beatLenght = controlPoint.BeatLength;
+                    beatLength = controlPoint.BeatLength;
                     timingPointStart = controlPoint.Time;
                     kiai = kiaiControlPoint?.KiaiMode ?? false;

-                    beat = beatLenght > min_beat_length ? (int)((currentTime - timingPointStart) / beatLenght) : 0;
+                    beat = beatLength > min_beat_length ? (int)((currentTime - timingPointStart) / beatLength) : 0;

                     //should we handle negative beats? (before the start of the controlPoint)
                     //The beats before the start of the first control point are off by 1, this should do the trick
                     if (currentTime <= timingPointStart)
                         beat--;

-                    if ((timingPointStart != oldTimingPointStart || beat != oldBeat) && (int)((currentTime - timingPointStart) % (beatLenght)) <= seek_tolerance)
-                        OnNewBeat(beat, controlPoint.BeatLength, controlPoint.TimeSignature, kiai);
+                    if ((timingPointStart != oldTimingPointStart || beat != oldBeat) && (currentTime - timingPointStart) % (beatLength) <= seek_tolerance)
+                        OnNewBeat(beat, beatLength, controlPoint.TimeSignature, kiai);
                 }
             }
         }


Change editor speed adjust to adjust frequency

--- osu.Game/Screens/Edit/Components/PlaybackControl.cs
+++ osu.Game/Screens/Edit/Components/PlaybackControl.cs
@@ -27,7 +27,7 @@
         [Resolved]
         private EditorClock editorClock { get; set; }

-        private readonly BindableNumber<double> tempo = new BindableDouble(1);
+        private readonly BindableNumber<double> freqAdjust = new BindableDouble(1);

         [BackgroundDependencyLoader]
         private void load()
@@ -58,16 +58,16 @@
                     RelativeSizeAxes = Axes.Both,
                     Height = 0.5f,
                     Padding = new MarginPadding { Left = 45 },
-                    Child = new PlaybackTabControl { Current = tempo },
+                    Child = new PlaybackTabControl { Current = freqAdjust },
                 }
             };

-            Track.BindValueChanged(tr => tr.NewValue?.AddAdjustment(AdjustableProperty.Tempo, tempo), true);
+            Track.BindValueChanged(tr => tr.NewValue?.AddAdjustment(AdjustableProperty.Frequency, freqAdjust), true);
         }

         protected override void Dispose(bool isDisposing)
         {
-            Track.Value?.RemoveAdjustment(AdjustableProperty.Tempo, tempo);
+            Track.Value?.RemoveAdjustment(AdjustableProperty.Frequency, freqAdjust);

             base.Dispose(isDisposing);
         }
@@ -101,7 +101,7 @@

         private class PlaybackTabControl : OsuTabControl<double>
         {
-            private static readonly double[] tempo_values = { 0.5, 0.75, 1 };
+            private static readonly double[] tempo_values = { 0.25, 0.5, 0.75, 1 };

             protected override TabItem<double> CreateTabItem(double value) => new PlaybackTabItem(value);


Added Clone hooks for EntityInfo subclasses

--- patches/tModLoader/Terraria.ModLoader/EntityInfo.cs
+++ patches/tModLoader/Terraria.ModLoader/EntityInfo.cs
@@ -24,7 +24,7 @@

 	public class ItemInfo : EntityInfo
 	{
-		internal ItemInfo Clone()
+		public virtual ItemInfo Clone()
 		{
 			return (ItemInfo)MemberwiseClone();
 		}
@@ -32,7 +32,7 @@

 	public class ProjectileInfo : EntityInfo
 	{
-		internal ProjectileInfo Clone()
+		public virtual ProjectileInfo Clone()
 		{
 			return (ProjectileInfo)MemberwiseClone();
 		}
@@ -40,7 +40,7 @@

 	public class NPCInfo : EntityInfo
 	{
-		internal NPCInfo Clone()
+		public virtual NPCInfo Clone()
 		{
 			return (NPCInfo)MemberwiseClone();
 		}


Fix opening context menus for world entities.

--- Content.Client/GameObjects/EntitySystems/VerbSystem.cs
+++ Content.Client/GameObjects/EntitySystems/VerbSystem.cs
@@ -107,7 +107,7 @@
                 button.OnPressed += _ => OnContextButtonPressed(entity);
             }

-            _currentPopup.UserInterfaceManager.StateRoot.AddChild(_currentPopup);
+            _currentPopup.UserInterfaceManager.ModalRoot.AddChild(_currentPopup);

             var size = _currentPopup.List.CombinedMinimumSize;
             var box = UIBox2.FromDimensions(args.ScreenCoordinates.Position, size);
@@ -197,16 +197,6 @@
                 var panel = new PanelContainer();
                 panel.AddChild(new Label {Text = "No verbs!"});
                 vBox.AddChild(panel);
-            }
-
-            //_currentPopup.Size = vBox.CombinedMinimumSize;
-
-            // If we're at the bottom of the window and the menu would go below the bottom of the window,
-            // shift it up so it extends UP.
-            var bottomCoords = vBox.CombinedMinimumSize.Y + _currentPopup.Position.Y;
-            if (bottomCoords > _userInterfaceManager.StateRoot.Size.Y)
-            {
-               // _currentPopup.Position = _currentPopup.Position - new Vector2(0, vBox.CombinedMinimumSize.Y);
             }
         }


Doors no longer have murderous intent (#4799)

--- Content.Server/Doors/Components/ServerDoorComponent.cs
+++ Content.Server/Doors/Components/ServerDoorComponent.cs
@@ -446,7 +446,8 @@
                 // Use this version so we can ignore the CanCollide being false
                 foreach(var e in broadPhaseSystem.GetCollidingEntities(physicsComponent.Owner.Transform.MapID, physicsComponent.GetWorldAABB()))
                 {
-                    if ((physicsComponent.CollisionMask & e.CollisionLayer) != 0 && broadPhaseSystem.IntersectionPercent(physicsComponent, e) > 0.01f) return true;
+                    if (((physicsComponent.CollisionMask & e.CollisionLayer) | (e.CollisionMask & physicsComponent.CollisionLayer)) != 0
+                        && broadPhaseSystem.IntersectionPercent(physicsComponent, e) > 0.01f) return true;
                 }
             }
             return false;


Some small optimizations

Some small optimizations

--- Core/OfficeDevPnP.Core/Framework/TimerJobs/TimerJob.cs
+++ Core/OfficeDevPnP.Core/Framework/TimerJobs/TimerJob.cs
@@ -12,6 +12,7 @@
 using OfficeDevPnP.Core.Framework.TimerJobs.Utilities;
 using OfficeDevPnP.Core.Diagnostics;
 using System.Security.Cryptography.X509Certificates;
+using System.Globalization;

 namespace OfficeDevPnP.Core.Framework.TimerJobs
 {
@@ -345,7 +346,7 @@

             // Instantiate the needed ClientContext objects
             ClientContext ccWeb = CreateClientContext(site);
-            ClientContext ccSite = null;
+            ClientContext ccSite;

             if (rootSite.Equals(site, StringComparison.InvariantCultureIgnoreCase))
             {
@@ -1164,14 +1165,11 @@
                 throw new ArgumentNullException(nameof(site));
             }

-            site = site.ToLower();
-
-            if (!site.Contains("*"))
-            {
-                if (!IsValidUrl(site))
-                {
-                    throw new ArgumentException(string.Format(CoreResources.TimerJob_AddSite_InvalidUrl, site), nameof(site));
-                }
+            site = site.ToLower(CultureInfo.InvariantCulture);
+
+            if (!site.Contains("*") && !IsValidUrl(site))
+            {
+                throw new ArgumentException(string.Format(CoreResources.TimerJob_AddSite_InvalidUrl, site), nameof(site));
             }

             if (!requestedSites.Contains(site))
@@ -1452,7 +1450,7 @@
             }
             else
             {
-                ClientContext ccEnumerate = null;
+                ClientContext ccEnumerate;
                 //Good, we can use search for user profile and tenant API enumeration for regular sites
 #if !ONPREMISES
                 if (AuthenticationType == AuthenticationType.AppOnly)


Postgres BulkRead fix

Postgres BulkRead fix

--- EFCore.BulkExtensions/SQLAdapters/PostgreSql/SqlQueryBuilderPostgreSql.cs
+++ EFCore.BulkExtensions/SQLAdapters/PostgreSql/SqlQueryBuilderPostgreSql.cs
@@ -45,13 +45,13 @@
             string q;
             if (operationType == OperationType.Read)
             {
-                var readByColumns = SqlQueryBuilder.GetCommaSeparatedColumns(tableInfo.PrimaryKeysPropertyColumnNameDict.Values.ToList(), tableInfo.FullTableName, tableInfo.FullTempTableName);
+                var readByColumns = SqlQueryBuilder.GetCommaSeparatedColumns(tableInfo.PrimaryKeysPropertyColumnNameDict.Values.ToList()); //, tableInfo.FullTableName, tableInfo.FullTempTableName

                 q = $"SELECT {tableInfo.FullTableName}.* FROM {tableInfo.FullTableName} " +
                     $"JOIN {tableInfo.FullTempTableName} " +
                     $"USING ({readByColumns})"; //$"ON ({tableInfo.FullTableName}.readByColumns = {tableInfo.FullTempTableName}.readByColumns);";
             }
-            if (operationType == OperationType.Delete)
+            else if(operationType == OperationType.Delete)
             {
                 var deleteByColumns = SqlQueryBuilder.GetCommaSeparatedColumns(tableInfo.PrimaryKeysPropertyColumnNameDict.Values.ToList(), tableInfo.FullTableName, tableInfo.FullTempTableName);
                 deleteByColumns = deleteByColumns.Replace("[", @"""").Replace("]", @"""");


Refactor

Refactor

--- MineField/MineSweeperTest.cs
+++ MineField/MineSweeperTest.cs
@@ -99,7 +99,7 @@
             {
                 for (var j = 0; j < m_HasMine.GetLength(0); ++j)
                 {
-                    result += m_HasMine[j,i] != '*' ? SurroundingMines(j,i).ToString() : "*";
+                    result += IsNotMine(j, i) ? SurroundingMines(j,i).ToString() : "*";
                 }
                 result += "\n";
             }
@@ -107,7 +107,12 @@
             return result;
         }

-        private int SurroundingMines(int i, int i1)
+        private bool IsNotMine(int j, int i)
+        {
+            return m_HasMine[j,i] != '*';
+        }
+
+        private int SurroundingMines(int x, int y)
         {
             return 0;
         }


a method 64 bits long should have a fat header, patch by Rolf Bjarne Kvinge

--- Mono.Cecil.Cil/CodeWriter.cs
+++ Mono.Cecil.Cil/CodeWriter.cs
@@ -283,7 +283,7 @@
 		bool RequiresFatHeader ()
 		{
 			var body = this.body;
-			return body.CodeSize > 64
+			return body.CodeSize >= 64
 				|| body.InitLocals
 				|| body.HasVariables
 				|| body.HasExceptionHandlers


Added to NBi.NUNit the registration to build a test for evaluation of rows

--- NBi.NUnit/TestCaseFactory.cs
+++ NBi.NUnit/TestCaseFactory.cs
@@ -27,6 +27,7 @@
 			Register (typeof(ExecutionXml), typeof(SyntacticallyCorrectXml),new ExecutionSyntacticallyCorrectBuilder());
 			Register (typeof(ExecutionXml), typeof(EqualToXml),new ExecutionEqualToBuilder());
 			Register(typeof(ExecutionXml), typeof(MatchPatternXml), new ExecutionMatchPatternBuilder());
+            Register(typeof(ExecutionXml), typeof(EvaluateRowsXml), new ExecutionEvaluateRowsBuilder());

 			Register (typeof(MembersXml), typeof(CountXml) ,new MembersCountBuilder());
 			Register(typeof(MembersXml), typeof(OrderedXml), new MembersOrderedBuilder());


Bump version for new logging output.

Bump version for new logging output.

--- agent/Common/Properties/VersionInfo.cs
+++ agent/Common/Properties/VersionInfo.cs
@@ -41,5 +41,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("3.2.0.0")]
-[assembly: AssemblyFileVersion("3.2.0.0")]
+[assembly: AssemblyVersion("3.2.0.1")]
+[assembly: AssemblyFileVersion("3.2.0.1")]


Removido atributo da classe response

Removido atributo da classe response

--- TopGearApi/Models/Response.cs
+++ TopGearApi/Models/Response.cs
@@ -8,7 +8,6 @@
     public class Response<T>
     {
         public bool Sucesso { get; set; }
-        private bool HasDados { get => Dados != null; }

         public T Dados { get; set; }
     }


사전 주소 수정

사전 주소 수정

--- TranslationAssistant/Form1.cs
+++ TranslationAssistant/Form1.cs
@@ -147,7 +147,7 @@
 			// 선택된 내용을 네이버 일본어 사전으로 검색
 			try
 			{
-				webBrowser.Navigate("https://ja.dict.naver.com/search.nhn?range=all&q=" + Uri.EscapeDataString(richTextBox.SelectedText) + "&sm=jpd_hty");
+				webBrowser.Navigate("https://ja.dict.naver.com/#/search?query=" + Uri.EscapeDataString(richTextBox.SelectedText));
 			}
 			catch
 			{
@@ -183,7 +183,7 @@
 			// 오른쪽 클릭한 라인을 네이버 일본어 사전으로 검색
 			try
 			{
-				webBrowser.Navigate("https://ja.dict.naver.com/search.nhn?range=all&q=" + Uri.EscapeDataString(richTextBox.Lines[clickedLineNumber - 1]) + "&sm=jpd_hty");
+				webBrowser.Navigate("https://ja.dict.naver.com/#/search?query=" + Uri.EscapeDataString(richTextBox.Lines[clickedLineNumber - 1]));
 			}
 			catch
 			{
@@ -494,6 +494,7 @@
 			WebBrowser webBrowser = (WebBrowser)sender;

 			// 네이버 일본어 사전 검색인 경우에는 번역 결과가 보이도록 무조건 페이지 맨 아래로 스크롤하고, 엔터만 누르면 다음 문장이 검색될 수 있도록 buttonNext에 포커스를 설정한다.
+			// 현재 주소가 바뀌어서 정상적으로 동작하지 않는다.
 			if (webBrowser.Url.ToString().StartsWith("https://ja.dict.naver.com/search.nhn?range=all&q=") && webBrowser.Url.ToString().EndsWith("&sm=jpd_hty"))
 			{
 				webBrowser.Document.Body.ScrollIntoView(false);
@@ -522,7 +523,7 @@

 			try
 			{
-				webBrowser.Navigate("https://ja.dict.naver.com/search.nhn?range=all&q=" + Uri.EscapeDataString(richTextBox.Lines[lineNumber - 1]) + "&sm=jpd_hty");
+				webBrowser.Navigate("https://ja.dict.naver.com/#/search?query=" + Uri.EscapeDataString(richTextBox.Lines[lineNumber - 1]));
 			}
 			catch
 			{


Sorted list to bst

Sorted list to bst

--- LeetCode/remote/sorted_list_to_bst_two.cs
+++ LeetCode/remote/sorted_list_to_bst_two.cs
@@ -64,3 +64,44 @@
         return result;
     }
 }
+
+//
+//  Submission Details
+//  32 / 32 test cases passed.
+//      Status: Accepted
+//      Runtime: 172 ms
+//
+//          Submitted: 0 minutes ago
+//
+//  https://leetcode.com/submissions/detail/53532814/
+//
+//  Bullshit! This should be way faster complexity-wise. I would blame the OJ.
+public class Solution {
+    public TreeNode SortedListToBST(ListNode head) {
+        var length = 0;
+        for (var it = head; it != null; it = it.next)
+        {
+            length++;
+        }
+
+        return SortedListToBST(ref head, 0, length - 1);
+    }
+
+    public TreeNode SortedListToBST(ref ListNode head, int low, int high)
+    {
+        if (low > high)
+        {
+            return null;
+        }
+
+        var mid = low + (high - low) / 2;
+        var left = SortedListToBST(ref head, low, mid - 1);
+        var val = head.val;
+        head = head.next;
+        var right = SortedListToBST(ref head, mid + 1, high);
+        return new TreeNode(val) {
+            left = left,
+            right = right
+        };
+    }
+}


fixed nms endpoint

fixed nms endpoint

--- MassTransit.ServiceBus.NMS/NmsEndpoint.cs
+++ MassTransit.ServiceBus.NMS/NmsEndpoint.cs
@@ -116,7 +116,13 @@
 			throw new NotImplementedException();
 		}

-		public void Dispose()
+
+	    public void Subscribe(IEnvelopeConsumer consumer)
+	    {
+	        Receiver.Subscribe(consumer);
+	    }
+
+	    public void Dispose()
 		{
 			if (_receiver != null)
 				_receiver.Dispose();


Removing xml test.

Removing xml test.

--- UnitTestProject1/UnitTest1.cs
+++ UnitTestProject1/UnitTest1.cs
@@ -232,21 +232,6 @@
         }

         [TestMethod]
-        public void TestXml()
-        {
-            var cwd = Directory.GetCurrentDirectory();
-            string input = System.IO.File.ReadAllText("../../../../AntlrTreeEditing/XmlDOM/test.xml");
-            var res = XmlDOM.Parse.Try(input);
-            var dynamicContext = XmlDOM.ConvertToDOM.Try(res.Item1, res.Item2);
-            org.eclipse.wst.xml.xpath2.processor.Engine engine = new org.eclipse.wst.xml.xpath2.processor.Engine();
-            var dom_literals = engine.parseExpression(
-                    @"/root/actors/actor",
-                    new StaticContextBuilder()).evaluate(dynamicContext, new object[] { dynamicContext.Document })
-                .Select(x => (x.NativeValue)).ToArray();
-            if (dom_literals.Length != 3) throw new Exception();
-        }
-
-        [TestMethod]
         public void TestXml2()
         {
             // see https://stackoverflow.com/questions/62973860/how-to-xpath-text-greater-than-number-1/62975324#62975324


Writes filename to plugin temp ust.

Writes filename to plugin temp ust.

--- OpenUtau.Core/Classic/Ust.cs
+++ OpenUtau.Core/Classic/Ust.cs
@@ -471,7 +471,7 @@
                         WriteNoteBody(project, track, spacer, writer);
                     }
                     writer.WriteLine($"[#{sequence.Count:D4}]");
-                    WriteNoteBody(project, track, note, writer);
+                    WriteNoteBody(project, track, note, writer, forPlugin: true);
                     position = note.End;
                     sequence.Add(note);
                     note = note.Next;
@@ -503,19 +503,24 @@
             writer.WriteLine("[#TRACKEND]");
         }

-        static void WriteNoteBody(UProject project, UTrack track, UNote note, StreamWriter writer) {
+        static void WriteNoteBody(UProject project, UTrack track, UNote note, StreamWriter writer, bool forPlugin = false) {
             writer.WriteLine($"Length={note.duration}");
             writer.WriteLine($"Lyric={note.lyric}");
             writer.WriteLine($"NoteNum={note.tone}");
             writer.WriteLine("PreUtterance=");
             //writer.WriteLine("VoiceOverlap=");
             if (note.phonemes.Count > 0) {
-                var vel = note.phonemes[0].GetExpression(project, track, "vel").Item1;
+                var phoneme = note.phonemes[0];
+                var vel = phoneme.GetExpression(project, track, "vel").Item1;
                 writer.WriteLine($"Velocity={(int)vel}");
-                var vol = note.phonemes[0].GetExpression(project, track, "vol").Item1;
+                var vol = phoneme.GetExpression(project, track, "vol").Item1;
                 writer.WriteLine($"Intensity={(int)vol}");
-                var mod = note.phonemes[0].GetExpression(project, track, "mod").Item1;
+                var mod = phoneme.GetExpression(project, track, "mod").Item1;
                 writer.WriteLine($"Moduration={(int)mod}");
+                if (forPlugin && !string.IsNullOrEmpty(phoneme.oto.DisplayFile)) {
+                    writer.WriteLine($"@filename={phoneme.oto.DisplayFile}");
+                    writer.WriteLine($"@alias={phoneme.oto.Alias}");
+                }
             }
             WriteEnvelope(note, writer);
             WritePitch(note, writer);


Revert unneeded changes

Revert unneeded changes

--- Visa/Visa.WinForms/Program.cs
+++ Visa/Visa.WinForms/Program.cs
@@ -34,12 +34,12 @@
             CultureInfo.DefaultThreadCurrentCulture = culture;
             CultureInfo.DefaultThreadCurrentUICulture = culture;

-            //Application.ThreadException += Application_ThreadException;
+            Application.ThreadException += Application_ThreadException;

             // Set the unhandled exception mode to force all Windows Forms
             // errors to go through our handler.
-            //Application.SetUnhandledExceptionMode(
-            //    UnhandledExceptionMode.CatchException);
+            Application.SetUnhandledExceptionMode(
+                UnhandledExceptionMode.CatchException);

             Application.Run(new MainFormNew());
         }


Update SiteLockState enum

Update SiteLockState enum

Add ReadOnly option for SiteLockState enum as it is supported for SPO now.

--- Core/OfficeDevPnP.Core/Enums/TenantEnums.cs
+++ Core/OfficeDevPnP.Core/Enums/TenantEnums.cs
@@ -1,7 +1,8 @@
 namespace OfficeDevPnP.Core {
     public enum SiteLockState {
         Unlock,
-        NoAccess
+        NoAccess,
+        ReadOnly
     }

     public enum TenantOperationMessage


maybe make the weather not so off

maybe make the weather not so off

--- Coremero/Coremero.Plugin.Weather/Weather.cs
+++ Coremero/Coremero.Plugin.Weather/Weather.cs
@@ -226,7 +226,7 @@
                         Text = info.Address,
                         Font = mdFont,
                         X = 150,
-                        Y = -5,
+                        Y = 0,
                         Color = WeatherColors.White
                     },
                     new DrawCommand()
@@ -248,7 +248,7 @@
                         Y = 25,
                         Color = WeatherColors.White
                     },
-                    new DrawCommand() {Text = tickerLine, Font = mdFont, X = 5, Y = 475, Color = WeatherColors.White},
+                    new DrawCommand() {Text = tickerLine, Font = mdFont, X = 5, Y = 480, Color = WeatherColors.White},
                 };

                 int bx = 15, by = 90;


Made SecureMimeContext.GetPreferredEncryptionAlgorithm() protected virtual instead of private

Addresses issue #44 - thanks to mahet for proposing this change and sending a Pull Request

--- MimeKit/Cryptography/SecureMimeContext.cs
+++ MimeKit/Cryptography/SecureMimeContext.cs
@@ -61,7 +61,7 @@

 		static SecureMimeContext ()
 		{
-			DefaultEncryptionAlgorithmRank = new EncryptionAlgorithm[] {
+			DefaultEncryptionAlgorithmRank = new [] {
 				EncryptionAlgorithm.Camellia256,
 				EncryptionAlgorithm.Aes256,
 				EncryptionAlgorithm.Camellia192,
@@ -160,7 +160,7 @@
 			if (protocol == null)
 				throw new ArgumentNullException ("protocol");

-			var type = protocol.ToLowerInvariant ().Split (new char[] { '/' });
+			var type = protocol.ToLowerInvariant ().Split (new [] { '/' });
 			if (type.Length != 2 || type[0] != "application")
 				return false;

@@ -922,7 +922,7 @@

 				if (certificate != null) {
 					signature.SignerCertificate = new SecureMimeDigitalCertificate (certificate);
-					if (algorithms.Count > 0 && signedDate.HasValue)
+					if (algorithms.Count > 0 && signedDate != null)
 						UpdateSecureMimeCapabilities (certificate, signature.EncryptionAlgorithms, signedDate.Value);
 				}

@@ -1010,7 +1010,19 @@
 			#endregion
 		}

-		EncryptionAlgorithm GetPreferredEncryptionAlgorithm (CmsRecipientCollection recipients)
+		/// <summary>
+		/// Gets the preferred encryption algorithm to use for encrypting to the specified recipients.
+		/// </summary>
+		/// <remarks>
+		/// <para>Gets the preferred encryption algorithm to use for encrypting to the specified recipients
+		/// based on the encryption algorithms supported by each of the recipients, the
+		/// <see cref="EnabledEncryptionAlgorithms"/>, and the <see cref="EncryptionAlgorithmRank"/>.</para>
+		/// <para>If the supported encryption algorithms are unknown for any recipient, it is assumed that
+		/// the recipient supports at least the Triple-DES encryption algorithm.</para>
+		/// </remarks>
+		/// <returns>The preferred encryption algorithm.</returns>
+		/// <param name="recipients">The recipients.</param>
+		protected virtual EncryptionAlgorithm GetPreferredEncryptionAlgorithm (CmsRecipientCollection recipients)
 		{
 			var votes = new int[EncryptionAlgorithmCount];


--- CsvEditSharp/Models/CsvConfigFileManager.cs
+++ CsvEditSharp/Models/CsvConfigFileManager.cs
@@ -77,7 +77,7 @@
             if (SettingsList.Skip(1).Contains(templateName))
             {
                 var templateFilePath = Path.Combine(ConfigFileDirectory, templateName + ".config.csx");
-                if(File.Exists(templateFilePath)) { return $"Error! {templateFilePath} is not found."; }
+                if(!File.Exists(templateFilePath)) { return $"Error! \"{templateFilePath}\" is not found."; }
                 var configText = File.ReadAllText(templateFilePath, Encoding.UTF8);
                 CurrentConfigFilePath = templateFilePath;
                 return configText;


Additional wee bit o fixins.

Additional wee bit o fixins.

--- Demos/SpecializedTests/CapsuleRayTesting.cs
+++ Demos/SpecializedTests/CapsuleRayTesting.cs
@@ -17,7 +17,7 @@
             const float sizeSpan = 200;
             shape = new Capsule(sizeMin + sizeSpan * (float)random.NextDouble(), sizeMin * sizeSpan * (float)random.NextDouble());
         }
-        static void GetPointInVolume(Random random, ref Capsule capsule, out Vector3 pointInCapsule)
+        static void GetPointInVolume(Random random, ref Capsule capsule, out Vector3 localPointInCapsule)
         {
             float distanceSquared;
             float radiusSquared = capsule.Radius * capsule.Radius;
@@ -26,39 +26,46 @@
             min = -min;
             do
             {
-                pointInCapsule = min + span * new Vector3((float)random.NextDouble(), (float)random.NextDouble(), (float)random.NextDouble());
-                var projectedCandidate = new Vector3(0, Math.Max(-capsule.HalfLength, Math.Min(capsule.HalfLength, pointInCapsule.Y)), 0);
-                distanceSquared = Vector3.DistanceSquared(projectedCandidate, pointInCapsule);
+                localPointInCapsule = min + span * new Vector3((float)random.NextDouble(), (float)random.NextDouble(), (float)random.NextDouble());
+                var projectedCandidate = new Vector3(0, Math.Max(-capsule.HalfLength, Math.Min(capsule.HalfLength, localPointInCapsule.Y)), 0);
+                distanceSquared = Vector3.DistanceSquared(projectedCandidate, localPointInCapsule);

             } while (distanceSquared > radiusSquared);
         }

-        static void GetSurface(Random random, ref Capsule capsule, out Vector3 pointOnCapsule, out Vector3 normal)
+        static void GetSurface(Random random, ref Capsule capsule, out Vector3 localPointOnCapsule, out Vector3 localNormal)
         {
             float distanceSquared;
             float radiusSquared = capsule.Radius * capsule.Radius;
             var min = new Vector3(capsule.Radius, capsule.Radius + capsule.HalfLength, capsule.Radius);
             var span = min * 2;
+            Vector3 offset, projectedCandidate;
             min = -min;
             do
             {
-                pointOnCapsule = min + span * new Vector3((float)random.NextDouble(), (float)random.NextDouble(), (float)random.NextDouble());
-                var projectedCandidate = new Vector3(0, Math.Max(-capsule.HalfLength, Math.Min(capsule.HalfLength, pointOnCapsule.Y)), 0);
-                distanceSquared = Vector3.DistanceSquared(projectedCandidate, pointOnCapsule);
+                localPointOnCapsule = min + span * new Vector3((float)random.NextDouble(), (float)random.NextDouble(), (float)random.NextDouble());
+                projectedCandidate = new Vector3(0, Math.Max(-capsule.HalfLength, Math.Min(capsule.HalfLength, localPointOnCapsule.Y)), 0);
+                offset = localPointOnCapsule - projectedCandidate;
+                distanceSquared = offset.LengthSquared();

             } while (distanceSquared < 1e-7f);
-            normal = pointOnCapsule / (float)Math.Sqrt(distanceSquared);
-            pointOnCapsule = normal * capsule.Radius;
-        }
-
-        static bool PointIsOnSurface(ref Capsule capsule, ref Vector3 point)
-        {
-            var projected = MathHelper.Clamp(point.Y, -capsule.HalfLength, capsule.HalfLength);
-            var squaredDistanceFromSurface = Vector3.DistanceSquared(point, new Vector3(0, projected, 0)) - capsule.Radius * capsule.Radius;
+            localNormal = offset / (float)Math.Sqrt(distanceSquared);
+            localPointOnCapsule = projectedCandidate + localNormal * capsule.Radius;
+        }
+
+        static bool PointIsOnSurface(ref Capsule capsule, ref Vector3 localPoint)
+        {
+            var projected = MathHelper.Clamp(localPoint.Y, -capsule.HalfLength, capsule.HalfLength);
+            var squaredDistanceFromSurface = Vector3.DistanceSquared(localPoint, new Vector3(0, projected, 0)) - capsule.Radius * capsule.Radius;
             if (squaredDistanceFromSurface < 0)
                 squaredDistanceFromSurface = -squaredDistanceFromSurface;
             float threshold = capsule.Radius * 1e-3f;
             return squaredDistanceFromSurface < threshold * threshold;
+        }
+
+        static float GetDistance(ref Capsule capsule, ref Vector3 localPoint)
+        {
+            return Vector3.Distance(localPoint, new Vector3(0, MathHelper.Clamp(localPoint.Y, -capsule.HalfLength, capsule.HalfLength), 0));
         }

         static void GetUnitDirection(Random random, out Vector3 direction)
@@ -89,14 +96,24 @@
         }
         static void GetPointOnPlane(Random random, float centralExclusion, float span, ref Vector3 anchor, ref Vector3 normal, out Vector3 point)
         {
-            Matrix3x3.CreateFromAxisAngle(ref normal, (float)random.NextDouble() * MathHelper.TwoPi, out var basis);
+
             Vector2 localPoint;
             var exclusionSquared = centralExclusion * centralExclusion;
             do
             {
                 localPoint = span * (new Vector2((float)random.NextDouble(), (float)random.NextDouble()) * new Vector2(0.5f) - new Vector2(0.5f));
             } while (localPoint.LengthSquared() < exclusionSquared);
-            point = anchor + basis.X * localPoint.X + basis.Z * localPoint.Y;
+
+            Vector3 basisX;
+            float basisXLengthSquared;
+            do
+            {
+                GetUnitDirection(random, out var randomDirection);
+                Vector3x.Cross(ref normal, ref randomDirection, out basisX);
+                basisXLengthSquared = basisX.LengthSquared();
+            } while (basisXLengthSquared < 1e-7f);
+            Vector3x.Cross(ref normal, ref basisX, out var basisZ);
+            point = anchor + basisX * localPoint.X + basisZ * localPoint.Y;
         }

@@ -190,16 +207,17 @@
                     for (int rayIndex = 0; rayIndex < outsideRays; ++rayIndex)
                     {
                         //Create a ray that lies on one of the shape's tangent planes, offset from the surface some amount to avoid numerical limitations.
-                        GetSurface(random, ref shape, out var pointOnSurface, out var normal);
-                        var localTargetPoint = pointOnSurface + normal * (tangentMinimumDistance + (float)random.NextDouble() * tangentDistanceSpan);
+                        GetSurface(random, ref shape, out var pointOnSurface, out var localNormal);
+                        var localTargetPoint = pointOnSurface + localNormal * (tangentMinimumDistance + (float)random.NextDouble() * tangentDistanceSpan);
                         var exclusion = tangentCentralExclusionMin + (float)random.NextDouble() * tangentCentralExclusionSpan;
                         var span = exclusion + tangentSourceSpanMin + tangentSourceSpanSpan * (float)random.NextDouble();
-                        GetPointOnPlane(random, exclusion, span, ref localTargetPoint, ref normal, out var localSourcePoint);
+                        GetPointOnPlane(random, exclusion, span, ref localTargetPoint, ref localNormal, out var localSourcePoint);
                         var directionScale = (0.01f + 2 * (float)random.NextDouble());
                         var localDirection = (localTargetPoint - localSourcePoint) * directionScale;
                         Matrix3x3.Transform(ref localSourcePoint, ref orientation, out var sourcePoint);
                         sourcePoint += pose.Position;
                         Matrix3x3.Transform(ref localDirection, ref orientation, out var direction);
+
                         if (shape.RayTest(ref pose, ref sourcePoint, ref direction, out var t, out var rayTestedNormal))
                         {
                             Console.WriteLine($"Outside ray incorrectly detected an impact.");


Fixed columns bug

Fixed columns bug

--- Mvc.JQuery.Datatables/DataTablesHelper.cs
+++ Mvc.JQuery.Datatables/DataTablesHelper.cs
@@ -12,7 +12,7 @@

         public static MvcHtmlString DataTable<TController, TResult>(this HtmlHelper html, string id, Expression<Func<TController, IDataTablesResult<TResult>>> exp, params string[] columns)
         {
-            columns = columns ?? typeof (TResult).GetProperties().Where(p => p.GetGetMethod() != null).Select(p => p.Name).ToArray();
+            if (columns == null || columns.Length == 0) columns = typeof (TResult).GetProperties().Where(p => p.GetGetMethod() != null).Select(p => p.Name).ToArray();

             var mi = exp.MethodInfo();
              var controllerName = typeof(TController).Name;


Add the SetSutLabel() method within the FluentMessage type

--- NFluent.35/Extensibility/FluentMessage.cs
+++ NFluent.35/Extensibility/FluentMessage.cs
@@ -569,5 +569,15 @@

            #endregion
         }
+
+        /// <summary>
+        /// Sets the sut label.
+        /// </summary>
+        /// <param name="sutLabel">The sut label.</param>
+        /// <exception cref="System.NotImplementedException"></exception>
+        public void SetSutLabel(string sutLabel)
+        {
+            throw new NotImplementedException();
+        }
     }
 }


Test memory leak fix

Test memory leak fix

--- Common/Python/PythonData.cs
+++ Common/Python/PythonData.cs
@@ -26,7 +26,7 @@
     public class PythonData : DynamicData
     {
         private readonly dynamic _pythonData;
-
+
         /// <summary>
         /// Constructor for initialising the PythonData class
         /// </summary>
@@ -43,7 +43,7 @@
         {
             _pythonData = pythonData;
         }
-
+
         /// <summary>
         /// Source Locator for algorithm written in Python.
         /// </summary>
@@ -54,8 +54,9 @@
         public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode)
         {
             using (Py.GIL())
-            {
-                return _pythonData.GetSource(config, date, isLiveMode);
+            {
+                var source = _pythonData.GetSource(config, date, isLiveMode);
+                return GetTypeAndDispose<SubscriptionDataSource>(source);
             }
         }

@@ -68,13 +69,14 @@
         /// <param name="isLiveMode">true if we're in live mode, false for backtesting mode</param>
         /// <returns></returns>
         public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
-        {
+        {
             using (Py.GIL())
             {
-                return _pythonData.Reader(config, line, date, isLiveMode);
+                var data = _pythonData.Reader(config, line, date, isLiveMode);
+                return GetTypeAndDispose<BaseData>(data);
             }
         }
-
+
         /// <summary>
         /// Indexes into this PythonData, where index is key to the dynamic property
         /// </summary>
@@ -82,7 +84,7 @@
         /// <returns>Dynamic property of a given index</returns>
         public object this[string index]
         {
-            get
+            get
             {
                 return GetProperty(index);
             }
@@ -91,6 +93,23 @@
             {
                 SetProperty(index, value is double ? Convert.ToDecimal(value) : value);
             }
-        }
+        }
+
+        private T GetTypeAndDispose<T>(dynamic instance)
+        {
+            if (instance == null)
+            {
+                return default(T);
+            }
+            var pyInstance = instance as PyObject;
+            if (pyInstance != null)
+            {
+                var returnInstance = pyInstance.As<T>();
+                pyInstance.Dispose();
+                return returnInstance;
+            }
+            throw new ArgumentException($"Unexpected type: {instance.GetType()}." +
+                $" Was expecting {nameof(PyObject)}");
+        }
     }
 }