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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CaryLandholt/AngularFun:src/scripts/main.coffee:2:raw_corpus | raw_corpus | .otherwise
redirectTo: '/github/CaryLandholt'
]
app.run ['$rootScope', '$log', ($rootScope, $log) ->
$rootScope.$on 'error:unauthorized', (event, response) ->
#$log.error 'unauthorized'
$rootScope.$on 'error:forbidden', (event, response) ->
#$log.error 'forbidden'
$rootScope.$on 'error:403',... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 6d23f0be02cb2e938565aca7cb881fd70beefb35 | 672 | https://github.com/CaryLandholt/AngularFun/blob/6d23f0be02cb2e938565aca7cb881fd70beefb35/src/scripts/main.coffee | 51 | 71 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:2:completion | completion | .otherwise
redirectTo: '/github/CaryLandholt'
]
app.run ['$rootScope', '$log', ($rootScope, $log) ->
$rootScope.$on 'error:unauthorized', (event, response) ->
#$log.error 'unauthorized'
$rootScope.$on 'error:forbidden', (event, response) ->
#$log.error 'forbidden' | $rootScope.$on 'error:403', (event, response) ->
#$log.error '403'
$rootScope.$on 'success:ok', (event, response) ->
#$log.info 'success'
# fire an event related to the current route
$rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) ->
$rootScope.$broadcast "#{currentRoute.c... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 6d23f0be02cb2e938565aca7cb881fd70beefb35 | 672 | https://github.com/CaryLandholt/AngularFun/blob/6d23f0be02cb2e938565aca7cb881fd70beefb35/src/scripts/main.coffee | 51 | 71 |
CaryLandholt/AngularFun:src/scripts/main.coffee:1:raw_corpus | raw_corpus | ###global define, require###
requirejs
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
exports: 'angular'
'libs/angularResource':
deps: [
'libs/angular'
]
[
'app'
'bootstrap'
'controllers/gitHub'
'controllers/people'
'controllers/personDetails'
'cont... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | ef89d88db74ac2ad472771051cee14de5e6838dd | 672 | https://github.com/CaryLandholt/AngularFun/blob/ef89d88db74ac2ad472771051cee14de5e6838dd/src/scripts/main.coffee | 1 | 50 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:1:completion | completion | ###global define, require###
requirejs
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
exports: 'angular'
'libs/angularResource':
deps: [
'libs/angular'
]
[
'app'
'bootstrap'
'controllers/gitHub'
'controllers/people'
'controllers/personDetails'
'cont... | 'responseInterceptors/dispatcher'
], (app) ->
app.config ['$routeProvider', ($routeProvider) ->
$routeProvider
.when '/github/:searchTerm'
controller: 'gitHub'
reloadOnSearch: true
resolve:
changeTab: ['$rootScope', ($rootScope) ->
$rootScope.$broadcast 'changeTab#gitHub'
]
.when... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | ef89d88db74ac2ad472771051cee14de5e6838dd | 672 | https://github.com/CaryLandholt/AngularFun/blob/ef89d88db74ac2ad472771051cee14de5e6838dd/src/scripts/main.coffee | 1 | 50 |
CaryLandholt/AngularFun:src/scripts/main.coffee:1:raw_corpus | raw_corpus | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
exports: 'angular'
'libs/angular-resource':
deps: [
'libs/angular'
]
[
'app'
'bootstrap'
'controllers/gitHub'
'controllers/people'
'controllers/personDetails'
'contr... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 5047648d6a25e0e7d5e4939e3dbed5eb812c043b | 672 | https://github.com/CaryLandholt/AngularFun/blob/5047648d6a25e0e7d5e4939e3dbed5eb812c043b/src/scripts/main.coffee | 1 | 50 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:1:completion | completion | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
exports: 'angular'
'libs/angular-resource':
deps: [
'libs/angular'
]
[
'app'
'bootstrap'
'controllers/gitHub'
'controllers/people'
'controllers/personDetails'
'contr... | 'responseInterceptors/dispatcher'
], (app) ->
app.config ['$routeProvider', ($routeProvider) ->
$routeProvider
.when '/github/:searchTerm'
controller: 'gitHub'
reloadOnSearch: true
resolve:
changeTab: ['$rootScope', ($rootScope) ->
$rootScope.$broadcast 'changeTab#gitHub'
]
.when... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 5047648d6a25e0e7d5e4939e3dbed5eb812c043b | 672 | https://github.com/CaryLandholt/AngularFun/blob/5047648d6a25e0e7d5e4939e3dbed5eb812c043b/src/scripts/main.coffee | 1 | 50 |
CaryLandholt/AngularFun:src/scripts/main.coffee:1:raw_corpus | raw_corpus | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
exports: 'angular'
'libs/angular-resource':
deps: [
'libs/angular'
]
[
'app'
'bootstrap'
'controllers/gitHub'
'controllers/people'
'controllers/personDetails'
'contr... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 83f11ba52970aa46e3d85f6dfad9ae495fd52e50 | 672 | https://github.com/CaryLandholt/AngularFun/blob/83f11ba52970aa46e3d85f6dfad9ae495fd52e50/src/scripts/main.coffee | 1 | 50 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:1:completion | completion | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
exports: 'angular'
'libs/angular-resource':
deps: [
'libs/angular'
]
[
'app'
'bootstrap'
'controllers/gitHub'
'controllers/people'
'controllers/personDetails'
'contr... | 'responseInterceptors/dispatcher'
], (app) ->
app.config ['$routeProvider', ($routeProvider) ->
$routeProvider
.when '/github/:searchTerm'
controller: 'gitHub'
reloadOnSearch: true
resolve:
changeTab: ($rootScope) ->
$rootScope.$broadcast 'changeTab#gitHub'
.when '/people/:id'
con... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 83f11ba52970aa46e3d85f6dfad9ae495fd52e50 | 672 | https://github.com/CaryLandholt/AngularFun/blob/83f11ba52970aa46e3d85f6dfad9ae495fd52e50/src/scripts/main.coffee | 1 | 50 |
CaryLandholt/AngularFun:src/scripts/main.coffee:2:raw_corpus | raw_corpus | app.run ['$rootScope', '$log', ($rootScope, $log) ->
$rootScope.$on 'error:unauthorized', (event, response) ->
#$log.error 'unauthorized'
$rootScope.$on 'error:forbidden', (event, response) ->
#$log.error 'forbidden'
$rootScope.$on 'error:403', (event, response) ->
#$log.error '403'
$rootScop... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 83f11ba52970aa46e3d85f6dfad9ae495fd52e50 | 672 | https://github.com/CaryLandholt/AngularFun/blob/83f11ba52970aa46e3d85f6dfad9ae495fd52e50/src/scripts/main.coffee | 51 | 68 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
app.run ['$rootScope', '$log', ($rootScope, $log) ->
$rootScope.$on 'error:unauthorized', (event, response) ->
#$log.error 'unauthorized'
$rootScope.$on 'error:forbidden', (event, response) ->
#$log.error 'forbidden'
$rootScope.$on 'error:403',... | app.run([
'$rootScope',
'$log',
function($rootScope,
$log) {
$rootScope.$on('error:unauthorized',
function(event,
response) {});
//$log.error 'unauthorized'
$rootScope.$on('error:forbidden',
function(event,
response) {});
//$log.error 'forbidden'
$rootScope.$on('error:403',
functio... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 83f11ba52970aa46e3d85f6dfad9ae495fd52e50 | 672 | https://github.com/CaryLandholt/AngularFun/blob/83f11ba52970aa46e3d85f6dfad9ae495fd52e50/src/scripts/main.coffee | 51 | 68 |
CaryLandholt/AngularFun:src/scripts/main.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
app.run([
'$rootScope',
'$log',
function($rootScope,
$log) {
$rootScope.$on('error:unauthorized',
function(event,
response) {});
//$log.error 'unauthorized'
$rootScope.$on('error:forbidden',
function(event,
response) {});
//$log.erro... | app.run ['$rootScope', '$log', ($rootScope, $log) ->
$rootScope.$on 'error:unauthorized', (event, response) ->
#$log.error 'unauthorized'
$rootScope.$on 'error:forbidden', (event, response) ->
#$log.error 'forbidden'
$rootScope.$on 'error:403', (event, response) ->
#$log.error '403'
$rootScop... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 83f11ba52970aa46e3d85f6dfad9ae495fd52e50 | 672 | https://github.com/CaryLandholt/AngularFun/blob/83f11ba52970aa46e3d85f6dfad9ae495fd52e50/src/scripts/main.coffee | 51 | 68 |
CaryLandholt/AngularFun:src/scripts/main.coffee:2:completion | completion | app.run ['$rootScope', '$log', ($rootScope, $log) ->
$rootScope.$on 'error:unauthorized', (event, response) ->
#$log.error 'unauthorized'
$rootScope.$on 'error:forbidden', (event, response) ->
#$log.error 'forbidden'
$rootScope.$on 'error:403', (event, response) -> | #$log.error '403'
$rootScope.$on 'success:ok', (event, response) ->
#$log.info 'success'
# fire an event related to the current route
$rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) ->
$rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRo... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 83f11ba52970aa46e3d85f6dfad9ae495fd52e50 | 672 | https://github.com/CaryLandholt/AngularFun/blob/83f11ba52970aa46e3d85f6dfad9ae495fd52e50/src/scripts/main.coffee | 51 | 68 |
CaryLandholt/AngularFun:src/scripts/main.coffee:1:raw_corpus | raw_corpus | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
exports: 'angular'
'libs/angular-resource':
deps: [
'libs/angular'
]
[
'app'
'bootstrap'
'controllers/gitHub'
'controllers/people'
'controllers/personDetails'
'contr... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 7d4f2ab3dbad18bbb02c2804f71447834e30edef | 672 | https://github.com/CaryLandholt/AngularFun/blob/7d4f2ab3dbad18bbb02c2804f71447834e30edef/src/scripts/main.coffee | 1 | 50 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:1:completion | completion | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
exports: 'angular'
'libs/angular-resource':
deps: [
'libs/angular'
]
[
'app'
'bootstrap'
'controllers/gitHub'
'controllers/people'
'controllers/personDetails'
'contr... | 'responseInterceptors/dispatcher'
], (app) ->
app.config ['$routeProvider', ($routeProvider) ->
$routeProvider
.when '/github/:searchTerm'
controller: 'gitHub'
reloadOnSearch: true
resolve:
changeTab: ($rootScope) ->
$rootScope.$broadcast 'changeTab#gitHub'
.when '/people/details/:id'... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 7d4f2ab3dbad18bbb02c2804f71447834e30edef | 672 | https://github.com/CaryLandholt/AngularFun/blob/7d4f2ab3dbad18bbb02c2804f71447834e30edef/src/scripts/main.coffee | 1 | 50 |
CaryLandholt/AngularFun:src/scripts/main.coffee:1:raw_corpus | raw_corpus | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
exports: 'angular'
'libs/angular-resource': ['libs/angular']
[
'app'
'bootstrap'
'controllers/gitHub'
'controllers/people'
'controllers/personDetails'
'controllers/searchHisto... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 61809b666e1417494a191ce9e486c510a393c08c | 672 | https://github.com/CaryLandholt/AngularFun/blob/61809b666e1417494a191ce9e486c510a393c08c/src/scripts/main.coffee | 1 | 50 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:1:completion | completion | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
exports: 'angular'
'libs/angular-resource': ['libs/angular']
[
'app'
'bootstrap'
'controllers/gitHub'
'controllers/people'
'controllers/personDetails'
'controllers/searchHisto... | $routeProvider
.when '/github/:searchTerm'
controller: 'gitHub'
reloadOnSearch: true
resolve:
changeTab: ($rootScope) ->
$rootScope.$broadcast 'changeTab#gitHub'
.when '/people/details/:id'
controller: 'personDetails'
reloadOnSearch: true
resolve:
changeTab: ($rootScope) ->... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 61809b666e1417494a191ce9e486c510a393c08c | 672 | https://github.com/CaryLandholt/AngularFun/blob/61809b666e1417494a191ce9e486c510a393c08c/src/scripts/main.coffee | 1 | 50 |
CaryLandholt/AngularFun:src/scripts/main.coffee:2:raw_corpus | raw_corpus | #$log.error 'unauthorized'
$rootScope.$on 'error:forbidden', (event, response) ->
#$log.error 'forbidden'
$rootScope.$on 'error:403', (event, response) ->
#$log.error '403'
$rootScope.$on 'success:ok', (event, response) ->
#$log.info 'success'
# fire an event related to the current route
... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 61809b666e1417494a191ce9e486c510a393c08c | 672 | https://github.com/CaryLandholt/AngularFun/blob/61809b666e1417494a191ce9e486c510a393c08c/src/scripts/main.coffee | 51 | 65 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:2:completion | completion | #$log.error 'unauthorized'
$rootScope.$on 'error:forbidden', (event, response) ->
#$log.error 'forbidden'
$rootScope.$on 'error:403', (event, response) ->
#$log.error '403' | $rootScope.$on 'success:ok', (event, response) ->
#$log.info 'success'
# fire an event related to the current route
$rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) ->
$rootScope.$broadcast "#{currentRoute.controller}$routeChangeSuccess", currentRoute, priorRoute
] | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 61809b666e1417494a191ce9e486c510a393c08c | 672 | https://github.com/CaryLandholt/AngularFun/blob/61809b666e1417494a191ce9e486c510a393c08c/src/scripts/main.coffee | 51 | 65 |
CaryLandholt/AngularFun:src/scripts/main.coffee:1:raw_corpus | raw_corpus | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
deps: ['libs/modernizr']
exports: 'angular'
'libs/angular-resource': ['libs/angular']
'libs/modernizr':
exports: 'Modernizr'
[
'app'
'bootstrap'
'controllers/gitHub'
'cont... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | faddec7545b831388cab6ad9dfedb99aa6f32a2c | 672 | https://github.com/CaryLandholt/AngularFun/blob/faddec7545b831388cab6ad9dfedb99aa6f32a2c/src/scripts/main.coffee | 1 | 50 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:1:completion | completion | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
deps: ['libs/modernizr']
exports: 'angular'
'libs/angular-resource': ['libs/angular']
'libs/modernizr':
exports: 'Modernizr'
[
'app'
'bootstrap'
'controllers/gitHub'
'cont... | 'responseInterceptors/dispatcher'
], (app) ->
app.config ['$routeProvider', ($routeProvider) ->
$routeProvider
.when '/github/:searchTerm'
controller: 'gitHub'
reloadOnSearch: true
resolve:
changeTab: ($rootScope) ->
$rootScope.$broadcast 'changeTab#gitHub'
.when '/people/details/:id'... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | faddec7545b831388cab6ad9dfedb99aa6f32a2c | 672 | https://github.com/CaryLandholt/AngularFun/blob/faddec7545b831388cab6ad9dfedb99aa6f32a2c/src/scripts/main.coffee | 1 | 50 |
CaryLandholt/AngularFun:src/scripts/main.coffee:1:raw_corpus | raw_corpus | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
deps: ['libs/modernizr']
exports: 'angular'
'libs/angular-resource': ['libs/angular']
'libs/modernizr':
exports: 'Modernizr'
[
'app'
'bootstrap'
'controllers/gitHub'
'cont... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 5766dbc32d28c146e47929ff36d582aba43fdf0a | 672 | https://github.com/CaryLandholt/AngularFun/blob/5766dbc32d28c146e47929ff36d582aba43fdf0a/src/scripts/main.coffee | 1 | 50 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:1:completion | completion | ###global define, require###
require
map:
'*':
'libs/angularResource': 'libs/angular-resource'
shim:
'libs/angular':
deps: ['libs/modernizr']
exports: 'angular'
'libs/angular-resource': ['libs/angular']
'libs/modernizr':
exports: 'Modernizr'
[
'app'
'bootstrap'
'controllers/gitHub'
'cont... | 'libs/angular'
'responseInterceptors/dispatcher'
], (app) ->
app.config ['$routeProvider', ($routeProvider) ->
$routeProvider
.when '/github/:searchTerm'
controller: 'gitHub'
reloadOnSearch: true
resolve:
changeTab: ($rootScope) ->
$rootScope.$broadcast 'changeTab#gitHub'
.when '/pe... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 5766dbc32d28c146e47929ff36d582aba43fdf0a | 672 | https://github.com/CaryLandholt/AngularFun/blob/5766dbc32d28c146e47929ff36d582aba43fdf0a/src/scripts/main.coffee | 1 | 50 |
CaryLandholt/AngularFun:src/scripts/main.coffee:2:raw_corpus | raw_corpus | ]
app.run ['$rootScope', '$log', ($rootScope, $log) ->
$rootScope.$on 'error:unauthorized', (event, response) ->
#$log.error 'unauthorized'
$rootScope.$on 'error:forbidden', (event, response) ->
#$log.error 'forbidden'
$rootScope.$on 'error:403', (event, response) ->
#$log.error '403'
$roo... | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 5766dbc32d28c146e47929ff36d582aba43fdf0a | 672 | https://github.com/CaryLandholt/AngularFun/blob/5766dbc32d28c146e47929ff36d582aba43fdf0a/src/scripts/main.coffee | 51 | 69 | ||
CaryLandholt/AngularFun:src/scripts/main.coffee:2:completion | completion | ]
app.run ['$rootScope', '$log', ($rootScope, $log) ->
$rootScope.$on 'error:unauthorized', (event, response) ->
#$log.error 'unauthorized'
$rootScope.$on 'error:forbidden', (event, response) ->
#$log.error 'forbidden' | $rootScope.$on 'error:403', (event, response) ->
#$log.error '403'
$rootScope.$on 'success:ok', (event, response) ->
#$log.info 'success'
# fire an event related to the current route
$rootScope.$on '$routeChangeSuccess', (event, currentRoute, priorRoute) ->
$rootScope.$broadcast "#{currentRoute.c... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | src/scripts/main.coffee | MIT | 5766dbc32d28c146e47929ff36d582aba43fdf0a | 672 | https://github.com/CaryLandholt/AngularFun/blob/5766dbc32d28c146e47929ff36d582aba43fdf0a/src/scripts/main.coffee | 51 | 69 |
jianliaoim/talk-os:talk-api2x/server/schemas/group.coffee:1:raw_corpus | raw_corpus | ###
Indexes:
* db.groups.ensureIndex({team: 1}, {background: true})
###
{Schema} = require 'mongoose'
_ = require 'lodash'
module.exports = GroupSchema = new Schema
creator: type: Schema.Types.ObjectId, ref: 'User'
team: type: Schema.Types.ObjectId, ref: 'Team'
name: type: String
members: [
type: Schema.T... | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/schemas/group.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/group.coffee | 1 | 42 | ||
jianliaoim/talk-os:talk-api2x/server/schemas/group.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Indexes:
* db.groups.ensureIndex({team: 1}, {background: true})
###
{Schema} = require 'mongoose'
_ = require 'lodash'
module.exports = GroupSchema = new Schema
creator: type: Schema.Types.ObjectId, ref: 'User'
team: type: Schema.Types.ObjectId, ref: 'T... | /*
Indexes:
* db.groups.ensureIndex({team: 1}, {background: true})
*/
var GroupSchema, Schema, _;
({Schema} = require('mongoose'));
_ = require('lodash');
module.exports = GroupSchema = new Schema({
creator: {
type: Schema.Types.ObjectId,
ref: 'User'
},
team: {
type: Schema.Types.ObjectId,
ref... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/server/schemas/group.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/group.coffee | 1 | 42 |
jianliaoim/talk-os:talk-api2x/server/schemas/group.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Indexes:
* db.groups.ensureIndex({team: 1}, {background: true})
*/
var GroupSchema, Schema, _;
({Schema} = require('mongoose'));
_ = require('lodash');
module.exports = GroupSchema = new Schema({
creator: {
type: Schema.Types.ObjectId,
ref: 'User'
... | ###
Indexes:
* db.groups.ensureIndex({team: 1}, {background: true})
###
{Schema} = require 'mongoose'
_ = require 'lodash'
module.exports = GroupSchema = new Schema
creator: type: Schema.Types.ObjectId, ref: 'User'
team: type: Schema.Types.ObjectId, ref: 'Team'
name: type: String
members: [
type: Schema.T... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/schemas/group.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/group.coffee | 1 | 42 |
jianliaoim/talk-os:talk-api2x/server/schemas/group.coffee:1:completion | completion | ###
Indexes:
* db.groups.ensureIndex({team: 1}, {background: true})
###
{Schema} = require 'mongoose'
_ = require 'lodash'
module.exports = GroupSchema = new Schema
creator: type: Schema.Types.ObjectId, ref: 'User'
team: type: Schema.Types.ObjectId, ref: 'Team'
name: type: String
members: [
type: Schema.T... | getters: true
toJSON:
virtuals: true
getters: true
# ============================== Virtuals ==============================
GroupSchema.virtual '_teamId'
.get -> @team?._id or @team
.set (_id) -> @team = _id
GroupSchema.virtual '_creatorId'
.get -> @creator?._id or @creator
.set (_id) -> @creator = ... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/schemas/group.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/group.coffee | 1 | 42 |
jianliaoim/talk-os:talk-web/client/app/file-queue-collection.coffee:1:raw_corpus | raw_corpus | React = require 'react'
assign = require 'object-assign'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
div = React.createFactory 'div'
searchActions = require '../actions/search'
mixinFileQueue = require '../mixin/file-queue'
mixinSubscribe = require '../mixin/subscribe'
... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/file-queue-collection.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/file-queue-collection.coffee | 1 | 50 | ||
jianliaoim/talk-os:talk-web/client/app/file-queue-collection.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
React = require 'react'
assign = require 'object-assign'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
div = React.createFactory 'div'
searchActions = require '../actions/search'
mixinFileQueue = require '../mixin/f... | var Immutable, PureRenderMixin, React, T, assign, div, mixinFileQueue, mixinSubscribe, searchActions;
React = require('react');
assign = require('object-assign');
Immutable = require('immutable');
PureRenderMixin = require('react-addons-pure-render-mixin');
div = React.createFactory('div');
searchActions = requir... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/file-queue-collection.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/file-queue-collection.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/file-queue-collection.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Immutable, PureRenderMixin, React, T, assign, div, mixinFileQueue, mixinSubscribe, searchActions;
React = require('react');
assign = require('object-assign');
Immutable = require('immutable');
PureRenderMixin = require('react-addons-pure-render-mixin');
di... | React = require 'react'
assign = require 'object-assign'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
div = React.createFactory 'div'
searchActions = require '../actions/search'
mixinFileQueue = require '../mixin/file-queue'
mixinSubscribe = require '../mixin/subscribe'
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/file-queue-collection.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/file-queue-collection.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/app/file-queue-collection.coffee:1:completion | completion | React = require 'react'
assign = require 'object-assign'
Immutable = require 'immutable'
PureRenderMixin = require 'react-addons-pure-render-mixin'
div = React.createFactory 'div'
searchActions = require '../actions/search'
mixinFileQueue = require '../mixin/file-queue'
mixinSubscribe = require '../mixin/subscribe'
... | isFavorite: T.bool
getDefaultProps: ->
isFavorite: false
getInitialState: ->
if @props.query?.page
initPage = @props.query.page - 1
page: initPage or 1
requestBefore: (success) ->
success Immutable.List()
requestAfter: (success) ->
if @props.query?
data = assign {}, @props.qu... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/file-queue-collection.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/file-queue-collection.coffee | 1 | 50 |
mojotech/pioneer:src/support/logger.coffee:1:raw_corpus | raw_corpus | log = console.log
write = process.stdout.write
LEVEL = process.env.LOG_LEVEL?.toLowerCase() || 'none'
LEVELS = ['none', 'error', 'warn', 'info']
logging = (level) ->
LEVELS.indexOf(LEVEL) >= LEVELS.indexOf(level)
module.exports =
info: (messages...) ->
log messages.join(' ') if logging('info')
wa... | CoffeeScript | mojotech/pioneer | src/support/logger.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/logger.coffee | 1 | 27 | ||
mojotech/pioneer:src/support/logger.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
log = console.log
write = process.stdout.write
LEVEL = process.env.LOG_LEVEL?.toLowerCase() || 'none'
LEVELS = ['none', 'error', 'warn', 'info']
logging = (level) ->
LEVELS.indexOf(LEVEL) >= LEVELS.indexOf(level)
module.exports =
info: (messages..... | var LEVEL, LEVELS, log, logging, ref, write;
log = console.log;
write = process.stdout.write;
LEVEL = ((ref = process.env.LOG_LEVEL) != null ? ref.toLowerCase() : void 0) || 'none';
LEVELS = ['none', 'error', 'warn', 'info'];
logging = function(level) {
return LEVELS.indexOf(LEVEL) >= LEVELS.indexOf(level);
};
... | CoffeeScript | JavaScript | mojotech/pioneer | src/support/logger.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/logger.coffee | 1 | 27 |
mojotech/pioneer:src/support/logger.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var LEVEL, LEVELS, log, logging, ref, write;
log = console.log;
write = process.stdout.write;
LEVEL = ((ref = process.env.LOG_LEVEL) != null ? ref.toLowerCase() : void 0) || 'none';
LEVELS = ['none', 'error', 'warn', 'info'];
logging = function(level) {
retu... | log = console.log
write = process.stdout.write
LEVEL = process.env.LOG_LEVEL?.toLowerCase() || 'none'
LEVELS = ['none', 'error', 'warn', 'info']
logging = (level) ->
LEVELS.indexOf(LEVEL) >= LEVELS.indexOf(level)
module.exports =
info: (messages...) ->
log messages.join(' ') if logging('info')
wa... | JavaScript | CoffeeScript | mojotech/pioneer | src/support/logger.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/logger.coffee | 1 | 27 |
mojotech/pioneer:src/support/logger.coffee:1:completion | completion | log = console.log
write = process.stdout.write
LEVEL = process.env.LOG_LEVEL?.toLowerCase() || 'none'
LEVELS = ['none', 'error', 'warn', 'info']
logging = (level) ->
LEVELS.indexOf(LEVEL) >= LEVELS.indexOf(level)
module.exports =
info: (messages...) ->
log messages.join(' ') if logging('info') | warn: (messages...) ->
log messages.join(' ') if logging('warn')
error: (messages...) ->
log messages.join(' ') if logging('error')
silence: (code) ->
if logging('info')
code()
else
console.log = process.stdout.write = ->
code().then ->
[console.log, process.stdout.write]... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/logger.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/logger.coffee | 1 | 27 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
require('./resources/resolution_info.coffee')
require('./resources/guides.coffee')
]
@factory: (resource) ->
for Section in RESOURCES
... | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/resource_section.coffee | 1 | 16 | ||
meltingice/psd.js:lib/psd/resource_section.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
require('./resources/resolution_info.coffee')
require('./resources/guides.coffee')
]... | var ResourceSection, _;
_ = require('lodash');
module.exports = ResourceSection = (function() {
var RESOURCES;
class ResourceSection {
static factory(resource) {
var Section, i, len;
for (i = 0, len = RESOURCES.length; i < len; i++) {
Section = RESOURCES[i];
if (Section.prototype.... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/resource_section.coffee | 1 | 16 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ResourceSection, _;
_ = require('lodash');
module.exports = ResourceSection = (function() {
var RESOURCES;
class ResourceSection {
static factory(resource) {
var Section, i, len;
for (i = 0, len = RESOURCES.length; i < len; i++) {
... | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
require('./resources/resolution_info.coffee')
require('./resources/guides.coffee')
]
@factory: (resource) ->
for Section in RESOURCES
... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/resource_section.coffee | 1 | 16 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:completion | completion | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
require('./resources/resolution_info.coffee')
require('./resources/guides.coffee') | ]
@factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is resource.id
return _.tap new Section(resource), (s) -> s.parse()
null | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/resource_section.coffee | 1 | 16 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
require('./resources/resolution_info.coffee')
]
@factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is reso... | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 0530d3767a6bf58bc5d53e097aa9b4eae471b800 | 2,846 | https://github.com/meltingice/psd.js/blob/0530d3767a6bf58bc5d53e097aa9b4eae471b800/lib/psd/resource_section.coffee | 1 | 15 | ||
meltingice/psd.js:lib/psd/resource_section.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
require('./resources/resolution_info.coffee')
]
@factory: (resource) ->
for Secti... | var ResourceSection, _;
_ = require('lodash');
module.exports = ResourceSection = (function() {
var RESOURCES;
class ResourceSection {
static factory(resource) {
var Section, i, len;
for (i = 0, len = RESOURCES.length; i < len; i++) {
Section = RESOURCES[i];
if (Section.prototype.... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 0530d3767a6bf58bc5d53e097aa9b4eae471b800 | 2,846 | https://github.com/meltingice/psd.js/blob/0530d3767a6bf58bc5d53e097aa9b4eae471b800/lib/psd/resource_section.coffee | 1 | 15 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ResourceSection, _;
_ = require('lodash');
module.exports = ResourceSection = (function() {
var RESOURCES;
class ResourceSection {
static factory(resource) {
var Section, i, len;
for (i = 0, len = RESOURCES.length; i < len; i++) {
... | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
require('./resources/resolution_info.coffee')
]
@factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is reso... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 0530d3767a6bf58bc5d53e097aa9b4eae471b800 | 2,846 | https://github.com/meltingice/psd.js/blob/0530d3767a6bf58bc5d53e097aa9b4eae471b800/lib/psd/resource_section.coffee | 1 | 15 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:completion | completion | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
require('./resources/resolution_info.coffee') | ]
@factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is resource.id
return _.tap new Section(resource), (s) -> s.parse()
null | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 0530d3767a6bf58bc5d53e097aa9b4eae471b800 | 2,846 | https://github.com/meltingice/psd.js/blob/0530d3767a6bf58bc5d53e097aa9b4eae471b800/lib/psd/resource_section.coffee | 1 | 15 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
]
@factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is resource.id
return _.tap new Section(resource), ... | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 45925c1051e57f3d9a7b791b6ad6611d68b25d44 | 2,846 | https://github.com/meltingice/psd.js/blob/45925c1051e57f3d9a7b791b6ad6611d68b25d44/lib/psd/resource_section.coffee | 1 | 14 | ||
meltingice/psd.js:lib/psd/resource_section.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
]
@factory: (resource) ->
for Section in RESOURCES
continue unless Section::id ... | var ResourceSection, _;
_ = require('lodash');
module.exports = ResourceSection = (function() {
var RESOURCES;
class ResourceSection {
static factory(resource) {
var Section, i, len;
for (i = 0, len = RESOURCES.length; i < len; i++) {
Section = RESOURCES[i];
if (Section.prototype.... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 45925c1051e57f3d9a7b791b6ad6611d68b25d44 | 2,846 | https://github.com/meltingice/psd.js/blob/45925c1051e57f3d9a7b791b6ad6611d68b25d44/lib/psd/resource_section.coffee | 1 | 14 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ResourceSection, _;
_ = require('lodash');
module.exports = ResourceSection = (function() {
var RESOURCES;
class ResourceSection {
static factory(resource) {
var Section, i, len;
for (i = 0, len = RESOURCES.length; i < len; i++) {
... | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
]
@factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is resource.id
return _.tap new Section(resource), ... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 45925c1051e57f3d9a7b791b6ad6611d68b25d44 | 2,846 | https://github.com/meltingice/psd.js/blob/45925c1051e57f3d9a7b791b6ad6611d68b25d44/lib/psd/resource_section.coffee | 1 | 14 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:completion | completion | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
require('./resources/layer_links.coffee')
] | @factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is resource.id
return _.tap new Section(resource), (s) -> s.parse()
null | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 45925c1051e57f3d9a7b791b6ad6611d68b25d44 | 2,846 | https://github.com/meltingice/psd.js/blob/45925c1051e57f3d9a7b791b6ad6611d68b25d44/lib/psd/resource_section.coffee | 1 | 14 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
]
@factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is resource.id
return _.tap new Section(resource), (s) -> s.parse()
null | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 97c9d86a21c1d83755fd549e77bce700c8452e36 | 2,846 | https://github.com/meltingice/psd.js/blob/97c9d86a21c1d83755fd549e77bce700c8452e36/lib/psd/resource_section.coffee | 1 | 13 | ||
meltingice/psd.js:lib/psd/resource_section.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
]
@factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is resource.id
return _.tap new Section(... | var ResourceSection, _;
_ = require('lodash');
module.exports = ResourceSection = (function() {
var RESOURCES;
class ResourceSection {
static factory(resource) {
var Section, i, len;
for (i = 0, len = RESOURCES.length; i < len; i++) {
Section = RESOURCES[i];
if (Section.prototype.... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 97c9d86a21c1d83755fd549e77bce700c8452e36 | 2,846 | https://github.com/meltingice/psd.js/blob/97c9d86a21c1d83755fd549e77bce700c8452e36/lib/psd/resource_section.coffee | 1 | 13 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var ResourceSection, _;
_ = require('lodash');
module.exports = ResourceSection = (function() {
var RESOURCES;
class ResourceSection {
static factory(resource) {
var Section, i, len;
for (i = 0, len = RESOURCES.length; i < len; i++) {
... | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
]
@factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is resource.id
return _.tap new Section(resource), (s) -> s.parse()
null | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 97c9d86a21c1d83755fd549e77bce700c8452e36 | 2,846 | https://github.com/meltingice/psd.js/blob/97c9d86a21c1d83755fd549e77bce700c8452e36/lib/psd/resource_section.coffee | 1 | 13 |
meltingice/psd.js:lib/psd/resource_section.coffee:1:completion | completion | _ = require 'lodash'
module.exports = class ResourceSection
RESOURCES = [
require('./resources/layer_comps.coffee')
] | @factory: (resource) ->
for Section in RESOURCES
continue unless Section::id is resource.id
return _.tap new Section(resource), (s) -> s.parse()
null | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/resource_section.coffee | MIT | 97c9d86a21c1d83755fd549e77bce700c8452e36 | 2,846 | https://github.com/meltingice/psd.js/blob/97c9d86a21c1d83755fd549e77bce700c8452e36/lib/psd/resource_section.coffee | 1 | 13 |
cdglabs/apparatus:src/Dataflow/ComputationManager.coffee:1:raw_corpus | raw_corpus | ###
A ComputationManager is used to memoize functions within a computation. Use
ComputationManager.run(callback) to start a new computation and then any
memoized functions will be memoized within that computation.
TODO: Write tests
###
module.exports = class ComputationManager
constructor: ->
@isRunning = fal... | CoffeeScript | cdglabs/apparatus | src/Dataflow/ComputationManager.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Dataflow/ComputationManager.coffee | 1 | 38 | ||
cdglabs/apparatus:src/Dataflow/ComputationManager.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
A ComputationManager is used to memoize functions within a computation. Use
ComputationManager.run(callback) to start a new computation and then any
memoized functions will be memoized within that computation.
TODO: Write tests
###
module.exports = class ... | /*
A ComputationManager is used to memoize functions within a computation. Use
ComputationManager.run(callback) to start a new computation and then any
memoized functions will be memoized within that computation.
TODO: Write tests
*/
var ComputationManager;
module.exports = ComputationManager = class ComputationMan... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Dataflow/ComputationManager.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Dataflow/ComputationManager.coffee | 1 | 38 |
cdglabs/apparatus:src/Dataflow/ComputationManager.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
A ComputationManager is used to memoize functions within a computation. Use
ComputationManager.run(callback) to start a new computation and then any
memoized functions will be memoized within that computation.
TODO: Write tests
*/
var ComputationManager;
mod... | ###
A ComputationManager is used to memoize functions within a computation. Use
ComputationManager.run(callback) to start a new computation and then any
memoized functions will be memoized within that computation.
TODO: Write tests
###
module.exports = class ComputationManager
constructor: ->
@isRunning = fal... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Dataflow/ComputationManager.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Dataflow/ComputationManager.coffee | 1 | 38 |
cdglabs/apparatus:src/Dataflow/ComputationManager.coffee:1:completion | completion | ###
A ComputationManager is used to memoize functions within a computation. Use
ComputationManager.run(callback) to start a new computation and then any
memoized functions will be memoized within that computation.
TODO: Write tests
###
module.exports = class ComputationManager
constructor: ->
@isRunning = fal... | if !@isRunning
@isRunning = true
@counter++
try
return callback()
finally
@isRunning = false
else
callback()
# Takes a function and returns a memoized version.
memoize: (fn) ->
cachedValue = null
lastEvaluated = -1
return =>
if lastEvaluated != @c... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Dataflow/ComputationManager.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Dataflow/ComputationManager.coffee | 1 | 38 |
CaryLandholt/AngularFun:scripts/services/searchHistory.coffee:1:raw_corpus | raw_corpus | ###global define###
define ['services/services'], (services) ->
'use strict'
services.factory 'searchHistory', [->
searchHistory: []
] | CoffeeScript | CaryLandholt/AngularFun | scripts/services/searchHistory.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/services/searchHistory.coffee | 1 | 8 | ||
CaryLandholt/AngularFun:scripts/services/searchHistory.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###global define###
define ['services/services'], (services) ->
'use strict'
services.factory 'searchHistory', [->
searchHistory: []
]
``` | /*global define*/
define(['services/services'], function(services) {
'use strict';
return services.factory('searchHistory', [
function() {
return {
searchHistory: []
};
}
]);
}); | CoffeeScript | JavaScript | CaryLandholt/AngularFun | scripts/services/searchHistory.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/services/searchHistory.coffee | 1 | 8 |
CaryLandholt/AngularFun:scripts/services/searchHistory.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*global define*/
define(['services/services'], function(services) {
'use strict';
return services.factory('searchHistory', [
function() {
return {
searchHistory: []
};
}
]);
});
``` | ###global define###
define ['services/services'], (services) ->
'use strict'
services.factory 'searchHistory', [->
searchHistory: []
] | JavaScript | CoffeeScript | CaryLandholt/AngularFun | scripts/services/searchHistory.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/services/searchHistory.coffee | 1 | 8 |
CaryLandholt/AngularFun:scripts/services/searchHistory.coffee:1:completion | completion | ###global define###
define ['services/services'], (services) ->
'use strict' | services.factory 'searchHistory', [->
searchHistory: []
] | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | scripts/services/searchHistory.coffee | MIT | 0ae299ec8a05ddbfb2e26f04898245b95f7ab37c | 672 | https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/scripts/services/searchHistory.coffee | 1 | 8 |
jianliaoim/talk-os:talk-account/client/locales/index.coffee:1:raw_corpus | raw_corpus | zhLocales = require './zh'
enLocales = require './en'
exports.get = (key, language) ->
switch language
when 'en'
localeCollection = enLocales
when 'zh'
localeCollection = zhLocales
else
console.warn "language not passed in at: #{key}"
localeCollection = zhLocales
if localeCollec... | CoffeeScript | jianliaoim/talk-os | talk-account/client/locales/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/locales/index.coffee | 1 | 16 | ||
jianliaoim/talk-os:talk-account/client/locales/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
zhLocales = require './zh'
enLocales = require './en'
exports.get = (key, language) ->
switch language
when 'en'
localeCollection = enLocales
when 'zh'
localeCollection = zhLocales
else
console.warn "language not passed in at: #{k... | var enLocales, zhLocales;
zhLocales = require('./zh');
enLocales = require('./en');
exports.get = function(key, language) {
var localeCollection;
switch (language) {
case 'en':
localeCollection = enLocales;
break;
case 'zh':
localeCollection = zhLocales;
break;
default:
... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-account/client/locales/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/locales/index.coffee | 1 | 16 |
jianliaoim/talk-os:talk-account/client/locales/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var enLocales, zhLocales;
zhLocales = require('./zh');
enLocales = require('./en');
exports.get = function(key, language) {
var localeCollection;
switch (language) {
case 'en':
localeCollection = enLocales;
break;
case 'zh':
localeC... | zhLocales = require './zh'
enLocales = require './en'
exports.get = (key, language) ->
switch language
when 'en'
localeCollection = enLocales
when 'zh'
localeCollection = zhLocales
else
console.warn "language not passed in at: #{key}"
localeCollection = zhLocales
if localeCollec... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-account/client/locales/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/locales/index.coffee | 1 | 16 |
jianliaoim/talk-os:talk-account/client/locales/index.coffee:1:completion | completion | zhLocales = require './zh'
enLocales = require './en'
exports.get = (key, language) ->
switch language
when 'en'
localeCollection = enLocales
when 'zh' | localeCollection = zhLocales
else
console.warn "language not passed in at: #{key}"
localeCollection = zhLocales
if localeCollection[key]?
localeCollection[key]
else
"__#{key}__" | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-account/client/locales/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/locales/index.coffee | 1 | 16 |
abe33/atom-pigments:spec/helpers/matchers.coffee:1:raw_corpus | raw_corpus | beforeEach ->
compare = (a,b,p) -> Math.abs(b - a) < (Math.pow(10, -p) / 2)
@addMatchers
toBeComponentArrayCloseTo: (arr, precision=0) ->
notText = if @isNot then " not" else ""
this.message = => "Expected #{jasmine.pp(@actual)} to#{notText} be an array whose values are close to #{jasmine.pp(arr)} ... | CoffeeScript | abe33/atom-pigments | spec/helpers/matchers.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/helpers/matchers.coffee | 1 | 50 | ||
abe33/atom-pigments:spec/helpers/matchers.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
beforeEach ->
compare = (a,b,p) -> Math.abs(b - a) < (Math.pow(10, -p) / 2)
@addMatchers
toBeComponentArrayCloseTo: (arr, precision=0) ->
notText = if @isNot then " not" else ""
this.message = => "Expected #{jasmine.pp(@actual)} to#{notText} ... | beforeEach(function() {
var compare;
compare = function(a, b, p) {
return Math.abs(b - a) < (Math.pow(10, -p) / 2);
};
return this.addMatchers({
toBeComponentArrayCloseTo: function(arr, precision = 0) {
var notText;
notText = this.isNot ? " not" : "";
this.message = () => {
ret... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/helpers/matchers.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/helpers/matchers.coffee | 1 | 50 |
abe33/atom-pigments:spec/helpers/matchers.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
beforeEach(function() {
var compare;
compare = function(a, b, p) {
return Math.abs(b - a) < (Math.pow(10, -p) / 2);
};
return this.addMatchers({
toBeComponentArrayCloseTo: function(arr, precision = 0) {
var notText;
notText = this.isNot ... | beforeEach ->
compare = (a,b,p) -> Math.abs(b - a) < (Math.pow(10, -p) / 2)
@addMatchers
toBeComponentArrayCloseTo: (arr, precision=0) ->
notText = if @isNot then " not" else ""
this.message = => "Expected #{jasmine.pp(@actual)} to#{notText} be an array whose values are close to #{jasmine.pp(arr)} ... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/helpers/matchers.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/helpers/matchers.coffee | 1 | 50 |
abe33/atom-pigments:spec/helpers/matchers.coffee:1:completion | completion | beforeEach ->
compare = (a,b,p) -> Math.abs(b - a) < (Math.pow(10, -p) / 2)
@addMatchers
toBeComponentArrayCloseTo: (arr, precision=0) ->
notText = if @isNot then " not" else ""
this.message = => "Expected #{jasmine.pp(@actual)} to#{notText} be an array whose values are close to #{jasmine.pp(arr)} ... | switch colorOrRed.length
when 8
alpha = (hex >> 24 & 0xff) / 255
red = hex >> 16 & 0xff
green = hex >> 8 & 0xff
blue = hex & 0xff
when 6
red = hex >> 16 & 0xff
green = hex >> 8 & 0xff
blue = hex & 0... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/helpers/matchers.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/helpers/matchers.coffee | 1 | 50 |
abe33/atom-pigments:spec/helpers/matchers.coffee:2:raw_corpus | raw_corpus | this.message = => "Expected #{jasmine.pp(@actual)} to#{notText} be a color equal to #{jasmine.pp(color)}"
Math.round(@actual.red) is color.red and
Math.round(@actual.green) is color.green and
Math.round(@actual.blue) is color.blue and
compare(@actual.alpha, color.alpha, 1) | CoffeeScript | abe33/atom-pigments | spec/helpers/matchers.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/helpers/matchers.coffee | 51 | 56 | ||
abe33/atom-pigments:spec/helpers/matchers.coffee:2:completion | completion | this.message = => "Expected #{jasmine.pp(@actual)} to#{notText} be a color equal to #{jasmine.pp(color)}"
Math.round(@actual.red) is color.red and | Math.round(@actual.green) is color.green and
Math.round(@actual.blue) is color.blue and
compare(@actual.alpha, color.alpha, 1) | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/helpers/matchers.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/helpers/matchers.coffee | 51 | 56 |
jianliaoim/talk-os:talk-api2x/server/schemas/attachments/rtf.coffee:1:raw_corpus | raw_corpus | # Quote for rtf, quote, snippet
{Schema} = require 'mongoose'
util = require '../../util'
module.exports = RTFSchema = new Schema
title: String
text: type: String | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/schemas/attachments/rtf.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/attachments/rtf.coffee | 1 | 8 | ||
jianliaoim/talk-os:talk-api2x/server/schemas/attachments/rtf.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Quote for rtf, quote, snippet
{Schema} = require 'mongoose'
util = require '../../util'
module.exports = RTFSchema = new Schema
title: String
text: type: String
``` | // Quote for rtf, quote, snippet
var RTFSchema, Schema, util;
({Schema} = require('mongoose'));
util = require('../../util');
module.exports = RTFSchema = new Schema({
title: String,
text: {
type: String
}
}); | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/server/schemas/attachments/rtf.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/attachments/rtf.coffee | 1 | 8 |
jianliaoim/talk-os:talk-api2x/server/schemas/attachments/rtf.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Quote for rtf, quote, snippet
var RTFSchema, Schema, util;
({Schema} = require('mongoose'));
util = require('../../util');
module.exports = RTFSchema = new Schema({
title: String,
text: {
type: String
}
});
``` | # Quote for rtf, quote, snippet
{Schema} = require 'mongoose'
util = require '../../util'
module.exports = RTFSchema = new Schema
title: String
text: type: String | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/schemas/attachments/rtf.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/attachments/rtf.coffee | 1 | 8 |
jianliaoim/talk-os:talk-api2x/server/schemas/attachments/rtf.coffee:1:completion | completion | # Quote for rtf, quote, snippet
{Schema} = require 'mongoose'
util = require '../../util' | module.exports = RTFSchema = new Schema
title: String
text: type: String | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/schemas/attachments/rtf.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/attachments/rtf.coffee | 1 | 8 |
cdglabs/apparatus:src/View/Editor.coffee:1:raw_corpus | raw_corpus | R = require "./R"
Model = require "../Model/Model"
R.create "Editor",
propTypes:
editor: Model.Editor
childContextTypes:
editor: Model.Editor
project: Model.Project
getChildContext: ->
{editor} = @props
{
editor: editor
project: editor.project
}
render: ->
if @props.... | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 1 | 39 | ||
cdglabs/apparatus:src/View/Editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
R = require "./R"
Model = require "../Model/Model"
R.create "Editor",
propTypes:
editor: Model.Editor
childContextTypes:
editor: Model.Editor
project: Model.Project
getChildContext: ->
{editor} = @props
{
editor: editor
p... | var Model, R;
R = require("./R");
Model = require("../Model/Model");
R.create("Editor", {
propTypes: {
editor: Model.Editor
},
childContextTypes: {
editor: Model.Editor,
project: Model.Project
},
getChildContext: function() {
var editor;
({editor} = this.props);
return {
edito... | CoffeeScript | JavaScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 1 | 39 |
cdglabs/apparatus:src/View/Editor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Model, R;
R = require("./R");
Model = require("../Model/Model");
R.create("Editor", {
propTypes: {
editor: Model.Editor
},
childContextTypes: {
editor: Model.Editor,
project: Model.Project
},
getChildContext: function() {
var editor... | R = require "./R"
Model = require "../Model/Model"
R.create "Editor",
propTypes:
editor: Model.Editor
childContextTypes:
editor: Model.Editor
project: Model.Project
getChildContext: ->
{editor} = @props
{
editor: editor
project: editor.project
}
render: ->
if @props.... | JavaScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 1 | 39 |
cdglabs/apparatus:src/View/Editor.coffee:1:completion | completion | R = require "./R"
Model = require "../Model/Model"
R.create "Editor",
propTypes:
editor: Model.Editor
childContextTypes:
editor: Model.Editor
project: Model.Project
getChildContext: ->
{editor} = @props
{
editor: editor
project: editor.project
} | render: ->
if @props.editor.project
R.MouseManagersWrapper {},
R.div { className: "Editor FlexRow" },
R.DragHint {}
R.CreatePanel {}
R.div { className: "Center FlexGrow FlexColumn" },
R.Menubar {}
R.EditorCanvas {}
R.RightPanel {}
els... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 1 | 39 |
cdglabs/apparatus:src/View/Editor.coffee:2:raw_corpus | raw_corpus | getChildContext: ->
dragManager: @_dragManager
hoverManager: @_hoverManager
componentWillMount: ->
@_dragManager = new R.DragManager()
@_hoverManager = new R.HoverManager()
render: ->
{className, children} = @props
cursor = @_dragManager.drag?.cursor
R.div {
className: R.cx
... | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 41 | 79 | ||
cdglabs/apparatus:src/View/Editor.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
getChildContext: ->
dragManager: @_dragManager
hoverManager: @_hoverManager
componentWillMount: ->
@_dragManager = new R.DragManager()
@_hoverManager = new R.HoverManager()
render: ->
{className, children} = @props
cursor = @_dragMan... | ({
getChildContext: function() {
return {
dragManager: this._dragManager,
hoverManager: this._hoverManager
};
},
componentWillMount: function() {
this._dragManager = new R.DragManager();
return this._hoverManager = new R.HoverManager();
},
render: function() {
var children, cla... | CoffeeScript | JavaScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 41 | 79 |
cdglabs/apparatus:src/View/Editor.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
getChildContext: function() {
return {
dragManager: this._dragManager,
hoverManager: this._hoverManager
};
},
componentWillMount: function() {
this._dragManager = new R.DragManager();
return this._hoverManager = new R.HoverManag... | getChildContext: ->
dragManager: @_dragManager
hoverManager: @_hoverManager
componentWillMount: ->
@_dragManager = new R.DragManager()
@_hoverManager = new R.HoverManager()
render: ->
{className, children} = @props
cursor = @_dragManager.drag?.cursor
R.div {
className: R.cx
... | JavaScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 41 | 79 |
cdglabs/apparatus:src/View/Editor.coffee:2:completion | completion | getChildContext: ->
dragManager: @_dragManager
hoverManager: @_hoverManager
componentWillMount: ->
@_dragManager = new R.DragManager()
@_hoverManager = new R.HoverManager()
render: ->
{className, children} = @props
cursor = @_dragManager.drag?.cursor
R.div {
className: R.cx
... | children
# This wrapper is used in Expression where we need to be able to render
# ReactElements within a CodeMirror mark. It may not be needed in the future
# if React migrates from context coming from owner to context coming from
# parent. See: https://gist.github.com/jimfb/0eb6e61f300a8c1b2ce7
R.create "ContextWra... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 41 | 79 |
cdglabs/apparatus:src/View/Editor.coffee:3:raw_corpus | raw_corpus | render: -> @props.childRender()
R.create "DragHint",
contextTypes:
dragManager: R.DragManager
render: ->
{dragManager} = @context
drag = dragManager.drag
R.div {className: "DragHintContainer"},
if drag?.type == "transcludeAttribute" and drag.consummated
R.div {
className... | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 81 | 101 | ||
cdglabs/apparatus:src/View/Editor.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
render: -> @props.childRender()
R.create "DragHint",
contextTypes:
dragManager: R.DragManager
render: ->
{dragManager} = @context
drag = dragManager.drag
R.div {className: "DragHintContainer"},
if drag?.type == "transcludeAttribute"... | ({
render: function() {
return this.props.childRender();
}
});
R.create("DragHint", {
contextTypes: {
dragManager: R.DragManager
},
render: function() {
var drag, dragManager;
({dragManager} = this.context);
drag = dragManager.drag;
return R.div({
className: "DragHintContainer"
... | CoffeeScript | JavaScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 81 | 101 |
cdglabs/apparatus:src/View/Editor.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
render: function() {
return this.props.childRender();
}
});
R.create("DragHint", {
contextTypes: {
dragManager: R.DragManager
},
render: function() {
var drag, dragManager;
({dragManager} = this.context);
drag = dragManager.drag;
... | render: -> @props.childRender()
R.create "DragHint",
contextTypes:
dragManager: R.DragManager
render: ->
{dragManager} = @context
drag = dragManager.drag
R.div {className: "DragHintContainer"},
if drag?.type == "transcludeAttribute" and drag.consummated
R.div {
className... | JavaScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 81 | 101 |
cdglabs/apparatus:src/View/Editor.coffee:3:completion | completion | render: -> @props.childRender()
R.create "DragHint",
contextTypes:
dragManager: R.DragManager
render: ->
{dragManager} = @context | drag = dragManager.drag
R.div {className: "DragHintContainer"},
if drag?.type == "transcludeAttribute" and drag.consummated
R.div {
className: "DragHint"
style:
left: drag.x + 5
top: drag.y + 5
},
R.AttributeToken {attribute: drag.attribu... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/Editor.coffee | 81 | 101 |
cdglabs/apparatus:src/View/Editor.coffee:1:raw_corpus | raw_corpus | R = require "./R"
Model = require "../Model/Model"
R.create "Editor",
propTypes:
editor: Model.Editor
childContextTypes:
editor: Model.Editor
project: Model.Project
getChildContext: ->
{editor} = @props
{
editor: editor
project: editor.project
}
render: ->
R.MouseMan... | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 1 | 40 | ||
cdglabs/apparatus:src/View/Editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
R = require "./R"
Model = require "../Model/Model"
R.create "Editor",
propTypes:
editor: Model.Editor
childContextTypes:
editor: Model.Editor
project: Model.Project
getChildContext: ->
{editor} = @props
{
editor: editor
p... | var Model, R;
R = require("./R");
Model = require("../Model/Model");
R.create("Editor", {
propTypes: {
editor: Model.Editor
},
childContextTypes: {
editor: Model.Editor,
project: Model.Project
},
getChildContext: function() {
var editor;
({editor} = this.props);
return {
edito... | CoffeeScript | JavaScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 1 | 40 |
cdglabs/apparatus:src/View/Editor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Model, R;
R = require("./R");
Model = require("../Model/Model");
R.create("Editor", {
propTypes: {
editor: Model.Editor
},
childContextTypes: {
editor: Model.Editor,
project: Model.Project
},
getChildContext: function() {
var editor... | R = require "./R"
Model = require "../Model/Model"
R.create "Editor",
propTypes:
editor: Model.Editor
childContextTypes:
editor: Model.Editor
project: Model.Project
getChildContext: ->
{editor} = @props
{
editor: editor
project: editor.project
}
render: ->
R.MouseMan... | JavaScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 1 | 40 |
cdglabs/apparatus:src/View/Editor.coffee:1:completion | completion | R = require "./R"
Model = require "../Model/Model"
R.create "Editor",
propTypes:
editor: Model.Editor
childContextTypes:
editor: Model.Editor
project: Model.Project
getChildContext: ->
{editor} = @props
{
editor: editor
project: editor.project
}
render: -> | R.MouseManagersWrapper {},
R.div { className: "Editor FlexRow" },
R.DragHint {}
R.CreatePanel {}
R.div { className: "Center FlexGrow FlexColumn" },
R.Menubar {}
R.EditorCanvas {}
R.RightPanel {}
# This wrapper provides a DragManager and HoverManager for its ch... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 1 | 40 |
cdglabs/apparatus:src/View/Editor.coffee:2:raw_corpus | raw_corpus | componentWillMount: ->
@_dragManager = new R.DragManager()
@_hoverManager = new R.HoverManager()
render: ->
{className, children} = @props
cursor = @_dragManager.drag?.cursor
R.div {
className: R.cx
MouseManagersWrapper: true
CursorOverride: cursor?
style:
cur... | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 42 | 83 | ||
cdglabs/apparatus:src/View/Editor.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
componentWillMount: ->
@_dragManager = new R.DragManager()
@_hoverManager = new R.HoverManager()
render: ->
{className, children} = @props
cursor = @_dragManager.drag?.cursor
R.div {
className: R.cx
MouseManagersWrapper: true... | ({
componentWillMount: function() {
this._dragManager = new R.DragManager();
return this._hoverManager = new R.HoverManager();
},
render: function() {
var children, className, cursor, ref;
({className, children} = this.props);
cursor = (ref = this._dragManager.drag) != null ? ref.cursor : void... | CoffeeScript | JavaScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 42 | 83 |
cdglabs/apparatus:src/View/Editor.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
componentWillMount: function() {
this._dragManager = new R.DragManager();
return this._hoverManager = new R.HoverManager();
},
render: function() {
var children, className, cursor, ref;
({className, children} = this.props);
cursor = (re... | componentWillMount: ->
@_dragManager = new R.DragManager()
@_hoverManager = new R.HoverManager()
render: ->
{className, children} = @props
cursor = @_dragManager.drag?.cursor
R.div {
className: R.cx
MouseManagersWrapper: true
CursorOverride: cursor?
style:
cur... | JavaScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 42 | 83 |
cdglabs/apparatus:src/View/Editor.coffee:2:completion | completion | componentWillMount: ->
@_dragManager = new R.DragManager()
@_hoverManager = new R.HoverManager()
render: ->
{className, children} = @props
cursor = @_dragManager.drag?.cursor
R.div {
className: R.cx
MouseManagersWrapper: true
CursorOverride: cursor?
style:
cur... | # parent. See: https://gist.github.com/jimfb/0eb6e61f300a8c1b2ce7
R.create "ContextWrapper",
propTypes:
childRender: Function
context: Object
childContextTypes:
editor: Model.Editor
project: Model.Project
dragManager: R.DragManager
hoverManager: R.HoverManager
getChildContext: ->
@pr... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 42 | 83 |
cdglabs/apparatus:src/View/Editor.coffee:3:raw_corpus | raw_corpus | render: ->
{dragManager} = @context
drag = dragManager.drag
R.div {className: "DragHintContainer"},
if drag?.type == "transcludeAttribute" and drag.consummated
R.div {
className: "DragHint"
style:
left: drag.x + 5
top: drag.y + 5
},
... | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 85 | 98 | ||
cdglabs/apparatus:src/View/Editor.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
render: ->
{dragManager} = @context
drag = dragManager.drag
R.div {className: "DragHintContainer"},
if drag?.type == "transcludeAttribute" and drag.consummated
R.div {
className: "DragHint"
style:
left: ... | ({
render: function() {
var drag, dragManager;
({dragManager} = this.context);
drag = dragManager.drag;
return R.div({
className: "DragHintContainer"
}, (drag != null ? drag.type : void 0) === "transcludeAttribute" && drag.consummated ? R.div({
className: "DragHint",
style: {
... | CoffeeScript | JavaScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 85 | 98 |
cdglabs/apparatus:src/View/Editor.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
render: function() {
var drag, dragManager;
({dragManager} = this.context);
drag = dragManager.drag;
return R.div({
className: "DragHintContainer"
}, (drag != null ? drag.type : void 0) === "transcludeAttribute" && drag.consummated ? ... | render: ->
{dragManager} = @context
drag = dragManager.drag
R.div {className: "DragHintContainer"},
if drag?.type == "transcludeAttribute" and drag.consummated
R.div {
className: "DragHint"
style:
left: drag.x + 5
top: drag.y + 5
},
... | JavaScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 85 | 98 |
cdglabs/apparatus:src/View/Editor.coffee:3:completion | completion | render: ->
{dragManager} = @context
drag = dragManager.drag
R.div {className: "DragHintContainer"},
if drag?.type == "transcludeAttribute" and drag.consummated | R.div {
className: "DragHint"
style:
left: drag.x + 5
top: drag.y + 5
},
R.AttributeToken {attribute: drag.attribute, contextElement: null} | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | dac7312f9c7ef55912ac18222c2f8b847e9bda4d | 1,052 | https://github.com/cdglabs/apparatus/blob/dac7312f9c7ef55912ac18222c2f8b847e9bda4d/src/View/Editor.coffee | 85 | 98 |
cdglabs/apparatus:src/View/Editor.coffee:1:raw_corpus | raw_corpus | R = require "./R"
Model = require "../Model/Model"
R.create "Editor",
propTypes:
editor: Model.Editor
childContextTypes:
editor: Model.Editor
project: Model.Project
getChildContext: ->
{editor} = @props
{
editor: editor
project: editor.project
}
render: ->
R.MouseMan... | CoffeeScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | c2564482c7207389c163d3f99ccf564d0eae351a | 1,052 | https://github.com/cdglabs/apparatus/blob/c2564482c7207389c163d3f99ccf564d0eae351a/src/View/Editor.coffee | 1 | 40 | ||
cdglabs/apparatus:src/View/Editor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
R = require "./R"
Model = require "../Model/Model"
R.create "Editor",
propTypes:
editor: Model.Editor
childContextTypes:
editor: Model.Editor
project: Model.Project
getChildContext: ->
{editor} = @props
{
editor: editor
p... | var Model, R;
R = require("./R");
Model = require("../Model/Model");
R.create("Editor", {
propTypes: {
editor: Model.Editor
},
childContextTypes: {
editor: Model.Editor,
project: Model.Project
},
getChildContext: function() {
var editor;
({editor} = this.props);
return {
edito... | CoffeeScript | JavaScript | cdglabs/apparatus | src/View/Editor.coffee | MIT | c2564482c7207389c163d3f99ccf564d0eae351a | 1,052 | https://github.com/cdglabs/apparatus/blob/c2564482c7207389c163d3f99ccf564d0eae351a/src/View/Editor.coffee | 1 | 40 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.