commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
054106d0a04d7ed2935488dc8932c2fc103befaa
Make it truly open
server.js
server.js
var express = require('express'); var client = require('twilio')(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN); var app = express(); var port = process.env.PORT || 3000; app.listen(port); app.use(express.static('public')); app.all('*', function(req, res, next) { res.header('Access-Control-Allow-Ori...
JavaScript
0.000003
@@ -329,74 +329,8 @@ ');%0A - res.header('Access-Control-Allow-Headers', 'X-Requested-With');%0A ne
2ba8464bc59b35d11903d553c43f95392178e2e0
remove fs module, we don't need it in productions
server.js
server.js
const http = require('http'); const fs = require('fs'); const express = require('express'); const app = express() app.use(express.static('public')); const server = http.createServer(app); server.listen(process.env.PORT);
JavaScript
0
@@ -26,34 +26,8 @@ p'); -%0Aconst fs = require('fs'); %0A%0Aco
f1121715cd16e3efe4ac6f6335ad8b355f935dbe
Fix server
server.js
server.js
'use strict'; ////////// Room ////////// var crypto = require('crypto'); var Room = function (user) { this.id = (new Date).getTime() + user.id; do { this.id = '#' + crypto.createHash('sha256').update(this.id).digest('hex').substr(0, 16); } while (this.id in Room.rooms); this.user = { i...
JavaScript
0.000001
@@ -3590,37 +3590,50 @@ ;%0A%0A s -ocket +erver.to(_room.id) .emit('piece', i
f15453b071a479bf41fc46b0c67e82d28cace480
fix the agency id
server.js
server.js
// BASE SETUP // ============================================================================= // call the packages we need var express = require('express'); // call express var app = express(); // define our app using express var bodyParser = require('body-parser'); var sqlite3 = require("sqli...
JavaScript
0.998289
@@ -2168,22 +2168,31 @@ /op/' + -result +'agency/' + row .agency_
d9254a82ea9d1ab8f6e7a31f02625b20a762a7ea
connect & start app in parallel to avoid now deployment confusion
server.js
server.js
const express = require('express') const bodyParser = require('body-parser') const cors = require('cors') const apiRouter = require('./routers') const config = require('./config.json') const log = require('./helpers/logger') const { mongooseConnection } = require('./connection') log.info(`Starting process with NODE_E...
JavaScript
0
@@ -411,23 +411,62 @@ ion. -then(() =%3E %7B%0A +catch(err =%3E %7B%0A log.error(err)%0A process.exit(1)%0A%7D)%0A%0A cons @@ -483,18 +483,16 @@ press()%0A - app.use( @@ -506,26 +506,24 @@ ser.json())%0A - app.use(body @@ -561,18 +561,16 @@ rue %7D))%0A - app.use( @@ -577,18 +577,16 @@ cors())%0A - ...
db3aa71cfa6aaf9dda13e903b65208d43bb23676
Enable cassandra mode
server.js
server.js
'use strict'; const port = process.env.PORT || 8000; require('./src/clients/appinsights/AppInsightsClient').setup(); const http = require('http'); const express = require('express'); const bodyParser = require('body-parser'); const graphqlHTTP = require('express-graphql'); const EdgesSchema = require('./src/schemas/...
JavaScript
0.000001
@@ -565,24 +565,124 @@ sSchema');%0A%0A +const resolversDirectory = process.env.ENABLE_V2 ? './src/resolvers-cassandra' : './src/resolvers';%0A const EdgesR @@ -691,39 +691,35 @@ olver = require( -'./src/ +%60$%7B resolvers/Edges' @@ -715,15 +715,25 @@ vers +Directory%7D /Edges -' +%60 );%0Ac @@ -753,39 +753,35 ...
6e9e45f30902f77e2f6e1a23da2afafee65ba11e
Format log time string
server.js
server.js
'use strict'; const express = require('express'); const routes = require('./app/routes/index.js'); var app = express(); //Logging middleware app.use(function(req, res, next) { console.log(Date.now(), req.url); next(); }); // Static files app.use('/public', express.static(process.cwd() + '/public')); // Our r...
JavaScript
0.000055
@@ -191,16 +191,30 @@ log( -Date.now +new Date().toISOString (),
d7049a963395fa3b6d60d576a30e9111da3bd060
improve look and feel
server.js
server.js
var express = require("express"); var app = express(); var router = express.Router(); var port = 8080; // See https://www.w3schools.com/cssref/css_colors.asp var color = "gray"; router.use(function (req,res,next) { next(); console.log("%s %s => %i", req.method, req.originalUrl, res.statusCode); }); router.get("/...
JavaScript
0
@@ -169,12 +169,12 @@ = %22 -gray +blue %22;%0A%0A
d99ca9afc4af5f61f951a40fa0c5d252f6217be3
fix spacing
server.js
server.js
const express = require('express'); const hbs = require('hbs'); const fs = require('fs'); const port = process.env.PORT || 3000; var app = express(); // creates app // include support for paritals hbs.registerPartials(__dirname + '/views/partials'); app.set('view engine', 'hbs'); // this is how we register middlewa...
JavaScript
0.000054
@@ -696,16 +696,17 @@ );%0A%7D);%0A%0A +%0A // repla
5f02ff6a970a34a1954bedcab51adfe3816e0559
increase max socket count to 1000
server.js
server.js
// Copyright Sebastian Schmidt var cluster = require('cluster'); if (cluster.isMaster) { var cpuCount = require('os').cpus().length; for (var i = 0; i < cpuCount; i += 1) { cluster.fork(); } } else { var port = Number(process.env.PORT || 8080); var express = require('express'); var app = express...
JavaScript
0.000346
@@ -585,24 +585,86 @@ sic-auth');%0A + var http = require('http');%0A var https = require('https');%0A app.use(ex @@ -762,16 +762,93 @@ jade');%0A + http.globalAgent.maxSockets = 1000;%0A https.globalAgent.maxSockets = 1000;%0A // db.
945bcdf1fa0a16c6b22f14c758f281bd1213b520
fix bug
server.js
server.js
var express = require('express') var bodyParser = require("body-parser"); var lcbo = require('./codybo.js'); var gm = require('./groupme.js'); var server = express(); server.set('PORT', (process.env.PORT || 5000)); server.use(express.static(__dirname + '/public')); server.use(bodyParser.json()); server.get("/echo...
JavaScript
0.000001
@@ -2174,15 +2174,8 @@ me%5Cn -%0A%09%09%09%09%09%09 find @@ -2246,19 +2246,16 @@ );%0A%09%7D);%0A -%0A%0A%0A %7D)();%0A%0As
ed92dcac67c151ba3bc540aebc8c04dbc72c9c3c
add console copyright
server.js
server.js
// Set up ====================================================== var configPath = './app/config/'; var corePath = './app/core/'; var configuration = require(configPath + 'configuration'); var app = require(corePath + 'expressConfig')(configuration); var router = require('express').Router(); v...
JavaScript
0
@@ -1491,10 +1491,8 @@ ==== -xs %0A// @@ -1907,16 +1907,118 @@ =======%0A +console.log('%5Cx1b%5B34m%25s%5Cx1b%5B0m', %22Server launch with StarterApiNodejs created by Arthur Mialon. :)%22);%0A console.
8187e97297fa047b34347b585a60596b2150312b
remove app.cookieParser for double appearance
server.js
server.js
var express = require('express'); var app = express(); var path = require('path'); var util = require('util'); var mongodb = require('mongodb'); var mongoose = require('mongoose'); var fs = require('fs'); var multer = require('multer'); var morgan = require('morgan'); var cookieParser = require('cookie-parser'); var b...
JavaScript
0.000001
@@ -1305,35 +1305,8 @@ );%0A%0A -%0Aapp.use(cookieParser());%0A%0A app. @@ -1790,24 +1790,52 @@ eParser());%0A +app.use(express.session());%0A app.use(morg
c65b87e646d659c39c3507bc757d477d81c6af80
update port for heroku
server.js
server.js
require('nko')('qQ-TD8SLnp9xar7D'); var isProduction = (process.env.NODE_ENV === 'production'); var http = require('http'); var port = (isProduction ? 80 : 8000); //Add var express = require('express'); var app = express(); app.use(express.static(__dirname)); http.createServer(app).listen(port); var io = require('s...
JavaScript
0
@@ -26,24 +26,26 @@ p9xar7D');%0A%0A +// var isProduc @@ -116,24 +116,26 @@ re('http');%0A +// var port = ( @@ -160,16 +160,142 @@ : 8000); +%0Avar port = Number(process.env.PORT %7C%7C 5000);%0A//app.listen(port, function() %7B%0A// console.log(%22Listening on %22 + port);%0A//%7D); %0A%0A//Add%0A
cb5eed88e490fe90881be7310caaf0593f99aa8f
Allow to bind to any port
server.js
server.js
var webpack = require('webpack'); var WebpackDevServer = require('webpack-dev-server'); var config = require('./webpack.config'); var port = process.env.PORT || 3000; new WebpackDevServer(webpack(config), { publicPath: config.output.publicPath, hot: true, historyApiFallback: true }).listen(port, 'localhost', fun...
JavaScript
0
@@ -300,21 +300,8 @@ ort, - 'localhost', fun
0da26f3d8d8848c0800c676a0eb7bb98a8806536
Update server.js
server.js
server.js
(function () { "use strict"; var http = require("http"), url = require("url"), spawn = require("child_process").spawn, path = require("path"), config = require("./config.json"), which = require("which"), server = null, EOL = "\n"; exports.init = function() { serv...
JavaScript
0
@@ -8,20 +8,17 @@ on () %7B%0A - +%09 %22use str @@ -27,25 +27,18 @@ t%22;%0A - %0A +%0A%09 var http %09%09%09= @@ -33,19 +33,19 @@ var http -%09%09%09 + = requir @@ -60,16 +60,19 @@ ),%0A%09 -%09url%09%09%09%09 + url = re @@ -90,17 +90,19 @@ ),%0A%09 -%09 + spawn -%09%09%09 + = r...
71d951f65d9ce51619472bc31e1efddd003383ec
Complete initial build of GET handlers
server.js
server.js
// Define Configuration var config = { // Authentication keys keys: [ '12345', '67890' ], // Allowed IP's or ranges ('*.*.*.*' - allow all) ips: [ '*.*.*.*' ], // Port designation port: 8080, // Base directory base: 'testdir' }; var fs = require('fs'),...
JavaScript
0
@@ -690,23 +690,42 @@ heck Key + (Called by checkReq) %0A - */%0A - %0A var chec @@ -975,16 +975,37 @@ Check IP + (Called by checkReq) %0A */%0A %0Av @@ -1594,16 +1594,45 @@ Request%0A + * Checks Key and IP Address%0A */%0A %0Ava @@ -1948,16 +1948,28 @@ 1: ' -Bad path +Could not list files ',%0A @@ -2726,2...
6bbc3aadab2cb2687f51fdfbff8171a63481367e
Use String.trim() to make sure there's no stray spaces now that node.js supports it
server.js
server.js
var http = require('http'); var express = require('express'); var errorhandler = require('errorhandler'); var fs = require('fs'); var csv = require('csv'); var StateTableFormatter = require('StateTableFormatter'); // Express var app = express(); // app.use(require('errorhandler')()); app.set('views', __dirname); app....
JavaScript
0.000001
@@ -2178,16 +2178,23 @@ r_index%5D +.trim() ;%0A%09%09%09%7D%0A%0A
e4ba7c25cc9f897bec785c182fc3af44d6527347
correct port
server.js
server.js
var express = require('express'); var cons = require('consolidate'); var swig = require('swig'); var mongoose = require('mongoose'); var cheerio = require('cheerio'); var request = require('request'); var routes = require('./routes') var pub = __dirname + '/src', view = __dirname + '/views'; mongoose.connect('mo...
JavaScript
0.000036
@@ -226,16 +226,62 @@ routes') +;%0Avar port = Number(process.env.PORT %7C%7C 3000); %0A%0Avar pu @@ -777,20 +777,20 @@ .listen( -3000 +port );%0A c @@ -831,13 +831,16 @@ ort -3000' +' + port );%0A%7D
83a6191eb3c553dc0148f8aa61cc1d471a8f1f65
fix error in setup when roles is not found
example/scripts/setup.js
example/scripts/setup.js
'use strict'; var grunt = require('grunt'), path = require('path'), async = require('async'), lxHelpers = require('lx-helpers'), rootPath = path.resolve(), config = require('../../lib/config.js')(rootPath), logging = require('../../lib/logging.js')( config.path.logs, config.nodeEnv, con...
JavaScript
0.000001
@@ -2468,32 +2468,33 @@ if ( +! roleExists) %7B%0A @@ -2491,86 +2491,24 @@ ists -) %7B%0A next();%0A %7D else + && roles.Admin) %7B%0A @@ -2649,32 +2649,109 @@ : user%7D, next);%0A + %7D else %7B%0A ...
94a0271a8b12626b1f20b7557f6616f48dba33e3
add loading spinner
app/global-styles.js
app/global-styles.js
import { injectGlobal } from 'styled-components'; /* eslint no-unused-expressions: 0 */ injectGlobal` html, body { margin: 0px; height: 100%; width: 100%; } body { font-family: 'Josefin Sans', sans-serif; } #app { background-color: #ECECEC; min-height: 100%; min-width: 100%; ...
JavaScript
0.000001
@@ -319,11 +319,8 @@ %0A - // bac @@ -341,70 +341,191 @@ http +s :// -bradsknutson.com/wp-content/uploads/2013/04/page-loader.gif +loading.io/loader/?use=eyJzaXplIjo2MCwic3BlZWQiOjEsImNiayI6IiNmZmZmZmYiLCJjMSI6IiM3QzRERkYiLCJjMiI6IjEyIiwiYzMiOiI3IiwiYzQiOiIyMCIsImM1IjoiNSIsImM2IjoiMzAiLCJ0eXBlIjoiZGVmYXVsdCJ9 ...
9261e3a1de94569cdc268def75471c2d480611f0
fix some status-setting bugs
server.js
server.js
var http = require('http'); var extend = require('node.extend'); var url = 'mongodb://localhost:27017/spruit'; var getApp = require('./models/app').getApp; var colls = require('./collections'); var utils = require("./utils"); var statusStr = utils.status; var l = require('./log').l; var PENDING = utils.PENDING; v...
JavaScript
0.000013
@@ -4187,32 +4187,38 @@ newAttemptStatus +, true ).inc('attempts. @@ -4524,16 +4524,22 @@ ptStatus +, true ).inc('a
a872fea5cbbe5609f4add374ff4c34850be808a7
Allow use of process port when starting server
server.js
server.js
var emptygif = require('emptygif'); var express = require('express'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io')(server); app.get('/track.gif', function(req, res, next) { io.emit('visit', { ip: req.ip, ua: req.headers['user-agent'] }); emptygif.sen...
JavaScript
0.000002
@@ -168,24 +168,117 @@ )(server);%0A%0A +app.set('port', (process.env.PORT %7C%7C 5000))%0Aapp.use(express.static(__dirname + '/public'));%0A%0A app.get('/tr @@ -570,79 +570,54 @@ );%0A%0A -app.use(express.static(__dirname + '/public'));%0A%0Aserver.listen(3000);%0A%0A +server.listen(app.get('port'), function() %7B%...
8bec1dcdffee5f30fe8349a1b929ec308439990d
Add security headers (observatori.mozilla.org)
server.js
server.js
var fs = require('fs') var path = require('path') var hyperstream = require('hyperstream') var app = require('./src/app.js') var store = require('./src/store.js') var httpProxy = require('http-proxy') // var proxy = httpProxy.createProxyServer({target: 'http://elmalvinense.com'}) var proxycake = httpProxy.createProxySe...
JavaScript
0.000001
@@ -2251,16 +2251,171 @@ .now())%0A + res.setHeader('X-XSS-Protection', '1; mode=block')%0A res.setHeader('X-Frame-Options', 'DENY')%0A res.setHeader('X-Content-Type-Options', 'nosniff')%0A // v
0233c10b3c12662cf80b0e1fe7372247fef43da3
Change $scope.$apply calls to pass in function, so code run inside Angular context
frontend/app/scripts/controllers/questionlist.js
frontend/app/scripts/controllers/questionlist.js
'use strict'; /** * @ngdoc function * @name conferenceAppApp.controller:QuestionlistPollingCtrl and QuestionlistListeningCtrl * @description * # Contains two implementations, QuestionlistPollingCtrl polls the server and updates the entire question list * # QuestionlistListeningCtrl listens for events and updates ...
JavaScript
0
@@ -1501,24 +1501,59 @@ question) %7B%0A + $scope.$apply(function() %7B%0A questi @@ -1567,16 +1567,18 @@ = true;%0A + $s @@ -1617,33 +1617,21 @@ ;%0A -$scope.$apply( +%7D );%0A +%0A $t @@ -1756,24 +1756,59 @@ voteMsg) %7B%0A + $scope.$apply(function() %7B%0A var ...
329a45634989e52c722c8e0e942f42d6db327df3
Fix the regex
server.js
server.js
// Copyright 2017 Google // // Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ...
JavaScript
1
@@ -2371,16 +2371,18 @@ if (!/ +%5C. apple%5C.c
1e523327aed95f3e6c401469da7bbb9ddd3b98c8
Fix name resolution for nested objects
server.js
server.js
'use strict'; var callable = require('es5-ext/object/valid-callable') , rename = require('fs2/lib/rename') , resolve = require('path').resolve , validDb = require('dbjs/valid-dbjs') , nextTick = process.nextTick , defNameResolve = function (db, file) { return db.__id__ + '.' + file.name; } , fireO...
JavaScript
0.000025
@@ -61,24 +61,86 @@ -callable')%0A + , replace = require('es5-ext/string/#/plain-replace-all')%0A , rename @@ -165,24 +165,24 @@ ib/rename')%0A - , resolve @@ -289,16 +289,47 @@ ick%0A , +defNameResolve, fireOnUpload;%0A%0A defNameR @@ -349,16 +349,20 @@ tion (db +File , file) @@ -366,63 +366,75 @@...
a11f24c7ea469c2e786cd7ca869e1ed79378be04
add back storage
main/bot/config.js
main/bot/config.js
/** * Created by thomasjeanneau on 08/02/2017. */ import Botkit from 'botkit' import BotkitStorageMongo from 'botkit-storage-mongo' const _bots = {} const { SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_BOT_TOKEN, PORT } = process.env if (!SLACK_CLIENT_ID || !SLACK_CLIENT_SECRET || !PORT) { console.log('Er...
JavaScript
0.000001
@@ -221,17 +221,30 @@ ,%0A PORT +,%0A MONGO_URL %0A - %7D = proc @@ -305,16 +305,30 @@ %7C%7C !PORT + %7C%7C !MONGO_URL ) %7B%0A co @@ -507,24 +507,96 @@ n%5D = bot%0A%7D%0A%0A +const mongoStorage = new BotkitStorageMongo(%7B%0A mongoUri: MONGO_URL%0A%7D)%0A%0A const contro @@ -665,16 +665,16 @@ : true,%0A ...
d6320adaf4c9aebdbc6267ff934d654aefbcc183
Remove unused variable
static/js/animatedHeader.js
static/js/animatedHeader.js
/** * Derivative of cbpAnimatedHeader.js on http://www.codrops.com * * Licensed under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ var animatedHeader = (function() { var header = $('.navbar-fixed-top'), didScroll = false, changeHeaderOn = 300; function init() { window.addE...
JavaScript
0.000015
@@ -161,29 +161,8 @@ */%0A -var animatedHeader = (fun @@ -765,10 +765,8 @@ %0A%0A%7D)();%0A -%0A%0A
7451222939c00f6d372ea67393249bdd7ea06f5b
Fix playlist not playing issue.
static/whatify/home/home.js
static/whatify/home/home.js
'use strict'; angular. module('whatify.home', ['ngRoute']). config(function($routeProvider) { $routeProvider. when('/', { templateUrl: templateRoot + '/home/home.html', controller: 'HomeController' }). when('/torrentGroups/:id', { ...
JavaScript
0
@@ -5076,32 +5076,80 @@ Playlist.html',%0A + controller: 'WhatPlayerController',%0A scop
6248f277e5204a3b1587f99999ad505d4aca1950
Fix a small glitch in socialcalc_plugin.js
vendor/assets/javascripts/socialcalc_plugin.js
vendor/assets/javascripts/socialcalc_plugin.js
(function($) { $.fn.socialcalc = function(options) { return this.each(function() { var content, control, element_id, key_event_handler; var _spreadsheet_element = this; options = options || {}; var form_selector = options['form'] || '#js-spreadsheet-form'; var content_selector = opti...
JavaScript
0.000656
@@ -777,16 +777,20 @@ %0A%0A +var key_even
5d32828eada0d534d182b14e709fa4ae5c359330
Fix typo
video-intelligence/system-test/analyze.test.js
video-intelligence/system-test/analyze.test.js
/** * Copyright 2017, Google, Inc. * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
JavaScript
0.999999
@@ -809,19 +809,22 @@ t = -console.log +await runAsync (%60$%7B
d3900b4c64bc69ae97a450eeae1f3de92f685277
fix dup raising of error
test/helper/async-check.js
test/helper/async-check.js
/** * */ Function.prototype.check = function(done) { var fn = this; return function() { try { fn.apply(this, arguments); return done(); } catch(e) { done(e); throw e; } }; };
JavaScript
0.000001
@@ -91,20 +91,8 @@ ) %7B%0A - try %7B%0A @@ -126,77 +126,15 @@ - return done();%0A %7D catch(e) %7B%0A done(e);%0A throw e;%0A %7D +done(); %0A %7D
18c68444dc489f127f449d6cd1481e4bef77cc39
update passport config: add passport-facebook strategy
koscom/2nd/expressServer/config/passport.js
koscom/2nd/expressServer/config/passport.js
var User = require("../models/user"); var passportLocal = require("passport-local"); var passportLocalStrategy = passportLocal.Strategy; module.exports = function(passport) { passport.serializeUser(User.serialize()); passport.deserializeUser(User.deserialize()); passport.use(new passportLocalStrategy(User.aut...
JavaScript
0.000001
@@ -462,11 +462,663 @@ are %EB%A5%BC %EC%82%AC%EC%9A%A9 +%0A%0A passport.use(new FacebookStrategy(%7B%0A clientID: %221139858509419307%22,%0A clientSecret: %221dcaab1854d47b009912b1c43288f62d%22,%0A callbackURL: %22http://localhost:3000/auth/facebook/callback%22%0A %7D, function(accessToken, refreshToken, p...
b235f8063a723444ba85bde4249452ebd082a6de
Remove exclamation
web/src/js/components/Campaign/CampaignBase.js
web/src/js/components/Campaign/CampaignBase.js
/* global graphql */ import React from 'react' import PropTypes from 'prop-types' import { QueryRenderer } from 'react-relay' import { withTheme } from '@material-ui/core/styles' import environment from 'js/relay-env' import moment from 'moment' import Paper from '@material-ui/core/Paper' import Typography from '@mate...
JavaScript
0.999999
@@ -1923,17 +1923,16 @@ Directly -! '%7D%0A
47a5251269d4e444bcb8e1ed2888af6531abe960
fix test
test/lib/connector.test.js
test/lib/connector.test.js
'use strict'; const sinon = require('sinon'); const chai = require('chai'), expect = chai.expect; const _ = require('lodash'); const config = require('../mock/config'); const Connector = require('./../../lib/bot/connector'); const SlackBot = require('./../../lib/index'); const socketServer = require('./../../lib/bot...
JavaScript
0.000002
@@ -2783,13 +2783,8 @@ it -.only ('Sh @@ -3088,59 +3088,8 @@ %3E %7B%0A - console.log('connected..', botEvt, count);%0A
1cabdd89711a37d07e012770238e839bb43bb3f0
remove console.log
test/lib/mnemonic.specs.js
test/lib/mnemonic.specs.js
describe('Mnemonic', function () { describe('Word list', function() { it('contains 1626 words', function() { expect(bitcoin.mnemonic.words.length).equal(1626); }) }); describe('#decodeHex', function(){ it('returns empty string when there are less than 3 words', function(){ var wlist = [ ...
JavaScript
0.000027
@@ -2464,515 +2464,8 @@ %7D);%0A -%0A it('test', function()%7B%0A var wlist = %5B%0A %22spiral%22, %22squeeze%22, %22strain%22, %22sunset%22, %22suspend%22, %22sympathy%22,%0A %22thigh%22, %22throne%22, %22total%22, %22unseen%22, %22weapon%22, %22weary%22%0A %5D;%0A%0A var mnemonic = bi...
16ceb9b7d02896b66f72b48ac7e849677d97e78a
add test for docs page
test/spec/sanity-checks.js
test/spec/sanity-checks.js
/* eslint-env mocha */ var request = require('supertest') var app = require('../../server.js') var path = require('path') var fs = require('fs') var assert = require('assert') /** * Basic sanity checks on the dev server */ describe('The prototype kit', function () { it('should generate assets into the /public fold...
JavaScript
0
@@ -950,12 +950,327 @@ %7D)%0A %7D) +%0A%0A it('should send with a well formed response for the docs page', function (done) %7B%0A request(app)%0A .get('/docs')%0A .expect('Content-Type', /text%5C/html/)%0A .expect(200)%0A .end(function (err, res) %7B%0A if (err) %7B%0A done(e...
13e57cda8eaf1f02df6ccc0f76834e016ca7de1a
correct express example
examples/echo-express.js
examples/echo-express.js
const linebot = require('../index.js'); const express = require('express'); const bodyParser = require('body-parser'); const bot = linebot({ channelId: process.env.CHANNEL_ID, channelSecret: process.env.CHANNEL_SECRET, channelAccessToken: process.env.CHANNEL_ACCESS_TOKEN }); const app = express(); const parser = ...
JavaScript
0.998176
@@ -457,16 +457,25 @@ parser, + function (req, r @@ -481,11 +481,8 @@ res) - =%3E %7B%0A%09 @@ -486,20 +486,19 @@ %7B%0A%09if (! -this +bot .verify( @@ -580,12 +580,11 @@ %09%7D%0A%09 -this +bot .par
e667a8243e8e9c2cd43c243d2e95bf2001e372e6
Add tests for Symbol#place
test/tests/PlacedSymbol.js
test/tests/PlacedSymbol.js
module('Symbol & Placed Symbol'); test('placedSymbol bounds', function() { var path = new Path.Circle([50, 50], 50); path.strokeColor = 'black'; path.strokeWidth = 1; path.strokeCap = 'round'; path.strokeJoin = 'round'; compareRectangles(path.strokeBounds, { x: -0.5, y: -0.5, width: 101, height: 101 }, 'Path...
JavaScript
0
@@ -1153,12 +1153,687 @@ , true);%0A%7D); +%0A%0Atest('Symbol#place()', function() %7B%0A%09var path = new Path.Circle(%5B50, 50%5D, 50);%0A%09var symbol = new Symbol(path);%0A%09var placedSymbol = symbol.place();%0A%09equals(function() %7B%0A%09%09return placedSymbol.parent == paper.project.activeLayer;%0A%09%7D, tru...
3672571e4f6ae951149de01cb823184305e8501a
Fix test case title for issue #70
test/unit/strftime_test.js
test/unit/strftime_test.js
module('strftime'); test('strftime is a function that returns a string', function() { stop(); $dom.countdown('11/22/2020') .on('update.countdown', function(event) { ok(typeof event.strftime === 'function'); ok(typeof event.strftime('foo') === 'string'); start(); }); }); test('strftime returns the ...
JavaScript
0
@@ -3481,45 +3481,56 @@ the -singular when given pair of arguments +correct plural even with odd looking (issue #70) ', f
743854e1d41d01f8899aadf6e5107d0b6b900c5f
Remove property ghosting tests (no longer restricted)
test/utils/customs.test.js
test/utils/customs.test.js
// test boolean utils var assert = require('assert'); var approx = require('../../tools/approx'); var customs = require('../../lib/utils/customs'); var math = require('../../index'); describe ('customs', function () { describe ('isSafeMethod', function() { it ('plain objects', function () { var object = ...
JavaScript
0
@@ -4506,581 +4506,8 @@ );%0A%0A - // custom inherited property%0A var object = %7B%7D;%0A object.foo = true;%0A object = Object.create(object);%0A assert.equal(customs.isSafeProperty(object, 'foo'), true);%0A%0A // ghosted native property%0A var array = %5B%5D;%0A array = Objec...
2d8cd93bd476773f0c9b2ef6b5e80b88acf5eb8c
Update location of expect.js library
test/web/make-web-tests.js
test/web/make-web-tests.js
// generates tests that work in a browser // XXX // have it run through valid and invalid properly var pth = require("path") , fs = require("fs") , dir = function (path) { return pth.join(__dirname, "..", path); } , allFromDir = function (dir, ext, asJSON) { return fs.readdirSync(dir) ...
JavaScript
0
@@ -1444,32 +1444,106 @@ .js'%3E%3C/script%3E%22%0A + , %22 %3Cscript src='../../node_modules/expect.js/index.js'%3E%3C/script%3E%22%0A , %22 %3Cscri
a745eaa7b31b6a97f735c9c21488fadbdc209d81
Add terminationPort to cable request model
model/request.js
model/request.js
/*jslint es5:true*/ var mongoose = require('mongoose'); var Schema = mongoose.Schema; var Mixed = Schema.Types.Mixed; var ObjectId = Schema.Types.ObjectId; // shared configuration for request and cable schemas var projectValues = ['FRIB', 'REA']; var originCategoryValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8'...
JavaScript
0
@@ -1564,32 +1564,61 @@ onType: String,%0A + terminationPort: String,%0A wiringDrawin @@ -1730,32 +1730,61 @@ onType: String,%0A + terminationPort: String,%0A wiringDrawin
08f6f8ed932caddd3ee2b7b0485131102ff4fec4
remove unsued device query
models/Device.js
models/Device.js
var bcrypt = require('bcrypt'); module.exports = function(sequelize, DataTypes) { var name = 'Device'; var attributes = { devicename: { type: DataTypes.STRING, unique: true, }, password: { type: DataTypes.STRING, allowNull: false, }, location: { type:DataTypes.STR...
JavaScript
0.000407
@@ -3891,28 +3891,8 @@ ce,%0A - query: query,%0A
9b696839f084ee86c43f74c51726ce8c8122d812
use arrow functions
models/events.js
models/events.js
// Events repository function eventsActions(obj) { return { addPersonalEvent: function (form) { return obj.none('INSERT INTO events VALUES(DEFAULT,$1,current_date,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15)', [form['user'], form['type'], ...
JavaScript
0.001996
@@ -14,25 +14,16 @@ ository%0A -function eventsAc @@ -32,16 +32,19 @@ ons(obj) + =%3E %7B%0A%0A @@ -78,32 +78,26 @@ alEvent: - function (form) + =%3E %7B%0A%0A @@ -898,24 +898,18 @@ ent: - function (form) + =%3E %7B%0A%0A @@ -1718,25 +1718,16 @@ All: - function (email) %7B%0A%0A @@ -1722,16...
b4083345024c5a36874e04dc6eb02617a5bbc2f9
Replace Survey#isClosed field with Survey#state and add State constants
models/survey.js
models/survey.js
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var SurveySchema = new Schema( { description : String, name : String, isClosed : {type : Number, default : 0}, numberChoices : {type : Number, default : 1}, created : {type : Date, default : Date.now}, lastEdited : {t...
JavaScript
0
@@ -158,16 +158,13 @@ -isClosed +state : %7B @@ -471,8 +471,107 @@ chema);%0A +%0Amodule.exports.State = %7B%7D;%0Amodule.exports.State.IsOpened = 0;%0Amodule.exports.State.IsClosed = 1;%0A%0A
73f056cfd1494860744914c3b123195736238309
Add test for #380
tests/lib/rules/jsx-key.js
tests/lib/rules/jsx-key.js
/** * @fileoverview Report missing `key` props in iterators/collection literals. * @author Ben Mosher */ 'use strict'; // ------------------------------------------------------------------------------ // Requirements // ------------------------------------------------------------------------------ var rule = requi...
JavaScript
0
@@ -1383,32 +1383,117 @@ , parserOptions: + parserOptions%7D,%0A %7Bcode: '%5B1, 2, 3%5D.map(function(x) %7B return; %7D);', parserOptions: parserOptions%7D%0A
570c651a120093854408fe7c6510ae1a0ec38d53
Update test-orchestrator.js
tests/test-orchestrator.js
tests/test-orchestrator.js
var tabs = require("sdk/tabs"); var { data } = require("sdk/self"); var { setTimeout } = require("sdk/timers"); var pageWorker; function OpenMediaWebsiteMock(pageDomain, done) { tabs.once('ready', function(tab) { pageWorker = tab.attach({ contentScriptFile: ["./Finder.js", "./" + pageDomain + "...
JavaScript
0
@@ -2077,30 +2077,28 @@ ay/pause on -player +open .spotify.com @@ -2145,38 +2145,36 @@ diaWebsiteMock(%22 -player +open .spotify.com%22, f @@ -2372,38 +2372,36 @@ y next track on -player +open .spotify.com%22%5D = @@ -2444,38 +2444,36 @@ diaWebsiteMock(%22 -player +open .spotify.com%22, f @@ -2593,30 +2593,28...
4e21bfe91634420525cb5e486e923b5ae8fcd27a
Write test for resource
tests/unit/helpers.spec.js
tests/unit/helpers.spec.js
(function() { 'use strict'; var expect = require('chai').expect; var helper = require('../../lib/helpers'); var httpMocks = require('node-mocks-http'); describe('Helpers test', function() { context('getRules', function() { var path; var rules; beforeEach(function() { path = '....
JavaScript
0.000003
@@ -30,22 +30,20 @@ %0A%0A var -expect +chai = requi @@ -56,22 +56,12 @@ ai') -.expect;%0A var +,%0A hel @@ -98,15 +98,12 @@ rs') -; +, %0A -var htt @@ -137,16 +137,50 @@ s-http') +,%0A spies = require('chai-spies') ;%0A%0A des @@ -210,24 +210,106 @@ unction() %7B%0A + var expect;%0A%0A bef...
6c62b349ef9f4d4eebeea10ca8c1990d4b56f8d9
Make Y-axis smaller if the measurement values are small. (#249)
components/frontend/src/TrendGraph.js
components/frontend/src/TrendGraph.js
import React from 'react'; import { VictoryChart, VictoryLine, VictoryTheme, VictoryAxis } from 'victory'; function readableNumber(number) { var scale = ['', 'k', 'm']; var exponent = Math.floor(Math.log(number) / Math.log(1000)); return (number / Math.pow(1000, exponent)).toFixed(0) + scale[exponent]; } functi...
JavaScript
0.000319
@@ -377,17 +377,16 @@ x_y = 10 -0 ;%0A for @@ -1048,16 +1048,21 @@ 0, max_y + + 10 %5D%7D%0A
c2a67a8e950e9f90dd76064a2eb512db26c947da
fix layer popup for 0 values
components/ui/map/popup/LayerPopup.js
components/ui/map/popup/LayerPopup.js
// TO-DO: replace with components/map/popup import React from 'react'; import PropTypes from 'prop-types'; import isEmpty from 'lodash/isEmpty'; import moment from 'moment'; import numeral from 'numeral'; import { replace } from 'layer-manager'; import Spinner from 'components/ui/Spinner'; class LayerPopup extends...
JavaScript
0.000001
@@ -2081,36 +2081,52 @@ item.format && +( data + %7C%7C data === 0) ) %7B%0A data =
0d25cf32d92a7999b5250f78b906285ae5c65a66
remove localhost from dev adminIp list
config/notifyBC/config.development.js
config/notifyBC/config.development.js
'use strict'; module.exports = { "adminIps": [ '127.0.0.1', process.env.DEVEX_HOST ], "port": 3000, "smtp": { "direct": false, "service": process.env.MAILER_SERVICE_PROVIDER, "logger": true, "auth": { "user": process.env.MAILER_EMAIL_ID, "pass": process.env.MAILER_PASSWORD ...
JavaScript
0
@@ -47,25 +47,8 @@ : %5B%0A - '127.0.0.1',%0A
7f0f27e9c5656e4468df6e62ff87a43ba776d0f5
Fix missing variable declaration for this.log - Fixes #22
repo/index.js
repo/index.js
'use strict'; var banner = require('../banner'); var path = require('path'); var pkgNameValidator = require('pkg-name'); var util = require('util'); var yeoman = require('yeoman-generator'); var elementNameValidator = require('validate-element-name'); var RepoGenerator = yeoman.generators.Base.extend({ init: fun...
JavaScript
0
@@ -1219,32 +1219,60 @@ = this.async(); +%0A var log = this.log; %0A%0A var pr
208c2c623c06c86ecd5f104803c7270415692be6
Remove debug lines from order views.
static/global/js/app/order.js
static/global/js/app/order.js
/* Models */ App.OrderItem = DS.Model.extend({ url: 'fund/orders/:order_id/items', // Model fields // FIXME Make the drf2 serializer use the id (or slug) to serialize DS.belongsTo. // This will enable us to remove the project_slug field. project: DS.belongsTo('App.Project'), project_sl...
JavaScript
0
@@ -702,84 +702,34 @@ ;%0A%0A%0A -/*%0A Controllers%0A */%0A%0AApp.CurrentOrderItemListController = Em.ArrayController +App.PaymentInfo = DS.Model .ext @@ -738,109 +738,421 @@ d(%7B%0A -%0A -init +url : +' fun -ction() %7B%0A this._super();%0A console.log(this.toString() + %22.init%22);%0A ...
28317c5d77fb6fea98804498fbd72dbb079dee09
Fix out of bounds bug where ball went off edge of canvas
app/lib/collision.js
app/lib/collision.js
import canvas from 'canvas'; export default { isOutOfBounds(prop) { const AX = prop.x + prop.width; const AY = prop.y + prop.height; if (prop.y === 0) { return 'north'; } if (AY === canvas.height) { return 'south'; } if (AX === canvas.width) { return 'east'; } ...
JavaScript
0.000001
@@ -153,18 +153,17 @@ (prop.y -== +%3C = 0) %7B%0A @@ -201,18 +201,17 @@ if (AY -== +%3E = canvas @@ -261,18 +261,17 @@ if (AX -== +%3E = canvas @@ -323,18 +323,17 @@ (prop.x -== +%3C = 0) %7B%0A
bdb895eec2cf81713463a245d1cebc0e0ea8b344
Fix HipChat placeholder typo.
ui/src/kapacitor/components/HipChatConfig.js
ui/src/kapacitor/components/HipChatConfig.js
import React, {PropTypes} from 'react' import QuestionMarkTooltip from 'src/shared/components/QuestionMarkTooltip' import {HIPCHAT_TOKEN_TIP} from 'src/kapacitor/copy' const { bool, func, shape, string, } = PropTypes const HipchatConfig = React.createClass({ propTypes: { config: shape({ options: s...
JavaScript
0.000001
@@ -1776,37 +1776,36 @@ r=%22your-hipchat- -token +room %22%0A
9400107191d723677578f0d2fcdeca9e1db4be39
update test status to pending only in distributed node
socket.js
socket.js
var _ = require('underscore')._; var Sequelize = require("sequelize"); sio.configure('production', function() { sio.set('log level', 1); }); sio.sockets.on('connection', function(socket) { var deviceName=""; socket.on('deviceInfo', function (data) { models.Device.find({where: {name: data.name}}) ...
JavaScript
0
@@ -5481,16 +5481,73 @@ estId)%7B%0A +%09%09%09%09%09 %09%09%09if(err !=null )%7B%0A%09%09%09%09%09 %09%09%09%09return%0A%09%09%09%09%09 %09%09%09%7D%0A %09%09%09
3e38ef222f9b32b36b49670944e5221a2d2079e4
Fix UDP sink write.
prolific.udp/udp.bin.js
prolific.udp/udp.bin.js
#!/usr/bin/env node /* ___ usage ___ en_US ___ prolific.udp --bind ip:port options: --help display help message -b, --bind <address:port> port to listen to ___ . ___ */ require('arguable')(module, require('cadence')(function (async, program) { var Shuttle = re...
JavaScript
0.000001
@@ -773,17 +773,17 @@ -s +S huttle.s
886ef71dd7390068710c8fbe0e7a73fa09c90e5c
add test for unchecked checkbox
src/addons/editors/__tests__/CheckboxEditor.spec.js
src/addons/editors/__tests__/CheckboxEditor.spec.js
'use strict'; var React = require('react'); var TestUtils = require('react/lib/ReactTestUtils'); var CheckboxEditor = require('../CheckboxEditor'); describe('CheckboxEditor', () => { var component; var testColumn = { onRowSelect : function(){} }; describe('Basic tests', () => { beforeEach(()...
JavaScript
0.000001
@@ -296,17 +296,16 @@ () =%3E %7B%0A -%0A befor @@ -643,29 +643,29 @@ ted -or not based on props +if value prop is true ', ( @@ -881,18 +881,18 @@ box is c -he +li cked', ( @@ -1241,17 +1241,421 @@ %7D);%0A - %7D);%0A +%0A describe('Unchecked tests', () =%3E %7B%0A beforeEach(() =%3E %7B%0A compo...
1644f21ec5f3d3333f7e53a6a28cb5920a6e3a26
Remove el from DOM when dropping a piece
src/chessground.js
src/chessground.js
'use strict'; var Chess = require('chess.js').Chess; var _ = require('lodash'); var interact = window.interact; function Chessground(element, cfg) { var defaults = { orientation: 'white', draggable: { enabled: 'both', // 'white' | 'black' | 'both' | false events: { start: function( /* e...
JavaScript
0
@@ -3043,38 +3043,33 @@ -piece.removeAttribute('style') +var square = event.target ;%0A @@ -3118,38 +3118,219 @@ -event.target.appendChild(piece +piece.parentNode.removeChild(piece);%0A%0A var newPiece = document.createElement('div');%0A newPiece.className = piece.className;%0A square.appe...
97c1f8f50c7007e407e66978522eb2721eedef4e
process.environment should be process.platform
src/cli-harmony.js
src/cli-harmony.js
#!/usr/bin/env node 'use strict'; require("babel-core/register")({ stage: 0, ignore: function(filename) { var node_modules = "node_modules"; var slash = process.environment === "win32" ? "\\" : "/"; var gluestick_folder = [node_modules, "gluestick", "src"].join(slash); // Make sure babel does not ...
JavaScript
0.998799
@@ -171,19 +171,16 @@ ess. -environment +platform ===
72660426ac30db2843cf8b217019750b15c9d651
Disable SPF if window.History or History.prototype.pushState are missing.
src/client/main.js
src/client/main.js
/** * @fileoverview The primary SPF entry point. * * @author nicksay@google.com (Alex Nicksay) */ goog.provide('spf.main'); goog.require('spf'); goog.require('spf.config'); goog.require('spf.debug'); goog.require('spf.nav'); goog.require('spf.net.script'); goog.require('spf.net.style'); goog.require('spf.pubsub')...
JavaScript
0
@@ -600,32 +600,152 @@ ig) %7B%0A -var enable = !!( +// This check is extra paranoid pending further investigation.%0A var enable = !!(window.History && History.prototype.pushState &&%0A window.h
9acdcb754678fdce8beab2a00ba687bff8e4cab5
Improve Service Worker
src/assets/scripts/service-worker/service-worker.js
src/assets/scripts/service-worker/service-worker.js
// JavaScript Document // Scripts written by __gulp_init_author_name__ @ __gulp_init_author_company__ import * as expiration from "workbox-expiration"; import * as precaching from "workbox-precaching"; import * as routing from "workbox-routing"; import * as strategies from "workbox-strategies"; /** * Cache WordPres...
JavaScript
0
@@ -358,67 +358,168 @@ -/%5E(?:(?!wp-admin%7Cwp-content%7Cwp-includes%7Cwp-login)(.*)%5C/)?$/ +(%7B url %7D) =%3E %7B%0A return (url.pathname && !url.pathname.match(/%5E%5C/(wp-admin%7Cwp-content%7Cwp-includes%7Cwp-json%7Cwp-login)/) && url.pathname.match(/%5C/$/));%0A %7D ,%0A @@ -820,337 +820,982 @...
e1f992ce652f09583b4be5126649ee92eb1db57c
refactor Shader
src/core/Shader.js
src/core/Shader.js
import { GLShader } from 'pixi-gl-core'; import settings from './settings'; function checkPrecision(src, def) { if (src instanceof Array) { if (src[0].substring(0, 9) !== 'precision') { const copy = src.slice(0); copy.unshift(`precision ${def} float;`); ret...
JavaScript
0.000014
@@ -706,42 +706,8 @@ r%0A%7B%0A - /* eslint-disable max-len */%0A%0A @@ -1207,17 +1207,40 @@ ould sit -, +.%0A e.g. %7Bp @@ -1386,24 +1386,37 @@ n(vertexSrc, + precision %7C%7C settings.PR @@ -1471,16 +1471,29 @@ mentSrc, + precision %7C%7C setting @@ -1515,25 +1515,20 @@ GMENT...
5f8d93127112de014421a35e7d7ba225eb83789a
test comment
src/correlation.js
src/correlation.js
function scatterPlot() { // reformat data const Attributes = ["MPG", "Cylinders", "Displacement", "Horsepower", "Weight", "Acceleration"]; const desc = [ "Miles per gallon (M/gal)", "Cylinders (n)", "Displacement (cc)", "Horsepower (hp)", "Weight (kg)", "Accel...
JavaScript
0.000001
@@ -1,16 +1,39 @@ +// draw a scatter plot%0A function scatter
7d15b4d1f181de8868c375c545a51e4dfc28a611
Clean up memory leak in reliableMarginRight
src/css/support.js
src/css/support.js
define([ "../core", "../var/support" ], function( jQuery, support ) { (function() { var pixelPositionVal, boxSizingReliableVal, docElem = document.documentElement, container = document.createElement( "div" ), div = document.createElement( "div" ); if ( !div.style ) { return; } // Support: IE9-11+ // S...
JavaScript
0
@@ -3010,32 +3010,66 @@ ld( container ); +%0A%09%09%09%09div.removeChild( marginDiv ); %0A%0A%09%09%09%09return ret
513971efb6314a6c266d4681f84c3371615c4739
add urlProfilePage external link
app/scripts/popup.js
app/scripts/popup.js
'use strict'; var currentTab; var query = {active: true, currentWindow: true}; chrome.tabs.query(query, function(tabs) { currentTab = tabs[0]; var domain = kconnect.getDomainFromUrl(currentTab.url); $('#host').html(domain); var trustabilityRequest = kconnect.getIsTrustable(domain); var readabilityRequest = ...
JavaScript
0
@@ -514,20 +514,35 @@ ) %7B%0A -if ( +var jabberResult = JSON.par @@ -562,33 +562,47 @@ Response%5B0%5D) -%0A +;%0A%0A if (jabberResult .numReviews%5B @@ -665,17 +665,16 @@ n%0A %7D%0A -%0A $('# @@ -717,16 +717,17 @@ atings ( + ' +%0A @@ -732,50 +732,97 @@ -JSON.parse(siteJabbe...
c8e4c976944963cf9a059b83a59d9686a1cf9bdf
Change Venue to TBA
src/data/events.js
src/data/events.js
import _ from 'lodash' const events = [ { "title": "HTML/CSS", "start": new Date("Tue Sep 6 2016 18:00:00 GMT-0400 (EDT)"), "end": new Date("Tue Sep 6 2016 20:00:00 GMT-0400 (EDT)"), "location": "Klaus 1443", "rsvpLink": "https://facebook.com/GtWebdev/", "image": "/img/html5-logo.png", "d...
JavaScript
0
@@ -204,34 +204,27 @@ location%22: %22 -Klaus 1443 +TBA %22,%0A %22rsvp
aa21b197c470cac2c8e5ecbc9c0f4c6fa58ba995
Update CreateUser.js
public/javascripts/CreateUser.js
public/javascripts/CreateUser.js
jQuery('#createUser').submit(function(){ var toPass = { "username":jQuery('#username').val(), "password":jQuery('#password').val(), "email":jQuery('#email').val(), "firstName":jQuery('#first').val(), "lastName":jQuery('#last').val() }; console.log(toPass); jQuery....
JavaScript
0.000001
@@ -500,18 +500,69 @@ rt(%22 -User Added +Please check your email for an account creation confirmation. %22);%0A @@ -582,8 +582,9 @@ %7D);%0A%7D); +%0A
5323187172afab7ca74a50a46cfb67f9a9098f69
fix return inside forEach in coach.form.js
public/javascripts/coach.form.js
public/javascripts/coach.form.js
$(function() { var $editor = $('.coach-edit'); var todo = (function() { var $overview = $editor.find('.overview'); var $el = $overview.find('.todo'); var $checkbox = $editor.find('#form3-listed'); var must = [{ html: '<a href="/account/profile">Complete your lichess profile</a>', che...
JavaScript
0.000002
@@ -592,16 +592,33 @@ +for (let name of %5B'profil @@ -654,30 +654,8 @@ es'%5D -.forEach(function(name ) %7B%0A @@ -733,26 +733,24 @@ e;%0A %7D -); %0A ret @@ -1056,42 +1056,27 @@ -must.forEach(function(o) %7B%0A +for (let o of must) if @@ -1129,18 +1129,8 @@ ));%0A - ...
e89c036826a917f88550a1e1b081c72639969ca2
Update UserCtrl.js
public/js/controller/UserCtrl.js
public/js/controller/UserCtrl.js
/*globals angular */ 'use strict'; angular.module('UserController', []).controller('UserCtrl', ['$scope', 'Users', '$location', 'Authentication', function($scope, Users, $location, Authentication) { $scope.result = {}; $scope.question = {title:"Wie fanden Sie die Veranstaltung?"}; //******************...
JavaScript
0.000001
@@ -109,16 +109,18 @@ Users', +%0A%0A '$locati @@ -219,16 +219,17 @@ t = %7B%7D;%0A +%0A $sco @@ -2987,466 +2987,8 @@ -//********************************* Test Michael ************%0A $scope.number = 1;%0A %0A $scope.addQuestion = function()%7B %0A $scope.number++;%0A %7D;%0A %0A ...
6436e94ae20527b5dbd76f964796f488607addbe
Check for endpoints
restdoccer.js
restdoccer.js
#!/usr/bin/env node var argv = require('optimist') .usage("Usage: $0 --file [filename]") .demand([ 'file' ]) .alias('file', 'f') .describe('file', 'File containing REST documentation JSON') .alias('output', 'o') .describe('output', 'Output directory') .default('output', 'output') .describe('minify', "Minify HT...
JavaScript
0
@@ -917,16 +917,150 @@ ();%0A%0A%7D%0A%0A +if(!doc_json.endpoints %7C%7C doc_json.endpoints.length == 0) %7B%0A%0A%09console.error(%22No specified endpoints, exiting.%22);%0A%09process.exit();%0A%0A%7D%0A%0A if(!fs.e
80e5bdc6a3d99bb4c6e4f663cbdcd8e2404df4d6
Define date format base constants
src/date-format.js
src/date-format.js
( function( global, factory ) { if ( typeof module === "object" && typeof module.exports === "object" ) { module.require( "locale" ); module.require( "format" ); module.exports = factory( global ); } else { factory( global ); } }( this, function( global ) { function Da...
JavaScript
0.000304
@@ -326,23 +326,1015 @@ mat( - pattern, local +) %7B%0A global.Format.call( this );%0A %7D%0A%0A DateFormat.ERA_FIELD = 0;%0A DateFormat.YEAR_FIELD = 1;%0A DateFormat.MONTH_FIELD = 2;%0A DateFormat.DATE_FIELD = 3;%0A DateFormat.HOUR_OF_DAY1_FIELD = 4;%0A DateFormat.HOUR_OF_DAY0_FIELD = 5;%0...
f9297f142e97b91bd690e9496c52cf4528928c49
allow `className` and `activeClass` props (#386)
match/src/index.js
match/src/index.js
import { h, Component } from 'preact'; import { subscribers, getCurrentUrl, Link as StaticLink, exec } from 'preact-router'; export class Match extends Component { componentDidMount() { this.update = url => { this.nextUrl = url; this.setState({}); }; subscribers.push(this.update); } componentWillUnmount...
JavaScript
0
@@ -619,64 +619,254 @@ ort -const Link = (%7B activeClassName, path, ...props %7D) =%3E (%0A +function Link(%7B class: c, className, activeClass, activeClassName, path, ...props %7D) %7B%0A%09const inactive = %5Bc, className%5D.filter(Boolean).join(' ');%0A%09const active = %5Bc, className, activeClass, activeClassNa...
847da423ba0bed5e32ef0ec9f4fb4d354345e7d7
Update container constructor call in embed
src/embed/index.js
src/embed/index.js
import './embed.less'; import { Container, HelpPlugin, CaptionsPlugin, SoundPlugin, PausePlugin, UserDataPlugin } from 'springroll-container'; import '../libs/jquery.mobile.custom'; import '../plugins/jquery-menuToggle'; const container = new Container('#appContainer'); const frame = $('#frame'); const cap...
JavaScript
0
@@ -231,58 +231,8 @@ ';%0A%0A -const container = new Container('#appContainer');%0A cons @@ -250,24 +250,24 @@ ('#frame');%0A + const captio @@ -465,24 +465,30 @@ sButton');%0A%0A +const container.us @@ -488,125 +488,154 @@ iner -.uses(new UserDataPlugin());%0Acontainer.uses(new HelpPlugin('#helpButton'));%0Aco...
4c22d30a7b09811f14815f0fc4e37cd2728d7ca0
fix new image export issue
public/js/split-file.js
public/js/split-file.js
$(function() { PDFJS.disableWorker = true; // Asynchronous download PDF as an ArrayBuffer var pdfUpload = document.getElementById('pdf'); pdfUpload.onchange = function(event) { upload('pdf'); changePDF(document.getElementById('pdf')); } var imgUpload = document.getElementById...
JavaScript
0.000001
@@ -2003,16 +2003,388 @@ , 0,0);%0A +%0A var new_canvas = document.createElement('canvas');%0A var context = new_canvas.getContext('2d');%0A new_canvas.width = img.width;%0A new_canvas.height = img.height;%0A context.drawImage(img, 0,0);%0A%0A var datau...
fab3f7702d7bdcf07c767c365578ba2050dc67d3
Revert "Back to d3.timer()"
public/scripts/chart.js
public/scripts/chart.js
define(['chart-pings', 'config'], function(pings, config) { var element = d3.select('#chart').append('svg:svg') var elementWidth = parseInt(element.style('width')) var elementHeight = parseInt(element.style('height')) var xScale = d3.scale.linear().range([0, elementWidth]) var yScale = d3.scale.li...
JavaScript
0
@@ -1045,16 +1045,19 @@ -d3.timer +setInterval (fun @@ -1640,16 +1640,20 @@ %7D)%0A %7D +, 50 )%0A%0A r
af4d35484607ab84f77475e7f07cca0e4300885e
remove unused ajax
public/services/auth.js
public/services/auth.js
angular.module('Hiemino') .factory('Auth', ['$http', '$location', '$rootScope', '$cookieStore', '$alert', function($http, $location, $rootScope, $cookieStore, $alert) { $rootScope.currentUser = $cookieStore.get('user'); $cookieStore.remove('user'); return { login: function(user) { ...
JavaScript
0.000006
@@ -1028,1520 +1028,8 @@ %7D,%0A - test: function(user) %7B%0A return $http.get('/api/createaccount')%0A .success(function(datat) %7B%0A $rootScope.currentUser = data;%0A $location.path('/home');%0A%0A $alert(%7B%0A title: 'Cheers!',%0A ...
b267607732ba521ec771152a5a07ec73f7174dfc
Fix calibration to not crash on undefined
weighthub/actionhandlers/calibrateHandler.js
weighthub/actionhandlers/calibrateHandler.js
const quantize = require('../quantizer'); const TARGETS = ['zero', 'full', 'empty']; function calibrate(weightsRef, sensorsRef, action) { const {id, target} = action; let valRef = sensorsRef.child(id + '/value'); let weightRef = weightsRef.child(id); if(TARGETS.includes(target)) { weightRef.once('value', ...
JavaScript
0.000002
@@ -448,24 +448,47 @@ + current);%0A + if (current) %7B%0A weight @@ -515,24 +515,32 @@ t(current);%0A + %7D%0A %7D);%0A %7D
12244299ec8842b4db5446b63a39e075e0e2514b
Fix Users Route , Derp in https://github.com/iamMohit27/NodeExplorers/commit/d6910a29daaa13069f41c154fbd177a4055081a6
routes/api.js
routes/api.js
var express = require('express'); var router = express.Router(); /* GET api listing. */ router.get('/', (req, res, next) => { res.send('respond with a json resource'); }); // Colleges router.get('/colleges', (req, res, next) => { res.send('You Accessed, /api/colleges'); }); router.get('/colleges/:id', (req, res...
JavaScript
0.000005
@@ -399,35 +399,32 @@ ter.get('/users/ -:id ', (req, res, ne @@ -467,20 +467,17 @@ api/user -/:id +s ');%0A%7D);%0A
dd6b9c74bfcc14ee0d7831a5bb4790023665cb18
Add semi-colons to terminate statements per best practise
routes/api.js
routes/api.js
var express = require('express'); var router = express.Router(); var switchDao = require('../dao/switchDao.js') var switchService = require('../services/switchService.js') router.param('switch', function(req, res, next, switchName) { console.log('Loading switch from database') switchDao.getOne(switchName, functio...
JavaScript
0.000556
@@ -105,16 +105,17 @@ Dao.js') +; %0Avar swi @@ -166,16 +166,17 @@ ice.js') +; %0A%0Arouter @@ -276,16 +276,17 @@ tabase') +; %0A switc @@ -372,24 +372,25 @@ rn next(err) +; %0A req.swi @@ -409,16 +409,17 @@ ngSwitch +; %0A con @@ -470,16 +470,17 @@ e + '%5D') +; %0A nex @@ -482,16 +482,17 @@ n...
f8b659bff2bcf2888bb2c324f62022392e47dced
Fix pie chart rendering
routes/pie.js
routes/pie.js
'use strict'; var Canvas = require('canvas'); var express = require('express'); var router = express.Router(); var colors = { green: '#82BB41', yellow: '#f3e46e', red: '#e37068', }; function renderProgress(ctx, middle, color, radius, progress) { progress = Math.min(progress, 100); progress = Math.max(prog...
JavaScript
0
@@ -860,20 +860,26 @@ adius = +( size + - 1) * 0.5;%0A
6a2960c7671ec3ec67d66f48fed889d531246206
Fix method call
www/js/controllers/DEx/OverviewController.js
www/js/controllers/DEx/OverviewController.js
angular.module("omniControllers") .controller("DExOverviewController", ["$scope","Account","Orderbook","Wallet","PropertyManager", function DExOverviewController($scope,Account,Orderbook,Wallet,PropertyManager){ $scope.isLoggedIn = Account.isLoggedIn; $scope.orderbooks = []; $scope.availableTokens = []; ...
JavaScript
0.000008
@@ -1053,16 +1053,26 @@ ger.list +Properties ($scope.
67c28b05e87e0f42c4f2e0c65ab4198eb0ada620
Fix accidental typo that snuck in
public/js/models/model.search.js
public/js/models/model.search.js
(function (window){ requirejs([ 'underscore', 'backbone', 'BB' ], function(_, Backbone, BB) { BB.model_definitions.search = Backbone.Model.extend({ defaults: {}, initialize: function(){ if(BB.bootstrapped.filters4){ thi...
JavaScript
0.00479
@@ -290,9 +290,8 @@ ters -4 )%7B%0A
bf21edfaacc0aa2c171f0672b945eb785f7e3233
Add missing semicolon
_gulp/config.js
_gulp/config.js
// --- // CONFIG FILE // Define your tasks & variables here // --- var themeName ='theme_name' var themePath = 'src/Frontend/Themes/'+ themeName +'/'; module.exports = { scss: { src: themePath + 'Core/Layout/Scss/**/*.scss', settings: { outputStyle: 'compressed' }, css...
JavaScript
0.999999
@@ -88,16 +88,17 @@ me_name' +; %0Avar the
11d0d52d38b68978e2c1838f7ea032bf5f4fe337
Exclude config.js from tests as dotenv will cause it to fail
internals/testing/test-bundler.js
internals/testing/test-bundler.js
// needed for regenerator-runtime // (ES7 generator support is required by redux-saga) import 'babel-polyfill'; import sinon from 'sinon'; import chai from 'chai'; import chaiEnzyme from 'chai-enzyme'; chai.use(chaiEnzyme()); global.chai = chai; global.sinon = sinon; global.expect = chai.expect; global.should = chai...
JavaScript
0
@@ -536,16 +536,23 @@ es%7Cstore +%7Cconfig )).)*%5C.j
ae12c7f4201ab02f26cd3516841f4e71b7925835
Remove Navbar from Playdates and add margin to top of view
PuppyPlayDate/PlayDates.js
PuppyPlayDate/PlayDates.js
import React, { Component } from 'react'; import { AppRegistry, Image, ListView, Navigator, StyleSheet, TabBarIOS, Text, TouchableHighlight, View } from 'react-native'; import PlayDateCreate from './PlayDateCreate'; import MainScene from './MainScene'; import PlayDateShow from './PlayDateShow'; impor...
JavaScript
0
@@ -2375,105 +2375,34 @@ View -%3E%0A %3CNavbar navigator=%7Bthis.props.navigator%7D hasBackButton=%7Bfalse%7D title='Your Groups'%3E%0A%0A + style=%7B%7BmarginTop: 80%7D%7D%3E%0A @@ -2435,18 +2435,16 @@ - style=%7Bs @@ -2471,18 +2471,16 @@ - - onPress= @@ -2517,26 +2517,24 @@ ...
25f6f605d9e48404cd54a824c8e81a248a039ecb
fix typo
celos-ci/src/main/resources/com/collective/celos/ci/mode/test/celos-ci-scripts.js
celos-ci/src/main/resources/com/collective/celos/ci/mode/test/celos-ci-scripts.js
importPackage(Packages.com.collective.celos.ci.testing.fixtures.create); importPackage(Packages.com.collective.celos.ci.testing.fixtures.deploy); importPackage(Packages.com.collective.celos.ci.testing.fixtures.compare); importPackage(Packages.com.collective.celos.ci.mode.test); importPackage(Packages.com.collective.cel...
JavaScript
0.999991
@@ -1471,20 +1471,23 @@ oToJson( -avro +creator OrPath) @@ -1497,20 +1497,23 @@ if (! -avro +creator OrPath) @@ -1582,20 +1582,23 @@ (typeof -avro +creator OrPath = @@ -1619,20 +1619,23 @@ -avro +creator OrPath = @@ -1667,20 +1667,23 @@ Creator( -avro +creator OrPath)%0A @@ -1723,20 +1723,23 @@...
0cc5f179bae5cb1df6f18cf1397ad56b6504b060
Remove debugging code
wtem/static/wtem/wtem.js
wtem/static/wtem/wtem.js
$(function() { var to_submit; $('#submit_answers').click(function(e) { //e.preventDefault(); to_submit = {}; $('.exercise-wtem').each(function() { var el = $(this); if(el.hasClass('exercise')) { handlers.edumed(el); } else { ...
JavaScript
0.000001
@@ -479,56 +479,8 @@ %7D);%0A - console.log(JSON.stringify(to_submit));%0A
2c705f1fdeab7c63ee81a01e148fd28dea2200bc
Update ready.js
events/ready.js
events/ready.js
const version = require('../package.json').version; const fs = require('fs'); const moment = require('moment-timezone'); module.exports = client => { var d = new Date(); var ser = client.guilds.get("191539621119655936"); console.log(`I\`m Online at : ${toTimeZone(d, "Asia/Hong_Kong")} \n AIwaz 御坂網絡 : ${ve...
JavaScript
0.000001
@@ -206,25 +206,25 @@ t(%221 -91539621119655936 +79445290795794432 %22);%0D
18b859c0c9c14a9848bd52f560938c1f935f4de7
Fix getting period id after search requisition endpoint was changed to return dto
src/main/webapp/public/requisitions/period.factory.js
src/main/webapp/public/requisitions/period.factory.js
(function() { 'use strict'; angular.module('openlmis.requisitions').factory('PeriodFactory', periodFactory); periodFactory.$inject = ['$resource', 'RequisitionURL', 'RequisitionService', 'messageService', '$q']; function periodFactory($resource, RequisitionURL, RequisitionService, messageService, ...
JavaScript
0.000001
@@ -1653,17 +1653,18 @@ ngPeriod -I +.i d == per
e635add156adf5d3fa111e986c98005c41e1f33e
Use custom ticks in example
example/cone.js
example/cone.js
var createCamera = require('3d-view-controls') var getBounds = require('bound-points') var perspective = require('gl-mat4/perspective') var createAxes = require('gl-axes3d') var createSpikes = require('gl-spikes3d') var createSelect = require('gl-select-static') var getBounds = require('bound-points') var mous...
JavaScript
0
@@ -714,29 +714,8 @@ ')%0A%0A -console.log(bounds)%0A%0A var @@ -918,31 +918,33 @@ 500 -%0A%7D)%0Aconsole.log(camera) +,%0A mode: 'turntable'%0A%7D)%0A %0Avar @@ -1038,16 +1038,403 @@ eight%5D)%0A +var tickSpacing = 5;%0Avar ticks = bounds%5B0%5D.map((v,i) =%3E %7B%0A var arr = %5B%5D;%0A var firstTick = Math...
c01eebd47c87151477bd21845efeb9578eab8e45
Remove dependency on blacklisted gem, gulp-compass.
tasks/task-style-compile.js
tasks/task-style-compile.js
var gulp = require("gulp"); var CFG = require("./utils/config.js"); var $ = require("gulp-load-plugins")(); var path = require("path"); var pkg = require(path.join("..", CFG.FILE.config.pkg)); var argv = require("yargs").argv; var notify = require("./utils/notify-style-compile"); /** * style:compile ...
JavaScript
0
@@ -201,16 +201,60 @@ .pkg));%0A +var exec = require(%22child_process%22).exec;%0A var argv @@ -281,16 +281,16 @@ ).argv;%0A - var noti @@ -361,51 +361,8 @@ ile%0A - * @see www.npmjs.org/package/gulp-compass%0A * @ @@ -508,734 +508,428 @@ ion( +callback ) %7B%0A +%0A -return gulp.src(%5B%0A path.joi...
0772978dde46a9b6fc03c2e42690122c870c5ea5
Fix weather example
examples/weather/main.js
examples/weather/main.js
import { default as React, Component } from 'react'; var ReactDOM = require('react-dom'); import { Marker } from "react-google-maps"; import { ReactiveBase, ReactiveMap } from '../../app/app.js'; class Main extends Component { constructor(props) { super(props); this.onAllData = this.onAllData.bind(this); thi...
JavaScript
0.999974
@@ -1843,35 +1843,15 @@ rce%5B -this.props.mapping.location +%22coord%22 %5D);%0A @@ -2292,35 +2292,15 @@ rce%5B -this.props.mapping.location +%22coord%22 %5D;%0A%09 @@ -3244,37 +3244,15 @@ eld= -%7Bthis.props.mapping.location%7D +%22coord%22 %0A%09%09%09 @@ -3419,29 +3419,26 @@ yle= -%7Bthis.props.mapStyle%7D +...
01c7ff4839ace47fa2714abeaf2673daedf22dce
Check for null cases
resources/js/modules/offcanvas.js
resources/js/modules/offcanvas.js
import Slideout from 'slideout/dist/slideout.js'; (function(Slideout) { "use strict"; /** * OffCanvas module. */ class OffCanvas { constructor() { this._init(); } /* * For resizing the window and figuring out what the state needs to be */ ...
JavaScript
0.000001
@@ -1290,16 +1290,70 @@ +%0A if(parentNode != null) %7B%0A childNod @@ -1456,16 +1456,20 @@ + parentNo @@ -1490,16 +1490,30 @@ ldNode); +%0A %7D %0A%0A @@ -1568,16 +1568,91 @@ e icons%0A + if(document.querySelector('a.main-menu-toggle')...
9e4a1425891fe79239760275fdae76c758b8de78
Update http.js example
example/http.js
example/http.js
var http = require("njs-http"); var host = "localhost"; var port = 1337; function cb (req, res) { console.log("Log: " + req.method + req.url); if(req.method == "POST") console.log("POST: " + req.data); else if(req.method == "PUT") console.log("PUT: " + req.data); res.end("Hello NectarJS !"); }; var options = ...
JavaScript
0
@@ -427,38 +427,4 @@ s);%0A -%0AsetInterval(function()%7B%7D, 10000);
c2e2e3908d312c447a5377108ac492da572c78ab
support use of local session store
td/config/session.config.js
td/config/session.config.js
'use strict'; var session = require('express-session'); var AzureTablesStoreFactory = require('connect-azuretables')(session); function configSessions(app) { var cookieOptions = { maxAge: 3600000 }; var logger = require('../config/loggers.config').logger; if(process.env.NODE_ENV != 'development'...
JavaScript
0
@@ -153,20 +153,16 @@ (app) %7B%0A - %0A var @@ -264,19 +264,16 @@ er;%0A - %0A if + (pro @@ -293,25 +293,8 @@ _ENV - != 'development' && @@ -313,16 +313,33 @@ NODE_ENV + != 'development' ) %7B%0A @@ -406,16 +406,17 @@ .error(%7B + security @@ -421,16 +421,17 @@ ty: true + %7D, 'secu...
abf2362332a5eade3451dac8be95b47ea0d5aa21
Add correct type to action in test
src/map/sagas/nearest-details/nearest-details.test.js
src/map/sagas/nearest-details/nearest-details.test.js
import { testSaga, expectSaga } from 'redux-saga-test-plan'; import watchFetchNearestDetails, { fetchNearestDetails } from './nearest-details'; import fetchNearestDetail from '../../services/nearest-detail/nearest-detail'; import ACTIONS from '../../../shared/actions'; describe('watchFetchNearestDetails', () => { ...
JavaScript
0.000003
@@ -215,24 +215,78 @@ t-detail';%0A%0A +import %7B MAP_HIGHLIGHT %7D from '../../ducks/map/map';%0A%0A import ACTIO @@ -1209,24 +1209,16 @@ type: -ACTIONS. MAP_HIGH
d5655a56b238b2ae32c6f17ceda72c7c14c7d749
use smaller tray icon on windows (16x16 forever apparently), cf. #462
appsrc/sagas/tray.js
appsrc/sagas/tray.js
import path from 'path' import os from '../util/os' import {app, Menu, Tray} from '../electron' import {takeEvery} from 'redux-saga' import {call} from 'redux-saga/effects' import createQueue from './queue' import {focusWindow, navigate, quit} from '../actions' import {BOOT} from '../constants/action-types' let tra...
JavaScript
0
@@ -350,69 +350,229 @@ %7B%0A -const iconPath = path.resolve(%60$%7B__dirname%7D/../static/images/ +// cf. https://github.com/itchio/itch/issues/462%0A // windows still displays a 16x16, whereas%0A // some linux DEs don't know what to do with a @x2, etc.%0A const iconName = os.platform() === 'linux' ? 'itchio-tra...