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
$(document).keyup (e) => | |
switch e.which | |
# key down | |
when 40 | |
e.preventDefault() |
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
Ch.LinksNewController = Ember.ObjectController.extend({ | |
needs: 'categories', | |
categories: Ember.computed.alias('controllers.categories.model'), | |
languages: ['FR', 'EN'], | |
categoryNames: function() { | |
return this.get('categories').map(function(category) { | |
return { | |
id: category, | |
label: category.get('name') |
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
.bloc { | |
position: relative; | |
border-radius: 5px; | |
-webkit-border-radius: 5px; | |
-moz-border-radius: 5px; | |
-ms-border-radius: 5px; | |
-o-border-radius: 5px; | |
display: inline-block; | |
vertical-align: top; | |
background: white; |
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 'benchmark/ips' | |
def flatmap | |
[[1,2],[3,4]].flat_map {|i| i } | |
end | |
def flatten_then_map | |
[[1,2],[3,4]].flatten.map {|i| i } | |
end |
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', | |
options: {} | |
}); |
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', | |
options: {} | |
}); |
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 Component from '@ember/component'; | |
export default Component.extend({ | |
tagName: 'div', | |
classNames: ['yay-class'] | |
}); |
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 Component from '@glimmer/component'; | |
import { tracked } from '@glimmer/tracking'; | |
export default class extends Component { | |
@tracked _state = false; | |
// get externalState (){ | |
// return this.args.isCheckboxSelected(this.args.checkcboxOwnerId, this.args.selectedCheckboxes) | |
// } |
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 { action } from '@ember/object'; | |
import { tracked } from '@glimmer/tracking'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
@tracked allOpen = false; | |
@action toggleAll(state) { | |
this.allOpen = state; |
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 { action } from '@ember/object'; | |
import { tracked } from '@glimmer/tracking'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
@tracked allOpen = false; | |
@action toggleAll(state) { | |
this.allOpen = state; |
OlderNewer