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
mauricemach/zappa:src/client.coffee:2:completion
completion
root_locals.emit = -> socket.emit.apply socket, arguments # Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = rewrite_function(root_function, root_locals_names) rewritten_root(root_context, root_locals) # Implements the application according ...
for name, helper of helpers locals[name] = -> helper(context, locals, arguments) app.get r.path, (sammy_context) -> context = {} context[k] = v for k, v of sammy_context.params locals.params = context locals.context = sammy_context locals....
CoffeeScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
e7ed8357094e742ffa0cc9e86b393ee71e27814b
943
https://github.com/mauricemach/zappa/blob/e7ed8357094e742ffa0cc9e86b393ee71e27814b/src/client.coffee
52
101
mauricemach/zappa:src/client.coffee:1:raw_corpus
raw_corpus
skeleton = -> zappa = window.zappa = {} zappa.version = null coffeescript_helpers = null rewrite_function = null zappa.run = (root_function) -> root_locals_names = ['app', 'socket', 'emit', 'def', 'helper', 'get', 'connect', 'at'] sammy_locals_names = [] ws_locals_names = ['app', 'socket', 'emit...
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
2
51
mauricemach/zappa:src/client.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript skeleton = -> zappa = window.zappa = {} zappa.version = null coffeescript_helpers = null rewrite_function = null zappa.run = (root_function) -> root_locals_names = ['app', 'socket', 'emit', 'def', 'helper', 'get', 'connect', 'at'] sammy_locals...
var skeleton; skeleton = function() { var coffeescript_helpers, rewrite_function, zappa; zappa = window.zappa = {}; zappa.version = null; coffeescript_helpers = null; rewrite_function = null; return zappa.run = function(root_function) { var app, defs, defs_names, helpers, helpers_names, root_context, r...
CoffeeScript
JavaScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
2
51
mauricemach/zappa:src/client.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var skeleton; skeleton = function() { var coffeescript_helpers, rewrite_function, zappa; zappa = window.zappa = {}; zappa.version = null; coffeescript_helpers = null; rewrite_function = null; return zappa.run = function(root_function) { var app, de...
skeleton = -> zappa = window.zappa = {} zappa.version = null coffeescript_helpers = null rewrite_function = null zappa.run = (root_function) -> root_locals_names = ['app', 'socket', 'emit', 'def', 'helper', 'get', 'connect', 'at'] sammy_locals_names = [] ws_locals_names = ['app', 'socket', 'emit...
JavaScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
2
51
mauricemach/zappa:src/client.coffee:1:completion
completion
skeleton = -> zappa = window.zappa = {} zappa.version = null coffeescript_helpers = null rewrite_function = null zappa.run = (root_function) -> root_locals_names = ['app', 'socket', 'emit', 'def', 'helper', 'get', 'connect', 'at'] sammy_locals_names = [] ws_locals_names = ['app', 'socket', 'emit...
root_locals = {app, socket} root_locals.get = -> if typeof arguments[0] isnt 'object' routes.push({path: arguments[0], handler: arguments[1]}) else for k, v of arguments[0] routes.push({path: k, handler: v}) root_locals.helper = (obj) -> for k, v of obj help...
CoffeeScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
2
51
mauricemach/zappa:src/client.coffee:2:raw_corpus
raw_corpus
root_locals.emit = -> socket.emit.apply socket, arguments # Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = rewrite_function(root_function, root_locals_names) rewritten_root(root_context, root_locals) # Implements the application according ...
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
52
101
mauricemach/zappa:src/client.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript root_locals.emit = -> socket.emit.apply socket, arguments # Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = rewrite_function(root_function, root_locals_names) rewritten_root(root_context, ...
var context, def, helper, i, k, len, locals, name, r, rewritten_root, v; root_locals.emit = function() { return socket.emit.apply(socket, arguments); }; // Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = rewrite_function(root_function, root_locals_names); rew...
CoffeeScript
JavaScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
52
101
mauricemach/zappa:src/client.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var context, def, helper, i, k, len, locals, name, r, rewritten_root, v; root_locals.emit = function() { return socket.emit.apply(socket, arguments); }; // Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = r...
root_locals.emit = -> socket.emit.apply socket, arguments # Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = rewrite_function(root_function, root_locals_names) rewritten_root(root_context, root_locals) # Implements the application according ...
JavaScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
52
101
mauricemach/zappa:src/client.coffee:2:completion
completion
root_locals.emit = -> socket.emit.apply socket, arguments # Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = rewrite_function(root_function, root_locals_names) rewritten_root(root_context, root_locals) # Implements the application according ...
locals[name] = def for name, helper of helpers locals[name] = -> helper(context, locals, arguments) app.get r.path, -> context = {} locals.params = context rewritten_handler(context, locals) # Implements the websockets client with socket.io. ...
CoffeeScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
52
101
mauricemach/zappa:src/client.coffee:3:raw_corpus
raw_corpus
for name, h of ws_handlers socket.on name, (data) -> context = {} locals.params = context for k, v of data context[k] = v h(context, locals) $(-> app.run '#/') if app?
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
102
110
mauricemach/zappa:src/client.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript for name, h of ws_handlers socket.on name, (data) -> context = {} locals.params = context for k, v of data context[k] = v h(context, locals) $(-> app.run '#/') if app? ```
var h, name; for (name in ws_handlers) { h = ws_handlers[name]; socket.on(name, function(data) { var context, k, v; context = {}; locals.params = context; for (k in data) { v = data[k]; context[k] = v; } return h(context, locals); }); } if (typeof app !== "undefined" && app !...
CoffeeScript
JavaScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
102
110
mauricemach/zappa:src/client.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var h, name; for (name in ws_handlers) { h = ws_handlers[name]; socket.on(name, function(data) { var context, k, v; context = {}; locals.params = context; for (k in data) { v = data[k]; context[k] = v; } return h(context, lo...
for name, h of ws_handlers socket.on name, (data) -> context = {} locals.params = context for k, v of data context[k] = v h(context, locals) $(-> app.run '#/') if app?
JavaScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
102
110
mauricemach/zappa:src/client.coffee:3:completion
completion
for name, h of ws_handlers socket.on name, (data) -> context = {} locals.params = context
for k, v of data context[k] = v h(context, locals) $(-> app.run '#/') if app?
CoffeeScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
342bc696ca2af705d72c936e7402320d9e655e39
943
https://github.com/mauricemach/zappa/blob/342bc696ca2af705d72c936e7402320d9e655e39/src/client.coffee
102
110
mauricemach/zappa:src/client.coffee:1:raw_corpus
raw_corpus
skeleton = -> zappa = window.zappa = {} zappa.version = null coffeescript_helpers = null rewrite_function = null zappa.run = (root_function) -> root_locals_names = ['def', 'helper', 'get', 'socket', 'connect', 'at'] sammy_locals_names = [] ws_locals_names = ['socket', 'id', 'params', 'client'] ...
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
ebad095eb9afabcc19bbff6c053b69841ed0c428
943
https://github.com/mauricemach/zappa/blob/ebad095eb9afabcc19bbff6c053b69841ed0c428/src/client.coffee
2
51
mauricemach/zappa:src/client.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript skeleton = -> zappa = window.zappa = {} zappa.version = null coffeescript_helpers = null rewrite_function = null zappa.run = (root_function) -> root_locals_names = ['def', 'helper', 'get', 'socket', 'connect', 'at'] sammy_locals_names = [] ...
var skeleton; skeleton = function() { var coffeescript_helpers, rewrite_function, zappa; zappa = window.zappa = {}; zappa.version = null; coffeescript_helpers = null; rewrite_function = null; return zappa.run = function(root_function) { var app, defs, defs_names, helpers, helpers_names, root_context, r...
CoffeeScript
JavaScript
mauricemach/zappa
src/client.coffee
MIT
ebad095eb9afabcc19bbff6c053b69841ed0c428
943
https://github.com/mauricemach/zappa/blob/ebad095eb9afabcc19bbff6c053b69841ed0c428/src/client.coffee
2
51
mauricemach/zappa:src/client.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var skeleton; skeleton = function() { var coffeescript_helpers, rewrite_function, zappa; zappa = window.zappa = {}; zappa.version = null; coffeescript_helpers = null; rewrite_function = null; return zappa.run = function(root_function) { var app, de...
skeleton = -> zappa = window.zappa = {} zappa.version = null coffeescript_helpers = null rewrite_function = null zappa.run = (root_function) -> root_locals_names = ['def', 'helper', 'get', 'socket', 'connect', 'at'] sammy_locals_names = [] ws_locals_names = ['socket', 'id', 'params', 'client'] ...
JavaScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
ebad095eb9afabcc19bbff6c053b69841ed0c428
943
https://github.com/mauricemach/zappa/blob/ebad095eb9afabcc19bbff6c053b69841ed0c428/src/client.coffee
2
51
mauricemach/zappa:src/client.coffee:1:completion
completion
skeleton = -> zappa = window.zappa = {} zappa.version = null coffeescript_helpers = null rewrite_function = null zappa.run = (root_function) -> root_locals_names = ['def', 'helper', 'get', 'socket', 'connect', 'at'] sammy_locals_names = [] ws_locals_names = ['socket', 'id', 'params', 'client'] ...
root_locals = {} root_locals.get = -> if typeof arguments[0] isnt 'object' routes.push({path: arguments[0], handler: arguments[1]}) else for k, v of arguments[0] routes.push({path: k, handler: v}) root_locals.helper = (obj) -> for k, v of obj helpers_names.p...
CoffeeScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
ebad095eb9afabcc19bbff6c053b69841ed0c428
943
https://github.com/mauricemach/zappa/blob/ebad095eb9afabcc19bbff6c053b69841ed0c428/src/client.coffee
2
51
mauricemach/zappa:src/client.coffee:2:raw_corpus
raw_corpus
# Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = rewrite_function(root_function, root_locals_names) rewritten_root(root_context, root_locals) # Implements the application according to the specification. for k, v of helpers helpers[k] = rew...
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
ebad095eb9afabcc19bbff6c053b69841ed0c428
943
https://github.com/mauricemach/zappa/blob/ebad095eb9afabcc19bbff6c053b69841ed0c428/src/client.coffee
52
101
mauricemach/zappa:src/client.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = rewrite_function(root_function, root_locals_names) rewritten_root(root_context, root_locals) # Implements the application according to the speci...
// Executes the (rewriten) end-user function and learns how the app should be structured. var context, def, h, helper, i, k, len, locals, name, r, rewritten_root, v; rewritten_root = rewrite_function(root_function, root_locals_names); rewritten_root(root_context, root_locals); // Implements the application according...
CoffeeScript
JavaScript
mauricemach/zappa
src/client.coffee
MIT
ebad095eb9afabcc19bbff6c053b69841ed0c428
943
https://github.com/mauricemach/zappa/blob/ebad095eb9afabcc19bbff6c053b69841ed0c428/src/client.coffee
52
101
mauricemach/zappa:src/client.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Executes the (rewriten) end-user function and learns how the app should be structured. var context, def, h, helper, i, k, len, locals, name, r, rewritten_root, v; rewritten_root = rewrite_function(root_function, root_locals_names); rewritten_root(root_context,...
# Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = rewrite_function(root_function, root_locals_names) rewritten_root(root_context, root_locals) # Implements the application according to the specification. for k, v of helpers helpers[k] = rew...
JavaScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
ebad095eb9afabcc19bbff6c053b69841ed0c428
943
https://github.com/mauricemach/zappa/blob/ebad095eb9afabcc19bbff6c053b69841ed0c428/src/client.coffee
52
101
mauricemach/zappa:src/client.coffee:2:completion
completion
# Executes the (rewriten) end-user function and learns how the app should be structured. rewritten_root = rewrite_function(root_function, root_locals_names) rewritten_root(root_context, root_locals) # Implements the application according to the specification. for k, v of helpers helpers[k] = rew...
helper(context, locals, arguments) app.get r.path, -> context = {} locals.params = context rewritten_handler(context, locals) # Implements the websockets client with socket.io. if socket? context = {} locals = {socket} for name, def of defs loca...
CoffeeScript
CoffeeScript
mauricemach/zappa
src/client.coffee
MIT
ebad095eb9afabcc19bbff6c053b69841ed0c428
943
https://github.com/mauricemach/zappa/blob/ebad095eb9afabcc19bbff6c053b69841ed0c428/src/client.coffee
52
101
jianliaoim/talk-os:talk-api2x/test/scripts/sendattachment.coffee:1:raw_corpus
raw_corpus
fs = require 'fs' path = require 'path' config = require 'config' _request = require 'request' mailgun = require '../controllers/mailgun.json' mailgun.recipient = 'self4.r68c12a25@talk.ai' # mailgun.attachment = fs.createReadStream __dirname + "/../files/jzzslb.doc" mailgun.attach1 = fs.createReadStream __dirname + '/...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/scripts/sendattachment.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/scripts/sendattachment.coffee
1
16
jianliaoim/talk-os:talk-api2x/test/scripts/sendattachment.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fs = require 'fs' path = require 'path' config = require 'config' _request = require 'request' mailgun = require '../controllers/mailgun.json' mailgun.recipient = 'self4.r68c12a25@talk.ai' # mailgun.attachment = fs.createReadStream __dirname + "/../files/jzzslb....
var _request, config, fs, mailgun, path, url; fs = require('fs'); path = require('path'); config = require('config'); _request = require('request'); mailgun = require('../controllers/mailgun.json'); mailgun.recipient = 'self4.r68c12a25@talk.ai'; // mailgun.attachment = fs.createReadStream __dirname + "/../files/...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/scripts/sendattachment.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/scripts/sendattachment.coffee
1
16
jianliaoim/talk-os:talk-api2x/test/scripts/sendattachment.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _request, config, fs, mailgun, path, url; fs = require('fs'); path = require('path'); config = require('config'); _request = require('request'); mailgun = require('../controllers/mailgun.json'); mailgun.recipient = 'self4.r68c12a25@talk.ai'; // mailgun.a...
fs = require 'fs' path = require 'path' config = require 'config' _request = require 'request' mailgun = require '../controllers/mailgun.json' mailgun.recipient = 'self4.r68c12a25@talk.ai' # mailgun.attachment = fs.createReadStream __dirname + "/../files/jzzslb.doc" mailgun.attach1 = fs.createReadStream __dirname + '/...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/scripts/sendattachment.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/scripts/sendattachment.coffee
1
16
jianliaoim/talk-os:talk-api2x/test/scripts/sendattachment.coffee:1:completion
completion
fs = require 'fs' path = require 'path' config = require 'config' _request = require 'request' mailgun = require '../controllers/mailgun.json' mailgun.recipient = 'self4.r68c12a25@talk.ai' # mailgun.attachment = fs.createReadStream __dirname + "/../files/jzzslb.doc"
mailgun.attach1 = fs.createReadStream __dirname + '/../main.coffee' url = 'http://talk.bi/' + path.join(config.apiVersion, 'services/mailgun') _request.post url: url formData: mailgun , (err, res, body) -> console.log err, body
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/scripts/sendattachment.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/scripts/sendattachment.coffee
1
16
jianliaoim/talk-os:talk-web/client/app/msg-file.coffee:1:raw_corpus
raw_corpus
React = require 'react' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' detect = require '../util/detect' format = require '../util/format' colors = require '../util/colors' mixinMessageHandler = require '../mixin/message-handler' T = React.PropTypes div = React.createFact...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/msg-file.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/msg-file.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/msg-file.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' detect = require '../util/detect' format = require '../util/format' colors = require '../util/colors' mixinMessageHandler = require '../mixin/mess...
var Immutable, PureRenderMixin, React, T, colors, detect, div, format, mixinMessageHandler; React = require('react'); Immutable = require('immutable'); PureRenderMixin = require('react-addons-pure-render-mixin'); detect = require('../util/detect'); format = require('../util/format'); colors = require('../util/col...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/msg-file.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/msg-file.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/msg-file.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable, PureRenderMixin, React, T, colors, detect, div, format, mixinMessageHandler; React = require('react'); Immutable = require('immutable'); PureRenderMixin = require('react-addons-pure-render-mixin'); detect = require('../util/detect'); format = re...
React = require 'react' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' detect = require '../util/detect' format = require '../util/format' colors = require '../util/colors' mixinMessageHandler = require '../mixin/message-handler' T = React.PropTypes div = React.createFact...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/msg-file.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/msg-file.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/msg-file.coffee:1:completion
completion
React = require 'react' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' detect = require '../util/detect' format = require '../util/format' colors = require '../util/colors' mixinMessageHandler = require '../mixin/message-handler' T = React.PropTypes div = React.createFact...
render: -> file = @props.attachment.get('data') extname = file.get('fileType') or 'bin' textStyle = fontFamily: window.getComputedStyle?(document.body).fontFamily or 'serif' fontSize: 14 fileName = file.get('fileName') unless detect.textWidthSmaller fileName, textStyle, 200, 20 ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/msg-file.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/msg-file.coffee
1
50
soyjavi/QuoJS:spec/4_element.coffee:1:raw_corpus
raw_corpus
describe "Element", -> el = undefined beforeEach -> document.body.innerHTML = """<input type="text" class="quo" data-quo="js" value="1980"/>""" el = $$ "input" it "can get a attribute of a given element", -> attribute = "class" expect(el.attr attribute).toEqual "quo" it "can set a attribute...
CoffeeScript
soyjavi/QuoJS
spec/4_element.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/4_element.coffee
1
50
soyjavi/QuoJS:spec/4_element.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "Element", -> el = undefined beforeEach -> document.body.innerHTML = """<input type="text" class="quo" data-quo="js" value="1980"/>""" el = $$ "input" it "can get a attribute of a given element", -> attribute = "class" expect(el....
describe("Element", function() { var el; el = void 0; beforeEach(function() { document.body.innerHTML = `<input type="text" class="quo" data-quo="js" value="1980"/>`; return el = $$("input"); }); it("can get a attribute of a given element", function() { var attribute; attribute = "class"; ...
CoffeeScript
JavaScript
soyjavi/QuoJS
spec/4_element.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/4_element.coffee
1
50
soyjavi/QuoJS:spec/4_element.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("Element", function() { var el; el = void 0; beforeEach(function() { document.body.innerHTML = `<input type="text" class="quo" data-quo="js" value="1980"/>`; return el = $$("input"); }); it("can get a attribute of a given element", functi...
describe "Element", -> el = undefined beforeEach -> document.body.innerHTML = """<input type="text" class="quo" data-quo="js" value="1980"/>""" el = $$ "input" it "can get a attribute of a given element", -> attribute = "class" expect(el.attr attribute).toEqual "quo" it "can set a attribute...
JavaScript
CoffeeScript
soyjavi/QuoJS
spec/4_element.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/4_element.coffee
1
50
soyjavi/QuoJS:spec/4_element.coffee:1:completion
completion
describe "Element", -> el = undefined beforeEach -> document.body.innerHTML = """<input type="text" class="quo" data-quo="js" value="1980"/>""" el = $$ "input" it "can get a attribute of a given element", -> attribute = "class" expect(el.attr attribute).toEqual "quo" it "can set a attribute...
expect(el.attr attribute).toEqual null it "can get a data attribute in a given element", -> attribute = "quo" expect(el.data attribute).toEqual "js" it "can set a data attribute in a given element", -> attribute = "framework" value = "quojs" el.data attribute, value expect(el.data attri...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
spec/4_element.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/4_element.coffee
1
50
soyjavi/QuoJS:spec/4_element.coffee:2:raw_corpus
raw_corpus
it "set a value of a given element", -> value = "1983" el.val value expect(el.val()).toEqual value it "can show a given element", -> el.show() expect(el.style "display").toEqual "block" it "can hide a given element", -> el.hide() expect(el.style "display").toEqual "none" it "get ...
CoffeeScript
soyjavi/QuoJS
spec/4_element.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/4_element.coffee
51
73
soyjavi/QuoJS:spec/4_element.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "set a value of a given element", -> value = "1983" el.val value expect(el.val()).toEqual value it "can show a given element", -> el.show() expect(el.style "display").toEqual "block" it "can hide a given element", -> el.hide() ...
it("set a value of a given element", function() { var value; value = "1983"; el.val(value); return expect(el.val()).toEqual(value); }); it("can show a given element", function() { el.show(); return expect(el.style("display")).toEqual("block"); }); it("can hide a given element", function() { el.hide(); ...
CoffeeScript
JavaScript
soyjavi/QuoJS
spec/4_element.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/4_element.coffee
51
73
soyjavi/QuoJS:spec/4_element.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("set a value of a given element", function() { var value; value = "1983"; el.val(value); return expect(el.val()).toEqual(value); }); it("can show a given element", function() { el.show(); return expect(el.style("display")).toEqual("block"); }); it(...
it "set a value of a given element", -> value = "1983" el.val value expect(el.val()).toEqual value it "can show a given element", -> el.show() expect(el.style "display").toEqual "block" it "can hide a given element", -> el.hide() expect(el.style "display").toEqual "none" it "get ...
JavaScript
CoffeeScript
soyjavi/QuoJS
spec/4_element.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/4_element.coffee
51
73
soyjavi/QuoJS:spec/4_element.coffee:2:completion
completion
it "set a value of a given element", -> value = "1983" el.val value expect(el.val()).toEqual value it "can show a given element", -> el.show() expect(el.style "display").toEqual "block"
it "can hide a given element", -> el.hide() expect(el.style "display").toEqual "none" it "get a offset of a given element", -> offset = el.offset() expect(offset.left?).toBeTruthy() expect(offset.top?).toBeTruthy() expect(offset.width?).toBeTruthy() expect(offset.height?).toBeTruthy()
CoffeeScript
CoffeeScript
soyjavi/QuoJS
spec/4_element.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/spec/4_element.coffee
51
73
jianliaoim/talk-os:talk-web/client/module/message-rich-speech.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'message-rich-speech' propTypes: isUnread: T.bool duration: T.number source: T.string.isRequired getDefaultProps: -> isUnread: false getInitialState: -> pause: true played: false currentTime: 0 duration: @props.duration or 0 c...
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-speech.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-speech.coffee
15
64
jianliaoim/talk-os:talk-web/client/module/message-rich-speech.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'message-rich-speech' propTypes: isUnread: T.bool duration: T.number source: T.string.isRequired getDefaultProps: -> isUnread: false getInitialState: -> pause: true played: false ...
module.exports = React.createClass({ displayName: 'message-rich-speech', propTypes: { isUnread: T.bool, duration: T.number, source: T.string.isRequired }, getDefaultProps: function() { return { isUnread: false }; }, getInitialState: function() { return { pause: true, ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/module/message-rich-speech.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-speech.coffee
15
64
jianliaoim/talk-os:talk-web/client/module/message-rich-speech.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'message-rich-speech', propTypes: { isUnread: T.bool, duration: T.number, source: T.string.isRequired }, getDefaultProps: function() { return { isUnread: false }; }, getInitialS...
module.exports = React.createClass displayName: 'message-rich-speech' propTypes: isUnread: T.bool duration: T.number source: T.string.isRequired getDefaultProps: -> isUnread: false getInitialState: -> pause: true played: false currentTime: 0 duration: @props.duration or 0 c...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-speech.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-speech.coffee
15
64
jianliaoim/talk-os:talk-web/client/module/message-rich-speech.coffee:1:completion
completion
module.exports = React.createClass displayName: 'message-rich-speech' propTypes: isUnread: T.bool duration: T.number source: T.string.isRequired getDefaultProps: -> isUnread: false getInitialState: -> pause: true played: false currentTime: 0 duration: @props.duration or 0 c...
@_audioEl.removeEventListener 'durationchange', @setDuration @_audioEl.removeEventListener 'timeupdate', @updateProgress @_audioEl.removeEventListener 'ended', @endProgress bus.off 'play', @onBusPlay setDuration: -> # safari may get wrong duration defaultDuration = @props.duration or 0 durati...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-speech.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-speech.coffee
15
64
jianliaoim/talk-os:talk-web/client/module/message-rich-speech.coffee:2:raw_corpus
raw_corpus
@setState currentTime: currentTime if currentTime >= @state.duration @endPlay() endProgress: -> @endPlay() endPlay: -> @setState pause: true # ".paused" flag remains false in Opera, Safari and IE10, when the audio has ended. # firing the pause() method manually in response to the "ended"...
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-speech.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-speech.coffee
65
113
jianliaoim/talk-os:talk-web/client/module/message-rich-speech.coffee:2:completion
completion
@setState currentTime: currentTime if currentTime >= @state.duration @endPlay() endProgress: -> @endPlay() endPlay: -> @setState pause: true # ".paused" flag remains false in Opera, Safari and IE10, when the audio has ended. # firing the pause() method manually in response to the "ended"...
if not @state.paused @_audioEl.pause() @setState pause: true, played: true render: -> src = @props.source duration = @state.duration durationFormat = @formatDuration(duration) playPercent = @state.currentTime / @state.duration * 100 className = cx 'audio-player', 'is-playing': ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/module/message-rich-speech.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/message-rich-speech.coffee
65
113
jashkenas/coffeescript:documentation/v1/docs.coffee:1:raw_corpus
raw_corpus
compileSource = -> source = $('#repl_source').val() results = $('#repl_results') window.compiledJS = '' try window.compiledJS = CoffeeScript.compile source, bare: on el = results[0] if el.innerText el.innerText = window.compiledJS else results.text(window.compiledJS) results.remo...
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
4
39
jashkenas/coffeescript:documentation/v1/docs.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript compileSource = -> source = $('#repl_source').val() results = $('#repl_results') window.compiledJS = '' try window.compiledJS = CoffeeScript.compile source, bare: on el = results[0] if el.innerText el.innerText = window.compiledJS el...
var compileSource; compileSource = function() { var el, location, message, results, source; source = $('#repl_source').val(); results = $('#repl_results'); window.compiledJS = ''; try { window.compiledJS = CoffeeScript.compile(source, { bare: true }); el = results[0]; if (el.innerText) ...
CoffeeScript
JavaScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
4
39
jashkenas/coffeescript:documentation/v1/docs.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var compileSource; compileSource = function() { var el, location, message, results, source; source = $('#repl_source').val(); results = $('#repl_results'); window.compiledJS = ''; try { window.compiledJS = CoffeeScript.compile(source, { bare: t...
compileSource = -> source = $('#repl_source').val() results = $('#repl_results') window.compiledJS = '' try window.compiledJS = CoffeeScript.compile source, bare: on el = results[0] if el.innerText el.innerText = window.compiledJS else results.text(window.compiledJS) results.remo...
JavaScript
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
4
39
jashkenas/coffeescript:documentation/v1/docs.coffee:1:completion
completion
compileSource = -> source = $('#repl_source').val() results = $('#repl_results') window.compiledJS = '' try window.compiledJS = CoffeeScript.compile source, bare: on el = results[0] if el.innerText el.innerText = window.compiledJS else results.text(window.compiledJS) results.remo...
# Update permalink $('#repl_permalink').attr 'href', "##{sourceFragment}#{encodeURIComponent source}" # Listen for keypresses and recompile. $('#repl_source').keyup -> compileSource() # Use tab key to insert tabs $('#repl_source').keydown (e) -> if e.keyCode is 9 e.preventDefault() textbox = e.target ...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
4
39
jashkenas/coffeescript:documentation/v1/docs.coffee:2:raw_corpus
raw_corpus
evalJS = -> try eval window.compiledJS catch error then alert error # Load the console with a string of CoffeeScript.
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
40
45
jashkenas/coffeescript:documentation/v1/docs.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript evalJS = -> try eval window.compiledJS catch error then alert error # Load the console with a string of CoffeeScript. ```
var evalJS; evalJS = function() { var error; try { return eval(window.compiledJS); } catch (error1) { error = error1; return alert(error); } }; // Load the console with a string of CoffeeScript.
CoffeeScript
JavaScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
40
45
jashkenas/coffeescript:documentation/v1/docs.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var evalJS; evalJS = function() { var error; try { return eval(window.compiledJS); } catch (error1) { error = error1; return alert(error); } }; // Load the console with a string of CoffeeScript. ```
evalJS = -> try eval window.compiledJS catch error then alert error # Load the console with a string of CoffeeScript.
JavaScript
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
40
45
jashkenas/coffeescript:documentation/v1/docs.coffee:2:completion
completion
evalJS = -> try eval window.compiledJS
catch error then alert error # Load the console with a string of CoffeeScript.
CoffeeScript
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
40
45
jashkenas/coffeescript:documentation/v1/docs.coffee:3:raw_corpus
raw_corpus
window.loadConsole = (coffee) -> $('#repl_source').val coffee compileSource() $('.navigation.try').addClass('active') false # Helper to hide the menus.
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
46
52
jashkenas/coffeescript:documentation/v1/docs.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript window.loadConsole = (coffee) -> $('#repl_source').val coffee compileSource() $('.navigation.try').addClass('active') false # Helper to hide the menus. ```
window.loadConsole = function(coffee) { $('#repl_source').val(coffee); compileSource(); $('.navigation.try').addClass('active'); return false; }; // Helper to hide the menus.
CoffeeScript
JavaScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
46
52
jashkenas/coffeescript:documentation/v1/docs.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript window.loadConsole = function(coffee) { $('#repl_source').val(coffee); compileSource(); $('.navigation.try').addClass('active'); return false; }; // Helper to hide the menus. ```
window.loadConsole = (coffee) -> $('#repl_source').val coffee compileSource() $('.navigation.try').addClass('active') false # Helper to hide the menus.
JavaScript
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
46
52
jashkenas/coffeescript:documentation/v1/docs.coffee:3:completion
completion
window.loadConsole = (coffee) -> $('#repl_source').val coffee compileSource()
$('.navigation.try').addClass('active') false # Helper to hide the menus.
CoffeeScript
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
46
52
jashkenas/coffeescript:documentation/v1/docs.coffee:4:raw_corpus
raw_corpus
closeMenus = -> $('.navigation.active').removeClass 'active' $('.minibutton.run').click -> evalJS() # Bind navigation buttons to open the menus. $('.navigation').click (e) -> return if e.target.tagName.toLowerCase() is 'a' return false if $(e.target).closest('.repl_wrapper').length if $(this).hasClass('active...
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
53
95
jashkenas/coffeescript:documentation/v1/docs.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript closeMenus = -> $('.navigation.active').removeClass 'active' $('.minibutton.run').click -> evalJS() # Bind navigation buttons to open the menus. $('.navigation').click (e) -> return if e.target.tagName.toLowerCase() is 'a' return false if $(e.target).clos...
var closeMenus, hash, src; closeMenus = function() { return $('.navigation.active').removeClass('active'); }; $('.minibutton.run').click(function() { return evalJS(); }); // Bind navigation buttons to open the menus. $('.navigation').click(function(e) { if (e.target.tagName.toLowerCase() === 'a') { return;...
CoffeeScript
JavaScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
53
95
jashkenas/coffeescript:documentation/v1/docs.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var closeMenus, hash, src; closeMenus = function() { return $('.navigation.active').removeClass('active'); }; $('.minibutton.run').click(function() { return evalJS(); }); // Bind navigation buttons to open the menus. $('.navigation').click(function(e) { if...
closeMenus = -> $('.navigation.active').removeClass 'active' $('.minibutton.run').click -> evalJS() # Bind navigation buttons to open the menus. $('.navigation').click (e) -> return if e.target.tagName.toLowerCase() is 'a' return false if $(e.target).closest('.repl_wrapper').length if $(this).hasClass('active...
JavaScript
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
53
95
jashkenas/coffeescript:documentation/v1/docs.coffee:4:completion
completion
closeMenus = -> $('.navigation.active').removeClass 'active' $('.minibutton.run').click -> evalJS() # Bind navigation buttons to open the menus. $('.navigation').click (e) -> return if e.target.tagName.toLowerCase() is 'a' return false if $(e.target).closest('.repl_wrapper').length if $(this).hasClass('active...
$(document.body) .keydown (e) -> closeMenus() if e.which == 27 evalJS() if e.which == 13 and (e.metaKey or e.ctrlKey) and $('.minibutton.run:visible').length .click (e) -> return false if $(e.target).hasClass('minibutton') closeMenus() $('#open_webchat').click -> $(this).replaceWith $('<iframe sr...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
02198eb96782306d00f29d53a38774b45c33b54f
16,577
https://github.com/jashkenas/coffeescript/blob/02198eb96782306d00f29d53a38774b45c33b54f/documentation/v1/docs.coffee
53
95
jashkenas/coffeescript:documentation/v1/docs.coffee:4:raw_corpus
raw_corpus
closeMenus = -> $('.navigation.active').removeClass 'active' $('.minibutton.run').click -> evalJS() # Bind navigation buttons to open the menus. $('.navigation').click (e) -> return if e.target.tagName.toLowerCase() is 'a' return false if $(e.target).closest('.repl_wrapper').length if $(this).hasClass('active...
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
e620434a2e1f913153a93656aab869453a536cd4
16,577
https://github.com/jashkenas/coffeescript/blob/e620434a2e1f913153a93656aab869453a536cd4/documentation/v1/docs.coffee
53
92
jashkenas/coffeescript:documentation/v1/docs.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript closeMenus = -> $('.navigation.active').removeClass 'active' $('.minibutton.run').click -> evalJS() # Bind navigation buttons to open the menus. $('.navigation').click (e) -> return if e.target.tagName.toLowerCase() is 'a' return false if $(e.target).clos...
var closeMenus, hash, src; closeMenus = function() { return $('.navigation.active').removeClass('active'); }; $('.minibutton.run').click(function() { return evalJS(); }); // Bind navigation buttons to open the menus. $('.navigation').click(function(e) { if (e.target.tagName.toLowerCase() === 'a') { return;...
CoffeeScript
JavaScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
e620434a2e1f913153a93656aab869453a536cd4
16,577
https://github.com/jashkenas/coffeescript/blob/e620434a2e1f913153a93656aab869453a536cd4/documentation/v1/docs.coffee
53
92
jashkenas/coffeescript:documentation/v1/docs.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var closeMenus, hash, src; closeMenus = function() { return $('.navigation.active').removeClass('active'); }; $('.minibutton.run').click(function() { return evalJS(); }); // Bind navigation buttons to open the menus. $('.navigation').click(function(e) { if...
closeMenus = -> $('.navigation.active').removeClass 'active' $('.minibutton.run').click -> evalJS() # Bind navigation buttons to open the menus. $('.navigation').click (e) -> return if e.target.tagName.toLowerCase() is 'a' return false if $(e.target).closest('.repl_wrapper').length if $(this).hasClass('active...
JavaScript
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
e620434a2e1f913153a93656aab869453a536cd4
16,577
https://github.com/jashkenas/coffeescript/blob/e620434a2e1f913153a93656aab869453a536cd4/documentation/v1/docs.coffee
53
92
jashkenas/coffeescript:documentation/v1/docs.coffee:4:completion
completion
closeMenus = -> $('.navigation.active').removeClass 'active' $('.minibutton.run').click -> evalJS() # Bind navigation buttons to open the menus. $('.navigation').click (e) -> return if e.target.tagName.toLowerCase() is 'a' return false if $(e.target).closest('.repl_wrapper').length if $(this).hasClass('active...
closeMenus() if e.which == 27 evalJS() if e.which == 13 and (e.metaKey or e.ctrlKey) and $('.minibutton.run:visible').length .click (e) -> return false if $(e.target).hasClass('minibutton') closeMenus() $('#open_webchat').click -> $(this).replaceWith $('<iframe src="http://webchat.freenode.net/?channel...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
documentation/v1/docs.coffee
MIT
e620434a2e1f913153a93656aab869453a536cd4
16,577
https://github.com/jashkenas/coffeescript/blob/e620434a2e1f913153a93656aab869453a536cd4/documentation/v1/docs.coffee
53
92
buttercoin/buttercoin:lib/ews/engine_websocket_server.coffee:1:raw_corpus
raw_corpus
stump = require('stump') WebsocketListener = require('./websocket_listener') EngineProtocol = require('./engine_protocol') EngineServer = require('../engine_server') module.exports = class EngineWebsocketServer extends EngineServer start: => @connection_map = {} @pce.start().then => @listener = new ...
CoffeeScript
buttercoin/buttercoin
lib/ews/engine_websocket_server.coffee
MIT
89ffb77d27d3fbedc33f0ead9ddd73c0eb1ef9f6
663
https://github.com/buttercoin/buttercoin/blob/89ffb77d27d3fbedc33f0ead9ddd73c0eb1ef9f6/lib/ews/engine_websocket_server.coffee
1
39
buttercoin/buttercoin:lib/ews/engine_websocket_server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript stump = require('stump') WebsocketListener = require('./websocket_listener') EngineProtocol = require('./engine_protocol') EngineServer = require('../engine_server') module.exports = class EngineWebsocketServer extends EngineServer start: => @connection_...
var EngineProtocol, EngineServer, EngineWebsocketServer, WebsocketListener, stump, boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } }; stump = require('stump'); WebsocketListener = require('./websocket_...
CoffeeScript
JavaScript
buttercoin/buttercoin
lib/ews/engine_websocket_server.coffee
MIT
89ffb77d27d3fbedc33f0ead9ddd73c0eb1ef9f6
663
https://github.com/buttercoin/buttercoin/blob/89ffb77d27d3fbedc33f0ead9ddd73c0eb1ef9f6/lib/ews/engine_websocket_server.coffee
1
39
buttercoin/buttercoin:lib/ews/engine_websocket_server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var EngineProtocol, EngineServer, EngineWebsocketServer, WebsocketListener, stump, boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } }; stump = requi...
stump = require('stump') WebsocketListener = require('./websocket_listener') EngineProtocol = require('./engine_protocol') EngineServer = require('../engine_server') module.exports = class EngineWebsocketServer extends EngineServer start: => @connection_map = {} @pce.start().then => @listener = new ...
JavaScript
CoffeeScript
buttercoin/buttercoin
lib/ews/engine_websocket_server.coffee
MIT
89ffb77d27d3fbedc33f0ead9ddd73c0eb1ef9f6
663
https://github.com/buttercoin/buttercoin/blob/89ffb77d27d3fbedc33f0ead9ddd73c0eb1ef9f6/lib/ews/engine_websocket_server.coffee
1
39
buttercoin/buttercoin:lib/ews/engine_websocket_server.coffee:1:completion
completion
stump = require('stump') WebsocketListener = require('./websocket_listener') EngineProtocol = require('./engine_protocol') EngineServer = require('../engine_server') module.exports = class EngineWebsocketServer extends EngineServer start: => @connection_map = {} @pce.start().then => @listener = new ...
@info 'SHUTTING DOWN' for x,y of @connection_map y.disconnect() @connection_map = {} return @listener.close() new_connection: (connection) => @connection_map[ connection.conncounter ] = connection protocol = new EngineProtocol(@, connection, @pce) protocol.start() connection_lost: ...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
lib/ews/engine_websocket_server.coffee
MIT
89ffb77d27d3fbedc33f0ead9ddd73c0eb1ef9f6
663
https://github.com/buttercoin/buttercoin/blob/89ffb77d27d3fbedc33f0ead9ddd73c0eb1ef9f6/lib/ews/engine_websocket_server.coffee
1
39
jsdf/coffee-react-transform:index.coffee:1:raw_corpus
raw_corpus
{Parser, serialise} = require './csx' start = new Date() ast = new Parser().parse ''' "<html></html>" <Car doors=4 safety={getSafetyRating()*2} crackedWindscreen = "yep" insurance={ insurancehas() ? 'cool': 'ahh noooo'} data-yolo='swag\\' checked check=me_out /> ''' """ # @jsx React.DOM <Person name={window.isLogg...
CoffeeScript
jsdf/coffee-react-transform
index.coffee
MIT
76680f06e01ca044abfc39be3a6043f9dd458e89
431
https://github.com/jsdf/coffee-react-transform/blob/76680f06e01ca044abfc39be3a6043f9dd458e89/index.coffee
1
50
jsdf/coffee-react-transform:index.coffee:1:completion
completion
{Parser, serialise} = require './csx' start = new Date() ast = new Parser().parse ''' "<html></html>" <Car doors=4 safety={getSafetyRating()*2} crackedWindscreen = "yep" insurance={ insurancehas() ? 'cool': 'ahh noooo'} data-yolo='swag\\' checked check=me_out /> ''' """ # @jsx React.DOM <Person name={window.isLogg...
for n in a <div> asf <li xy={"as"}>{ n+1 }<a /> <a /> </li> </div> } </Person> <Person name={window.isLoggedIn ? window.name : \'\'} loltags='on new line' /> HelloWorld = React.createClass({ render: () -> return ( <p> Hello, <input type="text" placeholder="Your name here" />! ...
CoffeeScript
CoffeeScript
jsdf/coffee-react-transform
index.coffee
MIT
76680f06e01ca044abfc39be3a6043f9dd458e89
431
https://github.com/jsdf/coffee-react-transform/blob/76680f06e01ca044abfc39be3a6043f9dd458e89/index.coffee
1
50
jsdf/coffee-react-transform:index.coffee:2:raw_corpus
raw_corpus
<HelloWorld date="{new Date()}" />, document.getElementById('example') ); , 500); React.createClass render: -> return <Nav color="blue"> {<Profile>click{Math.random(),<Selfclosing coolattr />}</Profile> for i in [start...finish]} </Nav> """ console.log 'AST:' console.log JSON.stringify(ast, nul...
CoffeeScript
jsdf/coffee-react-transform
index.coffee
MIT
76680f06e01ca044abfc39be3a6043f9dd458e89
431
https://github.com/jsdf/coffee-react-transform/blob/76680f06e01ca044abfc39be3a6043f9dd458e89/index.coffee
51
71
jsdf/coffee-react-transform:index.coffee:2:completion
completion
<HelloWorld date="{new Date()}" />, document.getElementById('example') ); , 500); React.createClass render: -> return <Nav color="blue"> {<Profile>click{Math.random(),<Selfclosing coolattr />}</Profile> for i in [start...finish]} </Nav>
""" console.log 'AST:' console.log JSON.stringify(ast, null, 4) console.log 'Transformed CSX:' console.log serialise ast end = new Date() console.log "done in #{end - start}ms"
CoffeeScript
CoffeeScript
jsdf/coffee-react-transform
index.coffee
MIT
76680f06e01ca044abfc39be3a6043f9dd458e89
431
https://github.com/jsdf/coffee-react-transform/blob/76680f06e01ca044abfc39be3a6043f9dd458e89/index.coffee
51
71
jsdf/coffee-react-transform:index.coffee:1:raw_corpus
raw_corpus
{Parser,compileToCS} = require './csx' parser = new Parser() console.log 'pathological case of CSX escape inside CSX tag' ast = parser.parse '<Person name={window.isLoggedIn ? window.name : \'\'} />' console.log JSON.stringify(ast, null, 4) ast = parser.parse """ # @jsx React.DOM HelloWorld = React.createClass({ ...
CoffeeScript
jsdf/coffee-react-transform
index.coffee
MIT
b91439fb25fb53a64c78d4fc0a47ef8d26af2336
431
https://github.com/jsdf/coffee-react-transform/blob/b91439fb25fb53a64c78d4fc0a47ef8d26af2336/index.coffee
1
41
jsdf/coffee-react-transform:index.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {Parser,compileToCS} = require './csx' parser = new Parser() console.log 'pathological case of CSX escape inside CSX tag' ast = parser.parse '<Person name={window.isLoggedIn ? window.name : \'\'} />' console.log JSON.stringify(ast, null, 4) ast = parser.parse...
var Parser, ast, compileToCS, parser; ({Parser, compileToCS} = require('./csx')); parser = new Parser(); console.log('pathological case of CSX escape inside CSX tag'); ast = parser.parse('<Person name={window.isLoggedIn ? window.name : \'\'} />'); console.log(JSON.stringify(ast, null, 4)); ast = parser.parse(`# @...
CoffeeScript
JavaScript
jsdf/coffee-react-transform
index.coffee
MIT
b91439fb25fb53a64c78d4fc0a47ef8d26af2336
431
https://github.com/jsdf/coffee-react-transform/blob/b91439fb25fb53a64c78d4fc0a47ef8d26af2336/index.coffee
1
41
jsdf/coffee-react-transform:index.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Parser, ast, compileToCS, parser; ({Parser, compileToCS} = require('./csx')); parser = new Parser(); console.log('pathological case of CSX escape inside CSX tag'); ast = parser.parse('<Person name={window.isLoggedIn ? window.name : \'\'} />'); console.log(...
{Parser,compileToCS} = require './csx' parser = new Parser() console.log 'pathological case of CSX escape inside CSX tag' ast = parser.parse '<Person name={window.isLoggedIn ? window.name : \'\'} />' console.log JSON.stringify(ast, null, 4) ast = parser.parse """ # @jsx React.DOM HelloWorld = React.createClass({ ...
JavaScript
CoffeeScript
jsdf/coffee-react-transform
index.coffee
MIT
b91439fb25fb53a64c78d4fc0a47ef8d26af2336
431
https://github.com/jsdf/coffee-react-transform/blob/b91439fb25fb53a64c78d4fc0a47ef8d26af2336/index.coffee
1
41
jsdf/coffee-react-transform:index.coffee:1:completion
completion
{Parser,compileToCS} = require './csx' parser = new Parser() console.log 'pathological case of CSX escape inside CSX tag' ast = parser.parse '<Person name={window.isLoggedIn ? window.name : \'\'} />' console.log JSON.stringify(ast, null, 4) ast = parser.parse """ # @jsx React.DOM HelloWorld = React.createClass({ ...
}); setInterval(() -> React.renderComponent( <HelloWorld date="{new Date()}" />, document.getElementById('example') ); , 500); React.createClass render: -> return <Nav color="blue"> {<Profile>click{Math.random(),<Selfclosing coolattr />}</Profile> for i in [start...finish]} </Nav> """ co...
CoffeeScript
CoffeeScript
jsdf/coffee-react-transform
index.coffee
MIT
b91439fb25fb53a64c78d4fc0a47ef8d26af2336
431
https://github.com/jsdf/coffee-react-transform/blob/b91439fb25fb53a64c78d4fc0a47ef8d26af2336/index.coffee
1
41
jsdf/coffee-react-transform:index.coffee:1:raw_corpus
raw_corpus
{Parser,compileToCS} = require './csx' console.log 'pathological case of CSX escape inside CSX tag' ast = new Parser().parse '<Person name={window.isLoggedIn ? window.name : \'\'} />' console.log JSON.stringify(ast, null, 4) ast = new Parser().parse """ # @jsx React.DOM HelloWorld = React.createClass({ render: ()...
CoffeeScript
jsdf/coffee-react-transform
index.coffee
MIT
7132b4ff583a03a8346e8659405f84743e2b6cc0
431
https://github.com/jsdf/coffee-react-transform/blob/7132b4ff583a03a8346e8659405f84743e2b6cc0/index.coffee
1
39
jsdf/coffee-react-transform:index.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {Parser,compileToCS} = require './csx' console.log 'pathological case of CSX escape inside CSX tag' ast = new Parser().parse '<Person name={window.isLoggedIn ? window.name : \'\'} />' console.log JSON.stringify(ast, null, 4) ast = new Parser().parse """ # @jsx...
var Parser, ast, compileToCS; ({Parser, compileToCS} = require('./csx')); console.log('pathological case of CSX escape inside CSX tag'); ast = new Parser().parse('<Person name={window.isLoggedIn ? window.name : \'\'} />'); console.log(JSON.stringify(ast, null, 4)); ast = new Parser().parse(`# @jsx React.DOM Hello...
CoffeeScript
JavaScript
jsdf/coffee-react-transform
index.coffee
MIT
7132b4ff583a03a8346e8659405f84743e2b6cc0
431
https://github.com/jsdf/coffee-react-transform/blob/7132b4ff583a03a8346e8659405f84743e2b6cc0/index.coffee
1
39
jsdf/coffee-react-transform:index.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Parser, ast, compileToCS; ({Parser, compileToCS} = require('./csx')); console.log('pathological case of CSX escape inside CSX tag'); ast = new Parser().parse('<Person name={window.isLoggedIn ? window.name : \'\'} />'); console.log(JSON.stringify(ast, null, ...
{Parser,compileToCS} = require './csx' console.log 'pathological case of CSX escape inside CSX tag' ast = new Parser().parse '<Person name={window.isLoggedIn ? window.name : \'\'} />' console.log JSON.stringify(ast, null, 4) ast = new Parser().parse """ # @jsx React.DOM HelloWorld = React.createClass({ render: ()...
JavaScript
CoffeeScript
jsdf/coffee-react-transform
index.coffee
MIT
7132b4ff583a03a8346e8659405f84743e2b6cc0
431
https://github.com/jsdf/coffee-react-transform/blob/7132b4ff583a03a8346e8659405f84743e2b6cc0/index.coffee
1
39
jsdf/coffee-react-transform:index.coffee:1:completion
completion
{Parser,compileToCS} = require './csx' console.log 'pathological case of CSX escape inside CSX tag' ast = new Parser().parse '<Person name={window.isLoggedIn ? window.name : \'\'} />' console.log JSON.stringify(ast, null, 4) ast = new Parser().parse """ # @jsx React.DOM HelloWorld = React.createClass({ render: ()...
setInterval(() -> React.renderComponent( <HelloWorld date="{new Date()}" />, document.getElementById('example') ); , 500); React.createClass render: -> return <Nav color="blue"> {<Profile>click{Math.random(),<Selfclosing coolattr />}</Profile> for i in [start...finish]} </Nav> """ console...
CoffeeScript
CoffeeScript
jsdf/coffee-react-transform
index.coffee
MIT
7132b4ff583a03a8346e8659405f84743e2b6cc0
431
https://github.com/jsdf/coffee-react-transform/blob/7132b4ff583a03a8346e8659405f84743e2b6cc0/index.coffee
1
39
jianliaoim/talk-os:talk-web/client/app/inte-list.coffee:1:raw_corpus
raw_corpus
React = require 'react' immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' search = require '../util/search' InteAdding = React.createFactory require './inte-adding' SearchBox = React.createFactory require('react-lite-misc').SearchBox InteAddin...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/inte-list.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-list.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/inte-list.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' search = require '../util/search' InteAdding = React.createFactory require './inte-adding' SearchBox = React.cre...
var InteAdding, PureRenderMixin, React, SearchBox, T, div, immutable, lang, search, span; React = require('react'); immutable = require('immutable'); PureRenderMixin = require('react-addons-pure-render-mixin'); lang = require('../locales/lang'); search = require('../util/search'); InteAdding = React.createFactory...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/inte-list.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-list.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/inte-list.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var InteAdding, PureRenderMixin, React, SearchBox, T, div, immutable, lang, search, span; React = require('react'); immutable = require('immutable'); PureRenderMixin = require('react-addons-pure-render-mixin'); lang = require('../locales/lang'); search = requi...
React = require 'react' immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' search = require '../util/search' InteAdding = React.createFactory require './inte-adding' SearchBox = React.createFactory require('react-lite-misc').SearchBox InteAddin...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/inte-list.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-list.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/inte-list.coffee:1:completion
completion
React = require 'react' immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' search = require '../util/search' InteAdding = React.createFactory require './inte-adding' SearchBox = React.createFactory require('react-lite-misc').SearchBox InteAddin...
_roomId: T.string getInitialState: -> query: '' onInteAddClick: (inteId) -> @props.onPageSwitch inteId onQueryChange: (value) -> @setState query: value renderInteList: -> language = lang.getLang() intes = @props.intes.filter (value, key) -> not value.get('isCustomized') thirdPa...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/inte-list.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-list.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/inte-list.coffee:2:raw_corpus
raw_corpus
div className: 'filter', SearchBox value: @state.query, onChange: @onQueryChange, locale: locale, autoFocus: false @renderInteList()
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/inte-list.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-list.coffee
51
53
jianliaoim/talk-os:talk-web/client/app/inte-list.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript div className: 'filter', SearchBox value: @state.query, onChange: @onQueryChange, locale: locale, autoFocus: false @renderInteList() ```
div({ className: 'filter' }, SearchBox({ value: this.state.query, onChange: this.onQueryChange, locale: locale, autoFocus: false })); this.renderInteList();
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/inte-list.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-list.coffee
51
53
jianliaoim/talk-os:talk-web/client/app/inte-list.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript div({ className: 'filter' }, SearchBox({ value: this.state.query, onChange: this.onQueryChange, locale: locale, autoFocus: false })); this.renderInteList(); ```
div className: 'filter', SearchBox value: @state.query, onChange: @onQueryChange, locale: locale, autoFocus: false @renderInteList()
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/inte-list.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/inte-list.coffee
51
53
ichord/At.js:spec/coffeescripts/events.spec.coffee:1:raw_corpus
raw_corpus
describe "events", -> $inputor = null app = null beforeEach -> loadFixtures "inputors.html" $inputor = $("#inputor").atwho at: "@", data: fixtures["names"] app = getAppOf $inputor describe "jquery", -> controller = null callbacks = null beforeEach -> controller = app.controller() ...
CoffeeScript
ichord/At.js
spec/coffeescripts/events.spec.coffee
MIT
05e394acfa13937353bf03db2e478e55e245df71
5,250
https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/spec/coffeescripts/events.spec.coffee
1
50
ichord/At.js:spec/coffeescripts/events.spec.coffee:1:completion
completion
describe "events", -> $inputor = null app = null beforeEach -> loadFixtures "inputors.html" $inputor = $("#inputor").atwho at: "@", data: fixtures["names"] app = getAppOf $inputor describe "jquery", -> controller = null callbacks = null beforeEach -> controller = app.controller() ...
spyOn(callbacks, "before_insert").and.callThrough() tab_event = $.Event("keydown.atwho", keyCode: KEY_CODE.TAB) $inputor.trigger(tab_event) expect(controller.view.visible()).toBe(false) expect(callbacks.before_insert).toHaveBeenCalled() it "trigger enter", -> spyOn(callbacks, "before_insert...
CoffeeScript
CoffeeScript
ichord/At.js
spec/coffeescripts/events.spec.coffee
MIT
05e394acfa13937353bf03db2e478e55e245df71
5,250
https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/spec/coffeescripts/events.spec.coffee
1
50
ichord/At.js:spec/coffeescripts/events.spec.coffee:2:raw_corpus
raw_corpus
it "trigger matched", -> matched_event = spyOnEvent($inputor, "matched.atwho") triggerAtwhoAt $inputor expect(matched_event).toHaveBeenTriggered() it "trigger inserted", -> choose_event = spyOnEvent($inputor, "inserted.atwho") triggerAtwhoAt $inputor expect(choose_event).toHaveBeenTrig...
CoffeeScript
ichord/At.js
spec/coffeescripts/events.spec.coffee
MIT
05e394acfa13937353bf03db2e478e55e245df71
5,250
https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/spec/coffeescripts/events.spec.coffee
51
74
ichord/At.js:spec/coffeescripts/events.spec.coffee:2:completion
completion
it "trigger matched", -> matched_event = spyOnEvent($inputor, "matched.atwho") triggerAtwhoAt $inputor expect(matched_event).toHaveBeenTriggered() it "trigger inserted", -> choose_event = spyOnEvent($inputor, "inserted.atwho") triggerAtwhoAt $inputor expect(choose_event).toHaveBeenTrig...
reposition_event = spyOnEvent($inputor, "reposition.atwho") triggerAtwhoAt $inputor expect(reposition_event).toHaveBeenTriggered() it "trigger a special matched for @ with alias", -> $inputor.atwho at: "@" alias: "at-memtions" event = spyOnEvent($inputor, "matched-at-memtions.atwh...
CoffeeScript
CoffeeScript
ichord/At.js
spec/coffeescripts/events.spec.coffee
MIT
05e394acfa13937353bf03db2e478e55e245df71
5,250
https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/spec/coffeescripts/events.spec.coffee
51
74
buttercoin/buttercoin:lib/ews/ew_slave.coffee:1:raw_corpus
raw_corpus
module.exports = class EngineWebsocketSlave extends EngineServer @default_options = port: 6151 upstream_port: 6150 journalname: 'slave.testjournal' constructor: (options={}) -> options = _.extend(EngineWebsocketSlave.default_options, options) super(options) start: => @connection_map = {...
CoffeeScript
buttercoin/buttercoin
lib/ews/ew_slave.coffee
MIT
a825a9ea31d695f8abb600f3f27ff635a839c0c2
663
https://github.com/buttercoin/buttercoin/blob/a825a9ea31d695f8abb600f3f27ff635a839c0c2/lib/ews/ew_slave.coffee
11
60
buttercoin/buttercoin:lib/ews/ew_slave.coffee:1:completion
completion
module.exports = class EngineWebsocketSlave extends EngineServer @default_options = port: 6151 upstream_port: 6150 journalname: 'slave.testjournal' constructor: (options={}) -> options = _.extend(EngineWebsocketSlave.default_options, options) super(options) start: => @connection_map = {...
.then => #initialize query interface @info 'SLAVE INITIALIZING DOWNSTREAM LISTENER' @query_interface = new BE.QueryInterface(@pce.engine.datastore) @initialize_downstream() .then => @info 'SLAVE BOOT COMPLETE' connect_upstream: => @info 'CONNECT UPSTREAM' @options.protocol =...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
lib/ews/ew_slave.coffee
MIT
a825a9ea31d695f8abb600f3f27ff635a839c0c2
663
https://github.com/buttercoin/buttercoin/blob/a825a9ea31d695f8abb600f3f27ff635a839c0c2/lib/ews/ew_slave.coffee
11
60
buttercoin/buttercoin:lib/ews/ew_slave.coffee:2:raw_corpus
raw_corpus
wsconfig: {port: @options.port} protocol_factory: @new_connection @listener = new WebsocketListener(ws_options) @listener.listen().then => @info "QUERY SERVER LISTENING", ws_options.wsconfig new_connection: (connection) => # this is a protocol factory try @connection_map[connection.con...
CoffeeScript
buttercoin/buttercoin
lib/ews/ew_slave.coffee
MIT
a825a9ea31d695f8abb600f3f27ff635a839c0c2
663
https://github.com/buttercoin/buttercoin/blob/a825a9ea31d695f8abb600f3f27ff635a839c0c2/lib/ews/ew_slave.coffee
61
82
buttercoin/buttercoin:lib/ews/ew_slave.coffee:2:completion
completion
wsconfig: {port: @options.port} protocol_factory: @new_connection @listener = new WebsocketListener(ws_options) @listener.listen().then => @info "QUERY SERVER LISTENING", ws_options.wsconfig new_connection: (connection) => # this is a protocol factory try @connection_map[connection.con...
connection_lost: @downstream_connection_lost send: (obj) => connection.send_obj(obj) query_provider: @query_interface }) protocol.start(connection) catch e @error e console.log e.stack downstream_connection_lost: (connection) => delete @connection_map[connection.connco...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
lib/ews/ew_slave.coffee
MIT
a825a9ea31d695f8abb600f3f27ff635a839c0c2
663
https://github.com/buttercoin/buttercoin/blob/a825a9ea31d695f8abb600f3f27ff635a839c0c2/lib/ews/ew_slave.coffee
61
82
buttercoin/buttercoin:lib/ews/ew_slave.coffee:1:raw_corpus
raw_corpus
module.exports = class EngineWebsocketSlave extends EngineServer constructor: (options) -> options = _.extend (options or {}), { port: 6151 upstream_port: 6150 journalname: 'slave.testjournal' } super(options) start: => @connection_map = {} @closed = false @pce.start().t...
CoffeeScript
buttercoin/buttercoin
lib/ews/ew_slave.coffee
MIT
a3d546dc9e3d772b25933baa2a61c94d54604724
663
https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/lib/ews/ew_slave.coffee
11
60
buttercoin/buttercoin:lib/ews/ew_slave.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class EngineWebsocketSlave extends EngineServer constructor: (options) -> options = _.extend (options or {}), { port: 6151 upstream_port: 6150 journalname: 'slave.testjournal' } super(options) start: => @co...
var EngineWebsocketSlave, boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } }; module.exports = EngineWebsocketSlave = class EngineWebsocketSlave extends EngineServer { constructor(options) { option...
CoffeeScript
JavaScript
buttercoin/buttercoin
lib/ews/ew_slave.coffee
MIT
a3d546dc9e3d772b25933baa2a61c94d54604724
663
https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/lib/ews/ew_slave.coffee
11
60
buttercoin/buttercoin:lib/ews/ew_slave.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var EngineWebsocketSlave, boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } }; module.exports = EngineWebsocketSlave = class EngineWebsocketSlave ext...
module.exports = class EngineWebsocketSlave extends EngineServer constructor: (options) -> options = _.extend (options or {}), { port: 6151 upstream_port: 6150 journalname: 'slave.testjournal' } super(options) start: => @connection_map = {} @closed = false @pce.start().t...
JavaScript
CoffeeScript
buttercoin/buttercoin
lib/ews/ew_slave.coffee
MIT
a3d546dc9e3d772b25933baa2a61c94d54604724
663
https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/lib/ews/ew_slave.coffee
11
60
buttercoin/buttercoin:lib/ews/ew_slave.coffee:1:completion
completion
module.exports = class EngineWebsocketSlave extends EngineServer constructor: (options) -> options = _.extend (options or {}), { port: 6151 upstream_port: 6150 journalname: 'slave.testjournal' } super(options) start: => @connection_map = {} @closed = false @pce.start().t...
#initialize query interface @info 'SLAVE INITIALIZING DOWNSTREAM LISTENER' @query_interface = new BE.QueryInterface(@pce.engine.datastore) @initialize_downstream() .then => @info 'SLAVE BOOT COMPLETE' connect_upstream: => @info 'CONNECT UPSTREAM' @options.protocol = @options.proto...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
lib/ews/ew_slave.coffee
MIT
a3d546dc9e3d772b25933baa2a61c94d54604724
663
https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/lib/ews/ew_slave.coffee
11
60
buttercoin/buttercoin:lib/ews/ew_slave.coffee:2:raw_corpus
raw_corpus
protocol_factory: @new_connection @listener = new WebsocketListener(ws_options) @listener.listen().then => @info "QUERY SERVER LISTENING", ws_options.wsconfig new_connection: (connection) => # this is a protocol factory try @connection_map[connection.conncounter] = connection protocol ...
CoffeeScript
buttercoin/buttercoin
lib/ews/ew_slave.coffee
MIT
a3d546dc9e3d772b25933baa2a61c94d54604724
663
https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/lib/ews/ew_slave.coffee
61
81
buttercoin/buttercoin:lib/ews/ew_slave.coffee:2:completion
completion
protocol_factory: @new_connection @listener = new WebsocketListener(ws_options) @listener.listen().then => @info "QUERY SERVER LISTENING", ws_options.wsconfig new_connection: (connection) => # this is a protocol factory try @connection_map[connection.conncounter] = connection protocol ...
connection_lost: @downstream_connection_lost send: (obj) => connection.send_obj(obj) query_provider: @query_interface }) protocol.start(connection) catch e @error e console.log e.stack downstream_connection_lost: (connection) => delete @connection_map[connection.connco...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
lib/ews/ew_slave.coffee
MIT
a3d546dc9e3d772b25933baa2a61c94d54604724
663
https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/lib/ews/ew_slave.coffee
61
81