This is a quick summary of tweaks to make development on a Mac easier for Ubuntu users. These all worked on my Macbook Air with OSX 10.7 Lion.
If you have something to add here, please let me know! http://twitter.com/craigds
This is a quick summary of tweaks to make development on a Mac easier for Ubuntu users. These all worked on my Macbook Air with OSX 10.7 Lion.
If you have something to add here, please let me know! http://twitter.com/craigds
Index: gdal/apps/gdal_translate.cpp | |
=================================================================== | |
--- gdal/apps/gdal_translate.cpp (revision 21963) | |
+++ gdal/apps/gdal_translate.cpp (working copy) | |
@@ -991,7 +991,14 @@ | |
pfnProgress, NULL ); | |
if( hOutDS != NULL ) | |
{ | |
+ int bHasGotErr = FALSE; | |
+ CPLErrorReset(); |
=== modified file 'mptt/managers.py' | |
--- mptt/managers.py 2008-12-05 01:37:34 +0000 | |
+++ mptt/managers.py 2008-12-05 19:08:24 +0000 | |
@@ -11,15 +11,11 @@ | |
qn = connection.ops.quote_name | |
COUNT_SUBQUERY = """( | |
- SELECT COUNT(*) | |
- FROM %(rel_table)s | |
- WHERE %(mptt_fk)s = %(mptt_table)s.%(mptt_pk)s |
#!/usr/bin/env python | |
""" | |
Gets search results from Google Maps for the given string. | |
Usage: | |
mapsearch.py "address" [region] | |
Regions are two-character ccTLDs: http://en.wikipedia.org/wiki/CcTLD | |
They're not validated by this script | |
""" |
# sample code as a suggestion for https://convore.com/django-community/how-to-make-an-automatic-status-change/ | |
from datetime import datetime | |
class MyManager(models.Manager): | |
def active(self): | |
return self.get_query_set().filter(expires_at__gt=datetime.now()) | |
class MyClass(models.Model): | |
created_at = models.DateTimeField(auto_now_add=True, db_index=True) |
#!/usr/bin/env python | |
""" | |
Calculate and displays all possible N-ominoes for a given N. | |
(c) 2010 Craig de Stigter | |
[email protected] | |
http://flavors.me/craigds | |
""" |
Index: alg/gdalwarper.cpp | |
=================================================================== | |
--- alg/gdalwarper.cpp (revision 21094) | |
+++ alg/gdalwarper.cpp (working copy) | |
@@ -32,6 +32,7 @@ | |
#include "cpl_minixml.h" | |
#include "ogr_api.h" | |
#include "gdal_priv.h" | |
+#include <iostream> | |
diff --git a/mptt/managers.py b/mptt/managers.py | |
index e7893af..8290443 100644 | |
--- a/mptt/managers.py | |
+++ b/mptt/managers.py | |
@@ -2,7 +2,7 @@ | |
A custom manager for working with trees of objects. | |
""" | |
from django.db import connection, models, transaction | |
-from django.db.models import F, Max | |
+from django.db.models import F, Max, Q |
@classmethod | |
def with_base_model(cls, base_model): | |
""" | |
This returns an MPTTModel CLASS with the given base model. | |
Used for linearizing inheritance chains. | |
The given model should be abstract. | |
""" | |
if cls is not MPTTModel: | |
raise RuntimeError, "with_base_model() must be called on MPTTModel" |
{"comment":{"gravatar_id":"67a1b68aca6b44984ff9b8bdb30fc6ed","created_at":"2010/09/11 23:29:15 -0700","body":"[insin](http://github.com/insin) (29 Dec 07):\n\nMaking this a blocker for the first public release, as modifying a parent currently\nleaves the tree in an invalid state.","updated_at":"2010/09/11 23:29:15 -0700","id":401907,"user":"craigds"}} |