#A simple Slideshow module wrapped in a Backbone View
- Dependencies ** underscore.js ** backbone.js
Viewable in action in this jsfiddle
#A simple Slideshow module wrapped in a Backbone View
Viewable in action in this jsfiddle
| # Some good references are: | |
| # http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
| # http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
| # http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
| #1. Install PostgreSQL postgis and postgres | |
| brew install postgis | |
| initdb /usr/local/var/postgres | |
| pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
| import sys | |
| import logging | |
| from optparse import make_option | |
| from django.core.management.base import BaseCommand, CommandError | |
| class Command(BaseCommand): | |
| help = ("Invalidates portions of the queryset cache based on the app names" | |
| " or models provided as arguments to the command. If no arguments " | |
| "are provided, nothing is done. To clear the entire queryset " |
| (function(window, document) { | |
| // The end user should be allowed to disable synchronization. This button | |
| // is optional on the page | |
| var syncAllow = true; | |
| var syncButton = document.querySelector('.sync-button'); | |
| // If the sync button exists bind a click event and toggle the syncAllow | |
| // boolean. Set the value of the button. | |
| if(syncButton) { |
| import sqlite3, os | |
| conn = sqlite3.connect('Mills1860.mbtiles') | |
| results=conn.execute('select * from tiles').fetchall() | |
| for result in results: | |
| zoom, column, row, png= result | |
| try: | |
| os.makedirs('%s/%s/' % (zoom, row)) |
| class LimitedAdminInlineMixin(object): | |
| """ | |
| InlineAdmin mixin limiting the selection of related items according to | |
| criteria which can depend on the current parent object being edited. | |
| A typical use case would be selecting a subset of related items from | |
| other inlines, ie. images, to have some relation to other inlines. | |
| Use as follows:: |
| <?php | |
| /** | |
| * Convert a comma separated file into an associated array. | |
| * The first row should contain the array keys. | |
| * | |
| * Example: | |
| * | |
| * @param string $filename Path to the CSV file | |
| * @param string $delimiter The separator used in the file | |
| * @return array |