Automatic merge of 75fb4766-7fd5-4d0a-909c-affad22c8b0c.

--- VersionrUI/Dialogs/LogDialog.xaml.cs
+++ VersionrUI/Dialogs/LogDialog.xaml.cs
@@ -92,6 +92,7 @@
                 if (e.Key == Key.Escape)
                     Close();
             };
+            Owner = MainWindow.Instance;
         }

         public Version Version { get; private set; }
@@ -282,7 +283,7 @@
             PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(info));
         }
         #endregion
-
+
     }
     class ResolvedAlteration
     {


added values for access types

added values for access types

--- src/Nirvana/Security/ClaimType.cs
+++ src/Nirvana/Security/ClaimType.cs
@@ -9,11 +9,11 @@

     public enum AccessType
     {
-        Any,
-        Create,
-        Read,
-        Update,
-        Delete
+        Create=1,
+        Read=2,
+        Update=4,
+        Delete= 8,
+        Any = 16
     }

     public class ClaimType


Compare file integrity after signature verification

--- src/NuSign/NuSign/NuGetPackage.cs
+++ src/NuSign/NuSign/NuGetPackage.cs
@@ -67,10 +67,11 @@
             IntegrityList computedIntegrityList = this.ComputeIntegrityList(out byte[] integrityListContent, out byte[] integrityListSignatureContent);
             IntegrityList embeddedIntegrityList = IntegrityList.FromByteArray(integrityListContent);

+            SignerInfo signerInfo = CryptoUtils.VerifyDetachedCmsSignature(integrityListContent, integrityListSignatureContent, performCertValidation);
+
             if (!computedIntegrityList.SequenceEqual(embeddedIntegrityList))
                 throw new InvalidSignatureException("Package content has been altered");
-
-            SignerInfo signerInfo = CryptoUtils.VerifyDetachedCmsSignature(integrityListContent, integrityListSignatureContent, performCertValidation);
+
             return signerInfo.Certificate;
         }


C#: Consider 'record' a type modifier in the extractor (it can be applied to both class and struct).

--- csharp/extractor/Semmle.Extraction.CSharp/Entities/Modifier.cs
+++ csharp/extractor/Semmle.Extraction.CSharp/Entities/Modifier.cs
@@ -111,6 +111,9 @@
                 if (nt is null)
                     throw new InternalError(symbol, "Symbol kind is inconsistent with its type");

+                if (nt.IsRecord)
+                    HasModifier(cx, trapFile, key, "record");
+
                 if (nt.TypeKind == TypeKind.Struct)
                 {
                     if (nt.IsReadOnly)


Add a helper (AsPythonBytes) to _IOBase that will attempt to convert a string result from read() into a bytes object. Will not strictly correct, it does improve compatibility with CPython. See CP#29378.

--- Languages/IronPython/IronPython.Modules/_io.cs
+++ Languages/IronPython/IronPython.Modules/_io.cs
@@ -192,16 +192,11 @@
                         break;
                     }

-                    Bytes curBytes = cur as Bytes;
+                    Bytes curBytes = AsPythonBytes(cur);
                     if (curBytes == null) {
-                        if (cur != null) {
-                            throw PythonOps.IOError(
-                                "read() should have returned a bytes object, not '{0}'",
-                                PythonTypeOps.GetName(cur)
-                            );
-                        }
-                        break;
-                    }
+                        throw PythonOps.TypeError("read() should return bytes");
+                    }
+
                     if (curBytes.Count == 0) {
                         break;
                     }
@@ -430,6 +425,26 @@
                 return PythonOps.IOError("Raw stream returned invalid position {0}", pos);
             }

+            /// <summary>
+            /// Attempt to convert the object to a Python Bytes type. If it is already a Bytes
+            /// object, it is simply casted; if it is a string, it is converted using PythonAsciiEncoding.
+            /// </summary>
+            /// <param name="dataObj">The object to convert. This must be Bytes or string to succeed. If it is null, the result is null.</param>
+            /// <returns>A Bytes object if conversion was successful; null otherwise.</returns>
+            static protected Bytes AsPythonBytes(object dataObj) {
+                if (dataObj == null) {
+                    return null;
+                }
+
+                if (dataObj is Bytes) {
+                    return (Bytes)dataObj;
+                } else if (dataObj is string) {
+                    return new Bytes(PythonAsciiEncoding.Instance.GetBytes((string)dataObj));
+                }
+
+                return null;
+            }
+
             #endregion
         }

@@ -465,16 +480,15 @@
                         break;
                     }

-                    Bytes curBytes = cur as Bytes;
+                    Bytes curBytes = AsPythonBytes(cur);
                     if (curBytes == null) {
-                        if (cur != null) {
-                            throw PythonOps.TypeError("read() should return bytes");
-                        }
-                        break;
-                    }
+                        throw PythonOps.TypeError("read() should return bytes");
+                    }
+
                     if (curBytes.Count == 0) {
                         break;
                     }
+
                     count += curBytes.Count;
                     res.Add(curBytes);
                 }
@@ -521,13 +535,14 @@
                     length = PythonOps.Length(buf);
                 }

-                object dataObj = read(context, length) as Bytes;
-                Bytes data = dataObj as Bytes;
+                object dataObj = read(context, length);
+                if (dataObj == null) {
+                    return BigInteger.Zero;
+                }
+
+                Bytes data = AsPythonBytes(dataObj);
                 if (data == null) {
-                    if (dataObj != null) {
-                        throw PythonOps.TypeError("read() should return bytes");
-                    }
-                    return BigInteger.Zero;
+                    throw PythonOps.TypeError("read() should return bytes");
                 }

                 IList<byte> bytes = buf as IList<byte>;
@@ -810,7 +825,7 @@
                             chunkObj = PythonOps.Invoke(context, _raw, "read", -1);
                         }

-                        Bytes chunk = chunkObj as Bytes;
+                        Bytes chunk = AsPythonBytes(chunkObj);
                         if (chunk == null && chunkObj != null) {
                             throw PythonOps.TypeError("read() should return bytes");
                         }
@@ -857,12 +872,9 @@
                             chunkObj = PythonOps.Invoke(context, _raw, "read", _bufSize);
                         }

-                        Bytes chunk = chunkObj as Bytes;
+                        Bytes chunk = chunkObj != null ? AsPythonBytes(chunkObj) : Bytes.Empty;
                         if (chunk == null) {
-                            if (chunkObj != null) {
-                                throw PythonOps.TypeError("read() should return bytes");
-                            }
-                            chunk = Bytes.Empty;
+                            throw PythonOps.TypeError("read() should return bytes");
                         }

                         _readBuf = chunk;
@@ -914,12 +926,9 @@
                     nextObj = PythonOps.Invoke(context, _raw, "read", length - _readBuf.Count + _readBufPos);
                 }

-                Bytes next = nextObj as Bytes;
+                Bytes next = nextObj != null ? AsPythonBytes(nextObj) : Bytes.Empty;
                 if (next == null) {
-                    if (nextObj != null) {
-                        throw PythonOps.TypeError("read() should return bytes");
-                    }
-                    next = Bytes.Empty;
+                    throw PythonOps.TypeError("read() should return bytes");
                 }

                 _readBuf = ResetReadBuf() + next;
@@ -2439,12 +2448,9 @@
                     object chunkObj = _bufferTyped != null ?
                         _bufferTyped.read(context, bytesFed) :
                         PythonOps.Invoke(context, _buffer, "read", bytesFed);
-                    Bytes chunk = chunkObj as Bytes;
+                    Bytes chunk = chunkObj != null ? AsPythonBytes(chunkObj) : Bytes.Empty;
                     if (chunk == null) {
-                        if (chunkObj != null) {
-                            throw PythonOps.TypeError("read() should return bytes");
-                        }
-                        chunk = Bytes.Empty;
+                        throw PythonOps.TypeError("read() should return bytes");
                     }

                     if (typedDecoder != null) {
@@ -2770,12 +2776,9 @@
                 object chunkObj = _bufferTyped != null ?
                     _bufferTyped.read(context, _CHUNK_SIZE) :
                     PythonOps.Invoke(context, _buffer, "read", _CHUNK_SIZE);
-                Bytes chunk = chunkObj as Bytes;
+                Bytes chunk = chunkObj != null ? AsPythonBytes(chunkObj) : Bytes.Empty;
                 if (chunk == null) {
-                    if (chunkObj != null) {
-                        throw PythonOps.TypeError("read() should return bytes");
-                    }
-                    chunk = Bytes.Empty;
+                    throw PythonOps.TypeError("read() should return bytes");
                 }
                 bool eof = chunkObj == null || chunk.Count == 0;


VLADO : proba

VLADO : proba

--- LibraryWebApp/src/LibraryWebApp/Models/Book.cs
+++ LibraryWebApp/src/LibraryWebApp/Models/Book.cs
@@ -16,7 +16,7 @@
         RealisticFiction,

     }
-    //VLADO
+
     public class Book
     {
         //knjiznicar pri unosu nove knjige


bugfix: GetAllAsync didn't work porperly

--- WordPressPCL/Client/CRUDOperation.cs
+++ WordPressPCL/Client/CRUDOperation.cs
@@ -49,7 +49,7 @@
         /// <param name="httpHelper">reference to HttpHelper class for interaction with HTTP</param>
         /// <param name="methodPath">path to endpoint, EX. posts</param>
         /// <param name="forceDeletion">is objects must be force deleted</param>
-        protected CRUDOperation(ref HttpHelper httpHelper, string methodPath, bool forceDeletion = false)
+        protected CRUDOperation(HttpHelper httpHelper, string methodPath, bool forceDeletion = false)
         {
             HttpHelper = httpHelper;
             MethodPath = methodPath;
@@ -106,7 +106,7 @@
                 int totalpages = Convert.ToInt32(HttpHelper.LastResponseHeaders.GetValues("X-WP-TotalPages").FirstOrDefault(), CultureInfo.InvariantCulture);
                 for (int page = 2; page <= totalpages; page++)
                 {
-                    url = MethodPath.SetQueryParam("per_page", page.ToString()).SetQueryParam("page", "1");
+                    url = MethodPath.SetQueryParam("per_page","100").SetQueryParam("page", page.ToString());
                     entities.AddRange((await HttpHelper.GetRequestAsync<IEnumerable<TClass>>(url, embed, useAuth).ConfigureAwait(false))?.ToList());
                 }
             }


2 of 2: Add registration free COM & custom EVR Presenter

--- MediaBrowser.Theater.DirectShow/URCOMLoader.cs
+++ MediaBrowser.Theater.DirectShow/URCOMLoader.cs
@@ -296,71 +296,6 @@
             }
         }

