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
Atraci/Atraci:coffee/_player.coffee:5:completion
completion
$('#PlayerContainer .info .track-info .action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.code userTracking.event("Playback Error", video_error_codes[code], __currentTrack.artist + ' - ' + __currentTrack.title).send() alert 'Playback Error (...
$('#PlayerContainer .volume-current').css({'width': (percentage) * 100 + '%'}) if percentage > 0.5 $('#PlayerContainer .controls .volume-icon .action i.fa-volume-up').show() $('#PlayerContainer .controls .volume-icon .action i.fa-volume-down').hide() $('#PlayerContainer .controls .volume-ico...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
dd2c3b38f9c11d7208d14199ad27b3f9512f3a36
800
https://github.com/Atraci/Atraci/blob/dd2c3b38f9c11d7208d14199ad27b3f9512f3a36/coffee/_player.coffee
154
191
Atraci/Atraci:coffee/_player.coffee:5:raw_corpus
raw_corpus
$('#PlayerContainer .info .track-info .action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.code userTracking.event("Playback Error", video_error_codes[code], __currentTrack.artist + ' - ' + __currentTrack.title).send() alert 'Playback Error (...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
978a3c17e1eaf3d94e0fabc8625c36ba28a482b2
800
https://github.com/Atraci/Atraci/blob/978a3c17e1eaf3d94e0fabc8625c36ba28a482b2/coffee/_player.coffee
154
191
Atraci/Atraci:coffee/_player.coffee:5:completion
completion
$('#PlayerContainer .info .track-info .action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.code userTracking.event("Playback Error", video_error_codes[code], __currentTrack.artist + ' - ' + __currentTrack.title).send() alert 'Playback Error (...
$('#PlayerContainer .volume-current').css({'width': (percentage) * 100 + '%'}) if percentage > 0.5 $('#PlayerContainer .controls .volume-icon .action i.fa-volume-up').show() $('#PlayerContainer .controls .volume-icon .action i.fa-volume-down').hide() $('#PlayerContainer .controls .volume-ico...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
978a3c17e1eaf3d94e0fabc8625c36ba28a482b2
800
https://github.com/Atraci/Atraci/blob/978a3c17e1eaf3d94e0fabc8625c36ba28a482b2/coffee/_player.coffee
154
191
Atraci/Atraci:coffee/_player.coffee:3:raw_corpus
raw_corpus
PlayTrack = (artist, title, cover_url_medium, cover_url_large) -> userTracking.event("Player", "Play", artist + ' - ' + title).send() __currentTrack = artist: artist title: title __playerTracklist = __currentTracklist __CurrentSelectedTrack = Math.random() __LastSelectedTrack = _...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
54
103
Atraci/Atraci:coffee/_player.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript PlayTrack = (artist, title, cover_url_medium, cover_url_large) -> userTracking.event("Player", "Play", artist + ' - ' + title).send() __currentTrack = artist: artist title: title __playerTracklist = __currentTracklist __Current...
var PlayTrack; PlayTrack = function(artist, title, cover_url_medium, cover_url_large) { var __CurrentSelectedTrack, __LastSelectedTrack, __currentTrack, __playerTracklist, spinner_cover; userTracking.event("Player", "Play", artist + ' - ' + title).send(); __currentTrack = { artist: artist, title: title ...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
54
103
Atraci/Atraci:coffee/_player.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PlayTrack; PlayTrack = function(artist, title, cover_url_medium, cover_url_large) { var __CurrentSelectedTrack, __LastSelectedTrack, __currentTrack, __playerTracklist, spinner_cover; userTracking.event("Player", "Play", artist + ' - ' + title).send(); __...
PlayTrack = (artist, title, cover_url_medium, cover_url_large) -> userTracking.event("Player", "Play", artist + ' - ' + title).send() __currentTrack = artist: artist title: title __playerTracklist = __currentTracklist __CurrentSelectedTrack = Math.random() __LastSelectedTrack = _...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
54
103
Atraci/Atraci:coffee/_player.coffee:3:completion
completion
PlayTrack = (artist, title, cover_url_medium, cover_url_large) -> userTracking.event("Player", "Play", artist + ' - ' + title).send() __currentTrack = artist: artist title: title __playerTracklist = __currentTracklist __CurrentSelectedTrack = Math.random() __LastSelectedTrack = _...
$('#PlayerContainer .cover #loading-overlay').show() spinner_cover = new Spinner(spinner_cover_opts).spin($('#PlayerContainer .cover')[0]) $('#PlayerContainer .progress-current').css({'width': '0px'}) # not working ? $('#PlayerContainer .info .track-info .artist').html(artist) $('#PlayerContainer .inf...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
54
103
Atraci/Atraci:coffee/_player.coffee:4:raw_corpus
raw_corpus
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() ...
$.each(itag_priorities, function(i, itag) { if (stream_urls[itag]) { if (__CurrentSelectedTrack === __LastSelectedTrack) { videojs('video_player').src(stream_urls[itag]).play(); userTracking.event("Playback Info", "itag", itag).send(); } return false; } }); videojs('video_player'); // Keyb...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript $.each(itag_priorities, function(i, itag) { if (stream_urls[itag]) { if (__CurrentSelectedTrack === __LastSelectedTrack) { videojs('video_player').src(stream_urls[itag]).play(); userTracking.event("Playback Info", "itag", itag).send(); } r...
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:4:completion
completion
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
if $(@).hasClass('play') videojs('video_player').play() else videojs('video_player').pause() videojs('video_player').ready -> @.on 'loadedmetadata', -> $('#PlayerContainer .duration').text(moment(@duration()*1000).format('m:ss')) videojs('video_player').play() @.on 'timeu...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:5:raw_corpus
raw_corpus
@.on 'pause', -> $('#PlayerContainer .info .track-info .action i.pause').hide() $('#PlayerContainer .info .track-info .action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.code userTracking.event("Playback Error", video_error_codes[cod...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
154
194
Atraci/Atraci:coffee/_player.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @.on 'pause', -> $('#PlayerContainer .info .track-info .action i.pause').hide() $('#PlayerContainer .info .track-info .action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.code u...
this.on('pause', function() { $('#PlayerContainer .info .track-info .action i.pause').hide(); return $('#PlayerContainer .info .track-info .action i.play').show(); }); this.on('error', function(e) { var code; code = e.target.error ? e.target.error.code : e.code; userTracking.event("Playback Error", video_err...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
154
194
Atraci/Atraci:coffee/_player.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.on('pause', function() { $('#PlayerContainer .info .track-info .action i.pause').hide(); return $('#PlayerContainer .info .track-info .action i.play').show(); }); this.on('error', function(e) { var code; code = e.target.error ? e.target.error.code : e...
@.on 'pause', -> $('#PlayerContainer .info .track-info .action i.pause').hide() $('#PlayerContainer .info .track-info .action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.code userTracking.event("Playback Error", video_error_codes[cod...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
154
194
Atraci/Atraci:coffee/_player.coffee:5:completion
completion
@.on 'pause', -> $('#PlayerContainer .info .track-info .action i.pause').hide() $('#PlayerContainer .info .track-info .action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.code userTracking.event("Playback Error", video_error_codes[cod...
videojs('video_player').volume(percentage) $('#PlayerContainer .volume-current').css({'width': (percentage) * 100 + '%'}) if percentage > 0.5 $('#PlayerContainer .controls .volume-icon .action i.fa-volume-up').show() $('#PlayerContainer .controls .volume-icon .action i.fa-volume-down').hide() ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
b5ad2c415ec35975980aca57333c3f138246c8c6
800
https://github.com/Atraci/Atraci/blob/b5ad2c415ec35975980aca57333c3f138246c8c6/coffee/_player.coffee
154
194
Atraci/Atraci:coffee/_player.coffee:1:raw_corpus
raw_corpus
PlayNext = (artist, title, success) -> $.each __playerTracklist, (i, track) -> if track.artist == artist and track.title == title $('#tracklist-container .track-container').removeClass('playing'); if i < __playerTracklist.length - 1 t = __playerTracklist[i+1] ...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
26
38
Atraci/Atraci:coffee/_player.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript PlayNext = (artist, title, success) -> $.each __playerTracklist, (i, track) -> if track.artist == artist and track.title == title $('#tracklist-container .track-container').removeClass('playing'); if i < __playerTracklist.lengt...
var PlayNext; PlayNext = function(artist, title, success) { return $.each(__playerTracklist, function(i, track) { var t; if (track.artist === artist && track.title === title) { $('#tracklist-container .track-container').removeClass('playing'); if (i < __playerTracklist.length - 1) { t = _...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
26
38
Atraci/Atraci:coffee/_player.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PlayNext; PlayNext = function(artist, title, success) { return $.each(__playerTracklist, function(i, track) { var t; if (track.artist === artist && track.title === title) { $('#tracklist-container .track-container').removeClass('playing'); ...
PlayNext = (artist, title, success) -> $.each __playerTracklist, (i, track) -> if track.artist == artist and track.title == title $('#tracklist-container .track-container').removeClass('playing'); if i < __playerTracklist.length - 1 t = __playerTracklist[i+1] ...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
26
38
Atraci/Atraci:coffee/_player.coffee:1:completion
completion
PlayNext = (artist, title, success) -> $.each __playerTracklist, (i, track) -> if track.artist == artist and track.title == title $('#tracklist-container .track-container').removeClass('playing'); if i < __playerTracklist.length - 1 t = __playerTracklist[i+1]
$('#tracklist-container .track-container').eq(i+1).addClass('playing'); else t = __playerTracklist[0] $('#tracklist-container .track-container').eq(0).addClass('playing'); PlayTrack(t.artist, t.title, t.cover_url_medium, t.cover_url_large)
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
26
38
Atraci/Atraci:coffee/_player.coffee:2:raw_corpus
raw_corpus
PlayPrevious = (artist, title, success) -> $.each __playerTracklist, (i, track) -> if track.artist == artist and track.title == title $('#tracklist-container .track-container').removeClass('playing'); if i == 0 t = __playerTracklist[0] $('#tracklist-co...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
40
52
Atraci/Atraci:coffee/_player.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript PlayPrevious = (artist, title, success) -> $.each __playerTracklist, (i, track) -> if track.artist == artist and track.title == title $('#tracklist-container .track-container').removeClass('playing'); if i == 0 ...
var PlayPrevious; PlayPrevious = function(artist, title, success) { return $.each(__playerTracklist, function(i, track) { var t; if (track.artist === artist && track.title === title) { $('#tracklist-container .track-container').removeClass('playing'); if (i === 0) { t = __playerTracklist[...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
40
52
Atraci/Atraci:coffee/_player.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PlayPrevious; PlayPrevious = function(artist, title, success) { return $.each(__playerTracklist, function(i, track) { var t; if (track.artist === artist && track.title === title) { $('#tracklist-container .track-container').removeClass('playing...
PlayPrevious = (artist, title, success) -> $.each __playerTracklist, (i, track) -> if track.artist == artist and track.title == title $('#tracklist-container .track-container').removeClass('playing'); if i == 0 t = __playerTracklist[0] $('#tracklist-co...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
40
52
Atraci/Atraci:coffee/_player.coffee:2:completion
completion
PlayPrevious = (artist, title, success) -> $.each __playerTracklist, (i, track) -> if track.artist == artist and track.title == title $('#tracklist-container .track-container').removeClass('playing'); if i == 0 t = __playerTracklist[0]
$('#tracklist-container .track-container').eq(0).addClass('playing'); else t = __playerTracklist[i-1] $('#tracklist-container .track-container').eq(i-1).addClass('playing'); PlayTrack(t.artist, t.title, t.cover_url_medium, t.cover_url_large)
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
40
52
Atraci/Atraci:coffee/_player.coffee:3:raw_corpus
raw_corpus
PlayTrack = (artist, title, cover_url_medium, cover_url_large) -> userTracking.event("Player", "Play", artist + ' - ' + title).send() __currentTrack = artist: artist title: title __playerTracklist = __currentTracklist __CurrentSelectedTrack = Math.random() __LastSelectedTrack = _...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
54
103
Atraci/Atraci:coffee/_player.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript PlayTrack = (artist, title, cover_url_medium, cover_url_large) -> userTracking.event("Player", "Play", artist + ' - ' + title).send() __currentTrack = artist: artist title: title __playerTracklist = __currentTracklist __Current...
var PlayTrack; PlayTrack = function(artist, title, cover_url_medium, cover_url_large) { var __CurrentSelectedTrack, __LastSelectedTrack, __currentTrack, __playerTracklist, spinner_cover; userTracking.event("Player", "Play", artist + ' - ' + title).send(); __currentTrack = { artist: artist, title: title ...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
54
103
Atraci/Atraci:coffee/_player.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PlayTrack; PlayTrack = function(artist, title, cover_url_medium, cover_url_large) { var __CurrentSelectedTrack, __LastSelectedTrack, __currentTrack, __playerTracklist, spinner_cover; userTracking.event("Player", "Play", artist + ' - ' + title).send(); __...
PlayTrack = (artist, title, cover_url_medium, cover_url_large) -> userTracking.event("Player", "Play", artist + ' - ' + title).send() __currentTrack = artist: artist title: title __playerTracklist = __currentTracklist __CurrentSelectedTrack = Math.random() __LastSelectedTrack = _...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
54
103
Atraci/Atraci:coffee/_player.coffee:3:completion
completion
PlayTrack = (artist, title, cover_url_medium, cover_url_large) -> userTracking.event("Player", "Play", artist + ' - ' + title).send() __currentTrack = artist: artist title: title __playerTracklist = __currentTracklist __CurrentSelectedTrack = Math.random() __LastSelectedTrack = _...
$('#player-container #cover #loading-overlay').show() spinner_cover = new Spinner(spinner_cover_opts).spin($('#player-container #cover')[0]) $('#player-container #progress-current').css({'width': '0px'}) # not working ? $('#player-container #info #track-info #artist').html(artist) $('#player-container...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
54
103
Atraci/Atraci:coffee/_player.coffee:4:raw_corpus
raw_corpus
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() ...
$.each(itag_priorities, function(i, itag) { if (stream_urls[itag]) { if (__CurrentSelectedTrack === __LastSelectedTrack) { videojs('video_player').src(stream_urls[itag]).play(); userTracking.event("Playback Info", "itag", itag).send(); } return false; } }); videojs('video_player'); // Keyb...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript $.each(itag_priorities, function(i, itag) { if (stream_urls[itag]) { if (__CurrentSelectedTrack === __LastSelectedTrack) { videojs('video_player').src(stream_urls[itag]).play(); userTracking.event("Playback Info", "itag", itag).send(); } r...
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:4:completion
completion
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
if $(@).hasClass('play') videojs('video_player').play() else videojs('video_player').pause() videojs('video_player').ready -> @.on 'loadedmetadata', -> $('#player-container #duration').text(moment(@duration()*1000).format('m:ss')) $(".cur").removeClass("cur") $(".playing...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:5:raw_corpus
raw_corpus
$('#player-container #info #track-info #action i.pause').show() @.on 'pause', -> $('#player-container #info #track-info #action i.pause').hide() $('#player-container #info #track-info #action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.c...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
154
194
Atraci/Atraci:coffee/_player.coffee:5:completion
completion
$('#player-container #info #track-info #action i.pause').show() @.on 'pause', -> $('#player-container #info #track-info #action i.pause').hide() $('#player-container #info #track-info #action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.c...
percentage = (e.pageX - $(this).offset().left) / $(this).width() videojs('video_player').volume(percentage) $('#player-container #volume-current').css({'width': (percentage) * 100 + '%'}) if percentage > 0.5 $('#player-container #controls #volume-icon #action i.fa-volume-up').show() $('#play...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed
800
https://github.com/Atraci/Atraci/blob/9fb5bd67d06cef16dbb32d3e6778473c1e7fd3ed/coffee/_player.coffee
154
194
Atraci/Atraci:coffee/_player.coffee:4:raw_corpus
raw_corpus
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
91db1dbfdb8b13a6a7222314ce48fab490717444
800
https://github.com/Atraci/Atraci/blob/91db1dbfdb8b13a6a7222314ce48fab490717444/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() ...
$.each(itag_priorities, function(i, itag) { if (stream_urls[itag]) { if (__CurrentSelectedTrack === __LastSelectedTrack) { videojs('video_player').src(stream_urls[itag]).play(); userTracking.event("Playback Info", "itag", itag).send(); } return false; } }); videojs('video_player'); // Keyb...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_player.coffee
MIT
91db1dbfdb8b13a6a7222314ce48fab490717444
800
https://github.com/Atraci/Atraci/blob/91db1dbfdb8b13a6a7222314ce48fab490717444/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript $.each(itag_priorities, function(i, itag) { if (stream_urls[itag]) { if (__CurrentSelectedTrack === __LastSelectedTrack) { videojs('video_player').src(stream_urls[itag]).play(); userTracking.event("Playback Info", "itag", itag).send(); } r...
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
91db1dbfdb8b13a6a7222314ce48fab490717444
800
https://github.com/Atraci/Atraci/blob/91db1dbfdb8b13a6a7222314ce48fab490717444/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:4:completion
completion
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
if $(@).hasClass('play') videojs('video_player').play() else videojs('video_player').pause() videojs('video_player').ready -> @.on 'loadedmetadata', -> $('#player-container #duration').text(moment(@duration()*1000).format('m:ss')) $(".cur").removeClass("cur") $(".playi...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
91db1dbfdb8b13a6a7222314ce48fab490717444
800
https://github.com/Atraci/Atraci/blob/91db1dbfdb8b13a6a7222314ce48fab490717444/coffee/_player.coffee
104
153
Atraci/Atraci:coffee/_player.coffee:5:raw_corpus
raw_corpus
spinner_cover.stop() $('#player-container #info #track-info #action i.play').hide() $('#player-container #info #track-info #action i.pause').show() @.on 'pause', -> $('#player-container #info #track-info #action i.pause').hide() $('#player-container #info #track-info #action i.play')...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
91db1dbfdb8b13a6a7222314ce48fab490717444
800
https://github.com/Atraci/Atraci/blob/91db1dbfdb8b13a6a7222314ce48fab490717444/coffee/_player.coffee
154
197
Atraci/Atraci:coffee/_player.coffee:5:completion
completion
spinner_cover.stop() $('#player-container #info #track-info #action i.play').hide() $('#player-container #info #track-info #action i.pause').show() @.on 'pause', -> $('#player-container #info #track-info #action i.pause').hide() $('#player-container #info #track-info #action i.play')...
percentage = (e.pageX - $(this).offset().left) / $(this).width() videojs('video_player').volume(percentage) $('#player-container #volume-current').css({'width': (percentage) * 100 + '%'}) if percentage > 0.5 $('#player-container #controls #volume-icon #action i.fa-volume-up').show() $('#play...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
91db1dbfdb8b13a6a7222314ce48fab490717444
800
https://github.com/Atraci/Atraci/blob/91db1dbfdb8b13a6a7222314ce48fab490717444/coffee/_player.coffee
154
197
Atraci/Atraci:coffee/_player.coffee:5:raw_corpus
raw_corpus
spinner_cover.stop() $('#player-container #info #track-info #action i.play').hide() $('#player-container #info #track-info #action i.pause').show() @.on 'pause', -> $('#player-container #info #track-info #action i.pause').hide() $('#player-container #info #track-info #action i.play')...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
cc3d0d250aed74be066418c1b08f9371b99fe371
800
https://github.com/Atraci/Atraci/blob/cc3d0d250aed74be066418c1b08f9371b99fe371/coffee/_player.coffee
154
198
Atraci/Atraci:coffee/_player.coffee:5:completion
completion
spinner_cover.stop() $('#player-container #info #track-info #action i.play').hide() $('#player-container #info #track-info #action i.pause').show() @.on 'pause', -> $('#player-container #info #track-info #action i.pause').hide() $('#player-container #info #track-info #action i.play')...
percentage = (e.pageX - $(this).offset().left) / $(this).width() videojs('video_player').volume(percentage) $('#player-container #volume-current').css({'width': (percentage) * 100 + '%'}) if percentage > 0.5 $('#player-container #controls #volume-icon #action i.fa-volume-up').show() $('#play...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
cc3d0d250aed74be066418c1b08f9371b99fe371
800
https://github.com/Atraci/Atraci/blob/cc3d0d250aed74be066418c1b08f9371b99fe371/coffee/_player.coffee
154
198
Atraci/Atraci:coffee/_player.coffee:3:raw_corpus
raw_corpus
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
7669ad90adcdd7670eef43c0bb0d3d7228016c1f
800
https://github.com/Atraci/Atraci/blob/7669ad90adcdd7670eef43c0bb0d3d7228016c1f/coffee/_player.coffee
91
140
Atraci/Atraci:coffee/_player.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() ...
$.each(itag_priorities, function(i, itag) { if (stream_urls[itag]) { if (__CurrentSelectedTrack === __LastSelectedTrack) { videojs('video_player').src(stream_urls[itag]).play(); userTracking.event("Playback Info", "itag", itag).send(); } return false; } }); videojs('video_player'); // Paus...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_player.coffee
MIT
7669ad90adcdd7670eef43c0bb0d3d7228016c1f
800
https://github.com/Atraci/Atraci/blob/7669ad90adcdd7670eef43c0bb0d3d7228016c1f/coffee/_player.coffee
91
140
Atraci/Atraci:coffee/_player.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript $.each(itag_priorities, function(i, itag) { if (stream_urls[itag]) { if (__CurrentSelectedTrack === __LastSelectedTrack) { videojs('video_player').src(stream_urls[itag]).play(); userTracking.event("Playback Info", "itag", itag).send(); } r...
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
7669ad90adcdd7670eef43c0bb0d3d7228016c1f
800
https://github.com/Atraci/Atraci/blob/7669ad90adcdd7670eef43c0bb0d3d7228016c1f/coffee/_player.coffee
91
140
Atraci/Atraci:coffee/_player.coffee:3:completion
completion
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
videojs('video_player').ready -> @.on 'loadedmetadata', -> $('#player-container #duration').text(moment(@duration()*1000).format('m:ss')) $(".cur").removeClass("cur") $(".playing").addClass("cur") $(".playing .cover").before($("#video_player")); videojs('video_player').play()...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
7669ad90adcdd7670eef43c0bb0d3d7228016c1f
800
https://github.com/Atraci/Atraci/blob/7669ad90adcdd7670eef43c0bb0d3d7228016c1f/coffee/_player.coffee
91
140
Atraci/Atraci:coffee/_player.coffee:4:raw_corpus
raw_corpus
$('#player-container #info #track-info #action i.pause').hide() $('#player-container #info #track-info #action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.code userTracking.event("Playback Error", video_error_codes[code], __currentTrack.arti...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
7669ad90adcdd7670eef43c0bb0d3d7228016c1f
800
https://github.com/Atraci/Atraci/blob/7669ad90adcdd7670eef43c0bb0d3d7228016c1f/coffee/_player.coffee
141
158
Atraci/Atraci:coffee/_player.coffee:4:completion
completion
$('#player-container #info #track-info #action i.pause').hide() $('#player-container #info #track-info #action i.play').show() @.on 'error', (e) -> code = if e.target.error then e.target.error.code else e.code userTracking.event("Playback Error", video_error_codes[code], __currentTrack.arti...
$('#player-container #progress-bg').on 'click', (e) -> percentage = (e.pageX - $(this).offset().left) / $(this).width() videojs('video_player').currentTime(percentage * videojs('video_player').duration()) $('#player-container #progress-current').css({'width': (percentage) * 100 + '%'}) $('#player-container...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
7669ad90adcdd7670eef43c0bb0d3d7228016c1f
800
https://github.com/Atraci/Atraci/blob/7669ad90adcdd7670eef43c0bb0d3d7228016c1f/coffee/_player.coffee
141
158
Atraci/Atraci:coffee/_player.coffee:3:raw_corpus
raw_corpus
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_player.coffee
91
140
Atraci/Atraci:coffee/_player.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() ...
$.each(itag_priorities, function(i, itag) { if (stream_urls[itag]) { if (__CurrentSelectedTrack === __LastSelectedTrack) { videojs('video_player').src(stream_urls[itag]).play(); userTracking.event("Playback Info", "itag", itag).send(); } return false; } }); videojs('video_player'); // Paus...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_player.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_player.coffee
91
140
Atraci/Atraci:coffee/_player.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript $.each(itag_priorities, function(i, itag) { if (stream_urls[itag]) { if (__CurrentSelectedTrack === __LastSelectedTrack) { videojs('video_player').src(stream_urls[itag]).play(); userTracking.event("Playback Info", "itag", itag).send(); } r...
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_player.coffee
91
140
Atraci/Atraci:coffee/_player.coffee:3:completion
completion
$.each itag_priorities, (i, itag) -> if stream_urls[itag] if __CurrentSelectedTrack == __LastSelectedTrack videojs('video_player').src(stream_urls[itag]).play() userTracking.event("Playback Info", "itag",...
videojs('video_player').ready -> @.on 'loadedmetadata', -> $('#player-container #duration').text(moment(@duration()*1000).format('m:ss') + " / ") $(".cur").removeClass("cur") $(".playing").addClass("cur") $(".playing .cover").before($("#video_player")); videojs('video_player'...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_player.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_player.coffee
91
140
flosse/sloc:spec/helpers.spec.coffee:1:raw_corpus
raw_corpus
chai = require 'chai' should = chai.should() helpers = require "../src/helpers" describe "The helper module", -> describe "alignRight method", -> it "should always return a string", -> helpers.alignRight().should.be.a 'string' helpers.alignRight(234, "x").should.eql '' helpers.alignRight...
CoffeeScript
flosse/sloc
spec/helpers.spec.coffee
MIT
e26044011821c4e170859362f2de657d64118711
969
https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/spec/helpers.spec.coffee
1
35
flosse/sloc:spec/helpers.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript chai = require 'chai' should = chai.should() helpers = require "../src/helpers" describe "The helper module", -> describe "alignRight method", -> it "should always return a string", -> helpers.alignRight().should.be.a 'string' helpers.al...
var chai, helpers, should; chai = require('chai'); should = chai.should(); helpers = require("../src/helpers"); describe("The helper module", function() { describe("alignRight method", function() { it("should always return a string", function() { helpers.alignRight().should.be.a('string'); helpers...
CoffeeScript
JavaScript
flosse/sloc
spec/helpers.spec.coffee
MIT
e26044011821c4e170859362f2de657d64118711
969
https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/spec/helpers.spec.coffee
1
35
flosse/sloc:spec/helpers.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var chai, helpers, should; chai = require('chai'); should = chai.should(); helpers = require("../src/helpers"); describe("The helper module", function() { describe("alignRight method", function() { it("should always return a string", function() { he...
chai = require 'chai' should = chai.should() helpers = require "../src/helpers" describe "The helper module", -> describe "alignRight method", -> it "should always return a string", -> helpers.alignRight().should.be.a 'string' helpers.alignRight(234, "x").should.eql '' helpers.alignRight...
JavaScript
CoffeeScript
flosse/sloc
spec/helpers.spec.coffee
MIT
e26044011821c4e170859362f2de657d64118711
969
https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/spec/helpers.spec.coffee
1
35
flosse/sloc:spec/helpers.spec.coffee:1:completion
completion
chai = require 'chai' should = chai.should() helpers = require "../src/helpers" describe "The helper module", -> describe "alignRight method", -> it "should always return a string", -> helpers.alignRight().should.be.a 'string' helpers.alignRight(234, "x").should.eql '' helpers.alignRight...
helpers.alignRight(" foo bar baz", 5).should.equal 'r baz' helpers.alignRight(" foo bar baz", -1).should.equal '' describe "summarize method", -> it "reduces the file stats", -> helpers.summarize().should.eql {} helpers.summarize([]).should.eql {} helpers.summarize([{x: 3, y: 2}]).should....
CoffeeScript
CoffeeScript
flosse/sloc
spec/helpers.spec.coffee
MIT
e26044011821c4e170859362f2de657d64118711
969
https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/spec/helpers.spec.coffee
1
35
flosse/sloc:spec/helpers.spec.coffee:1:raw_corpus
raw_corpus
chai = require 'chai' should = chai.should() helpers = require "../src/helpers" describe "The helper module", -> describe "alignRight method", -> it "should always return a string", -> helpers.alignRight().should.be.a 'string' helpers.alignRight(234, "x").should.eql '' helpers.alignRight...
CoffeeScript
flosse/sloc
spec/helpers.spec.coffee
MIT
11fd0d0b738d19103d80c0d211996b312de57c08
969
https://github.com/flosse/sloc/blob/11fd0d0b738d19103d80c0d211996b312de57c08/spec/helpers.spec.coffee
1
19
flosse/sloc:spec/helpers.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript chai = require 'chai' should = chai.should() helpers = require "../src/helpers" describe "The helper module", -> describe "alignRight method", -> it "should always return a string", -> helpers.alignRight().should.be.a 'string' helpers.al...
var chai, helpers, should; chai = require('chai'); should = chai.should(); helpers = require("../src/helpers"); describe("The helper module", function() { return describe("alignRight method", function() { it("should always return a string", function() { helpers.alignRight().should.be.a('string'); ...
CoffeeScript
JavaScript
flosse/sloc
spec/helpers.spec.coffee
MIT
11fd0d0b738d19103d80c0d211996b312de57c08
969
https://github.com/flosse/sloc/blob/11fd0d0b738d19103d80c0d211996b312de57c08/spec/helpers.spec.coffee
1
19
flosse/sloc:spec/helpers.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var chai, helpers, should; chai = require('chai'); should = chai.should(); helpers = require("../src/helpers"); describe("The helper module", function() { return describe("alignRight method", function() { it("should always return a string", function() { ...
chai = require 'chai' should = chai.should() helpers = require "../src/helpers" describe "The helper module", -> describe "alignRight method", -> it "should always return a string", -> helpers.alignRight().should.be.a 'string' helpers.alignRight(234, "x").should.eql '' helpers.alignRight...
JavaScript
CoffeeScript
flosse/sloc
spec/helpers.spec.coffee
MIT
11fd0d0b738d19103d80c0d211996b312de57c08
969
https://github.com/flosse/sloc/blob/11fd0d0b738d19103d80c0d211996b312de57c08/spec/helpers.spec.coffee
1
19
flosse/sloc:spec/helpers.spec.coffee:1:completion
completion
chai = require 'chai' should = chai.should() helpers = require "../src/helpers" describe "The helper module", -> describe "alignRight method", -> it "should always return a string", ->
helpers.alignRight().should.be.a 'string' helpers.alignRight(234, "x").should.eql '' helpers.alignRight(Error).should.eql '' it "should align a string to the given length", -> helpers.alignRight("foo", 8).should.equal ' foo' helpers.alignRight("foo", -3).should.equal '' helpers.al...
CoffeeScript
CoffeeScript
flosse/sloc
spec/helpers.spec.coffee
MIT
11fd0d0b738d19103d80c0d211996b312de57c08
969
https://github.com/flosse/sloc/blob/11fd0d0b738d19103d80c0d211996b312de57c08/spec/helpers.spec.coffee
1
19
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:raw_corpus
raw_corpus
### Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : ["drag" ,"dragging"] handler : do (base = Quo.Gestures) -> GAP = (if window.devicePixelRatio >= 2 then 15 else...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : ["drag" ,"dragging"] handler : do (base = Quo.Gestures) -...
/* Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.Gestures.add({ name: "drag", events: ["drag", "dragging"], handler: (function(base) { var GAP, _average, _calcDelta, _last, _num_fingers, _start, _target,...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.Gestures.add({ name: "drag", events: ["drag", "dragging"], handler: (function(base) { var GAP, _ave...
### Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : ["drag" ,"dragging"] handler : do (base = Quo.Gestures) -> GAP = (if window.devicePixelRatio >= 2 then 15 else...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:completion
completion
### Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : ["drag" ,"dragging"] handler : do (base = Quo.Gestures) -> GAP = (if window.devicePixelRatio >= 2 then 15 else...
_num_fingers = data.length _start = _average(data) move = (target, data) -> if data.length is _num_fingers delta = _calcDelta(data) _last = touches: data, delta: delta _check(true) cancel = end = (target, data) -> if _start and _last _check(false) _n...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:2:raw_corpus
raw_corpus
y += parseInt(touch.y) return x: (x / touches.length), y: (y / touches.length) _check = (moving) -> if moving then base.trigger _target, "dragging", _last else if Math.abs(_last.delta.x) > GAP or Math.abs(_last.delta.y) > GAP base.trigger _target, "drag", _last start: start mov...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.drag.coffee
51
61
soyjavi/QuoJS:source/quo.gestures.drag.coffee:2:completion
completion
y += parseInt(touch.y) return x: (x / touches.length), y: (y / touches.length) _check = (moving) -> if moving then base.trigger _target, "dragging", _last
else if Math.abs(_last.delta.x) > GAP or Math.abs(_last.delta.y) > GAP base.trigger _target, "drag", _last start: start move: move end: end
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
7296aa6bc321370c1b92de005c9b55b9e1365596
2,055
https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.gestures.drag.coffee
51
61
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:raw_corpus
raw_corpus
### Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : ["drag" ,"dragging"] handler : do (base = Quo.Gestures) -> GAP = 20 _target = null _num_fingers = null...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
1ae37dec9559e15872daa8be159849e329456005
2,055
https://github.com/soyjavi/QuoJS/blob/1ae37dec9559e15872daa8be159849e329456005/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : ["drag" ,"dragging"] handler : do (base = Quo.Gestures) -...
/* Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.Gestures.add({ name: "drag", events: ["drag", "dragging"], handler: (function(base) { var GAP, _average, _calcDelta, _last, _num_fingers, _start, _target,...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
1ae37dec9559e15872daa8be159849e329456005
2,055
https://github.com/soyjavi/QuoJS/blob/1ae37dec9559e15872daa8be159849e329456005/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.Gestures.add({ name: "drag", events: ["drag", "dragging"], handler: (function(base) { var GAP, _ave...
### Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : ["drag" ,"dragging"] handler : do (base = Quo.Gestures) -> GAP = 20 _target = null _num_fingers = null...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
1ae37dec9559e15872daa8be159849e329456005
2,055
https://github.com/soyjavi/QuoJS/blob/1ae37dec9559e15872daa8be159849e329456005/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:completion
completion
### Quo Drag Gestures: drag, dragging @namespace Quo.Gestures @class Drag @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : ["drag" ,"dragging"] handler : do (base = Quo.Gestures) -> GAP = 20 _target = null _num_fingers = null...
_num_fingers = data.length _start = _average(data) move = (target, data) -> if data.length is _num_fingers delta = _calcDelta(data) _last = touches: data, delta: delta _check(true) end = (target, data) -> if _start and _last _check(false) _num_finger...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
1ae37dec9559e15872daa8be159849e329456005
2,055
https://github.com/soyjavi/QuoJS/blob/1ae37dec9559e15872daa8be159849e329456005/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:raw_corpus
raw_corpus
### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : "drag,dragging".split(",") handler : do (gm = Quo.Gestures) -> MIN_PX = 20 _target = null _num_fingers = null _start = n...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : "drag,dragging".split(",") handler : do (gm = Quo.Gestures) -> MIN_PX = 20 _target ...
/* Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.Gestures.add({ name: "drag", events: "drag,dragging".split(","), handler: (function(gm) { var MIN_PX, _average, _calcDelta, _last, _num_fingers, _start, _target, end, move, start; MIN_PX ...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.Gestures.add({ name: "drag", events: "drag,dragging".split(","), handler: (function(gm) { var MIN_PX, _average, _calcDelta, _last, _num_...
### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : "drag,dragging".split(",") handler : do (gm = Quo.Gestures) -> MIN_PX = 20 _target = null _num_fingers = null _start = n...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:completion
completion
### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.Gestures.add name : "drag" events : "drag,dragging".split(",") handler : do (gm = Quo.Gestures) -> MIN_PX = 20 _target = null _num_fingers = null _start = n...
move = (target, data) -> if data.length is _num_fingers delta = _calcDelta(data) _last = touches: data, delta: delta _check(true) end = (target, data) -> if _start and _last _check(false) _num_fingers = null _start = null _last = null _calcDe...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:2:raw_corpus
raw_corpus
_check = (is_moving) -> if is_moving then gm.trigger _target, "dragging", _last else if Math.abs(_last.delta.x) > MIN_PX or Math.abs(_last.delta.y) > MIN_PX gm.trigger _target, "drag", _last start: start move: move end: end
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.drag.coffee
51
60
soyjavi/QuoJS:source/quo.gestures.drag.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _check = (is_moving) -> if is_moving then gm.trigger _target, "dragging", _last else if Math.abs(_last.delta.x) > MIN_PX or Math.abs(_last.delta.y) > MIN_PX gm.trigger _target, "drag", _last start: start move: move end: end ```
var _check; _check = function(is_moving) { if (is_moving) { return gm.trigger(_target, "dragging", _last); } else if (Math.abs(_last.delta.x) > MIN_PX || Math.abs(_last.delta.y) > MIN_PX) { return gm.trigger(_target, "drag", _last); } }; ({ start: start, move: move, end: end });
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.drag.coffee
51
60
soyjavi/QuoJS:source/quo.gestures.drag.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _check; _check = function(is_moving) { if (is_moving) { return gm.trigger(_target, "dragging", _last); } else if (Math.abs(_last.delta.x) > MIN_PX || Math.abs(_last.delta.y) > MIN_PX) { return gm.trigger(_target, "drag", _last); } }; ({ start:...
_check = (is_moving) -> if is_moving then gm.trigger _target, "dragging", _last else if Math.abs(_last.delta.x) > MIN_PX or Math.abs(_last.delta.y) > MIN_PX gm.trigger _target, "drag", _last start: start move: move end: end
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
3e94097849c8265b1e1f85eded77562ec42e7672
2,055
https://github.com/soyjavi/QuoJS/blob/3e94097849c8265b1e1f85eded77562ec42e7672/source/quo.gestures.drag.coffee
51
60
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:raw_corpus
raw_corpus
### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "drag" events : "drag,dragging".split(",") handler : do (gm = Quo.gesture) -> MIN_PX = 20 _target = null _num_fingers = null _start = nul...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
ff24a23aa557eabf4db8c0adbe9712f8a960293d
2,055
https://github.com/soyjavi/QuoJS/blob/ff24a23aa557eabf4db8c0adbe9712f8a960293d/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "drag" events : "drag,dragging".split(",") handler : do (gm = Quo.gesture) -> MIN_PX = 20 _target ...
/* Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.gesture.add({ name: "drag", events: "drag,dragging".split(","), handler: (function(gm) { var MIN_PX, _average, _calcDelta, _last, _num_fingers, _start, _target, end, move, start; MIN_PX =...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
ff24a23aa557eabf4db8c0adbe9712f8a960293d
2,055
https://github.com/soyjavi/QuoJS/blob/ff24a23aa557eabf4db8c0adbe9712f8a960293d/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.gesture.add({ name: "drag", events: "drag,dragging".split(","), handler: (function(gm) { var MIN_PX, _average, _calcDelta, _last, _num_f...
### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "drag" events : "drag,dragging".split(",") handler : do (gm = Quo.gesture) -> MIN_PX = 20 _target = null _num_fingers = null _start = nul...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
ff24a23aa557eabf4db8c0adbe9712f8a960293d
2,055
https://github.com/soyjavi/QuoJS/blob/ff24a23aa557eabf4db8c0adbe9712f8a960293d/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:completion
completion
### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "drag" events : "drag,dragging".split(",") handler : do (gm = Quo.gesture) -> MIN_PX = 20 _target = null _num_fingers = null _start = nul...
move = (target, data) -> if data.length is _num_fingers delta = _calcDelta(data) _last = touches: data, delta: delta _check(true) end = (target, data) -> if _start and _last _check(false) _num_fingers = null _start = null _last = null _calcDe...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
ff24a23aa557eabf4db8c0adbe9712f8a960293d
2,055
https://github.com/soyjavi/QuoJS/blob/ff24a23aa557eabf4db8c0adbe9712f8a960293d/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:raw_corpus
raw_corpus
### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "drag" events : ["drag", "dragging"] handler : do (gm = Quo.gesture) -> MIN_PX = 20 _target = null _num_fingers = null _start = null ...
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
c5b858856bd2fb3f2b9d54d724df6127ae364049
2,055
https://github.com/soyjavi/QuoJS/blob/c5b858856bd2fb3f2b9d54d724df6127ae364049/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "drag" events : ["drag", "dragging"] handler : do (gm = Quo.gesture) -> MIN_PX = 20 _target = nu...
/* Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.gesture.add({ name: "drag", events: ["drag", "dragging"], handler: (function(gm) { var MIN_PX, _average, _calcDelta, _last, _num_fingers, _start, _target, end, move, start; MIN_PX = 20; ...
CoffeeScript
JavaScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
c5b858856bd2fb3f2b9d54d724df6127ae364049
2,055
https://github.com/soyjavi/QuoJS/blob/c5b858856bd2fb3f2b9d54d724df6127ae364049/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone */ "use strict"; Quo.gesture.add({ name: "drag", events: ["drag", "dragging"], handler: (function(gm) { var MIN_PX, _average, _calcDelta, _last, _num_fingers...
### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "drag" events : ["drag", "dragging"] handler : do (gm = Quo.gesture) -> MIN_PX = 20 _target = null _num_fingers = null _start = null ...
JavaScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
c5b858856bd2fb3f2b9d54d724df6127ae364049
2,055
https://github.com/soyjavi/QuoJS/blob/c5b858856bd2fb3f2b9d54d724df6127ae364049/source/quo.gestures.drag.coffee
1
50
soyjavi/QuoJS:source/quo.gestures.drag.coffee:1:completion
completion
### Quo Drag Gestures: drag, dragging @author Ignacio Olalde Ramos <ina@tapquo.com> || @piniphone ### "use strict" Quo.gesture.add name : "drag" events : ["drag", "dragging"] handler : do (gm = Quo.gesture) -> MIN_PX = 20 _target = null _num_fingers = null _start = null ...
move = (target, data) -> if data.length is _num_fingers delta = _calcDelta(data) _last = touches: data, delta: delta _check(true) end = (target, data) -> if _start and _last _check(false) _num_fingers = null _start = null _last = null _calcDe...
CoffeeScript
CoffeeScript
soyjavi/QuoJS
source/quo.gestures.drag.coffee
MIT
c5b858856bd2fb3f2b9d54d724df6127ae364049
2,055
https://github.com/soyjavi/QuoJS/blob/c5b858856bd2fb3f2b9d54d724df6127ae364049/source/quo.gestures.drag.coffee
1
50
jianliaoim/talk-os:talk-account/client/app/succeed-resetting.coffee:1:raw_corpus
raw_corpus
React = require 'react' Immutable = require 'immutable' detect = require '../util/detect' locales = require '../locales' controllers = require '../controllers' Space = React.createFactory require 'react-lite-space' {div, input, span, a} = React.DOM module.exports = React.createClass displayName: 'succeed-resettin...
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/succeed-resetting.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/succeed-resetting.coffee
1
29
jianliaoim/talk-os:talk-account/client/app/succeed-resetting.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' Immutable = require 'immutable' detect = require '../util/detect' locales = require '../locales' controllers = require '../controllers' Space = React.createFactory require 'react-lite-space' {div, input, span, a} = React.DOM module.exp...
var Immutable, React, Space, a, controllers, detect, div, input, locales, span; React = require('react'); Immutable = require('immutable'); detect = require('../util/detect'); locales = require('../locales'); controllers = require('../controllers'); Space = React.createFactory(require('react-lite-space')); ({div...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/client/app/succeed-resetting.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/succeed-resetting.coffee
1
29
jianliaoim/talk-os:talk-account/client/app/succeed-resetting.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable, React, Space, a, controllers, detect, div, input, locales, span; React = require('react'); Immutable = require('immutable'); detect = require('../util/detect'); locales = require('../locales'); controllers = require('../controllers'); Space = R...
React = require 'react' Immutable = require 'immutable' detect = require '../util/detect' locales = require '../locales' controllers = require '../controllers' Space = React.createFactory require 'react-lite-space' {div, input, span, a} = React.DOM module.exports = React.createClass displayName: 'succeed-resettin...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/succeed-resetting.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/succeed-resetting.coffee
1
29
jianliaoim/talk-os:talk-account/client/app/succeed-resetting.coffee:1:completion
completion
React = require 'react' Immutable = require 'immutable' detect = require '../util/detect' locales = require '../locales' controllers = require '../controllers' Space = React.createFactory require 'react-lite-space' {div, input, span, a} = React.DOM module.exports = React.createClass displayName: 'succeed-resettin...
propTypes: store: React.PropTypes.instanceOf(Immutable.Map).isRequired getAccount: -> @props.store.getIn(['client', 'account']) getLanguage: -> @props.store.getIn(['client', 'language']) render: -> div className: 'succeed-resetting control-panel', div className: 'as-line-centered', ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/client/app/succeed-resetting.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/succeed-resetting.coffee
1
29
jianliaoim/talk-os:talk-api2x/server/schemas/notice.coffee:1:raw_corpus
raw_corpus
{Schema} = require 'mongoose' Promise = require 'bluebird' serviceLoader = require 'talk-services' module.exports = NoticeSchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' content: String postAt: Date # Send after this time createdAt: type: Date, default: Date.now updatedAt: type: Date, ...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/notice.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/notice.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/schemas/notice.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {Schema} = require 'mongoose' Promise = require 'bluebird' serviceLoader = require 'talk-services' module.exports = NoticeSchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' content: String postAt: Date # Send after this time createdAt...
var NoticeSchema, Promise, Schema, serviceLoader; ({Schema} = require('mongoose')); Promise = require('bluebird'); serviceLoader = require('talk-services'); module.exports = NoticeSchema = new Schema({ creator: { type: Schema.Types.ObjectId, ref: 'User' }, content: String, postAt: Date, // Send afte...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/notice.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/notice.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/schemas/notice.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var NoticeSchema, Promise, Schema, serviceLoader; ({Schema} = require('mongoose')); Promise = require('bluebird'); serviceLoader = require('talk-services'); module.exports = NoticeSchema = new Schema({ creator: { type: Schema.Types.ObjectId, ref: 'Use...
{Schema} = require 'mongoose' Promise = require 'bluebird' serviceLoader = require 'talk-services' module.exports = NoticeSchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' content: String postAt: Date # Send after this time createdAt: type: Date, default: Date.now updatedAt: type: Date, ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/notice.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/notice.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/schemas/notice.coffee:1:completion
completion
{Schema} = require 'mongoose' Promise = require 'bluebird' serviceLoader = require 'talk-services' module.exports = NoticeSchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' content: String postAt: Date # Send after this time createdAt: type: Date, default: Date.now updatedAt: type: Date, ...
NoticeModel.find postAt: $gt: readNoticeAt, $lt: Date.now() .sort postAt: -1 .exec() .then (notices) -> callback null, notices .then null, callback NoticeSchema.statics.checkForNewNotice = (_userId, _teamId, callback = ->) -> NoticeModel = this MessageModel = @model 'Message' PreferenceModel = @mo...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/notice.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/notice.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/schemas/notice.coffee:2:raw_corpus
raw_corpus
notices.sort -> 1 Promise.map notices, (notice) -> # Create message message = new MessageModel creator: talkai._id to: _userId team: _teamId body: notice.content message.$save() .nodeify callback
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/notice.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/notice.coffee
51
63
jianliaoim/talk-os:talk-api2x/server/schemas/notice.coffee:2:completion
completion
notices.sort -> 1 Promise.map notices, (notice) -> # Create message message = new MessageModel creator: talkai._id
to: _userId team: _teamId body: notice.content message.$save() .nodeify callback
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/notice.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/notice.coffee
51
63
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:raw_corpus
raw_corpus
return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinFolder = path.dirname require.resolve '../bin/coffee' # Fo...
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/invocation_argument_parsing.coffee
1
43
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinF...
var coffeeBinFolder, coffeeCommand, execFileSync, extraArgsScript, initialSpaceExtraArgsScript, initialSpaceScript, path, shebangScript, spawnOptions, spawnSync; if (typeof require === "undefined" || require === null) { return; } path = require('path'); ({execFileSync, spawnSync} = require('child_process')); // G...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/invocation_argument_parsing.coffee
1
43
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var coffeeBinFolder, coffeeCommand, execFileSync, extraArgsScript, initialSpaceExtraArgsScript, initialSpaceScript, path, shebangScript, spawnOptions, spawnSync; if (typeof require === "undefined" || require === null) { return; } path = require('path'); ({exec...
return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinFolder = path.dirname require.resolve '../bin/coffee' # Fo...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/invocation_argument_parsing.coffee
1
43
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:1:completion
completion
return unless require? path = require 'path' { execFileSync, spawnSync } = require 'child_process' # Get the folder containing the compiled `coffee` executable and make it the # PATH so that `#!/usr/bin/env coffee` resolves to our locally built file. coffeeBinFolder = path.dirname require.resolve '../bin/coffee' # Fo...
test "parse arguments for shebang scripts correctly (on *nix platforms)", -> return if isWindows() stdout = execFileSync shebangScript, ['-abck'], spawnOptions expectedArgs = ['coffee', shebangScript, '-abck'] realArgs = JSON.parse stdout arrayEq expectedArgs, realArgs stdout = execFileSync initialSpaceSc...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/invocation_argument_parsing.coffee
1
43
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:2:raw_corpus
raw_corpus
result = spawnSync coffeeCommand, ['-b', shebangScript, '--'], spawnOptions stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', shebangScript] ok stderr.match /^coffee was invoked with '--'/m posArgs = stderr.match(/^The positional arguments were: (.*)$/m)[1] arrayEq JSON.parse(pos...
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/invocation_argument_parsing.coffee
45
86
jashkenas/coffeescript:test/invocation_argument_parsing.coffee:2:completion
completion
result = spawnSync coffeeCommand, ['-b', shebangScript, '--'], spawnOptions stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', shebangScript] ok stderr.match /^coffee was invoked with '--'/m posArgs = stderr.match(/^The positional arguments were: (.*)$/m)[1] arrayEq JSON.parse(pos...
arrayEq expectedArgs, realArgs ok result.stderr.toString() is '' ok result.status is 0 test "warn about non-portable shebang lines", -> result = spawnSync coffeeCommand, [extraArgsScript, 'arg'], spawnOptions stderr = result.stderr.toString() arrayEq JSON.parse(result.stdout), ['coffee', extraArgsScript, 'ar...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/invocation_argument_parsing.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/invocation_argument_parsing.coffee
45
86