I hereby claim:
- I am cocoahero on github.
- I am cocoahero (https://keybase.io/cocoahero) on keybase.
- I have a public key whose fingerprint is 1E98 584E DC62 7645 C0B6 D5A3 5B28 7E51 482A 74CB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#import <UIKit/UIKit.h> | |
@interface UIColor (Hexadecimal) | |
/** | |
* Convenience method for creating a UIColor object from a hexadecimal | |
* representation. | |
* | |
* @param hexcode A color in hexadecimal represenation | |
* @param alpha The alpha (opacity) percentage |
It is common practice to make the android:versionCode in the AndroidManifest.xml the build number of the application. An easy build number to calculate is the number of git commits in the repo.
Instead of having to edit the manifest file manually and update the android:versionCode attribute with the build number, below is a git pre-commit hook that does it for you.
#!/usr/bin/env bash
MANIFEST="AndroidManifest.xml"
if [ -f $MANIFEST ]
this.mMapView = new MapView(this, 256); | |
this.mMapView.setClickable(true); | |
this.mMapView.setMultiTouchControls(true); | |
this.mMapView.setTileSource(TileSourceFactory.MAPQUESTOSM); | |
this.mMapView.getController().setZoom(5); |
The code for MapBoxOfflineTileProvider has been moved into an Android Library Project located here.
The code for MapBoxOnlineTileProvider has been moved into an Android Library Project located here.
extension SignalProducer where Value == (Data, URLResponse), Error == AnyError { | |
func jsonDecode<T: Decodable>(decoder: JSONDecoder = JSONDecoder()) -> SignalProducer<T, AnyError> { | |
return attemptMap({ data, _ in | |
try decoder.decode(T.self, from: data) | |
}) | |
} | |
} | |
extension SignalProducer where Value: Encodable, Error == AnyError { | |
func jsonEncode(encoder: JSONEncoder = JSONEncoder()) -> SignalProducer<Data, AnyError> { |
fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [Foundation.(_JSONKey in _12768CA107A31EF2DCE034FD75B541C9)(stringValue: "Index 3", intValue: Optional(3))], debugDescription: "Cannot initialize Season from invalid String value fall", underlyingError: nil)): file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-900.0.65/src/swift/stdlib/public/core/ErrorType.swift, line 181 |
XYTileSource MBTILESRENDER = new XYTileSource("mbtiles", ResourceProxy.string.offline_mode, 1, 20, 256, ".png", "http://example.org/"); | |
DefaultResourceProxyImpl mResourceProxy = new DefaultResourceProxyImpl(this.getApplicationContext()); | |
SimpleRegisterReceiver simpleReceiver = new SimpleRegisterReceiver(this.getActivity()); | |
File f = new File(Environment.getExternalStorageDirectory(), "mymbtilesfile.mbtiles"); | |
IArchiveFile[] files = { MBTilesFileArchive.getDatabaseFileArchive(f) }; | |
MapTileModuleProviderBase moduleProvider = new MapTileFileArchiveProvider(simpleReceiver, MBTILESRENDER, files); |
I hereby claim:
To claim this, I am signing this object: