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:server.coffee:1:raw_corpus
raw_corpus
###global require, __dirname, process### ((express, dir, port = 3005) -> dir += '/dist' nextId = 0 people = [ {"id": "#{nextId++}", "name": "Saasha", "age": "5"} {"id": "#{nextId++}", "name": "Planet", "age": "7"} ] getUrl = -> "http://localhost:#{app.address().port}" isUniqueName = (name) -> (name f...
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
3e3bc2af3dfdcbf9d7880c197df48b4fcb39e7c9
672
https://github.com/CaryLandholt/AngularFun/blob/3e3bc2af3dfdcbf9d7880c197df48b4fcb39e7c9/server.coffee
1
42
CaryLandholt/AngularFun:server.coffee:1:completion
completion
###global require, __dirname, process### ((express, dir, port = 3005) -> dir += '/dist' nextId = 0 people = [ {"id": "#{nextId++}", "name": "Saasha", "age": "5"} {"id": "#{nextId++}", "name": "Planet", "age": "7"} ] getUrl = -> "http://localhost:#{app.address().port}" isUniqueName = (name) -> (name f...
url = getUrl() ostype = require('os').type() command = 'explorer' if ostype is 'Windows_NT' spawn = require('child_process').spawn console.log "launching #{url}" spawn command, [url] app.configure -> app.set 'view options', layout: false app.use express.bodyParser() app.use express.static(dir) ...
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
3e3bc2af3dfdcbf9d7880c197df48b4fcb39e7c9
672
https://github.com/CaryLandholt/AngularFun/blob/3e3bc2af3dfdcbf9d7880c197df48b4fcb39e7c9/server.coffee
1
42
CaryLandholt/AngularFun:server.coffee:2:raw_corpus
raw_corpus
app.get '/', (req, res) -> res.render "#{dir}/index.html" app.get '/people', (req, res) -> res.json people app.get '/people/details/:id', (req, res) -> id = req.params.id current = person for person in people when parseInt(person.id, 10) is parseInt(id, 10) res.json current app.post '/people', ...
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
3e3bc2af3dfdcbf9d7880c197df48b4fcb39e7c9
672
https://github.com/CaryLandholt/AngularFun/blob/3e3bc2af3dfdcbf9d7880c197df48b4fcb39e7c9/server.coffee
44
81
CaryLandholt/AngularFun:server.coffee:2:completion
completion
app.get '/', (req, res) -> res.render "#{dir}/index.html" app.get '/people', (req, res) -> res.json people app.get '/people/details/:id', (req, res) -> id = req.params.id current = person for person in people when parseInt(person.id, 10) is parseInt(id, 10) res.json current app.post '/people', ...
return res.send(message, 403) if not isUniqueName name person = "id": "#{nextId++}" "name": "#{name}" "age": "0" people.push person res.json person #res.header('Authenticated', 'NOPE') #res.send 'Conflictola', 401 app.listen port, -> #console.log "Express server listening on port #{a...
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
3e3bc2af3dfdcbf9d7880c197df48b4fcb39e7c9
672
https://github.com/CaryLandholt/AngularFun/blob/3e3bc2af3dfdcbf9d7880c197df48b4fcb39e7c9/server.coffee
44
81
CaryLandholt/AngularFun:server.coffee:1:raw_corpus
raw_corpus
###global require, __dirname, process### ((express, dir, port = 3005) -> dir += '/dist' nextId = 0 people = [ {"id": "#{nextId++}", "name": "Cary", "age": "42"} {"id": "#{nextId++}", "name": "Saasha", "age": "5"} {"id": "#{nextId++}", "name": "Planet", "age": "7"} ] isUniqueName = (name) -> (name for p...
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
50d384e415ea1dce491b5a0f7d5d54842ff1c57e
672
https://github.com/CaryLandholt/AngularFun/blob/50d384e415ea1dce491b5a0f7d5d54842ff1c57e/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:1:completion
completion
###global require, __dirname, process### ((express, dir, port = 3005) -> dir += '/dist' nextId = 0 people = [ {"id": "#{nextId++}", "name": "Cary", "age": "42"} {"id": "#{nextId++}", "name": "Saasha", "age": "5"} {"id": "#{nextId++}", "name": "Planet", "age": "7"} ] isUniqueName = (name) -> (name for p...
spawn command, [url] app.configure -> app.set 'view options', layout: false app.use express.bodyParser() app.use express.static(dir) app.use app.router app.register '.html', compile: (str, options) -> (locals) -> str app.get '/', (req, res) -> res.render "#{dir}/index.html" app.get...
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
50d384e415ea1dce491b5a0f7d5d54842ff1c57e
672
https://github.com/CaryLandholt/AngularFun/blob/50d384e415ea1dce491b5a0f7d5d54842ff1c57e/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:2:raw_corpus
raw_corpus
res.json current app.post '/people', (req, res) -> name = req.body.name message = "title": "Duplicate!" "message": "#{name} is a duplicate. Please enter a new name." return res.send(message, 403) if not isUniqueName name person = "id": "#{nextId++}" "name": "#{name}" "age": "0" ...
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
50d384e415ea1dce491b5a0f7d5d54842ff1c57e
672
https://github.com/CaryLandholt/AngularFun/blob/50d384e415ea1dce491b5a0f7d5d54842ff1c57e/server.coffee
51
77
CaryLandholt/AngularFun:server.coffee:2:completion
completion
res.json current app.post '/people', (req, res) -> name = req.body.name message = "title": "Duplicate!" "message": "#{name} is a duplicate. Please enter a new name." return res.send(message, 403) if not isUniqueName name person = "id": "#{nextId++}"
"name": "#{name}" "age": "0" people.push person res.json person #res.header('Authenticated', 'NOPE') #res.send 'Conflictola', 401 app.listen port, -> console.log "Express server listening on port #{app.address().port} in #{app.settings.env} mode" open() )(require('express'), __dirname, proces...
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
50d384e415ea1dce491b5a0f7d5d54842ff1c57e
672
https://github.com/CaryLandholt/AngularFun/blob/50d384e415ea1dce491b5a0f7d5d54842ff1c57e/server.coffee
51
77
CaryLandholt/AngularFun:server.coffee:1:raw_corpus
raw_corpus
###global require, __dirname, process### ((express, dir, port = 3005) -> nextId = 0 people = [ {"id": "#{nextId++}", "name": "Cary", "age": "42"} {"id": "#{nextId++}", "name": "Saasha", "age": "5"} {"id": "#{nextId++}", "name": "Planet", "age": "7"} ] isUniqueName = (name) -> (name for person in people w...
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
8807e89f28a76910be41e712bbf14fe40c34fa1a
672
https://github.com/CaryLandholt/AngularFun/blob/8807e89f28a76910be41e712bbf14fe40c34fa1a/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:1:completion
completion
###global require, __dirname, process### ((express, dir, port = 3005) -> nextId = 0 people = [ {"id": "#{nextId++}", "name": "Cary", "age": "42"} {"id": "#{nextId++}", "name": "Saasha", "age": "5"} {"id": "#{nextId++}", "name": "Planet", "age": "7"} ] isUniqueName = (name) -> (name for person in people w...
app.configure -> app.set 'view options', layout: false app.use express.bodyParser() app.use express.static(dir) app.use app.router app.register '.html', compile: (str, options) -> (locals) -> str app.get '/', (req, res) -> res.render "#{dir}/index.html" app.get '/people', (req, res) ...
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
8807e89f28a76910be41e712bbf14fe40c34fa1a
672
https://github.com/CaryLandholt/AngularFun/blob/8807e89f28a76910be41e712bbf14fe40c34fa1a/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:2:raw_corpus
raw_corpus
app.post '/people', (req, res) -> name = req.body.name message = "title": "Duplicate!" "message": "#{name} is a duplicate. Please enter a new name." return res.send(message, 403) if not isUniqueName name person = "id": "#{nextId++}" "name": "#{name}" "age": "0" people.push person...
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
8807e89f28a76910be41e712bbf14fe40c34fa1a
672
https://github.com/CaryLandholt/AngularFun/blob/8807e89f28a76910be41e712bbf14fe40c34fa1a/server.coffee
51
75
CaryLandholt/AngularFun:server.coffee:2:completion
completion
app.post '/people', (req, res) -> name = req.body.name message = "title": "Duplicate!" "message": "#{name} is a duplicate. Please enter a new name." return res.send(message, 403) if not isUniqueName name person = "id": "#{nextId++}" "name": "#{name}"
"age": "0" people.push person res.json person #res.header('Authenticated', 'NOPE') #res.send 'Conflictola', 401 app.listen port, -> console.log "Express server listening on port #{app.address().port} in #{app.settings.env} mode" open() )(require('express'), __dirname, process.argv.splice(2)[0])
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
8807e89f28a76910be41e712bbf14fe40c34fa1a
672
https://github.com/CaryLandholt/AngularFun/blob/8807e89f28a76910be41e712bbf14fe40c34fa1a/server.coffee
51
75
CaryLandholt/AngularFun:server.coffee:1:raw_corpus
raw_corpus
###global require, __dirname, process### ((express, dir, port = 3005) -> nextId = 0 people = [ {"id": "#{nextId++}", "name": "Cary"} {"id": "#{nextId++}", "name": "Saasha"} {"id": "#{nextId++}", "name": "Planet"} ] isUniqueName = (name) -> (name for person in people when person.name is name).length is 0 ...
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
a0fe3a453e28b488b6b711d2110bb1eeb574c8eb
672
https://github.com/CaryLandholt/AngularFun/blob/a0fe3a453e28b488b6b711d2110bb1eeb574c8eb/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:1:completion
completion
###global require, __dirname, process### ((express, dir, port = 3005) -> nextId = 0 people = [ {"id": "#{nextId++}", "name": "Cary"} {"id": "#{nextId++}", "name": "Saasha"} {"id": "#{nextId++}", "name": "Planet"} ] isUniqueName = (name) -> (name for person in people when person.name is name).length is 0 ...
spawn command, [url] app.configure -> app.set 'view options', layout: false app.use express.bodyParser() app.use express.static(dir) app.use app.router app.register '.html', compile: (str, options) -> (locals) -> str app.get '/', (req, res) -> res.render "#{dir}/index.html" app.get...
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
a0fe3a453e28b488b6b711d2110bb1eeb574c8eb
672
https://github.com/CaryLandholt/AngularFun/blob/a0fe3a453e28b488b6b711d2110bb1eeb574c8eb/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:2:raw_corpus
raw_corpus
message = "title": "Duplicate!" "message": "#{name} is a duplicate. Please enter a new name." return res.send(message, 403) if not isUniqueName name person = "id": "#{nextId++}" "name": "#{name}" people.push person res.json person #res.header('Authenticated', 'NOPE') #res.send 'Co...
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
a0fe3a453e28b488b6b711d2110bb1eeb574c8eb
672
https://github.com/CaryLandholt/AngularFun/blob/a0fe3a453e28b488b6b711d2110bb1eeb574c8eb/server.coffee
51
70
CaryLandholt/AngularFun:server.coffee:2:completion
completion
message = "title": "Duplicate!" "message": "#{name} is a duplicate. Please enter a new name." return res.send(message, 403) if not isUniqueName name person = "id": "#{nextId++}" "name": "#{name}"
people.push person res.json person #res.header('Authenticated', 'NOPE') #res.send 'Conflictola', 401 app.listen port, -> console.log "Express server listening on port #{app.address().port} in #{app.settings.env} mode" open() )(require('express'), __dirname, process.argv.splice(2)[0])
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
a0fe3a453e28b488b6b711d2110bb1eeb574c8eb
672
https://github.com/CaryLandholt/AngularFun/blob/a0fe3a453e28b488b6b711d2110bb1eeb574c8eb/server.coffee
51
70
CaryLandholt/AngularFun:server.coffee:1:raw_corpus
raw_corpus
###global require, __dirname, process### ((express, dir, port = 3005) -> people = [ {"id": 0, "name": "Cary"} {"id": 1, "name": "Saasha"} {"id": 2, "name": "Planet"} ] app = express.createServer() open = (command = 'open') -> url = "http://localhost:#{app.address().port}" ostype = require('os').type() ...
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
0ae299ec8a05ddbfb2e26f04898245b95f7ab37c
672
https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:1:completion
completion
###global require, __dirname, process### ((express, dir, port = 3005) -> people = [ {"id": 0, "name": "Cary"} {"id": 1, "name": "Saasha"} {"id": 2, "name": "Planet"} ] app = express.createServer() open = (command = 'open') -> url = "http://localhost:#{app.address().port}" ostype = require('os').type() ...
app.use express.bodyParser() app.use express.static(dir) app.use app.router app.register '.html', compile: (str, options) -> (locals) -> str app.get '/', (req, res) -> res.render "#{dir}/index.html" app.get '/members', (req, res) -> res.json people app.post '/members', (req, res) -> ...
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
0ae299ec8a05ddbfb2e26f04898245b95f7ab37c
672
https://github.com/CaryLandholt/AngularFun/blob/0ae299ec8a05ddbfb2e26f04898245b95f7ab37c/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:1:raw_corpus
raw_corpus
###global require, __dirname, process### ((express, dir, port = 3005) -> people = [ {"name": "Cary"} {"name": "Saasha"} {"name": "Planet"} ] app = express.createServer() open = (command = 'open') -> url = "http://localhost:#{app.address().port}" ostype = require('os').type() command = 'explorer' if o...
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
0a646d2281b057df758d819b5e9224a0ad3461d6
672
https://github.com/CaryLandholt/AngularFun/blob/0a646d2281b057df758d819b5e9224a0ad3461d6/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ###global require, __dirname, process### ((express, dir, port = 3005) -> people = [ {"name": "Cary"} {"name": "Saasha"} {"name": "Planet"} ] app = express.createServer() open = (command = 'open') -> url = "http://localhost:#{app.address().port}" ...
/*global require, __dirname, process*/ (function(express, dir, port = 3005) { var app, open, people; people = [ { "name": "Cary" }, { "name": "Saasha" }, { "name": "Planet" } ]; app = express.createServer(); open = function(command = 'open') { var ostype, spawn, u...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
server.coffee
MIT
0a646d2281b057df758d819b5e9224a0ad3461d6
672
https://github.com/CaryLandholt/AngularFun/blob/0a646d2281b057df758d819b5e9224a0ad3461d6/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /*global require, __dirname, process*/ (function(express, dir, port = 3005) { var app, open, people; people = [ { "name": "Cary" }, { "name": "Saasha" }, { "name": "Planet" } ]; app = express.createServer(); open ...
###global require, __dirname, process### ((express, dir, port = 3005) -> people = [ {"name": "Cary"} {"name": "Saasha"} {"name": "Planet"} ] app = express.createServer() open = (command = 'open') -> url = "http://localhost:#{app.address().port}" ostype = require('os').type() command = 'explorer' if o...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
0a646d2281b057df758d819b5e9224a0ad3461d6
672
https://github.com/CaryLandholt/AngularFun/blob/0a646d2281b057df758d819b5e9224a0ad3461d6/server.coffee
1
50
CaryLandholt/AngularFun:server.coffee:1:completion
completion
###global require, __dirname, process### ((express, dir, port = 3005) -> people = [ {"name": "Cary"} {"name": "Saasha"} {"name": "Planet"} ] app = express.createServer() open = (command = 'open') -> url = "http://localhost:#{app.address().port}" ostype = require('os').type() command = 'explorer' if o...
app.use express.bodyParser() app.use express.static(dir) app.use app.router app.register '.html', compile: (str, options) -> (locals) -> str app.get '/', (req, res) -> res.render "#{dir}/index.html" app.get '/members', (req, res) -> res.json people app.post '/members', (req, res) -> ...
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
server.coffee
MIT
0a646d2281b057df758d819b5e9224a0ad3461d6
672
https://github.com/CaryLandholt/AngularFun/blob/0a646d2281b057df758d819b5e9224a0ad3461d6/server.coffee
1
50
jianliaoim/talk-os:talk-web/client/actions/room.coffee:1:raw_corpus
raw_corpus
exports.fetch = (_roomId, success, fail) -> api.rooms.readone.get(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/fetch', data: resp success? resp .catch (error) -> fail? error
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
14
20
jianliaoim/talk-os:talk-web/client/actions/room.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.fetch = (_roomId, success, fail) -> api.rooms.readone.get(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/fetch', data: resp success? resp .catch (error) -> fail? error ```
exports.fetch = function(_roomId, success, fail) { return api.rooms.readone.get({ pathParams: { id: _roomId } }).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/fetch', data: resp }); return typeof success === "function" ? success(resp) : void 0; }).catch(fun...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
14
20
jianliaoim/talk-os:talk-web/client/actions/room.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.fetch = function(_roomId, success, fail) { return api.rooms.readone.get({ pathParams: { id: _roomId } }).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/fetch', data: resp }); return typeof success ...
exports.fetch = (_roomId, success, fail) -> api.rooms.readone.get(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/fetch', data: resp success? resp .catch (error) -> fail? error
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
14
20
jianliaoim/talk-os:talk-web/client/actions/room.coffee:1:completion
completion
exports.fetch = (_roomId, success, fail) -> api.rooms.readone.get(pathParams: id: _roomId) .then (resp) ->
dispatcher.handleViewAction type: 'topic/fetch', data: resp success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
14
20
jianliaoim/talk-os:talk-web/client/actions/room.coffee:2:raw_corpus
raw_corpus
exports.roomJoin = (_teamId, _roomId, success, fail) -> api.rooms.join.post(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/fetch', data: resp data = query.user(recorder.getState()).toJS() data._teamId = _teamId data._roomId = resp._id dispatcher.han...
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
22
32
jianliaoim/talk-os:talk-web/client/actions/room.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.roomJoin = (_teamId, _roomId, success, fail) -> api.rooms.join.post(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/fetch', data: resp data = query.user(recorder.getState()).toJS() data._teamId = _...
exports.roomJoin = function(_teamId, _roomId, success, fail) { return api.rooms.join.post({ pathParams: { id: _roomId } }).then(function(resp) { var data; dispatcher.handleViewAction({ type: 'topic/fetch', data: resp }); data = query.user(recorder.getState()).toJS(); da...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
22
32
jianliaoim/talk-os:talk-web/client/actions/room.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.roomJoin = function(_teamId, _roomId, success, fail) { return api.rooms.join.post({ pathParams: { id: _roomId } }).then(function(resp) { var data; dispatcher.handleViewAction({ type: 'topic/fetch', data: resp }); ...
exports.roomJoin = (_teamId, _roomId, success, fail) -> api.rooms.join.post(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/fetch', data: resp data = query.user(recorder.getState()).toJS() data._teamId = _teamId data._roomId = resp._id dispatcher.han...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
22
32
jianliaoim/talk-os:talk-web/client/actions/room.coffee:2:completion
completion
exports.roomJoin = (_teamId, _roomId, success, fail) -> api.rooms.join.post(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/fetch', data: resp data = query.user(recorder.getState()).toJS()
data._teamId = _teamId data._roomId = resp._id dispatcher.handleViewAction type: 'topic/join', data: data success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
22
32
jianliaoim/talk-os:talk-web/client/actions/room.coffee:3:raw_corpus
raw_corpus
exports.roomLeave = (_teamId, _roomId, success, fail) -> _userId = query.user(recorder.getState()).get('_id') api.rooms.leave.post(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/leave' data: {_roomId, _userId, _teamId} success? resp .catch (erro...
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
34
43
jianliaoim/talk-os:talk-web/client/actions/room.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.roomLeave = (_teamId, _roomId, success, fail) -> _userId = query.user(recorder.getState()).get('_id') api.rooms.leave.post(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/leave' data: {_roomI...
exports.roomLeave = function(_teamId, _roomId, success, fail) { var _userId; _userId = query.user(recorder.getState()).get('_id'); return api.rooms.leave.post({ pathParams: { id: _roomId } }).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/leave', data: {_roomId, _...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
34
43
jianliaoim/talk-os:talk-web/client/actions/room.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.roomLeave = function(_teamId, _roomId, success, fail) { var _userId; _userId = query.user(recorder.getState()).get('_id'); return api.rooms.leave.post({ pathParams: { id: _roomId } }).then(function(resp) { dispatcher.handleViewActi...
exports.roomLeave = (_teamId, _roomId, success, fail) -> _userId = query.user(recorder.getState()).get('_id') api.rooms.leave.post(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/leave' data: {_roomId, _userId, _teamId} success? resp .catch (erro...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
34
43
jianliaoim/talk-os:talk-web/client/actions/room.coffee:3:completion
completion
exports.roomLeave = (_teamId, _roomId, success, fail) -> _userId = query.user(recorder.getState()).get('_id') api.rooms.leave.post(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction
type: 'topic/leave' data: {_roomId, _userId, _teamId} success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
34
43
jianliaoim/talk-os:talk-web/client/actions/room.coffee:4:raw_corpus
raw_corpus
exports.roomInvite = (_roomId, data, success, fail) -> config = pathParams: id: _roomId data: data api.rooms.invite.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/join', data: resp success? resp .catch (error) -> fail? error
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
45
55
jianliaoim/talk-os:talk-web/client/actions/room.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.roomInvite = (_roomId, data, success, fail) -> config = pathParams: id: _roomId data: data api.rooms.invite.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/join', data: resp success? resp .catch ...
exports.roomInvite = function(_roomId, data, success, fail) { var config; config = { pathParams: { id: _roomId }, data: data }; return api.rooms.invite.post(config).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/join', data: resp }); return typeof succ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
45
55
jianliaoim/talk-os:talk-web/client/actions/room.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.roomInvite = function(_roomId, data, success, fail) { var config; config = { pathParams: { id: _roomId }, data: data }; return api.rooms.invite.post(config).then(function(resp) { dispatcher.handleViewAction({ type: 'topic...
exports.roomInvite = (_roomId, data, success, fail) -> config = pathParams: id: _roomId data: data api.rooms.invite.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/join', data: resp success? resp .catch (error) -> fail? error
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
45
55
jianliaoim/talk-os:talk-web/client/actions/room.coffee:4:completion
completion
exports.roomInvite = (_roomId, data, success, fail) -> config = pathParams: id: _roomId data: data
api.rooms.invite.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/join', data: resp success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
45
55
jianliaoim/talk-os:talk-web/client/actions/room.coffee:5:raw_corpus
raw_corpus
exports.roomCreate = (data, success, fail) -> api.rooms.create.post(data: data) .then (resp) -> dispatcher.handleViewAction type: 'topic/create' data: resp notifyActions.success lang.getText('create-topic-success') success? resp .catch (error) -> fail? error
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
57
66
jianliaoim/talk-os:talk-web/client/actions/room.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.roomCreate = (data, success, fail) -> api.rooms.create.post(data: data) .then (resp) -> dispatcher.handleViewAction type: 'topic/create' data: resp notifyActions.success lang.getText('create-topic-success') success?...
exports.roomCreate = function(data, success, fail) { return api.rooms.create.post({ data: data }).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/create', data: resp }); notifyActions.success(lang.getText('create-topic-success')); return typeof success === "function"...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
57
66
jianliaoim/talk-os:talk-web/client/actions/room.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.roomCreate = function(data, success, fail) { return api.rooms.create.post({ data: data }).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/create', data: resp }); notifyActions.success(lang.getText('create-top...
exports.roomCreate = (data, success, fail) -> api.rooms.create.post(data: data) .then (resp) -> dispatcher.handleViewAction type: 'topic/create' data: resp notifyActions.success lang.getText('create-topic-success') success? resp .catch (error) -> fail? error
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
57
66
jianliaoim/talk-os:talk-web/client/actions/room.coffee:5:completion
completion
exports.roomCreate = (data, success, fail) -> api.rooms.create.post(data: data) .then (resp) -> dispatcher.handleViewAction type: 'topic/create'
data: resp notifyActions.success lang.getText('create-topic-success') success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
57
66
jianliaoim/talk-os:talk-web/client/actions/room.coffee:6:raw_corpus
raw_corpus
exports.roomRemove = (_roomId, success, fail) -> api.rooms.remove.delete(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/remove' data: resp notifyActions.success lang.getText('remove-topic-success') success? resp .catch (error) -> fail?...
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
68
77
jianliaoim/talk-os:talk-web/client/actions/room.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.roomRemove = (_roomId, success, fail) -> api.rooms.remove.delete(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/remove' data: resp notifyActions.success lang.getText('remove-topic-succes...
exports.roomRemove = function(_roomId, success, fail) { return api.rooms.remove.delete({ pathParams: { id: _roomId } }).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/remove', data: resp }); notifyActions.success(lang.getText('remove-topic-success')); retu...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
68
77
jianliaoim/talk-os:talk-web/client/actions/room.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.roomRemove = function(_roomId, success, fail) { return api.rooms.remove.delete({ pathParams: { id: _roomId } }).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/remove', data: resp }); notifyActions....
exports.roomRemove = (_roomId, success, fail) -> api.rooms.remove.delete(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/remove' data: resp notifyActions.success lang.getText('remove-topic-success') success? resp .catch (error) -> fail?...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
68
77
jianliaoim/talk-os:talk-web/client/actions/room.coffee:6:completion
completion
exports.roomRemove = (_roomId, success, fail) -> api.rooms.remove.delete(pathParams: id: _roomId) .then (resp) -> dispatcher.handleViewAction type: 'topic/remove'
data: resp notifyActions.success lang.getText('remove-topic-success') success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
68
77
jianliaoim/talk-os:talk-web/client/actions/room.coffee:7:raw_corpus
raw_corpus
exports.roomRemoveMember = (data, success, fail) -> config = pathParams: id: data._roomId data: _userId: data._userId api.rooms.removemember.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/remove-member' data: data notifyActions.success lang....
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
79
93
jianliaoim/talk-os:talk-web/client/actions/room.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.roomRemoveMember = (data, success, fail) -> config = pathParams: id: data._roomId data: _userId: data._userId api.rooms.removemember.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/remove-mem...
exports.roomRemoveMember = function(data, success, fail) { var config; config = { pathParams: { id: data._roomId }, data: { _userId: data._userId } }; return api.rooms.removemember.post(config).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/remove-member',...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
79
93
jianliaoim/talk-os:talk-web/client/actions/room.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.roomRemoveMember = function(data, success, fail) { var config; config = { pathParams: { id: data._roomId }, data: { _userId: data._userId } }; return api.rooms.removemember.post(config).then(function(resp) { dispatche...
exports.roomRemoveMember = (data, success, fail) -> config = pathParams: id: data._roomId data: _userId: data._userId api.rooms.removemember.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/remove-member' data: data notifyActions.success lang....
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
79
93
jianliaoim/talk-os:talk-web/client/actions/room.coffee:7:completion
completion
exports.roomRemoveMember = (data, success, fail) -> config = pathParams: id: data._roomId data: _userId: data._userId api.rooms.removemember.post(config)
.then (resp) -> dispatcher.handleViewAction type: 'topic/remove-member' data: data notifyActions.success lang.getText('topic-remove-member-success') success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
79
93
jianliaoim/talk-os:talk-web/client/actions/room.coffee:8:raw_corpus
raw_corpus
exports.roomArchive = (_roomId, isArchived, success, fail) -> config = pathParams: id: _roomId data: isArchived: isArchived api.rooms.archive.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/archive' data: resp success? resp .catch (error)...
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
95
108
jianliaoim/talk-os:talk-web/client/actions/room.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.roomArchive = (_roomId, isArchived, success, fail) -> config = pathParams: id: _roomId data: isArchived: isArchived api.rooms.archive.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/archive' ...
exports.roomArchive = function(_roomId, isArchived, success, fail) { var config; config = { pathParams: { id: _roomId }, data: { isArchived: isArchived } }; return api.rooms.archive.post(config).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/archive', ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
95
108
jianliaoim/talk-os:talk-web/client/actions/room.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.roomArchive = function(_roomId, isArchived, success, fail) { var config; config = { pathParams: { id: _roomId }, data: { isArchived: isArchived } }; return api.rooms.archive.post(config).then(function(resp) { dispatch...
exports.roomArchive = (_roomId, isArchived, success, fail) -> config = pathParams: id: _roomId data: isArchived: isArchived api.rooms.archive.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/archive' data: resp success? resp .catch (error)...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
95
108
jianliaoim/talk-os:talk-web/client/actions/room.coffee:8:completion
completion
exports.roomArchive = (_roomId, isArchived, success, fail) -> config = pathParams: id: _roomId data: isArchived: isArchived api.rooms.archive.post(config)
.then (resp) -> dispatcher.handleViewAction type: 'topic/archive' data: resp success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
95
108
jianliaoim/talk-os:talk-web/client/actions/room.coffee:9:raw_corpus
raw_corpus
exports.roomUpdate = (_roomId, data, success, fail) -> config = pathParams: id: _roomId data: data api.rooms.update.put(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/update' data: resp success? resp .catch (error) -> fail? error
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
110
122
jianliaoim/talk-os:talk-web/client/actions/room.coffee:9:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.roomUpdate = (_roomId, data, success, fail) -> config = pathParams: id: _roomId data: data api.rooms.update.put(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/update' data: resp success? ...
exports.roomUpdate = function(_roomId, data, success, fail) { var config; config = { pathParams: { id: _roomId }, data: data }; return api.rooms.update.put(config).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/update', data: resp }); return typeof suc...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
110
122
jianliaoim/talk-os:talk-web/client/actions/room.coffee:9:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.roomUpdate = function(_roomId, data, success, fail) { var config; config = { pathParams: { id: _roomId }, data: data }; return api.rooms.update.put(config).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/...
exports.roomUpdate = (_roomId, data, success, fail) -> config = pathParams: id: _roomId data: data api.rooms.update.put(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/update' data: resp success? resp .catch (error) -> fail? error
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
110
122
jianliaoim/talk-os:talk-web/client/actions/room.coffee:9:completion
completion
exports.roomUpdate = (_roomId, data, success, fail) -> config = pathParams: id: _roomId data: data api.rooms.update.put(config)
.then (resp) -> dispatcher.handleViewAction type: 'topic/update' data: resp success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
110
122
jianliaoim/talk-os:talk-web/client/actions/room.coffee:10:raw_corpus
raw_corpus
exports.roomUpdateGuest = (_roomId, enabled, success, fail) -> config = pathParams: id: _roomId data: isGuestEnabled: enabled api.rooms.guest.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/update' data: resp success? resp .catch (error) ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
124
137
jianliaoim/talk-os:talk-web/client/actions/room.coffee:10:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.roomUpdateGuest = (_roomId, enabled, success, fail) -> config = pathParams: id: _roomId data: isGuestEnabled: enabled api.rooms.guest.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/update' ...
exports.roomUpdateGuest = function(_roomId, enabled, success, fail) { var config; config = { pathParams: { id: _roomId }, data: { isGuestEnabled: enabled } }; return api.rooms.guest.post(config).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/update', ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
124
137
jianliaoim/talk-os:talk-web/client/actions/room.coffee:10:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.roomUpdateGuest = function(_roomId, enabled, success, fail) { var config; config = { pathParams: { id: _roomId }, data: { isGuestEnabled: enabled } }; return api.rooms.guest.post(config).then(function(resp) { dispatch...
exports.roomUpdateGuest = (_roomId, enabled, success, fail) -> config = pathParams: id: _roomId data: isGuestEnabled: enabled api.rooms.guest.post(config) .then (resp) -> dispatcher.handleViewAction type: 'topic/update' data: resp success? resp .catch (error) ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
124
137
jianliaoim/talk-os:talk-web/client/actions/room.coffee:10:completion
completion
exports.roomUpdateGuest = (_roomId, enabled, success, fail) -> config = pathParams: id: _roomId data: isGuestEnabled: enabled api.rooms.guest.post(config)
.then (resp) -> dispatcher.handleViewAction type: 'topic/update' data: resp success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
124
137
jianliaoim/talk-os:talk-web/client/actions/room.coffee:11:raw_corpus
raw_corpus
exports.create = (data, success, fail) -> config = data: data api.rooms.create.post config .then (resp) -> dispatcher.handleViewAction type: 'topic/create' data: resp notifyActions.success lang.getText('create-topic-success') success? resp .catch (error) -> fail?...
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
139
151
jianliaoim/talk-os:talk-web/client/actions/room.coffee:11:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.create = (data, success, fail) -> config = data: data api.rooms.create.post config .then (resp) -> dispatcher.handleViewAction type: 'topic/create' data: resp notifyActions.success lang.getText('create-topic-succes...
exports.create = function(data, success, fail) { var config; config = { data: data }; return api.rooms.create.post(config).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/create', data: resp }); notifyActions.success(lang.getText('create-topic-success')); return ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
139
151
jianliaoim/talk-os:talk-web/client/actions/room.coffee:11:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.create = function(data, success, fail) { var config; config = { data: data }; return api.rooms.create.post(config).then(function(resp) { dispatcher.handleViewAction({ type: 'topic/create', data: resp }); notifyActions.suc...
exports.create = (data, success, fail) -> config = data: data api.rooms.create.post config .then (resp) -> dispatcher.handleViewAction type: 'topic/create' data: resp notifyActions.success lang.getText('create-topic-success') success? resp .catch (error) -> fail?...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
139
151
jianliaoim/talk-os:talk-web/client/actions/room.coffee:11:completion
completion
exports.create = (data, success, fail) -> config = data: data api.rooms.create.post config .then (resp) ->
dispatcher.handleViewAction type: 'topic/create' data: resp notifyActions.success lang.getText('create-topic-success') success? resp .catch (error) -> fail? error
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/room.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/room.coffee
139
151
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:1:completion
completion
### # Copyright (c) 2013-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
$scope.smallLimit = 10 $scope.largeLimit = 20 $scope.uniqueVisitorLimit = $scope.smallLimit $scope.browserLimit = $scope.smallLimit $scope.topDashboardsLimit = $scope.smallLimit $scope.dataSourcesLimit = $scope.smallLimit $scope.dataSourceTypeLimit = $scope.smallLimit $scope.widgetTypeLimit...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:raw_corpus
raw_corpus
$scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = data: type: 'pie' $scope.widgetOptions ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
84
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = ...
$scope.visitsOptions = { x_accessor: 'date', y_accessor: 'visits', mouseover: function(d, i) { return d.visits + ' visit' + (d.visits === 1 ? '' : 's') + ' | ' + moment(d.date).format('MMM Do HH:mm'); } }; $scope.browserOptions = { data: { type: 'pie' } }; $scope.widgetOptions = { data: { ty...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
84
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript $scope.visitsOptions = { x_accessor: 'date', y_accessor: 'visits', mouseover: function(d, i) { return d.visits + ' visit' + (d.visits === 1 ? '' : 's') + ' | ' + moment(d.date).format('MMM Do HH:mm'); } }; $scope.browserOptions = { data: { type: ...
$scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = data: type: 'pie' $scope.widgetOptions ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
84
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:completion
completion
$scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = data: type: 'pie' $scope.widgetOptions ...
$scope.toggleVisitors = -> $scope.showVisitors = not $scope.showVisitors # Analytics over time $scope.loadLifetimeData = -> analyticsService.getStatistics().then (statistics) -> $scope.statistics = statistics # Analytics relative to a startDate $scope.loadTimeseriesData = ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
84
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:3:raw_corpus
raw_corpus
analyticsService.getVisitsOverTime(null, startDate).then (visits) -> $scope.visits = visits analyticsService.getUniqueVisitors(null, startDate).then (visitors) -> $scope.uniqueVisitorCount = visitors.length $scope.uniqueVisitors = visitors analyticsService.getBrowse...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
86
128
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript analyticsService.getVisitsOverTime(null, startDate).then (visits) -> $scope.visits = visits analyticsService.getUniqueVisitors(null, startDate).then (visitors) -> $scope.uniqueVisitorCount = visitors.length $scope.uniq...
analyticsService.getVisitsOverTime(null, startDate).then(function(visits) { return $scope.visits = visits; }); analyticsService.getUniqueVisitors(null, startDate).then(function(visitors) { $scope.uniqueVisitorCount = visitors.length; return $scope.uniqueVisitors = visitors; }); analyticsService.getBrowsers(null...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
86
128
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript analyticsService.getVisitsOverTime(null, startDate).then(function(visits) { return $scope.visits = visits; }); analyticsService.getUniqueVisitors(null, startDate).then(function(visitors) { $scope.uniqueVisitorCount = visitors.length; return $scope.uniqueVisi...
analyticsService.getVisitsOverTime(null, startDate).then (visits) -> $scope.visits = visits analyticsService.getUniqueVisitors(null, startDate).then (visitors) -> $scope.uniqueVisitorCount = visitors.length $scope.uniqueVisitors = visitors analyticsService.getBrowse...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
86
128
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:3:completion
completion
analyticsService.getVisitsOverTime(null, startDate).then (visits) -> $scope.visits = visits analyticsService.getUniqueVisitors(null, startDate).then (visitors) -> $scope.uniqueVisitorCount = visitors.length $scope.uniqueVisitors = visitors analyticsService.getBrowse...
$scope.browsersPie = [reducedBrowsers] analyticsService.getDataSourcesByType(null, startDate).then (dataSourcesByType) -> $scope.dataSourcesByType = dataSourcesByType $scope.dataSourceTypesOptions.data.keys = { value: _.pluck dataSourcesByType, 'dataSourceType' } reducedTyp...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
86
128
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:4:raw_corpus
raw_corpus
$scope.widgetsPie = [reducedWidgets] analyticsService.getDataSourcesByName(null, startDate).then (dataSources) -> $scope.dataSources = dataSources # Initialize $scope.loadLifetimeData() $scope.$watch 'selectedTimespan', (timespan) -> $scope.loadTimeseriesData()
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
130
139
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:4:completion
completion
$scope.widgetsPie = [reducedWidgets] analyticsService.getDataSourcesByName(null, startDate).then (dataSources) -> $scope.dataSources = dataSources
# Initialize $scope.loadLifetimeData() $scope.$watch 'selectedTimespan', (timespan) -> $scope.loadTimeseriesData()
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
130
139
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
b56e43a76db5194d1381575b1f85b8905693799e
1,544
https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
b56e43a76db5194d1381575b1f85b8905693799e
1,544
https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
b56e43a76db5194d1381575b1f85b8905693799e
1,544
https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:1:completion
completion
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
$scope.smallLimit = 10 $scope.largeLimit = 20 $scope.uniqueVisitorLimit = $scope.smallLimit $scope.browserLimit = $scope.smallLimit $scope.topDashboardsLimit = $scope.smallLimit $scope.dataSourcesLimit = $scope.smallLimit $scope.dataSourceTypeLimit = $scope.smallLimit $scope.widgetTypeLimit...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
b56e43a76db5194d1381575b1f85b8905693799e
1,544
https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:raw_corpus
raw_corpus
$scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = data: type: 'pie' $scope.widgetOptions ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
b56e43a76db5194d1381575b1f85b8905693799e
1,544
https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
84
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = ...
$scope.visitsOptions = { x_accessor: 'date', y_accessor: 'visits', mouseover: function(d, i) { return d.visits + ' visit' + (d.visits === 1 ? '' : 's') + ' | ' + moment(d.date).format('MMM Do HH:mm'); } }; $scope.browserOptions = { data: { type: 'pie' } }; $scope.widgetOptions = { data: { ty...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
b56e43a76db5194d1381575b1f85b8905693799e
1,544
https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
84
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript $scope.visitsOptions = { x_accessor: 'date', y_accessor: 'visits', mouseover: function(d, i) { return d.visits + ' visit' + (d.visits === 1 ? '' : 's') + ' | ' + moment(d.date).format('MMM Do HH:mm'); } }; $scope.browserOptions = { data: { type: ...
$scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = data: type: 'pie' $scope.widgetOptions ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
b56e43a76db5194d1381575b1f85b8905693799e
1,544
https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
84
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:completion
completion
$scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = data: type: 'pie' $scope.widgetOptions ...
$scope.toggleVisitors = -> $scope.showVisitors = not $scope.showVisitors # Analytics over time $scope.loadLifetimeData = -> analyticsService.getTopDashboards().then (dashboards) -> $scope.topDashboards = dashboards analyticsService.getStatistics().then (statistics) -> ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
b56e43a76db5194d1381575b1f85b8905693799e
1,544
https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
84
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:raw_corpus
raw_corpus
$scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = data: type: 'pie' $scope.widgetOptions ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
df26fc48ea0296697e2755b7a1d9ce5cf50a4483
1,544
https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
90
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = ...
$scope.visitsOptions = { x_accessor: 'date', y_accessor: 'visits', mouseover: function(d, i) { return d.visits + ' visit' + (d.visits === 1 ? '' : 's') + ' | ' + moment(d.date).format('MMM Do HH:mm'); } }; $scope.browserOptions = { data: { type: 'pie' } }; $scope.widgetOptions = { data: { ty...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
df26fc48ea0296697e2755b7a1d9ce5cf50a4483
1,544
https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
90
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript $scope.visitsOptions = { x_accessor: 'date', y_accessor: 'visits', mouseover: function(d, i) { return d.visits + ' visit' + (d.visits === 1 ? '' : 's') + ' | ' + moment(d.date).format('MMM Do HH:mm'); } }; $scope.browserOptions = { data: { type: ...
$scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = data: type: 'pie' $scope.widgetOptions ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
df26fc48ea0296697e2755b7a1d9ce5cf50a4483
1,544
https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
90
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:2:completion
completion
$scope.visitsOptions = x_accessor: 'date' y_accessor: 'visits' mouseover: (d, i) -> d.visits + ' visit' + (if d.visits == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm') $scope.browserOptions = data: type: 'pie' $scope.widgetOptions ...
# Analytics over time $scope.loadLifetimeData = -> analyticsService.getStatistics().then (statistics) -> $scope.statistics = statistics analyticsService.getUniqueVisitors().then (visitors) -> $scope.uniqueVisitorCount = visitors.length $scope.uniqueVisitors = vi...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
df26fc48ea0296697e2755b7a1d9ce5cf50a4483
1,544
https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
44
90
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:3:raw_corpus
raw_corpus
$scope.browsersPie = [reducedBrowsers] analyticsService.getDataSourcesByType().then (dataSourcesByType) -> $scope.dataSourcesByType = dataSourcesByType $scope.dataSourceTypesOptions.data.keys = { value: _.pluck dataSourcesByType, 'dataSourceType' } reducedTypes = _.reduce d...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
df26fc48ea0296697e2755b7a1d9ce5cf50a4483
1,544
https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
92
130
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:3:completion
completion
$scope.browsersPie = [reducedBrowsers] analyticsService.getDataSourcesByType().then (dataSourcesByType) -> $scope.dataSourcesByType = dataSourcesByType $scope.dataSourceTypesOptions.data.keys = { value: _.pluck dataSourcesByType, 'dataSourceType' } reducedTypes = _.reduce d...
result[widget.widget] = widget.widgetViews return result , {} $scope.widgetsPie = [reducedWidgets] analyticsService.getTopDashboards().then (dashboards) -> $scope.topDashboards = dashboards analyticsService.getDataSourcesByName().then (dataSources) ...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
df26fc48ea0296697e2755b7a1d9ce5cf50a4483
1,544
https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
92
130
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:4:raw_corpus
raw_corpus
analyticsService.getVisitsOverTime(null, startDate).then (visits) -> $scope.visits = visits # Initialize $scope.loadLifetimeData() $scope.$watch 'selectedTimespan', (timespan) -> $scope.loadTimeseriesData()
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
df26fc48ea0296697e2755b7a1d9ce5cf50a4483
1,544
https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
132
139
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript analyticsService.getVisitsOverTime(null, startDate).then (visits) -> $scope.visits = visits # Initialize $scope.loadLifetimeData() $scope.$watch 'selectedTimespan', (timespan) -> $scope.loadTimeseriesData() ```
analyticsService.getVisitsOverTime(null, startDate).then(function(visits) { return $scope.visits = visits; }); // Initialize $scope.loadLifetimeData(); $scope.$watch('selectedTimespan', function(timespan) { return $scope.loadTimeseriesData(); });
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
df26fc48ea0296697e2755b7a1d9ce5cf50a4483
1,544
https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
132
139
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript analyticsService.getVisitsOverTime(null, startDate).then(function(visits) { return $scope.visits = visits; }); // Initialize $scope.loadLifetimeData(); $scope.$watch('selectedTimespan', function(timespan) { return $scope.loadTimeseriesData(); }); ```
analyticsService.getVisitsOverTime(null, startDate).then (visits) -> $scope.visits = visits # Initialize $scope.loadLifetimeData() $scope.$watch 'selectedTimespan', (timespan) -> $scope.loadTimeseriesData()
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
df26fc48ea0296697e2755b7a1d9ce5cf50a4483
1,544
https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
132
139
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:4:completion
completion
analyticsService.getVisitsOverTime(null, startDate).then (visits) -> $scope.visits = visits # Initialize
$scope.loadLifetimeData() $scope.$watch 'selectedTimespan', (timespan) -> $scope.loadTimeseriesData()
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
df26fc48ea0296697e2755b7a1d9ce5cf50a4483
1,544
https://github.com/ExpediaGroup/cyclotron/blob/df26fc48ea0296697e2755b7a1d9ce5cf50a4483/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
132
139
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
14b0e411415be801f94fe13ea6f63d5ad957c2ed
1,544
https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
1
42
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.analytics.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2013-2015 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2013-2015 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
MIT
14b0e411415be801f94fe13ea6f63d5ad957c2ed
1,544
https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.analytics.coffee
1
42