<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why does code collapse in threads? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/why-does-code-collapse-in-threads/m-p/1075434#M61560</link>
    <description>&lt;P&gt;Tell me about it... I have over 100 blog posts that got de-formatted &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 03 Jul 2021 23:49:46 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-07-03T23:49:46Z</dc:date>
    <item>
      <title>Why does code collapse in threads?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-code-collapse-in-threads/m-p/1075400#M61552</link>
      <description>&lt;P&gt;The title says it all. Why does code collapse from a vertical formatted structure to a horizontal unformatted structure when people reply with code? Is there anyway to view the original formatted code?&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 04:07:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-code-collapse-in-threads/m-p/1075400#M61552</guid>
      <dc:creator>LanceKirby2</dc:creator>
      <dc:date>2021-07-03T04:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why does code collapse in threads?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-code-collapse-in-threads/m-p/1075405#M61554</link>
      <description>&lt;P&gt;two reasons&lt;/P&gt;&lt;P&gt;first, people weren't using&amp;nbsp;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank" rel="noopener"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;to format their code&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;second, threads that pre-date the transition from "GeoNet" to "esri Community" were often collapsed because the pre-existing code formatting structure didn't carry forward, leaving most/many posts with their code flattened.&amp;nbsp; &amp;nbsp; Check the date of the pre-existing code, if it was before Nov 2020 it in all likelihood has flattened code.&amp;nbsp; You can copy and recover the code, but you will have to recreate the indentation levels while parsing into lines of code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example, from&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/python-blog/transect-lines-parallel-lines-offset-lines/ba-p/902792" target="_blank" rel="noopener"&gt;Transect lines, parallel lines, offset lines - Esri Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;rads = np.deg2rad(bearing)    dx = np.sin(rads) * dist    dy = np.cos(rads) * dist    #    n = len(bearing)    N = [N, n][n&amp;gt;1]  # either the number of lines or bearings‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;has to be reformatted to read&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;rads = np.deg2rad(bearing)    
dx = np.sin(rads) * dist    
dy = np.cos(rads) * dist    
#    
n = len(bearing)    
N = [N, n][n&amp;gt;1]  # either the number of lines or bearings;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 08:39:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-code-collapse-in-threads/m-p/1075405#M61554</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-07-03T08:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why does code collapse in threads?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-code-collapse-in-threads/m-p/1075427#M61558</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;. You are always very helpful.&lt;/P&gt;&lt;P&gt;That explains it all. Very unfortunate that happened in the transition as some code isn’t as simple to reformat as your example above.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 20:53:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-code-collapse-in-threads/m-p/1075427#M61558</guid>
      <dc:creator>LanceKirby2</dc:creator>
      <dc:date>2021-07-03T20:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why does code collapse in threads?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-code-collapse-in-threads/m-p/1075434#M61560</link>
      <description>&lt;P&gt;Tell me about it... I have over 100 blog posts that got de-formatted &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 23:49:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-code-collapse-in-threads/m-p/1075434#M61560</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-07-03T23:49:46Z</dc:date>
    </item>
  </channel>
</rss>

