This file contains hidden or 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
| qs = Foo.objects.filter( | |
| type=0, | |
| duration_minutes__gt=0, | |
| created__gt=thirty_days_ago | |
| ) | |
| qs = qs.extra({ | |
| 'day': "date_trunc('day', foos_foo.created AT TIME ZONE 'America/Chicago')" | |
| }).values('day').order_by().annotate(sum=Sum('duration_minutes')) |
This file contains hidden or 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
| package main | |
| type hub struct { | |
| // Registered connections. | |
| connections map[*connection]bool | |
| // Inbound messages from the connections. | |
| broadcast chan []byte |
This file contains hidden or 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 Resolver from 'ember/resolver'; | |
| import loadInitializers from 'ember/load-initializers'; | |
| import config from './config/environment'; | |
| import DS from 'ember-data'; | |
| var App; | |
| Ember.MODEL_FACTORY_INJECTIONS = true; |
This file contains hidden or 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: 'li', | |
| classNameBindings: ['isMine:self'], | |
| isMineBinding: 'message.isMine', | |
| }); |
This file contains hidden or 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 Ember.Component.extend({ | |
| tagName: 'li', | |
| classNameBindings: ['isMine:self'], | |
| isMine: Ember.computed.alias('message.isMine'), | |
| }); |