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
| ZBarReaderViewController *controller = [ZBarReaderViewController new]; | |
| [controller setReaderDelegate:self]; | |
| [controller.scanner setSymbology:ZBAR_I25 config:ZBAR_CFG_ENABLE to:0]; | |
| UIView *overlayView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, self.view.frame.size.width, 80.0)]; | |
| UILabel *helpLabel = [[UILabel alloc] initWithFrame:CGRectInset(overlayView.bounds, 15.0, 10.0)]; | |
| [helpLabel setFont:[UIFont boldSystemFontOfSize:14.0]]; | |
| [helpLabel setTextColor:[UIColor whiteColor]]; |
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
| RASTERIZE_COLOR_FIELD = "__color__" | |
| RASTERIZE_COLOR = (158, 18, 110, 200) | |
| pixel_size = 0.05 | |
| # Open the data source | |
| orig_data_source = ogr.Open(args[0]) | |
| # Make a copy of the layer's data source because we'll need to |
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
| NSString *trimmedTitle = [self.entryTitle stringByReplacingOccurrencesOfString:@"The Best" | |
| withString:@"" | |
| options:NSCaseInsensitiveSearch | |
| range:NSMakeRange(0, [self.entryTitle length])]; | |
| trimmedTitle = [trimmedTitle stringByReplacingOccurrencesOfString:@"in Toronto" | |
| withString:@"" | |
| options:NSCaseInsensitiveSearch | |
| range:NSMakeRange(0, [trimmedTitle 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
| cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/ | |
| sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/GCC\ 4.2\ \(Plausible\ Blocks\ -\ iPhoneOS\).xcplugin | |
| cd /Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/ | |
| sudo ln -s /Developer/Library/Xcode/Plug-ins/GCC\ 4.2\ \(Plausible\ Blocks\).xcplugin |
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
| // Issue: IE doesn't support Array.indexOf (!) | |
| // Solution: Use this | |
| if (!Array.indexOf){ | |
| Array.prototype.indexOf = function(obj) { | |
| for (var i = 0; i < this.length; i++) { | |
| if (this[i] == obj) { | |
| return i; | |
| } | |
| } |
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
| from lxml import etree | |
| OSM_API_URL = "http://api.openstreetmap.org/api/0.6/map?bbox=%s" | |
| def get_streets(bbox): | |
| """ | |
| Makes an OSM API request and parses the streets and their waypoints in the | |
| XML response, returns a list |
NewerOlder