- Chicken
- Cows
- Sheep
- Egg
- Milk
- Wool
/* | |
* jQuery wraplines plugin | |
* | |
* Copyright (c) 2010 Paul Bennett (http://pmbennett.net) | |
* Licensed under the MIT License: | |
* http://www.opensource.org/licenses/mit-license.php | |
* | |
*/ | |
jQuery.fn.wraplines = function(options) { |
* { | |
box-sizing: border-box; | |
} | |
form { | |
padding: 10px; | |
max-width: 400px; | |
} | |
.input { | |
margin: 0 0 10px 0; | |
position: relative; |
// Generates a function which returns a random element of xs, where the same | |
// input value always returns the same element. | |
// | |
// Useful in situations like test data factories, where you want to choose a | |
// random element from a list of fake test data, but the same input integer | |
// should return the same value every time. | |
export default function(xs) { | |
var memo = {}; | |
return function (i) { |
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
import Ember from 'ember'; | |
function clamp(min, max, number) { | |
return Math.min(Math.max(number, min), max); | |
} | |
const clampPercent = clamp.bind(undefined, 0, 100); | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', |
import Ember from 'ember'; | |
import Duration from 'app/utils/duration'; | |
const { computed, run } = Ember; | |
export default Ember.Component.extend({ | |
classNames: ['panel'], | |
classNameBindings: ['isEditing::clickable'], | |
keyDown(event) { |
const units = [ | |
{ | |
names: ['day', 'dy', 'd'], | |
seconds: 86400 | |
}, { | |
names: ['hour', 'hr', 'h'], | |
seconds: 3600 | |
}, { | |
names: ['minute', 'min', 'm'], | |
seconds: 60 |
import Ember from 'ember'; | |
const { Controller, computed } = Ember; | |
export default Controller.extend({ | |
total: computed('model.eggs', 'model.milk', function() { | |
return this.get('model.eggs') + this.get('model.milk'); | |
}) | |
}); |
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |