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', | |
maxlength: undefined, | |
size: undefined, | |
actions: { | |
setValues: function() { | |
this.setProperties({ | |
maxlength: 5, |
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', | |
placeholder: undefined, | |
name: undefined, | |
actions: { | |
setValues: function() { | |
this.setProperties({ | |
placeholder: 'this is the placeholder', |
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
//TODO: GJ: why is this failing? | |
['@skip specifying `on="someevent" action="foo"` results in a deprecation warning and triggers an action']() { | |
let fooBarInstance; | |
let actionCount = 0; | |
let FooBarComponent = Component.extend({ | |
init() { | |
this._super(); | |
fooBarInstance = this; | |
}, |
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
<style> | |
.flex-container { | |
display: flex; | |
width: 100%; | |
background-color: #eeeeee; | |
} | |
.flex-menu { | |
width: 100px; | |
margin: 10px; |
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({ | |
name: 'Ben', | |
result: '', | |
didInsertElement() { | |
let input = this.$('input')[0]; | |
this.set('result', ` | |
input.selectionStart: ${input.selectionStart}, |
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
var midi = require('midi'); | |
var input = new midi.input(); | |
for(var i=0; i<input.getPortCount(); i++) { | |
console.log(`PORT ${i}: ${input.getPortName(i)}`); | |
} | |
---- | |
var MidiStream = require('midi-stream'); | |
var push = MidiStream('Ableton Push 2 User Port'); |
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
var MidiStream = require('midi-stream'); | |
var push = MidiStream('Ableton Push 2 User Port'); | |
push.on('data', function(data) { | |
var instruction = data[0]; | |
var note = data[1] - 36; | |
var row = Math.floor(note / 8); | |
var column = note % 8; |
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({ | |
tagName: '' | |
}); |
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.LinkComponent.extend({ | |
classNameBindings: ['isUrgent'], | |
isUrgent: 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({ | |
appName: 'Ember Twiddle', | |
style: Em.computed('color', function() { | |
return `background-color: red" onclick="alert(1)"` | |
}) | |
}); |