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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:2:completion | completion | $scope.widgetContext.dataSourceError = false
$scope.widgetContext.dataSourceErrorMessage = null
data = eventData.data[dsDefinition.resultSet].data
data = $scope.filterAndSortWidgetData(data)
# Check for no data
if data?
# (Re)compile variabl... | if _.isEmpty $scope.valueDescription
$scope.valueDescription = 'value'
$scope.valueFormat = _.jsExec $scope.widget.valueFormat
if _.isEmpty $scope.valueFormat
$scope.valueFormat = '0,0.[0]'
$scope.colorDescription = _.jsExec $scop... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 41 | 79 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:3:raw_corpus | raw_corpus | $scope.widgetContext.loading = false
# Data Source error
$scope.$on 'dataSource:' + dsDefinition.name + ':error', (event, data) ->
$scope.widgetContext.dataSourceError = true
$scope.widgetContext.dataSourceErrorMessage = data.error
$scope.widgetContext.nodata = null
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 81 | 95 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:3:completion | completion | $scope.widgetContext.loading = false
# Data Source error
$scope.$on 'dataSource:' + dsDefinition.name + ':error', (event, data) ->
$scope.widgetContext.dataSourceError = true
$scope.widgetContext.dataSourceErrorMessage = data.error
$scope.widgetContext.nodata = null | $scope.widgetContext.loading = false
# Data Source loading
$scope.$on 'dataSource:' + dsDefinition.name + ':loading', ->
$scope.widgetContext.loading = true
# Initialize the Data Source
$scope.dataSource.init dsDefinition | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 81 | 95 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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/widgets/treemap/treemapWidget.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 39 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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/widgets/treemap/treemapWidget.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 39 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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/widgets/treemap/treemapWidget.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 39 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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 'TreemapWidget', ($scope, dashboardService, dataService) ->
$scope.legendHeight = $scope.widget.legendHeight || 30
$scope.reload = ->
$scope.dataSource.execute(true)
# Load Data Source
dsDefinition = dashboardService.getDataSource $scope.dashboard, $scope.widget
$s... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 39 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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/widgets/treemap/treemapWidget.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 43 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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/widgets/treemap/treemapWidget.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 43 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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/widgets/treemap/treemapWidget.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 43 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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.loading = false
$scope.dataSourceError = false
$scope.dataSourceErrorMessage = null
$scope.legendHeight = $scope.widget.legendHeight || 30
$scope.reload = ->
$scope.dataSource.execute(true)
# Load Data Source
dsDefinition = dashboardService.getDataSource $scope.dashboard, $scop... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 43 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:2:raw_corpus | raw_corpus | $scope.dataSourceError = false
$scope.dataSourceErrorMessage = null
data = eventData.data[dsDefinition.resultSet].data
# Filter the data if the widget has "filters"
if $scope.widget.filters?
data = dataService.filter(data, $scope.widget.filters)
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 45 | 83 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:2:completion | completion | $scope.dataSourceError = false
$scope.dataSourceErrorMessage = null
data = eventData.data[dsDefinition.resultSet].data
# Filter the data if the widget has "filters"
if $scope.widget.filters?
data = dataService.filter(data, $scope.widget.filters)
... | # (Re)compile variables
$scope.labelProperty = _.jsExec $scope.widget.labelProperty
if _.isEmpty $scope.labelProperty
$scope.labelProperty = 'name'
$scope.valueProperty = _.jsExec $scope.widget.valueProperty
if _.isEmpty $scope.valuePr... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 45 | 83 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:3:raw_corpus | raw_corpus | $scope.colorProperty = _.jsExec $scope.widget.colorProperty
$scope.colorStops = _.compile $scope.widget.colorStops
$scope.showLegend = _.jsExec $scope.widget.showLegend
$scope.colorFormat = _.jsExec $scope.widget.colorFormat
if _.isEmpty $scope.colorForma... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 85 | 109 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:3:completion | completion | $scope.colorProperty = _.jsExec $scope.widget.colorProperty
$scope.colorStops = _.compile $scope.widget.colorStops
$scope.showLegend = _.jsExec $scope.widget.showLegend
$scope.colorFormat = _.jsExec $scope.widget.colorFormat
if _.isEmpty $scope.colorForma... | # Data Source error
$scope.$on 'dataSource:' + dsDefinition.name + ':error', (event, data) ->
$scope.dataSourceError = true
$scope.dataSourceErrorMessage = data.error
$scope.nodata = null
$scope.loading = false
# Data Source loading
$scope.$on 'da... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 85 | 109 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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/widgets/treemap/treemapWidget.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 40 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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/widgets/treemap/treemapWidget.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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/widgets/treemap/treemapWidget.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.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.loading = false
$scope.dataSourceError = false
$scope.dataSourceErrorMessage = null
$scope.legendHeight = $scope.widget.legendHeight || 30
$scope.widgetTitle = -> _.jsExec($scope.widget.title)
$scope.reload = ->
$scope.dataSource.execute(true)
# Load Data Source
dsDefiniti... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:2:raw_corpus | raw_corpus | # Data Source (re)loaded
$scope.$on 'dataSource:' + dsDefinition.name + ':data', (event, eventData) ->
return unless eventData.version > $scope.dataVersion
$scope.dataVersion = eventData.version
$scope.dataSourceError = false
$scope.dataSourceErrorMessage = null
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 42 | 81 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Data Source (re)loaded
$scope.$on 'dataSource:' + dsDefinition.name + ':data', (event, eventData) ->
return unless eventData.version > $scope.dataVersion
$scope.dataVersion = eventData.version
$scope.dataSourceError ... | // Data Source (re)loaded
$scope.$on('dataSource:' + dsDefinition.name + ':data', function(event, eventData) {
var data;
if (!(eventData.version > $scope.dataVersion)) {
return;
}
$scope.dataVersion = eventData.version;
$scope.dataSourceError = false;
$scope.dataSourceErrorMessage = null;
data = event... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 42 | 81 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Data Source (re)loaded
$scope.$on('dataSource:' + dsDefinition.name + ':data', function(event, eventData) {
var data;
if (!(eventData.version > $scope.dataVersion)) {
return;
}
$scope.dataVersion = eventData.version;
$scope.dataSourceError = false;... | # Data Source (re)loaded
$scope.$on 'dataSource:' + dsDefinition.name + ':data', (event, eventData) ->
return unless eventData.version > $scope.dataVersion
$scope.dataVersion = eventData.version
$scope.dataSourceError = false
$scope.dataSourceErrorMessage = null
... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 42 | 81 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:2:completion | completion | # Data Source (re)loaded
$scope.$on 'dataSource:' + dsDefinition.name + ':data', (event, eventData) ->
return unless eventData.version > $scope.dataVersion
$scope.dataVersion = eventData.version
$scope.dataSourceError = false
$scope.dataSourceErrorMessage = null
... | $scope.nodata = _.jsExec $scope.widget.noData
else
$scope.nodata = null
# (Re)compile variables
$scope.labelProperty = _.jsExec $scope.widget.labelProperty
if _.isEmpty $scope.labelProperty
$scope.labelProperty = 'name'
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 42 | 81 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:3:raw_corpus | raw_corpus | $scope.colorDescription = _.jsExec $scope.widget.colorDescription
if _.isEmpty $scope.colorDescription
$scope.colorDescription = 'color value'
$scope.colorProperty = _.jsExec $scope.widget.colorProperty
$scope.colorStops = _.compile $scope.widget.colo... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 83 | 111 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/treemap/treemapWidget.coffee:3:completion | completion | $scope.colorDescription = _.jsExec $scope.widget.colorDescription
if _.isEmpty $scope.colorDescription
$scope.colorDescription = 'color value'
$scope.colorProperty = _.jsExec $scope.widget.colorProperty
$scope.colorStops = _.compile $scope.widget.colo... | $scope.loading = false
# Data Source error
$scope.$on 'dataSource:' + dsDefinition.name + ':error', (event, data) ->
$scope.dataSourceError = true
$scope.dataSourceErrorMessage = data.error
$scope.nodata = null
$scope.loading = false
# Data Sourc... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/treemap/treemapWidget.coffee | MIT | 425ed381cbae1e6fb7fd34c1d1427426d69292df | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/425ed381cbae1e6fb7fd34c1d1427426d69292df/cyclotron-site/app/widgets/treemap/treemapWidget.coffee | 83 | 111 |
jianliaoim/talk-os:talk-web/client/app/forward-menu.coffee:1:raw_corpus | raw_corpus | module.exports = React.createClass
displayName: 'forward-menu'
mixins: [ mixinQuery, mixinSubscribe, PureRenderMixin]
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
onClose: T.func.isRequired
onTeamSwitchClick: T.func.isRequired
message: T.instanceOf(Immutable.Map)
ge... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/forward-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/forward-menu.coffee | 25 | 74 | ||
jianliaoim/talk-os:talk-web/client/app/forward-menu.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = React.createClass
displayName: 'forward-menu'
mixins: [ mixinQuery, mixinSubscribe, PureRenderMixin]
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
onClose: T.func.isRequired
onTeamSwitchClick: T.func.... | module.exports = React.createClass({
displayName: 'forward-menu',
mixins: [mixinQuery, mixinSubscribe, PureRenderMixin],
propTypes: {
_teamId: T.string.isRequired,
_userId: T.string.isRequired,
onClose: T.func.isRequired,
onTeamSwitchClick: T.func.isRequired,
message: T.instanceOf(Immutable.Ma... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/forward-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/forward-menu.coffee | 25 | 74 |
jianliaoim/talk-os:talk-web/client/app/forward-menu.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = React.createClass({
displayName: 'forward-menu',
mixins: [mixinQuery, mixinSubscribe, PureRenderMixin],
propTypes: {
_teamId: T.string.isRequired,
_userId: T.string.isRequired,
onClose: T.func.isRequired,
onTeamSwitchClick: T.... | module.exports = React.createClass
displayName: 'forward-menu'
mixins: [ mixinQuery, mixinSubscribe, PureRenderMixin]
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
onClose: T.func.isRequired
onTeamSwitchClick: T.func.isRequired
message: T.instanceOf(Immutable.Map)
ge... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/forward-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/forward-menu.coffee | 25 | 74 |
jianliaoim/talk-os:talk-web/client/app/forward-menu.coffee:1:completion | completion | module.exports = React.createClass
displayName: 'forward-menu'
mixins: [ mixinQuery, mixinSubscribe, PureRenderMixin]
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
onClose: T.func.isRequired
onTeamSwitchClick: T.func.isRequired
message: T.instanceOf(Immutable.Map)
ge... | getInitialTopics: ->
@getRooms().filter (topic) ->
detect.inChannel(topic) and not topic.get('isArchived')
getInitialContacts: ->
@getContacts().filter (contact) =>
contact.get('_id') isnt @props._userId
onSubmit: ->
_messageId = @props.message.get('_id')
_teamId = @props._teamId
@... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/forward-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/forward-menu.coffee | 25 | 74 |
jianliaoim/talk-os:talk-web/client/app/forward-menu.coffee:2:raw_corpus | raw_corpus | onContactClick: (contact) ->
_contactIds = @state._contactIds
_thisId = contact.get '_id'
if _contactIds.includes _thisId
_contactIds = _contactIds.filter (_contactId) -> _contactId isnt _thisId
else
_contactIds = _contactIds.push _thisId
@setState { _contactIds }
renderFooter: ->
... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/forward-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/forward-menu.coffee | 75 | 115 | ||
jianliaoim/talk-os:talk-web/client/app/forward-menu.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
onContactClick: (contact) ->
_contactIds = @state._contactIds
_thisId = contact.get '_id'
if _contactIds.includes _thisId
_contactIds = _contactIds.filter (_contactId) -> _contactId isnt _thisId
else
_contactIds = _contactIds.push _thi... | ({
onContactClick: function(contact) {
var _contactIds, _thisId;
_contactIds = this.state._contactIds;
_thisId = contact.get('_id');
if (_contactIds.includes(_thisId)) {
_contactIds = _contactIds.filter(function(_contactId) {
return _contactId !== _thisId;
});
} else {
_c... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/forward-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/forward-menu.coffee | 75 | 115 |
jianliaoim/talk-os:talk-web/client/app/forward-menu.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
onContactClick: function(contact) {
var _contactIds, _thisId;
_contactIds = this.state._contactIds;
_thisId = contact.get('_id');
if (_contactIds.includes(_thisId)) {
_contactIds = _contactIds.filter(function(_contactId) {
return ... | onContactClick: (contact) ->
_contactIds = @state._contactIds
_thisId = contact.get '_id'
if _contactIds.includes _thisId
_contactIds = _contactIds.filter (_contactId) -> _contactId isnt _thisId
else
_contactIds = _contactIds.push _thisId
@setState { _contactIds }
renderFooter: ->
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/forward-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/forward-menu.coffee | 75 | 115 |
jianliaoim/talk-os:talk-web/client/app/forward-menu.coffee:2:completion | completion | onContactClick: (contact) ->
_contactIds = @state._contactIds
_thisId = contact.get '_id'
if _contactIds.includes _thisId
_contactIds = _contactIds.filter (_contactId) -> _contactId isnt _thisId
else
_contactIds = _contactIds.push _thisId
@setState { _contactIds }
renderFooter: ->
... | span className: 'muted', "#{l('forward-menu-team')}#{l('colon')}#{@state.team.get('name')}"
span className: 'button is-link', onClick: @props.onTeamSwitchClick, l('forward-menu-team-switch')
renderSearchList: ->
SearchList
_teamId: @props._teamId
contacts: @state.contacts
rooms: @state.ro... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/forward-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/forward-menu.coffee | 75 | 115 |
oozcitak/xmlbuilder-js:test/issues/159.coffee:1:raw_corpus | raw_corpus | suite 'Tests specific to issues:', ->
test 'multiple elements with different values. Issue 159', ->
obj = {
'mdui:UIInfo': {
"mdui:DisplayName": [
{ "@xml:lang": "de", "#text": "AAA" }
{ "@xml:lang": "en", "#text": "BBB" }
]
}
}
eq(
xml(obj, { headles... | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/159.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/159.coffee | 1 | 50 | ||
oozcitak/xmlbuilder-js:test/issues/159.coffee:1:completion | completion | suite 'Tests specific to issues:', ->
test 'multiple elements with different values. Issue 159', ->
obj = {
'mdui:UIInfo': {
"mdui:DisplayName": [
{ "@xml:lang": "de", "#text": "AAA" }
{ "@xml:lang": "en", "#text": "BBB" }
]
}
}
eq(
xml(obj, { headles... | "display-name": {
"#text": "Root",
"@xml:lang": "x-default"
},
"description": {
"#text": "Master Catalogue for Treasury Wines",
"@xml:lang": "x-default"
},
"online-flag": {
"#text": true
... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/159.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/159.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:test/issues/159.coffee:2:raw_corpus | raw_corpus | },
{
"@attribute-id": "wineCOGS",
"@system": false
},
{
"@attribute-id": "wineCollection",
"@system": false
},
{
... | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/159.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/159.coffee | 51 | 94 | ||
oozcitak/xmlbuilder-js:test/issues/159.coffee:2:completion | completion | },
{
"@attribute-id": "wineCOGS",
"@system": false
},
{
"@attribute-id": "wineCollection",
"@system": false
},
{
... | "@attribute-id": "wineVintage",
"@system": false
}
]
}
},
{
"attribute-group": {
"@group-id": "coreProduct",
"display-name": {
"#text": ... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/159.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/159.coffee | 51 | 94 |
oozcitak/xmlbuilder-js:test/issues/159.coffee:3:raw_corpus | raw_corpus | eq(
xml(obj, { headless: true }).end({ pretty: true })
"""
<category category-id="twe-root">
<display-name xml:lang="x-default">Root</display-name>
<description xml:lang="x-default">Master Catalogue for Treasury Wines</description>
<online-flag>true</online-flag>
<attr... | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/159.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/159.coffee | 96 | 136 | ||
oozcitak/xmlbuilder-js:test/issues/159.coffee:3:completion | completion | eq(
xml(obj, { headless: true }).end({ pretty: true })
"""
<category category-id="twe-root">
<display-name xml:lang="x-default">Root</display-name>
<description xml:lang="x-default">Master Catalogue for Treasury Wines</description>
<online-flag>true</online-flag>
<attr... | </attribute-groups>
<attribute-groups>
<attribute-group group-id="coreProduct">
<display-name xml:lang="x-default">Core Product Attributes</display-name>
<attribute attribute-id="csrOnly" system="false"/>
</attribute-group>
</attribute-groups>
</category... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/159.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/159.coffee | 96 | 136 |
oozcitak/xmlbuilder-js:test/issues/159.coffee:3:raw_corpus | raw_corpus | eq(
xml(obj, { headless: true }).end({ pretty: true })
"""
<category category-id="twe-root">
<display-name xml:lang="x-default">Root</display-name>
<description xml:lang="x-default">Master Catalogue for Treasury Wines</description>
<online-flag>true</online-flag>
<attr... | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/159.coffee | MIT | d8d24471670e885a94bfe91d4898bdf81ad127ea | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8d24471670e885a94bfe91d4898bdf81ad127ea/test/issues/159.coffee | 96 | 125 | ||
oozcitak/xmlbuilder-js:test/issues/159.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
eq(
xml(obj, { headless: true }).end({ pretty: true })
"""
<category category-id="twe-root">
<display-name xml:lang="x-default">Root</display-name>
<description xml:lang="x-default">Master Catalogue for Treasury Wines</descripti... | eq(xml(obj, {
headless: true
}).end({
pretty: true
}), `<category category-id="twe-root">
<display-name xml:lang="x-default">Root</display-name>
<description xml:lang="x-default">Master Catalogue for Treasury Wines</description>
<online-flag>true</online-flag>
<attribute-groups>
<attribute-group group-i... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | test/issues/159.coffee | MIT | d8d24471670e885a94bfe91d4898bdf81ad127ea | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8d24471670e885a94bfe91d4898bdf81ad127ea/test/issues/159.coffee | 96 | 125 |
oozcitak/xmlbuilder-js:test/issues/159.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
eq(xml(obj, {
headless: true
}).end({
pretty: true
}), `<category category-id="twe-root">
<display-name xml:lang="x-default">Root</display-name>
<description xml:lang="x-default">Master Catalogue for Treasury Wines</description>
<online-flag>true</online-... | eq(
xml(obj, { headless: true }).end({ pretty: true })
"""
<category category-id="twe-root">
<display-name xml:lang="x-default">Root</display-name>
<description xml:lang="x-default">Master Catalogue for Treasury Wines</description>
<online-flag>true</online-flag>
<attr... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/159.coffee | MIT | d8d24471670e885a94bfe91d4898bdf81ad127ea | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8d24471670e885a94bfe91d4898bdf81ad127ea/test/issues/159.coffee | 96 | 125 |
oozcitak/xmlbuilder-js:test/issues/159.coffee:3:completion | completion | eq(
xml(obj, { headless: true }).end({ pretty: true })
"""
<category category-id="twe-root">
<display-name xml:lang="x-default">Root</display-name>
<description xml:lang="x-default">Master Catalogue for Treasury Wines</description>
<online-flag>true</online-flag>
<attr... | <attribute attribute-id="wineType" system="false"/>
<attribute attribute-id="wineVariety" system="false"/>
<attribute attribute-id="wineBottleType" system="false"/>
<attribute attribute-id="wineVintage" system="false"/>
</attribute-group>
</attribute-groups>
... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/159.coffee | MIT | d8d24471670e885a94bfe91d4898bdf81ad127ea | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8d24471670e885a94bfe91d4898bdf81ad127ea/test/issues/159.coffee | 96 | 125 |
CaryLandholt/AngularFun:tasks/copyFile.coffee:1:raw_corpus | raw_corpus | ###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
wrench = require 'wrench'
fs = require 'fs'
grunt.registerMultiTask 'copyFile', 'Copies a file', ->
src = @file.src
dest = @file.dest
source = grunt.file.read src
grunt.file.write dest, source | CoffeeScript | CaryLandholt/AngularFun | tasks/copyFile.coffee | MIT | a8f66a0a3617e549d0071a85d4d386a4103264e3 | 672 | https://github.com/CaryLandholt/AngularFun/blob/a8f66a0a3617e549d0071a85d4d386a4103264e3/tasks/copyFile.coffee | 1 | 14 | ||
CaryLandholt/AngularFun:tasks/copyFile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
wrench = require 'wrench'
fs = require 'fs'
grunt.registerMultiTask 'copyFile', 'Copies a file', ->
src = @file.src
dest = @file.dest
source = grun... | /*global module, require*/
module.exports = function(grunt) {
var fs, growl, path, wrench;
growl = require('growl');
path = require('path');
wrench = require('wrench');
fs = require('fs');
return grunt.registerMultiTask('copyFile', 'Copies a file', function() {
var dest, source, src;
src = this.file... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | tasks/copyFile.coffee | MIT | a8f66a0a3617e549d0071a85d4d386a4103264e3 | 672 | https://github.com/CaryLandholt/AngularFun/blob/a8f66a0a3617e549d0071a85d4d386a4103264e3/tasks/copyFile.coffee | 1 | 14 |
CaryLandholt/AngularFun:tasks/copyFile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global module, require*/
module.exports = function(grunt) {
var fs, growl, path, wrench;
growl = require('growl');
path = require('path');
wrench = require('wrench');
fs = require('fs');
return grunt.registerMultiTask('copyFile', 'Copies a file', func... | ###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
wrench = require 'wrench'
fs = require 'fs'
grunt.registerMultiTask 'copyFile', 'Copies a file', ->
src = @file.src
dest = @file.dest
source = grunt.file.read src
grunt.file.write dest, source | JavaScript | CoffeeScript | CaryLandholt/AngularFun | tasks/copyFile.coffee | MIT | a8f66a0a3617e549d0071a85d4d386a4103264e3 | 672 | https://github.com/CaryLandholt/AngularFun/blob/a8f66a0a3617e549d0071a85d4d386a4103264e3/tasks/copyFile.coffee | 1 | 14 |
CaryLandholt/AngularFun:tasks/copyFile.coffee:1:completion | completion | ###global module, require###
module.exports = (grunt) ->
growl = require 'growl'
path = require 'path'
wrench = require 'wrench'
fs = require 'fs' | grunt.registerMultiTask 'copyFile', 'Copies a file', ->
src = @file.src
dest = @file.dest
source = grunt.file.read src
grunt.file.write dest, source | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | tasks/copyFile.coffee | MIT | a8f66a0a3617e549d0071a85d4d386a4103264e3 | 672 | https://github.com/CaryLandholt/AngularFun/blob/a8f66a0a3617e549d0071a85d4d386a4103264e3/tasks/copyFile.coffee | 1 | 14 |
gterrono/houston:client/new_collection_modal.coffee:1:raw_corpus | raw_corpus | Template.admin_new_collection.events
'click .admin-add-collection-button': (e) ->
e.preventDefault()
collection_name = $('#admin-collection-name').val()
Meteor.call('setupNewCollection', collection_name, (e, r) ->
Meteor.subscribe "admin_#{collection_name}"
# TODO - dont stash on global object... | CoffeeScript | gterrono/houston | client/new_collection_modal.coffee | MIT | addd34774de8046c1acf403fb4af96b42a09c192 | 802 | https://github.com/gterrono/houston/blob/addd34774de8046c1acf403fb4af96b42a09c192/client/new_collection_modal.coffee | 1 | 23 | ||
gterrono/houston:client/new_collection_modal.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Template.admin_new_collection.events
'click .admin-add-collection-button': (e) ->
e.preventDefault()
collection_name = $('#admin-collection-name').val()
Meteor.call('setupNewCollection', collection_name, (e, r) ->
Meteor.subscribe "admin_#{col... | Template.admin_new_collection.events({
'click .admin-add-collection-button': function(e) {
var collection_name;
e.preventDefault();
collection_name = $('#admin-collection-name').val();
Meteor.call('setupNewCollection', collection_name, function(e, r) {
var $form, $group, field_name, group, i, le... | CoffeeScript | JavaScript | gterrono/houston | client/new_collection_modal.coffee | MIT | addd34774de8046c1acf403fb4af96b42a09c192 | 802 | https://github.com/gterrono/houston/blob/addd34774de8046c1acf403fb4af96b42a09c192/client/new_collection_modal.coffee | 1 | 23 |
gterrono/houston:client/new_collection_modal.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Template.admin_new_collection.events({
'click .admin-add-collection-button': function(e) {
var collection_name;
e.preventDefault();
collection_name = $('#admin-collection-name').val();
Meteor.call('setupNewCollection', collection_name, function(e,... | Template.admin_new_collection.events
'click .admin-add-collection-button': (e) ->
e.preventDefault()
collection_name = $('#admin-collection-name').val()
Meteor.call('setupNewCollection', collection_name, (e, r) ->
Meteor.subscribe "admin_#{collection_name}"
# TODO - dont stash on global object... | JavaScript | CoffeeScript | gterrono/houston | client/new_collection_modal.coffee | MIT | addd34774de8046c1acf403fb4af96b42a09c192 | 802 | https://github.com/gterrono/houston/blob/addd34774de8046c1acf403fb4af96b42a09c192/client/new_collection_modal.coffee | 1 | 23 |
gterrono/houston:client/new_collection_modal.coffee:1:completion | completion | Template.admin_new_collection.events
'click .admin-add-collection-button': (e) ->
e.preventDefault()
collection_name = $('#admin-collection-name').val()
Meteor.call('setupNewCollection', collection_name, (e, r) ->
Meteor.subscribe "admin_#{collection_name}"
# TODO - dont stash on global object... | $group = $(group)
field_name = $group.find('.admin-field').val()
if field_name
new_doc[field_name] = $group.find('.admin-value').val()
Meteor.call "admin_#{collection_name}_insert", new_doc
)
$('#adminCollectionModal').modal('hide')
'keyup .admin-last-field': (e) ->
$('.a... | CoffeeScript | CoffeeScript | gterrono/houston | client/new_collection_modal.coffee | MIT | addd34774de8046c1acf403fb4af96b42a09c192 | 802 | https://github.com/gterrono/houston/blob/addd34774de8046c1acf403fb4af96b42a09c192/client/new_collection_modal.coffee | 1 | 23 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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.loginMessage ?= configService.authentication.loginMessage
# Load cached username
if userService.cachedUsername?
$scope.credentials.username = userService.cachedUsername
focusService.focus 'focusPassword', $scope
else
focusService.focus 'focusUsername', $scope
$scope.canL... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/controller.login.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.coffee:2:raw_corpus | raw_corpus | $scope.credentials.password = ''
focusService.focus 'focusPassword', $scope
$scope.cancel = ->
$uibModalInstance.dismiss('cancel') | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/controller.login.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/common/controller.login.coffee | 51 | 55 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.coffee:2:completion | completion | $scope.credentials.password = ''
focusService.focus 'focusPassword', $scope | $scope.cancel = ->
$uibModalInstance.dismiss('cancel') | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/controller.login.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/common/controller.login.coffee | 51 | 55 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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.credentials.username = userService.cachedUsername
focusService.focus 'focusPassword', $scope
else
focusService.focus 'focusUsername', $scope
$scope.canLogin = ->
return !_.isEmpty($scope.credentials.username) && !_... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/controller.login.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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.focusPassword = false
$scope.loginMessage ?= configService.authentication.loginMessage
# Load cached username
if userService.cachedUsername?
$scope.credentials.username = userService.cachedUsername
$scope.focusPassword = true
else
$scope.focusUsername = true
$scope.... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/controller.login.coffee | MIT | 0d7d6f843df6f4dc02ea758dc88423d6884d20be | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0d7d6f843df6f4dc02ea758dc88423d6884d20be/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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/common/controller.login.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/common/controller.login.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.focusPassword = false
$scope.loginMessage ?= configService.authentication.loginMessage
# Load cached username
if userService.cachedUsername?
$scope.credentials.username = userService.cachedUsername
$scope.focusPassword = true
else
$scope.focusUsername = true
$scope.... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/common/controller.login.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/common/controller.login.coffee | 1 | 50 |
mauricemach/zappa:tests/defs.coffee:1:raw_corpus | raw_corpus | zappa = require '../src/zappa'
port = 15300
@tests =
string: (t) ->
t.expect 'body'
zapp = zappa port++, ->
def foo: 'bar'
get '/': -> foo
c = t.client(zapp.app)
c.get '/', (err, res) ->
t.equal 'body', res.body, 'bar'
function: (t) ->
t.expect 'body'
zapp = zappa port... | CoffeeScript | mauricemach/zappa | tests/defs.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/defs.coffee | 1 | 50 | ||
mauricemach/zappa:tests/defs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
zappa = require '../src/zappa'
port = 15300
@tests =
string: (t) ->
t.expect 'body'
zapp = zappa port++, ->
def foo: 'bar'
get '/': -> foo
c = t.client(zapp.app)
c.get '/', (err, res) ->
t.equal 'body', res.body, 'bar'
fu... | var port, zappa;
zappa = require('../src/zappa');
port = 15300;
this.tests = {
string: function(t) {
var c, zapp;
t.expect('body');
zapp = zappa(port++, function() {
def({
foo: 'bar'
});
return get({
'/': function() {
return foo;
}
});
});
... | CoffeeScript | JavaScript | mauricemach/zappa | tests/defs.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/defs.coffee | 1 | 50 |
mauricemach/zappa:tests/defs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var port, zappa;
zappa = require('../src/zappa');
port = 15300;
this.tests = {
string: function(t) {
var c, zapp;
t.expect('body');
zapp = zappa(port++, function() {
def({
foo: 'bar'
});
return get({
'/': function(... | zappa = require '../src/zappa'
port = 15300
@tests =
string: (t) ->
t.expect 'body'
zapp = zappa port++, ->
def foo: 'bar'
get '/': -> foo
c = t.client(zapp.app)
c.get '/', (err, res) ->
t.equal 'body', res.body, 'bar'
function: (t) ->
t.expect 'body'
zapp = zappa port... | JavaScript | CoffeeScript | mauricemach/zappa | tests/defs.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/defs.coffee | 1 | 50 |
mauricemach/zappa:tests/defs.coffee:1:completion | completion | zappa = require '../src/zappa'
port = 15300
@tests =
string: (t) ->
t.expect 'body'
zapp = zappa port++, ->
def foo: 'bar'
get '/': -> foo
c = t.client(zapp.app)
c.get '/', (err, res) ->
t.equal 'body', res.body, 'bar'
function: (t) ->
t.expect 'body'
zapp = zappa port... | t.equal 'body', res.body, '3'
'by value': (t) ->
t.expect 1, 2
zapp = zappa port++, ->
def counter: 0
get '/': ->
counter++
String(counter)
c = t.client(zapp.app)
c.get '/', (err, res) ->
t.equal 1, res.body, '1'
c.get '/', (err, res) ->
t.equal 2, re... | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/defs.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/defs.coffee | 1 | 50 |
mauricemach/zappa:tests/defs.coffee:2:raw_corpus | raw_corpus | c = t.client(zapp.app)
c.get '/', (err, res) ->
t.equal 1, res.body, '1'
c.get '/', (err, res) ->
t.equal 2, res.body, '2' | CoffeeScript | mauricemach/zappa | tests/defs.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/defs.coffee | 51 | 55 | ||
mauricemach/zappa:tests/defs.coffee:2:completion | completion | c = t.client(zapp.app)
c.get '/', (err, res) -> | t.equal 1, res.body, '1'
c.get '/', (err, res) ->
t.equal 2, res.body, '2' | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/defs.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/defs.coffee | 51 | 55 |
mauricemach/zappa:tests/defs.coffee:1:raw_corpus | raw_corpus | zappa = require('./support/tester') require('../src/zappa')
module.exports =
foo: ->
t = zappa ->
def foo: 'bar'
get '/': -> foo
t.get '/', 'bar'
sum: ->
t = zappa ->
def sum: (a, b) -> a + b
get '/': -> String(sum 1, 2)
t.get '/', '3'
byvalue: ->
t = zappa ->
... | CoffeeScript | mauricemach/zappa | tests/defs.coffee | MIT | 9a07f55f8c030b026a3d2a6bb1f32cde77b6806a | 943 | https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/defs.coffee | 1 | 38 | ||
mauricemach/zappa:tests/defs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
zappa = require('./support/tester') require('../src/zappa')
module.exports =
foo: ->
t = zappa ->
def foo: 'bar'
get '/': -> foo
t.get '/', 'bar'
sum: ->
t = zappa ->
def sum: (a, b) -> a + b
get '/': -> String(sum 1, 2)... | var zappa;
zappa = require('./support/tester')(require('../src/zappa'));
module.exports = {
foo: function() {
var t;
t = zappa(function() {
def({
foo: 'bar'
});
return get({
'/': function() {
return foo;
}
});
});
return t.get('/', 'bar');
... | CoffeeScript | JavaScript | mauricemach/zappa | tests/defs.coffee | MIT | 9a07f55f8c030b026a3d2a6bb1f32cde77b6806a | 943 | https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/defs.coffee | 1 | 38 |
mauricemach/zappa:tests/defs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var zappa;
zappa = require('./support/tester')(require('../src/zappa'));
module.exports = {
foo: function() {
var t;
t = zappa(function() {
def({
foo: 'bar'
});
return get({
'/': function() {
return foo;
... | zappa = require('./support/tester') require('../src/zappa')
module.exports =
foo: ->
t = zappa ->
def foo: 'bar'
get '/': -> foo
t.get '/', 'bar'
sum: ->
t = zappa ->
def sum: (a, b) -> a + b
get '/': -> String(sum 1, 2)
t.get '/', '3'
byvalue: ->
t = zappa ->
... | JavaScript | CoffeeScript | mauricemach/zappa | tests/defs.coffee | MIT | 9a07f55f8c030b026a3d2a6bb1f32cde77b6806a | 943 | https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/defs.coffee | 1 | 38 |
mauricemach/zappa:tests/defs.coffee:1:completion | completion | zappa = require('./support/tester') require('../src/zappa')
module.exports =
foo: ->
t = zappa ->
def foo: 'bar'
get '/': -> foo
t.get '/', 'bar'
sum: ->
t = zappa ->
def sum: (a, b) -> a + b
get '/': -> String(sum 1, 2)
t.get '/', '3'
byvalue: ->
t = zappa -> | def counter: 0
get '/': ->
counter++
String(counter)
t.get '/', '1'
t.get '/', '1'
t.get '/', '1'
byref: ->
t = zappa ->
def foo: {counter: 0}
get '/': ->
foo.counter++
String(foo.counter)
t.get '/', '3'
t.get '/', '2'
t.get '/', '1' | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/defs.coffee | MIT | 9a07f55f8c030b026a3d2a6bb1f32cde77b6806a | 943 | https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/defs.coffee | 1 | 38 |
meltingice/psd.js:shims/png.coffee:1:raw_corpus | raw_corpus | RSVP = require 'rsvp'
module.exports =
toBase64: ->
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageData(0, 0, @width(), @height())
pixelData = imageD... | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/shims/png.coffee | 1 | 32 | ||
meltingice/psd.js:shims/png.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
RSVP = require 'rsvp'
module.exports =
toBase64: ->
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getIm... | var RSVP;
RSVP = require('rsvp');
module.exports = {
toBase64: function() {
var canvas, context, i, imageData, j, len, pixel, pixelData, ref;
// Draw the pixels to the canvas
canvas = document.createElement('canvas');
canvas.width = this.width();
canvas.height = this.height();
context = canv... | CoffeeScript | JavaScript | meltingice/psd.js | shims/png.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/shims/png.coffee | 1 | 32 |
meltingice/psd.js:shims/png.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var RSVP;
RSVP = require('rsvp');
module.exports = {
toBase64: function() {
var canvas, context, i, imageData, j, len, pixel, pixelData, ref;
// Draw the pixels to the canvas
canvas = document.createElement('canvas');
canvas.width = this.width()... | RSVP = require 'rsvp'
module.exports =
toBase64: ->
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageData(0, 0, @width(), @height())
pixelData = imageD... | JavaScript | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/shims/png.coffee | 1 | 32 |
meltingice/psd.js:shims/png.coffee:1:completion | completion | RSVP = require 'rsvp'
module.exports =
toBase64: ->
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageData(0, 0, @width(), @height())
pixelData = imageD... | canvas.toDataURL 'image/png'
toPng: ->
dataUrl = @toBase64()
# Create the image and set the source to the
# canvas data URL.
image = new Image()
image.width = @width()
image.height = @height()
image.src = dataUrl
image
saveAsPng: ->
throw "Not available in the browser. Use toP... | CoffeeScript | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/shims/png.coffee | 1 | 32 |
meltingice/psd.js:shims/png.coffee:1:raw_corpus | raw_corpus | RSVP = require 'rsvp'
module.exports =
toBase64: ->
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageData(0, 0, @width(), @height())
pixelData = imageD... | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | cb61b9ee91459cf68de449f25feef0edc0471f6d | 2,846 | https://github.com/meltingice/psd.js/blob/cb61b9ee91459cf68de449f25feef0edc0471f6d/shims/png.coffee | 1 | 33 | ||
meltingice/psd.js:shims/png.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
RSVP = require 'rsvp'
module.exports =
toBase64: ->
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getIm... | var RSVP;
RSVP = require('rsvp');
module.exports = {
toBase64: function() {
var canvas, context, i, imageData, j, len, pixel, pixelData, ref;
// Draw the pixels to the canvas
canvas = document.createElement('canvas');
canvas.width = this.width();
canvas.height = this.height();
context = canv... | CoffeeScript | JavaScript | meltingice/psd.js | shims/png.coffee | MIT | cb61b9ee91459cf68de449f25feef0edc0471f6d | 2,846 | https://github.com/meltingice/psd.js/blob/cb61b9ee91459cf68de449f25feef0edc0471f6d/shims/png.coffee | 1 | 33 |
meltingice/psd.js:shims/png.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var RSVP;
RSVP = require('rsvp');
module.exports = {
toBase64: function() {
var canvas, context, i, imageData, j, len, pixel, pixelData, ref;
// Draw the pixels to the canvas
canvas = document.createElement('canvas');
canvas.width = this.width()... | RSVP = require 'rsvp'
module.exports =
toBase64: ->
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageData(0, 0, @width(), @height())
pixelData = imageD... | JavaScript | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | cb61b9ee91459cf68de449f25feef0edc0471f6d | 2,846 | https://github.com/meltingice/psd.js/blob/cb61b9ee91459cf68de449f25feef0edc0471f6d/shims/png.coffee | 1 | 33 |
meltingice/psd.js:shims/png.coffee:1:completion | completion | RSVP = require 'rsvp'
module.exports =
toBase64: ->
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageData(0, 0, @width(), @height())
pixelData = imageD... | canvas.toDataURL 'image/png'
toPng: ->
new RSVP.Promise (resolve, reject) =>
dataUrl = @toBase64()
# Create the image and set the source to the
# canvas data URL.
image = new Image()
image.width = @width()
image.height = @height()
image.src = dataUrl
resolve(image... | CoffeeScript | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | cb61b9ee91459cf68de449f25feef0edc0471f6d | 2,846 | https://github.com/meltingice/psd.js/blob/cb61b9ee91459cf68de449f25feef0edc0471f6d/shims/png.coffee | 1 | 33 |
meltingice/psd.js:shims/png.coffee:1:raw_corpus | raw_corpus | RSVP = require 'rsvp'
module.exports =
toPng: ->
new RSVP.Promise (resolve, reject) =>
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageDat... | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | e6b4e8287fe33581e5cdcf33560085f2cc5848ed | 2,846 | https://github.com/meltingice/psd.js/blob/e6b4e8287fe33581e5cdcf33560085f2cc5848ed/shims/png.coffee | 1 | 29 | ||
meltingice/psd.js:shims/png.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
RSVP = require 'rsvp'
module.exports =
toPng: ->
new RSVP.Promise (resolve, reject) =>
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canva... | var RSVP;
RSVP = require('rsvp');
module.exports = {
toPng: function() {
return new RSVP.Promise((resolve, reject) => {
var canvas, context, i, image, imageData, j, len, pixel, pixelData, ref;
// Draw the pixels to the canvas
canvas = document.createElement('canvas');
canvas.width = this... | CoffeeScript | JavaScript | meltingice/psd.js | shims/png.coffee | MIT | e6b4e8287fe33581e5cdcf33560085f2cc5848ed | 2,846 | https://github.com/meltingice/psd.js/blob/e6b4e8287fe33581e5cdcf33560085f2cc5848ed/shims/png.coffee | 1 | 29 |
meltingice/psd.js:shims/png.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var RSVP;
RSVP = require('rsvp');
module.exports = {
toPng: function() {
return new RSVP.Promise((resolve, reject) => {
var canvas, context, i, image, imageData, j, len, pixel, pixelData, ref;
// Draw the pixels to the canvas
canvas = docu... | RSVP = require 'rsvp'
module.exports =
toPng: ->
new RSVP.Promise (resolve, reject) =>
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageDat... | JavaScript | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | e6b4e8287fe33581e5cdcf33560085f2cc5848ed | 2,846 | https://github.com/meltingice/psd.js/blob/e6b4e8287fe33581e5cdcf33560085f2cc5848ed/shims/png.coffee | 1 | 29 |
meltingice/psd.js:shims/png.coffee:1:completion | completion | RSVP = require 'rsvp'
module.exports =
toPng: ->
new RSVP.Promise (resolve, reject) =>
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageDat... | pixelData[i] = pixel for pixel, i in @pixelData
context.putImageData(imageData, 0, 0)
# Create the image and set the source to the
# canvas data URL.
image = new Image()
image.width = @width()
image.height = @height()
image.src = canvas.toDataURL 'image/png'
resolve(im... | CoffeeScript | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | e6b4e8287fe33581e5cdcf33560085f2cc5848ed | 2,846 | https://github.com/meltingice/psd.js/blob/e6b4e8287fe33581e5cdcf33560085f2cc5848ed/shims/png.coffee | 1 | 29 |
meltingice/psd.js:shims/png.coffee:1:raw_corpus | raw_corpus | module.exports =
toPng: ->
new RSVP.Promise (resolve, reject) =>
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageData(0, 0, @width(), @heig... | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | 8e965273dce597723ea1d151740c53c4d9cde8e9 | 2,846 | https://github.com/meltingice/psd.js/blob/8e965273dce597723ea1d151740c53c4d9cde8e9/shims/png.coffee | 1 | 25 | ||
meltingice/psd.js:shims/png.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports =
toPng: ->
new RSVP.Promise (resolve, reject) =>
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
... | module.exports = {
toPng: function() {
return new RSVP.Promise((resolve, reject) => {
var canvas, context, i, image, imageData, j, len, pixel, pixelData, ref;
// Draw the pixels to the canvas
canvas = document.createElement('canvas');
canvas.width = this.width();
canvas.height = this... | CoffeeScript | JavaScript | meltingice/psd.js | shims/png.coffee | MIT | 8e965273dce597723ea1d151740c53c4d9cde8e9 | 2,846 | https://github.com/meltingice/psd.js/blob/8e965273dce597723ea1d151740c53c4d9cde8e9/shims/png.coffee | 1 | 25 |
meltingice/psd.js:shims/png.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = {
toPng: function() {
return new RSVP.Promise((resolve, reject) => {
var canvas, context, i, image, imageData, j, len, pixel, pixelData, ref;
// Draw the pixels to the canvas
canvas = document.createElement('canvas');
... | module.exports =
toPng: ->
new RSVP.Promise (resolve, reject) =>
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageData(0, 0, @width(), @heig... | JavaScript | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | 8e965273dce597723ea1d151740c53c4d9cde8e9 | 2,846 | https://github.com/meltingice/psd.js/blob/8e965273dce597723ea1d151740c53c4d9cde8e9/shims/png.coffee | 1 | 25 |
meltingice/psd.js:shims/png.coffee:1:completion | completion | module.exports =
toPng: ->
new RSVP.Promise (resolve, reject) =>
# Draw the pixels to the canvas
canvas = document.createElement('canvas')
canvas.width = @width()
canvas.height = @height()
context = canvas.getContext('2d')
imageData = context.getImageData(0, 0, @width(), @heig... | pixelData[i] = pixel for pixel, i in @pixelData
# Create the image and set the source to the
# canvas data URL.
image = new Image()
image.width = @width()
image.height = @height()
image.src = canvas.toDataURL 'image/png'
resolve(image)
saveAsPng: ->
throw "Not availabl... | CoffeeScript | CoffeeScript | meltingice/psd.js | shims/png.coffee | MIT | 8e965273dce597723ea1d151740c53c4d9cde8e9 | 2,846 | https://github.com/meltingice/psd.js/blob/8e965273dce597723ea1d151740c53c4d9cde8e9/shims/png.coffee | 1 | 25 |
jianliaoim/talk-os:talk-web/client/app/member-item.coffee:1:raw_corpus | raw_corpus | React = require 'react'
lang = require '../locales/lang'
recorder = require 'actions-recorder'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
query = require '../query'
lang = require '../locales/lang'
detect = require '../util/detect'
UserAlias = React.createFactory requi... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/member-item.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/member-item.coffee | 1 | 50 | ||
jianliaoim/talk-os:talk-web/client/app/member-item.coffee:1:completion | completion | React = require 'react'
lang = require '../locales/lang'
recorder = require 'actions-recorder'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
query = require '../query'
lang = require '../locales/lang'
detect = require '../util/detect'
UserAlias = React.createFactory requi... | # this component expects children
member: T.instanceOf(Immutable.Map)
user: T.instanceOf(Immutable.Map)
_teamId: T.string.isRequired
isTopicCreator: T.bool
getName: ->
if @props.member.get('_id') is @props.user.get('_id')
then "(#{lang.getText('me')})"
renderRobotIcon: ->
contact = que... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/member-item.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/member-item.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/member-item.coffee:2:raw_corpus | raw_corpus | backgroundImage: "url('#{@props.member.get('avatarUrl')}')"
else {}
div className: 'member-item line',
div className: 'img-36 avatar img-circle member-avatar', style: style
div className: 'info',
div className: 'bold',
UserAlias _userId: @props.member.get('_id'), _teamId: @props... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/member-item.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/member-item.coffee | 51 | 63 | ||
jianliaoim/talk-os:talk-web/client/app/member-item.coffee:2:completion | completion | backgroundImage: "url('#{@props.member.get('avatarUrl')}')"
else {}
div className: 'member-item line',
div className: 'img-36 avatar img-circle member-avatar', style: style
div className: 'info', | div className: 'bold',
UserAlias _userId: @props.member.get('_id'), _teamId: @props._teamId, defaultName: @props.member.get('name')
@getName()
@renderRobotIcon()
div className: 'description',
lang.getText(role)
@props.children | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/member-item.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/member-item.coffee | 51 | 63 |
mojotech/pioneer:src/widgets/Widget.Iframe.coffee:1:raw_corpus | raw_corpus | class @Widget.Iframe extends @Widget
root: 'iframe'
focus: ->
@driver.switchTo().frame(@find()).then => this
unfocus: ->
@driver.switchTo().defaultContent().then => this | CoffeeScript | mojotech/pioneer | src/widgets/Widget.Iframe.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/widgets/Widget.Iframe.coffee | 1 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.