<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: gangls</title>
    <description>The latest articles on DEV Community by gangls (@gangls).</description>
    <link>https://dev.to/gangls</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1043703%2Fbbd98118-6a30-40e4-ac59-c54fa09f0b35.png</url>
      <title>DEV Community: gangls</title>
      <link>https://dev.to/gangls</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gangls"/>
    <language>en</language>
    <item>
      <title>Answer: How to get the difference between two arrays in JavaScript?</title>
      <dc:creator>gangls</dc:creator>
      <pubDate>Tue, 28 Nov 2023 02:17:16 +0000</pubDate>
      <link>https://dev.to/gangls/answer-how-to-get-the-difference-between-two-arrays-in-javascript-34ha</link>
      <guid>https://dev.to/gangls/answer-how-to-get-the-difference-between-two-arrays-in-javascript-34ha</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AoTUKOcU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/1187518/how-to-get-the-difference-between-two-arrays-in-javascript/33034768#33034768" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: How to get the difference between two arrays in JavaScript?
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Oct  9 '15&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/1187518/how-to-get-the-difference-between-two-arrays-in-javascript/33034768#33034768" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeieW07A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          2882
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2-sXgSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes" rel="noreferrer"&gt;&lt;code&gt;Array.prototype.includes()&lt;/code&gt;&lt;/a&gt; (ES2016/ ES7) comes in handy here.&lt;/p&gt;

&lt;h3&gt;Intersection&lt;/h3&gt;
&lt;pre class="lang-js prettyprint-override"&gt;&lt;code&gt;let intersection = arr1.filter(x =&amp;gt; arr2.includes(x))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="https://i.stack.imgur.com/uasoX.png" rel="noreferrer"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MLt8Ma99--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.stack.imgur.com/uasoX.png" alt="Intersection Venn Diagram"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Yields values which are present in both &lt;code&gt;arr1&lt;/code&gt; and &lt;code&gt;arr2&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;[1,2,3]&lt;/code&gt; and &lt;code&gt;[2,3]&lt;/code&gt; will yield &lt;code&gt;[2,3]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;[1,2,3]&lt;/code&gt; and &lt;code&gt;[2,3,5]&lt;/code&gt; will &lt;em&gt;also&lt;/em&gt; yield &lt;code&gt;[2,3]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Difference&lt;/h3&gt;
&lt;p&gt;(Values in just A.)&lt;/p&gt;
&lt;pre class="lang-js prettyprint-override"&gt;&lt;code&gt;let difference = arr1.filter(x =&amp;gt; !arr2.includes(x));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="https://i.stack.imgur.com/mEtro.png" rel="noreferrer"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Q25UH3oO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.stack.imgur.com/mEtro.png" alt="Right difference Venn Diagram"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Yields…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/1187518/how-to-get-the-difference-between-two-arrays-in-javascript/33034768#33034768" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Link innerHTML</title>
      <dc:creator>gangls</dc:creator>
      <pubDate>Mon, 19 Jun 2023 04:37:52 +0000</pubDate>
      <link>https://dev.to/gangls/link-innerhtml-251p</link>
      <guid>https://dev.to/gangls/link-innerhtml-251p</guid>
      <description>&lt;p&gt;content includes &amp;amp;curren can change to * &lt;/p&gt;

&lt;p&gt;link.innerHTML = linkString.replace('&amp;amp;', "&amp;amp;amp");&lt;/p&gt;

</description>
    </item>
    <item>
      <title>css-display-none-and-visibility-hidden-the-difference</title>
      <dc:creator>gangls</dc:creator>
      <pubDate>Fri, 16 Jun 2023 06:59:55 +0000</pubDate>
      <link>https://dev.to/gangls/css-display-none-and-visibility-hidden-the-difference-4gmj</link>
      <guid>https://dev.to/gangls/css-display-none-and-visibility-hidden-the-difference-4gmj</guid>
      <description>&lt;p&gt;&lt;a href="https://www.freecodecamp.org/news/css-display-none-and-visibility-hidden-the-difference/"&gt;css-display-none-and-visibility-hidden-the-difference&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>password 正则预检</title>
      <dc:creator>gangls</dc:creator>
      <pubDate>Wed, 14 Jun 2023 10:43:48 +0000</pubDate>
      <link>https://dev.to/gangls/password-450</link>
      <guid>https://dev.to/gangls/password-450</guid>
      <description>&lt;p&gt;8-16字符&lt;br&gt;
至少1数字字符&lt;br&gt;
至少1小写字母&lt;br&gt;
至少1大写字母&lt;br&gt;
至少1特殊字符&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\w\s]).{8,}$/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Answer: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory in Ionic 3</title>
      <dc:creator>gangls</dc:creator>
      <pubDate>Sun, 12 Mar 2023 14:21:52 +0000</pubDate>
      <link>https://dev.to/gangls/answer-fatal-error-ineffective-mark-compacts-near-heap-limit-allocation-failed-javascript-heap-out-of-memory-in-ionic-3-j4</link>
      <guid>https://dev.to/gangls/answer-fatal-error-ineffective-mark-compacts-near-heap-limit-allocation-failed-javascript-heap-out-of-memory-in-ionic-3-j4</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Gn-iPj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/53230823/fatal-error-ineffective-mark-compacts-near-heap-limit-allocation-failed-javas/59572966#59572966" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory in Ionic 3
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jan  3 '20&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/53230823/fatal-error-ineffective-mark-compacts-near-heap-limit-allocation-failed-javas/59572966#59572966" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y9mJpuJP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          550
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wif5Zq3z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;For a non-Angular general answer for those who land on this question from Google:&lt;/p&gt;
&lt;p&gt;Most times when you face this error it’s probably because of a memory leak, an addition/version upgrade of a library or a difference in how Node.js manages memory between versions (e.g. Node.js version &amp;lt;=  10 and…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/53230823/fatal-error-ineffective-mark-compacts-near-heap-limit-allocation-failed-javas/59572966#59572966" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
  </channel>
</rss>
