Write a simple JavaScript application that given a number of pennies will calculate the minimum number of Sterling coins needed to make that amount.
Eg. 123p = 1 x £1, 1 x 20p, 1 x 2p, 1 x 1p
You should be prepared to spend at least two hours on it.
| curl -s -I -H 'X-Transclude: 1' -H 'Cookie: BBC-UID=' http://m.int.bbc.co.uk/news | egrep '(Id|Vary)' && curl -s -I -H 'Cookie: BBC-UID=' http://m.int.bbc.co.uk/news | egrep '(Id|Vary)' |
| // From http://www.cforcoding.com/2009/07/plain-english-explanation-of-big-o.html | |
| // Use mobile User-Agent | |
| var e = !1, f = window, g = Function, h = document, i = Math, j = Array, k = "appendChild", l = "length", n = "prototype", p = "slice", q = "indexOf", r = "call", t = "createElement", u = "addEventListener", w = "apply", x = "bind", y = "", z = " ", A = "div", aa = "native code", ba = "navigating", B = "prerender", ca = "px", da = "px, 0, 0)", ea = "string", C = "swiping", fa = "touchend", ga = "touchmove", ha = "touchstart", ia = "translate3d("; | |
| function D(a) { | |
| return typeof a == ea | |
| } | |
| i.floor(2147483648 * i.random()).toString(36); | |
| function ja(a, c, b) { | |
| return a[r][w](a[x], arguments) |
| tabloid/webapp/static/conf/tabloid.sandbox | |
| # Stop phantomjs blowing up by 403ing on ttf fonts | |
| RewriteEngine on | |
| RewriteCond %{HTTP_USER_AGENT} cucumber [NC] | |
| RewriteRule ^.*\.ttf$ - [F,L] | |
| ➜ workspace git:(desktop-weather) ✗ curl -I http://static.sandbox.dev.bbc.co.uk/news/dev/fonts/gel-news-icons-v3/gelnewsicons-regular-webfont.ttf | |
| HTTP/1.1 200 OK |
| #!/bin/bash | |
| # Description: For each MP3 file, set the filename as the song title | |
| for i in *.mp3; do | |
| SONG="$i" | |
| id3v2 --song "$SONG" --artist "Quartershade" --album "Quartershade" "$i" | |
| done |
John is Tech Lead at BBC News and currently migrating the News site to a dynamic platform. Concentrating on building features mobile first using responsive web design all the way up to desktop.
BBC News has a truly global audience, delivering some of the only unbiased journalism available in some parts of the world. This has reinforced his passion for device support and producing sites that absolutely fly.
Loves canoeing, ale and Radiohead - preferably all at the same time :) Find me here @jcleveley