This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('.map-marker .tooltip').map(function(i, node) { return Number($(node).text().replace(/(\s*[£])|(\s*$)/g, '')) }).toArray().reduce(function(sum, val) { return sum + val }, 0) / $('.map-marker .tooltip').length |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="import" href="../core-ajax/core-ajax.html"> | |
| <link rel="import" href="../google-map/google-map.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; | |
| width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env | |
| def findfact(n): | |
| for x in xrange(2,n+1): | |
| if (n % x) == 0: | |
| return x | |
| return n | |
| print findfact(11) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env | |
| def palin(s): | |
| j = len(s) | |
| if j == 1: | |
| return True | |
| i = 0 | |
| while i <= j: | |
| if s[i] != s[j-1]: | |
| return False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def main(): | |
| coins = [1, 3, 5] | |
| S = 11 | |
| M = [946958486]*(S+1) | |
| M[0] = 0 | |
| print M | |
| for i in range(1, S+1): | |
| for j in range(0, len(coins)): | |
| if coins[j] <= i and M[i-coins[j]]+1 < M[i]: | |
| M[i] = M[i-coins[j]]+1 |