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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cdglabs/apparatus:src/Model/Layout.coffee:1:completion | completion | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@showAttributesInOutline = true
@_rightPanelMin = 100
@_rightPanelMax = 700
# Note: constraints will be applied before setting the new right-panel width
setRightPanelWidth: (newWidth) ->
@rightPanelW... | toggleFullScreen: ->
@setFullScreen(!@fullScreen)
setFullScreen: (fullScreen) ->
@fullScreen = fullScreen
@_refreshLayout()
toggleShowAttributesInOutline: ->
@showAttributesInOutline = !@showAttributesInOutline
_refreshLayout: ->
# Changing the layout will deform the canvas
# This is a ... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | ac7e4ad116cfd7afe7d4a5aee537c725f616931e | 1,052 | https://github.com/cdglabs/apparatus/blob/ac7e4ad116cfd7afe7d4a5aee537c725f616931e/src/Model/Layout.coffee | 1 | 29 |
cdglabs/apparatus:src/Model/Layout.coffee:1:raw_corpus | raw_corpus | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@showAttributesInOutline = true
@_rightPanelMin = 100
@_rightPanelMax = 700
# Note: constraints will be applied before setting the new right-panel width
setRightPanelWidth: (newWidth) ->
@rightPanelW... | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/Model/Layout.coffee | 1 | 26 | ||
cdglabs/apparatus:src/Model/Layout.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@showAttributesInOutline = true
@_rightPanelMin = 100
@_rightPanelMax = 700
# Note: constraints will be applied before setting the new right-panel w... | var Layout;
module.exports = Layout = class Layout {
constructor() {
this.rightPanelWidth = 400;
this.fullScreen = false;
this.showAttributesInOutline = true;
this._rightPanelMin = 100;
this._rightPanelMax = 700;
}
// Note: constraints will be applied before setting the new right-panel width... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/Model/Layout.coffee | 1 | 26 |
cdglabs/apparatus:src/Model/Layout.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Layout;
module.exports = Layout = class Layout {
constructor() {
this.rightPanelWidth = 400;
this.fullScreen = false;
this.showAttributesInOutline = true;
this._rightPanelMin = 100;
this._rightPanelMax = 700;
}
// Note: constraints w... | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@showAttributesInOutline = true
@_rightPanelMin = 100
@_rightPanelMax = 700
# Note: constraints will be applied before setting the new right-panel width
setRightPanelWidth: (newWidth) ->
@rightPanelW... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/Model/Layout.coffee | 1 | 26 |
cdglabs/apparatus:src/Model/Layout.coffee:1:completion | completion | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@showAttributesInOutline = true
@_rightPanelMin = 100
@_rightPanelMax = 700
# Note: constraints will be applied before setting the new right-panel width
setRightPanelWidth: (newWidth) ->
@rightPanelW... | toggleFullScreen: ->
@fullScreen = !@fullScreen
@_refreshLayout()
toggleShowAttributesInOutline: ->
@showAttributesInOutline = !@showAttributesInOutline
_refreshLayout: ->
# Changing the layout will deform the canvas
# This is a workaround by triggering "resize" event so that the Canvas will u... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/Model/Layout.coffee | 1 | 26 |
cdglabs/apparatus:src/Model/Layout.coffee:1:raw_corpus | raw_corpus | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@showAttributesInOutline = true
@_rightPanelMin = 100
@_rightPanelMax = 600
# applies the constraints to the new right panel width
constraintRightPanelWidth: (newWidth) ->
@rightPanelWidth = Math.min... | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 5420ce5155924ba348dbe621cd3d4c39ee877731 | 1,052 | https://github.com/cdglabs/apparatus/blob/5420ce5155924ba348dbe621cd3d4c39ee877731/src/Model/Layout.coffee | 1 | 26 | ||
cdglabs/apparatus:src/Model/Layout.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@showAttributesInOutline = true
@_rightPanelMin = 100
@_rightPanelMax = 600
# applies the constraints to the new right panel width
constraintRight... | var Layout;
module.exports = Layout = class Layout {
constructor() {
this.rightPanelWidth = 400;
this.fullScreen = false;
this.showAttributesInOutline = true;
this._rightPanelMin = 100;
this._rightPanelMax = 600;
}
// applies the constraints to the new right panel width
constraintRightPane... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 5420ce5155924ba348dbe621cd3d4c39ee877731 | 1,052 | https://github.com/cdglabs/apparatus/blob/5420ce5155924ba348dbe621cd3d4c39ee877731/src/Model/Layout.coffee | 1 | 26 |
cdglabs/apparatus:src/Model/Layout.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Layout;
module.exports = Layout = class Layout {
constructor() {
this.rightPanelWidth = 400;
this.fullScreen = false;
this.showAttributesInOutline = true;
this._rightPanelMin = 100;
this._rightPanelMax = 600;
}
// applies the constra... | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@showAttributesInOutline = true
@_rightPanelMin = 100
@_rightPanelMax = 600
# applies the constraints to the new right panel width
constraintRightPanelWidth: (newWidth) ->
@rightPanelWidth = Math.min... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 5420ce5155924ba348dbe621cd3d4c39ee877731 | 1,052 | https://github.com/cdglabs/apparatus/blob/5420ce5155924ba348dbe621cd3d4c39ee877731/src/Model/Layout.coffee | 1 | 26 |
cdglabs/apparatus:src/Model/Layout.coffee:1:completion | completion | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@showAttributesInOutline = true
@_rightPanelMin = 100
@_rightPanelMax = 600
# applies the constraints to the new right panel width
constraintRightPanelWidth: (newWidth) ->
@rightPanelWidth = Math.min... | toggleFullScreen: ->
@fullScreen = !@fullScreen
@_refreshLayout()
toggleShowAttributesInOutline: ->
@showAttributesInOutline = !@showAttributesInOutline
_refreshLayout: ->
# Changing the layout will deform the canvas
# This is a workaround by triggering "resize" event so that the Canvas will u... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 5420ce5155924ba348dbe621cd3d4c39ee877731 | 1,052 | https://github.com/cdglabs/apparatus/blob/5420ce5155924ba348dbe621cd3d4c39ee877731/src/Model/Layout.coffee | 1 | 26 |
cdglabs/apparatus:src/Model/Layout.coffee:1:raw_corpus | raw_corpus | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@_rightPanelMin = 100
@_rightPanelMax = 600
# applies the constraints to the new right panel width
constraintRightPanelWidth: (newWidth) ->
@rightPanelWidth = Math.min(@_rightPanelMax, Math.max(@_rightPa... | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 8ea6c226e27e9cdcf9d976da0478c7958eeb7410 | 1,052 | https://github.com/cdglabs/apparatus/blob/8ea6c226e27e9cdcf9d976da0478c7958eeb7410/src/Model/Layout.coffee | 1 | 22 | ||
cdglabs/apparatus:src/Model/Layout.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@_rightPanelMin = 100
@_rightPanelMax = 600
# applies the constraints to the new right panel width
constraintRightPanelWidth: (newWidth) ->
@right... | var Layout;
module.exports = Layout = class Layout {
constructor() {
this.rightPanelWidth = 400;
this.fullScreen = false;
this._rightPanelMin = 100;
this._rightPanelMax = 600;
}
// applies the constraints to the new right panel width
constraintRightPanelWidth(newWidth) {
this.rightPanelWid... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 8ea6c226e27e9cdcf9d976da0478c7958eeb7410 | 1,052 | https://github.com/cdglabs/apparatus/blob/8ea6c226e27e9cdcf9d976da0478c7958eeb7410/src/Model/Layout.coffee | 1 | 22 |
cdglabs/apparatus:src/Model/Layout.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Layout;
module.exports = Layout = class Layout {
constructor() {
this.rightPanelWidth = 400;
this.fullScreen = false;
this._rightPanelMin = 100;
this._rightPanelMax = 600;
}
// applies the constraints to the new right panel width
const... | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@_rightPanelMin = 100
@_rightPanelMax = 600
# applies the constraints to the new right panel width
constraintRightPanelWidth: (newWidth) ->
@rightPanelWidth = Math.min(@_rightPanelMax, Math.max(@_rightPa... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 8ea6c226e27e9cdcf9d976da0478c7958eeb7410 | 1,052 | https://github.com/cdglabs/apparatus/blob/8ea6c226e27e9cdcf9d976da0478c7958eeb7410/src/Model/Layout.coffee | 1 | 22 |
cdglabs/apparatus:src/Model/Layout.coffee:1:completion | completion | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@fullScreen = false
@_rightPanelMin = 100
@_rightPanelMax = 600
# applies the constraints to the new right panel width
constraintRightPanelWidth: (newWidth) ->
@rightPanelWidth = Math.min(@_rightPanelMax, Math.max(@_rightPa... | @_refreshLayout()
toggleFullScreen: ->
@fullScreen = !@fullScreen
@_refreshLayout()
_refreshLayout: ->
# Changing the layout will deform the canvas
# This is a workaround by triggering "resize" event so that the Canvas will update itself
resize = new Event "resize"
window.dispatchEvent res... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 8ea6c226e27e9cdcf9d976da0478c7958eeb7410 | 1,052 | https://github.com/cdglabs/apparatus/blob/8ea6c226e27e9cdcf9d976da0478c7958eeb7410/src/Model/Layout.coffee | 1 | 22 |
cdglabs/apparatus:src/Model/Layout.coffee:1:raw_corpus | raw_corpus | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@_rightPanelMin = 100
@_rightPanelMax = 600
@fullScreen = false
resizeRightPanel: (xDelta) ->
@rightPanelWidth -= xDelta
@rightPanelWidth = Math.min(@_rightPanelMax, Math.max(@_rightPanelMin, @rightPanelWidth))
@_refre... | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | dfaae93f60beddbaf86333b38128f0e6853ed899 | 1,052 | https://github.com/cdglabs/apparatus/blob/dfaae93f60beddbaf86333b38128f0e6853ed899/src/Model/Layout.coffee | 1 | 21 | ||
cdglabs/apparatus:src/Model/Layout.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@_rightPanelMin = 100
@_rightPanelMax = 600
@fullScreen = false
resizeRightPanel: (xDelta) ->
@rightPanelWidth -= xDelta
@rightPanelWidth = Math.min(@_rightPanelMax,... | var Layout;
module.exports = Layout = class Layout {
constructor() {
this.rightPanelWidth = 400;
this._rightPanelMin = 100;
this._rightPanelMax = 600;
this.fullScreen = false;
}
resizeRightPanel(xDelta) {
this.rightPanelWidth -= xDelta;
this.rightPanelWidth = Math.min(this._rightPanelMax... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | dfaae93f60beddbaf86333b38128f0e6853ed899 | 1,052 | https://github.com/cdglabs/apparatus/blob/dfaae93f60beddbaf86333b38128f0e6853ed899/src/Model/Layout.coffee | 1 | 21 |
cdglabs/apparatus:src/Model/Layout.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Layout;
module.exports = Layout = class Layout {
constructor() {
this.rightPanelWidth = 400;
this._rightPanelMin = 100;
this._rightPanelMax = 600;
this.fullScreen = false;
}
resizeRightPanel(xDelta) {
this.rightPanelWidth -= xDelta;
... | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@_rightPanelMin = 100
@_rightPanelMax = 600
@fullScreen = false
resizeRightPanel: (xDelta) ->
@rightPanelWidth -= xDelta
@rightPanelWidth = Math.min(@_rightPanelMax, Math.max(@_rightPanelMin, @rightPanelWidth))
@_refre... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | dfaae93f60beddbaf86333b38128f0e6853ed899 | 1,052 | https://github.com/cdglabs/apparatus/blob/dfaae93f60beddbaf86333b38128f0e6853ed899/src/Model/Layout.coffee | 1 | 21 |
cdglabs/apparatus:src/Model/Layout.coffee:1:completion | completion | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@_rightPanelMin = 100
@_rightPanelMax = 600
@fullScreen = false
resizeRightPanel: (xDelta) ->
@rightPanelWidth -= xDelta
@rightPanelWidth = Math.min(@_rightPanelMax, Math.max(@_rightPanelMin, @rightPanelWidth)) | @_refreshLayout()
toggleFullScreen: ->
@fullScreen = !@fullScreen
@_refreshLayout()
_refreshLayout: ->
# Changing the layout will deform the canvas
# This is a workaround by triggering "resize" event so that the Canvas will update itself
resize = new Event "resize"
window.dispatchEvent res... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | dfaae93f60beddbaf86333b38128f0e6853ed899 | 1,052 | https://github.com/cdglabs/apparatus/blob/dfaae93f60beddbaf86333b38128f0e6853ed899/src/Model/Layout.coffee | 1 | 21 |
cdglabs/apparatus:src/Model/Layout.coffee:1:raw_corpus | raw_corpus | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@_rightPanelMin = 100
@_rightPanelMax = 600
resizeRightPanel: (xDelta) ->
@rightPanelWidth -= xDelta
@rightPanelWidth = Math.min(@_rightPanelMax, Math.max(@_rightPanelMin, @rightPanelWidth))
@_refreshLayout()
_refreshLa... | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 197f7a87562a6de36185a768b3627749831d5c75 | 1,052 | https://github.com/cdglabs/apparatus/blob/197f7a87562a6de36185a768b3627749831d5c75/src/Model/Layout.coffee | 1 | 16 | ||
cdglabs/apparatus:src/Model/Layout.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@_rightPanelMin = 100
@_rightPanelMax = 600
resizeRightPanel: (xDelta) ->
@rightPanelWidth -= xDelta
@rightPanelWidth = Math.min(@_rightPanelMax, Math.max(@_rightPanelMi... | var Layout;
module.exports = Layout = class Layout {
constructor() {
this.rightPanelWidth = 400;
this._rightPanelMin = 100;
this._rightPanelMax = 600;
}
resizeRightPanel(xDelta) {
this.rightPanelWidth -= xDelta;
this.rightPanelWidth = Math.min(this._rightPanelMax, Math.max(this._rightPanelMi... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 197f7a87562a6de36185a768b3627749831d5c75 | 1,052 | https://github.com/cdglabs/apparatus/blob/197f7a87562a6de36185a768b3627749831d5c75/src/Model/Layout.coffee | 1 | 16 |
cdglabs/apparatus:src/Model/Layout.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Layout;
module.exports = Layout = class Layout {
constructor() {
this.rightPanelWidth = 400;
this._rightPanelMin = 100;
this._rightPanelMax = 600;
}
resizeRightPanel(xDelta) {
this.rightPanelWidth -= xDelta;
this.rightPanelWidth = Ma... | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@_rightPanelMin = 100
@_rightPanelMax = 600
resizeRightPanel: (xDelta) ->
@rightPanelWidth -= xDelta
@rightPanelWidth = Math.min(@_rightPanelMax, Math.max(@_rightPanelMin, @rightPanelWidth))
@_refreshLayout()
_refreshLa... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 197f7a87562a6de36185a768b3627749831d5c75 | 1,052 | https://github.com/cdglabs/apparatus/blob/197f7a87562a6de36185a768b3627749831d5c75/src/Model/Layout.coffee | 1 | 16 |
cdglabs/apparatus:src/Model/Layout.coffee:1:completion | completion | module.exports = class Layout
constructor: ->
@rightPanelWidth = 400
@_rightPanelMin = 100
@_rightPanelMax = 600
resizeRightPanel: (xDelta) ->
@rightPanelWidth -= xDelta | @rightPanelWidth = Math.min(@_rightPanelMax, Math.max(@_rightPanelMin, @rightPanelWidth))
@_refreshLayout()
_refreshLayout: ->
# Changing the layout will deform the canvas
# This is a workaround by triggering "resize" event so that the Canvas will update itself
resize = new Event "resize"
window.... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Model/Layout.coffee | MIT | 197f7a87562a6de36185a768b3627749831d5c75 | 1,052 | https://github.com/cdglabs/apparatus/blob/197f7a87562a6de36185a768b3627749831d5c75/src/Model/Layout.coffee | 1 | 16 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee:2:raw_corpus | raw_corpus | # Load Pre-Processor
preProcessor = _.jsEval options.preProcessor
if !_.isFunction(preProcessor) then preProcessor = null
# Load Post-Processor
postProcessor = _.jsEval options.postProcessor
if !_.isFunction(postProcess... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | 44 | 85 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Load Pre-Processor
preProcessor = _.jsEval options.preProcessor
if !_.isFunction(preProcessor) then preProcessor = null
# Load Post-Processor
postProcessor = _.jsEval options.postP... | // Load Pre-Processor
var postProcessor, preProcessor, startRunner;
preProcessor = _.jsEval(options.preProcessor);
if (!_.isFunction(preProcessor)) {
preProcessor = null;
}
// Load Post-Processor
postProcessor = _.jsEval(options.postProcessor);
if (!_.isFunction(postProcessor)) {
postProcessor = null;
}
startR... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | 44 | 85 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Load Pre-Processor
var postProcessor, preProcessor, startRunner;
preProcessor = _.jsEval(options.preProcessor);
if (!_.isFunction(preProcessor)) {
preProcessor = null;
}
// Load Post-Processor
postProcessor = _.jsEval(options.postProcessor);
if (!_.isFunct... | # Load Pre-Processor
preProcessor = _.jsEval options.preProcessor
if !_.isFunction(preProcessor) then preProcessor = null
# Load Post-Processor
postProcessor = _.jsEval options.postProcessor
if !_.isFunction(postProcess... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | 44 | 85 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee:2:completion | completion | # Load Pre-Processor
preProcessor = _.jsEval options.preProcessor
if !_.isFunction(preProcessor) then preProcessor = null
# Load Post-Processor
postProcessor = _.jsEval options.postProcessor
if !_.isFunction(postProcess... | # Optionally get Data Source-specific analytics details
if _.isFunction(analyticsDetails)
details = _.merge details, analyticsDetails(currentOptions)
analyticsService.recordDataSource currentOptions, success, (endTime - startTime),... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | 44 | 85 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee:3:raw_corpus | raw_corpus | console.log moment().format() + ' ' + dataSourceName + ' Data Source "' + currentOptions.name + '" Completed'
sendAnalytics true
# Save cache
cachedResult = result
# Process the result sets
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | 87 | 126 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee:3:completion | completion | console.log moment().format() + ' ' + dataSourceName + ' Data Source "' + currentOptions.name + '" Completed'
sendAnalytics true
# Save cache
cachedResult = result
# Process the result sets
... | cachedResult[resultSetName] = resultSet
if postProcessor?
postProcessedResult = postProcessor resultSet.data, resultSetName
# Post-Processor can either update the current dataset,
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | 87 | 126 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee:4:raw_corpus | raw_corpus | firstLoad = false
# Start and attach success/fail handlers
q = runner(currentOptions)
q.then runnerSuccess, runnerError
return q
return {
# Get the latest resultset for this Dat... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | 128 | 172 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee:4:completion | completion | firstLoad = false
# Start and attach success/fail handlers
q = runner(currentOptions)
q.then runnerSuccess, runnerError
return q
return {
# Get the latest resultset for this Dat... | # Notify each client that it is currently loading
_.each clients, (client) ->
if client.loadingCallback? && _.isFunction(client.loadingCallback)
client.loadingCallback()
return... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | 128 | 172 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee:5:raw_corpus | raw_corpus | # Check the cache for a previously-retrieved result
if cachedResult?
# Invoke callback with cached data
callback(
cachedResult[dataSourceDefinition.resultSet]?.data,
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | 174 | 199 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee:5:completion | completion | # Check the cache for a previously-retrieved result
if cachedResult?
# Invoke callback with cached data
callback(
cachedResult[dataSourceDefinition.resultSet]?.data,
... | startRunner()
# Schedule refresh if needed
if options.refresh?
$interval startRunner, options.refresh * 1000
# Else, the existing q will invoke all callbacks when it completes.
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.factory.coffee | 174 | 199 |
jianliaoim/talk-os:talk-web/client/updater/unread.coffee:1:raw_corpus | raw_corpus | # object with data from: http://talk.ci/doc/restful/state.html
exports.check = (store, checkData) ->
_teamId = checkData.get '_teamId'
# unreadData: {
# _targetId: unreadNum
# }
unreadData = checkData.get 'data'
if store.getIn ['notifications', _teamId]
newStore = store
.updateIn ['notificatio... | CoffeeScript | jianliaoim/talk-os | talk-web/client/updater/unread.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/unread.coffee | 1 | 26 | ||
jianliaoim/talk-os:talk-web/client/updater/unread.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# object with data from: http://talk.ci/doc/restful/state.html
exports.check = (store, checkData) ->
_teamId = checkData.get '_teamId'
# unreadData: {
# _targetId: unreadNum
# }
unreadData = checkData.get 'data'
if store.getIn ['notifications', _t... | // object with data from: http://talk.ci/doc/restful/state.html
exports.check = function(store, checkData) {
var _teamId, newStore, teamUnread, unreadData;
_teamId = checkData.get('_teamId');
// unreadData: {
// _targetId: unreadNum
// }
unreadData = checkData.get('data');
if (store.getIn(['notification... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/updater/unread.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/unread.coffee | 1 | 26 |
jianliaoim/talk-os:talk-web/client/updater/unread.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// object with data from: http://talk.ci/doc/restful/state.html
exports.check = function(store, checkData) {
var _teamId, newStore, teamUnread, unreadData;
_teamId = checkData.get('_teamId');
// unreadData: {
// _targetId: unreadNum
// }
unreadData = ... | # object with data from: http://talk.ci/doc/restful/state.html
exports.check = (store, checkData) ->
_teamId = checkData.get '_teamId'
# unreadData: {
# _targetId: unreadNum
# }
unreadData = checkData.get 'data'
if store.getIn ['notifications', _teamId]
newStore = store
.updateIn ['notificatio... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/updater/unread.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/unread.coffee | 1 | 26 |
jianliaoim/talk-os:talk-web/client/updater/unread.coffee:1:completion | completion | # object with data from: http://talk.ci/doc/restful/state.html
exports.check = (store, checkData) ->
_teamId = checkData.get '_teamId'
# unreadData: {
# _targetId: unreadNum
# }
unreadData = checkData.get 'data'
if store.getIn ['notifications', _teamId]
newStore = store
.updateIn ['notificatio... | unread = unreadData.get(n.get('_targetId'))
if unread?
n.set('unreadNum', unread)
else
n.set('unreadNum', 0)
teamUnread = newStore.getIn ['notifications', _teamId]
.map (n) -> if n.get('isMute') then 0 else n.get('unreadNum')
.reduce ((a, b) -> a + b), 0
... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/updater/unread.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/unread.coffee | 1 | 26 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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 ... | $scope.fields = {}
$scope.updateFocus = ->
$timeout ->
# Load cached username
if userService.cachedUsername?
$scope.fields.username = userService.cachedUsername
focusService.focus 'focusPassword', $scope
else
focusService.f... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:raw_corpus | raw_corpus | loginPromise = $http.post(targetUrl, {
username: $scope.fields.username,
password: $scope.fields.password
})
loginPromise.success (session) ->
$scope.fields.password = ''
deferred.resolve(session.key)
loginPromise.erro... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 47 | 84 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:completion | completion | loginPromise = $http.post(targetUrl, {
username: $scope.fields.username,
password: $scope.fields.password
})
loginPromise.success (session) ->
$scope.fields.password = ''
deferred.resolve(session.key)
loginPromise.erro... | return deferred.promise
$scope.push = ->
p = $scope.login()
p.then (sessionKey) ->
q = dashboardService.pushToService($scope.editor.dashboardWrapper, $scope.fields.pushLocation.serviceUrl, sessionKey)
q.then ->
analyticsService.recordEvent 'pushDashboard', ... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 47 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | df26fc48ea0296697e2755b7a1d9ce5cf50a4483 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | df26fc48ea0296697e2755b7a1d9ce5cf50a4483 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | df26fc48ea0296697e2755b7a1d9ce5cf50a4483 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.fields = {}
$scope.updateFocus = ->
$timeout ->
# Load cached username
if userService.cachedUsername?
$scope.fields.username = userService.cachedUsername
focusService.focus 'focusPassword', $scope
else
focusService.f... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | df26fc48ea0296697e2755b7a1d9ce5cf50a4483 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 6aa99e4a06fb9bdc26f6769552b5d898e5ee1831 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 6aa99e4a06fb9bdc26f6769552b5d898e5ee1831 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 6aa99e4a06fb9bdc26f6769552b5d898e5ee1831 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.fields = {}
$scope.updateFocus = ->
$timeout ->
# Load cached username
if userService.cachedUsername?
$scope.fields.username = userService.cachedUsername
focusService.focus 'focusPassword', $scope
else
focusService.f... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 6aa99e4a06fb9bdc26f6769552b5d898e5ee1831 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 45 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:raw_corpus | raw_corpus | loginPromise = $http.post(targetUrl, {
username: $scope.fields.username,
password: $scope.fields.password
})
loginPromise.success (session) ->
$scope.fields.password = ''
deferred.resolve(session.key)
loginPromise.erro... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 6aa99e4a06fb9bdc26f6769552b5d898e5ee1831 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 47 | 83 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:completion | completion | loginPromise = $http.post(targetUrl, {
username: $scope.fields.username,
password: $scope.fields.password
})
loginPromise.success (session) ->
$scope.fields.password = ''
deferred.resolve(session.key)
loginPromise.erro... | return deferred.promise
$scope.push = ->
p = $scope.login()
p.then (sessionKey) ->
q = dashboardService.pushToService($scope.editor.dashboardWrapper, $scope.fields.pushLocation.serviceUrl, sessionKey)
q.then ->
alertify.log("Pushed Dashboard to " + $scope.f... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 6aa99e4a06fb9bdc26f6769552b5d898e5ee1831 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 47 | 83 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.updateFocus = ->
$timeout ->
# Load cached username
if userService.cachedUsername?
$scope.fields.username = userService.cachedUsername
focusService.focus 'focusPassword', $scope
else
focusService.focus 'focusUsername', $s... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:raw_corpus | raw_corpus | loginPromise.error (error) ->
$scope.fields.password = ''
focusService.focus 'focusPassword', $scope
if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + erro... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 78 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
loginPromise.error (error) ->
$scope.fields.password = ''
focusService.focus 'focusPassword', $scope
if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
... | loginPromise.error(function(error) {
$scope.fields.password = '';
focusService.focus('focusPassword', $scope);
if (_.isObject(error)) {
alertify.error('Login Error: ' + error.name, 2500);
} else {
alertify.error('Login Error: ' + error.toString(), 2500);
}
return deferred.reject(error);
});
return ... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 78 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
loginPromise.error(function(error) {
$scope.fields.password = '';
focusService.focus('focusPassword', $scope);
if (_.isObject(error)) {
alertify.error('Login Error: ' + error.name, 2500);
} else {
alertify.error('Login Error: ' + error.toString(), 2... | loginPromise.error (error) ->
$scope.fields.password = ''
focusService.focus 'focusPassword', $scope
if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + erro... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 78 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:completion | completion | loginPromise.error (error) ->
$scope.fields.password = ''
focusService.focus 'focusPassword', $scope
if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + erro... | p = $scope.login()
p.then (sessionKey) ->
q = dashboardService.pushToService($scope.editor.dashboardWrapper, $scope.fields.pushLocation.serviceUrl, sessionKey)
q.then ->
alertify.log("Pushed Dashboard to " + $scope.fields.pushLocation.name, 2500)
$uibMod... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 78 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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 ... | # Load cached username
if userService.cachedUsername?
$scope.fields.username = userService.cachedUsername
$scope.focusPassword = true
else
$scope.focusUsername = true
# Login to the remote server if required.
$scope.login = ->
deferred = $q.defer()
if !$scope.fi... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:raw_corpus | raw_corpus | if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + error.toString(), 2500)
deferred.reject(error)
return deferred.promise
$scope.push = ->
p = $scope.login()
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 74 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + error.toString(), 2500)
deferred.reject(error)
return deferred.promise
... | if (_.isObject(error)) {
alertify.error('Login Error: ' + error.name, 2500);
} else {
alertify.error('Login Error: ' + error.toString(), 2500);
}
deferred.reject(error);
return deferred.promise;
$scope.push = function() {
var p;
p = $scope.login();
return p.then(function(sessionKey) {
var q;
q = da... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 74 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
if (_.isObject(error)) {
alertify.error('Login Error: ' + error.name, 2500);
} else {
alertify.error('Login Error: ' + error.toString(), 2500);
}
deferred.reject(error);
return deferred.promise;
$scope.push = function() {
var p;
p = $scope.login();
ret... | if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + error.toString(), 2500)
deferred.reject(error)
return deferred.promise
$scope.push = ->
p = $scope.login()
... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 74 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:completion | completion | if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + error.toString(), 2500)
deferred.reject(error)
return deferred.promise
$scope.push = ->
p = $scope.login() | p.then (sessionKey) ->
q = dashboardService.pushToService($scope.editor.dashboardWrapper, $scope.fields.pushLocation.serviceUrl, sessionKey)
q.then ->
alertify.log("Pushed Dashboard to " + $scope.fields.pushLocation.name, 2500)
$uibModalInstance.close()
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 74 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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.pushDashboard.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.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 ... | # Load cached username
if userService.cachedUsername?
$scope.fields.username = userService.cachedUsername
$scope.focusPassword = true
else
$scope.focusUsername = true
# Login to the remote server if required.
$scope.login = ->
deferred = $q.defer()
if !$scope.fi... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:raw_corpus | raw_corpus | if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + error.toString(), 2500)
deferred.reject(error)
return deferred.promise
$scope.push = ->
p = $scope.login()
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 74 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + error.toString(), 2500)
deferred.reject(error)
return deferred.promise
... | if (_.isObject(error)) {
alertify.error('Login Error: ' + error.name, 2500);
} else {
alertify.error('Login Error: ' + error.toString(), 2500);
}
deferred.reject(error);
return deferred.promise;
$scope.push = function() {
var p;
p = $scope.login();
return p.then(function(sessionKey) {
var q;
q = da... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 74 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
if (_.isObject(error)) {
alertify.error('Login Error: ' + error.name, 2500);
} else {
alertify.error('Login Error: ' + error.toString(), 2500);
}
deferred.reject(error);
return deferred.promise;
$scope.push = function() {
var p;
p = $scope.login();
ret... | if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + error.toString(), 2500)
deferred.reject(error)
return deferred.promise
$scope.push = ->
p = $scope.login()
... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 74 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee:2:completion | completion | if _.isObject(error)
alertify.error('Login Error: ' + error.name, 2500)
else
alertify.error('Login Error: ' + error.toString(), 2500)
deferred.reject(error)
return deferred.promise
$scope.push = ->
p = $scope.login() | p.then (sessionKey) ->
q = dashboardService.pushToService($scope.editor.dashboardWrapper, $scope.fields.pushLocation.serviceUrl, sessionKey)
q.then ->
alertify.log("Pushed Dashboard to " + $scope.fields.pushLocation.name, 2500)
$modalInstance.close()
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.pushDashboard.coffee | 51 | 74 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:1:raw_corpus | raw_corpus | {getVimState, dispatch, TextData, getView, withMockPlatform} = require './spec-helper'
settings = require '../lib/settings'
describe "mini DSL used in vim-mode-plus's spec", ->
[set, ensure, editor, editorElement, vimState] = []
beforeEach ->
getVimState (state, vim) ->
vimState = state
{editor, e... | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | 8d6f93ae3e3c43c205d6b51aeee911525a7ded78 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/spec-helper-spec.coffee | 1 | 40 | ||
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:1:completion | completion | {getVimState, dispatch, TextData, getView, withMockPlatform} = require './spec-helper'
settings = require '../lib/settings'
describe "mini DSL used in vim-mode-plus's spec", ->
[set, ensure, editor, editorElement, vimState] = []
beforeEach ->
getVimState (state, vim) ->
vimState = state
{editor, e... | ensure "~", text: "Abc", cursor: [0, 1]
describe "new 'textC' spec options with explanatory ensure", ->
describe "| represent cursor", ->
beforeEach ->
set textC: "|abc"
ensure null, text: "abc", cursor: [0, 0] # explanatory purpose
it "toggle and move right", ->
ensure "~", ... | CoffeeScript | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | 8d6f93ae3e3c43c205d6b51aeee911525a7ded78 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/spec-helper-spec.coffee | 1 | 40 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:2:raw_corpus | raw_corpus | describe "| and ! is exchangable", ->
it "both are OK", ->
set textC: "|abc"
ensure "~", textC: "A!bc"
set textC: "a!bc"
ensure "~", textC: "aB!c"
describe "multi-low, multi-cursor case", ->
describe "without ! cursor", ->
it "last | become last cursor", ->
se... | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | 8d6f93ae3e3c43c205d6b51aeee911525a7ded78 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/spec-helper-spec.coffee | 42 | 82 | ||
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:2:completion | completion | describe "| and ! is exchangable", ->
it "both are OK", ->
set textC: "|abc"
ensure "~", textC: "A!bc"
set textC: "a!bc"
ensure "~", textC: "aB!c"
describe "multi-low, multi-cursor case", ->
describe "without ! cursor", ->
it "last | become last cursor", ->
se... | describe "with ! cursor", ->
it "! become last cursor", ->
set textC: "|012|345|678"
ensure null, textC: "|012|345|678"
ensure null, cursor: [[0, 0], [0, 3], [0, 6]]
expect(editor.getLastCursor().getBufferPosition()).toEqual([0, 6])
set textC: "!012|345|678"
ensure... | CoffeeScript | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | 8d6f93ae3e3c43c205d6b51aeee911525a7ded78 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/spec-helper-spec.coffee | 42 | 82 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:3:raw_corpus | raw_corpus | describe "without ! cursor", ->
beforeEach ->
set
textC: """
|ab|cde|fg
hi|jklmn
opqrstu\n
"""
ensure null,
text: """
abcdefg
hijklmn
opqrstu\n
"""
cursor: [[0, 0], [0, 2], [0, 5], [1, 2]... | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | 8d6f93ae3e3c43c205d6b51aeee911525a7ded78 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/spec-helper-spec.coffee | 84 | 115 | ||
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "without ! cursor", ->
beforeEach ->
set
textC: """
|ab|cde|fg
hi|jklmn
opqrstu\n
"""
ensure null,
text: """
abcdefg
hijklmn
opqrstu\n
... | describe("without ! cursor", function() {
beforeEach(function() {
set({
textC: `|ab|cde|fg
hi|jklmn
opqrstu\n`
});
return ensure(null, {
text: `abcdefg
hijklmn
opqrstu\n`,
cursor: [[0, 0], [0, 2], [0, 5], [1, 2]]
});
});
return it("toggle and move right", function() {
ensure(... | CoffeeScript | JavaScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | 8d6f93ae3e3c43c205d6b51aeee911525a7ded78 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/spec-helper-spec.coffee | 84 | 115 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("without ! cursor", function() {
beforeEach(function() {
set({
textC: `|ab|cde|fg
hi|jklmn
opqrstu\n`
});
return ensure(null, {
text: `abcdefg
hijklmn
opqrstu\n`,
cursor: [[0, 0], [0, 2], [0, 5], [1, 2]]
});
});
retu... | describe "without ! cursor", ->
beforeEach ->
set
textC: """
|ab|cde|fg
hi|jklmn
opqrstu\n
"""
ensure null,
text: """
abcdefg
hijklmn
opqrstu\n
"""
cursor: [[0, 0], [0, 2], [0, 5], [1, 2]... | JavaScript | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | 8d6f93ae3e3c43c205d6b51aeee911525a7ded78 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/spec-helper-spec.coffee | 84 | 115 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:3:completion | completion | describe "without ! cursor", ->
beforeEach ->
set
textC: """
|ab|cde|fg
hi|jklmn
opqrstu\n
"""
ensure null,
text: """
abcdefg
hijklmn
opqrstu\n
"""
cursor: [[0, 0], [0, 2], [0, 5], [1, 2]... | it "toggle and move right", ->
ensure '~',
textC: """
A|bC|deF|g
hiJ|klmn
opqrstu\n
"""
ensure null,
text: """
AbCdeFg
hiJklmn
opqrstu\n
"""
cursor: [[0, 1], [0, 3], [0, 6], [1, 3]] | CoffeeScript | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | 8d6f93ae3e3c43c205d6b51aeee911525a7ded78 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/spec-helper-spec.coffee | 84 | 115 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:1:raw_corpus | raw_corpus | {getVimState, dispatch, TextData, getView, withMockPlatform} = require './spec-helper'
settings = require '../lib/settings'
describe "mini DSL used in vim-mode-plus's spec", ->
[set, ensure, editor, editorElement, vimState] = []
beforeEach ->
getVimState (state, vim) ->
vimState = state
{editor, e... | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | d882126ee4254bf564eb37b9f3a7cdd322482439 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/d882126ee4254bf564eb37b9f3a7cdd322482439/spec/spec-helper-spec.coffee | 1 | 40 | ||
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:1:completion | completion | {getVimState, dispatch, TextData, getView, withMockPlatform} = require './spec-helper'
settings = require '../lib/settings'
describe "mini DSL used in vim-mode-plus's spec", ->
[set, ensure, editor, editorElement, vimState] = []
beforeEach ->
getVimState (state, vim) ->
vimState = state
{editor, e... | ensure "~", text: "Abc", cursor: [0, 1]
describe "new 'textC' spec options with explanatory ensure", ->
describe "| represent cursor", ->
beforeEach ->
set textC: "|abc"
ensure text: "abc", cursor: [0, 0] # explanatory purpose
it "toggle and move right", ->
ensure "~", textC:... | CoffeeScript | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | d882126ee4254bf564eb37b9f3a7cdd322482439 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/d882126ee4254bf564eb37b9f3a7cdd322482439/spec/spec-helper-spec.coffee | 1 | 40 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:2:raw_corpus | raw_corpus | describe "| and ! is exchangable", ->
it "both are OK", ->
set textC: "|abc"
ensure "~", textC: "A!bc"
set textC: "a!bc"
ensure "~", textC: "aB!c"
describe "multi-low, multi-cursor case", ->
describe "without ! cursor", ->
it "last | become last cursor", ->
se... | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | d882126ee4254bf564eb37b9f3a7cdd322482439 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/d882126ee4254bf564eb37b9f3a7cdd322482439/spec/spec-helper-spec.coffee | 42 | 82 | ||
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:2:completion | completion | describe "| and ! is exchangable", ->
it "both are OK", ->
set textC: "|abc"
ensure "~", textC: "A!bc"
set textC: "a!bc"
ensure "~", textC: "aB!c"
describe "multi-low, multi-cursor case", ->
describe "without ! cursor", ->
it "last | become last cursor", ->
se... | describe "with ! cursor", ->
it "! become last cursor", ->
set textC: "|012|345|678"
ensure textC: "|012|345|678"
ensure cursor: [[0, 0], [0, 3], [0, 6]]
expect(editor.getLastCursor().getBufferPosition()).toEqual([0, 6])
set textC: "!012|345|678"
ensure textC: "!01... | CoffeeScript | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | d882126ee4254bf564eb37b9f3a7cdd322482439 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/d882126ee4254bf564eb37b9f3a7cdd322482439/spec/spec-helper-spec.coffee | 42 | 82 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:3:raw_corpus | raw_corpus | describe "without ! cursor", ->
beforeEach ->
set
textC: """
|ab|cde|fg
hi|jklmn
opqrstu\n
"""
ensure
text: """
abcdefg
hijklmn
opqrstu\n
"""
cursor: [[0, 0], [0, 2], [0, 5], [1, 2]]
... | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | d882126ee4254bf564eb37b9f3a7cdd322482439 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/d882126ee4254bf564eb37b9f3a7cdd322482439/spec/spec-helper-spec.coffee | 84 | 115 | ||
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "without ! cursor", ->
beforeEach ->
set
textC: """
|ab|cde|fg
hi|jklmn
opqrstu\n
"""
ensure
text: """
abcdefg
hijklmn
opqrstu\n
""... | describe("without ! cursor", function() {
beforeEach(function() {
set({
textC: `|ab|cde|fg
hi|jklmn
opqrstu\n`
});
return ensure({
text: `abcdefg
hijklmn
opqrstu\n`,
cursor: [[0, 0], [0, 2], [0, 5], [1, 2]]
});
});
return it("toggle and move right", function() {
ensure('~', {... | CoffeeScript | JavaScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | d882126ee4254bf564eb37b9f3a7cdd322482439 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/d882126ee4254bf564eb37b9f3a7cdd322482439/spec/spec-helper-spec.coffee | 84 | 115 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe("without ! cursor", function() {
beforeEach(function() {
set({
textC: `|ab|cde|fg
hi|jklmn
opqrstu\n`
});
return ensure({
text: `abcdefg
hijklmn
opqrstu\n`,
cursor: [[0, 0], [0, 2], [0, 5], [1, 2]]
});
});
return it(... | describe "without ! cursor", ->
beforeEach ->
set
textC: """
|ab|cde|fg
hi|jklmn
opqrstu\n
"""
ensure
text: """
abcdefg
hijklmn
opqrstu\n
"""
cursor: [[0, 0], [0, 2], [0, 5], [1, 2]]
... | JavaScript | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | d882126ee4254bf564eb37b9f3a7cdd322482439 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/d882126ee4254bf564eb37b9f3a7cdd322482439/spec/spec-helper-spec.coffee | 84 | 115 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:3:completion | completion | describe "without ! cursor", ->
beforeEach ->
set
textC: """
|ab|cde|fg
hi|jklmn
opqrstu\n
"""
ensure
text: """
abcdefg
hijklmn
opqrstu\n
"""
cursor: [[0, 0], [0, 2], [0, 5], [1, 2]] | it "toggle and move right", ->
ensure '~',
textC: """
A|bC|deF|g
hiJ|klmn
opqrstu\n
"""
ensure
text: """
AbCdeFg
hiJklmn
opqrstu\n
"""
cursor: [[0, 1], [0, 3], [0, 6], [1, 3]] | CoffeeScript | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | d882126ee4254bf564eb37b9f3a7cdd322482439 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/d882126ee4254bf564eb37b9f3a7cdd322482439/spec/spec-helper-spec.coffee | 84 | 115 |
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:1:raw_corpus | raw_corpus | {getVimState, dispatch, TextData, getView, withMockPlatform} = require './spec-helper'
settings = require '../lib/settings'
describe "mini DSL used in vim-mode-plus's spec", ->
[set, ensure, keystroke, editor, editorElement, vimState] = []
beforeEach ->
getVimState (state, vim) ->
vimState = state
... | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | 3d91feba5c1d9da1ea68dab348522ad539db69a7 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/3d91feba5c1d9da1ea68dab348522ad539db69a7/spec/spec-helper-spec.coffee | 1 | 40 | ||
t9md/atom-vim-mode-plus:spec/spec-helper-spec.coffee:1:completion | completion | {getVimState, dispatch, TextData, getView, withMockPlatform} = require './spec-helper'
settings = require '../lib/settings'
describe "mini DSL used in vim-mode-plus's spec", ->
[set, ensure, keystroke, editor, editorElement, vimState] = []
beforeEach ->
getVimState (state, vim) ->
vimState = state
... | ensure "~", text: "Abc", cursor: [0, 1]
describe "new 'textC' spec options with explanatory ensure", ->
describe "| represent cursor", ->
beforeEach ->
set textC: "|abc"
ensure text: "abc", cursor: [0, 0] # explanatory purpose
it "toggle and move right", ->
ensure "~", textC:... | CoffeeScript | CoffeeScript | t9md/atom-vim-mode-plus | spec/spec-helper-spec.coffee | MIT | 3d91feba5c1d9da1ea68dab348522ad539db69a7 | 1,389 | https://github.com/t9md/atom-vim-mode-plus/blob/3d91feba5c1d9da1ea68dab348522ad539db69a7/spec/spec-helper-spec.coffee | 1 | 40 |
jianliaoim/talk-os:talk-account/client/updater/route.coffee:1:raw_corpus | raw_corpus | Immutable = require 'immutable'
exports.signin = (store) ->
store.set 'router', Immutable.fromJS
name: 'signin'
data: {}
query: {}
exports.signup = (store) ->
store.set 'router', Immutable.fromJS
name: 'signup'
data: {}
query: {}
exports.forgotPassword = (store) ->
store.set 'router', I... | CoffeeScript | jianliaoim/talk-os | talk-account/client/updater/route.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/updater/route.coffee | 1 | 40 | ||
jianliaoim/talk-os:talk-account/client/updater/route.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Immutable = require 'immutable'
exports.signin = (store) ->
store.set 'router', Immutable.fromJS
name: 'signin'
data: {}
query: {}
exports.signup = (store) ->
store.set 'router', Immutable.fromJS
name: 'signup'
data: {}
query: {}
ex... | var Immutable;
Immutable = require('immutable');
exports.signin = function(store) {
return store.set('router', Immutable.fromJS({
name: 'signin',
data: {},
query: {}
}));
};
exports.signup = function(store) {
return store.set('router', Immutable.fromJS({
name: 'signup',
data: {},
query:... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-account/client/updater/route.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/updater/route.coffee | 1 | 40 |
jianliaoim/talk-os:talk-account/client/updater/route.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Immutable;
Immutable = require('immutable');
exports.signin = function(store) {
return store.set('router', Immutable.fromJS({
name: 'signin',
data: {},
query: {}
}));
};
exports.signup = function(store) {
return store.set('router', Immutabl... | Immutable = require 'immutable'
exports.signin = (store) ->
store.set 'router', Immutable.fromJS
name: 'signin'
data: {}
query: {}
exports.signup = (store) ->
store.set 'router', Immutable.fromJS
name: 'signup'
data: {}
query: {}
exports.forgotPassword = (store) ->
store.set 'router', I... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-account/client/updater/route.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/updater/route.coffee | 1 | 40 |
jianliaoim/talk-os:talk-account/client/updater/route.coffee:1:completion | completion | Immutable = require 'immutable'
exports.signin = (store) ->
store.set 'router', Immutable.fromJS
name: 'signin'
data: {}
query: {}
exports.signup = (store) ->
store.set 'router', Immutable.fromJS
name: 'signup'
data: {}
query: {}
exports.forgotPassword = (store) ->
store.set 'router', I... | exports.emailSent = (store) ->
store.set 'router', Immutable.fromJS
name: 'email-sent'
data: {}
query: {}
exports.succeedResetting = (store) ->
store.set 'router', Immutable.fromJS
name: 'succeed-resetting'
data: {}
query: {}
exports.succeedBinding = (store) ->
store.set 'router', Immuta... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-account/client/updater/route.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/updater/route.coffee | 1 | 40 |
Pagedraw/pagedraw:e2e-tests/debug-compiled.coffee:1:raw_corpus | raw_corpus | require('../coffeescript-register-web')
fs = require 'fs'
_l = require 'lodash'
path = require 'path'
{writeFiles, setupReactEnv, compileProjectForInstanceBlock} = require('./create-react-env.coffee')
{Doc} = require('../src/doc')
{InstanceBlock} = require('../src/blocks/instance-block')
## Running this is gonna s... | CoffeeScript | Pagedraw/pagedraw | e2e-tests/debug-compiled.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/debug-compiled.coffee | 1 | 26 | ||
Pagedraw/pagedraw:e2e-tests/debug-compiled.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
require('../coffeescript-register-web')
fs = require 'fs'
_l = require 'lodash'
path = require 'path'
{writeFiles, setupReactEnv, compileProjectForInstanceBlock} = require('./create-react-env.coffee')
{Doc} = require('../src/doc')
{InstanceBlock} = require('.... | var Doc, InstanceBlock, _l, base_dir, compileProjectForInstanceBlock, doc, docjson, files, fs, instanceBlock, instanceUniqueKey, path, setupReactEnv, writeFiles;
require('../coffeescript-register-web');
fs = require('fs');
_l = require('lodash');
path = require('path');
({writeFiles, setupReactEnv, compileProjectF... | CoffeeScript | JavaScript | Pagedraw/pagedraw | e2e-tests/debug-compiled.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/debug-compiled.coffee | 1 | 26 |
Pagedraw/pagedraw:e2e-tests/debug-compiled.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Doc, InstanceBlock, _l, base_dir, compileProjectForInstanceBlock, doc, docjson, files, fs, instanceBlock, instanceUniqueKey, path, setupReactEnv, writeFiles;
require('../coffeescript-register-web');
fs = require('fs');
_l = require('lodash');
path = require... | require('../coffeescript-register-web')
fs = require 'fs'
_l = require 'lodash'
path = require 'path'
{writeFiles, setupReactEnv, compileProjectForInstanceBlock} = require('./create-react-env.coffee')
{Doc} = require('../src/doc')
{InstanceBlock} = require('../src/blocks/instance-block')
## Running this is gonna s... | JavaScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/debug-compiled.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/debug-compiled.coffee | 1 | 26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.