Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am pfhayes on github.
  • I am pfhayes (https://keybase.io/pfhayes) on keybase.
  • I have a public key whose fingerprint is E718 ACF1 DC25 D114 3823 5E6E 194E 29C1 1448 0134

To claim this, I am signing this object:

import scala.util.Random
val random = new Random()
def dollarCostValue(initialCapital: Double, prices: List[Double]): Double = {
val closingPrice = prices.last
val dailySpend = initialCapital / prices.length
val sharesOwned = prices.map(dailySpend / _).sum
sharesOwned * closingPrice
}
@pfhayes
pfhayes / gist:1719188
Created February 1, 2012 20:41
Adding two-language support to Wiktionary
index 5c7f5ef..07d8676 100644
--- a/assets/www/index.html
+++ b/assets/www/index.html
@@ -48,9 +48,9 @@
<div id="templates">
<script type="text/html" id="settings-page-template">
<div class="item">
- <label for="contentLanguageSelector"><msg key="settings-language-label"></msg></label>
- <p id="selectedLanguage"></p>
- <select id='contentLanguageSelector'>