-
Data Down / Actions Up
- http://emberjs.jsbin.com/nayaho/edit?html,js - Interdependent select boxes. No observers.
- http://ember-twiddle.com/2d7246875098d0dbb4a4 - One Way Input
-
Plain JSBin's
-
Ember Version Base JSBin's
The run loop in Ember starts off with three 'default' queues (sync
, actions
, destroy
) setup here. A few additional queues (render
and afterRender
) are added by the ember-views
package here. The ember-routing
package also adds routerTransitions
here.
You can see the list of run loop queues in your application along with their ordering by running Ember.run.queues
in the console:
Ember.run.queues
["sync", "actions", "routerTransitions", "render", "afterRender", "destroy"]
Here is a little more detail about each queue (along with source references if available/known):
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
require 'java' | |
require 'jt400' | |
require 'date' | |
require 'bigdecimal' | |
java_import 'com.ibm.as400.access.AS400JDBCDriver' | |
def get_records | |
@connection ||= java.sql.DriverManager.get_connection("jdbc:as400://127.0.0.1/",'username','password') | |
rs = @connection.createStatement.executeQuery("SELECT * FROM RANDOM_TABLE") |
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 http://www.vbknowledgebase.com/?Id=21&Desc=Send-Email(E-Mail)-from-VB6-using-CDO | |
'**************************************************************** | |
'* Purpose : To Send eMail | |
'* | |
'* Inputs : strRecipient(String) Recipient comma seperated | |
'* strSubject(String) Subject | |
'* strBody Body | |
'* colAttachments Collection of attachments | |
'* file paths. |
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
s=<<-EOS | |
something: 'blah blah' | |
foo: 'bar' | |
on: 'WTF? true?' | |
off: "I don't even" | |
EOS | |
puts YAML.load(s) | |
#=> {"something"=>"blah blah", "foo"=>"bar", true=>"WTF? true?", false=>"I don't even"} |
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({ | |
numbers:['1','2','3','4'], | |
letters:['a','b','c','d'] | |
}); |
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
Output: | |
'campu' != 'campus' -> regular singularization is preserved |
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', | |
stuff: ['grapes', 'animals', 'cheese'], | |
selectedStuff: ['animals'], | |
actions: { | |
toggleThing(thing){ | |
if(this.get('selectedStuff').contains(thing)){ | |
console.log('remove ' + thing); |
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 Controller from '@ember/controller'; | |
import { computed } from '@ember/object'; | |
const values = [ | |
0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 | |
]; | |
export default Controller.extend({ | |
sliderIndex: 1, |
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
rspec `git ls-files --modified --others spec` |
NewerOlder