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
| // Setter for 'coordinate' property | |
| - (void)setCoordinate:(CLLocationCoordinate2D)newCoordinate | |
| { | |
| // Update the coordinateArray with the coordinate information | |
| self.coordinateArray = [NSArray arrayWithObjects: | |
| [NSNumber numberWithDouble:newCoordinate.longitude], | |
| [NSNumber numberWithDouble:newCoordinate.latitude], nil]; | |
| } | |
| // Getter for 'coordinate' property |
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
| @interface KGAMapNote : NSObject <MKAnnotation, KCSPersistable> |
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
| // To create a coupon or storecard feature in your app | |
| // you can do the following | |
| @interface Card : NSObject <KCSPersistable> | |
| @property (nonatomic, retain) NSString *cardId; | |
| @property (nonatomic, retain) NSString *code; | |
| @property (nonatomic, retain) NSString *cardName; | |
| @property (nonatomic, retain) NSString *firstName; | |
| @property (nonatomic, retain) NSString *lastName; |
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
| // This is in our CLLocationManagerDelegate | |
| // Also, this code builds on https://github.com/Kinvey/KinveyGeoTag | |
| // from the blog: http://www.kinvey.com/blog/item/155-ios-corner-taking-your-mobile-local-using-kinvey-for-location-based-apps | |
| - (void)locationManager:(CLLocationManager *)manager | |
| didUpdateToLocation:(CLLocation *)newLocation | |
| fromLocation:(CLLocation *)oldLocation | |
| { | |
| // This class assumes that you ask the user if they want to share their location |
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
| mongo = require 'mongodb' | |
| # full connect string | |
| mongodbURI = "mongodb:// | |
| #{process.env.MONGO_USER}:#{process.env.MONGO_PASSWORD}@ | |
| mongoA.company.com,mongoB.company.com,mongoC.company.com/ | |
| admin?replicaSet=company&autoReconnect=true&connectTimeoutMS=500" | |
| # obtaining a connection is now simple | |
| mongo.connect mongodbURI, (err, db) => |
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
| @implementation managedObject | |
| @synthesize managedObjectContext; | |
| + (NSDictionary *)kinveyObjectBuilderOptions | |
| { | |
| static NSDictionary *options = nil; | |
| if (options == nil){ | |
| options = [NSDictionary dictionaryWithObjectsAndKeys: |
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
| function getKinveyParameters(){ | |
| return { | |
| kinvey_app_id: " YOUR APP ID ", | |
| kinvey_master_secret: " YOUR MASTER SECRET " | |
| }; | |
| }; | |
| // Use this function for time based script updating, since | |
| // the id is hard-coded | |
| function readRowsHelper(){ |
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
| ; Syntax checking | |
| (add-to-list 'load-path "~/Emacs/lintnode") | |
| (require 'flymake-jslint) | |
| ;; Make sure we can find the lintnode executable | |
| (setq lintnode-location "~/Emacs/lintnode") | |
| ;; JSLint can be... opinionated | |
| (setq lintnode-jslint-excludes (list 'nomen 'plusplus 'onevar 'white)) | |
| ;; Start the server when we first open a js file and start checking | |
| (add-hook 'js-mode-hook | |
| (lambda () |