This file contains 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
from __future__ import absolute_import, print_function, division, unicode_literals | |
import time | |
import math | |
import sys | |
import os, errno | |
def makedirs(dirname): | |
"""Creates the directories for dirname via os.makedirs, but does not raise | |
an exception if the directory already exists and passes if dirname="".""" |
This file contains 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'; | |
import myTemplate from '../templates/suggestion-template' | |
export default Ember.Controller.extend({ | |
suggestionTemplate: myTemplate, | |
getDisplayString : function(suggestion) { | |
if(typeof suggestion === "string") | |
return suggestion; | |
return suggestion.text; |
This file contains 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', | |
model: (function() { | |
return ['abc', 'foo', 'bar', 'baz']; | |
}).property() | |
}); |
This file contains 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' | |
}); |
This file contains 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'; | |
import myTemplate from '../templates/suggestion-template' | |
export default Ember.Controller.extend({ | |
suggestionTemplate: myTemplate, | |
actions: { | |
doSomething: function() { | |
this.set('clicked', true); | |
}, |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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({ | |
initialSelection: 'foobar', | |
actions: { | |
suggestSource: function(query, syncResults, asyncResults) { | |
Ember.run.later(this, () => { | |
this.set('searched', true); | |
}); |
This file contains 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({ | |
initialSelection: 'foobar', | |
setValue : function(selection) { | |
if (this.get('_typeahead')) { // Was failing in tests with this probably due to a stray observer | |
selection = this.get('transformSelection')(selection); | |
this.selected(selection); // <---- callback | |
if(selection) { |
This file contains 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
export default function() { | |
//window.server = this; | |
this.get('users'); | |
}; |
This file contains 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.Component.extend({ | |
actions: { | |
setItemAt(index, item) { | |
console.log("set", index, item); | |
this.get('list').replace(index, 1, [item]); | |
console.log('after', this.get('list')); | |
}, | |
OlderNewer