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
# | |
# https://www.sbprojects.net/knowledge/ir/nec.php | |
# | |
Power On/Off | |
Protocol : NEC | |
Code : 0xFFA25D (32 Bits) | |
uint16_t rawData[71] = {9058, 4466, 596, 534, 596, 538, 596, 538, 596, 538, 596, 538, 596, 538, 596, 538, 596, 538, 596, 1648, 596, 1652, 596, 1652, 596, 1652, 596, 1648, 596, 1652, 596, 1652, 596, 1652, 596, 1652, 596, 538, 596, 1652, 596, 538, 596, 538, 590, 538, 596, 1652, 596, 538, 596, 538, 596, 1652, 596, 538, 596, 1648, 600, 1648, 594, 1652, 596, 538, 596, 1652, 596, 40234, 9064, 2196, 596}; // NEC FFA25D | |
uint32_t address = 0x0; | |
uint32_t command = 0x45; |
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
# | |
# Yamaha IR codes from RAS13 ZN04290, used for Yamaha A-S301. | |
# If you find standalone on an off codes please let me know. | |
# https://www.sbprojects.net/knowledge/ir/nec.php | |
# | |
CD on/off | |
Protocol : NEC | |
Code : 0x9E6106F9 (32 Bits) | |
uint16_t rawData[71] = {9012, 4418, 618, 1618, 612, 504, 612, 496, 618, 1614, 616, 1614, 618, 1612, 618, 1614, 616, 496, 612, 504, 612, 1618, 612, 1614, 616, 504, 612, 496, 618, 500, 612, 514, 612, 1608, 618, 500, 612, 500, 612, 504, 612, 500, 612, 500, 616, 1614, 616, 1614, 616, 500, 616, 1614, 618, 1610, 616, 1612, 618, 1612, 618, 1612, 618, 500, 618, 496, 616, 1614, 618, 40206, 8780, 2186, 618}; // NEC 9E6106F9 |
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'; | |
const {assert, get, computed, isArray, RSVP} = Ember; | |
const {keys} = Object; | |
const {service} = Ember.inject; | |
const {later} = Ember.run; | |
export default Ember.Component.extend({ | |
validation: service(), | |
fields: undefined, | |
errors: undefined, |
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
//app/sessions/application | |
import Session from 'simple-auth/session'; | |
import Ember from 'ember'; | |
const { computed } = Ember; | |
const { service } = Ember.inject; | |
export default Session.extend({ | |
store: service(), | |
user: computed('secure.userId', function(){ | |
return this.get('store').findRecord('user', this.get('secure.userId')); |
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
// created by https://github.com/decasia | |
rollbackAttributes: function() { | |
this._super(); | |
this.rollbackRelationships(); | |
}, | |
rollbackRelationships: function() { | |
var model = this; | |
model.eachRelationship(function(name, meta) { |
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
// original thread: http://discuss.emberjs.com/t/dirt-tracking-with-ember-data-only-save-dirty-properties/4191/22 | |
// made by Glavin001 | |
serializeAttribute: function(snapshot, json, key, attributes) { | |
// Check if new record | |
if (snapshot.get('isNew')) { | |
// Is new | |
return this._super(snapshot, json, key, attributes); | |
} else { | |
// Check if current attribute is in flight |
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
public function allAction(ParamFetcher $paramFetcher, Request $request) | |
{ | |
$data = $this->getResults($paramFetcher, $request); | |
foreach ($data['post'] as $post /* @var $post Post */) { | |
$comments = []; | |
$s = &$ret['post'][]; | |
$s['id'] = $post->getId(); | |
$s['company'] = $post->getCompany()->getId(); | |
foreach ($post->getComments() as $comment) { | |
$comments[] = $comment->getId(); |
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.Mixin.create({ | |
currentRequest: 0, | |
majax: function (ajax, success, fail) { | |
var _this = this; | |
var cr = this.get('currentRequest'); | |
this.set('currentRequest', ++cr); | |
ajax.then(function (payload) { | |
if (_this.get('currentRequest') === cr) { |
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
// for ember-cli place in app/store.js | |
import Ember from 'ember'; | |
import DS from 'ember-data'; | |
export default DS.Store.extend({ | |
/** | |
* Acts as find(type, id) but can be used on any field. | |
* @param type |
NewerOlder