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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nicolaskruchten/pivottable:locales/pivot.zh.coffee:1:raw_corpus | raw_corpus | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQue... | CoffeeScript | nicolaskruchten/pivottable | locales/pivot.zh.coffee | MIT | 838ec2fc38747749c28d2fd1cb6c4ace9e9cc520 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.zh.coffee | 3 | 52 | ||
nicolaskruchten/pivottable:locales/pivot.zh.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain brow... | var callWithJQuery;
callWithJQuery = function(pivotModule) {
if (typeof exports === "object" && typeof module === "object") { // CommonJS
return pivotModule(require("jquery"));
} else if (typeof define === "function" && define.amd) { // AMD
return define(["jquery"], pivotModule);
} else {
// Plain br... | CoffeeScript | JavaScript | nicolaskruchten/pivottable | locales/pivot.zh.coffee | MIT | 838ec2fc38747749c28d2fd1cb6c4ace9e9cc520 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.zh.coffee | 3 | 52 |
nicolaskruchten/pivottable:locales/pivot.zh.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var callWithJQuery;
callWithJQuery = function(pivotModule) {
if (typeof exports === "object" && typeof module === "object") { // CommonJS
return pivotModule(require("jquery"));
} else if (typeof define === "function" && define.amd) { // AMD
return defi... | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQue... | JavaScript | CoffeeScript | nicolaskruchten/pivottable | locales/pivot.zh.coffee | MIT | 838ec2fc38747749c28d2fd1cb6c4ace9e9cc520 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.zh.coffee | 3 | 52 |
nicolaskruchten/pivottable:locales/pivot.zh.coffee:1:completion | completion | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQue... | computeError: "计算结果时出错。"
uiRenderError: "展示界面时出错。"
selectAll: "选择全部"
selectNone: "全部不选"
tooMany: "(因数据过多而无法列出)"
filterResults: "输入值帮助筛选"
totals: "合计"
vs: "于"
by: "分组于"
aggregators:
"频数": ... | CoffeeScript | CoffeeScript | nicolaskruchten/pivottable | locales/pivot.zh.coffee | MIT | 838ec2fc38747749c28d2fd1cb6c4ace9e9cc520 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.zh.coffee | 3 | 52 |
nicolaskruchten/pivottable:locales/pivot.zh.coffee:2:raw_corpus | raw_corpus | "二项分布:置信度为80%时的区间上限": tpl.sumOverSumBound80(true, frFmt)
"二项分布:置信度为80%时的区间下限": tpl.sumOverSumBound80(false, frFmt)
"和在总计中的比例": tpl.fractionOf(tpl.sum(), "total", frFmtPct)
"和在行合计中的比例": tpl.fractionOf(tpl.sum(), "row", frFm... | CoffeeScript | nicolaskruchten/pivottable | locales/pivot.zh.coffee | MIT | 838ec2fc38747749c28d2fd1cb6c4ace9e9cc520 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.zh.coffee | 53 | 97 | ||
nicolaskruchten/pivottable:locales/pivot.zh.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
"二项分布:置信度为80%时的区间上限": tpl.sumOverSumBound80(true, frFmt)
"二项分布:置信度为80%时的区间下限": tpl.sumOverSumBound80(false, frFmt)
"和在总计中的比例": tpl.fractionOf(tpl.sum(), "total", frFmtPct)
"和... | ({
"二项分布:置信度为80%时的区间上限": tpl.sumOverSumBound80(true, frFmt)({
"二项分布:置信度为80%时的区间下限": tpl.sumOverSumBound80(false, frFmt),
"和在总计中的比例": tpl.fractionOf(tpl.sum(), "total", frFmtPct),
"和在行合计中的比例": tpl.fractionOf(tpl.sum(), "row", frFmtPct),
"和在列合计中的比例": tpl.fractionOf(tpl.sum(), "col", frFmtPct),
"频数在总... | CoffeeScript | JavaScript | nicolaskruchten/pivottable | locales/pivot.zh.coffee | MIT | 838ec2fc38747749c28d2fd1cb6c4ace9e9cc520 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.zh.coffee | 53 | 97 |
nicolaskruchten/pivottable:locales/pivot.zh.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
"二项分布:置信度为80%时的区间上限": tpl.sumOverSumBound80(true, frFmt)({
"二项分布:置信度为80%时的区间下限": tpl.sumOverSumBound80(false, frFmt),
"和在总计中的比例": tpl.fractionOf(tpl.sum(), "total", frFmtPct),
"和在行合计中的比例": tpl.fractionOf(tpl.sum(), "row", frFmtPct),
"和在列合计中的比例"... | "二项分布:置信度为80%时的区间上限": tpl.sumOverSumBound80(true, frFmt)
"二项分布:置信度为80%时的区间下限": tpl.sumOverSumBound80(false, frFmt)
"和在总计中的比例": tpl.fractionOf(tpl.sum(), "total", frFmtPct)
"和在行合计中的比例": tpl.fractionOf(tpl.sum(), "row", frFm... | JavaScript | CoffeeScript | nicolaskruchten/pivottable | locales/pivot.zh.coffee | MIT | 838ec2fc38747749c28d2fd1cb6c4ace9e9cc520 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.zh.coffee | 53 | 97 |
nicolaskruchten/pivottable:locales/pivot.zh.coffee:2:completion | completion | "二项分布:置信度为80%时的区间上限": tpl.sumOverSumBound80(true, frFmt)
"二项分布:置信度为80%时的区间下限": tpl.sumOverSumBound80(false, frFmt)
"和在总计中的比例": tpl.fractionOf(tpl.sum(), "total", frFmtPct)
"和在行合计中的比例": tpl.fractionOf(tpl.sum(), "row", frFm... | $.pivotUtilities.locales.zh.renderers = $.extend(
$.pivotUtilities.locales.zh.renderers,
$.pivotUtilities.locales.zh.gchart_renderers)
if d3r
$.pivotUtilities.locales.zh.d3_renderers =
"树图": d3r["Treemap"]
$.pivotUtilities.locales.zh.renderers = $.extend(
... | CoffeeScript | CoffeeScript | nicolaskruchten/pivottable | locales/pivot.zh.coffee | MIT | 838ec2fc38747749c28d2fd1cb6c4ace9e9cc520 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/838ec2fc38747749c28d2fd1cb6c4ace9e9cc520/locales/pivot.zh.coffee | 53 | 97 |
gss/engine:src/properties/Types.coffee:1:raw_corpus | raw_corpus | class Types
@define: (property, value)->
if value
@[property] = value
else
for prop, value of property
@define prop, value
Types.define
# Decimal value (e.g. line-height: 1.0)
Float: (obj) ->
parsed = parseFloat(obj)
if parsed == obj
return parsed
# Integer value (e.... | CoffeeScript | gss/engine | src/properties/Types.coffee | MIT | 47949dbba7c654416e494ed50cd26adbad62e064 | 2,854 | https://github.com/gss/engine/blob/47949dbba7c654416e494ed50cd26adbad62e064/src/properties/Types.coffee | 1 | 50 | ||
gss/engine:src/properties/Types.coffee:1:completion | completion | class Types
@define: (property, value)->
if value
@[property] = value
else
for prop, value of property
@define prop, value
Types.define
# Decimal value (e.g. line-height: 1.0)
Float: (obj) ->
parsed = parseFloat(obj)
if parsed == obj
return parsed
# Integer value (e.... | return obj
# Array of strings (e.g. font-family)
Strings: (obj) ->
if typeof obj == 'string' || obj instanceof Array
return obj
Timings:
'ease': ['cubic-bezier', .42, 0, 1, 1]
'ease-in': ['cubic-bezier', .42, 0, 1, 1]
'ease-out': ['cubic-bezier', 0, 0, .58, 1]
'ease... | CoffeeScript | CoffeeScript | gss/engine | src/properties/Types.coffee | MIT | 47949dbba7c654416e494ed50cd26adbad62e064 | 2,854 | https://github.com/gss/engine/blob/47949dbba7c654416e494ed50cd26adbad62e064/src/properties/Types.coffee | 1 | 50 |
gss/engine:src/properties/Types.coffee:2:raw_corpus | raw_corpus | return obj
if @Units[obj[0]]
if obj[1] == 0
return 0
return obj
# Length with % unit
Percentage: (obj) ->
if obj[0] == '%'
return obj
# Keywords for background-position and alike
Positions: {"top", "bottom", "left", "right"}
Position: (obj) ->
if @Types.Positions[obj]
... | CoffeeScript | gss/engine | src/properties/Types.coffee | MIT | 47949dbba7c654416e494ed50cd26adbad62e064 | 2,854 | https://github.com/gss/engine/blob/47949dbba7c654416e494ed50cd26adbad62e064/src/properties/Types.coffee | 51 | 100 | ||
gss/engine:src/properties/Types.coffee:2:completion | completion | return obj
if @Units[obj[0]]
if obj[1] == 0
return 0
return obj
# Length with % unit
Percentage: (obj) ->
if obj[0] == '%'
return obj
# Keywords for background-position and alike
Positions: {"top", "bottom", "left", "right"}
Position: (obj) ->
if @Types.Positions[obj]
... | Color: (obj) ->
if typeof obj == 'string'
if @Types.Pseudocolors[obj]
return obj
else
if @Types.Colors[obj[0]]
return obj
Sizes: {'medium', 'xx-small', 'x-small', 'small', 'large', 'x-large', 'xx-large', 'smaller', 'larger' }
Size: (obj) ->
if @Types.Sizes[obj]
return ... | CoffeeScript | CoffeeScript | gss/engine | src/properties/Types.coffee | MIT | 47949dbba7c654416e494ed50cd26adbad62e064 | 2,854 | https://github.com/gss/engine/blob/47949dbba7c654416e494ed50cd26adbad62e064/src/properties/Types.coffee | 51 | 100 |
gss/engine:src/properties/Types.coffee:3:raw_corpus | raw_corpus | return obj
Matrix: (obj) ->
if typeof obj == 'object' && object.length != undefined
return obj | CoffeeScript | gss/engine | src/properties/Types.coffee | MIT | 47949dbba7c654416e494ed50cd26adbad62e064 | 2,854 | https://github.com/gss/engine/blob/47949dbba7c654416e494ed50cd26adbad62e064/src/properties/Types.coffee | 101 | 105 | ||
gss/engine:src/properties/Types.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
return obj
Matrix: (obj) ->
if typeof obj == 'object' && object.length != undefined
return obj
``` | return obj({
Matrix: function(obj) {
if (typeof obj === 'object' && object.length !== void 0) {
return obj;
}
}
}); | CoffeeScript | JavaScript | gss/engine | src/properties/Types.coffee | MIT | 47949dbba7c654416e494ed50cd26adbad62e064 | 2,854 | https://github.com/gss/engine/blob/47949dbba7c654416e494ed50cd26adbad62e064/src/properties/Types.coffee | 101 | 105 |
gss/engine:src/properties/Types.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
return obj({
Matrix: function(obj) {
if (typeof obj === 'object' && object.length !== void 0) {
return obj;
}
}
});
``` | return obj
Matrix: (obj) ->
if typeof obj == 'object' && object.length != undefined
return obj | JavaScript | CoffeeScript | gss/engine | src/properties/Types.coffee | MIT | 47949dbba7c654416e494ed50cd26adbad62e064 | 2,854 | https://github.com/gss/engine/blob/47949dbba7c654416e494ed50cd26adbad62e064/src/properties/Types.coffee | 101 | 105 |
gss/engine:src/properties/Types.coffee:2:raw_corpus | raw_corpus | return obj
if @Unit[obj[0]]
if obj[1] == 0
return 0
return obj
# Length with % unit
Percentage: (obj) ->
if obj[0] == '%'
return obj
# Keywords for background-position and alike
Positions: {"top", "bottom", "left", "right"}
Position: (obj) ->
if @Types.Positions[obj]
... | CoffeeScript | gss/engine | src/properties/Types.coffee | MIT | 38329731e13093a7c2f049978e73f85a9eaed13d | 2,854 | https://github.com/gss/engine/blob/38329731e13093a7c2f049978e73f85a9eaed13d/src/properties/Types.coffee | 51 | 100 | ||
gss/engine:src/properties/Types.coffee:2:completion | completion | return obj
if @Unit[obj[0]]
if obj[1] == 0
return 0
return obj
# Length with % unit
Percentage: (obj) ->
if obj[0] == '%'
return obj
# Keywords for background-position and alike
Positions: {"top", "bottom", "left", "right"}
Position: (obj) ->
if @Types.Positions[obj]
... | Color: (obj) ->
if typeof obj == 'string'
if @Types.Pseudocolors[obj]
return obj
else
if @Types.Colors[obj[0]]
return obj
Sizes: {'medium', 'xx-small', 'x-small', 'small', 'large', 'x-large', 'xx-large', 'smaller', 'larger' }
Size: (obj) ->
if @Types.Sizes[obj]
return ... | CoffeeScript | CoffeeScript | gss/engine | src/properties/Types.coffee | MIT | 38329731e13093a7c2f049978e73f85a9eaed13d | 2,854 | https://github.com/gss/engine/blob/38329731e13093a7c2f049978e73f85a9eaed13d/src/properties/Types.coffee | 51 | 100 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:raw_corpus | raw_corpus | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$scope.repos = service.repos
$scope.search = (searchTerm... | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 8a9db5d5208a4acfd264afc641d3ff3e745487d5 | 672 | https://github.com/CaryLandholt/AngularFun/blob/8a9db5d5208a4acfd264afc641d3ff3e745487d5/scripts/controllers/gitHub.coffee | 1 | 17 | ||
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$s... | /*global define*/
define(['controllers/controllers', 'services/gitHub'], function(controllers) {
'use strict';
return controllers.controller('gitHub', [
'$scope',
'$rootScope',
'$location',
'gitHub',
function($scope,
$rootScope,
$location,
service) {
$scope.searchTerm = '';
... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 8a9db5d5208a4acfd264afc641d3ff3e745487d5 | 672 | https://github.com/CaryLandholt/AngularFun/blob/8a9db5d5208a4acfd264afc641d3ff3e745487d5/scripts/controllers/gitHub.coffee | 1 | 17 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global define*/
define(['controllers/controllers', 'services/gitHub'], function(controllers) {
'use strict';
return controllers.controller('gitHub', [
'$scope',
'$rootScope',
'$location',
'gitHub',
function($scope,
$rootScope,
$loc... | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$scope.repos = service.repos
$scope.search = (searchTerm... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 8a9db5d5208a4acfd264afc641d3ff3e745487d5 | 672 | https://github.com/CaryLandholt/AngularFun/blob/8a9db5d5208a4acfd264afc641d3ff3e745487d5/scripts/controllers/gitHub.coffee | 1 | 17 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:completion | completion | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$scope.repos = service.repos | $scope.search = (searchTerm) ->
$location.path "/github/#{searchTerm}"
$scope.onRouteChange = (routeParams) ->
$scope.searchTerm = routeParams.searchTerm
service.get $scope.searchTerm
] | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 8a9db5d5208a4acfd264afc641d3ff3e745487d5 | 672 | https://github.com/CaryLandholt/AngularFun/blob/8a9db5d5208a4acfd264afc641d3ff3e745487d5/scripts/controllers/gitHub.coffee | 1 | 17 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:raw_corpus | raw_corpus | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$scope.repos = service.repos
$scope.search = (searchTerm... | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | f71adf9c94b291059af8de342e725937457a8170 | 672 | https://github.com/CaryLandholt/AngularFun/blob/f71adf9c94b291059af8de342e725937457a8170/scripts/controllers/gitHub.coffee | 1 | 19 | ||
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$s... | /*global define*/
define(['controllers/controllers', 'services/gitHub'], function(controllers) {
'use strict';
return controllers.controller('gitHub', [
'$scope',
'$rootScope',
'$location',
'gitHub',
function($scope,
$rootScope,
$location,
service) {
$scope.searchTerm = '';
... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | f71adf9c94b291059af8de342e725937457a8170 | 672 | https://github.com/CaryLandholt/AngularFun/blob/f71adf9c94b291059af8de342e725937457a8170/scripts/controllers/gitHub.coffee | 1 | 19 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global define*/
define(['controllers/controllers', 'services/gitHub'], function(controllers) {
'use strict';
return controllers.controller('gitHub', [
'$scope',
'$rootScope',
'$location',
'gitHub',
function($scope,
$rootScope,
$loc... | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$scope.repos = service.repos
$scope.search = (searchTerm... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | f71adf9c94b291059af8de342e725937457a8170 | 672 | https://github.com/CaryLandholt/AngularFun/blob/f71adf9c94b291059af8de342e725937457a8170/scripts/controllers/gitHub.coffee | 1 | 19 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:completion | completion | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$scope.repos = service.repos | $scope.search = (searchTerm) ->
$location.path "/github/#{searchTerm}"
$rootScope.$on 'gitHub$routeChangeSuccess', (event, currentRoute, priorRoute) ->
$scope.searchTerm = currentRoute.params.searchTerm
service.get $scope.searchTerm
$scope.$broadcast 'changeTab#gitHub'
] | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | f71adf9c94b291059af8de342e725937457a8170 | 672 | https://github.com/CaryLandholt/AngularFun/blob/f71adf9c94b291059af8de342e725937457a8170/scripts/controllers/gitHub.coffee | 1 | 19 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:raw_corpus | raw_corpus | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$scope.repos = service.repos
$scope.search = (searchTerm... | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 83e68a53d7c24f7d417b494e4fef7451cf0e3d9b | 672 | https://github.com/CaryLandholt/AngularFun/blob/83e68a53d7c24f7d417b494e4fef7451cf0e3d9b/scripts/controllers/gitHub.coffee | 1 | 19 | ||
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$s... | /*global define*/
define(['controllers/controllers', 'services/gitHub'], function(controllers) {
'use strict';
return controllers.controller('gitHub', [
'$scope',
'$rootScope',
'$location',
'gitHub',
function($scope,
$rootScope,
$location,
service) {
$scope.searchTerm = '';
... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 83e68a53d7c24f7d417b494e4fef7451cf0e3d9b | 672 | https://github.com/CaryLandholt/AngularFun/blob/83e68a53d7c24f7d417b494e4fef7451cf0e3d9b/scripts/controllers/gitHub.coffee | 1 | 19 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global define*/
define(['controllers/controllers', 'services/gitHub'], function(controllers) {
'use strict';
return controllers.controller('gitHub', [
'$scope',
'$rootScope',
'$location',
'gitHub',
function($scope,
$rootScope,
$loc... | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$scope.repos = service.repos
$scope.search = (searchTerm... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 83e68a53d7c24f7d417b494e4fef7451cf0e3d9b | 672 | https://github.com/CaryLandholt/AngularFun/blob/83e68a53d7c24f7d417b494e4fef7451cf0e3d9b/scripts/controllers/gitHub.coffee | 1 | 19 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:completion | completion | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', ($scope, $rootScope, $location, service) ->
$scope.searchTerm = ''
$scope.repos = service.repos | $scope.search = (searchTerm) ->
$location.path "/github/#{searchTerm}"
$rootScope.$on 'gitHub$afterRouteChange', (event, currentRoute, priorRoute) ->
$scope.searchTerm = currentRoute.params.searchTerm
service.get $scope.searchTerm
$scope.$emit 'changeTab#gitHub'
] | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 83e68a53d7c24f7d417b494e4fef7451cf0e3d9b | 672 | https://github.com/CaryLandholt/AngularFun/blob/83e68a53d7c24f7d417b494e4fef7451cf0e3d9b/scripts/controllers/gitHub.coffee | 1 | 19 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:raw_corpus | raw_corpus | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', '$log', ($scope, $rootScope, $location, service, $log) ->
$scope.searchTerm = ''
$scope.repos = service.repos
$scope.search... | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/controllers/gitHub.coffee | 1 | 24 | ||
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', '$log', ($scope, $rootScope, $location, service, $log) ->
$scope.search... | /*global define*/
define(['controllers/controllers', 'services/gitHub'], function(controllers) {
'use strict';
return controllers.controller('gitHub', [
'$scope',
'$rootScope',
'$location',
'gitHub',
'$log',
function($scope,
$rootScope,
$location,
service,
$log) {
$scop... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/controllers/gitHub.coffee | 1 | 24 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global define*/
define(['controllers/controllers', 'services/gitHub'], function(controllers) {
'use strict';
return controllers.controller('gitHub', [
'$scope',
'$rootScope',
'$location',
'gitHub',
'$log',
function($scope,
$rootSco... | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', '$log', ($scope, $rootScope, $location, service, $log) ->
$scope.searchTerm = ''
$scope.repos = service.repos
$scope.search... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/controllers/gitHub.coffee | 1 | 24 |
CaryLandholt/AngularFun:scripts/controllers/gitHub.coffee:1:completion | completion | ###global define###
define ['controllers/controllers', 'services/gitHub'], (controllers) ->
'use strict'
controllers.controller 'gitHub', ['$scope', '$rootScope', '$location', 'gitHub', '$log', ($scope, $rootScope, $location, service, $log) ->
$scope.searchTerm = ''
$scope.repos = service.repos
$scope.search... | $rootScope.$on 'gitHub$afterRouteChange', (event, currentRoute, priorRoute) ->
$scope.searchTerm = currentRoute.params.searchTerm
service.get $scope.searchTerm, (Resource, getResponseHeaders) ->
return
#$log.info 'gitHub.get success', Resource, getResponseHeaders()
, (obj) ->
return
#$log.erro... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | scripts/controllers/gitHub.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/controllers/gitHub.coffee | 1 | 24 |
oozcitak/xmlbuilder-js:test/guards/builder.coffee:1:raw_corpus | raw_corpus | suite 'begin() Guards:', ->
test 'constructor', ->
err(
() -> xml()
Error
"Root element needs a name."
) | CoffeeScript | oozcitak/xmlbuilder-js | test/guards/builder.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/builder.coffee | 1 | 7 | ||
oozcitak/xmlbuilder-js:test/guards/builder.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
suite 'begin() Guards:', ->
test 'constructor', ->
err(
() -> xml()
Error
"Root element needs a name."
)
``` | suite('begin() Guards:', function() {
return test('constructor', function() {
return err(function() {
return xml();
}, Error, "Root element needs a name.");
});
}); | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | test/guards/builder.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/builder.coffee | 1 | 7 |
oozcitak/xmlbuilder-js:test/guards/builder.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
suite('begin() Guards:', function() {
return test('constructor', function() {
return err(function() {
return xml();
}, Error, "Root element needs a name.");
});
});
``` | suite 'begin() Guards:', ->
test 'constructor', ->
err(
() -> xml()
Error
"Root element needs a name."
) | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | test/guards/builder.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/builder.coffee | 1 | 7 |
oozcitak/xmlbuilder-js:test/guards/builder.coffee:1:completion | completion | suite 'begin() Guards:', ->
test 'constructor', ->
err( | () -> xml()
Error
"Root element needs a name."
) | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/guards/builder.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/builder.coffee | 1 | 7 |
octoblu/meshblu:lib/getPublicKey.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (uuid, callback=_.noop, dependencies={}) ->
return callback new Error('uuid is required for public key lookup') unless uuid?
getDevice = dependencies.getDevice ? require './getDevice'
getDevice uuid, (error, device) =>
return callback new Error(error.error.message) if ... | CoffeeScript | octoblu/meshblu | lib/getPublicKey.coffee | MIT | dabb5d5eea2ceb996456d06ee4c6b76ba66d7023 | 815 | https://github.com/octoblu/meshblu/blob/dabb5d5eea2ceb996456d06ee4c6b76ba66d7023/lib/getPublicKey.coffee | 1 | 12 | ||
octoblu/meshblu:lib/getPublicKey.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (uuid, callback=_.noop, dependencies={}) ->
return callback new Error('uuid is required for public key lookup') unless uuid?
getDevice = dependencies.getDevice ? require './getDevice'
getDevice uuid, (error, device) ... | var _;
_ = require('lodash');
module.exports = function(uuid, callback = _.noop, dependencies = {}) {
var getDevice, ref;
if (uuid == null) {
return callback(new Error('uuid is required for public key lookup'));
}
getDevice = (ref = dependencies.getDevice) != null ? ref : require('./getDevice');
return ... | CoffeeScript | JavaScript | octoblu/meshblu | lib/getPublicKey.coffee | MIT | dabb5d5eea2ceb996456d06ee4c6b76ba66d7023 | 815 | https://github.com/octoblu/meshblu/blob/dabb5d5eea2ceb996456d06ee4c6b76ba66d7023/lib/getPublicKey.coffee | 1 | 12 |
octoblu/meshblu:lib/getPublicKey.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(uuid, callback = _.noop, dependencies = {}) {
var getDevice, ref;
if (uuid == null) {
return callback(new Error('uuid is required for public key lookup'));
}
getDevice = (ref = dependencies.getDe... | _ = require 'lodash'
module.exports = (uuid, callback=_.noop, dependencies={}) ->
return callback new Error('uuid is required for public key lookup') unless uuid?
getDevice = dependencies.getDevice ? require './getDevice'
getDevice uuid, (error, device) =>
return callback new Error(error.error.message) if ... | JavaScript | CoffeeScript | octoblu/meshblu | lib/getPublicKey.coffee | MIT | dabb5d5eea2ceb996456d06ee4c6b76ba66d7023 | 815 | https://github.com/octoblu/meshblu/blob/dabb5d5eea2ceb996456d06ee4c6b76ba66d7023/lib/getPublicKey.coffee | 1 | 12 |
octoblu/meshblu:lib/getPublicKey.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (uuid, callback=_.noop, dependencies={}) ->
return callback new Error('uuid is required for public key lookup') unless uuid?
getDevice = dependencies.getDevice ? require './getDevice' | getDevice uuid, (error, device) =>
return callback new Error(error.error.message) if error?
publicKey = device?.publicKey
callback null, (publicKey ? null) | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/getPublicKey.coffee | MIT | dabb5d5eea2ceb996456d06ee4c6b76ba66d7023 | 815 | https://github.com/octoblu/meshblu/blob/dabb5d5eea2ceb996456d06ee4c6b76ba66d7023/lib/getPublicKey.coffee | 1 | 12 |
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:1:raw_corpus | raw_corpus | module.exports = React.createClass
displayName: 'group-card'
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
group: T.instanceOf(Immutable.Map).isRequired
groups: T.instanceOf(Immutable.List).isRequired
contacts: T.instanceOf(Immutable.List).isRequired
getInitialState: -... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 29 | 78 | ||
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = React.createClass
displayName: 'group-card'
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
group: T.instanceOf(Immutable.Map).isRequired
groups: T.instanceOf(Immutable.List).isRequired
contacts: T.in... | module.exports = React.createClass({
displayName: 'group-card',
propTypes: {
_teamId: T.string.isRequired,
_userId: T.string.isRequired,
group: T.instanceOf(Immutable.Map).isRequired,
groups: T.instanceOf(Immutable.List).isRequired,
contacts: T.instanceOf(Immutable.List).isRequired
},
getIni... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 29 | 78 |
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = React.createClass({
displayName: 'group-card',
propTypes: {
_teamId: T.string.isRequired,
_userId: T.string.isRequired,
group: T.instanceOf(Immutable.Map).isRequired,
groups: T.instanceOf(Immutable.List).isRequired,
contacts... | module.exports = React.createClass
displayName: 'group-card'
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
group: T.instanceOf(Immutable.Map).isRequired
groups: T.instanceOf(Immutable.List).isRequired
contacts: T.instanceOf(Immutable.List).isRequired
getInitialState: -... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 29 | 78 |
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:1:completion | completion | module.exports = React.createClass
displayName: 'group-card'
propTypes:
_teamId: T.string.isRequired
_userId: T.string.isRequired
group: T.instanceOf(Immutable.Map).isRequired
groups: T.instanceOf(Immutable.List).isRequired
contacts: T.instanceOf(Immutable.List).isRequired
getInitialState: -... | _teamId: @props._teamId
_userId: @props._userId
group: @props.group
contacts: @props.contacts
renderGroupSettings: ->
GroupSettings
_teamId: @props._teamId
group: @props.group
groups: @props.groups
onReturn: @onGroupDetailsShow
onClose: @onGroupDetailsClose
c... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 29 | 78 |
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:2:raw_corpus | raw_corpus | SlimModal props,
switch modalType
when 'details' then @renderGroupDetails()
when 'settings' then @renderGroupSettings()
renderTitle: ->
div className: 'title flex-horiz',
div className: 'name flex-fill line',
@props.group.get('name')
span className: 'muted', @props.gro... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 79 | 128 | ||
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
SlimModal props,
switch modalType
when 'details' then @renderGroupDetails()
when 'settings' then @renderGroupSettings()
renderTitle: ->
div className: 'title flex-horiz',
div className: 'name flex-fill line',
@props.grou... | var GroupHandlersetClass;
SlimModal(props, (function() {
switch (modalType) {
case 'details':
return this.renderGroupDetails();
case 'settings':
return this.renderGroupSettings();
}
}).call(this));
({
renderTitle: function() {
return div({
className: 'title flex-horiz'
}, div({... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 79 | 128 |
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var GroupHandlersetClass;
SlimModal(props, (function() {
switch (modalType) {
case 'details':
return this.renderGroupDetails();
case 'settings':
return this.renderGroupSettings();
}
}).call(this));
({
renderTitle: function() {
return... | SlimModal props,
switch modalType
when 'details' then @renderGroupDetails()
when 'settings' then @renderGroupSettings()
renderTitle: ->
div className: 'title flex-horiz',
div className: 'name flex-fill line',
@props.group.get('name')
span className: 'muted', @props.gro... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 79 | 128 |
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:2:completion | completion | SlimModal props,
switch modalType
when 'details' then @renderGroupDetails()
when 'settings' then @renderGroupSettings()
renderTitle: ->
div className: 'title flex-horiz',
div className: 'name flex-fill line',
@props.group.get('name')
span className: 'muted', @props.gro... | @renderTitle()
@renderMembers()
@renderGroupModal()
GroupHandlersetClass = React.createClass
displayName: 'group-handlerset'
mixins: [PureRenderMixin]
propTypes:
_teamId: T.string.isRequired
group: T.instanceOf(Immutable.Map).isRequired
getInitialState: ->
showConfirm: false
onCon... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 79 | 128 |
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:3:raw_corpus | raw_corpus | renderConfirm: ->
LightDialog
flexible: true
show: @state.showConfirm
onCloseClick: @onConfirmClose
onConfirm: @onRemoveClick
confirm: l('confirm')
cancel: l('cancel')
content: l('team-group-delete-msg')
render: ->
div className: 'flex-static actions muted line',
... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 129 | 157 | ||
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
renderConfirm: ->
LightDialog
flexible: true
show: @state.showConfirm
onCloseClick: @onConfirmClose
onConfirm: @onRemoveClick
confirm: l('confirm')
cancel: l('cancel')
content: l('team-group-delete-msg')
render: ->... | var GroupEditClass, GroupEditPermission, GroupHandlersetPermission;
({
renderConfirm: function() {
return LightDialog({
flexible: true,
show: this.state.showConfirm,
onCloseClick: this.onConfirmClose,
onConfirm: this.onRemoveClick,
confirm: l('confirm'),
cancel: l('cancel'),
... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 129 | 157 |
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var GroupEditClass, GroupEditPermission, GroupHandlersetPermission;
({
renderConfirm: function() {
return LightDialog({
flexible: true,
show: this.state.showConfirm,
onCloseClick: this.onConfirmClose,
onConfirm: this.onRemoveClick,
... | renderConfirm: ->
LightDialog
flexible: true
show: @state.showConfirm
onCloseClick: @onConfirmClose
onConfirm: @onRemoveClick
confirm: l('confirm')
cancel: l('cancel')
content: l('team-group-delete-msg')
render: ->
div className: 'flex-static actions muted line',
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 129 | 157 |
jianliaoim/talk-os:talk-web/client/app/group-card.coffee:3:completion | completion | renderConfirm: ->
LightDialog
flexible: true
show: @state.showConfirm
onCloseClick: @onConfirmClose
onConfirm: @onRemoveClick
confirm: l('confirm')
cancel: l('cancel')
content: l('team-group-delete-msg')
render: ->
div className: 'flex-static actions muted line',
... | GroupEditClass = React.createClass
displayName: 'group-edit'
mixins: [PureRenderMixin]
propTypes:
_teamId: T.string.isRequired
onEditClick: T.func.isRequired
render: ->
span className: 'button is-link', onClick: @props.onEditClick, l('edit')
GroupHandlersetPermission = React.createFactory Permis... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/group-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/group-card.coffee | 129 | 157 |
jianliaoim/talk-os:talk-web/client/util/codemirror.coffee:1:raw_corpus | raw_corpus | if typeof window isnt 'undefined'
require 'codemirror/addon/display/placeholder'
require 'codemirror/mode/clike/clike'
require 'codemirror/mode/clojure/clojure'
require 'codemirror/mode/coffeescript/coffeescript'
require 'codemirror/mode/commonlisp/commonlisp'
require 'codemirror/mode/css/css'
require 'co... | CoffeeScript | jianliaoim/talk-os | talk-web/client/util/codemirror.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/codemirror.coffee | 1 | 16 | ||
jianliaoim/talk-os:talk-web/client/util/codemirror.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
if typeof window isnt 'undefined'
require 'codemirror/addon/display/placeholder'
require 'codemirror/mode/clike/clike'
require 'codemirror/mode/clojure/clojure'
require 'codemirror/mode/coffeescript/coffeescript'
require 'codemirror/mode/commonlisp/comm... | if (typeof window !== 'undefined') {
require('codemirror/addon/display/placeholder');
require('codemirror/mode/clike/clike');
require('codemirror/mode/clojure/clojure');
require('codemirror/mode/coffeescript/coffeescript');
require('codemirror/mode/commonlisp/commonlisp');
require('codemirror/mode/css/css')... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/util/codemirror.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/codemirror.coffee | 1 | 16 |
jianliaoim/talk-os:talk-web/client/util/codemirror.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
if (typeof window !== 'undefined') {
require('codemirror/addon/display/placeholder');
require('codemirror/mode/clike/clike');
require('codemirror/mode/clojure/clojure');
require('codemirror/mode/coffeescript/coffeescript');
require('codemirror/mode/common... | if typeof window isnt 'undefined'
require 'codemirror/addon/display/placeholder'
require 'codemirror/mode/clike/clike'
require 'codemirror/mode/clojure/clojure'
require 'codemirror/mode/coffeescript/coffeescript'
require 'codemirror/mode/commonlisp/commonlisp'
require 'codemirror/mode/css/css'
require 'co... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/util/codemirror.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/codemirror.coffee | 1 | 16 |
gss/engine:spec/perf.coffee:1:raw_corpus | raw_corpus | remove = (el) ->
el.parentNode.removeChild(el)
stringify = JSON.stringify | CoffeeScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 3 | 6 | ||
gss/engine:spec/perf.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
remove = (el) ->
el.parentNode.removeChild(el)
stringify = JSON.stringify
``` | var remove, stringify;
remove = function(el) {
return el.parentNode.removeChild(el);
};
stringify = JSON.stringify; | CoffeeScript | JavaScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 3 | 6 |
gss/engine:spec/perf.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var remove, stringify;
remove = function(el) {
return el.parentNode.removeChild(el);
};
stringify = JSON.stringify;
``` | remove = (el) ->
el.parentNode.removeChild(el)
stringify = JSON.stringify | JavaScript | CoffeeScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 3 | 6 |
gss/engine:spec/perf.coffee:1:completion | completion | remove = (el) ->
el.parentNode.removeChild(el) | stringify = JSON.stringify | CoffeeScript | CoffeeScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 3 | 6 |
gss/engine:spec/perf.coffee:2:raw_corpus | raw_corpus | stringify = (o) -> o
expect = chai.expect
assert = chai.assert
describe 'Perf', ->
['with worker', 'without worker'].forEach (title, i) ->
describe title, ->
scope = null
engine = null
beforeEach ->
fixtures = document.getElementById 'fixtures'
scope = document.createElement 'd... | CoffeeScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 7 | 56 | ||
gss/engine:spec/perf.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
stringify = (o) -> o
expect = chai.expect
assert = chai.assert
describe 'Perf', ->
['with worker', 'without worker'].forEach (title, i) ->
describe title, ->
scope = null
engine = null
beforeEach ->
fixtures = document.getElement... | var assert, expect, stringify;
stringify = function(o) {
return o;
};
expect = chai.expect;
assert = chai.assert;
describe('Perf', function() {
return ['with worker', 'without worker'].forEach(function(title, i) {
return describe(title, function() {
var engine, scope;
scope = null;
engine ... | CoffeeScript | JavaScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 7 | 56 |
gss/engine:spec/perf.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var assert, expect, stringify;
stringify = function(o) {
return o;
};
expect = chai.expect;
assert = chai.assert;
describe('Perf', function() {
return ['with worker', 'without worker'].forEach(function(title, i) {
return describe(title, function() {
... | stringify = (o) -> o
expect = chai.expect
assert = chai.assert
describe 'Perf', ->
['with worker', 'without worker'].forEach (title, i) ->
describe title, ->
scope = null
engine = null
beforeEach ->
fixtures = document.getElementById 'fixtures'
scope = document.createElement 'd... | JavaScript | CoffeeScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 7 | 56 |
gss/engine:spec/perf.coffee:2:completion | completion | stringify = (o) -> o
expect = chai.expect
assert = chai.assert
describe 'Perf', ->
['with worker', 'without worker'].forEach (title, i) ->
describe title, ->
scope = null
engine = null
beforeEach ->
fixtures = document.getElementById 'fixtures'
scope = document.createElement 'd... | it '100 at once', (done) ->
innerHTML = ""
for i in [0...100]
innerHTML += "<div class='box' id='gen-00" + i + "'>One</div>"
scope.innerHTML = innerHTML
#GSS.console.profile(123)
engine.once 'solve', ->
scope.innerHTML = ""
engine.t... | CoffeeScript | CoffeeScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 7 | 56 |
gss/engine:spec/perf.coffee:3:raw_corpus | raw_corpus | engine.once 'solve', ->
scope.innerHTML = ""
engine.then ->
done()
engine.solve [
['==', ['get', ['.','box'], 'width'], ['get', ['.','box'], 'intrinsic-width']]
]
it '100 serially', (done) ->
scope.innerHTML = ""
... | CoffeeScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 57 | 106 | ||
gss/engine:spec/perf.coffee:3:completion | completion | engine.once 'solve', ->
scope.innerHTML = ""
engine.then ->
done()
engine.solve [
['==', ['get', ['.','box'], 'width'], ['get', ['.','box'], 'intrinsic-width']]
]
it '100 serially', (done) ->
scope.innerHTML = ""
... | #GSS.console.error(count)
if count is 100
engine.removeEventListener 'solve', listener
GSS.console.profileEnd('100 serially')
scope.innerHTML = ""
engine.then ->
done()
else
scope.insertAdjacentHTML 'beforeend'... | CoffeeScript | CoffeeScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 57 | 106 |
gss/engine:spec/perf.coffee:4:raw_corpus | raw_corpus | scope.insertAdjacentHTML 'beforeend', """
<div class='box' id='35346#{count}'>One</div>
"""
GSS.console.profile('100 intrinsics serially')
listener = (e) ->
count++
scope.insertAdjacentHTML 'beforeend', """
<div class='box' id='35346#... | CoffeeScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 107 | 127 | ||
gss/engine:spec/perf.coffee:4:completion | completion | scope.insertAdjacentHTML 'beforeend', """
<div class='box' id='35346#{count}'>One</div>
"""
GSS.console.profile('100 intrinsics serially')
listener = (e) ->
count++
scope.insertAdjacentHTML 'beforeend', """
<div class='box' id='35346#... | engine.removeEventListener 'solve', listener
GSS.console.profileEnd('100 intrinsics serially')
scope.innerHTML = ""
engine.then ->
done()
engine.addEventListener 'solve', listener
engine.solve [
['==', ['get', ['.','box'], 'wi... | CoffeeScript | CoffeeScript | gss/engine | spec/perf.coffee | MIT | be430ea249f8030e11c8e03a8e170dcc8b8cf5fb | 2,854 | https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/spec/perf.coffee | 107 | 127 |
jianliaoim/talk-os:talk-web/client/app/channel-page.coffee:1:raw_corpus | raw_corpus | React = require 'react'
recorder = require 'actions-recorder'
Immutable = require 'immutable'
query = require '../query'
mixinSubscribe = require '../mixin/subscribe'
ChannelBody = React.createFactory require './channel-body'
ChannelHeader = React.createFactory require './channel-header'
LoadingIndicator = React.cre... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/channel-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/channel-page.coffee | 1 | 50 | ||
jianliaoim/talk-os:talk-web/client/app/channel-page.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
React = require 'react'
recorder = require 'actions-recorder'
Immutable = require 'immutable'
query = require '../query'
mixinSubscribe = require '../mixin/subscribe'
ChannelBody = React.createFactory require './channel-body'
ChannelHeader = React.createFactor... | var ChannelBody, ChannelHeader, Immutable, LoadingIndicator, PureRenderMixin, React, T, div, mixinSubscribe, query, recorder;
React = require('react');
recorder = require('actions-recorder');
Immutable = require('immutable');
query = require('../query');
mixinSubscribe = require('../mixin/subscribe');
ChannelBody... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/channel-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/channel-page.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/channel-page.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ChannelBody, ChannelHeader, Immutable, LoadingIndicator, PureRenderMixin, React, T, div, mixinSubscribe, query, recorder;
React = require('react');
recorder = require('actions-recorder');
Immutable = require('immutable');
query = require('../query');
mixin... | React = require 'react'
recorder = require 'actions-recorder'
Immutable = require 'immutable'
query = require '../query'
mixinSubscribe = require '../mixin/subscribe'
ChannelBody = React.createFactory require './channel-body'
ChannelHeader = React.createFactory require './channel-header'
LoadingIndicator = React.cre... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/channel-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/channel-page.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/channel-page.coffee:1:completion | completion | React = require 'react'
recorder = require 'actions-recorder'
Immutable = require 'immutable'
query = require '../query'
mixinSubscribe = require '../mixin/subscribe'
ChannelBody = React.createFactory require './channel-body'
ChannelHeader = React.createFactory require './channel-header'
LoadingIndicator = React.cre... | routerQuery: T.instanceOf(Immutable.Map).isRequired
getInitialState: ->
@getState()
componentDidMount: ->
@subscribe recorder, =>
@setState(@getState())
getState: ->
prefs: query.prefs recorder.getState()
channel: (query.byChannelType @props._channelType) recorder.getState(), @props._team... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/channel-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/channel-page.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/channel-page.coffee:2:raw_corpus | raw_corpus | render: ->
if @state.isLoading
LoadingIndicator()
else if @state.channel and not @state.channel.isEmpty()
div className: 'channel-page flex-space flex-vert',
ChannelHeader
_teamId: @props._teamId
_userId: @props._userId
_channelId: @props._channelId
_c... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/channel-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/channel-page.coffee | 51 | 80 | ||
jianliaoim/talk-os:talk-web/client/app/channel-page.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
render: ->
if @state.isLoading
LoadingIndicator()
else if @state.channel and not @state.channel.isEmpty()
div className: 'channel-page flex-space flex-vert',
ChannelHeader
_teamId: @props._teamId
_userId: @props._us... | ({
render: function() {
if (this.state.isLoading) {
return LoadingIndicator();
} else if (this.state.channel && !this.state.channel.isEmpty()) {
return div({
className: 'channel-page flex-space flex-vert'
}, ChannelHeader({
_teamId: this.props._teamId,
_userId: this.p... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/channel-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/channel-page.coffee | 51 | 80 |
jianliaoim/talk-os:talk-web/client/app/channel-page.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
render: function() {
if (this.state.isLoading) {
return LoadingIndicator();
} else if (this.state.channel && !this.state.channel.isEmpty()) {
return div({
className: 'channel-page flex-space flex-vert'
}, ChannelHeader({
... | render: ->
if @state.isLoading
LoadingIndicator()
else if @state.channel and not @state.channel.isEmpty()
div className: 'channel-page flex-space flex-vert',
ChannelHeader
_teamId: @props._teamId
_userId: @props._userId
_channelId: @props._channelId
_c... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/channel-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/channel-page.coffee | 51 | 80 |
jianliaoim/talk-os:talk-web/client/app/channel-page.coffee:2:completion | completion | render: ->
if @state.isLoading
LoadingIndicator()
else if @state.channel and not @state.channel.isEmpty()
div className: 'channel-page flex-space flex-vert',
ChannelHeader
_teamId: @props._teamId
_userId: @props._userId
_channelId: @props._channelId
_c... | notification: @state.notification
ChannelBody
_teamId: @props._teamId
_userId: @props._userId
_channelId: @props._channelId
_channelType: @props._channelType
routerQuery: @props.routerQuery
channel: @state.channel
contacts: @state.contacts
... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/channel-page.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/channel-page.coffee | 51 | 80 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:1:raw_corpus | raw_corpus | updateLine = (message) ->
return if not process.stdout.isTTY
process.stdout.clearLine()
process.stdout.cursorTo 0
process.stdout.write message | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 9 | 13 | ||
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
updateLine = (message) ->
return if not process.stdout.isTTY
process.stdout.clearLine()
process.stdout.cursorTo 0
process.stdout.write message
``` | var updateLine;
updateLine = function(message) {
if (!process.stdout.isTTY) {
return;
}
process.stdout.clearLine();
process.stdout.cursorTo(0);
return process.stdout.write(message);
}; | CoffeeScript | JavaScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 9 | 13 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var updateLine;
updateLine = function(message) {
if (!process.stdout.isTTY) {
return;
}
process.stdout.clearLine();
process.stdout.cursorTo(0);
return process.stdout.write(message);
};
``` | updateLine = (message) ->
return if not process.stdout.isTTY
process.stdout.clearLine()
process.stdout.cursorTo 0
process.stdout.write message | JavaScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 9 | 13 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:1:completion | completion | updateLine = (message) ->
return if not process.stdout.isTTY | process.stdout.clearLine()
process.stdout.cursorTo 0
process.stdout.write message | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 9 | 13 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:2:raw_corpus | raw_corpus | create_progress_counter = ->
i = 0
return ->
i += 1
# assume we wrote anything between calls, it left a newline so either way
# our current line is blank
updateLine("#{i+1}|") | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 15 | 21 | ||
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
create_progress_counter = ->
i = 0
return ->
i += 1
# assume we wrote anything between calls, it left a newline so either way
# our current line is blank
updateLine("#{i+1}|")
``` | var create_progress_counter;
create_progress_counter = function() {
var i;
i = 0;
return function() {
i += 1;
// assume we wrote anything between calls, it left a newline so either way
// our current line is blank
return updateLine(`${i + 1}|`);
};
}; | CoffeeScript | JavaScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 15 | 21 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var create_progress_counter;
create_progress_counter = function() {
var i;
i = 0;
return function() {
i += 1;
// assume we wrote anything between calls, it left a newline so either way
// our current line is blank
return updateLine(`${i + 1}|... | create_progress_counter = ->
i = 0
return ->
i += 1
# assume we wrote anything between calls, it left a newline so either way
# our current line is blank
updateLine("#{i+1}|") | JavaScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 15 | 21 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:2:completion | completion | create_progress_counter = ->
i = 0
return -> | i += 1
# assume we wrote anything between calls, it left a newline so either way
# our current line is blank
updateLine("#{i+1}|") | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 15 | 21 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:3:raw_corpus | raw_corpus | clear_show_progress_line = ->
return if not process.stdout.isTTY
updateLine("")
##
StreamObject = require 'stream-json/utils/StreamObject'
inputStream = fs.createReadStream('/dev/stdin')
parser = StreamObject.make()
inputStream.pipe(parser.input)
##
compile = require '../compiler-blob-builder/compile'
##
... | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 23 | 42 | ||
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
clear_show_progress_line = ->
return if not process.stdout.isTTY
updateLine("")
##
StreamObject = require 'stream-json/utils/StreamObject'
inputStream = fs.createReadStream('/dev/stdin')
parser = StreamObject.make()
inputStream.pipe(parser.input)
##
c... | var StreamObject, clear_show_progress_line, compile, config, inputStream, parser;
clear_show_progress_line = function() {
if (!process.stdout.isTTY) {
return;
}
return updateLine("");
};
//#
StreamObject = require('stream-json/utils/StreamObject');
inputStream = fs.createReadStream('/dev/stdin');
parser =... | CoffeeScript | JavaScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 23 | 42 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var StreamObject, clear_show_progress_line, compile, config, inputStream, parser;
clear_show_progress_line = function() {
if (!process.stdout.isTTY) {
return;
}
return updateLine("");
};
//#
StreamObject = require('stream-json/utils/StreamObject');
inp... | clear_show_progress_line = ->
return if not process.stdout.isTTY
updateLine("")
##
StreamObject = require 'stream-json/utils/StreamObject'
inputStream = fs.createReadStream('/dev/stdin')
parser = StreamObject.make()
inputStream.pipe(parser.input)
##
compile = require '../compiler-blob-builder/compile'
##
... | JavaScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 23 | 42 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:3:completion | completion | clear_show_progress_line = ->
return if not process.stdout.isTTY
updateLine("")
##
StreamObject = require 'stream-json/utils/StreamObject'
inputStream = fs.createReadStream('/dev/stdin')
parser = StreamObject.make()
inputStream.pipe(parser.input) | ##
compile = require '../compiler-blob-builder/compile'
##
config = require '../src/config'
## | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 23 | 42 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:4:raw_corpus | raw_corpus | safe_compile = (docjson) ->
failures = []
# turn on asserts
[config.asserts, asserts_default] = [true, config.asserts]
config.assertHandler = (failed_assertion) ->
assert_expr = failed_assertion.toString().trim()
assert_expr = match[1] if (match = assert_expr.match(/function \(\) \{\s*r... | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 44 | 67 | ||
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
safe_compile = (docjson) ->
failures = []
# turn on asserts
[config.asserts, asserts_default] = [true, config.asserts]
config.assertHandler = (failed_assertion) ->
assert_expr = failed_assertion.toString().trim()
assert_expr = mat... | var safe_compile;
safe_compile = function(docjson) {
var asserts_default, e, failures, files;
failures = [];
// turn on asserts
[config.asserts, asserts_default] = [true, config.asserts];
config.assertHandler = function(failed_assertion) {
var assert_expr, error, match;
assert_expr = failed_assertion... | CoffeeScript | JavaScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 44 | 67 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var safe_compile;
safe_compile = function(docjson) {
var asserts_default, e, failures, files;
failures = [];
// turn on asserts
[config.asserts, asserts_default] = [true, config.asserts];
config.assertHandler = function(failed_assertion) {
var assert... | safe_compile = (docjson) ->
failures = []
# turn on asserts
[config.asserts, asserts_default] = [true, config.asserts]
config.assertHandler = (failed_assertion) ->
assert_expr = failed_assertion.toString().trim()
assert_expr = match[1] if (match = assert_expr.match(/function \(\) \{\s*r... | JavaScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 44 | 67 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:4:completion | completion | safe_compile = (docjson) ->
failures = []
# turn on asserts
[config.asserts, asserts_default] = [true, config.asserts]
config.assertHandler = (failed_assertion) ->
assert_expr = failed_assertion.toString().trim()
assert_expr = match[1] if (match = assert_expr.match(/function \(\) \{\s*r... | # do a compile
try
files = compile(docjson)
catch e
failures.push(e)
files = {}
# turn off asserts
config.asserts = asserts_default
# report back the results and a list of errors
return {files, failures} | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 44 | 67 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:5:raw_corpus | raw_corpus | print_failure = (error) ->
# try to pretty up the stack a bit
trace = error.stack.split('\n').map((line) -> line.trim())
assertCallIndex = _l.findLastIndex trace, (line) -> line.startsWith('at assert')
if assertCallIndex == -1
# if it's not an assert failure, it's an exception; just use the fir... | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 69 | 106 | ||
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
print_failure = (error) ->
# try to pretty up the stack a bit
trace = error.stack.split('\n').map((line) -> line.trim())
assertCallIndex = _l.findLastIndex trace, (line) -> line.startsWith('at assert')
if assertCallIndex == -1
# if it's n... | var at_least_one_doc_has_failed, bump_progress_counter, print_failure;
print_failure = function(error) {
var assertCallIndex, error_name, line, trace;
// try to pretty up the stack a bit
trace = error.stack.split('\n').map(function(line) {
return line.trim();
});
assertCallIndex = _l.findLastIndex(trace,... | CoffeeScript | JavaScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 69 | 106 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var at_least_one_doc_has_failed, bump_progress_counter, print_failure;
print_failure = function(error) {
var assertCallIndex, error_name, line, trace;
// try to pretty up the stack a bit
trace = error.stack.split('\n').map(function(line) {
return line.tr... | print_failure = (error) ->
# try to pretty up the stack a bit
trace = error.stack.split('\n').map((line) -> line.trim())
assertCallIndex = _l.findLastIndex trace, (line) -> line.startsWith('at assert')
if assertCallIndex == -1
# if it's not an assert failure, it's an exception; just use the fir... | JavaScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 69 | 106 |
Pagedraw/pagedraw:e2e-tests/compile-docset-statistics.coffee:5:completion | completion | print_failure = (error) ->
# try to pretty up the stack a bit
trace = error.stack.split('\n').map((line) -> line.trim())
assertCallIndex = _l.findLastIndex trace, (line) -> line.startsWith('at assert')
if assertCallIndex == -1
# if it's not an assert failure, it's an exception; just use the fir... | parser.output.on 'data', ({key, value}) =>
[docid, docjson] = [key, JSON.parse(value)]
{files, failures} = safe_compile(docjson)
if not _l.isEmpty(failures)
clear_show_progress_line()
console.log "[compiling #{docid}]"
print_failure(failure) for failure in failures
at_least... | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | e2e-tests/compile-docset-statistics.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/e2e-tests/compile-docset-statistics.coffee | 69 | 106 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/header/headerWidget.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/widgets/header/headerWidget.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/header/headerWidget.coffee | 1 | 50 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/header/headerWidget.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/widgets/header/headerWidget.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/header/headerWidget.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/header/headerWidget.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/widgets/header/headerWidget.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/header/headerWidget.coffee | 1 | 50 |
ExpediaGroup/cyclotron:cyclotron-site/app/widgets/header/headerWidget.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 ... | # Load user-specified format if defined
if $scope.headerTitle.showTitle == true
$scope.showTitle = true
$scope.title = _.jsExec($scope.widget.title) || _.jsExec($scope.dashboard.displayName) || $scope.dashboard.name
$scope.pageNameSeparator ?= ''
if $scope.widget.customHtml?
$s... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/widgets/header/headerWidget.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/widgets/header/headerWidget.coffee | 1 | 50 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.