{"id":330903,"date":"2022-03-22T09:00:14","date_gmt":"2022-03-22T09:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=330903"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=330903","title":{"rendered":"<span>\u00ab\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a\u00bb \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043e\u043a \u0432 Unity, ASP.NET Core \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/3fe\/5fd\/3dc\/3fe5fd3dc8aca05b6ebeb55900ff5f33.png\" alt=\"0928_OrderBy_Errors_ru\/image1.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3fe\/5fd\/3dc\/3fe5fd3dc8aca05b6ebeb55900ff5f33.png\"\/><br \/>  \u0415\u0441\u0442\u044c \u043c\u043d\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u043f\u044b\u0442\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. \u041e\u0448\u0438\u0431\u043a\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f? \u0420\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0443\u043b\u0435\u0432\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a? \u041d\u0435\u0442, \u044d\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u043f\u0440\u043e \u043d\u0430\u0441\u2026 \ud83d\ude09 \u041a\u0441\u0442\u0430\u0442\u0438, \u0430 \u0447\u0442\u043e \u043d\u0430\u0441\u0447\u0451\u0442 \u043e\u0448\u0438\u0431\u043e\u043a \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438? \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u043f\u043e\u043d\u044f\u043b\u0438 \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u0441 \u044d\u0442\u0438\u043c \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"orderbyorderby\">OrderBy(&#8230;).OrderBy(&#8230;)<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u0432 C# \u0442\u0430\u043a\u043e\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043e\u0448\u0438\u0431\u043a\u0438 \u2014 \u043f\u0440\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043f\u043e\u0434\u0440\u044f\u0434 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u043c\u0435\u0442\u043e\u0434 <em>OrderBy<\/em>. \u041d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u2014 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u0443\u044e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u0438\u043f (<em>Wrapper<\/em>) \u0441 \u0434\u0432\u0443\u043c\u044f \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 (<em>Primary<\/em> \u0438 <em>Secondary<\/em>). \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443, \u0437\u0430\u0442\u0435\u043c \u2014 \u043f\u043e \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u043c\u0443.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">class Wrapper {   public int Primary { get; init; }   public int Secondary { get; init; } }  var arr = new Wrapper[] {   new() { Primary = 1, Secondary = 2 },   new() { Primary = 0, Secondary = 1 },   new() { Primary = 2, Secondary = 1 },   new() { Primary = 2, Secondary = 0 },   new() { Primary = 0, Secondary = 2 },   new() { Primary = 0, Secondary = 3 }, };  var sorted = arr.OrderBy(p => p.Primary)                 .OrderBy(p => p.Secondary);  foreach (var wrapper in sorted) {   Console.WriteLine($\"Primary: {wrapper.Primary}                        Secondary: {wrapper.Secondary}\"); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">Primary: 2 Secondary: 0 Primary: 0 Secondary: 1 Primary: 2 Secondary: 1 Primary: 0 Secondary: 2 Primary: 1 Secondary: 2 Primary: 0 Secondary: 3<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443, \u043d\u043e \u043d\u0435 \u043f\u043e \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u043c\u0443. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u044f \u0431\u044b \u0440\u0430\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 &#171;\u043c\u043d\u043e\u0433\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0443\u044e&#187; \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u0432 C#, \u0442\u043e \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u0432 \u0447\u0451\u043c \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u0434\u0432\u043e\u0445.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430, \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <em>OrderBy<\/em> \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u043e\u0432 <em>OrderBy(&#8230;).ThenBy(&#8230;)<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">var sorted = arr.OrderBy(p => p.Primary)                 .ThenBy(p => p.Secondary);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">Primary: 0 Secondary: 1 Primary: 0 Secondary: 2 Primary: 0 Secondary: 3 Primary: 1 Secondary: 2 Primary: 2 Secondary: 0 Primary: 2 Secondary: 1<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 <em>ThenBy<\/em> \u043d\u0430 <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/system.linq.enumerable.thenby?view=net-6.0\">docs.microsoft.com<\/a> \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443: <em>Because IOrderedEnumerable&lt;TElement> inherits from IEnumerable&lt;T>, you can call OrderBy or OrderByDescending on the results of a call to OrderBy, OrderByDescending, ThenBy or ThenByDescending. Doing this introduces a new primary ordering that ignores the previously established ordering.<\/em><\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043f\u0440\u043e\u0448\u0451\u043b\u0441\u044f \u043f\u043e C# \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c \u043d\u0430 GitHub \u0438 \u043f\u043e\u0433\u043e\u043d\u044f\u043b \u0438\u0445 \u043a\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/pvs-studio.com\/ru\/\">PVS-Studio<\/a>. \u0412 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u043a\u0430\u043a \u0440\u0430\u0437 \u0435\u0441\u0442\u044c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u043d\u0430 \u0442\u0435\u043c\u0443 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <em>OrderBy<\/em> \u2014<a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v3078\/\">V3078<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0418 \u0447\u0442\u043e, \u043d\u0435\u0443\u0436\u0435\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438? \u041d\u0443, \u043a\u0430\u043a \u0432\u0430\u043c \u0441\u043a\u0430\u0437\u0430\u0442\u044c\u2026 \ud83d\ude42<\/p>\n<p>  <\/p>\n<h2 id=\"primery-iz-open-source-proektov\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437 open source \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/h2>\n<p>  <\/p>\n<h3 id=\"unity\">Unity<\/h3>\n<p>  <\/p>\n<p>\u0412 Unity \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u0440\u0430\u0437\u0443 2 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  <\/p>\n<p><strong>\u041f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">private List&lt;T> GetChildrenRecursively(bool sorted = false,                                         List&lt;T> result = null) {   if (result == null)     result = new List&lt;T>();    if (m_Children.Any())   {     var children        = sorted ?            (IEnumerable&lt;MenuItemsTree&lt;T>>)m_Children.OrderBy(c => c.key)                                                    .OrderBy(c => c.m_Priority)                 : m_Children;     ....   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/Unity-Technologies\/UnityCsReference\/blob\/9cd0206219e86ba3cbc4af8dca504237e6092694\/Editor\/Mono\/EditorMode\/MenuService.cs#L499\">\u041a\u043e\u0434 \u043d\u0430 GitHub<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u0445\u043e\u0442\u0435\u043b\u0438 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e <em>m_Children<\/em> \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0443 (<em>c.key<\/em>), \u0437\u0430\u0442\u0435\u043c \u2014 \u043f\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0443 (<em>c.priority<\/em>). \u041e\u0434\u043d\u0430\u043a\u043e \u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0443.<\/p>\n<p>  <\/p>\n<p><strong>\u0412\u0442\u043e\u0440\u043e\u0435 \u043c\u0435\u0441\u0442\u043e<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">static class SelectorManager {   public static List&lt;SearchSelector> selectors { get; private set; }   ....   internal static void RefreshSelectors()   {     ....     selectors        = ReflectionUtils.LoadAllMethodsWithAttribute(           generator,            supportedSignatures,            ReflectionUtils.AttributeLoaderBehavior.DoNotThrowOnValidation)                        .Where(s => s.valid)                        .OrderBy(s => s.priority)                        .OrderBy(s => string.IsNullOrEmpty(s.provider))                        .ToList();   } }<\/code><\/pre>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/Unity-Technologies\/UnityCsReference\/blob\/9cd0206219e86ba3cbc4af8dca504237e6092694\/Modules\/QuickSearch\/Editor\/Selectors\/SearchSelector.cs#L177\">\u041a\u043e\u0434 \u043d\u0430 GitHub<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043a\u043b\u044e\u0447\u043e\u043c \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u043b\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b (<em>s.provider<\/em>). \u041d\u043e, \u043a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431 \u043e\u0431\u0435\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445 \u044f \u0441\u043e\u043e\u0431\u0449\u0438\u043b \u0447\u0435\u0440\u0435\u0437 Unity Bug Reporter. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 QA \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0431\u044b\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b 2 issues: <\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/issuetracker.unity3d.com\/issues\/orderby-function-called-in-menuservice-dot-cs-instead-of-thenby\">issue #1<\/a>;<\/li>\n<li><a href=\"https:\/\/issuetracker.unity3d.com\/issues\/orderby-function-called-in-searchselector-dot-cs-instead-of-thenby\">issue #2<\/a>. <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043f\u043e \u043d\u0438\u043c \u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u2013 \u0436\u0434\u0451\u043c.<\/p>\n<p>  <\/p>\n<h3 id=\"aspnet-core\">ASP.NET Core<\/h3>\n<p>  <\/p>\n<p>\u0412 ASP.NET Core \u043d\u0430\u0448\u043b\u043e\u0441\u044c 3 \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u044b\u0437\u043e\u0432\u044b <em>OrderBy<\/em>. \u0412\u0441\u0435 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 KnownHeaders.cs.<\/p>\n<p>  <\/p>\n<p><strong>\u041f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">RequestHeaders = commonHeaders.Concat(new[] {   HeaderNames.Authority,   HeaderNames.Method,   .... } .Concat(corsRequestHeaders) .OrderBy(header => header) .OrderBy(header => !requestPrimaryHeaders.Contains(header)) ....<\/code><\/pre>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/dotnet\/aspnetcore\/blob\/3b8ce2746c6835690a4e1b9c97e3a9ea43844909\/src\/Servers\/Kestrel\/shared\/KnownHeaders.cs#L147\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043e\u0434 \u043d\u0430 GitHub<\/a>.<\/p>\n<p>  <\/p>\n<p><strong>\u0412\u0442\u043e\u0440\u043e\u0435 \u043c\u0435\u0441\u0442\u043e<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">ResponseHeaders = commonHeaders.Concat(new[] {   HeaderNames.AcceptRanges,   HeaderNames.Age,   .... }) .Concat(corsResponseHeaders) .OrderBy(header => header) .OrderBy(header => !responsePrimaryHeaders.Contains(header)) ....<\/code><\/pre>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/dotnet\/aspnetcore\/blob\/3b8ce2746c6835690a4e1b9c97e3a9ea43844909\/src\/Servers\/Kestrel\/shared\/KnownHeaders.cs#L216\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043e\u0434 \u043d\u0430 GitHub<\/a>.<\/p>\n<p>  <\/p>\n<p><strong>\u0422\u0440\u0435\u0442\u044c\u0435 \u043c\u0435\u0441\u0442\u043e<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">ResponseTrailers = new[] {   HeaderNames.ETag,   HeaderNames.GrpcMessage,   HeaderNames.GrpcStatus } .OrderBy(header => header) .OrderBy(header => !responsePrimaryHeaders.Contains(header)) ....<\/code><\/pre>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/dotnet\/aspnetcore\/blob\/3b8ce2746c6835690a4e1b9c97e3a9ea43844909\/src\/Servers\/Kestrel\/shared\/KnownHeaders.cs#L241\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043e\u0434 \u043d\u0430 GitHub<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0430\u0442\u0442\u0435\u0440\u043d \u0432\u0435\u0437\u0434\u0435 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435, \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u0412\u0441\u0435 \u0442\u0440\u0438 \u0441\u043b\u0443\u0447\u0430\u044f \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0432 <a href=\"https:\/\/github.com\/dotnet\/aspnetcore\/issues\/40062\">issue<\/a> \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. <\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043d\u0435 \u0431\u0430\u0433, \u043d\u043e \u043a\u043e\u0434 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438. <a href=\"https:\/\/github.com\/dotnet\/aspnetcore\/pull\/40410\/commits\/4f0a8570d550056511a1a0df51cd09a42353f0b7\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043b\u0443\u0447\u0448\u0435 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u2013 \u043e\u043d \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b.<\/p>\n<p>  <\/p>\n<h3 id=\"cosmosos-il2cpu\">CosmosOS (IL2CPU)<\/h3>\n<p>  <\/p>\n<pre><code class=\"cs\">private Dictionary&lt;MethodBase, int?> mBootEntries; private void LoadBootEntries() {   ....   mBootEntries = mBootEntries.OrderBy(e => e.Value)                              .OrderByDescending(e => e.Value.HasValue)                              .ToDictionary(e => e.Key, e => e.Value);   .... }<\/code><\/pre>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/CosmosOS\/IL2CPU\/blob\/a85d287fc31d73dcc8028bb39d01a1b21f040723\/source\/Cosmos.IL2CPU\/CompilerEngine.cs#L462\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043e\u0434 \u043d\u0430 GitHub<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043f\u043e \u043f\u043e\u043b\u044f\u043c \u0442\u0438\u043f\u0430 <em>int?<\/em>. \u042f \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043b <a href=\"https:\/\/github.com\/CosmosOS\/IL2CPU\/issues\/143\">issue<\/a> \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <em>OrderByDescending<\/em> \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u043b\u0438. \u041a\u043e\u043c\u043c\u0438\u0442 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/CosmosOS\/IL2CPU\/pull\/144\/commits\/037ccd6c91555ca6be43e751fcc2620e6f4c3f4d\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<h3 id=\"grandnode\">GrandNode<\/h3>\n<p>  <\/p>\n<pre><code class=\"cs\">public IEnumerable&lt;IMigration> GetCurrentMigrations() {   var currentDbVersion = new DbVersion(int.Parse(GrandVersion.MajorVersion),                                         int.Parse(GrandVersion.MinorVersion));    return GetAllMigrations()            .Where(x => currentDbVersion.CompareTo(x.Version) >= 0)            .OrderBy(mg => mg.Version.ToString())            .OrderBy(mg => mg.Priority)            .ToList(); }<\/code><\/pre>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/grandnode\/grandnode2\/blob\/45c9ee49cea2e97efc5b4035f60f583e5ad848e4\/src\/Core\/Grand.Infrastructure\/Migrations\/MigrationManager.cs#L40\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043e\u0434 \u043d\u0430 GitHub<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0425\u043e\u0442\u0435\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e \u0432\u0435\u0440\u0441\u0438\u0438, \u0437\u0430\u0442\u0435\u043c \u2014 \u043f\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0443. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0443. <\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043e\u0442\u043a\u0440\u044b\u043b <a href=\"https:\/\/github.com\/grandnode\/grandnode2\/issues\/237\">issue<\/a>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 <em>OrderBy<\/em> \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u043d\u0430 <em>ThenBy<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">.OrderBy(mg => mg.Version.ToString()) .ThenBy(mg => mg.Priority)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u043c\u0438\u0442 \u0441 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/grandnode\/grandnode2\/commit\/e80894374940fd49953acb9f464c163c77e85f9d\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<h2 id=\"chelovecheskiy-faktor\">\u0427\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0430\u043a\u0442\u043e\u0440?<\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u043e\u043f\u044b\u0442\u0430. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b\u0437\u043e\u0432 <em>OrderBy(&#8230;).OrderBy(&#8230;)<\/em> \u2014 \u043d\u0435 \u0438\u0437 \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445. \u041e\u0442\u043a\u0443\u0434\u0430 \u0442\u043e\u0433\u0434\u0430 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b?<\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0443 \u043c\u0435\u043d\u044f 2 \u0442\u0435\u043e\u0440\u0438\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043f\u0435\u0440\u0432\u0430\u044f \u2014 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0438\u0433\u0440\u0430\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u043f\u044b\u0442\u0430. \u0415\u0441\u043b\u0438 \u043a\u043e\u0434 \u043f\u0438\u0448\u0435\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0441 \u044d\u0442\u0438\u043c \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0438 \u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b. \ud83d\ude42<\/li>\n<li>\u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0430\u043a\u0442\u043e\u0440. \u041c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043b\u044e\u0434\u044f\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u043e <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0509\/\">\u043e\u0448\u0438\u0431\u0430\u0442\u044c\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/a>, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0260\/\">\u044d\u0444\u0444\u0435\u043a\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438<\/a>, \u0447\u0430\u0441\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437-\u0437\u0430 copy-paste. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 <em>OrderBy<\/em> \u2014 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u043e\u0440\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0433\u0443\u0442 \u0443\u0441\u043a\u043e\u043b\u044c\u0437\u043d\u0443\u0442\u044c, \u0442\u043e \u043e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u2014 \u0443\u0436\u0435 \u043c\u0430\u043b\u043e\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e. \u0417\u0434\u043e\u0440\u043e\u0432\u043e, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 IDE \u0438\u043b\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d, \u0430 \u0435\u0449\u0451 \u043b\u0443\u0447\u0448\u0435, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u0442\u0430\u043c, \u0438 \u0442\u0430\u043c. <\/p>\n<p>  <\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u043e\u0438\u0441\u043a \u043e\u0448\u0438\u0431\u043e\u043a. \ud83d\ude42<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u0434\u043e\u0431\u0440\u043e\u0439 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/twitter.com\/_SergVasiliev_\">\u043c\u0435\u043d\u044f \u0432 Twitter<\/a>, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Sergey Vasiliev. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/csharp\/0928\/\">&#171;Developers don&#8217;t make silly errors&#187; by the example of sorting in Unity, ASP.NET Core, and more<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/company\/pvs-studio\/blog\/656815\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0421\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u043b\u0438 \u0432\u044b \u0441 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c \u043e\u0448\u0438\u0431\u043a\u0438?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             40%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0414\u0430<\/span> <span class=\"tm-article-poll__answer-votes\">             2           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:40%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             60%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442<\/span> <span class=\"tm-article-poll__answer-votes\">             3           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:60%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 5 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 2 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.      <\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/656815\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/656815\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/3fe\/5fd\/3dc\/3fe5fd3dc8aca05b6ebeb55900ff5f33.png\" alt=\"0928_OrderBy_Errors_ru\/image1.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3fe\/5fd\/3dc\/3fe5fd3dc8aca05b6ebeb55900ff5f33.png\"\/><br \/>  \u0415\u0441\u0442\u044c \u043c\u043d\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u043f\u044b\u0442\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. \u041e\u0448\u0438\u0431\u043a\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f? \u0420\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0443\u043b\u0435\u0432\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a? \u041d\u0435\u0442, \u044d\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u043f\u0440\u043e \u043d\u0430\u0441\u2026 \ud83d\ude09 \u041a\u0441\u0442\u0430\u0442\u0438, \u0430 \u0447\u0442\u043e \u043d\u0430\u0441\u0447\u0451\u0442 \u043e\u0448\u0438\u0431\u043e\u043a \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438? \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u043f\u043e\u043d\u044f\u043b\u0438 \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u0441 \u044d\u0442\u0438\u043c \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-330903","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=330903"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330903\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}