Provider | Singleton | Instantiable | Configurable |
---|---|---|---|
Constant | Yes | No | No |
Value | Yes | No | No |
Service | Yes | No | No |
Factory | Yes | Yes | No |
Decorator | Yes | No? | No |
Provider | Yes | Yes | Yes |
var gulp = require('gulp'), | |
debug = require('gulp-debug'), | |
size = require('gulp-filesize'), | |
clean = require('gulp-clean'), | |
coffee = require('gulp-coffee'), | |
coffeelint = require('gulp-coffeelint'), | |
gutil = require('gulp-util'), | |
sass = require('gulp-sass'), | |
imagemin = require('gulp-imagemin'), | |
changed = require('gulp-changed'), |
A method is said to be a simple method if it is a case-sensitive match for one of the following:
GET
HEAD
POST
A header is said to be a simple header if the header field name is an ASCII case-insensitive match for Accept
, Accept-Language
, or Content-Language
or if it is an ASCII case-insensitive match for Content-Type and the header field value media type (excluding parameters) is an ASCII case-insensitive match for application/x-www-form-urlencoded
, multipart/form-data
, or text/plain
.
- Assigning an object to a
belongs_to
association does not automatically save the object. It does not save the associated object either.
- When you assign an object to a
has_one
association, that object is automatically saved (in order to update its foreign key). - In addition, any object being replaced is also automatically saved, because its foreign key will change too
- If either of these saves fails due to validation errors, then the assignment statement returns false and the assignment itself is cancelled.
- If the parent object (the one declaring the
has_one
association) is unsaved (that is,new_record?
returns true) then the child objects are not saved. They will automatically when the parent object is saved.
cd my_rails_app_root_dir | |
rm bin/* | |
bundle exec rake rails:update:bin | |
bundle binstubs rspec-core | |
spring binstub --all |
The following values are always falsy:
- false
- 0 (zero)
- "" (empty string)
- null
- undefined
- NaN (a special Number value meaning Not-a-Number!)
All other values are truthy, including "0" (zero in quotes), "false" (false in quotes), empty functions, empty arrays, and empty objects.
Leverages Angular UI Router instead of core ngRoute
module. UI Router
allows
us to organize our application interface into a state machine.
Unlike the $route
service in the Angular ngRoute
module, which is organized around URL routes, UI-Router
is organized around states, which may optionally have routes, as well as other behavior, attached.
LIFT* Organization principle:
- L - Locating code easy
- I - Identify code at a glance
// Gulp 4 | |
var gulp = require('gulp'); | |
var using = require('gulp-using'); | |
var grep = require('gulp-grep'); | |
var changed = require('gulp-changed'); | |
var del = require('del'); | |
var coffee = require('gulp-coffee'); | |
var less = require('gulp-less'); | |
var coffeelint = require('gulp-coffeelint'); | |
var sourcemaps = require('gulp-sourcemaps'); |