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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
someArray: [1, 2, 3] | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
actions: { | |
addWord: function() { | |
var word = this.store.createRecord('word', { | |
}); | |
this.get('model.pages.firstObject.words') |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
actions: { | |
addWord: function() { | |
var word = this.store.createRecord('word', { | |
}); | |
this |
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
import DS from 'ember-data'; | |
export default DS.Transform.extend({ | |
deserialize: function(serialized) { | |
console.log('test'); | |
if (serialized) { | |
let result = moment(serialized); | |
if (moment.isMoment(result) && result.isValid()) { | |
return result; | |
} |
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
import Ember from 'ember'; | |
export default Ember.TextField.extend({ | |
_value: null, | |
value: Ember.computed('_value', { | |
get() { | |
const value = this.get('_value'); | |
if (value) { | |
return moment(value).format('L HH:mm'); |
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 function creates an <iframe> (and YouTube player) | |
// after the API code downloads. | |
<div id="player-div"></div> | |
var player; | |
player = new YT.Player('player-div', { | |
height: //Height | |
width: //Width | |
videoId: //YouTube UID | |
wmode: 'opaque', //Forget what this does but I think it's important. Otherwise the modal will be covered up. | |
autohide: 1, |
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
resources :providers do | |
member do | |
put :refresh | |
end | |
end | |
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
{ | |
"question": "I am a new question. What is love?" | |
} |
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
test |
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
<script> | |
$(document).ready(function() { | |
$("#calc").submit(function(e) { | |
e.preventDefault() | |
var p = $("#nocommas").val() | |
var years = $("#years").val() | |
var noCommas = p.replace(',', ''); | |
var oldAmountOwed = amoritize(noCommas, years, .034) |