<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" >

  <channel>
    <title><![CDATA[Комментарии / Профиль code_panik]]></title>
    <link>https://habr.com/ru/users/code_panik/comments/</link>
    <description><![CDATA[Хабр: комментарии пользователя code_panik]]></description>
    <language>ru</language>
    <managingEditor>editor@habr.com</managingEditor>
    <generator>habr.com</generator>
    <pubDate>Sun, 03 May 2026 14:40:48 GMT</pubDate>
    
    
      <image>
        <link>https://habr.com/ru/</link>
        <url>https://habrastorage.org/webt/ym/el/wk/ymelwk3zy1gawz4nkejl_-ammtc.png</url>
        <title>Хабр</title>
      </image>
    

    
      

      
        
  
    <item>
      <title>29.12.2025 22:00:29 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/981698/#comment_29320886</guid>
      <link>https://habr.com/ru/articles/981698/#comment_29320886</link>
      <description><![CDATA[<p>Проверял с пк для нескольких сайтов, открывается только ютуб.</p>]]></description>
      <pubDate>Mon, 29 Dec 2025 22:00:29 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>02.04.2025 16:54:31 </title>
      <guid isPermaLink="true">https://habr.com/ru/news/896920/#comment_28124594</guid>
      <link>https://habr.com/ru/news/896920/#comment_28124594</link>
      <description><![CDATA[<p>По-моему, уже. По моему опыту и по другим многочисленным сообщениям происходящее очень похоже на работу над белыми списками. В нескольких федеральных округах ежедневно достаточно долго недоступны сайты cf, а когда доступны, тогда ютуб начинает работать. Можно считать, что новое дно достигнуто.</p>]]></description>
      <pubDate>Wed, 02 Apr 2025 16:54:31 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>30.03.2025 22:24:47 </title>
      <guid isPermaLink="true">https://habr.com/ru/companies/bothub/news/895874/#comment_28111454</guid>
      <link>https://habr.com/ru/companies/bothub/news/895874/#comment_28111454</link>
      <description><![CDATA[<blockquote><p>называл  </p></blockquote><p>Не называл <a href="https://knowyourmeme.com/memes/anime-was-a-mistake" rel="noopener noreferrer nofollow">https://knowyourmeme.com/memes/anime-was-a-mistake</a></p>]]></description>
      <pubDate>Sun, 30 Mar 2025 22:24:47 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>24.03.2025 23:07:46 </title>
      <guid isPermaLink="true">https://habr.com/ru/news/893868/#comment_28084720</guid>
      <link>https://habr.com/ru/news/893868/#comment_28084720</link>
      <description><![CDATA[<p>Впервые сталкиваюсь с тем, что РКН заблокировал примерно половину всех посещаемых сайтов! Даже на leetcode (Cloudflare) не попасть во время публикации комментария! Заблокированы, похоже все, сайты на Cloudflare, есть заблокированные на OVH. Провайдер РТ. К некоторым получалось подключиться со стоковым gdpi, поэтому можно считать, что виновник известен.</p>]]></description>
      <pubDate>Mon, 24 Mar 2025 23:07:46 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>27.02.2025 22:30:26 </title>
      <guid isPermaLink="true">https://habr.com/ru/companies/alfa/articles/885408/#comment_27981170</guid>
      <link>https://habr.com/ru/companies/alfa/articles/885408/#comment_27981170</link>
      <description><![CDATA[<blockquote><p>многие современные пользователи vi переназначают почти неиспользуемую клавишу Caps Lock для смены режимов редактора. Это ускоряет работу и делает её удобнее, особенно учитывая частое использование клавиши Escape.  </p></blockquote><p>Намного удобнее использовать альтернативу LCtrl+[ или для одинарного действия LСtrl+o.</p><p></p>]]></description>
      <pubDate>Thu, 27 Feb 2025 22:30:26 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>07.10.2024 13:16:45 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/848662/#comment_27388186</guid>
      <link>https://habr.com/ru/articles/848662/#comment_27388186</link>
      <description><![CDATA[<p>Видимо, потому что класс TextureDX12 до виртуальности был оберткой над умным указателем. Хотя код не выглядит безопасным, потому что shared_ptr - не pod. И дизайн такой, что после случайного повторного вызова init память потечет. Если естественное начальное состояние nullptr, можно было в класс добавить инициализацию.</p>]]></description>
      <pubDate>Mon, 07 Oct 2024 13:16:45 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>29.06.2024 21:52:25 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/825466/#comment_26987364</guid>
      <link>https://habr.com/ru/articles/825466/#comment_26987364</link>
      <description><![CDATA[<blockquote><p>всегда есть более органичные способы монетизации  </p></blockquote><p>Что такое органичные? Например?</p>]]></description>
      <pubDate>Sat, 29 Jun 2024 21:52:25 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>20.06.2024 01:12:31 </title>
      <guid isPermaLink="true">https://habr.com/ru/companies/pvs-studio/articles/822911/#comment_26953056</guid>
      <link>https://habr.com/ru/companies/pvs-studio/articles/822911/#comment_26953056</link>
      <description><![CDATA[<p>Код выглядит так из-за санитайзера. Компилятор с включенной опцией -fsanitize=undefined добавляет в исходный код нужные ему проверки. По теме есть лекция от разработчика asan <a href="https://www.lektorium.tv/lecture/23702" rel="noopener noreferrer nofollow">https://www.lektorium.tv/lecture/23702</a></p>]]></description>
      <pubDate>Thu, 20 Jun 2024 01:12:31 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>20.06.2024 00:49:21 </title>
      <guid isPermaLink="true">https://habr.com/ru/news/822831/#comment_26953042</guid>
      <link>https://habr.com/ru/news/822831/#comment_26953042</link>
      <description><![CDATA[<p>Казалось смешным, пока не вспомнил, что храню остатки урожая чеснока в масле в банке в холодильнике с температурой около 4 градусов. В тепле не оставлял, и чеснок полностью раздавлен. Использую только для жарки, и только сейчас дошло, что варианты с заправкой отпадают. А ведь это очень распространенный рецепт.</p>]]></description>
      <pubDate>Thu, 20 Jun 2024 00:49:21 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>15.04.2024 17:14:10 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/806851/#comment_26727693</guid>
      <link>https://habr.com/ru/articles/806851/#comment_26727693</link>
      <description><![CDATA[<p>Хабр упорно не давал отправить личное сообщение, поэтому пишу сюда возможные неточности:</p><blockquote><p>Например, мы хотим первой картой получить десятку треф, вероятность этого события в случайно собранной колоде будет 1/36, но шанс получить этой же карты на втором эксперименте будет уже 1/35.</p><ul><li><p>Если нужно вытащить ровно на втором ходу, то вероятность события - это произведение вероятностей: &lt;не вытащить на первом&gt; * &lt;вытащить на втором&gt; = 35/36 * 1/35 = 1/36.</p></li></ul></blockquote><blockquote><p></p><p>Шанс получить десятку треф на втором ходе будет (1/36 + 1/35).</p><ul><li><p>Это предложение по смыслу повторяет предыдущее. Но если нужно вытащить за два хода, то вероятность равна: &lt;вытащить на первом&gt; + &lt;вытащить ровно на втором (выше)&gt; = 2/36. Это же проверяется другой формулой: &lt;вытащить за два хода&gt; = 1 - &lt;не вытащить за два хода&gt; = 1 - &lt;не вытащить на первом&gt; * &lt;не вытащить на втором&gt; = 1 - 35/36 * 34/35 = 1 - 34/36 = 2/36</p></li></ul></blockquote><p></p>]]></description>
      <pubDate>Mon, 15 Apr 2024 17:14:10 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>19.02.2024 09:01:48 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/794556/#comment_26519246</guid>
      <link>https://habr.com/ru/articles/794556/#comment_26519246</link>
      <description><![CDATA[<p>У Shell sort опечатка в асимптотиках - квадрат относится только к логарифму. Ещё википедия говорит, что сортировка имеет O(nlogn) или O(nlog^2(n)) в лучшем случае (в зависимости от выбора шага) и до O(n^2) в худшем, <a href="https://en.wikipedia.org/wiki/Shellsort" rel="noopener noreferrer nofollow">https://en.wikipedia.org/wiki/Shellsort</a>.</p>]]></description>
      <pubDate>Mon, 19 Feb 2024 09:01:48 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>24.01.2024 11:57:19 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/787776/#comment_26417382</guid>
      <link>https://habr.com/ru/articles/787776/#comment_26417382</link>
      <description><![CDATA[<blockquote><p>UPD тут даже интереснее.  </p></blockquote><p>Можно только предполагать, что произойдет, потому что race condition - ub. Ответил ниже&nbsp;<a href="https://habr.com/ru/articles/787776/comments/#comment_26417306" rel="noopener noreferrer nofollow">https://habr.com/ru/articles/787776/comments/#comment_26417306</a>.  </p>]]></description>
      <pubDate>Wed, 24 Jan 2024 11:57:19 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>24.01.2024 11:53:59 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/787776/#comment_26417352</guid>
      <link>https://habr.com/ru/articles/787776/#comment_26417352</link>
      <description><![CDATA[<p>Я имел в виду синхронизацию с join, но ошибка раньше - ответил ниже <a href="https://habr.com/ru/articles/787776/comments/#comment_26417306" rel="noopener noreferrer nofollow">https://habr.com/ru/articles/787776/comments/#comment_26417306</a>.</p>]]></description>
      <pubDate>Wed, 24 Jan 2024 11:53:59 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>24.01.2024 11:44:33 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/787776/#comment_26417306</guid>
      <link>https://habr.com/ru/articles/787776/#comment_26417306</link>
      <description><![CDATA[<p>upd: Спасибо <a class="mention" href="/users/leetcode_monkey">@LeetCode_Monkey</a> и <a class="mention" href="/users/qw1">@qw1</a> за то, что отметили ошибку в моем комментарии. Не обратил внимание, что в третьем примере гонка, а значит ub, возникает уже при вставке первого элемента в main. То есть недостаточно делать reserve и использовать индексы. Из головы вылетело простое правило, что std::vector не является потокобезопасным, поэтому изменение vector в нескольких потоках без синхронизации - ub.</p><p>В третьем примере vector следует полностью строить в main, т.к. функция в конечном итоге ждет завершения всех потоков.</p>]]></description>
      <pubDate>Wed, 24 Jan 2024 11:44:33 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>23.01.2024 15:42:20 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/787776/#comment_26413596</guid>
      <link>https://habr.com/ru/articles/787776/#comment_26413596</link>
      <description><![CDATA[<p>С memory_order здесь нет ребусов. По умолчанию это<code>memory_order_seq_cst.</code></p>]]></description>
      <pubDate>Tue, 23 Jan 2024 15:42:20 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>23.01.2024 15:39:56 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/787776/#comment_26413580</guid>
      <link>https://habr.com/ru/articles/787776/#comment_26413580</link>
      <description><![CDATA[<p>Пример кода <a href="https://godbolt.org/z/q7xj4x1zo" rel="noopener noreferrer nofollow">https://godbolt.org/z/q7xj4x1zo</a>, </p><pre><code class="cpp">#include &lt;thread&gt;
#include &lt;vector&gt;
using namespace std;

void func() {
    for (int i = 0; i &lt; 100; ++i);
}

int main()
{   
    const int nworkers = 5; 
    vector&lt;thread&gt; threads;
    threads.reserve(nworkers + 1);    
    threads.emplace_back([&amp;threads, nworkers]{
        for (int i = 0; i &lt; nworkers; ++i)
            threads.emplace_back(func);        
    });
    for (int i = 0; i &lt; nworkers + 1; ++i)
        threads[i].join();
    return 0;
}</code></pre><p>Можно. threads[0] добавляется в main. Основной поток с main остановится на первом join(), пока не завершится threads[0], к завершению которого вектор будет построен.</p>]]></description>
      <pubDate>Tue, 23 Jan 2024 15:39:56 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>23.01.2024 01:14:58 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/787910/#comment_26410308</guid>
      <link>https://habr.com/ru/articles/787910/#comment_26410308</link>
      <description><![CDATA[<p>pitch d... - pitch deck</p>]]></description>
      <pubDate>Tue, 23 Jan 2024 01:14:58 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>21.01.2024 19:58:45 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/787776/#comment_26405666</guid>
      <link>https://habr.com/ru/articles/787776/#comment_26405666</link>
      <description><![CDATA[<p>В первом примере дважды допускается одна и та же ошибка - возврат ссылки на локальную переменную функции. Упрощенно <a href="https://godbolt.org/z/Ybcn3n1va" rel="noopener noreferrer nofollow">https://godbolt.org/z/Ybcn3n1va</a>. Сначала параметр v конструктора возвращаемого объекта ссылается на локальную переменную arg функции arg. Затем поле value ссылается на локальную переменную v конструктора named_arg.</p><p>В третьем примере можно было использовать vector::reserve(), чтобы гарантировать отсутствие реалокаций, и индексы вместо итераторов для корректного определения начала и конца вектора.</p><p></p>]]></description>
      <pubDate>Sun, 21 Jan 2024 19:58:45 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>10.12.2023 15:07:57 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/779482/#comment_26250922</guid>
      <link>https://habr.com/ru/articles/779482/#comment_26250922</link>
      <description><![CDATA[<blockquote><p>я не соблюдаю префиксы в именах переменных указывающих на их тип.  </p></blockquote><p>Такое легаси, <a href="https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rl-name-type" rel="noopener noreferrer nofollow">https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rl-name-type</a></p>]]></description>
      <pubDate>Sun, 10 Dec 2023 15:07:57 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

  
    <item>
      <title>10.12.2023 15:03:07 </title>
      <guid isPermaLink="true">https://habr.com/ru/articles/779482/#comment_26250902</guid>
      <link>https://habr.com/ru/articles/779482/#comment_26250902</link>
      <description><![CDATA[<p>Движок 2d или 3d?</p>]]></description>
      <pubDate>Sun, 10 Dec 2023 15:03:07 GMT</pubDate>
      <dc:creator><![CDATA[]]></dc:creator>
    </item>
  

      

      

    
  </channel>
</rss>
