Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

Text only

Cordova/Phonegap (iOS5, iOS6): Status bar offset problem, Webview height scrollbar

Just remove the device-height attribute on your meta viewport
https://snipt.net/embed/ef142d6f09b89dcdad66a3c70d886061/
https://snipt.net/raw/ef142d6f09b89dcdad66a3c70d886061/
ef142d6f09b89dcdad66a3c70d886061
text
Text only
1
2016-12-01T20:27:36
True
False
True
Jan 15, 2014 at 11:27 AM
/api/public/snipt/106094/
cordovaphonegap-ios5-ios6-status-bar-offset-problem-webview-height-scrollbar
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>Just remove the device-height attribute on your meta viewport </span></pre></div> </td></tr></table>
"status bar", cordova, height, ios, phonegap, webview

S

Calculates bmi based on either metric or standard inputs

1
2
3
4
5
6
bmi.calc <- function(weight, height, type=c("metric","standard")){
  type <- match.arg(type,c("metric","standard"))
  if(type=="metric") bmi <- weight / height^2
  if(type=="standard") bmi <- (weight * 703) / height^2
  return(bmi)
}
https://snipt.net/embed/e504b035e143f9ea8da1e58d8f60bfe8/
https://snipt.net/raw/e504b035e143f9ea8da1e58d8f60bfe8/
e504b035e143f9ea8da1e58d8f60bfe8
splus
S
6
2016-12-07T09:26:46
True
False
False
/api/public/snipt/28684/
calculates-bmi-based-on-either-metric-or-standard-inputs
<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> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>bmi.calc <span class="o">&lt;-</span> <span class="kr">function</span><span class="p">(</span>weight<span class="p">,</span> height<span class="p">,</span> type<span class="o">=</span><span class="kt">c</span><span class="p">(</span><span class="s">&quot;metric&quot;</span><span class="p">,</span><span class="s">&quot;standard&quot;</span><span class="p">)){</span> </span><span id="L-2"><a name="L-2"></a> type <span class="o">&lt;-</span> <span class="kp">match.arg</span><span class="p">(</span>type<span class="p">,</span><span class="kt">c</span><span class="p">(</span><span class="s">&quot;metric&quot;</span><span class="p">,</span><span class="s">&quot;standard&quot;</span><span class="p">))</span> </span><span id="L-3"><a name="L-3"></a> <span class="kr">if</span><span class="p">(</span>type<span class="o">==</span><span class="s">&quot;metric&quot;</span><span class="p">)</span> bmi <span class="o">&lt;-</span> weight <span class="o">/</span> height<span class="o">^</span><span class="m">2</span> </span><span id="L-4"><a name="L-4"></a> <span class="kr">if</span><span class="p">(</span>type<span class="o">==</span><span class="s">&quot;standard&quot;</span><span class="p">)</span> bmi <span class="o">&lt;-</span> <span class="p">(</span>weight <span class="o">*</span> <span class="m">703</span><span class="p">)</span> <span class="o">/</span> height<span class="o">^</span><span class="m">2</span> </span><span id="L-5"><a name="L-5"></a> <span class="kr">return</span><span class="p">(</span>bmi<span class="p">)</span> </span><span id="L-6"><a name="L-6"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
bmi, height, metric, standard, weight
Copyrighted, illegal, or inappropriate content? Email [email protected].