Android Address Book with AngularJs and MongoDB ('-' * 47)
A Pen by Daniele Moraschi on CodePen.
| """Playing with tornado.websocket, to add markers to a Google Map using WebSockets | |
| $ pip install tornado | |
| $ python livemap.py --port=8888 | |
| Open http://localhost:8888 in one window | |
| Each time http://localhost:8888/ping is opened in a second window, a | |
| new marker is added to the map (at a random location) |
Android Address Book with AngularJs and MongoDB ('-' * 47)
A Pen by Daniele Moraschi on CodePen.
Say, you want to save your D3 application in a CouchDB database. This is just a proof of concept that this is possible. I use the »Focus + Context« diagram by Mike Bostock (http://bl.ocks.org/1667367) as an example.
Prerequisites:
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <style> | |
| body { | |
| margin: 0; | |
| background: #222; | |
| min-width: 960px; | |
| } |
| # BEWD2 optimized solution for 99 bottles | |
| def pluralize(word, count) | |
| "#{count} #{word}#{'s' unless count == 1}" | |
| end | |
| def sing_bottles(count) | |
| pluralized_count = pluralize("bottle", count) | |
| puts "#{pluralized_count} of beer on the wall" | |
| puts "#{pluralized_count} of beer" | |
| puts "#{pluralize("bottle", count - 1)} of beer on the wall!" |