id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
technoweenie/coffee-resque:src/index.coffee:2:completion
completion
class Worker constructor: (connection, queues, options) -> @conn = connection @redis = connection.redis @queues = queues @name = [options.name || 'node', process.pid, queues].join(":") @callbacks = options.callbacks || {} @running = false @checkQueues() # Public sta...
poll: -> return if !@running @queue = @queues.shift() @queues.push @queue @conn.emit 'poll', @, @queue @redis.lpop @conn.key('queue', @queue), (err, resp) => if resp @perform JSON.parse(resp.toString()) else @pause() perform: (job) -> @conn.emit 'job', @, @queue, j...
CoffeeScript
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
1738caa55676754bd2c6943a2134b6359aaec203
542
https://github.com/technoweenie/coffee-resque/blob/1738caa55676754bd2c6943a2134b6359aaec203/src/index.coffee
30
79
technoweenie/coffee-resque:src/index.coffee:3:raw_corpus
raw_corpus
@untrack() setTimeout => return if !@running @track() @poll() , 1000 track: -> @running = true @redis.sadd @conn.key('workers'), @name untrack: -> @redis.srem @conn.key('workers'), @name init: -> @track() @redis.set @conn.key('worker', @name, 'started'), (new Date...
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
1738caa55676754bd2c6943a2134b6359aaec203
542
https://github.com/technoweenie/coffee-resque/blob/1738caa55676754bd2c6943a2134b6359aaec203/src/index.coffee
80
100
technoweenie/coffee-resque:src/index.coffee:3:completion
completion
@untrack() setTimeout => return if !@running @track() @poll() , 1000 track: -> @running = true @redis.sadd @conn.key('workers'), @name
untrack: -> @redis.srem @conn.key('workers'), @name init: -> @track() @redis.set @conn.key('worker', @name, 'started'), (new Date).toString() checkQueues: -> return if @queues.shift? @queues = @queues.split(',')
CoffeeScript
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
1738caa55676754bd2c6943a2134b6359aaec203
542
https://github.com/technoweenie/coffee-resque/blob/1738caa55676754bd2c6943a2134b6359aaec203/src/index.coffee
80
100
technoweenie/coffee-resque:src/index.coffee:1:raw_corpus
raw_corpus
EventEmitter = require('events').EventEmitter class Connection constructor: (options) -> @redis = options.redis || connectToRedis options @namespace = options.namespace || 'resque' @callbacks = options.callbacks || {} @redis.select options.database if options.database? # Public enqueue: ...
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
df9e2ad98c826dbc9b8826073496c67ea3da7bc4
542
https://github.com/technoweenie/coffee-resque/blob/df9e2ad98c826dbc9b8826073496c67ea3da7bc4/src/index.coffee
1
50
technoweenie/coffee-resque:src/index.coffee:1:completion
completion
EventEmitter = require('events').EventEmitter class Connection constructor: (options) -> @redis = options.redis || connectToRedis options @namespace = options.namespace || 'resque' @callbacks = options.callbacks || {} @redis.select options.database if options.database? # Public enqueue: ...
key: (args...) -> args.unshift @namespace args.join ":" class Worker extends EventEmitter constructor: (connection, queues, options) -> @conn = connection @redis = connection.redis @queues = queues @name = options.name || 'node' @callbacks = options.callbacks || {} ...
CoffeeScript
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
df9e2ad98c826dbc9b8826073496c67ea3da7bc4
542
https://github.com/technoweenie/coffee-resque/blob/df9e2ad98c826dbc9b8826073496c67ea3da7bc4/src/index.coffee
1
50
technoweenie/coffee-resque:src/index.coffee:2:raw_corpus
raw_corpus
init: -> @track() @redis.set @conn.key('worker', @name, 'started'), (new Date).toString() purge: -> @untrack() @redis.del [ @conn.key('worker', @name, 'started') @conn.key('stat', 'failed', @name) @conn.key('stat', 'processed', @name) ] connectToRedis = (options) -> require(...
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
df9e2ad98c826dbc9b8826073496c67ea3da7bc4
542
https://github.com/technoweenie/coffee-resque/blob/df9e2ad98c826dbc9b8826073496c67ea3da7bc4/src/index.coffee
51
70
technoweenie/coffee-resque:src/index.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript init: -> @track() @redis.set @conn.key('worker', @name, 'started'), (new Date).toString() purge: -> @untrack() @redis.del [ @conn.key('worker', @name, 'started') @conn.key('stat', 'failed', @name) @conn.key('stat', 'processed...
var connectToRedis; ({ init: function() { this.track(); return this.redis.set(this.conn.key('worker', this.name, 'started'), (new Date()).toString()); }, purge: function() { this.untrack(); return this.redis.del([this.conn.key('worker', this.name, 'started'), this.conn.key('stat', 'failed', this....
CoffeeScript
JavaScript
technoweenie/coffee-resque
src/index.coffee
MIT
df9e2ad98c826dbc9b8826073496c67ea3da7bc4
542
https://github.com/technoweenie/coffee-resque/blob/df9e2ad98c826dbc9b8826073496c67ea3da7bc4/src/index.coffee
51
70
technoweenie/coffee-resque:src/index.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var connectToRedis; ({ init: function() { this.track(); return this.redis.set(this.conn.key('worker', this.name, 'started'), (new Date()).toString()); }, purge: function() { this.untrack(); return this.redis.del([this.conn.key('worker', this....
init: -> @track() @redis.set @conn.key('worker', @name, 'started'), (new Date).toString() purge: -> @untrack() @redis.del [ @conn.key('worker', @name, 'started') @conn.key('stat', 'failed', @name) @conn.key('stat', 'processed', @name) ] connectToRedis = (options) -> require(...
JavaScript
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
df9e2ad98c826dbc9b8826073496c67ea3da7bc4
542
https://github.com/technoweenie/coffee-resque/blob/df9e2ad98c826dbc9b8826073496c67ea3da7bc4/src/index.coffee
51
70
technoweenie/coffee-resque:src/index.coffee:2:completion
completion
init: -> @track() @redis.set @conn.key('worker', @name, 'started'), (new Date).toString() purge: -> @untrack() @redis.del [ @conn.key('worker', @name, 'started') @conn.key('stat', 'failed', @name) @conn.key('stat', 'processed', @name)
] connectToRedis = (options) -> require('../../node_redis').createClient options.port, options.host exports.Connection = Connection exports.Worker = Worker exports.connect = (options) -> new exports.Connection options || {}
CoffeeScript
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
df9e2ad98c826dbc9b8826073496c67ea3da7bc4
542
https://github.com/technoweenie/coffee-resque/blob/df9e2ad98c826dbc9b8826073496c67ea3da7bc4/src/index.coffee
51
70
technoweenie/coffee-resque:src/index.coffee:1:raw_corpus
raw_corpus
class Connection constructor: (options) -> @redis = options.redis || connectToRedis options @namespace = options.namespace || 'resque' @redis.select options.database if options.database? enqueue: (queue, func, args...) -> @redis.sadd @key('queues'), queue @redis.rpush @key('queue', que...
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
6f9e920cf11dabf7e7ab94ad23585d9bae0d1ccf
542
https://github.com/technoweenie/coffee-resque/blob/6f9e920cf11dabf7e7ab94ad23585d9bae0d1ccf/src/index.coffee
1
25
technoweenie/coffee-resque:src/index.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Connection constructor: (options) -> @redis = options.redis || connectToRedis options @namespace = options.namespace || 'resque' @redis.select options.database if options.database? enqueue: (queue, func, args...) -> @redis.sadd ...
var Connection, connectToRedis; Connection = class Connection { constructor(options) { this.redis = options.redis || connectToRedis(options); this.namespace = options.namespace || 'resque'; if (options.database != null) { this.redis.select(options.database); } } enqueue(queue, func, ...arg...
CoffeeScript
JavaScript
technoweenie/coffee-resque
src/index.coffee
MIT
6f9e920cf11dabf7e7ab94ad23585d9bae0d1ccf
542
https://github.com/technoweenie/coffee-resque/blob/6f9e920cf11dabf7e7ab94ad23585d9bae0d1ccf/src/index.coffee
1
25
technoweenie/coffee-resque:src/index.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Connection, connectToRedis; Connection = class Connection { constructor(options) { this.redis = options.redis || connectToRedis(options); this.namespace = options.namespace || 'resque'; if (options.database != null) { this.redis.select(opti...
class Connection constructor: (options) -> @redis = options.redis || connectToRedis options @namespace = options.namespace || 'resque' @redis.select options.database if options.database? enqueue: (queue, func, args...) -> @redis.sadd @key('queues'), queue @redis.rpush @key('queue', que...
JavaScript
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
6f9e920cf11dabf7e7ab94ad23585d9bae0d1ccf
542
https://github.com/technoweenie/coffee-resque/blob/6f9e920cf11dabf7e7ab94ad23585d9bae0d1ccf/src/index.coffee
1
25
technoweenie/coffee-resque:src/index.coffee:1:completion
completion
class Connection constructor: (options) -> @redis = options.redis || connectToRedis options @namespace = options.namespace || 'resque' @redis.select options.database if options.database? enqueue: (queue, func, args...) -> @redis.sadd @key('queues'), queue @redis.rpush @key('queue', que...
args.unshift @namespace args.join ":" end: -> @redis.quit() connectToRedis = (options) -> require('../../node_redis').createClient options.port, options.host exports.Connection = Connection exports.connect = (options) -> new exports.Connection options || {}
CoffeeScript
CoffeeScript
technoweenie/coffee-resque
src/index.coffee
MIT
6f9e920cf11dabf7e7ab94ad23585d9bae0d1ccf
542
https://github.com/technoweenie/coffee-resque/blob/6f9e920cf11dabf7e7ab94ad23585d9bae0d1ccf/src/index.coffee
1
25
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:1:raw_corpus
raw_corpus
exports.gaEvent = (category, action, label, value) -> if __DEV__ console.info 'ga event:', category, action, label, value window.ga? 'send', hitType: 'event', eventCategory: category, eventAction: action, eventLabel: label eventValue: value
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
4
12
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.gaEvent = (category, action, label, value) -> if __DEV__ console.info 'ga event:', category, action, label, value window.ga? 'send', hitType: 'event', eventCategory: category, eventAction: action, eventLabel: label eventValue: ...
exports.gaEvent = function(category, action, label, value) { if (__DEV__) { console.info('ga event:', category, action, label, value); } return typeof window.ga === "function" ? window.ga('send', { hitType: 'event', eventCategory: category, eventAction: action, eventLabel: label, eventValu...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
4
12
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.gaEvent = function(category, action, label, value) { if (__DEV__) { console.info('ga event:', category, action, label, value); } return typeof window.ga === "function" ? window.ga('send', { hitType: 'event', eventCategory: category, ev...
exports.gaEvent = (category, action, label, value) -> if __DEV__ console.info 'ga event:', category, action, label, value window.ga? 'send', hitType: 'event', eventCategory: category, eventAction: action, eventLabel: label eventValue: value
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
4
12
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:2:raw_corpus
raw_corpus
exports.gaTiming = (category, variable, value) -> window.ga? 'send', hitType: 'timing' timingCategory: category timingVar: variable timingValue: value
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
14
19
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.gaTiming = (category, variable, value) -> window.ga? 'send', hitType: 'timing' timingCategory: category timingVar: variable timingValue: value ```
exports.gaTiming = function(category, variable, value) { return typeof window.ga === "function" ? window.ga('send', { hitType: 'timing', timingCategory: category, timingVar: variable, timingValue: value }) : void 0; };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
14
19
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.gaTiming = function(category, variable, value) { return typeof window.ga === "function" ? window.ga('send', { hitType: 'timing', timingCategory: category, timingVar: variable, timingValue: value }) : void 0; }; ```
exports.gaTiming = (category, variable, value) -> window.ga? 'send', hitType: 'timing' timingCategory: category timingVar: variable timingValue: value
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
14
19
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:3:raw_corpus
raw_corpus
exports.mixpanel = (event, properties) -> if __DEV__ console.info 'mixpanel event:', event, properties window.mixpanel?.track event, properties
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
21
24
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.mixpanel = (event, properties) -> if __DEV__ console.info 'mixpanel event:', event, properties window.mixpanel?.track event, properties ```
exports.mixpanel = function(event, properties) { var ref; if (__DEV__) { console.info('mixpanel event:', event, properties); } return (ref = window.mixpanel) != null ? ref.track(event, properties) : void 0; };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
21
24
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.mixpanel = function(event, properties) { var ref; if (__DEV__) { console.info('mixpanel event:', event, properties); } return (ref = window.mixpanel) != null ? ref.track(event, properties) : void 0; }; ```
exports.mixpanel = (event, properties) -> if __DEV__ console.info 'mixpanel event:', event, properties window.mixpanel?.track event, properties
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
21
24
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:3:completion
completion
exports.mixpanel = (event, properties) -> if __DEV__
console.info 'mixpanel event:', event, properties window.mixpanel?.track event, properties
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
21
24
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:4:raw_corpus
raw_corpus
exports.event = (category, action, label, value) -> properties = category: category label: label value: value exports.mixpanel action, properties exports.gaEvent category, action, label, value # methods
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
26
34
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.event = (category, action, label, value) -> properties = category: category label: label value: value exports.mixpanel action, properties exports.gaEvent category, action, label, value # methods ```
exports.event = function(category, action, label, value) { var properties; properties = { category: category, label: label, value: value }; exports.mixpanel(action, properties); return exports.gaEvent(category, action, label, value); }; // methods
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
26
34
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.event = function(category, action, label, value) { var properties; properties = { category: category, label: label, value: value }; exports.mixpanel(action, properties); return exports.gaEvent(category, action, label, value); }; // me...
exports.event = (category, action, label, value) -> properties = category: category label: label value: value exports.mixpanel action, properties exports.gaEvent category, action, label, value # methods
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
26
34
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:4:completion
completion
exports.event = (category, action, label, value) -> properties = category: category label: label
value: value exports.mixpanel action, properties exports.gaEvent category, action, label, value # methods
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
26
34
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:5:raw_corpus
raw_corpus
getAssetsTime = -> timing = window.performance.timing assetsTime = timing.domLoading - timing.navigationStart
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
36
38
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript getAssetsTime = -> timing = window.performance.timing assetsTime = timing.domLoading - timing.navigationStart ```
var getAssetsTime; getAssetsTime = function() { var assetsTime, timing; timing = window.performance.timing; return assetsTime = timing.domLoading - timing.navigationStart; };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
36
38
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var getAssetsTime; getAssetsTime = function() { var assetsTime, timing; timing = window.performance.timing; return assetsTime = timing.domLoading - timing.navigationStart; }; ```
getAssetsTime = -> timing = window.performance.timing assetsTime = timing.domLoading - timing.navigationStart
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
36
38
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:6:raw_corpus
raw_corpus
getRenderTime = -> timing = window.performance.timing renderTime = (new Date).valueOf() - timing.domLoading # Safari 8.4 does not support http://caniuse.com/#feat=nav-timing
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
40
44
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript getRenderTime = -> timing = window.performance.timing renderTime = (new Date).valueOf() - timing.domLoading # Safari 8.4 does not support http://caniuse.com/#feat=nav-timing ```
var getRenderTime; getRenderTime = function() { var renderTime, timing; timing = window.performance.timing; return renderTime = (new Date()).valueOf() - timing.domLoading; }; // Safari 8.4 does not support http://caniuse.com/#feat=nav-timing
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
40
44
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var getRenderTime; getRenderTime = function() { var renderTime, timing; timing = window.performance.timing; return renderTime = (new Date()).valueOf() - timing.domLoading; }; // Safari 8.4 does not support http://caniuse.com/#feat=nav-timing ```
getRenderTime = -> timing = window.performance.timing renderTime = (new Date).valueOf() - timing.domLoading # Safari 8.4 does not support http://caniuse.com/#feat=nav-timing
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
40
44
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:6:completion
completion
getRenderTime = -> timing = window.performance.timing
renderTime = (new Date).valueOf() - timing.domLoading # Safari 8.4 does not support http://caniuse.com/#feat=nav-timing
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
40
44
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:7:raw_corpus
raw_corpus
exports.readRapidBootPerfs = -> return unless window.performance? exports.gaTiming 'loading', 'assets', getAssetsTime() exports.gaTiming 'loading', 'rapid boot', getRenderTime()
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
45
48
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.readRapidBootPerfs = -> return unless window.performance? exports.gaTiming 'loading', 'assets', getAssetsTime() exports.gaTiming 'loading', 'rapid boot', getRenderTime() ```
exports.readRapidBootPerfs = function() { if (window.performance == null) { return; } exports.gaTiming('loading', 'assets', getAssetsTime()); return exports.gaTiming('loading', 'rapid boot', getRenderTime()); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
45
48
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.readRapidBootPerfs = function() { if (window.performance == null) { return; } exports.gaTiming('loading', 'assets', getAssetsTime()); return exports.gaTiming('loading', 'rapid boot', getRenderTime()); }; ```
exports.readRapidBootPerfs = -> return unless window.performance? exports.gaTiming 'loading', 'assets', getAssetsTime() exports.gaTiming 'loading', 'rapid boot', getRenderTime()
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
45
48
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:7:completion
completion
exports.readRapidBootPerfs = -> return unless window.performance?
exports.gaTiming 'loading', 'assets', getAssetsTime() exports.gaTiming 'loading', 'rapid boot', getRenderTime()
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
45
48
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:8:raw_corpus
raw_corpus
exports.readLoadingPerfs = -> return unless window.performance? exports.gaTiming 'loading', 'assets', getAssetsTime() exports.gaTiming 'loading', 'full load', getRenderTime()
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
50
53
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.readLoadingPerfs = -> return unless window.performance? exports.gaTiming 'loading', 'assets', getAssetsTime() exports.gaTiming 'loading', 'full load', getRenderTime() ```
exports.readLoadingPerfs = function() { if (window.performance == null) { return; } exports.gaTiming('loading', 'assets', getAssetsTime()); return exports.gaTiming('loading', 'full load', getRenderTime()); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
50
53
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.readLoadingPerfs = function() { if (window.performance == null) { return; } exports.gaTiming('loading', 'assets', getAssetsTime()); return exports.gaTiming('loading', 'full load', getRenderTime()); }; ```
exports.readLoadingPerfs = -> return unless window.performance? exports.gaTiming 'loading', 'assets', getAssetsTime() exports.gaTiming 'loading', 'full load', getRenderTime()
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
50
53
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:8:completion
completion
exports.readLoadingPerfs = -> return unless window.performance?
exports.gaTiming 'loading', 'assets', getAssetsTime() exports.gaTiming 'loading', 'full load', getRenderTime()
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
50
53
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:9:raw_corpus
raw_corpus
exports.compareRequireCost = (startTime, label) -> now = (new Date).valueOf() cost = now - startTime if cost > 20 # suppose dependencies from remote server cost more than 20ms exports.gaTiming 'async require', label, cost # super properties for mixpanel
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
55
62
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:9:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.compareRequireCost = (startTime, label) -> now = (new Date).valueOf() cost = now - startTime if cost > 20 # suppose dependencies from remote server cost more than 20ms exports.gaTiming 'async require', label, cost # super properties for mix...
exports.compareRequireCost = function(startTime, label) { var cost, now; now = (new Date()).valueOf(); cost = now - startTime; if (cost > 20) { // suppose dependencies from remote server cost more than 20ms return exports.gaTiming('async require', label, cost); } }; // super properties for mixpanel
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
55
62
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:9:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.compareRequireCost = function(startTime, label) { var cost, now; now = (new Date()).valueOf(); cost = now - startTime; if (cost > 20) { // suppose dependencies from remote server cost more than 20ms return exports.gaTiming('async require', l...
exports.compareRequireCost = (startTime, label) -> now = (new Date).valueOf() cost = now - startTime if cost > 20 # suppose dependencies from remote server cost more than 20ms exports.gaTiming 'async require', label, cost # super properties for mixpanel
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
55
62
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:9:completion
completion
exports.compareRequireCost = (startTime, label) -> now = (new Date).valueOf() cost = now - startTime if cost > 20
# suppose dependencies from remote server cost more than 20ms exports.gaTiming 'async require', label, cost # super properties for mixpanel
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
55
62
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:10:raw_corpus
raw_corpus
exports.registerSuperProperties = -> if typeof window isnt 'undefined' platform = switch # https://github.com/atom/electron/issues/2288 when window.process?.versions?.electron? then 'Electron' else 'Web' window.mixpanel?.register version: config.version serverEnv: config.serverEn...
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
63
77
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:10:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.registerSuperProperties = -> if typeof window isnt 'undefined' platform = switch # https://github.com/atom/electron/issues/2288 when window.process?.versions?.electron? then 'Electron' else 'Web' window.mixpanel?.register ...
exports.registerSuperProperties = function() { var platform, ref; if (typeof window !== 'undefined') { platform = (function() { var ref, ref1; switch (false) { // https://github.com/atom/electron/issues/2288 case ((ref = window.process) != null ? (ref1 = ref.versions) != null ? ref1....
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
63
77
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:10:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.registerSuperProperties = function() { var platform, ref; if (typeof window !== 'undefined') { platform = (function() { var ref, ref1; switch (false) { // https://github.com/atom/electron/issues/2288 case ((ref = window.p...
exports.registerSuperProperties = -> if typeof window isnt 'undefined' platform = switch # https://github.com/atom/electron/issues/2288 when window.process?.versions?.electron? then 'Electron' else 'Web' window.mixpanel?.register version: config.version serverEnv: config.serverEn...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
63
77
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:10:completion
completion
exports.registerSuperProperties = -> if typeof window isnt 'undefined' platform = switch # https://github.com/atom/electron/issues/2288 when window.process?.versions?.electron? then 'Electron' else 'Web' window.mixpanel?.register
version: config.version serverEnv: config.serverEnv platform: platform # tracked events # https://www.teambition.com/project/52ce03c161d25a961b002cd1/posts/post/56c161e399ee3a7d039dbe69 # category web app
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
63
77
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:11:raw_corpus
raw_corpus
exports.trackAppLoaded = -> # 监控应用初始化 exports.event 'web app', 'initial loaded' # category retention 活跃度
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
78
82
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:11:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.trackAppLoaded = -> # 监控应用初始化 exports.event 'web app', 'initial loaded' # category retention 活跃度 ```
exports.trackAppLoaded = function() { // 监控应用初始化 return exports.event('web app', 'initial loaded'); }; // category retention 活跃度
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
78
82
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:11:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.trackAppLoaded = function() { // 监控应用初始化 return exports.event('web app', 'initial loaded'); }; // category retention 活跃度 ```
exports.trackAppLoaded = -> # 监控应用初始化 exports.event 'web app', 'initial loaded' # category retention 活跃度
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
78
82
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:11:completion
completion
exports.trackAppLoaded = -> # 监控应用初始化
exports.event 'web app', 'initial loaded' # category retention 活跃度
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
78
82
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:60:raw_corpus
raw_corpus
exports.enterTeam = -> exports.event 'team', 'enter team' # category count countMessages = 0
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
159
163
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:60:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.enterTeam = -> exports.event 'team', 'enter team' # category count countMessages = 0 ```
var countMessages; exports.enterTeam = function() { return exports.event('team', 'enter team'); }; // category count countMessages = 0;
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
159
163
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:60:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var countMessages; exports.enterTeam = function() { return exports.event('team', 'enter team'); }; // category count countMessages = 0; ```
exports.enterTeam = -> exports.event 'team', 'enter team' # category count countMessages = 0
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
159
163
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:60:completion
completion
exports.enterTeam = -> exports.event 'team', 'enter team'
# category count countMessages = 0
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
159
163
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:62:raw_corpus
raw_corpus
exports.countChannelMessages = -> exports.gaEvent 'count', 'channel messages', undefined, countMessages countMessages = 0 # special method, handles trackingPage and trackingPageTime passed from talk-account via cookie
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
166
170
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:62:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.countChannelMessages = -> exports.gaEvent 'count', 'channel messages', undefined, countMessages countMessages = 0 # special method, handles trackingPage and trackingPageTime passed from talk-account via cookie ```
exports.countChannelMessages = function() { var countMessages; exports.gaEvent('count', 'channel messages', void 0, countMessages); return countMessages = 0; }; // special method, handles trackingPage and trackingPageTime passed from talk-account via cookie
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
166
170
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:62:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.countChannelMessages = function() { var countMessages; exports.gaEvent('count', 'channel messages', void 0, countMessages); return countMessages = 0; }; // special method, handles trackingPage and trackingPageTime passed from talk-account via cookie ...
exports.countChannelMessages = -> exports.gaEvent 'count', 'channel messages', undefined, countMessages countMessages = 0 # special method, handles trackingPage and trackingPageTime passed from talk-account via cookie
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
166
170
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:62:completion
completion
exports.countChannelMessages = -> exports.gaEvent 'count', 'channel messages', undefined, countMessages
countMessages = 0 # special method, handles trackingPage and trackingPageTime passed from talk-account via cookie
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
166
170
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:63:raw_corpus
raw_corpus
exports.detectTrackingInfoFromAccount = -> trackingPage = cookie.get('trackingPage') trackingPageLabel = cookie.get('trackingPageLabel') trackingPageTime = cookie.get('trackingPageTime') if trackingPage? and trackingPageTime? duration = window.performance.timing.navigationStart - trackingPageTime switc...
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
172
194
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:63:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.detectTrackingInfoFromAccount = -> trackingPage = cookie.get('trackingPage') trackingPageLabel = cookie.get('trackingPageLabel') trackingPageTime = cookie.get('trackingPageTime') if trackingPage? and trackingPageTime? duration = window.perfor...
exports.detectTrackingInfoFromAccount = function() { var cookieConfigs, duration, trackingPage, trackingPageLabel, trackingPageTime; trackingPage = cookie.get('trackingPage'); trackingPageLabel = cookie.get('trackingPageLabel'); trackingPageTime = cookie.get('trackingPageTime'); if ((trackingPage != null) && ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
172
194
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:63:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.detectTrackingInfoFromAccount = function() { var cookieConfigs, duration, trackingPage, trackingPageLabel, trackingPageTime; trackingPage = cookie.get('trackingPage'); trackingPageLabel = cookie.get('trackingPageLabel'); trackingPageTime = cookie.ge...
exports.detectTrackingInfoFromAccount = -> trackingPage = cookie.get('trackingPage') trackingPageLabel = cookie.get('trackingPageLabel') trackingPageTime = cookie.get('trackingPageTime') if trackingPage? and trackingPageTime? duration = window.performance.timing.navigationStart - trackingPageTime switc...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
172
194
jianliaoim/talk-os:talk-web/client/util/analytics.coffee:63:completion
completion
exports.detectTrackingInfoFromAccount = -> trackingPage = cookie.get('trackingPage') trackingPageLabel = cookie.get('trackingPageLabel') trackingPageTime = cookie.get('trackingPageTime') if trackingPage? and trackingPageTime? duration = window.performance.timing.navigationStart - trackingPageTime switc...
when 'register' exports.registerSucc(trackingPageLabel) exports.gaTiming 'login', 'register succ', duration when 'direct login' exports.directLogin() exports.gaTiming 'login', 'direct login succ', duration # actually remove cookie cookieConfigs = domain: config.cookie...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/analytics.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/analytics.coffee
172
194
jianliaoim/talk-os:talk-account/client/app/email-sent.coffee:1:raw_corpus
raw_corpus
React = require 'react' Immutable = require 'immutable' detect = require '../util/detect' locales = require '../locales' controllers = require '../controllers' Space = React.createFactory require 'react-lite-space' {div, input, span, a} = React.DOM module.exports = React.createClass displayName: 'email-sent' p...
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/email-sent.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/email-sent.coffee
1
26
jianliaoim/talk-os:talk-account/client/app/email-sent.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' Immutable = require 'immutable' detect = require '../util/detect' locales = require '../locales' controllers = require '../controllers' Space = React.createFactory require 'react-lite-space' {div, input, span, a} = React.DOM module.exp...
var Immutable, React, Space, a, controllers, detect, div, input, locales, span; React = require('react'); Immutable = require('immutable'); detect = require('../util/detect'); locales = require('../locales'); controllers = require('../controllers'); Space = React.createFactory(require('react-lite-space')); ({div...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/client/app/email-sent.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/email-sent.coffee
1
26
jianliaoim/talk-os:talk-account/client/app/email-sent.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable, React, Space, a, controllers, detect, div, input, locales, span; React = require('react'); Immutable = require('immutable'); detect = require('../util/detect'); locales = require('../locales'); controllers = require('../controllers'); Space = R...
React = require 'react' Immutable = require 'immutable' detect = require '../util/detect' locales = require '../locales' controllers = require '../controllers' Space = React.createFactory require 'react-lite-space' {div, input, span, a} = React.DOM module.exports = React.createClass displayName: 'email-sent' p...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/email-sent.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/email-sent.coffee
1
26
jianliaoim/talk-os:talk-account/client/app/email-sent.coffee:1:completion
completion
React = require 'react' Immutable = require 'immutable' detect = require '../util/detect' locales = require '../locales' controllers = require '../controllers' Space = React.createFactory require 'react-lite-space' {div, input, span, a} = React.DOM module.exports = React.createClass displayName: 'email-sent'
propTypes: store: React.PropTypes.instanceOf(Immutable.Map).isRequired getAccount: -> @props.store.getIn(['client', 'account']) getLanguage: -> @props.store.getIn(['client', 'language']) render: -> div className: 'email-sent control-panel', locales.get('emailHasBeenSent', @getLanguage())....
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/email-sent.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/email-sent.coffee
1
26
AriaMinaei/pretty-error:test/PrettyError.coffee:2:raw_corpus
raw_corpus
error = (what) -> if typeof what is 'string' return error -> throw Error what else if what instanceof Function try do what catch e return e throw Error "bad argument for error" describe "PrettyError", -> describe "constructor()", -> it "should work", -> new PrettyError de...
CoffeeScript
AriaMinaei/pretty-error
test/PrettyError.coffee
MIT
ae492ce4faf051741f17b689b5b4d62f41b9ccf6
1,524
https://github.com/AriaMinaei/pretty-error/blob/ae492ce4faf051741f17b689b5b4d62f41b9ccf6/test/PrettyError.coffee
10
59
AriaMinaei/pretty-error:test/PrettyError.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript error = (what) -> if typeof what is 'string' return error -> throw Error what else if what instanceof Function try do what catch e return e throw Error "bad argument for error" describe "PrettyError", -> describe "constructor()"...
var error; error = function(what) { var e; if (typeof what === 'string') { return error(function() { throw Error(what); }); } else if (what instanceof Function) { try { what(); } catch (error1) { e = error1; return e; } } throw Error("bad argument for error"); }; ...
CoffeeScript
JavaScript
AriaMinaei/pretty-error
test/PrettyError.coffee
MIT
ae492ce4faf051741f17b689b5b4d62f41b9ccf6
1,524
https://github.com/AriaMinaei/pretty-error/blob/ae492ce4faf051741f17b689b5b4d62f41b9ccf6/test/PrettyError.coffee
10
59
AriaMinaei/pretty-error:test/PrettyError.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var error; error = function(what) { var e; if (typeof what === 'string') { return error(function() { throw Error(what); }); } else if (what instanceof Function) { try { what(); } catch (error1) { e = error1; return e; ...
error = (what) -> if typeof what is 'string' return error -> throw Error what else if what instanceof Function try do what catch e return e throw Error "bad argument for error" describe "PrettyError", -> describe "constructor()", -> it "should work", -> new PrettyError de...
JavaScript
CoffeeScript
AriaMinaei/pretty-error
test/PrettyError.coffee
MIT
ae492ce4faf051741f17b689b5b4d62f41b9ccf6
1,524
https://github.com/AriaMinaei/pretty-error/blob/ae492ce4faf051741f17b689b5b4d62f41b9ccf6/test/PrettyError.coffee
10
59
AriaMinaei/pretty-error:test/PrettyError.coffee:2:completion
completion
error = (what) -> if typeof what is 'string' return error -> throw Error what else if what instanceof Function try do what catch e return e throw Error "bad argument for error" describe "PrettyError", -> describe "constructor()", -> it "should work", -> new PrettyError de...
p.style.should.eql defaultStyle() it "should return different contents after appending some styles", -> p = new PrettyError p.appendStyle 'some selector': 'display': 'block' p.style.should.not.eql defaultStyle() describe "render()", -> it "should work", -> p = new PrettyError p...
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
test/PrettyError.coffee
MIT
ae492ce4faf051741f17b689b5b4d62f41b9ccf6
1,524
https://github.com/AriaMinaei/pretty-error/blob/ae492ce4faf051741f17b689b5b4d62f41b9ccf6/test/PrettyError.coffee
10
59
AriaMinaei/pretty-error:test/PrettyError.coffee:3:raw_corpus
raw_corpus
console.log p.render e4, no e5 = message: "Error with custom stack" stack: ['line one', 'line two'] wrapper: 'UnhandledRejection' console.log p.render e5, no e6 = error -> PrettyError.someNonExistingFuncion() console.log p.render e6, no it.skip "should render with...
CoffeeScript
AriaMinaei/pretty-error
test/PrettyError.coffee
MIT
ae492ce4faf051741f17b689b5b4d62f41b9ccf6
1,524
https://github.com/AriaMinaei/pretty-error/blob/ae492ce4faf051741f17b689b5b4d62f41b9ccf6/test/PrettyError.coffee
60
109
AriaMinaei/pretty-error:test/PrettyError.coffee:3:completion
completion
console.log p.render e4, no e5 = message: "Error with custom stack" stack: ['line one', 'line two'] wrapper: 'UnhandledRejection' console.log p.render e5, no e6 = error -> PrettyError.someNonExistingFuncion() console.log p.render e6, no it.skip "should render with...
beforeEach -> {prepareStackTrace} = Error Error.prepareStackTrace = null afterEach -> Error.prepareStackTrace = prepareStackTrace it "throws unformatted error when not started", -> try throw new Error "foo bar" catch exc isFormatted(exc).should.be.eql false it...
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
test/PrettyError.coffee
MIT
ae492ce4faf051741f17b689b5b4d62f41b9ccf6
1,524
https://github.com/AriaMinaei/pretty-error/blob/ae492ce4faf051741f17b689b5b4d62f41b9ccf6/test/PrettyError.coffee
60
109
oozcitak/xmlbuilder-js:test/guards/dtdattlist.coffee:1:raw_corpus
raw_corpus
suite 'DTDAttList Guards:', -> test 'constructor', -> testCases = [ () -> xml('test').dtd().att() () -> xml('test').dtd().att('ele') () -> xml('test').dtd().att('ele', 'att') () -> xml('test').dtd().att('ele', 'att', 'type') () -> xml('test').dtd().att('ele', 'att', 'type', 'INVALID'...
CoffeeScript
oozcitak/xmlbuilder-js
test/guards/dtdattlist.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/dtdattlist.coffee
1
25
oozcitak/xmlbuilder-js:test/guards/dtdattlist.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'DTDAttList Guards:', -> test 'constructor', -> testCases = [ () -> xml('test').dtd().att() () -> xml('test').dtd().att('ele') () -> xml('test').dtd().att('ele', 'att') () -> xml('test').dtd().att('ele', 'att', 'type') ()...
suite('DTDAttList Guards:', function() { return test('constructor', function() { var i, j, ref, results, results1, testCases; testCases = [ function() { return xml('test').dtd().att(); }, function() { return xml('test').dtd().att('ele'); }, function() { re...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/guards/dtdattlist.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/dtdattlist.coffee
1
25
oozcitak/xmlbuilder-js:test/guards/dtdattlist.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('DTDAttList Guards:', function() { return test('constructor', function() { var i, j, ref, results, results1, testCases; testCases = [ function() { return xml('test').dtd().att(); }, function() { return xml('test').d...
suite 'DTDAttList Guards:', -> test 'constructor', -> testCases = [ () -> xml('test').dtd().att() () -> xml('test').dtd().att('ele') () -> xml('test').dtd().att('ele', 'att') () -> xml('test').dtd().att('ele', 'att', 'type') () -> xml('test').dtd().att('ele', 'att', 'type', 'INVALID'...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/guards/dtdattlist.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/dtdattlist.coffee
1
25
oozcitak/xmlbuilder-js:test/guards/dtdattlist.coffee:1:completion
completion
suite 'DTDAttList Guards:', -> test 'constructor', -> testCases = [ () -> xml('test').dtd().att() () -> xml('test').dtd().att('ele') () -> xml('test').dtd().att('ele', 'att') () -> xml('test').dtd().att('ele', 'att', 'type') () -> xml('test').dtd().att('ele', 'att', 'type', 'INVALID'...
"Missing DTD element name. parent: <test>" "Missing DTD attribute name. node: <ele>, parent: <test>" "Missing DTD attribute type. node: <ele>, parent: <test>" "Missing DTD attribute default. node: <ele>, parent: <test>" "Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAU...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/guards/dtdattlist.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/dtdattlist.coffee
1
25
jianliaoim/talk-os:talk-api2x/server/schemas/search-story.coffee:2:raw_corpus
raw_corpus
return # @osv SearchStorySchema.add tags: [ _tagId: type: Schema.Types.ObjectId es_index: 'not_analyzed' get: -> @_id name: type: String es_term_vector: 'with_positions_offsets' es_analyzer: 'ik_max_word' ] SearchStorySchema.plugin mongoosastic, index: 'talk_stories_v...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/search-story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/search-story.coffee
51
72
jianliaoim/talk-os:talk-api2x/server/schemas/search-story.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript return # @osv SearchStorySchema.add tags: [ _tagId: type: Schema.Types.ObjectId es_index: 'not_analyzed' get: -> @_id name: type: String es_term_vector: 'with_positions_offsets' es_analyzer: 'ik_max_word' ] Search...
// @osv return; SearchStorySchema.add({ tags: [ { _tagId: { type: Schema.Types.ObjectId, es_index: 'not_analyzed', get: function() { return this._id; } }, name: { type: String, es_term_vector: 'with_positions_offsets', es_analyze...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/search-story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/search-story.coffee
51
72
jianliaoim/talk-os:talk-api2x/server/schemas/search-story.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // @osv return; SearchStorySchema.add({ tags: [ { _tagId: { type: Schema.Types.ObjectId, es_index: 'not_analyzed', get: function() { return this._id; } }, name: { type: String, es_te...
return # @osv SearchStorySchema.add tags: [ _tagId: type: Schema.Types.ObjectId es_index: 'not_analyzed' get: -> @_id name: type: String es_term_vector: 'with_positions_offsets' es_analyzer: 'ik_max_word' ] SearchStorySchema.plugin mongoosastic, index: 'talk_stories_v...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/search-story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/search-story.coffee
51
72
jianliaoim/talk-os:talk-api2x/server/schemas/search-story.coffee:2:completion
completion
return # @osv SearchStorySchema.add tags: [ _tagId: type: Schema.Types.ObjectId es_index: 'not_analyzed' get: -> @_id name: type: String
es_term_vector: 'with_positions_offsets' es_analyzer: 'ik_max_word' ] SearchStorySchema.plugin mongoosastic, index: 'talk_stories_v2' type: 'stories' host: config.searchHost port: config.searchPort protocol: config.searchProtocol bulk: config.searchBulk or size: 1000, delay: 3000
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/search-story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/search-story.coffee
51
72
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
39
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
39
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
39
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:completion
completion
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
cyclotronApp.controller 'ExportController', ($scope, $state, $stateParams, $location, $timeout, $uibModal, configService, dashboardService, exportService) -> $scope.exportFormats = configService.exportFormats $scope.exportFormat = _.first $scope.exportFormats $scope.exporting = false $scope.parameters...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
39
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:2:raw_corpus
raw_corpus
# Add default, built-in parameters exportParameters = _.clone $location.search() exportParameters.browsercheck = false exportParameters.exporting = true exportService.exportAsync $scope.dashboardName, $scope.exportFormat.value, exportParameters, (result) -> $scope.checkStatu...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.export.coffee
41
85
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:2:completion
completion
# Add default, built-in parameters exportParameters = _.clone $location.search() exportParameters.browsercheck = false exportParameters.exporting = true exportService.exportAsync $scope.dashboardName, $scope.exportFormat.value, exportParameters, (result) -> $scope.checkStatu...
$scope.dashboardName = "" else # Get the latest revision q = dashboardService.getDashboard($stateParams.dashboardName) q.then (dashboardWrapper) -> $scope.dashboardName = $stateParams.dashboardName q.catch (error) -> switch error.status when 4...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.export.coffee
41
85
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
39
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
39
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
39
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:completion
completion
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
cyclotronApp.controller 'ExportController', ($scope, $state, $stateParams, $location, $timeout, $uibModal, configService, dashboardService, exportService) -> $scope.exportFormats = configService.exportFormats $scope.exportFormat = _.first $scope.exportFormats $scope.exporting = false $scope.parameters...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
39
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0d7d6f843df6f4dc02ea758dc88423d6884d20be
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
50
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0d7d6f843df6f4dc02ea758dc88423d6884d20be
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
50
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0d7d6f843df6f4dc02ea758dc88423d6884d20be
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
50
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:1:completion
completion
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
$scope.parameters = $location.search() $scope.$watch 'parameters', (parameters, oldParameters) -> deletedKeys = _.difference(_.keys(oldParameters), _.keys(parameters)) _.each deletedKeys, (key) -> $location.search(key, null) _.each parameters, (value, key) -> $locat...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0d7d6f843df6f4dc02ea758dc88423d6884d20be
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.export.coffee
1
50
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:2:raw_corpus
raw_corpus
else $scope.exporting = false # Initialization if _.isEmpty $stateParams.dashboardName $scope.dashboardName = "" else # Get the latest revision q = dashboardService.getDashboard($stateParams.dashboardName) q.then (dashboardWrapper) -> $scope.dash...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0d7d6f843df6f4dc02ea758dc88423d6884d20be
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.export.coffee
51
79
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.export.coffee:2:completion
completion
else $scope.exporting = false # Initialization if _.isEmpty $stateParams.dashboardName $scope.dashboardName = "" else # Get the latest revision q = dashboardService.getDashboard($stateParams.dashboardName) q.then (dashboardWrapper) -> $scope.dash...
switch error.status when 401 $scope.login(true).then -> viewPermissionDenied() when 403 viewPermissionDenied() viewPermissionDenied = -> modalInstance = $uibModal.open { templateUrl: '/partials/viewP...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.export.coffee
MIT
0d7d6f843df6f4dc02ea758dc88423d6884d20be
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.export.coffee
51
79