-        public IBaseFilter LoadFilter(KnownCOMObject kf, IGraphBuilder graph)
-        {
-            try
-            {
-                IBaseFilter filter = this.CreateObjectFromPath(kf.ObjectPath, kf.Clsid, true) as IBaseFilter;
-                if (filter != null && graph != null)
-                {
-                    int hr = graph.AddFilter(filter, kf.ObjectName);
-                    DsError.ThrowExceptionForHR(hr);
-                }
-                return filter;
-            }
-            catch (COMException ex)
-            {
-                throw ex;
-            }
-            catch (Exception ex)
-            {
-                Console.WriteLine("Could not load {0} - {1}: {2}", kf.Clsid, kf.ObjectPath, ex.Message);
-                return null;
-            }
-        }
-
-        public List<IBaseFilter> AddPreferredFilters(IGraphBuilder graph, string PreferredFilters)
-        {
-            List<IBaseFilter> pFilters = new List<IBaseFilter>();
-
-            foreach (string filtName in PreferredFilters.Split(new char[] { ';', ',' }, StringSplitOptions.RemoveEmptyEntries))
-            {
-                IBaseFilter filter = null;
-                try
-                {
-                    Guid filtGuid;
-
-                    if (KnownCOMObjectConfiguration.IsGuid(filtName, out filtGuid))
-                    {
-                        filter = this.LoadFilter(filtGuid, graph);
-
-                        if(filter == null)
-                            filter = FilterGraphTools.AddFilterFromClsid(graph, filtGuid, filtName);
-                    }
-                    else
-                    {
-                        filter = this.LoadFilter(filtName, graph);
-
-                        if (filter == null)
-                            filter = FilterGraphTools.AddFilterByName(graph, FilterCategory.LegacyAmFilterCategory, filtName);
-                    }
-
-                    if (filter != null)
-                    {
-                        Console.WriteLine("Added {0} to the graph", filtName);
-                        pFilters.Add(filter);
-                    }
-                    else
-                        Console.WriteLine("{0} not added to the graph", filtName);
-                }
-                catch (Exception ex)
-                {
-                    Console.WriteLine("Error {1} adding {0} to the graph", filtName, ex.Message);
-                }
-            }
-            return pFilters;
-        }
-
         #region IDisposable Members

         protected void Dispose(bool disposing)


Don't assume there will be details for a PoolIndex

--- MultiMiner.Win/ViewModels/MainFormViewModel.cs
+++ MultiMiner.Win/ViewModels/MainFormViewModel.cs
@@ -112,13 +112,24 @@
             IEnumerable<DeviceViewModel> relevantDevices = Devices.Where(d => d.Coin.Symbol.Equals(coinSymbol));
             foreach (DeviceViewModel relevantDevice in relevantDevices)
             {
-            	PoolInformationResponse poolInformation = poolInformationResonseModels.Single(p => p.Index == relevantDevice.PoolIndex);
-
-                relevantDevice.LastShareDifficulty = poolInformation.LastShareDifficulty;
-                relevantDevice.LastShareTime = poolInformation.LastShareTime;
-                relevantDevice.Url = poolInformation.Url;
-                relevantDevice.BestShare = poolInformation.BestShare;
-                relevantDevice.PoolStalePercent = poolInformation.PoolStalePercent;
+            	PoolInformationResponse poolInformation = poolInformationResonseModels.SingleOrDefault(p => p.Index == relevantDevice.PoolIndex);
+                if (poolInformation == null)
+                {
+                    //device not mining, or crashed, or no pool details
+                    relevantDevice.LastShareDifficulty = 0;
+                    relevantDevice.LastShareTime = null;
+                    relevantDevice.Url = String.Empty;
+                    relevantDevice.BestShare = 0;
+                    relevantDevice.PoolStalePercent = 0;
+                }
+                else
+                {
+                    relevantDevice.LastShareDifficulty = poolInformation.LastShareDifficulty;
+                    relevantDevice.LastShareTime = poolInformation.LastShareTime;
+                    relevantDevice.Url = poolInformation.Url;
+                    relevantDevice.BestShare = poolInformation.BestShare;
+                    relevantDevice.PoolStalePercent = poolInformation.PoolStalePercent;
+                }
             }
         }


Getting artwork fixed

Getting artwork fixed

--- MusicPickerService/Controllers/SubmitDevice.cs
+++ MusicPickerService/Controllers/SubmitDevice.cs
@@ -57,18 +57,18 @@

             if (result.IsSuccessStatusCode)
             {
-                JObject search = JObject.Parse(result.Content.ReadAsStringAsync().Result);
-                if (search["album"] != null)
+                try
                 {
-                    if (search["album"]["image"] != null)
+                    JObject search = JObject.Parse(result.Content.ReadAsStringAsync().Result);
+                    if (search["album"] != null)
                     {
-                        List<JToken> results = search["album"]["image"].Children().ToList();
-                        if (results.Count > 0)
+                        if (search["album"]["image"] != null)
                         {
-                            string url = results[results.Count - 1]["#text"].ToString();
+                            List<JToken> results = search["album"]["image"].Children().ToList();
+                            if (results.Count > 0)
+                            {
+                                string url = results[results.Count - 1]["#text"].ToString();

-                            try
-                            {
                                 Album album = (from a in db.Albums
                                                where a.Name == submission.Album
                                                select a).First();
@@ -77,12 +77,12 @@
                                 db.Albums.AddOrUpdate(album);
                                 db.SaveChanges();
                             }
-                            catch (Exception e)
-                            {
-
-                            }
                         }
                     }
+                }
+                catch (Exception e)
+                {
+
                 }
             }
         }


Refresh the list when any bulk butotn is pressed. Panels redrawn by triggering the Changed Func in the TodoModel

--- NavigationSample/Controllers/TodoController.cs
+++ NavigationSample/Controllers/TodoController.cs
@@ -100,6 +100,7 @@
 		[ActionSelector]
 		public ActionResult CompleteAll()
 		{
+			HttpContext.Items["refresh"] = true;
 			StateContext.Bag.id = null;
 			Todos.ForEach(t => t.Completed = true);
 			return View();
@@ -108,6 +109,7 @@
 		[ActionSelector]
 		public ActionResult ActivateAll()
 		{
+			HttpContext.Items["refresh"] = true;
 			StateContext.Bag.id = null;
 			Todos.ForEach(t => t.Completed = false);
 			return View();
@@ -116,6 +118,7 @@
 		[ActionSelector]
 		public ActionResult ClearCompleted()
 		{
+			HttpContext.Items["refresh"] = true;
 			StateContext.Bag.id = null;
 			var completed = Todos.Where(t => t.Completed).ToList();
 			completed.ForEach(t => Todos.Remove(t));


Refactoring

Refactoring

--- JabbR/Commands/CommandManager.cs
+++ JabbR/Commands/CommandManager.cs
@@ -129,11 +129,16 @@
                                                       StringComparer.OrdinalIgnoreCase);
             }

-            ExpandCommand(_commandCache.Keys, ref commandName);
-
-            if (!_commandCache.TryGetValue(commandName, out command))
-            {
-                throw new CommandNotFoundException();
+            var extended = _commandCache.Keys.Where(comm => comm.StartsWith(commandName));
+            switch(extended.Count()) {
+                case 1:
+                    _commandCache.TryGetValue(extended.Single(), out command);
+                    commandName = extended.Single();
+                    break;
+                case 0:
+                    throw new CommandNotFoundException();
+                default:
+                    throw new CommandAmbiguityException(extended);
             }
         }

@@ -162,22 +167,5 @@
                            };
             return commands;
         }
-
-        private static void ExpandCommand(IEnumerable<string> commandNames, ref string commandName)
-        {
-            var inputCommand = commandName;
-            var extended = commandNames.Where(comm => comm.StartsWith(inputCommand));
-
-            if (!extended.Any()) return;
-
-            try
-            {
-                commandName = extended.Single();
-            }
-            catch (InvalidOperationException)
-            {
-                throw new CommandAmbiguityException(extended);
-            }
-        }
     }
 }


Use TestGameManager in TextSplitterTest

Use TestGameManager in TextSplitterTest

--- XNAControls.Test/TextSplitterTest.cs
+++ XNAControls.Test/TextSplitterTest.cs
@@ -2,14 +2,11 @@
 // This file is subject to the GPL v2 License
 // For additional details, see the LICENSE file

-using System.ComponentModel.Design;
 using System.Linq;
-using System.Windows.Forms;
-using Microsoft.Xna.Framework;
 using Microsoft.Xna.Framework.Content;
 using Microsoft.Xna.Framework.Graphics;
 using NUnit.Framework;
-using XNAControls.Old;
+using XNAControls.Test.Helpers;

 namespace XNAControls.Test
 {
@@ -17,24 +14,20 @@
     public class TextSplitterTest
     {
         private TextSplitter _ts;
-        private static Form _form;
-        private static Game _game;
-        private static GraphicsDeviceManager _gdm;
+        private static TestGameManager _gameManager;
         private static SpriteFont _spriteFont;

         [OneTimeSetUp]
         public static void ClassInitialize()
         {
-            SetupDependencies();
+            _gameManager = new TestGameManager();
             _spriteFont = LoadSpriteFontFromWorkingDirectory();
         }

         [OneTimeTearDown]
         public static void ClassCleanup()
         {
-            _gdm.Dispose();
-            _game.Dispose();
-            _form.Dispose();
+            _gameManager.Dispose();
         }

         [SetUp]
@@ -171,28 +164,12 @@
             Assert.IsTrue(result.Except(new[] { result.First() }).All(x => x.StartsWith(_ts.LineIndent)));
         }

-        private static void SetupDependencies()
-        {
-            _form = new Form();
-            _game = new Game();
-            _gdm = new GraphicsDeviceManager(_game);
-        }
-
         private static SpriteFont LoadSpriteFontFromWorkingDirectory()
         {
-            SpriteFont font;
-            var gds = GraphicsDeviceService.AddRef(_form.Handle, _form.ClientSize.Width, _form.ClientSize.Height);
-
-            using (var services = new ServiceContainer())
+            using (var content = new ContentManager(_gameManager.Game.Services, TestContext.CurrentContext.TestDirectory))
             {
-                services.AddService(typeof (IGraphicsDeviceService), gds);
-                using (var content = new ContentManager(services, TestContext.CurrentContext.TestDirectory))
-                {
-                    font = content.Load<SpriteFont>("font_for_testing");
-                }
+                return content.Load<SpriteFont>("font_for_testing");
             }
-
-            return font;
         }
     }
 }


Document PoEItemProperty

Document PoEItemProperty

--- Yeena/PathOfExile/PoEItemProperty.cs
+++ Yeena/PathOfExile/PoEItemProperty.cs
@@ -20,27 +20,39 @@
 using Newtonsoft.Json;

 namespace Yeena.PathOfExile {
+    /// <summary>
+    /// Repesents an item property.
+    /// </summary>
     [JsonObject]
     class PoEItemProperty {
         private static readonly Regex FormatSpecifier = new Regex(@"%(\d+)", RegexOptions.Compiled);

         [JsonProperty("name")] private readonly string _name;
         [JsonProperty("values")] private readonly List<List<object>> _values;
-        // ???
         [JsonProperty("displayMode")] private readonly int _displayMode;

+        private readonly Lazy<string> _displayText;
+
+        /// <summary>
+        /// Returns the name of this property.
+        /// </summary>
         public string Name { get { return _name; } }
+
+        /// <summary>
+        /// Returns the values associated with this property.
+        /// </summary>
         public IReadOnlyList<IReadOnlyList<object>> Values { get { return _values; } }

+        /// <summary>
+        /// Unknown.
+        /// </summary>
         public int DisplayMode { get { return _displayMode; } }

-        private readonly Lazy<string> _displayText;
+        /// <summary>
+        /// Returns display-friendly text for this property.
+        /// </summary>
         public string DisplayText {
             get { return _displayText.Value; }
-        }
-
-        public override string ToString() {
-            return DisplayText;
         }

         [JsonConstructor]
@@ -62,5 +74,13 @@

             _displayText = new Lazy<string>(displayTextFactory);
         }
+
+        /// <summary>
+        /// Returns a string representation for this property.
+        /// </summary>
+        /// <returns>A string representation for this property.</returns>
+        public override string ToString() {
+            return DisplayText;
+        }
     }
 }


Minor change

Minor change

