This contains instructions for setting up a bookmarklet to pre-populate the form found on Tell Me When It Closes.
⌘⌥Bto open the bookmarks window- Right click in the bookmarks pane and select
Add Page... - Choose an appropriate name.
| int findLargest(int array[]) | |
| { | |
| int arrayLength = sizeof(array)/sizeof(array[0]); | |
| int firstElement = array[0]; | |
| int newArray[] = // This needs to be a new array without the original array's first element. | |
| if (arrayLength == 1) { | |
| return max(firstElement, newArray[0]) | |
| } else { | |
| return max(firstElement, findLargest(newArray)); | |
| } |
This contains instructions for setting up a bookmarklet to pre-populate the form found on Tell Me When It Closes.
⌘⌥B to open the bookmarks windowAdd Page...| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| someArray: [1, 2], | |
| actions: { | |
| addElement() { | |
| this.get('someArray').pushObject(1); | |
| } | |
| } | |
| }); |
| data Hop = Hop {name :: String, alphaAcid :: Double} deriving (Show) | |
| data BoilTime = BoilTime Int deriving (Show) | |
| data HopAddition = HopAddition Hop BoilTime deriving (Show) | |
| data HomebrewRecipe = HomebrewRecipe [HopAddition] deriving (Show) | |
| recipeIbus :: HomebrewRecipe -> Double | |
| recipeIbus (HomebrewRecipe as) = sum $ map ibus as | |
| ibus :: HopAddition -> Double | |
| ibus x = utilization x * ouncesOfHops * 7490 / 5 |
| matrix = [ | |
| [1,2,3,4,5], | |
| [6,7,8,9,10], | |
| [2,4,6,8,10], | |
| [1,3,5,7,9], | |
| [3,6,9,2,4] | |
| ] | |
| matrix.each_with_index.inject({start_top_left: 0, start_top_right: 0}) do |hash_of_sums, (row, index)| | |
| hash_of_sums[:start_top_left] += row[index] |