Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

JavaScript

Min max index

1
2
3
4
5
var lowValues = [11, 9, 11.5, 7, 11.5];
var highValues = [24, 17, 28, 12, 17];

var lowestPointIndex = lowValues.indexOf( Math.min.apply( Math, lowValues ) );
var highestPointIndex = highValues.indexOf( Math.max.apply( Math, highValues ) );
https://snipt.net/embed/d575560a8b2e600977ea05de32635933/
https://snipt.net/raw/d575560a8b2e600977ea05de32635933/
d575560a8b2e600977ea05de32635933
js
JavaScript
5
2016-12-08T02:16:10
True
False
False
Apr 28, 2014 at 05:49 PM
/api/public/snipt/133667/
min-max-index-472cf9ac
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="kd">var</span> <span class="nx">lowValues</span> <span class="o">=</span> <span class="p">[</span><span class="mi">11</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mf">11.5</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mf">11.5</span><span class="p">];</span> </span><span id="L-2"><a name="L-2"></a><span class="kd">var</span> <span class="nx">highValues</span> <span class="o">=</span> <span class="p">[</span><span class="mi">24</span><span class="p">,</span> <span class="mi">17</span><span class="p">,</span> <span class="mi">28</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">17</span><span class="p">];</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="kd">var</span> <span class="nx">lowestPointIndex</span> <span class="o">=</span> <span class="nx">lowValues</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span> <span class="nb">Math</span><span class="p">.</span><span class="nx">min</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span> <span class="nb">Math</span><span class="p">,</span> <span class="nx">lowValues</span> <span class="p">)</span> <span class="p">);</span> </span><span id="L-5"><a name="L-5"></a><span class="kd">var</span> <span class="nx">highestPointIndex</span> <span class="o">=</span> <span class="nx">highValues</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span> <span class="nb">Math</span><span class="p">.</span><span class="nx">max</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span> <span class="nb">Math</span><span class="p">,</span> <span class="nx">highValues</span> <span class="p">)</span> <span class="p">);</span> </span></pre></div> </td></tr></table>
max, min

CSS

IE max/min-width

1
2
3
4
5
div{
width: expression(document.body.clientWidth < 762? "760px" : document.body.clientWidth > 1242? "1240px" : "auto");
min-width: 760px;
max-width: 1240px;
}
https://snipt.net/embed/3dbc022bb8c3577b4148113dc66de008/
https://snipt.net/raw/3dbc022bb8c3577b4148113dc66de008/
3dbc022bb8c3577b4148113dc66de008
css
CSS
5
2016-12-09T06:20:07
True
False
False
/api/public/snipt/34580/
ie-maxmin-width
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">div</span><span class="p">{</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">width</span><span class="o">:</span> <span class="n">expression</span><span class="p">(</span><span class="n">document</span><span class="o">.</span><span class="n">body</span><span class="o">.</span><span class="n">clientWidth</span> <span class="o">&lt;</span> <span class="m">762</span><span class="o">?</span> <span class="s2">&quot;760px&quot;</span> <span class="o">:</span> <span class="n">document</span><span class="o">.</span><span class="n">body</span><span class="o">.</span><span class="n">clientWidth</span> <span class="o">&gt;</span> <span class="m">1242</span><span class="o">?</span> <span class="s2">&quot;1240px&quot;</span> <span class="o">:</span> <span class="s2">&quot;auto&quot;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="nb">min-width</span><span class="o">:</span> <span class="m">760px</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a><span class="nb">max-width</span><span class="o">:</span> <span class="m">1240px</span><span class="p">;</span> </span><span id="L-5"><a name="L-5"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
ie, max, min, width

ApacheConf

php.ini increase upload filesize

1
2
3
post_max_size = xxM
upload_max_filesize = xxM
max_execution_time = xx
https://snipt.net/embed/87fabe1cb0d828e04eba7f481be243ec/
https://snipt.net/raw/87fabe1cb0d828e04eba7f481be243ec/
87fabe1cb0d828e04eba7f481be243ec
apacheconf
ApacheConf
4
2016-12-02T18:28:20
True
False
False
/api/public/snipt/9481/
phpini-increase-upload-filesize
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">post_max_size</span> = xxM </span><span id="L-2"><a name="L-2"></a><span class="nb">upload_max_filesize</span> = xxM </span><span id="L-3"><a name="L-3"></a><span class="nb">max_execution_time</span> = xx </span></pre></div> </td></tr></table>
execution, filesize, increase, max, post, upload
Copyrighted, illegal, or inappropriate content? Email [email protected].