--- Yggdrasil/Util/BufferReaderWriter.cs
+++ Yggdrasil/Util/BufferReaderWriter.cs
@@ -291,9 +291,6 @@
 		/// <summary>
 		/// Reads variable-length integer from buffer.
 		/// </summary>
-		/// <remarks>
-		/// https://en.wikipedia.org/wiki/Variable-length_quantity
-		/// </remarks>
 		/// <returns></returns>
 		public long ReadVarInt()
 		{
@@ -412,9 +409,6 @@
 		/// <summary>
 		/// Writes variable-length integer to buffer.
 		/// </summary>
-		/// <remarks>
-		/// https://en.wikipedia.org/wiki/Variable-length_quantity
-		/// </remarks>
 		/// <returns></returns>
 		public void WriteVarInt(long value)
 		{


Adjusted the GunAimPhysics DampingConstant.

--- YouthClubApp/Models/GunAimPhysics.cs
+++ YouthClubApp/Models/GunAimPhysics.cs
@@ -48,7 +48,7 @@

         public double NextX(double x)
         {
-            var fx = -SpringConstant * (x - 50) - DampingConstant * vx + RandomConstant * (rand.NextDouble() - 0.5);
+            var fx = -SpringConstant * (x - 50) - DampingConstant * vx * Math.Abs(vx) + RandomConstant * (rand.NextDouble() - 0.5);
             vx += fx;
             vx = x == 0 ? 0.5 : vx;
             vx = x == 100 ? -0.5 : vx;
@@ -57,7 +57,7 @@

         public double NextY(double y)
         {
-            var fy = -SpringConstant * (y - 50) - DampingConstant * vy + RandomConstant * (rand.NextDouble() - 0.5);
+            var fy = -SpringConstant * (y - 50) - DampingConstant * vy * Math.Abs(vy) + RandomConstant * (rand.NextDouble() - 0.5);
             vy += fy;
             vy = y == 0 ? 0.5 : vy;
             vy = y == 100 ? -0.5 : vy;


Fixed negative values on Win32

Fixed negative values on Win32

--- src/Windows/Avalonia.Win32/WindowImpl.cs
+++ src/Windows/Avalonia.Win32/WindowImpl.cs
@@ -565,7 +565,7 @@
                     return IntPtr.Zero;

                 case UnmanagedMethods.WindowsMessage.WM_MOVE:
-                    PositionChanged?.Invoke(new Point(ToInt32(lParam) & 0xffff, ToInt32(lParam) >> 16));
+                    PositionChanged?.Invoke(new Point((short)(ToInt32(lParam) & 0xffff), (short)(ToInt32(lParam) >> 16)));
                     return IntPtr.Zero;
             }


Documentation, code readability

Documentation, code readability

--- ZUGFeRD/InvoiceDescriptor21Writer.cs
+++ ZUGFeRD/InvoiceDescriptor21Writer.cs
@@ -103,9 +103,6 @@
             Writer.WriteEndElement(); // !rsm:ExchangedDocument
             #endregion

-            /*
-             * @todo continue here to adopt v2 tag names
-             */

             #region SpecifiedSupplyChainTradeTransaction
             //Gruppierung der Informationen zum Geschäftsvorfall
@@ -428,12 +425,17 @@
             }

             #region SellerTradeParty
+            // BT-31: this.Descriptor.SellerTaxRegistration
             _writeOptionalParty(Writer, "ram:SellerTradeParty", this.Descriptor.Seller, this.Descriptor.SellerContact, this.Descriptor.SellerTaxRegistration, descriptor.Profile);
             #endregion

             #region BuyerTradeParty
+            // BT-48: this.Descriptor.BuyerTaxRegistration
             _writeOptionalParty(Writer, "ram:BuyerTradeParty", this.Descriptor.Buyer, this.Descriptor.BuyerContact, this.Descriptor.BuyerTaxRegistration, descriptor.Profile);
             #endregion
+
+            /// TODO: implement SellerTaxRepresentativeTradeParty
+            /// BT-63: the tax registration of the SellerTaxRepresentativeTradeParty

             #region BuyerOrderReferencedDocument
             if (this.Descriptor.OrderDate.HasValue || ((this.Descriptor.OrderNo != null) && (this.Descriptor.OrderNo.Length > 0)))
@@ -574,14 +576,8 @@
             #region ApplicableHeaderTradeSettlement
             Writer.WriteStartElement("ram:ApplicableHeaderTradeSettlement");

-            if (Descriptor.Profile == Profile.Extended)
-            {
-                _writeOptionalParty(Writer, "ram:InvoiceeTradeParty", this.Descriptor.Invoicee);
-            }
-            if (Descriptor.Profile != Profile.Minimum)
-            {
-                _writeOptionalParty(Writer, "ram:PayeeTradeParty", this.Descriptor.Payee);
-            }
+            _writeOptionalParty(Writer, "ram:InvoiceeTradeParty", this.Descriptor.Invoicee, profile: Profile.Extended);
+            _writeOptionalParty(Writer, "ram:PayeeTradeParty", this.Descriptor.Payee, profile: ALL_PROFILES ^ Profile.Minimum);

             if (!String.IsNullOrEmpty(this.Descriptor.PaymentReference))
             {


Size window in response to WM_DPICHANGED.

--- src/Windows/Avalonia.Win32/WindowImpl.cs
+++ src/Windows/Avalonia.Win32/WindowImpl.cs
@@ -497,9 +497,15 @@
                 case UnmanagedMethods.WindowsMessage.WM_DPICHANGED:
                     var dpi = ToInt32(wParam) & 0xffff;
                     var newDisplayRect = Marshal.PtrToStructure<UnmanagedMethods.RECT>(lParam);
-                    Position = new Point(newDisplayRect.left, newDisplayRect.top);
                     _scaling = dpi / 96.0;
                     ScalingChanged?.Invoke(_scaling);
+                    SetWindowPos(hWnd,
+                        IntPtr.Zero,
+                        newDisplayRect.left,
+                        newDisplayRect.top,
+                        newDisplayRect.right - newDisplayRect.left,
+                        newDisplayRect.bottom - newDisplayRect.top,
+                        SetWindowPosFlags.SWP_NOZORDER | SetWindowPosFlags.SWP_NOACTIVATE);
                     return IntPtr.Zero;

                 case UnmanagedMethods.WindowsMessage.WM_KEYDOWN:


[BUG]Fix assess api example

[BUG]Fix assess api example

--- LearnositySDK/Examples/Assess.cs
+++ LearnositySDK/Examples/Assess.cs
@@ -40,7 +40,7 @@
             for (int i = 3; i <= 10; i++)
             {
                 JsonObject responseIDs = new JsonObject(true);
-                responseIDs.set(uuid + "_demo" + i.ToString());
+                responseIDs.set(uuid + "_Demo" + i.ToString());
                 JsonObject item = new JsonObject();
                 item.set("reference", "Demo" + i.ToString());
                 item.set("content", "");


Fix return type of LCL.ParseCell.GetFloat

--- LeftosCommonLibrary/ParseCell.cs
+++ LeftosCommonLibrary/ParseCell.cs
@@ -79,7 +79,7 @@
         /// <param name="r">The row.</param>
         /// <param name="columnName">Name of the column.</param>
         /// <returns></returns>
-        public static double GetFloat(DataRow r, string columnName)
+        public static float GetFloat(DataRow r, string columnName)
         {
             return Convert.ToSingle(r[columnName].ToString());
         }


New method to detect correct host

New method to detect correct host

--- SAMP_Ex/SAMP_Ex/Class/Utils.cs
+++ SAMP_Ex/SAMP_Ex/Class/Utils.cs
@@ -6,6 +6,8 @@
 using System.Net;
 using System.Xml;
 using System.Xml.Linq;
+
+using System.Diagnostics;

 namespace SAMP_Ex
 {
@@ -19,7 +21,17 @@
         public static bool IsValidIpAddress(string ipaddress)
         {
             IPAddress address;
-            if (IPAddress.TryParse(ipaddress, out address))
+            try
+            {
+                address = Dns.GetHostAddresses(ipaddress).First();
+                return true;
+            }
+            catch (Exception ex)
+            {
+                return false;
+            }
+
+            /*if (IPAddress.TryParse(ipaddress, out address))
             {
                 switch (address.AddressFamily)
                 {
@@ -31,8 +43,7 @@
                         return false;
                 }
             }
-            else
-                return false;
+                return false;*/
         }

         /// <summary>


Fixed Line-Endings.

Fixed Line-Endings.

--- FenixLib/FenixLib.Tests/Unit/IO/NativeFormatWriterTests.cs
+++ FenixLib/FenixLib.Tests/Unit/IO/NativeFormatWriterTests.cs
@@ -72,9 +72,9 @@
         }

         [TearDown]
-        public void TearDown ()
-        {
-            memory = null;
+        public void TearDown ()
+        {
+            memory = null;
         }

         [Test]
@@ -114,46 +114,46 @@

         [Test]
         public void WriteExtendedGlyphInfo_Test ()
-        {
-            var glyphInfo = new NativeFormat.GlyphInfo (
-                width: 0x10,
-                height: 0x20,
-                xAdvance: 0x30,
-                yAdvance: 0x40,
-                xOffset: 0x50,
-                yOffset: 0x60,
-                fileOffset: 0x70 );
-
-            var expectedBytes = new byte[]
-            {
-                0x10, 0, 0, 0,
-                0x20, 0, 0, 0,
-                0x30, 0, 0, 0,
-                0x40, 0, 0, 0,
-                0x50, 0, 0, 0,
-                0x60, 0, 0, 0,
-                0x70, 0, 0, 0
-            };
-
+        {
+            var glyphInfo = new NativeFormat.GlyphInfo (
+                width: 0x10,
+                height: 0x20,
+                xAdvance: 0x30,
+                yAdvance: 0x40,
+                xOffset: 0x50,
+                yOffset: 0x60,
+                fileOffset: 0x70 );
+
+            var expectedBytes = new byte[]
+            {
+                0x10, 0, 0, 0,
+                0x20, 0, 0, 0,
+                0x30, 0, 0, 0,
+                0x40, 0, 0, 0,
+                0x50, 0, 0, 0,
+                0x60, 0, 0, 0,
+                0x70, 0, 0, 0
+            };
+
             formatWriter.WriteExtendedGlyphInfo ( ref glyphInfo );

             Assert.That ( memory, Is.EqualTo ( expectedBytes ) );
-        }
-
+        }
+
         [Test]
         public void WriteLegacyFntGlyphInfo_ValidGlyph_Works ()
-        {
+        {
             var glyphInfo = new NativeFormat.GlyphInfo (
-                0x10, 0x20, 0x30, 0x40 );
-            var expectedBytes = new byte[]
-            {
-                0x10, 0, 0, 0,
-                0x20, 0, 0, 0,
-                0x30, 0, 0, 0,
-                0x40, 0, 0, 0
-            };
-
-
+                0x10, 0x20, 0x30, 0x40 );
+            var expectedBytes = new byte[]
+            {
+                0x10, 0, 0, 0,
+                0x20, 0, 0, 0,
+                0x30, 0, 0, 0,
+                0x40, 0, 0, 0
+            };
+
+
             formatWriter.WriteLegacyGlyphInfo ( ref glyphInfo );

             Assert.That ( memory, Is.EqualTo ( expectedBytes ) );
@@ -168,19 +168,19 @@

         [Test]
         public void WritePalette_ValidPalette_Works ()
-        {
-            var paletteStub = MockRepository.GenerateStub<Palette> ();
-            var paletteColors = new PaletteColor[256];
-            var expectedBytes = new byte[256 * 3];
-
-            for ( int i = 0 ; i < 256 ; i++ )
-            {
-                // A sample color that will be in the stub palette
-                var color = new PaletteColor ( i, i / 2, i / 3 );
-                paletteColors[i] = color;
-                paletteStub[i] = color;
-
-                // Color components are to be encoded in 6bits
+        {
+            var paletteStub = MockRepository.GenerateStub<Palette> ();
+            var paletteColors = new PaletteColor[256];
+            var expectedBytes = new byte[256 * 3];
+
+            for ( int i = 0 ; i < 256 ; i++ )
+            {
+                // A sample color that will be in the stub palette
+                var color = new PaletteColor ( i, i / 2, i / 3 );
+                paletteColors[i] = color;
+                paletteStub[i] = color;
+
+                // Color components are to be encoded in 6bits
                 expectedBytes[i * 3 + 0] = ( byte ) ( ( i ) >> 2 );
                 expectedBytes[i * 3 + 1] = ( byte ) ( ( i / 2 ) >> 2 );
                 expectedBytes[i * 3 + 2] = ( byte ) ( ( i / 3 ) >> 2 );
@@ -195,25 +195,25 @@

         [Test]
         public void WritePivotPoint_ValidPivotPoint_Works ()
-        {
-            var pivotPoint = new PivotPoint ( 0, 0x01AA, 0x02BB );
-            var expectedBytes = new byte[] { 0xAA, 0x01, 0xBB, 0x02 };
-
-            formatWriter.Write ( pivotPoint );
-
+        {
+            var pivotPoint = new PivotPoint ( 0, 0x01AA, 0x02BB );
+            var expectedBytes = new byte[] { 0xAA, 0x01, 0xBB, 0x02 };
+
+            formatWriter.Write ( pivotPoint );
+
             Assert.That ( () => memory, Is.EqualTo ( expectedBytes ) );
         }

         [Test]
         public void WriteReservedPaletteGammaSection_Works ()
         {
-            formatWriter.WriteReservedPaletteGammaSection ();
-
-            // There are 16 gamma sections and they occupy 36bytes each.
+            formatWriter.WriteReservedPaletteGammaSection ();
+
+            // There are 16 gamma sections and they occupy 36bytes each.
             Assert.That ( memory.Length, Is.EqualTo ( 16 * 36 ) );
             // Every 16th byte needs to be 8, 16 or 32 for the format to be
             // compatible with DIV games studio
-            Assert.That ( memory.Where ( ( x, i ) => i % 36 == 0 ),
+            Assert.That ( memory.Where ( ( x, i ) => i % 36 == 0 ),
                 Is.All.EqualTo ( 8 ).Or.EqualTo ( 16 ).Or.EqualTo ( 32 ) );
         }


Parse the geopotential in the C# code.

Parse the geopotential in the C# code.

--- ksp_plugin_adapter/config_node_parsers.cs
+++ ksp_plugin_adapter/config_node_parsers.cs
@@ -10,6 +10,7 @@

   public static BodyParameters NewCartesianBodyParameters(CelestialBody body,
                                                           ConfigNode node) {
+    BodyGeopotentialElement[] geopotential = GetBodyGeopotentialElements(node);
     return new BodyParameters{
         name = body.name,
         gravitational_parameter =
@@ -26,10 +27,12 @@
             node.GetAtMostOneValue("reference_angle"),
         angular_frequency       =
             node.GetAtMostOneValue("angular_frequency"),
+        reference_radius        =
+            node.GetAtMostOneValue("reference_radius"),
         j2                      =
             node.GetAtMostOneValue("j2"),
-        reference_radius        =
-            node.GetAtMostOneValue("reference_radius")};
+        geopotential            = geopotential,
+        geopotential_size       = geopotential.Length};
   }

   public static ConfigurationAccuracyParameters
@@ -63,6 +66,7 @@

   public static BodyParameters NewKeplerianBodyParameters(CelestialBody body,
                                                           ConfigNode node) {
+    BodyGeopotentialElement[] geopotential = GetBodyGeopotentialElements(node);
     return new BodyParameters{
         name = body.name,
         gravitational_parameter =
@@ -89,10 +93,41 @@
         angular_frequency    =
             node?.GetAtMostOneValue("angular_frequency")
                 ??  (body.angularV.ToString() + " rad/s"),
+        reference_radius     =
+            node?.GetAtMostOneValue("reference_radius"),
         j2                   =
             node?.GetAtMostOneValue("j2"),
-        reference_radius     =
-            node?.GetAtMostOneValue("reference_radius")};
+        geopotential            = geopotential,
+        geopotential_size       = geopotential.Length};
+  }
+
+  private static BodyGeopotentialElement[] GetBodyGeopotentialElements(
+      ConfigNode node) {
+    ConfigNode[] geopotential_rows = node.GetNodes("geopotential_row");
+    if (geopotential_rows.Length == 0) {
+      return null;
+    }
+    List<BodyGeopotentialElement> elements =
+        new List<BodyGeopotentialElement>();
+    foreach (ConfigNode geopotential_row in geopotential_rows) {
+      Int32 degree = Int32.Parse(geopotential_row.GetUniqueValue("degree"));
+      ConfigNode[] geopotential_columns = node.GetNodes("geopotential_column");
+      foreach (ConfigNode geopotential_column in geopotential_columns) {
+        Int32 order = Int32.Parse(geopotential_column.GetUniqueValue("order"));
+        String cos = geopotential_column.GetUniqueValue("cos");
+        String sin = geopotential_column.GetUniqueValue("sin");
+        elements.Add(new BodyGeopotentialElement{degree = degree,
+                                                 order = order,
+                                                 cos = cos,
+                                                 sin = sin});
+      }
+    }
+    BodyGeopotentialElement[] result =
+        new BodyGeopotentialElement[elements.Count];
+    for (int i = 0; i < elements.Count; ++i) {
+      result[i] = elements[i];
+    }
+    return result;
   }

 }


Fix the XML serializationt to provide an empty script state element if the script hasn't yet saved state, or can't save state because of a loop

--- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1274,9 +1274,23 @@
             string xml = instance.GetXMLState();

             XmlDocument sdoc = new XmlDocument();
-            sdoc.LoadXml(xml);
-            XmlNodeList rootL = sdoc.GetElementsByTagName("ScriptState");
-            XmlNode rootNode = rootL[0];
+            bool loadedState = true;
+            try
+            {
+                sdoc.LoadXml(xml);
+            }
+            catch (System.Xml.XmlException e)
+            {
+                loadedState = false;
+            }
+
+            XmlNodeList rootL = null;
+            XmlNode rootNode = null;
+            if (loadedState)
+            {
+                rootL = sdoc.GetElementsByTagName("ScriptState");
+                rootNode = rootL[0];
+            }

             // Create <State UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
             XmlDocument doc = new XmlDocument();
@@ -1292,8 +1306,18 @@
             stateData.Attributes.Append(engineName);
             doc.AppendChild(stateData);

+            XmlNode xmlstate = null;
+
             // Add <ScriptState>...</ScriptState>
-            XmlNode xmlstate = doc.ImportNode(rootNode, true);
+            if (loadedState)
+            {
+                xmlstate = doc.ImportNode(rootNode, true);
+            }
+            else
+            {
+                xmlstate = doc.CreateElement("", "ScriptState", "");
+            }
+
             stateData.AppendChild(xmlstate);

             string assemName = instance.GetAssemblyName();


Added filtering of the PropertyChanged event from the zone controller

--- GW2PAO/Modules/Map/ViewModels/CharacterPointerViewModel.cs
+++ GW2PAO/Modules/Map/ViewModels/CharacterPointerViewModel.cs
@@ -7,6 +7,7 @@
 using System.Threading.Tasks;
 using GW2PAO.API.Util;
 using GW2PAO.Modules.ZoneCompletion.Interfaces;
+using GW2PAO.Utility;
 using MapControl;
 using Microsoft.Practices.Prism.Mvvm;
 using NLog;
@@ -150,6 +151,7 @@
             this.SnapToCharacter = false;
             this.ShowPlayerTrail = true;
             this.PlayerTrailLength = 100;
+            this.CanDisplayCharacterPointer = this.zoneController.ValidMapID;

             ((INotifyPropertyChanged)this.zoneController).PropertyChanged += ZoneControllerPropertyChanged;
         }
@@ -159,9 +161,14 @@
         /// </summary>
         private void ZoneControllerPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
         {
-            this.CanDisplayCharacterPointer = this.zoneController.ValidMapID;
-            this.RefreshCharacterLocation();
-            this.RefreshCharacterDirection();
+            if ((e.PropertyName == ReflectionUtility.GetPropertyName(() => this.zoneController.ValidMapID))
+                || (e.PropertyName == ReflectionUtility.GetPropertyName(() => this.zoneController.CharacterPosition))
+                || (e.PropertyName == ReflectionUtility.GetPropertyName(() => this.zoneController.CameraDirection)))
+            {
+                this.CanDisplayCharacterPointer = this.zoneController.ValidMapID;
+                this.RefreshCharacterLocation();
+                this.RefreshCharacterDirection();
+            }
         }

         private void RefreshCharacterLocation()


Add prefix to All method.

Add prefix to All method.

--- src/Portable/StorageExtensions.cs
+++ src/Portable/StorageExtensions.cs
@@ -28,10 +28,16 @@

         public static IAsyncEnumerator<T> All<T>(this IStorage<T> storage, int? batchSize = 1000) where T : class, IKeyed, new()
         {
-            var continuation = (string)null;
+            return All(storage, null, batchSize);
+        }
+
+        public static IAsyncEnumerator<T> All<T>(this IStorage<T> storage, string prefix, int? batchSize = 1000) where T : class, IKeyed, new()
+        {
+            var continuation = prefix;
+            var end = StorageKey.Increment(continuation);
             return AsyncEnumerator.Create(new Func<Task<AsyncEnumerationResult<T>>>(async () =>
             {
-                var batch = await storage.Range(continuation, null, batchSize);
+                var batch = await storage.Range(continuation, end, batchSize);
                 var hasMore = batchSize != null && batch.Any();
                 if (hasMore)
                 {
@@ -65,10 +71,16 @@

         public static IAsyncEnumerator<T> All<T>(this IStorage storage, int? batchSize = 1000) where T : class, IKeyed, new()
         {
-            var continuation = (string)null;
+            return All<T>(storage, null, batchSize);
+        }
+
+        public static IAsyncEnumerator<T> All<T>(this IStorage storage, string prefix, int? batchSize = 1000) where T : class, IKeyed, new()
+        {
+            var continuation = prefix;
+            var end = StorageKey.Increment(continuation);
             return AsyncEnumerator.Create(new Func<Task<AsyncEnumerationResult<T>>>(async () =>
             {
-                var batch = await storage.Range<T>(continuation, null, batchSize);
+                var batch = await storage.Range<T>(continuation, end, batchSize);
                 var hasMore = batchSize != null && batch.Any();
                 if (hasMore)
                 {


update KoreanCVCPhonemizer (add hangeul, etc)

--- OpenUtau.Plugin.Builtin/KoreanCVCPhonemizer.cs
+++ OpenUtau.Plugin.Builtin/KoreanCVCPhonemizer.cs
@@ -5,9 +5,33 @@
 using OpenUtau.Core.Ustx;
 using Serilog;

+
 namespace OpenUtau.Plugin.Builtin {
     [Phonemizer("Korean CVC Phonemizer", "KR CVC", "NANA")]
     public class KoreanCVCPhonemizer : Phonemizer {
+
+        bool isAlphaCon(string str) {
+            if (str == "gg") {return true;}
+            else if (str == "gg") { return true; }
+            else if (str == "dd") { return true; }
+            else if (str == "bb") { return true; }
+            else if (str == "ss") { return true; }
+            else if (str == "g") { return true; }
+            else if (str == "n") { return true; }
+            else if (str == "d") { return true; }
+            else if (str == "r") { return true; }
+            else if (str == "m") { return true; }
+            else if (str == "b") { return true; }
+            else if (str == "s") { return true; }
+            else if (str == "j") { return true; }
+            else if (str == "ch") { return true; }
+            else if (str == "k") { return true; }
+            else if (str == "t") { return true; }
+            else if (str == "p") { return true; }
+            else if (str == "h") { return true; }
+            else { return false;}
+        }
+
         static readonly string[] plainVowels = new string[] {"eu","eo","a","i","u","e","o"};

         static readonly string[] vowels = new string[] {
@@ -32,24 +56,37 @@
             "dd=dd,dda,ddi,ddu,dde,ddo,ddeu,ddeo,ddya,ddyu,ddye,ddyo,ddyeo,ddwa,ddwi,ddwe,ddweo,ㄸ,따,띠,뚜,떼,때,또,뜨,떠,땨,뜌,뗴,떄,뚀,뗘,똬,뛰,뛔,뙈,뙤,뚸",
             "bb=bb,bba,bbi,bbu,bbe,bbo,bbeu,bbeo,bbya,bbyu,bbye,bbyo,bbyeo,bbwa,bbwi,bbwe,bbweo,ㅃ,빠,삐,뿌,뻬,빼,뽀,쁘,뻐,뺘,쀼,뼤,뺴,뾰,뼈,뽜,쀠,쀄,뽸,뾔,뿨",
             "ss=ss,ssa,ssi,ssu,sse,sso,sseu,sseo,ssya,ssyu,ssye,ssyo,ssyeo,sswa,sswi,sswe,ssweo,ㅆ,싸,씨,쑤,쎄,쌔,쏘,쓰,써,쌰,쓔,쎼,썌,쑈,쎠,쏴,쒸,쒜,쐐,쐬,쒀",
-            "g=g,ga,gi,gu,ge,go,geu,geo,gya,gyu,gye,gyo,gyeo,gwa,gwi,gwe,gweo,ㄱ,가,기,구,게,개,고,그,거,갸,규,계,걔,교,겨,과,귀,궤,괘,괴,궈",
-            "n=n,na,ni,nu,ne,no,neu,neo,nya,nyu,nye,nyo,nyeo,nwa,nwi,nwe,nweo,ㄴ,나,니,누,네,내,노,느,너,냐,뉴,녜,냬,뇨,녀,놔,뉘,눼,놰,뇌,눠",
-            "d=d,da,di,du,de,do,deu,deo,dya,dyu,dye,dyo,dyeo,dwa,dwi,dwe,dweo,ㄷ,다,디,두,데,대,도,드,더,댜,듀,뎨,댸,됴,뎌,돠,뒤,뒈,돼,되,둬",
-            "r=r,ra,ri,ru,re,ro,reu,reo,rya,ryu,rye,ryo,ryeo,rwa,rwi,rwe,rweo,ㄹ,라,리,루,레,래,로,르,러,랴,류,례,럐,료,려,롸,뤼,뤠,뢔,뤄",
-            "m=m,ma,mi,mu,me,mo,meu,meo,mya,myu,mye,myo,myeo,mwa,mwi,mwe,mweo,ㅁ,마,미,무,메,매,모,므,머,먀,뮤,몌,먜,묘,며,뫄,뮈,뭬,뫠,뫼,뭐",
-            "b=b,ba,bi,bu,be,bo,beu,beo,bya,byu,bye,byo,byeo,bwa,bwi,bwe,bweo,ㅂ,바,비,부,베,배,보,브,버,뱌,뷰,볘,뱨,뵤,벼,봐,뷔,붸,봬,뵈,붜",
-            "s=s,sa,si,su,se,so,seu,seo,sya,syu,sye,syo,syeo,swa,swi,swe,sweo,ㅅ,사,시,수,세,새,소,스,서,샤,슈,셰,섀,쇼,셔,솨,쉬,쉐,쇄,쇠,숴",
-            "j=j,ja,ji,ju,je,jo,jeu,jeo,jya,jyu,jye,jyo,jyeo,jwa,jwi,jwe,jweo,ㅈ,자,지,주,제,재,조,즈,저,쟈,쥬,졔,쟤,죠,져,좌,쥐,줴,좨,죄,줘",
-            "ch=ch,cha,chi,chu,che,cho,cheu,cheo,chya,chyu,chye,chyo,chyeo,chwa,chwi,chwe,chweo,ㅊ,차,치,추,체,채,초,츠,처,챠,츄,쳬,챼,쵸,쳐,촤,취,췌,쵀,최,춰",
-            "k=k,ka,ki,ku,ke,ko,keu,keo,kya,kyu,kye,kyo,kyeo,kwa,kwi,kwe,kweo,ㅋ,카,키,쿠,케,캐,코,크,커,캬,큐,켸,컈,쿄,켜,콰,퀴,퀘,쾌,쾨,쿼",
-            "t=t,ta,ti,tu,te,to,teu,teo,tya,tyu,tye,tyo,tyeo,twa,twi,twe,tweo,ㅌ,타,티,투,테,태,토,트,터,탸,튜,톄,턔,툐,텨,톼,튀,퉤,퇘,퇴,퉈",
-            "p=p,pa,pi,pu,pe,po,peu,peo,pya,pyu,pye,pyo,pyeo,pwa,pwi,pwe,pweo,ㅍ,파,피,푸,페,패,포,프,퍼,퍄,퓨,폐,퍠,표,펴,퐈,퓌,풰,퐤,푀,풔",
-            "h=h,ha,hi,hu,he,ho,heu,heo,hya,hyu,hye,hyo,hyeo,hwa,hwi,hwe,hweo,ㅎ,하,히,후,헤,해,호,흐,허,햐,휴,혜,햬,효,혀,화,휘,훼,홰,회,훠"
+            "g=g,ga,gi,gu,ge,go,geu,geo,gya,gyu,gye,gyo,gyeo,gwa,gwi,gwe,gweo,가,기,구,게,개,고,그,거,갸,규,계,걔,교,겨,과,귀,궤,괘,괴,궈",
+            "n=n,na,ni,nu,ne,no,neu,neo,nya,nyu,nye,nyo,nyeo,nwa,nwi,nwe,nweo,나,니,누,네,내,노,느,너,냐,뉴,녜,냬,뇨,녀,놔,뉘,눼,놰,뇌,눠",
+            "d=d,da,di,du,de,do,deu,deo,dya,dyu,dye,dyo,dyeo,dwa,dwi,dwe,dweo,다,디,두,데,대,도,드,더,댜,듀,뎨,댸,됴,뎌,돠,뒤,뒈,돼,되,둬",
+            "r=r,ra,ri,ru,re,ro,reu,reo,rya,ryu,rye,ryo,ryeo,rwa,rwi,rwe,rweo,라,리,루,레,래,로,르,러,랴,류,례,럐,료,려,롸,뤼,뤠,뢔,뤄",
+            "m=m,ma,mi,mu,me,mo,meu,meo,mya,myu,mye,myo,myeo,mwa,mwi,mwe,mweo,마,미,무,메,매,모,므,머,먀,뮤,몌,먜,묘,며,뫄,뮈,뭬,뫠,뫼,뭐",
+            "b=b,ba,bi,bu,be,bo,beu,beo,bya,byu,bye,byo,byeo,bwa,bwi,bwe,bweo,바,비,부,베,배,보,브,버,뱌,뷰,볘,뱨,뵤,벼,봐,뷔,붸,봬,뵈,붜",
+            "s=s,sa,si,su,se,so,seu,seo,sya,syu,sye,syo,syeo,swa,swi,swe,sweo,사,시,수,세,새,소,스,서,샤,슈,셰,섀,쇼,셔,솨,쉬,쉐,쇄,쇠,숴",
+            "j=j,ja,ji,ju,je,jo,jeu,jeo,jya,jyu,jye,jyo,jyeo,jwa,jwi,jwe,jweo,자,지,주,제,재,조,즈,저,쟈,쥬,졔,쟤,죠,져,좌,쥐,줴,좨,죄,줘",
+            "ch=ch,cha,chi,chu,che,cho,cheu,cheo,chya,chyu,chye,chyo,chyeo,chwa,chwi,chwe,chweo,차,치,추,체,채,초,츠,처,챠,츄,쳬,챼,쵸,쳐,촤,취,췌,쵀,최,춰",
+            "k=k,ka,ki,ku,ke,ko,keu,keo,kya,kyu,kye,kyo,kyeo,kwa,kwi,kwe,kweo,카,키,쿠,케,캐,코,크,커,캬,큐,켸,컈,쿄,켜,콰,퀴,퀘,쾌,쾨,쿼",
+            "t=t,ta,ti,tu,te,to,teu,teo,tya,tyu,tye,tyo,tyeo,twa,twi,twe,tweo,타,티,투,테,태,토,트,터,탸,튜,톄,턔,툐,텨,톼,튀,퉤,퇘,퇴,퉈",
+            "p=p,pa,pi,pu,pe,po,peu,peo,pya,pyu,pye,pyo,pyeo,pwa,pwi,pwe,pweo,파,피,푸,페,패,포,프,퍼,퍄,퓨,폐,퍠,표,펴,퐈,퓌,풰,퐤,푀,풔",
+            "h=h,ha,hi,hu,he,ho,heu,heo,hya,hyu,hye,hyo,hyeo,hwa,hwi,hwe,hweo,하,히,후,헤,해,호,흐,허,햐,휴,혜,햬,효,혀,화,휘,훼,홰,회,훠"
             };

         static readonly Dictionary<string, string> vowelLookup;
         static readonly Dictionary<string, string> consonantLookup;
+
+        string getConsonant(string str) {
+            str = str.Replace('a', ' ');
+            str = str.Replace('i', ' ');
+            str = str.Replace('u', ' ');
+            str = str.Replace('e', ' ');
+            str = str.Replace('o', ' ');
+            str = str.Replace('w', ' ');
+            str = str.Replace('y', ' ');
+            str = str.Trim();
+
+            return str;
+        }

         static KoreanCVCPhonemizer() {
             vowelLookup = vowels.ToList()
@@ -125,7 +162,8 @@
                 // Get consonant from next note
                 var consonant = "";
                 if (consonantLookup.TryGetValue(nextUnicode.FirstOrDefault() ?? string.Empty, out var con)) {
-                    consonant = con;
+                    consonant = getConsonant(nextNeighbour?.lyric); //로마자만 가능
+                    if (!(isAlphaCon(consonant))) { consonant = con; }
                 }

                 if (consonant == "") {


Added group test

Added group test

--- src/Q42.HueApi.Tests/GroupTest.cs
+++ src/Q42.HueApi.Tests/GroupTest.cs
@@ -75,6 +75,16 @@
       string groupId = "16";

       await _client.DeleteGroupAsync(groupId);
+
+    }
+
+    [TestMethod]
+    public async Task SendGroupCommand()
+    {
+      string groupId = "16";
+      var command = new SceneCommand { Scene = "1" };
+
+      await _client.SendGroupCommandAsync(command, groupId);

     }


friendsOf defaults to logged in id if none is passed

--- JustPressPlay/JustPressPlay/ViewModels/SharedViewModels.cs
+++ JustPressPlay/JustPressPlay/ViewModels/SharedViewModels.cs
@@ -279,10 +279,13 @@
 			}

 			// Check for user
-			if (id != null)
+			if (WebSecurity.IsAuthenticated)
 			{
 				if (friendsOf)
 				{
+                    if (id == null)
+                        id = WebSecurity.CurrentUserId;
+
 					aq = from a in aq
 						 join f in work.EntityContext.friend
 						 on a.user_id equals f.source_id


Remove new keyword from interface

Remove new keyword from interface

Former-commit-id: e271328ab161d18c97babd8a011a6806ce7b1981

--- src/Sharpy.Core/src/IGenerator.cs
+++ src/Sharpy.Core/src/IGenerator.cs
@@ -3,14 +3,13 @@
     ///     <para>Represent a generator which can generate any amount of elements by invoking method <see cref="Generate" />.</para>
     /// </summary>
     /// <typeparam name="T"></typeparam>
-    public interface IGenerator<out T>  {
+    public interface IGenerator<out T> {
         /// <summary>
         ///     <para>Generate next element.</para>
         /// </summary>
         /// <returns>
         ///     A generated element.
         /// </returns>
-        new T Generate();
+        T Generate();
     }
-
 }


Opt14: Optimize TypeHelpers.ExtractGenericInterface.

--- src/System.Web.Mvc/TypeHelpers.cs
+++ src/System.Web.Mvc/TypeHelpers.cs
@@ -102,8 +102,12 @@

         public static Type ExtractGenericInterface(Type queryType, Type interfaceType)
         {
-            Func<Type, bool> matchesInterface = t => t.IsGenericType && t.GetGenericTypeDefinition() == interfaceType;
-            return (matchesInterface(queryType)) ? queryType : queryType.GetInterfaces().FirstOrDefault(matchesInterface);
+            if (MatchesGenericType(queryType, interfaceType))
+            {
+                return queryType;
+            }
+            Type[] queryTypeInterfaces = queryType.GetInterfaces();
+            return MatchGenericTypeFirstOrDefault(queryTypeInterfaces, interfaceType);
         }

         public static object GetDefaultValue(Type type)
@@ -119,6 +123,24 @@
         public static bool IsNullableValueType(Type type)
         {
             return Nullable.GetUnderlyingType(type) != null;
+        }
+
+        private static bool MatchesGenericType(Type type, Type matchType)
+        {
+            return type.IsGenericType && type.GetGenericTypeDefinition() == matchType;
+        }
+
+        private static Type MatchGenericTypeFirstOrDefault(Type[] types, Type matchType)
+        {
+            for (int i = 0; i < types.Length; i++)
+            {
+                Type type = types[i];
+                if (MatchesGenericType(type, matchType))
+                {
+                    return type;
+                }
+            }
+            return null;
         }

         private static bool StrongTryGetValueImpl<TKey, TValue>(object dictionary, string key, out object value)


13_Ragdolls. Lot's of missing API for this sample.

--- Samples/Samples/13_Ragdolls.cs
+++ Samples/Samples/13_Ragdolls.cs
@@ -1,4 +1,4 @@
-using Urho;
+    using Urho;

 class _13_Ragdolls : Sample
 {
@@ -12,7 +12,10 @@
     {
         base.Start();
         CreateScene();
-        SimpleCreateInstructions("\nSpace to toggle debug geometry");
+        SimpleCreateInstructions(
+            "\nLMB to spawn physics objects\n" +
+            "F5 to save scene, F7 to load\n" +
+            "Space to toggle physics debug geometry");
         SetupViewport();
         SubscribeToEvents();
     }
@@ -22,6 +25,24 @@
         SubscribeToUpdate(args =>
         {
             SimpleMoveCamera(args.TimeStep);
+            var input = Input;
+                // "Shoot" a physics object with left mousebutton
+            if (input.GetMouseButtonPress(MouseButton.Left))
+                SpawnObject();
+
+            // Check for loading / saving the scene
+#warning MISSING_API
+            /*if (input.GetKeyPress(KEY_F5))
+            {
+                File saveFile(Context, GetSubsystem<FileSystem>()->GetProgramDir() + "Data/Scenes/Ragdolls.xml", FILE_WRITE);
+                scene.SaveXML(saveFile);
+            }
+            if (input.GetKeyPress(KEY_F7))
+            {
+                File loadFile(context_, GetSubsystem<FileSystem>()->GetProgramDir() + "Data/Scenes/Ragdolls.xml", FILE_READ);
+                scene.LoadXML(loadFile);
+            }*/
+
             if (Input.GetKeyDown(' '))
                 drawDebug = !drawDebug;
         });
@@ -47,11 +68,268 @@
         var cache = ResourceCache;
         scene = new Scene(Context);

+        // Create octree, use default volume (-1000, -1000, -1000) to (1000, 1000, 1000)
+        // Create a physics simulation world with default parameters, which will update at 60fps. Like the Octree must
+        // exist before creating drawable components, the PhysicsWorld must exist before creating physics components.
+        // Finally, create a DebugRenderer component so that we can draw physics debug geometry
+        scene.CreateComponent<Octree>();
+#warning MISSING_API
+        ////scene.CreateComponent<PhysicsWorld>();
+        scene.CreateComponent<DebugRenderer>();
+
+        // Create a Zone component for ambient lighting & fog control
+        Node zoneNode = scene.CreateChild("Zone");
+        Zone zone = zoneNode.CreateComponent<Zone>();
+        zone.SetBoundingBox(new BoundingBox(-1000.0f, 1000.0f));
+        zone.AmbientColor=(new Color(0.15f, 0.15f, 0.15f));
+        zone.FogColor=new Color(0.5f, 0.5f, 0.7f);
+        zone.FogStart=100.0f;
+        zone.FogEnd=300.0f;
+
+        // Create a directional light to the world. Enable cascaded shadows on it
+        Node lightNode = scene.CreateChild("DirectionalLight");
+        lightNode.SetDirection(new Vector3(0.6f, -1.0f, 0.8f));
+        Light light = lightNode.CreateComponent<Light>();
+        light.LightType=LightType.LIGHT_DIRECTIONAL;
+        light.CastShadows=true;
+        light.ShadowBias=new BiasParameters(0.00025f, 0.5f);
+        // Set cascade splits at 10, 50 and 200 world units, fade shadows out at 80% of maximum shadow distance
+        light.ShadowCascade=new CascadeParameters(10.0f, 50.0f, 200.0f, 0.0f, 0.8f);
+
+        {
+            // Create a floor object, 500 x 500 world units. Adjust position so that the ground is at zero Y
+            Node floorNode = scene.CreateChild("Floor");
+            floorNode.Position=new Vector3(0.0f, -0.5f, 0.0f);
+            floorNode.Scale=new Vector3(500.0f, 1.0f, 500.0f);
+            StaticModel floorObject = floorNode.CreateComponent<StaticModel>();
+            floorObject.Model=cache.GetModel("Models/Box.mdl");
+            floorObject.SetMaterial(cache.GetMaterial("Materials/StoneTiled.xml"));
+
+            // Make the floor physical by adding RigidBody and CollisionShape components
+#warning MISSING_API
+            ////RigidBody body = floorNode.CreateComponent<RigidBody>();
+            ////// We will be spawning spherical objects in this sample. The ground also needs non-zero rolling friction so that
+            ////// the spheres will eventually come to rest
+            ////body.RollingFriction(0.15f);
+            ////CollisionShape shape = floorNode.CreateComponent<CollisionShape>();
+            ////// Set a box shape of size 1 x 1 x 1 for collision. The shape will be scaled with the scene node scale, so the
+            ////// rendering and physics representation sizes should match (the box model is also 1 x 1 x 1.)
+            ////shape.Box(Vector3.One);
+        }
+
+        // Create animated models
+        for (int z = -1; z <= 1; ++z)
+        {
+            for (int x = -4; x <= 4; ++x)
+            {
+                Node modelNode = scene.CreateChild("Jack");
+                modelNode.Position=new Vector3(x * 5.0f, 0.0f, z * 5.0f);
+                modelNode.Rotation=new Quaternion(0.0f, 180.0f, 0.0f);
+                AnimatedModel modelObject = modelNode.CreateComponent<AnimatedModel>();
+                modelObject.Model=cache.GetModel("Models/Jack.mdl");
+                modelObject.SetMaterial(cache.GetMaterial("Materials/Jack.xml"));
+                modelObject.CastShadows=true;
+                // Set the model to also update when invisible to avoid staying invisible when the model should come into
+                // view, but does not as the bounding box is not updated
+                modelObject.UpdateInvisible=true;
+
+                // Create a rigid body and a collision shape. These will act as a trigger for transforming the
+                // model into a ragdoll when hit by a moving object
+#warning MISSING_API
+                ////RigidBody body = modelNode.CreateComponent<RigidBody>();
+                ////// The Trigger mode makes the rigid body only detect collisions, but impart no forces on the
+                ////// colliding objects
+                ////body.Trigger(true);
+                ////CollisionShape shape = modelNode.CreateComponent<CollisionShape>();
+                ////// Create the capsule shape with an offset so that it is correctly aligned with the model, which
+                ////// has its origin at the feet
+                ////shape.Capsule(0.7f, 2.0f, new Vector3(0.0f, 1.0f, 0.0f));
+
+                // Create a custom component that reacts to collisions and creates the ragdoll
+                modelNode.CreateComponent<CreateRagdoll>();
+            }
+        }
+
+
+
+
         // Create the camera. Limit far clip distance to match the fog
         CameraNode = scene.CreateChild("Camera");
         camera = CameraNode.CreateComponent<Camera>();
         camera.FarClip = 300.0f;
         // Set an initial position for the camera scene node above the plane
-        CameraNode.Position = new Vector3(0.0f, 5.0f, 0.0f);
+        CameraNode.Position = new Vector3(0.0f, 3.0f, -20.0f);
+    }
+
+    private void SpawnObject()
+    {
+        var cache = ResourceCache;
+
+        Node boxNode = scene.CreateChild("Sphere");
+        boxNode.Position=CameraNode.Position;
+        boxNode.Rotation=CameraNode.Rotation;
+        boxNode.SetScale(0.25f);
+        StaticModel boxObject = boxNode.CreateComponent<StaticModel>();
+        boxObject.Model=cache.GetModel("Models/Sphere.mdl");
+        boxObject.SetMaterial(cache.GetMaterial("Materials/StoneSmall.xml"));
+        boxObject.CastShadows=true;
+
+#warning MISSING_API
+        /*RigidBody body = boxNode.CreateComponent<RigidBody>();
+        body.SetMass(1.0f);
+        body.SetRollingFriction(0.15f);
+        CollisionShape* shape = boxNode.CreateComponent<CollisionShape>();
+        shape.SetSphere(1.0f);
+
+        const float OBJECT_VELOCITY = 10.0f;
+
+        // Set initial velocity for the RigidBody based on camera forward vector. Add also a slight up component
+        // to overcome gravity better
+        body.SetLinearVelocity(CameraNode.GetRotation() * Vector3(0.0f, 0.25f, 1.0f) * OBJECT_VELOCITY);*/
     }
 }
+
+class CreateRagdoll : Component
+{
+    public CreateRagdoll(Context context) : base(context) {}
+
+    public void OnNodeSet(Node node)
+    {
+        // If the node pointer is non-null, this component has been created into a scene node. Subscribe to physics collisions that
+        // concern this scene node
+        //if (node != null)
+            //SubscribeToEvent(node, E_NODECOLLISION, HANDLER(CreateRagdoll, HandleNodeCollision));
+    }
+
+#warning MISSING_API
+/*void HandleNodeCollision(StringHash eventType, VariantMap& eventData)
+{
+    // Get the other colliding body, make sure it is moving (has nonzero mass)
+    RigidBody otherBody = static_cast<RigidBody*>(eventData[P_OTHERBODY].GetPtr());
+
+    if (otherBody.GetMass() > 0.0f)
+    {
+        // We do not need the physics components in the AnimatedModel's root scene node anymore
+        node_.RemoveComponent<RigidBody>();
+        node_.RemoveComponent<CollisionShape>();
+
+        // Create RigidBody & CollisionShape components to bones
+        CreateRagdollBone("Bip01_Pelvis", SHAPE_BOX, new Vector3(0.3f, 0.2f, 0.25f), new Vector3(0.0f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 0.0f));
+        CreateRagdollBone("Bip01_Spine1", SHAPE_BOX, new Vector3(0.35f, 0.2f, 0.3f), new Vector3(0.15f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 0.0f));
+        CreateRagdollBone("Bip01_L_Thigh", SHAPE_CAPSULE, new Vector3(0.175f, 0.45f, 0.175f), new Vector3(0.25f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 90.0f));
+        CreateRagdollBone("Bip01_R_Thigh", SHAPE_CAPSULE, new Vector3(0.175f, 0.45f, 0.175f), new Vector3(0.25f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 90.0f));
+        CreateRagdollBone("Bip01_L_Calf", SHAPE_CAPSULE, new Vector3(0.15f, 0.55f, 0.15f), new Vector3(0.25f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 90.0f));
+        CreateRagdollBone("Bip01_R_Calf", SHAPE_CAPSULE, new Vector3(0.15f, 0.55f, 0.15f), new Vector3(0.25f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 90.0f));
+        CreateRagdollBone("Bip01_Head", SHAPE_BOX, new Vector3(0.2f, 0.2f, 0.2f), new Vector3(0.1f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 0.0f));
+        CreateRagdollBone("Bip01_L_UpperArm", SHAPE_CAPSULE, new Vector3(0.15f, 0.35f, 0.15f), new Vector3(0.1f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 90.0f));
+        CreateRagdollBone("Bip01_R_UpperArm", SHAPE_CAPSULE, new Vector3(0.15f, 0.35f, 0.15f), new Vector3(0.1f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 90.0f));
+        CreateRagdollBone("Bip01_L_Forearm", SHAPE_CAPSULE, new Vector3(0.125f, 0.4f, 0.125f), new Vector3(0.2f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 90.0f));
+        CreateRagdollBone("Bip01_R_Forearm", SHAPE_CAPSULE, new Vector3(0.125f, 0.4f, 0.125f), new Vector3(0.2f, 0.0f, 0.0f),
+            new Quaternion(0.0f, 0.0f, 90.0f));
+
+        // Create Constraints between bones
+        CreateRagdollConstraint("Bip01_L_Thigh", "Bip01_Pelvis", CONSTRAINT_CONETWIST, Vector3::BACK, Vector3::FORWARD,
+            new Vector2(45.0f, 45.0f), new Vector2.Zero);
+        CreateRagdollConstraint("Bip01_R_Thigh", "Bip01_Pelvis", CONSTRAINT_CONETWIST, Vector3::BACK, Vector3::FORWARD,
+            new Vector2(45.0f, 45.0f), new Vector2.Zero);
+        CreateRagdollConstraint("Bip01_L_Calf", "Bip01_L_Thigh", CONSTRAINT_HINGE, Vector3::BACK, Vector3::BACK,
+            new Vector2(90.0f, 0.0f), new Vector2.Zero);
+        CreateRagdollConstraint("Bip01_R_Calf", "Bip01_R_Thigh", CONSTRAINT_HINGE, Vector3::BACK, Vector3::BACK,
+            new Vector2(90.0f, 0.0f), new Vector2.Zero);
+        CreateRagdollConstraint("Bip01_Spine1", "Bip01_Pelvis", CONSTRAINT_HINGE, Vector3::FORWARD, Vector3::FORWARD,
+            new Vector2(45.0f, 0.0f), new Vector2(-10.0f, 0.0f));
+        CreateRagdollConstraint("Bip01_Head", "Bip01_Spine1", CONSTRAINT_CONETWIST, Vector3::LEFT, Vector3::LEFT,
+            new Vector2(0.0f, 30.0f), new Vector2.Zero);
+        CreateRagdollConstraint("Bip01_L_UpperArm", "Bip01_Spine1", CONSTRAINT_CONETWIST, Vector3::DOWN, Vector3::UP,
+            new Vector2(45.0f, 45.0f), new Vector2.Zero, false);
+        CreateRagdollConstraint("Bip01_R_UpperArm", "Bip01_Spine1", CONSTRAINT_CONETWIST, Vector3::DOWN, Vector3::UP,
+            new Vector2(45.0f, 45.0f), new Vector2.Zero, false);
+        CreateRagdollConstraint("Bip01_L_Forearm", "Bip01_L_UpperArm", CONSTRAINT_HINGE, Vector3::BACK, Vector3::BACK,
+            new Vector2(90.0f, 0.0f), new Vector2.Zero);
+        CreateRagdollConstraint("Bip01_R_Forearm", "Bip01_R_UpperArm", CONSTRAINT_HINGE, Vector3::BACK, Vector3::BACK,
+            new Vector2(90.0f, 0.0f), new Vector2.Zero);
+
+        // Disable keyframe animation from all bones so that they will not interfere with the ragdoll
+        AnimatedModel model = GetComponent<AnimatedModel>();
+        Skeleton skeleton = model.GetSkeleton();
+        for (unsigned i = 0; i < skeleton.GetNumBones(); ++i)
+            skeleton.GetBone(i).animated_ = false;
+
+        // Finally remove self from the scene node. Note that this must be the last operation performed in the function
+        Remove();
+    }
+}*/
+
+#warning MISSING_API
+/*void CreateRagdollBone(string boneName, ShapeType type, const Vector3& size, const Vector3& position,
+    const Quaternion& rotation)
+{
+    // Find the correct child scene node recursively
+    Node boneNode = node_.GetChild(boneName, true);
+    if (!boneNode)
+    {
+        LOGWARNING("Could not find bone " + boneName + " for creating ragdoll physics components");
+        return;
+    }
+
+    RigidBody* body = boneNode.CreateComponent<RigidBody>();
+    // Set mass to make movable
+    body.SetMass(1.0f);
+    // Set damping parameters to smooth out the motion
+    body.SetLinearDamping(0.05f);
+    body.SetAngularDamping(0.85f);
+    // Set rest thresholds to ensure the ragdoll rigid bodies come to rest to not consume CPU endlessly
+    body.SetLinearRestThreshold(1.5f);
+    body.SetAngularRestThreshold(2.5f);
+
+    CollisionShape* shape = boneNode.CreateComponent<CollisionShape>();
+    // We use either a box or a capsule shape for all of the bones
+    if (type == SHAPE_BOX)
+        shape.SetBox(size, position, rotation);
+    else
+        shape.SetCapsule(size.x_, size.y_, position, rotation);
+}*/
+
+#warning MISSING_API
+/*void CreateRagdollConstraint(string boneName, string parentName, ConstraintType type,
+    const Vector3& axis, const Vector3& parentAxis, const Vector2& highLimit, const Vector2& lowLimit,
+    bool disableCollision)
+{
+    Node boneNode = node_.GetChild(boneName, true);
+    Node parentNode = node_.GetChild(parentName, true);
+    if (!boneNode)
+    {
+        LOGWARNING("Could not find bone " + boneName + " for creating ragdoll constraint");
+        return;
+    }
+    if (!parentNode)
+    {
+        LOGWARNING("Could not find bone " + parentName + " for creating ragdoll constraint");
+        return;
+    }
+
+    Constraint constraint = boneNode.CreateComponent<Constraint>();
+    constraint.SetConstraintType(type);
+    // Most of the constraints in the ragdoll will work better when the connected bodies don't collide against each other
+    constraint.SetDisableCollision(disableCollision);
+    // The connected body must be specified before setting the world position
+    constraint.SetOtherBody(parentNode.GetComponent<RigidBody>());
+    // Position the constraint at the child bone we are connecting
+    constraint.SetWorldPosition(boneNode.GetWorldPosition());
+    // Configure axes and limits
+    constraint.SetAxis(axis);
+    constraint.SetOtherAxis(parentAxis);
+    constraint.SetHighLimit(highLimit);
+    constraint.SetLowLimit(lowLimit);
+}*/
+}


Trying to fix Mono runtime issues.

Trying to fix Mono runtime issues.

--- src/Tests/TestingWithResources.cs
+++ src/Tests/TestingWithResources.cs
@@ -14,15 +14,13 @@
             // ReSharper disable once AssignNullToNotNullAttribute
             using (var reader = new StreamReader(assembly.GetManifestResourceStream(key)))
             {
-                var platform = (int)Environment.OSVersion.Platform;
-
-                if ((platform == 4) || (platform == 6) || (platform == 128))
+                if (Type.GetType("Mono.Runtime") != null)
                 {
-                    Console.WriteLine("Reading expect file {0} on Linux.", key);
+                    Console.WriteLine("Reading expect file {0} on Mono CLR.", key);
                     return reader.ReadToEnd().Replace("\n", "\r\n");
                 }

-                Console.WriteLine("Reading expect file {0} on Windows.", key);
+                Console.WriteLine("Reading expect file {0} on .NET CLR.", key);
                 return reader.ReadToEnd();
             }
         }


Corrected test.

Corrected test.

--- Schyntax.Tests/SchtickTests.cs
+++ Schyntax.Tests/SchtickTests.cs
@@ -64,11 +64,11 @@

             // this should trigger an immediate event
             var window1Run = false;
-            var window1 = schtick.AddTask(sch, (task, run) => { window1Run = true; }, lastKnownRun: fiveSecAgo.AddMinutes(-1), window: TimeSpan.FromHours(1));
+            var window1 = schtick.AddTask(sch, (task, run) => { window1Run = true; }, lastKnownRun: fiveSecAgo.AddMinutes(-1), window: TimeSpan.FromMinutes(1));

             // this should not trigger an immediate event
             var window2Run = false;
-            var window2 = schtick.AddTask(sch, (task, run) => { window2Run = true; }, lastKnownRun: fiveSecAgo, window: TimeSpan.FromHours(1));
+            var window2 = schtick.AddTask(sch, (task, run) => { window2Run = true; }, lastKnownRun: fiveSecAgo, window: TimeSpan.FromMinutes(1));

             Thread.Sleep(1000);


add Condition

add Condition

--- ParsecSharp/Parser/Parser/Parser.Primitives.cs
+++ ParsecSharp/Parser/Parser/Parser.Primitives.cs
@@ -23,6 +23,14 @@
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static Parser<TToken, Unit> Null<TToken>()
             => Pure<TToken, Unit>(Unit.Instance);
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static Parser<TToken, Unit> Condition<TToken>(bool success)
+            => Condition<TToken>(success, "Given condition was false");
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static Parser<TToken, Unit> Condition<TToken>(bool success, string message)
+            => (success) ? Null<TToken>() : Fail<TToken, Unit>(message);

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static Parser<TToken, TToken> OneOf<TToken>(IEnumerable<TToken> candidates)


Fixed Inherited Warnings

Fixed Inherited Warnings


Update tests for range "*" with prerelease versions

Behaviour in node-semver was a bug.

--- SemVer.Tests/AdvancedRanges.cs
+++ SemVer.Tests/AdvancedRanges.cs
@@ -99,7 +99,7 @@
         [InlineData(">=*", "0.2.4")]
         [InlineData("", "1.0.0")]
         [InlineData("*", "1.2.3")]
-        //[InlineData("*", "v1.2.3-foo")]
+        [InlineData("*", "v1.2.3")]
         [InlineData(">=1.0.0", "1.0.0")]
         [InlineData(">=1.0.0", "1.0.1")]
         [InlineData(">=1.0.0", "1.1.0")]
@@ -245,6 +245,7 @@
         [InlineData("^1.2.3", "1.2.2")]
         [InlineData("^1.2", "1.1.9")]
         [InlineData("^1.2.3", "2.0.0-pre")]
+        [InlineData("*", "v1.2.3-foo")]
         public void UnsatisfiedRanges(string rangeString, string versionString)
         {
             var range = new Range(rangeString);


more codefacgtor

more codefacgtor

--- src/Xtricate.DocSet/DocStorage.cs
+++ src/Xtricate.DocSet/DocStorage.cs
@@ -122,54 +122,11 @@
                 var sql = new StringBuilder();
                 if (!forceInsert && Exists(key, tags))
                 {
-                    // UPDATE ===
-                    if (Options.EnableLogging)
-                        Log.Debug($"{TableName} update: key={key},tags={tags?.Join("||")}");
-                    var updateColumns = "[value]=@value";
-                    if (document != null && data != null) updateColumns = $"{updateColumns},[data]=@data";
-                    if (document == null && data != null) updateColumns = "[data]=@data";
-                    sql.Append(
-                        $@"
-    {SqlBuilder.BuildUseDatabase(Options.DatabaseName)}
-    UPDATE {TableName}
-    SET [hash]=@hash,[timestamp]=@timestamp,{updateColumns
-                            }
-        {
-                            IndexMaps.NullToEmpty()
-                                .Select(
-                                    i =>
-                                        ",[" + i.Name.ToLower() + SqlBuilder.IndexColumnNameSuffix + "]=@" +
-                                        i.Name.ToLower() + SqlBuilder.IndexColumnNameSuffix)
-                                .Join("")}
-    WHERE [key]=@key");
-                    foreach (var t in tags.NullToEmpty())
-                        sql.Append(SqlBuilder.BuildTagSelect(t));
-                    result = StorageAction.Updated;
+                    result = Update(key, document, data, tags, sql);
                 }
                 else
                 {
-                    // INSERT ===
-                    if (Options.EnableLogging)
-                        Log.Debug($"{TableName} insert: key={key},tags={tags?.Join("||")}");
-                    var insertColumns = "[value]";
-                    if (document != null && data != null) insertColumns = $"{insertColumns},[data]" /*+= ",[data]"*/;
-                    if (document == null && data != null) insertColumns = "[data]";
-                    var insertValues = "@value";
-                    if (document != null && data != null) insertValues = $"{insertValues},@data" /*",@data"*/;
-                    if (document == null && data != null) insertValues = "@data";
-                    sql.Append(
-                        $@"
-    {SqlBuilder.BuildUseDatabase(Options.DatabaseName)}
-    INSERT INTO {TableName}
-        ([key],[tags],[hash],[timestamp],{insertColumns}{
-                            IndexMaps.NullToEmpty()
-                                .Select(i => ",[" + i.Name.ToLower() + SqlBuilder.IndexColumnNameSuffix + "]")
-                                .Join("")})
-        VALUES(@key,@tags,@hash,@timestamp,{insertValues}{
-                            IndexMaps.NullToEmpty()
-                                .Select(i => ",@" + i.Name.ToLower() + SqlBuilder.IndexColumnNameSuffix)
-                                .Join("")})");
-                    result = StorageAction.Inserted;
+                    result = Insert(key, document, data, tags, sql);
                 }

                 // PARAMS
@@ -186,6 +143,61 @@
                 conn.Execute(sql.ToString(), parameters);
                 return result;
             }
+        }
+
+        private StorageAction Update(object key, TDoc document, Stream data, IEnumerable<string> tags, StringBuilder sql)
+        {
+            // UPDATE ===
+            if (Options.EnableLogging)
+                Log.Debug($"{TableName} update: key={key},tags={tags?.Join("||")}");
+            var updateColumns = "[value]=@value";
+            if (document != null && data != null) updateColumns = $"{updateColumns},[data]=@data";
+            if (document == null && data != null) updateColumns = "[data]=@data";
+            sql.Append(
+                $@"
+    {SqlBuilder.BuildUseDatabase(Options.DatabaseName)}
+    UPDATE {TableName
+                    }
+    SET [hash]=@hash,[timestamp]=@timestamp,{updateColumns
+                    }
+        {
+                    IndexMaps.NullToEmpty()
+                        .Select(
+                            i =>
+                                ",[" + i.Name.ToLower() + SqlBuilder.IndexColumnNameSuffix + "]=@" +
+                                i.Name.ToLower() + SqlBuilder.IndexColumnNameSuffix)
+                        .Join("")}
+    WHERE [key]=@key");
+            foreach (var t in tags.NullToEmpty())
+                sql.Append(SqlBuilder.BuildTagSelect(t));
+            return StorageAction.Updated;
+        }
+
+        private StorageAction Insert(object key, TDoc document, Stream data, IEnumerable<string> tags, StringBuilder sql)
+        {
+            // INSERT ===
+            if (Options.EnableLogging)
+                Log.Debug($"{TableName} insert: key={key},tags={tags?.Join("||")}");
+            var insertColumns = "[value]";
+            if (document != null && data != null) insertColumns = $"{insertColumns},[data]" /*+= ",[data]"*/;
+            if (document == null && data != null) insertColumns = "[data]";
+            var insertValues = "@value";
+            if (document != null && data != null) insertValues = $"{insertValues},@data" /*",@data"*/;
+            if (document == null && data != null) insertValues = "@data";
+            sql.Append(
+                $@"
+    {SqlBuilder.BuildUseDatabase(Options.DatabaseName)}
+    INSERT INTO {TableName
+                    }
+        ([key],[tags],[hash],[timestamp],{insertColumns}{
+                    IndexMaps.NullToEmpty()
+                        .Select(i => ",[" + i.Name.ToLower() + SqlBuilder.IndexColumnNameSuffix + "]")
+                        .Join("")})
+        VALUES(@key,@tags,@hash,@timestamp,{insertValues}{
+                    IndexMaps.NullToEmpty()
+                        .Select(i => ",@" + i.Name.ToLower() + SqlBuilder.IndexColumnNameSuffix)
+                        .Join("")})");
+            return StorageAction.Inserted;
         }

         public virtual long Count(IEnumerable<string> tags = null, IEnumerable<Criteria> criterias = null)


AutoApproval Controller Added details page. Fixed lessThan/Equal radio button with existing values. Some Access checks and formatting

--- Purchasing.Web/Views/AutoApproval/Index.cshtml
+++ Purchasing.Web/Views/AutoApproval/Index.cshtml
@@ -121,7 +121,7 @@
 			</td>
             }
 			<td>
-				@String.Format("{0:g}", item.Expiration)
+				@String.Format("{0:d}", item.Expiration)
 			</td>


Added version to installed package list, and tweaked item height.

--- Nodejs/Product/Nodejs/NpmUI/InstalledPackageListControl.cs
+++ Nodejs/Product/Nodejs/NpmUI/InstalledPackageListControl.cs
@@ -25,7 +25,7 @@

             //  Hack to force the row height
             var images = new ImageList();
-            images.ImageSize = new Size( 40, 72 );
+            images.ImageSize = new Size( 40, 56 );
             _listPackages.SmallImageList = images;
             _listPackages.LargeImageList = images;
             //  /hack
@@ -114,14 +114,23 @@
             }

             var pkg = e.Item.Tag as IPackage;
-
+            var font = new Font( Font, FontStyle.Bold );
             TextRenderer.DrawText(
                 g,
                 pkg.Name,
-                new Font(Font, FontStyle.Bold),
+                font,
                 new Point(bounds.X + 2, bounds.Y + 2),
                 foreColor,
                 TextFormatFlags.Default);
+            var size = TextRenderer.MeasureText( g, pkg.Name, font );
+            TextRenderer.DrawText(
+                g,
+                string.Format( "@{0}", pkg.Version ),
+                font,
+                new Point(( int ) ( bounds.X + 2 + size.Width ), bounds.Y + 2 ),
+                ColorUtils.Mix( ForeColor, BackColor, 6, 4 ),
+                TextFormatFlags.Default);
+

             TextRenderer.DrawText(
                 g,


Also translate direction in start instruction.

--- OsmSharp.Routing/Navigation/Osm/InstructionCarGenerator.cs
+++ OsmSharp.Routing/Navigation/Osm/InstructionCarGenerator.cs
@@ -114,9 +114,10 @@
                 var direction = Math.Geo.Meta.DirectionCalculator.Calculate(
                     new Math.Geo.GeoCoordinate(r.Segments[0].Latitude, r.Segments[0].Longitude),
                     new Math.Geo.GeoCoordinate(r.Segments[1].Latitude, r.Segments[1].Longitude));
+                var directionTranslated = languageReference[direction.ToInvariantString()];
                 instruction = new Instruction()
                 {
-                    Text = languageReference[string.Format("Start {0}.", direction.ToInvariantString())],
+                    Text = languageReference[string.Format("Start {0}.", directionTranslated)],
                     Type = "start",
                     Segment = 0
                 };


build: Incremented patch version,

build: Incremented patch version,

to indicate that this renames an item of build configuration.

--- build/SolutionInfo.cs
+++ build/SolutionInfo.cs
@@ -10,12 +10,11 @@
 [assembly: ComVisible(false)]
 [assembly: NeutralResourcesLanguage("en-US")]
 [assembly: AssemblyProduct("")]
-[assembly: AssemblyVersion("0.4.2")]
-[assembly: AssemblyInformationalVersion("0.4.2")]
+[assembly: AssemblyVersion("0.4.3")]
+[assembly: AssemblyInformationalVersion("0.4.3")]

 /*
- * Version 0.4.2
+ * Version 0.4.3
  *
- * - [Patch] Fixed that error message generated from github wasn't shown in
- *   build process
+ * - [Patch] Renamed CommonAssemblyInfo to SolutionInfo. (BREAKING-CHANGE)
  */


#120 - Fix small nullpointer

#120 - Fix small nullpointer

--- SoraBot/SoraBot.Bot/SoraBot.cs
+++ SoraBot/SoraBot.Bot/SoraBot.cs
@@ -154,7 +154,7 @@
             if (userCount > 0)
             {
                 // Check if channel is AFK channel
-                if (guild.AFKChannel.Id == player.VoiceChannel.Id)
+                if (guild.AFKChannel?.Id == player.VoiceChannel.Id)
                 {
                     // leave this shit
                     await _lavaNode.LeaveAsync(player.VoiceChannel);


transactions in the session

transactions in the session

--- Project/PhiloSoftware.Core.Infrastructure/Data/ISession.cs
+++ Project/PhiloSoftware.Core.Infrastructure/Data/ISession.cs
@@ -6,7 +6,7 @@

 namespace PhiloSoftware.Core.Infrastructure.Data
 {
-    public interface ISession
+    public interface ISession : IDisposable
     {
         void Add(IEntity ent);
         void Delete(IEntity ent);
@@ -14,5 +14,8 @@
         T GetByID<T>(Guid id) where T : IEntity;
         void DeleteByID<T>(Guid id) where T : IEntity;
         IQueryable<T> Query<T>() where T : IEntity;
+        void BeginTransaction();
+        void CommitTransaction();
+        void RollbackTransaction();
     }
 }