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
/** | |
* Employee | |
* | |
* @module :: Model | |
* @description :: A short summary of how this model works and what it represents. | |
* @docs :: http://sailsjs.org/#!documentation/models | |
*/ | |
var uuid = require('node-uuid') |
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
/** | |
* Global adapter config | |
* | |
* The `adapters` configuration object lets you create different global "saved settings" | |
* that you can mix and match in your models. The `default` option indicates which | |
* "saved setting" should be used if a model doesn't have an adapter specified. | |
* | |
* Keep in mind that options you define directly in your model definitions | |
* will override these settings. | |
* |
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
angular.module('myApp').config(['$httpProvider', function($httpProvider) { | |
delete $httpProvider.defaults.headers.common['X-Requested-With']; | |
}); |
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
#define LAST_VERSION_RUN @"Settings.LastVersionRun" | |
-(BOOL)isFirstRunForVersion | |
{ | |
// get the current version | |
NSString *currentVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]; | |
// get the last version run | |
NSUserDefaults* preferences = [NSUserDefaults standardUserDefaults]; | |
NSString *lastVersion = [preferences objectForKey:LAST_VERSION_RUN]; |
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
innitApp.provider('API',function(){ | |
//temp storage for new collection | |
var _collections = [] | |
//holds model references | |
var _models = {} | |
return { | |
//this fires when the provider is injected | |
$get : ['$resource',function($resource){ |
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
/** | |
* 400 (Bad Request) Handler | |
* | |
* Usage: | |
* return res.badRequest( | |
* 'Please choose a valid `password` (6-12 characters)', |
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
Searching 52 files for "'diplomovaPraceFrontendApp', [" | |
/Users/robwormald/Downloads/app/scripts/app.coffee: | |
1 "use strict" | |
2 | |
3: app = angular.module('diplomovaPraceFrontendApp', []) | |
4 | |
5 app.config(($routeProvider) -> | |
/Users/robwormald/Downloads/app/scripts/app.js: |
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
/** | |
* | |
*/ | |
module.exports = function destroy (req, res) { | |
// Locate and validate id parameter | |
var id = req.param('id'); | |
if (!id) { | |
return res.badRequest('No id provided.'); | |
} |
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
//angular syntax | |
//get all dogs | |
//return all brown dogs | |
// GET /dogs?color=brown | |
$http.get('/dogs',{params :{color : 'brown'}}).then(function(dogs){ |
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
/** | |
* Find Records | |
* | |
* An API call to find and return model instances from the data adapter | |
* using the specified criteria. If an id was specified, just the instance | |
* with that unique id will be returned. | |
* | |
* @param {Integer|String} id - the unique id of the particular instance you'd like to look up | |
* @param {Object} where - the find criteria (passed directly to the ORM) | |
* @param {Integer} limit - the maximum number of records to send back (useful for pagination) |