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 |
|---|---|---|---|---|---|---|---|
4d76c4211bb4334de14b7dd73c5b49f3ef9814df | Update routes.js | server/routes.js | server/routes.js | var Todo = require('./models/todo');
var Athlete = require('./models/athlete');
function getTodos(res) {
Todo.find(function (err, todos) {
// if there is an error retrieving, send the error. nothing after res.send(err) will execute
if (err) {
res.send(err);
}
res.json(... | JavaScript | 0.000002 | @@ -1078,16 +1078,46 @@
do_id;%0A%0A
+ console.log(%22Teste%22);%0A
|
57c95234834bc682ea5784168cf4319a139f08ba | Update renderers.js | js/renderers.js | js/renderers.js | google.charts.load('current', {packages: ['corechart', 'line']});
var key = '';
function formatter(hour, minute) {
var str = '';
if (hour < 10) {
str += '0';
}
str += String(hour);
str += ':';
if (minute < 10) {
str += '0';
}
str += String(minute);
return str;
}
fu... | JavaScript | 0.000001 | @@ -5561,24 +5561,47 @@
').empty();%0A
+ contest_list = %5B%5D;%0A
for (var
@@ -5643,13 +5643,132 @@
d')
-break
+continue;%0A contest_list.append(p); %0A %7D%0A for (var i in contest_list.sort()) %7B%0A var p = contest_list%5Bi%5D
;%0A
|
885d4b433d7ab7de49536600a3e020f7daa71a12 | create a room state variable we'll use to keep track of the current step and the timer? | server/server.js | server/server.js | var app = require('http').createServer(handler)
var io = require('socket.io')(app);
var fs = require('fs');
var md5 = require('MD5');
app.listen(40001);
function handler (req, res) {
fs.readFile(__dirname + '/index.html',
function (err, data) {
if (err) {
res.writeHead(500);
return res.end('Error ... | JavaScript | 0 | @@ -506,16 +506,103 @@
= null;%0A
+ this.state = %7B%0A status: 'waiting',%0A timerHandle: null,%0A timerEnd: null%0A %7D;%0A
this.u
|
0ff619bfd05147fbcf0b42f02ec10da774018cb4 | Add fade & alternate colors effects | server/server.js | server/server.js | var net = require('net'),
express = require('express'),
moment = require('moment'),
stringformat = require('string_format');
var app = express(),
clients = [];
var availbleCommands = [
'showcolor',
'setbrightness',
'alternatecolors',
'twocolor',
'flashcolor',
'showrainbow'
];
app.all('/*'... | JavaScript | 0 | @@ -293,16 +293,26 @@
rainbow'
+,%0D%0A%09'fade'
%0D%0A%5D;%0D%0A%0D%0A
|
347183b32ea800aa305ab3658394e5440271d579 | Return empty list if no special tasks are defined. | server/server.js | server/server.js | 'use strict';
const express = require('express');
const request = require('superagent');
const bodyParser = require('body-parser');
const passport = require('passport');
const OAuth2Strategy = require('passport-oauth2');
const session = require('express-session');
const MongoStore = require('connect-mongo')(session);
... | JavaScript | 0.000016 | @@ -3803,24 +3803,79 @@
(taskIds) %7B%0A
+ if (!taskIds) %7B%0A return %5B%5D%0A %7D else %7B%0A
return t
@@ -3889,16 +3889,20 @@
+
+
.split('
@@ -3905,16 +3905,20 @@
it(',')%0A
+
@@ -3930,24 +3930,28 @@
taskId =%3E %7B%0A
+
@@ -3994,18 +3994,28 @@... |
c263302271ec03401a2a90870b3578d521e73799 | Fix express 4 deprecated message. | lib/error-handler.js | lib/error-handler.js | var statusCodes = require('http').STATUS_CODES;
/**
* Expose middleware.
*/
module.exports = errorHandlerFactory;
/**
* Error middleware.
*/
function errorHandlerFactory(options) {
options = options || {};
// Default view to `"error"`.
options.view = options.view || 'error';
// Default status to 500
... | JavaScript | 0 | @@ -1277,28 +1277,35 @@
res.s
-end
+tatus
(status
-,
+).send(
errorToJ
@@ -1546,20 +1546,27 @@
es.s
-end
+tatus
(status
-,
+).send(
err.
|
2d376a562bc37189e1390143761f3c10843d9b1f | Add socket.io | server/server.js | server/server.js | "use strict";
/*
*
* Entry file into the server
* @app -
* our express app. Exported for testing and flexibility.
*
*/
var app = require('./main/app.js'),
port = app.get('port'),
log = 'Listening on ' + app.get('base url') + ':' + port;
app.listen(port);
console.log(log);
| JavaScript | 0.000001 | @@ -156,24 +156,101 @@
n/app.js'),%0A
+ http = require('http').Server(app),%0A io = require('socket.io')(http),%0A
port =
@@ -331,18 +331,19 @@
port;%0A%0A
-ap
+htt
p.listen
@@ -368,8 +368,86 @@
g(log);%0A
+%0Aio.on('connection', function(socket)%7B%0A console.log('a user connected');%0A%7D);%0A
|
23205dda14185fdc6ee8ce79eab7e508b110a09b | Update spiderman.js | js/spiderman.js | js/spiderman.js |
var private_key = '63823d9c3343ef191f88b0f44c0dbe6d7cce7e4e';
var public_key = '6f769846a34acb7b0299a000d488f562';
var id = '1009610';
var ts = new Date().getTime();
var crypto = require('crypto');
var string = ts + private_key + public_key;
var hash = crypto.createHash('md5').update(string).digest('hex');
... | JavaScript | 0 | @@ -886,10 +886,11 @@
%0D%0A%09%09%09%0D%0A%7D
+)
%0D%0A
|
2278a9a510c15bf60036539d91285aa3924aa12b | Configure server for both dev and prod environments | server/server.js | server/server.js | var express = require('express');
var bodyParser = require('body-parser');
var session = require('express-session');
var passport = require('passport');
var sockets = require('./routes/sockets.js');
var auth = require('./auth/auth.js');
var fs = require('fs');
var path = require('path');
require('./db/index.js')(launc... | JavaScript | 0 | @@ -857,16 +857,45 @@
nt file%0A
+%0A if (process.env.PORT) %7B%0A
var se
@@ -936,18 +936,22 @@
er(%0A
-%7B%0A
+ %7B%0A
ke
@@ -1023,16 +1023,18 @@
,%0A
+
cert: fs
@@ -1088,24 +1088,26 @@
ert.pem')),%0A
+
%7D,%0A a
@@ -1105,22 +1105,96 @@
%7D,%0A
+
app);%0A
+ %7D else... |
e158a76d456e536ad7348cd8e8762e613460b01a | add socket.io | server/server.js | server/server.js |
// BASE SETUP
// =============================================================================
import express, {Router} from 'express'
import bodyParser from 'body-parser'
const server = new express()
const port = process.env.PORT || 8080
const router = new Router()
const apiRouter = new Router()
... | JavaScript | 0.000001 | @@ -1,12 +1,25 @@
+'use strict'%0A
%0A// BASE SET
@@ -142,16 +142,40 @@
xpress'%0A
+import http from 'http'%0A
import b
@@ -207,41 +207,115 @@
er'%0A
-%0Aconst server = new express(
+import socketIo from 'socket.io'%0A%0Aconst app = new express()%0Aconst server = http.Server(app
)%0Aco
@@ -33... |
8a86843e5faffc2222391d2e6905fe56a2be0fe5 | Comment out body parser | server/server.js | server/server.js | // require('dotenv').config();
const bodyParser = require('body-parser');
const metadata = require('../package.json');
const compression = require('compression');
const express = require('express');
const path = require('path');
const port = 3000;
// const secret = process.env.SESSION_SECRET;
// const redisClient = ... | JavaScript | 0 | @@ -20,24 +20,27 @@
).config();%0A
+//
const bodyPa
@@ -358,24 +358,27 @@
express();%0A%0A
+//
app.use(body
|
c1c36a5d11f15eab2b4b24ef1077c755d7d1c12b | Remove setting follow flag to false in hideSuperfishUl(). | js/superfish.js | js/superfish.js |
/*
* Superfish v1.5.6 - jQuery menu widget
* Copyright (c) 2013 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
;(function($){
$.fn.superfish = function(op){
var sf = $.fn.superfish,
c = sf.c... | JavaScript | 0 | @@ -4266,54 +4266,8 @@
l);%0A
-%09%09%09%09%09%09$$.children('a').data('follow', false);%0A
%09%09%09%09
|
a67a70ec7693081fa6aa1f94eb9e82cb22b4e7a4 | Add support for "innerRef" prop | lib/create-styled-component.js | lib/create-styled-component.js | import React from "react";
import R from "ramda";
import T from "prop-types";
export default function createStyledComponent(displayName, use) {
return class StyledComponent extends React.Component {
static displayName = displayName;
static propTypes = {
use: T.oneOfType([T.string, T.func]),
visu... | JavaScript | 0.000001 | @@ -390,16 +390,40 @@
bject),%0A
+ innerRef: T.func,%0A
ch
@@ -1214,16 +1214,26 @@
mations,
+ innerRef,
...prop
@@ -1250,16 +1250,76 @@
.props;%0A
+ const ref = innerRef ? %7B ref: r =%3E innerRef(r) %7D : %7B%7D%0A
re
@@ -1344,16 +1344,35 @@
mponent%0A
+ %7B...ref%7D%0A
... |
b63146ae39a9fe27cf0cf731d982431b36de2644 | Include proxy in express server for api | server/server.js | server/server.js | import express from 'express'
import path from 'path'
// Port to listen to
const port = (process.env.PORT || 8080)
// Build dir
var build_dir = path.join(__dirname, 'build')
// Initialize http api
const app = express()
//Serving the files on the dist folder
app.use(express.static(build_dir))
//Send index.html w... | JavaScript | 0 | @@ -51,40 +51,123 @@
th'%0A
-%0A// Port to listen to%0Aconst port
+import proxy from 'express-http-proxy'%0A%0A// Port to listen to%0Aconst PORT = (process.env.PORT %7C%7C 8080)%0Aconst API_PORT
= (
@@ -174,32 +174,36 @@
process.env.
+API_
PORT %7C%7C
8080)%0A%0A// Bu
@@ -190,19 +190,19 @@
PORT %7C%7C
-808
+30... |
70b8b1efcfd33fce6f504d75486bf6c8ceec6ba8 | use environment variables if set for the certificates | server/server.js | server/server.js | //
// Sample Intelligent.li application that using Meteor
//
// Currently this only provides the latest value for the
// feed to the client, which means it doesn't support charts etc.
// this is something we'll improve in time.
Feeds = new Meteor.Collection("feeds");
Samples = new Meteor.Collection("samples");
Conne... | JavaScript | 0.000001 | @@ -537,24 +537,44 @@
clientPem =
+ process.env.CERT %7C%7C
Assets.getT
@@ -600,24 +600,43 @@
var keyPem =
+ process.env.KEY %7C%7C
Assets.getT
|
453659cd2040248a19ce0f68d2003462eb8e21c4 | Fix geojson property formatting | lib/geojson-utils.js | lib/geojson-utils.js | const {
filter,
groupBy,
last,
omit,
sortBy,
omitBy
} = require('lodash');
const { feature, featureCollection } = require('@turf/helpers');
function isValidLineString(lineString) {
if (!lineString) {
return false;
}
if (lineString.length <= 1) {
return false;
}
// Reject linestrings wit... | JavaScript | 0.000066 | @@ -1,16 +1,29 @@
const %7B%0A
+ cloneDeep,%0A
filter
@@ -1981,27 +1981,113 @@
es) %7B%0A
-properties.
+const formattedProperties = %7B%0A ...cloneDeep(omitBy(properties, value =%3E value === null)),%0A
route_co
@@ -2085,26 +2085,25 @@
route_color
- =
+:
formatHexCo
@@ -2133,23 +2133,14 @@
lor)
-;%... |
3ee9053de34d4f0f2f7f2323b487d9b4cd0769c2 | Update server.js | server/server.js | server/server.js | 'use strict';
require('../bower_components/closure-library/closure/goog/bootstrap/nodejs');
goog.require('goog.array');
goog.require('goog.string');
var grunt = require('grunt');
var express = require('express');
var app = express();
var fs = require("fs");
var request = require('request');
var plovrVars = require('.... | JavaScript | 0.000001 | @@ -255,42 +255,8 @@
s%22);
-%0Avar request = require('request');
%0A%0Ava
|
efab144195aec8b46a61abc5b78e325475f0fed8 | Update updatetab.js | js/updatetab.js | js/updatetab.js | var Latexdown={
delay: 150, // delay after keystroke before updating
previewid: null,
eventtapid: null,
preview: null, // filled in by Init below
timeout: null, // store setTimout id
mjRunning: false, // true when MathJax is processing
oldText: null, // used to check if an update is ... | JavaScript | 0.000001 | @@ -1511,91 +1511,111 @@
-console.log(%22id2:%22+this.previewid);%0A this.preview=$(%22#my-pagination-content%22
+this.preview=document.getElementById(my-pagination-content);%0A console.log(%22preview%22+this.preview
);%0A
|
772bab9dbe47c7e0214097a198116711567f9b8b | Update updatetab.js | js/updatetab.js | js/updatetab.js | function updatetab(url, pane) {
// http://docs.mathjax.org/en/latest/tex.html
// From http://stackoverflow.com/a/651735
var ext = url.split('.').pop().toLowerCase();
var ismd = true;
if ($.inArray(ext, ['md', 'markdown', 'mdown', 'mkdn', 'mkd', 'mdtxt', 'mdtext']) == -1) {
ismd = false;
}
... | JavaScript | 0.000001 | @@ -396,15 +396,19 @@
%22%5C%5C%5C
+%5C%5C
%5B%22,%22%5C%5C%5C
+%5C%5C
%5D%22%5D,
@@ -416,15 +416,19 @@
%22%5C%5C%5C
+%5C%5C
(%22,%22%5C%5C%5C
+%5C%5C
)%22%5D%5D
|
37c335e68c5b7c2cd7e302519a7525c52766373d | Change Server For New APP | server/server.js | server/server.js | //=============================================================================
// Nelderson's Online Core Server
// Version: 0.2.1 - August 3rd, 2017
//=============================================================================
var express = require('express');
var app = express();
var server = require('http').Serve... | JavaScript | 0 | @@ -827,614 +827,8 @@
t);%0A
-%0A//----------------------------------%0A// Allow Cors Domain:%0A// res.header('Access-Control-Allow-Origin', 'MyDomainHere');%0A// This Allow for all client acces to your server%0A// Change for your IP or Domain or use localhost !%0A//----------------------------------%0Avar allow... |
36a3cbe0a92d371f007eca368abf0a012664ee0d | Fix variable name | lib/hockey-deploy.js | lib/hockey-deploy.js | var execSync = require('child_process').execSync;
function formHockeyAppCurlCommand(apiKey, appId, buildPath, dsymPath, deployData) {
var iosBuild = typeof dsymPath != 'undefined';
var deployCurlCommand = 'curl \
-F "status=2" \
-F "notify='+ deployData.notify + '" \
-F "notes=' + deployData.notes + '... | JavaScript | 0.99981 | @@ -112,36 +112,38 @@
dsymPath, deploy
-Data
+Config
) %7B%0A var iosBui
@@ -254,28 +254,30 @@
fy='+ deploy
-Data
+Config
.notify + '%22
@@ -303,20 +303,22 @@
+ deploy
-Data
+Config
.notes +
@@ -709,20 +709,22 @@
, deploy
-Data
+Config
) %7B%0A va
@@ -814,36 +814,38 @@
Location, deploy
-Data
+Config
);%0A%0... |
3abe62037e6fe194f4d687d91d23f6626b1ad6e4 | Add arrows to lines | js/wikipedia.js | js/wikipedia.js | var startpage = getPageName(prompt("Name of page to start at:"));
startpage = wordwrap(startpage,20)
// -- CREATE NETWORK -- //
//Make a container
var nodes = new vis.DataSet([{id:startpage,label:startpage,
value:2,level:0,color:getColor(0),
parent:startpage... | JavaScript | 0.000025 | @@ -1628,24 +1628,37 @@
to: subpage
+, arrows:%22to%22
%7D); //TODO e
|
5f42652d8e75a958965fb09866ff01f962bb2c9a | remove usb detection | server/socket.js | server/socket.js | const cv = require('opencv');
const usbDetect = require('usb-detection');
const _ = require('lodash');
const io = require('socket.io-client');
// camera properties
const width = 320;
const height = 240;
const fps = 5;
const interval = 1000 / fps;
// initialize camera
// const camera = new cv.VideoCapture(0);
const ... | JavaScript | 0.000004 | @@ -19,24 +19,27 @@
('opencv');%0A
+//
const usbDet
@@ -587,16 +587,19 @@
= %5B%5D;%0A%0A
+//
usbDetec
@@ -627,23 +627,19 @@
=%3E %7B%0A
-devices
+%5B1%5D
.forEach
@@ -2719,12 +2719,15 @@
;%0A %7D);%0A
+//
%7D);%0A
|
08fa2cd6420f016f8b3a516fe1c7654aeb3ab585 | support attributes in compiler | lib/l20n/compiler.js | lib/l20n/compiler.js | if (typeof define !== 'function') {
var define = require('amdefine')(module);
}
define(function (require, exports, module) {
'use strict';
var EventEmitter = require('./events').EventEmitter;
var Parser = require('./parser').Parser;
function Compiler() {
// Public
this.compile = compile;
this.... | JavaScript | 0.000001 | @@ -1072,16 +1072,196 @@
.index;%0A
+ this.attributes = %7B%7D;%0A%0A for (var i = 0; i %3C node.attributes.length; i++) %7B%0A var attr = node.attributes%5Bi%5D;%0A this.attributes%5Battr.key.name%5D = attr;%0A %7D%0A
%7D%0A%0A
@@ -2729,24 +2729,166 @@
get(args) %7B%0A
+ var a... |
d54a27bb74ec9884e2c5f685905834833ed3ce26 | add `webpack` to karma test frameworks | karma.config.js | karma.config.js | var path = require('path');
var basePath = '.';
var absoluteBasePath = path.resolve(path.join(__dirname, basePath));
var suite = 'test/browser/*Spec.js';
// configures browsers to run test against
// any of [ 'ChromeHeadless', 'Chrome', 'Firefox', 'Safari' ]
var browsers = (process.env.TEST_BROWSERS || 'ChromeHeadl... | JavaScript | 0.000001 | @@ -561,16 +561,33 @@
on-chai'
+,%0A 'webpack'
%0A %5D,%0A
|
15ba091c6dc09182fa8f5457fb1a3e758e64090b | Modify example app to use global HotKeys component where it makes sense | examples/src/App.js | examples/src/App.js | import { HotKeys } from 'react-hotkeys';
import React from 'react';
import Node from './Node';
import HOCWrappedNode from './HOCWrappedNode';
const keyMap = {
DELETE: { sequence: 'backspace', action: 'keyup'},
EXPAND: 'alt+up',
CONTRACT: 'alt+down',
MOVE_UP: 'up',
MOVE_DOWN: 'down',
MOVE_LEFT: 'left',
M... | JavaScript | 0 | @@ -46,16 +46,30 @@
rt React
+, %7B Fragment %7D
from 'r
@@ -1237,31 +1237,60 @@
rn (%0A %3C
-HotKeys
+Fragment%3E%0A %3CHotKeys%0A
keyMap=%7Bglo
@@ -1299,16 +1299,26 @@
lKeyMap%7D
+%0A
handler
@@ -1339,16 +1339,37 @@
ers%7D
- global%3E
+%0A global%0A /%3E%0A
%0A... |
b93262318da917142ee05df1abe44e1fe9fbdeb7 | Improve consistency of block-level whitespace | lib/md-converters.js | lib/md-converters.js | 'use strict';
var trim = require('./utilities').trim;
module.exports = [
{
filter: 'p',
replacement: function (innerHTML) {
return '\n\n' + innerHTML + '\n\n';
}
},
{
filter: 'br',
replacement: function () {
return ' \n';
}
},
{
filter: 'h[1-6]',
replacement: f... | JavaScript | 0.030377 | @@ -145,18 +145,16 @@
turn '%5Cn
-%5Cn
' + inne
@@ -1871,24 +1871,31 @@
return
+ '%5Cn' +
' ' + in
@@ -1918,32 +1918,41 @@
/%5Cn/g, '%5Cn ')
+ + '%5Cn%5Cn'
;%0A %7D%0A
|
6345ad68227918e27f31e5f1b466d771d9a3bd2d | remove TODO comment | lib/message-queue.js | lib/message-queue.js | const _ = require('lodash');
function MessageQueue() {
const self = this;
self.errorHandler = console.error;
self.databasePromise = null;
self.collectionName = '_queue';
self.pollingInterval = 1000;
self.processingTimeout = 30 * 1000;
self.maxWorkers = 5;
const _workers = {};
let _numWorkers = 0;... | JavaScript | 0 | @@ -6315,25 +6315,8 @@
) %7B%0A
- // TODO:%0A
|
4c52b7761e8a01fb8aaa2b408f07a4b0c00e27e5 | Add ability for each rule to process custom config. | ext/plugins/base.js | ext/plugins/base.js | 'use strict';
module.exports = function(addonContext, name) {
function BasePlugin(options) {
this.options = options;
this.syntax = null; // set by HTMLBars
this.config = addonContext.loadConfig()[name];
}
BasePlugin.prototype.transform = function(ast) {
var pluginContext = this;
var walker =... | JavaScript | 0 | @@ -160,16 +160,17 @@
TMLBars%0A
+%0A
this
@@ -178,16 +178,40 @@
config =
+ this.parseConfig(%0A
addonCo
@@ -234,21 +234,108 @@
()%5Bname%5D
-;%0A %7D
+%0A );%0A %7D%0A%0A BasePlugin.prototype.parseConfig = function(config) %7B%0A return config;%0A %7D;
%0A%0A Base
|
c96bfc8d81ae6ce81019a3e10058fd7a4eb6a5a9 | add more accented characters to regexs | lib/regexps/index.js | lib/regexps/index.js | exports.email = /^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/;
export... | JavaScript | 0 | @@ -1082,13 +1082,17 @@
%C3%89%C3%8D%C3%93%C3%9A
+%C5%90%C5%B0
%C3%A1%C3%A9%C3%AD%C3%B3%C3%BA
+%C5%91%C5%B1
%C3%80%C3%88%C3%8C%C3%92
|
5cbb5a7e8d94f6c766590a0f10ecd4c5e4b1221b | Increase unary minus precedence | lib/rpn/operators.js | lib/rpn/operators.js | define({
'_': {
regExp: '_',
precedence: 50,
assoc: 'right',
argsCount: 1,
execFunc: function (a) {
return -1 * a;
}
},
'pow': {
regExp: 'pow',
precedence: 50,
assoc: 'right',
argsCount: 2,
execFunc: function... | JavaScript | 0.000482 | @@ -46,33 +46,33 @@
precedence:
-5
+6
0,%0A assoc
|
0e545e569c03edf3f41ff120793af9ca191b48a4 | handle blank names | api/services/AssetManagement.js | api/services/AssetManagement.js | var aws = require('aws-sdk'),
mime = require('mime'),
path = require('path'),
request = require('request'),
s3stream = require('s3-upload-stream')(new aws.S3());
var promisifyStream = function(stream) {
return new Promise((resolve, reject) => {
stream.on('end', resolve);
stream.on('error', reject);
... | JavaScript | 0.998391 | @@ -23,16 +23,46 @@
-sdk'),%0A
+ crypto = require('crypto'),%0A
mime =
@@ -352,16 +352,189 @@
%7D);%0A%7D;%0A%0A
+var basename = function(url) %7B%0A var name = path.basename(url).replace(/%5C?.*/, '').replace('%25', '');%0A return name === '' ? crypto.randomBytes(2).toString('hex') : name;%0A%7D%0A%0A
module.... |
058a1e3a32b3dda08bb3f8cd3f3fc695b3b06a8f | Use database record to sign jwt token without password | services/auth.js | services/auth.js | const jwt = require('jsonwebtoken')
const config = require('config')
const bcrypt = require('bcrypt')
const User = require('./../models/user')
const Authenticate = (user) => {
return new Promise((resolve, reject) => {
User.findOne({ 'where': { 'email': user.email } })
.then((record) => {
if (!... | JavaScript | 0 | @@ -98,16 +98,49 @@
crypt')%0A
+const _ = require('lodash')%0A
const Us
@@ -174,16 +174,16 @@
/user')%0A
-
%0Aconst A
@@ -435,32 +435,78 @@
%7D %7D)%0A %7D%0A%0A
+ record = record.get(%7B plain: true %7D)%0A%0A
bcrypt.c
@@ -630,20 +630,44 @@
wt.sign(
-user
+_.omit(record, %5B'password'... |
e85ad338714917ff3a6a650ca94c19e99ad9148c | add capitalize function to cat-naming-utils | src/main/javascript/util/cat-naming-util.js | src/main/javascript/util/cat-naming-util.js | /**
* Created by tscheinecker on 26.08.2014.
*/
'use strict';
window.cat.util = window.cat.util || {};
window.cat.util.pluralize = function (string) {
if (_.isUndefined(string) || string.length === 0) {
return '';
}
var lastChar = string[string.length - 1];
switch (lastChar) {
case ... | JavaScript | 0.005605 | @@ -497,8 +497,229 @@
%7D%0A%0A%7D;
+%0A%0Awindow.cat.util.capitalize = function (string) %7B%0A if (_.isUndefined(string) %7C%7C string.length === 0) %7B%0A return '';%0A %7D%0A%0A return string.substring(0, 1).toUpperCase() + string.substring(1, string.length);%0A%7D;
|
770f3e5c3e837aff784b38638c983eba304f8d84 | Fix bug: WebView doesn't display requested URL | apps/dg/views/web_view.js | apps/dg/views/web_view.js | // ==========================================================================
// DG.WebView
//
// Copyright (c) 2014 by The Concord Consortium, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance wi... | JavaScript | 0 | @@ -1904,488 +1904,8 @@
),%0A%0A
- urlDidChange: function () %7B%0A // var _this = this;%0A // this.childViews.forEach(function (view) %7B_this.removeView(view);%7D);%0A // if (DG.get('hideWebViewLoading') !== 'yes') %7B%0A // this.appendChild(this.loadingView.create(%7B%7D));%0A ... |
a10ffb7e3ee5b5eae7f85f75c5ba055fdf2ade2e | Fix gazelle-users tests | packages/gazelle-users/package.js | packages/gazelle-users/package.js | Package.describe({
name: 'gazelle-users',
version: '0.0.1',
summary: 'Base functionality for users.',
documentation: 'README.md',
git: 'https://github.com/meteor-gazelle/meteor-gazelle.git'
});
Package.onUse(function (api) {
api.versionsFrom('1.1.0.2');
api.use([
'gazelle-lib'
]);
api.addFiles(... | JavaScript | 0.000069 | @@ -450,59 +450,131 @@
) %7B%0A
+%0A
-api.use(%5B%0A 'tinytest',%0A 'gazelle-users'%0A %5D
+//TODO: Why is this causing the tests to stall?%0A //api.use('gazelle-users', %5B'client', 'server'%5D);%0A api.use('tinytest'
, %5B'
|
ef561dde158103bb368dbb79b8d4ae0edfb6a51b | fix owner_key on new database (is was empty) - if empty - set writer key as owner key. | database/protocol.js | database/protocol.js | var util = require('util');
var base = require('./native')
var bitPony = require('bitpony')
function protocol(options, onloaded) {
this.hash = bitPony.tool.sha256(new Buffer(options.public_key || "")).toString('hex')
this.pubkey = options.public_key;
this.options = options
this.onInit = onloaded;
}
ut... | JavaScript | 0 | @@ -559,18 +559,27 @@
_key %7C%7C
-%22%22
+this.pubkey
,%0A
@@ -5467,18 +5467,24 @@
_key %7C%7C
-''
+f.pubkey
, privil
|
1f38b78850eefb5d33e9a2e1a9c400584befa6a9 | fix tab size | lib/easy-search-convenience.js | lib/easy-search-convenience.js | Meteor.Collection.prototype.initEasySearch = function (fields, options) {
if (!_.isObject(options)) {
options = {};
}
EasySearch.createSearchIndex(this._name, _.extend(options, {
'collection' : this,
'field' : fields
}));
};
if (Meteor.isClient) {
jQuery.fn.esAutosuggestData = function () {
... | JavaScript | 0.000001 | @@ -263,18 +263,16 @@
ient) %7B%0A
-
jQuery
@@ -305,28 +305,24 @@
nction () %7B%0A
-
var inpu
@@ -339,20 +339,16 @@
);%0A%0A
-
-
if (inpu
@@ -400,22 +400,16 @@
%7B%0A
-
-
return %5B
@@ -419,19 +419,11 @@
- %7D%0A%0A
+%7D%0A%0A
@@ -563,16 +563,14 @@
cted');%0A
... |
1de411ea9bc525a24dc167e92188c266da4b3896 | fix default state on the fly | src/main/resources/public/js/src/projectSettings/tabViews/general/generalTabView.js | src/main/resources/public/js/src/projectSettings/tabViews/general/generalTabView.js | /*
* Copyright 2016 EPAM Systems
*
*
* This file is part of EPAM Report Portal.
* https://github.com/epam/ReportPortal
*
* Report Portal is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version ... | JavaScript | 0.000001 | @@ -1653,16 +1653,20 @@
hecked:
+all(
analyzeO
@@ -1673,16 +1673,40 @@
nTheFly,
+ isAutoAnalyzerEnabled),
attr: %7B
|
dba9e8bf1bb093b369f30544fef7dba73ead9ad3 | Update services.js | www/js/services.js | www/js/services.js | angular.module('CoachCrabbe.services', [])
/**
* A simple example service that returns some data.
*/
.factory('Constants', function() {
return {
angerLevels: {
'annoyed': 1,
'irritated': 2,
'mad': 3,
'livid': 4,
'furious': 5
}
}
});
| JavaScript | 0.000001 | @@ -48,55 +48,24 @@
%0A *
-A simple example service that returns some data
+Stores constants
.%0A *
|
9e0144591827164361cca7ce57ef37a095eac91e | add .signed css class to pgp signed mail content | apps/pgp_mail/view-pgp.js | apps/pgp_mail/view-pgp.js | define('pgp_mail/view-pgp', [
'io.ox/core/extensions',
'io.ox/mail/api',
'pgp_mail/util'
], function (ext, api, util) {
'use strict';
ext.point('io.ox/mail/detail/header').extend({
before: 'attachments',
id: 'filter_attachments',
draw: function (baton) {
if (!uti... | JavaScript | 0 | @@ -1634,32 +1634,321 @@
%7D);%0A%0A
+ %7D%0A %7D);%0A ext.point('io.ox/mail/detail').extend(%7B%0A index: 500,%0A id: 'signed_content',%0A draw: function (baton) %7B%0A%0A if (!util.isSignedMail(baton.data)) %7B%0A return;%0A %7D%0A%0A ... |
3339b369ec3e93a6060cd2f046b511b71a76478d | handle workflow reminders | app/views/management/tasks/tasks-id-activity.js | app/views/management/tasks/tasks-id-activity.js | define(['lodash', 'directives/management/register-facets', 'authentication', "directives/formats/views/form-loader", 'utilities/km-workflows', 'utilities/km-storage', 'utilities/km-utilities'], function(_) { 'use strict';
return [ "$scope", "$timeout", "$http", "$route", "$location", "IStorage", "IWorkflows", "authent... | JavaScript | 0 | @@ -621,13 +621,8 @@
find
-Where
(wor
@@ -643,15 +643,74 @@
es,
-%7B
+function(activity)%7B return !activity.closedOn && activity.
name
-:
+==
act
|
83f5be8140f38dd63cfd6faeadc2c0e81ed841e7 | options is a option | knockoutFire.js | knockoutFire.js | /*
KnockoutFire.js
(c) Hiroshi Saito <hiroshi3110@gmail.com>
CC BY 2.0
Basic Usage Example:
var firebaseRef = new Firebase("https://yourdb.firebaseio.com/items");
var viewModel = {
"items": KnockoutFire.observableArray(firebaseRef)
};
ko.applyBindings(viewModel, document.getElementById("i... | JavaScript | 1 | @@ -1230,24 +1230,53 @@
options) %7B%0A
+ options = options %7C%7C %7B%7D;%0A
var arra
|
51b08f662ca180db2073f141fbfb7f1d7a765111 | Fix checks for specificBrowser | core/device.js | core/device.js | var spawn = require('child_process').spawn;
var exec = require('child_process').exec;
var http = require('http');
var path = require('path');
var types = require('./types');
var options = require('./options');
// update PYTHONPATH for all telemetry invocations
if (options.chromium !== undefined)
process.env.PYTHONP... | JavaScript | 0 | @@ -2104,24 +2104,38 @@
cificBrowser
+ !== undefined
) %7B%0A
|
ded04a243200b6001a109cd8fdfe4f4c99536fe8 | Update index | core/server/storage/index.js | core/server/storage/index.js | var errors = require('../errors'),
storage = require('./s3')({
errors: errors,
config: require('../config')().aws
});
function get_storage() {
// TODO: this is where the check for storage apps should go
// Local file system is the default
// var storageChoice = 'localfilesystem';
... | JavaScript | 0.000001 | @@ -268,19 +268,16 @@
ault%0A
- //
var sto
@@ -294,23 +294,10 @@
= '
-localfilesystem
+s3
';%0A%0A
@@ -457,99 +457,25 @@
('./
-s3')(%7B%0A errors: errors,%0A config: require('../config')().aws%0A %7D
+' + storageChoice
);%0A
|
2ae9484363892c2f48d9b224e57af71f4f9cae64 | Add inject to body html-webpack-plugin option or examples | config/webpack-dev.config.js | config/webpack-dev.config.js | // VALIDATED (all conf file with this tag are not pending of deprecation)
/**
* @author: @AngularClass (modified)
*/
const helpers = require('./helpers')
const path = require('path')
/**
* Webpack Plugins
*/
const DefinePlugin = require('webpack/lib/DefinePlugin')
const LoaderOptionsPlugin = require('webpack/lib... | JavaScript | 0 | @@ -4398,16 +4398,40 @@
x.ejs',%0A
+ inject: 'body',%0A
%7D)
|
be1f457d0cf1d87b98039e07c0c1ea062d9eea63 | Add token verification | coding-webhook-handler.js | coding-webhook-handler.js | const EventEmitter = require('events').EventEmitter,
bl = require('bl')
function create(options) {
if (typeof options != 'object')
throw new TypeError('must provide an options object')
if (typeof options.path != 'string')
throw new TypeError('must provide a \'path\' option')
// make it an EventEmi... | JavaScript | 0.000001 | @@ -1266,24 +1266,115 @@
e)%0A %7D%0A%0A
+ if(obj.token !== options.token)%0A return hasError('The token does not match')%0A%0A
res.wr
|
7b01f203d5a77cd6cde607368c1a9c3221357be4 | Use ES6 string interpolation | lib/atom-shortcuts-teacher.js | lib/atom-shortcuts-teacher.js | 'use babel';
import { CompositeDisposable } from 'atom';
// FIXME: We're getting warnings in the console indicating that maybe we should
// mark our event handler as "passive". Not sure if this is even because of us,
// or how to do this really, some docs here:
// https://github.com/WICG/EventListenerOptions/blob/gh-... | JavaScript | 0.000001 | @@ -1222,49 +1222,40 @@
n =
-%22Command: %22 + command + %22 Bindings: %22 +
+%60You can run $%7Bcommand%7D using $%7B
desc
@@ -1279,16 +1279,18 @@
indings)
+%7D%60
;%0A atom
|
5748829d7cd8c15eddc547930c0237ed6df2a39c | update unit test for daily operation etl | test/etl/fact-daily-operations/basic.js | test/etl/fact-daily-operations/basic.js | var helper = require("../../helper");
var Manager = require("../../../src/etl/fact-daily-operations-etl-manager");
var instanceManager = null;
var should = require("should");
var sqlHelper = require("../../sql-helper");
before("#00. connect db", function (done) {
Promise.all([helper, sqlHelper])
.then((res... | JavaScript | 0 | @@ -1261,33 +1261,91 @@
input:
-1
+50,%0A goodOutput: 50,%0A badOutput: null
%0A %7D,%0A
@@ -1558,16 +1558,357 @@
input:
+50,%0A goodOutput: 50,%0A badOutput: 1%0A %7D,%0A %7B%0A kanban: %7B%0A selectedProducti... |
2f9dacd0c86ec222a319f5e2c2c7b92971e5b34a | Remove unneeded line | report/src/main/webapp/app/services/notes.service.js | report/src/main/webapp/app/services/notes.service.js | /*
* AET
*
* Copyright (C) 2013 Cognifide Limited
*
* 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 applica... | JavaScript | 0.001768 | @@ -1639,39 +1639,8 @@
) %7B%0A
- text = object.comment;%0A
|
9c8a8162d9b2586a633b7d4ee0c8dafb832e1e24 | add the component code back to the index | index.android.js | index.android.js | 'use strict';
import React, {AppRegistry} from 'react-native';
import Index from './Todo/components/App';
AppRegistry.registerComponent('TDN', () => Index);
| JavaScript | 0.000001 | @@ -1,109 +1,915 @@
-'use stri
+import React, %7B Component %7D from 'rea
ct';%0A
-%0A
import
-React, %7BAppRegistry%7D from 'react-native';%0Aimport Index from './Todo/components/App'
+Index from './Todo/components/Index'%0Aimport %7B%0A AppRegistry,%0A StyleSheet,%0A Text,%0A View%0A%7D from 'react-native';%0A... |
bedfe64997084d8f9cc08aecd41f9297f0ab1d78 | Update production configs to serve static files | config/webpack.production.js | config/webpack.production.js | const path = require('path');
require('dotenv').load({ path: path.resolve(__dirname, '../.env') });
const webpack = require('webpack');
const merge = require('webpack-merge');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const common = require('./webpack.common');
module.exports = merge(common,... | JavaScript | 0 | @@ -518,16 +518,25 @@
cPath: '
+/_assets/
',%0A f
|
5f3fda2950c6fc7a7635661969b59eee1016333a | Update MemberPresenceAvatar.js | src/components/views/avatars/MemberPresenceAvatar.js | src/components/views/avatars/MemberPresenceAvatar.js | /*
Copyright 2017 Travis Ralston
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 in writing, softwar... | JavaScript | 0 | @@ -988,21 +988,16 @@
This is
-just
an avata
@@ -1003,18 +1003,16 @@
ar with
-a
presence
@@ -1018,28 +1018,30 @@
e in
-dicator for the user
+formation and controls
on
|
eaebdc67b668ebc567a5f3369835cc18acb76457 | fix jquery | public/main.js | public/main.js | function targetValue(e) {
return e.target.value
}
function turnOn(id) {
return $.ajaxAsObservable({ url: "/api/on?id=" + id, cache: false })
}
function turnOff(id) {
return $.ajaxAsObservable({ url: "/api/off?id=" + id, cache: false })
}
function handleWc(type, value) {
if (type == "type=1") $('.temperature.... | JavaScript | 0.000002 | @@ -314,27 +314,28 @@
rature.wc').
-val
+text
(value.split
@@ -369,19 +369,20 @@
ty.wc').
-val
+text
(value.s
@@ -478,35 +478,36 @@
ature.outside').
-val
+text
(value.split(%22=%22
@@ -542,19 +542,20 @@
tside').
-val
+text
(value.s
|
66b91190f513893efbe7eef9beba1925e32a44d5 | Update navigation to be in alphabetical order | lib/build-navigation/index.js | lib/build-navigation/index.js | 'use strict';
const path = require('path');
const buildNavigation = function(styleguideArray) {
let options = this;
options.navigation = {};
styleguideArray.forEach((obj) => {
let fileName = (obj.writeName || obj.title).replace(/ /g, '_').toLowerCase() + '.html';
options.navigation[obj.title] = fileN... | JavaScript | 0.000005 | @@ -12,39 +12,8 @@
';%0A%0A
-const path = require('path');%0A%0A
cons
@@ -80,16 +80,31 @@
s = this
+,%0A _nav = %7B%7D
;%0A%0A opt
@@ -260,34 +260,20 @@
';%0A%0A
-options.navigation
+_nav
%5Bobj.tit
@@ -295,16 +295,126 @@
%0A %7D);%0A%0A
+ Object.keys(_nav)%0A .sort()%0A .forEach(function(v, i) %... |
d91d9cd9f9f0f1ac8721ab124db1ed0e53b80b28 | simplify octicons story to get it working | .storybook/Octicon.js | .storybook/Octicon.js | import React from 'react'
import {storiesOf} from '@storybook/react'
import octicons from 'octicons'
import SVGInline from 'react-svg-inline'
const Octicon = (props) => {
const {name} = props
if (name in octicons) {
return <SVGInline svg={octicons[name].toSVG(props)} />
} else {
throw new Error(`No such ... | JavaScript | 0.000002 | @@ -58,24 +58,25 @@
book/react'%0A
+%0A
import octic
@@ -354,15 +354,29 @@
st s
-tory =
+izes = %5B64, 32, 16%5D%0A%0A
stor
@@ -405,102 +405,72 @@
le)%0A
-const sizes = %5B64, 32, 16%5D%0A%0AObject.keys(octicons).forEach(name =%3E %7B%0A story.add(name, () =%3E (%0A
+ .add('test', () =%3E %7B%0A const name =... |
0dafcc826ad13e2fed2daa0a69c576f35f434d77 | Remove check for missingtitle | test/features/mobile-sections/shared.js | test/features/mobile-sections/shared.js | 'use strict';
const assert = require('../../utils/assert.js');
const headers = require('../../utils/headers.js');
const preq = require('preq');
exports.shouldBehaveLikeMobileSections = function(localUri) {
it('should respond to GET request with expected headers, incl. CORS and CSP headers', () => {
const ... | JavaScript | 0.000048 | @@ -3357,65 +3357,8 @@
4);%0A
- assert.equal(res.body.type, 'missingtitle');%0A
|
de7a0b64dcd24892e0333f9e77f56ca6117cae5a | Use art instead of const in cli file | cli/main.js | cli/main.js | #!/usr/bin/env node
'use strict'
process.title = 'ucompiler'
require('debug').enable('UCompiler:*')
const UCompiler = require('..')
const knownCommands = ['go', 'watch']
const parameters = process.argv.slice(2)
if (!parameters.length || knownCommands.indexOf(parameters[0]) === -1) {
console.log('Usage: ucompiler go... | JavaScript | 0 | @@ -94,21 +94,19 @@
ler:*')%0A
-const
+var
UCompil
@@ -124,21 +124,19 @@
e('..')%0A
-const
+var
knownCo
@@ -164,13 +164,11 @@
h'%5D%0A
-const
+var
par
|
9b6aafba8d70a06728a0d1f3eb556139f69fcf42 | fix file selector button | src/components/Modal/components/fileStreamSelector.js | src/components/Modal/components/fileStreamSelector.js | import React from 'react';
import _ from 'lodash';
import {
RaisedButton, List, ListItem
}
from 'material-ui';
import {
History
}
from 'react-router';
import ModalActions from '../actions';
import ModalStore from '../store';
import EngineStore from '../../../stores/engineStore';
import TorrentActions from '../... | JavaScript | 0.000001 | @@ -590,64 +590,9 @@
iles
-,%0A torrents: EngineStore.getState().torrents
%0A
+
@@ -677,49 +677,8 @@
e);%0A
- EngineStore.listen(this.update);%0A
@@ -756,51 +756,8 @@
e);%0A
- EngineStore.unlisten(this.update);%0A
@@ -886,32 +886,32 @@
this.setState(%7B%0A
+
... |
122bf6c63066c6ec7d21f1b3a40bb16e37366711 | fix css task | gulpfile.js/tasks/serve.js | gulpfile.js/tasks/serve.js | var browserSync = require('browser-sync').create()
var gulp = require('gulp')
var sass = require('gulp-sass')
// STYLES
gulp.task('css', function () {
gulp.src('./public/css/*.scss')
.pipe(sass())
.pipe(gulp.dest('./public/css'))
.pipe(browserSync.stream())
})
gulp.task('js', function () {
gulp.... | JavaScript | 0.999762 | @@ -620,18 +620,17 @@
css', %5B'
-sa
+c
ss'%5D)%0A
|
c85699b628f1c6b160c586ca997e6bfdb2e82780 | adds string literal 4 | gulpfile.babel.js | gulpfile.babel.js | const gulp = require('gulp');
const gutil = require("gulp-util");
const webpack = require('webpack');
const WebpackDevServer = require("webpack-dev-server");
const exec = require('child_process').exec;
const devconfig = require('./webpack.config.js');
const prodconfig = require('./webpack.config.production.js');
// ARG... | JavaScript | 0.999991 | @@ -342,13 +342,37 @@
t =
-'wwf'
+require('yargs').argv.project
;%0Aco
|
ea3eb26696a78482ea5bb03e4f5bc413447f0d1a | Add /lennyface command | packages/rocketchat-slashcommand-asciiarts/package.js | packages/rocketchat-slashcommand-asciiarts/package.js | Package.describe({
name: 'rocketchat:slashcommands-asciiarts',
version: '0.0.1',
summary: 'Message pre-processor that will add ascii arts to messages',
git: ''
});
Package.onUse(function(api) {
api.versionsFrom('1.0');
api.use([
'rocketchat:lib'
]);
api.use('ecmascript');
api.addFiles('gimme.js', ['serve... | JavaScript | 0.000001 | @@ -321,32 +321,81 @@
r', 'client'%5D);%0A
+%09api.addFiles('lenny.js', %5B'server', 'client'%5D);%0A
%09api.addFiles('s
|
452e245b1337e0eeda91a7c1f09dcfeed11d6cac | Add test for correct highlightCountryIndex | test/ReactTelephoneInput-test.js | test/ReactTelephoneInput-test.js | /* global describe, it, afterEach*/
/* eslint: no-unused-expressions: false*/
'use strict';
var chai = require('chai');
var dirtyChai = require('dirty-chai');
var expect = chai.expect;
chai.use(dirtyChai);
var React = require('react');
var ReactDOM = require('react-dom');
var TestUtils = require('react-addons-test-ut... | JavaScript | 0.000003 | @@ -2369,32 +2369,1351 @@
iso2);%0A %7D);%0A%0A
+ it('should set the correct highlightCountryIndex', () =%3E %7B%0A var afghanistan = %7B%0A name: 'Afghanistan (%E2%80%AB%D8%A7%D9%81%D8%BA%D8%A7%D9%86%D8%B3%D8%AA%D8%A7%D9%86%E2%80%AC%E2%80%8E)',%0A iso2: 'af',%0A dialCode: '93',%0A ... |
8ee682da28b74773cb47505da5c911d1006ed3e5 | remove debugger | lib/core/validation/validators/validator-pattern-spec.js | lib/core/validation/validators/validator-pattern-spec.js | /*global describe, it, beforeEach, expect, module, inject*/
describe('avValPattern', function () {
'use strict';
var patternTest, zipRule, icd9Rule, ssnRule, taxidRule, taxidRuleArray;
beforeEach(module('availity'));
beforeEach(inject(function (avValPattern) {
patternTest = avValPattern;
zipRule = {v... | JavaScript | 0.000133 | @@ -4102,22 +4102,8 @@
);%0A%0A
- debugger;%0A
|
7a151e2f3b15a8465fd967982d936ecc222089a1 | Fix test initializing a date from string | test/addons/MomentLocaleUtils.js | test/addons/MomentLocaleUtils.js | import { expect } from 'chai';
import * as MomentLocaleUtils from '../../src/addons/MomentLocaleUtils';
describe('MomentLocaleUtils', () => {
describe('formatDay', () => {
it('should return day as string', () => {
const date = new Date('2015-12-20');
const formattedDate = MomentLocaleUtils.formatDay(... | JavaScript | 0.02382 | @@ -238,36 +238,36 @@
= new Date(
-'
2015
--12-
+, 11,
20
-'
);%0A con
|
eeea312853f882f58bb466b2366bb48564e6fb48 | 注释掉 self.logStartMessages(); BAE不兼容 | core/server/ghost-server.js | core/server/ghost-server.js | var Promise = require('bluebird'),
fs = require('fs'),
semver = require('semver'),
packageInfo = require('../../package.json'),
errors = require('./errors'),
config = require('./config');
function GhostServer(rootApp) {
this.rootApp = rootApp;
this.httpServer = null;
this.connections = ... | JavaScript | 0 | @@ -3005,16 +3005,18 @@
rocess.%0A
+//
|
32e7258e4a4af6d61b923128c1960abb02882d16 | send the command to localhost and not mozilla.org! | lib/cockpit/commands/basic.js | lib/cockpit/commands/basic.js | /* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
... | JavaScript | 0 | @@ -1827,17 +1827,16 @@
on');%0A%0A%0A
-%0A
/**%0A * '
@@ -2222,32 +2222,35 @@
', '
-http://www.mozilla.org/'
+/exec?args=' + args.command
, tr
@@ -2403,16 +2403,26 @@
st.done(
+'%3Cpre%3E' +
req.resp
@@ -2429,16 +2429,27 @@
onseText
+ + '%3C/pre%3E'
);%0A
|
4dcda5d6944878ad21744a9fbd77fdb40f7464a6 | Add .toBePromise() expectation | test/buster-jquery-assertions.js | test/buster-jquery-assertions.js | (function() {
"use strict";
function msg(message) {
if (!message) { return ""; }
return message + (/[.:!?]$/.test(message) ? " " : ": ");
}
function actualAndExpectedMessageValues(actual, expected, message) {
return [actual, expected, msg(message)]
}
function hasPrope... | JavaScript | 0.000106 | @@ -2113,32 +2113,122 @@
unction ($el) %7B%0A
+// console.log($.contains);%0A conosle.log(document.documentElement);%0A
retu
@@ -4348,13 +4348,499 @@
%7D);%0A%0A
+ buster.assertions.add(%22isPromise%22, %7B%0A assert: function (value) %7B%0A if (typeof value.... |
bb9a9bf0ad00146b4e80aa49379e9df0d2079d5c | Fix --version and --source-url being ignored (#24) | commands/builds/create.js | commands/builds/create.js | 'use strict';
let cli = require('heroku-cli-util');
let archiver = require('archiver');
let fs = require('fs');
let ignore = require('ignore');
let uuid = require('node-uuid');
let os = require('os');
let path = require('path');
let request = require('request');
function uploadCwdToSource(app, cwd, fn) {
let tempFi... | JavaScript | 0.000159 | @@ -1596,18 +1596,19 @@
context.
+fl
a
-r
gs%5B'sour
@@ -2024,18 +2024,19 @@
context.
+fl
a
-r
gs.versi
|
7040eb8f837f1c8e464fb1cbebfc85a18c307c02 | Tweak gulpfile | gulpfile.babel.js | gulpfile.babel.js | import gulp from 'gulp';
import loadPlugins from 'gulp-load-plugins';
import del from 'del';
import glob from 'glob';
import path from 'path';
import isparta from 'isparta';
import babelify from 'babelify';
import watchify from 'watchify';
import buffer from 'vinyl-buffer';
import esperanto from 'esperanto';
i... | JavaScript | 0.000001 | @@ -4449,25 +4449,34 @@
lp.src(%5B
-'src/**/*
+exportFileName + '
.js'%5D)%0A
|
83237be85e141f289472cb05c42b9a2bfedf08e8 | clean up bolt creation. | build/depend.js | build/depend.js | var lib = 'lib';
var cleanDirs = [ lib ];
var dependencies = [
{
name: "bolt-framework",
repository: "buildrepo2",
version : "latest",
source: "bolt-framework.zip",
targets: [
{ name: "assert.js", path: lib + "/framework" },
{ name: "prelude.js", path: lib + "/framework" },
{ na... | JavaScript | 0 | @@ -404,222 +404,8 @@
%5D%0A
- %7D,%0A%0A // Only used by demo.html%0A %7B%0A name: %22jquery%22,%0A repository: %22thirdpartyrepo%22,%0A source: %22jquery.zip%22,%0A version: %221.4.2/1.4.2.0%22,%0A targets: %5B%0A %7B name: %22jquery-1.4.2.js%22, path: lib %7D%0A %5D%0A
%7D%0A
|
6864bd6c520a1e513974a74c8985ed5b3c92c0a8 | Fix missing attitude readouts. | public/main.js | public/main.js | var frequency;
var telemetry;
var keyDimension;
var timeDimension;
var attitudes;
$(function() {
var axes;
var socket;
frequency = 1;
telemetry = crossfilter();
timeDimension = telemetry.dimension(function (d) { return d.t; });
keyDimension = telemetry.dimension(function (d) { return d.k; });
attitudes... | JavaScript | 0.000071 | @@ -2670,16 +2670,61 @@
%7D%0A %7D;%0A%0A
+ /* jshint loopfunc: true, shadow: false */%0A
for (v
@@ -2773,24 +2773,57 @@
es%5Btype%5D) %7B%0A
+ (function (type, axis) %7B%0A
socket
@@ -2858,24 +2858,26 @@
on (data) %7B%0A
+
atti
@@ -2937,16 +2937,18 @@
ata).v;%0A
+
@@ -2973... |
7048ec6c32c94b13d8906a105f2c58ebbaa647c6 | Set angular as an external dependency correctly with webpack config | gulpfile.babel.js | gulpfile.babel.js | import gulp from 'gulp';
import eslint from 'gulp-eslint';
import util from 'gulp-util';
import plumber from 'gulp-plumber';
import uglify from 'gulp-uglify';
import rename from 'gulp-rename';
import babel from 'gulp-babel';
import buffer from 'gulp-buffer';
import del from 'del';
import webpack from 'webpack';
import ... | JavaScript | 0 | @@ -1598,44 +1598,12 @@
ar:
-%7B%0A var: 'angular'%0A %7D
+true
%0A
|
c3588c0d2959596ff685a28a1971c298d093790b | fix flow types | src/factories/createIsomorphicWebpackConfiguration.js | src/factories/createIsomorphicWebpackConfiguration.js | // @flow
import Ajv from 'ajv';
import addAjvKeywords from 'ajv-keywords';
import isomorphicWebpackConfigurationSchema from '../schemas/isomorphicWebpackConfigurationSchema.json';
import type {
UserIsomorphicWebpackConfigurationType,
IsomorphicWebpackConfigurationType
} from '../types';
const ajv = Ajv();
addAjv... | JavaScript | 0.000258 | @@ -865,32 +865,16 @@
kConfig.
-hasOwnProperty('
isRequir
@@ -882,20 +882,44 @@
Override
-') ?
+ === undefined ? undefined :
userIso
@@ -956,19 +956,54 @@
Override
- :
+,%0A%0A // eslint-disable-next-line no-
undefine
@@ -1003,17 +1003,16 @@
ndefined
-,
%0A nod
@@ -1060,32 +1060,16 @@
kConfig.
-hasOwnP... |
22fb6b60c2f4fab16f05a15dae0a2ce4e3a8e56c | Fix bug | core/identify/mast/size.js | core/identify/mast/size.js | 'use strict'
const { toNumber, flow, replace } = require('lodash')
const strmatch = require('str-match')()
function response (data, output) {
return { data, output }
}
/**
* Detect mast size with symbol
* @example
* 4m → 400
*/
const REGEX_MAST_SIZE = /\d{1}m/i
const REGEX_MAST_SIZE_SYMBOL = /m/i
const normal... | JavaScript | 0.000001 | @@ -491,16 +491,21 @@
f (!size
+.test
) return
|
c424d9f84e885c6c423ff2488929e721a18f393b | prepare executor for elastic | source/engine/executor.js | source/engine/executor.js | var util = require('util');
var async = require('async');
var moment = require('moment');
var items = require('../models/items');
var users = require('../models/users');
var networks = require('../models/networks');
var logger = require('../utils/logger');
function executor(state, connectors, callback) {
var executor... | JavaScript | 0 | @@ -387,27 +387,63 @@
ctor,%0A%09%09
-saveResults
+detectNewItems,%0A%09%09saveToMongo,%0A%09%09saveToEleastic
,%0A%09%09save
@@ -1106,24 +1106,30 @@
ack(err,
+ user,
results
, user);
@@ -1120,22 +1120,16 @@
results
-, user
);%0A%09%09%7D);
@@ -1147,33 +1147,122 @@
ion
-saveResults(results, user
+detectNewIt... |
f15b2caeefa3270adb377b1744ff458b8186c7ca | Add github remote to gh-pages build | gulpfile.babel.js | gulpfile.babel.js | import gulp from 'gulp';
import gutil from 'gulp-util';
import notifier from 'node-notifier';
import { create as browserSyncCreate } from 'browser-sync';
import webpack from 'webpack';
import eslint from 'gulp-eslint';
import filter from 'gulp-filter';
import rename from 'gulp-rename';
import shell from 'gulp-shell';
i... | JavaScript | 0.000001 | @@ -3866,14 +3866,14 @@
ush
-origin
+github
gh-
|
f67500b0c27b685f6b869290c858cec88360a79a | Refactor and add default props | src/js/components/questions/QuestionEditCountdown.js | src/js/components/questions/QuestionEditCountdown.js | import React, { PropTypes, Component } from 'react';
import translate from '../../i18n/Translate';
import moment from 'moment';
//require("moment-duration-format");
@translate('QuestionEditCountdown')
export default class QuestionEditCountdown extends Component {
static propTypes = {
questionId: PropTypes.... | JavaScript | 0 | @@ -124,45 +124,8 @@
nt';
-%0A//require(%22moment-duration-format%22);
%0A%0A@t
@@ -274,32 +274,43 @@
PropTypes.number
+.isRequired
,%0A second
@@ -545,16 +545,128 @@
(this);%0A
+ this.checkFinishTick = this.checkFinishTick.bind(this);%0A%0A this.state = %7Bseconds: props.seconds%7D;%0A
%... |
ab0501a70c4c96bc71becc9b20ac4e7a3d45791b | apply extrakeys on mode change | mix/qml/html/codeeditor.js | mix/qml/html/codeeditor.js | var editor = CodeMirror(document.body, {
lineNumbers: true,
//styleActiveLine: true,
matchBrackets: true,
autofocus: true,
gutters: ["CodeMirror-linenumbers", "breakpoints"],
autoCloseBrackets: true,
styleSelectedText: true
});
var ternServer;
editor.setOption("th... | JavaScript | 0 | @@ -3379,16 +3379,59 @@
te%22;%0A%09%7D%0A
+%09editor.setOption(%22extraKeys%22, extraKeys);%0A
%7D;%0A%0AsetC
|
14b283968ee532a497ae5a193e127a5ed0ab111e | Fix longstanding tab inconsistency | gulpfile.babel.js | gulpfile.babel.js | import babelify from 'babelify';
import browserify from 'browserify';
import gulp from 'gulp';
import concat from 'gulp-concat';
import htmlreplace from 'gulp-html-replace';
import livereload from 'gulp-livereload';
import cssmin from 'gulp-minify-css';
import streamify from 'gulp-streamify';
import uglify from 'gulp-u... | JavaScript | 0.99903 | @@ -1526,19 +1526,21 @@
=%3E %7B%0A
-var
+const
browser
@@ -1846,25 +1846,21 @@
ipts');%0A
-
%7D);%0A%0A
-
gulp.tas
@@ -2006,11 +2006,13 @@
%0A%0A
-var
+const
wat
@@ -2032,34 +2032,32 @@
fy(browserify(%7B%0A
-
entries: %5Bpa
@@ -2069,34 +2069,32 @@
TRY_POINT%5D,%0A
-
transform: %5Bbabe... |
177946ce5cc3e06eb9617bea5de7b7a713a4f9d2 | rewrite test for force reload to stop it intermittently failing | src/javascript/_common/__tests__/check_new_release.js | src/javascript/_common/__tests__/check_new_release.js | const expect = require('chai').expect;
const moment = require('moment');
const shouldForceReload = require('../check_new_release').shouldForceReload;
describe('checkNewRelease', () => {
describe('.shouldForceReload()', () => {
it('will not force reload if last reload is less than ten ... | JavaScript | 0 | @@ -385,34 +385,35 @@
t().
-valueOf() - (2 * 60 * 1000
+add(-2, 'minutes').valueOf(
))).
@@ -476,35 +476,35 @@
t().
-valueOf() - (10 * 60 * 1000
+add(-9, 'minutes').valueOf(
))).
@@ -663,35 +663,36 @@
t().
-valueOf() - (11 * 60 * 1000
+add(-11, 'minutes').valueOf(
))).
@@ -754,35 +754,32 @@
t().
-valueOf() - (60... |
b95a8d58d244f5cffde34481a79384b0efea5999 | Add SettingModel to Before Remote of Creating Subcampaign Instead of After | common/models/campaign.js | common/models/campaign.js | var statusConfig = require('../../config/status')
var app = require('../../server/server')
var roleManager = require('../../public/roleManager')
var utility = require('../../public/utility')
var startStyleList = require('../../config/startStyle.json')
var mediaStyleList = require('../../config/mediaStyle.json')
var cat... | JavaScript | 0 | @@ -2142,32 +2142,464 @@
sConfig.pending%0A
+ var settingToCreate = %7B%0A priority: %22Average%22,%0A category: categoryList,%0A country: countryList,%0A language: languageList,%0A device: deviceList,%0A os: osList,%0A userLabel: us... |
ae428c366177fa602814a61bf31fc6623e296aeb | Update index.js | core/server/utils/index.js | core/server/utils/index.js | var unidecode = require('unidecode'),
utils,
getRandomInt;
/**
* Return a random int, used by `utils.uid()`
*
* @param {Number} min
* @param {Number} max
* @return {Number}
* @api private
*/
getRandomInt = function (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
};
utils = ... | JavaScript | 0.000002 | @@ -1191,24 +1191,89 @@
'');%0A %7D,%0A
+ %0A // What it is doing in fact? Shame on me, I don't know!%0A
safeStri
|
e0bf70cb8867d5473c3572dfc0a11bea66510750 | change message and add comment | modules/jaggeryapps/appmgt/src/site/themes/default/js/custom/validator.js | modules/jaggeryapps/appmgt/src/site/themes/default/js/custom/validator.js | //Regex patterns
var ALLOWED_CHARACTERS_REGEX = "^[A-Za-z0-9_]+$";
//Environment key validation
function validateEnvKey(envKey){
var envKeyRegex = new RegExp(ALLOWED_CHARACTERS_REGEX);
var validator;
if (!envKeyRegex.test(envKey)) {
validator = {
status: false,
msg: "Invali... | JavaScript | 0 | @@ -59,16 +59,86 @@
-9_%5D+$%22;
+ //Only alphanumeric and underscore characters are allowed for content
%0A%0A%0A//Env
@@ -934,47 +934,63 @@
me.
-Valid characters are %5BA-Z, a-z, 0-9, _%5D
+Only alphanumeric characters and underscore are allowed
.%22%0A
|
08051ea7e139d690f0eb6caaea4ebf622c129513 | rename "the hub" title to match the button | source/views/sis/index.js | source/views/sis/index.js | // @flow
import {TabNavigator} from '../components/tabbed-view'
import BalancesView from './balances'
import {StudentWorkView} from './student-work-carls'
export default TabNavigator(
{
BalancesView: {screen: BalancesView},
StudentWorkView: {screen: StudentWorkView},
},
{
navigationOptions: {
title: 'The... | JavaScript | 0.000001 | @@ -314,15 +314,15 @@
e: '
-The Hub
+OneCard
',%0A%09
|
3c64ce6fe771915bf0131c8855118b56e9c72d85 | Update container.js | static/views/container.js | static/views/container.js | define([
'jquery', 'underscore', 'globals/utils', 'views/base', 'globals/eventbus', 'bootbox', 'modules/cloudstore',
//'libs/codemirror/codemirror', 'libs/codemirror/vim', 'libs/codemirror/clike', 'libs/codemirror/placeholder',
'libs/codemirror-4.9/lib/codemirror', 'css!libs/codemirror/codemirror.css',
'libs/c... | JavaScript | 0.000001 | @@ -115,18 +115,16 @@
re', %0A
-//
'libs/co
@@ -135,27 +135,16 @@
rror
-/codemirror', '
+-4.9/
lib
-s
/cod
@@ -154,108 +154,8 @@
rror
-/vim', 'libs/codemirror/clike', 'libs/codemirror/placeholder',%0A 'libs/codemirror-4.9/lib/codemirror
', '
@@ -173,16 +173,27 @@
demirror
+-4.9-custom
/codemir
|
b60f9b121a09c86c98c079678bdcf0273c2c99e1 | Test lines | src/Parser/BalanceDruid/Modules/Spells/FullMoon.js | src/Parser/BalanceDruid/Modules/Spells/FullMoon.js | import React from 'react';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import { formatPercentage } from 'common/format';
import Module from 'Parser/Core/Module';
import SPELLS from 'common/SPELLS';
import isMoonMo... | JavaScript | 0.000001 | @@ -3156,18 +3156,16 @@
RE(5);%0A%7D
-%0A
%0Aexport
|
43b85134a14e34603dd60ea559dadabc53ed2982 | remove narrow prop, allow for disabling toc | components/ContentArea.js | components/ContentArea.js | import Section from "./Section";
import { useState, useEffect, useRef } from "react";
import { useRouter } from "next/router";
import { TableOfContents } from "./TableOfContents";
export default function ContentArea(props) {
const [shortcut, setShortcut] = useState("");
const detectOS = () => {
const agent = ... | JavaScript | 0 | @@ -1926,23 +1926,16 @@
ssName=%22
-w-full
flex jus
@@ -1943,544 +1943,70 @@
ify-
-center%22%3E%0A %7Bprops.narrow ? (%0A %3CSection narrow className=%7B%22%22%7D%3E%0A %3Cdiv className=%22mb-16%22%3E%0A %3Ch2 className=%22mt-24%22%3E%7Bprops.title%7D%3C/h2%3E%0A ... |
992de1a60aef8a4526aeaf46bfd81a95a6151008 | clean up comment-extractor | lib/extract-comments/index.js | lib/extract-comments/index.js | 'use strict';
const extractComments = function(styleguideArray) {
const commentRegex = /(\/\*([\W\w]+)\*\/|\/\/[\W\w]+)/gm;
styleguideArray.forEach(function(obj) {
let _str = obj.rawFile,
_matches = _str.match(commentRegex);
try {
_matches.forEach((m) => {
let _tempMatch = m.trim().sp... | JavaScript | 0.000001 | @@ -43,29 +43,17 @@
ction(st
-yleguideArray
+r
) %7B%0A co
@@ -77,25 +77,23 @@
= /(%5C/%5C*
-(
%5B%5CW%5Cw%5D+
-)
%5C*%5C/%7C%5C/%5C
@@ -110,86 +110,14 @@
gm;%0A
-%0A styleguideArray.forEach(function(obj) %7B%0A let _str = obj.rawFile,%0A _
+ let
matc
@@ -122,17 +122,16 @@
tches =
-_
str.matc
@@ -... |
ca241cf59600d852a21b8ad02326c87dc0541090 | Remove call the scheduleDestroy | lib/flash-queue-controller.js | lib/flash-queue-controller.js | App.flashQueueController = Ember.ArrayController.extend({
destroyTimeout: 15 * 1e3, // 15s
flash: function(type, message){
var flash = App.FlashMessage.create({
type: type,
message: message,
scheduledToDestroy: true
});
this.pushObject(flash);
if (flash.get('scheduledToDestroy')) ... | JavaScript | 0.000001 | @@ -422,42 +422,8 @@
out)
-%0A this.scheduleDestroy(flash)
;%0A
|
aa7b2b3eed9d3cc9cd13cbdecbca2cd3b3d29f76 | Update gulpfile to watch scss files | gulpfile.babel.js | gulpfile.babel.js | import gulp from "gulp";
import cp from "child_process";
import gutil from "gulp-util";
import postcss from "gulp-postcss";
import cssImport from "postcss-import";
import cssnext from "postcss-cssnext";
import sass from "gulp-sass";
import BrowserSync from "browser-sync";
import webpack from "webpack";
import webpackCo... | JavaScript | 0 | @@ -1491,16 +1491,17 @@
ss/**/*.
+s
css%22, %5B%22
|
936527727fe8099927f2af517c90393cc05d62ec | to string | lib/Facebook.js | lib/Facebook.js | var Botkit = require(__dirname + '/CoreBot.js');
var request = require('request');
var express = require('express');
var JSONbig = require('json-bigint');
function Facebookbot(configuration) {
// Create a core botkit bot
var facebook_botkit = Botkit(configuration || {});
// customize the bot definition, ... | JavaScript | 0.999999 | @@ -7485,26 +7485,23 @@
ver.use(
-bodyParser
+JSONbig
.json())
@@ -7544,18 +7544,15 @@
use(
-bodyParser
+JSONbig
.url
|
37c5a9aec3a41f790837890d83d68a4a610bcf49 | to string | lib/Facebook.js | lib/Facebook.js | var Botkit = require(__dirname + '/CoreBot.js');
var request = require('request');
var express = require('express');
var bodyParser = require('body-parser');
var JSONbig = require('json-bigint');
function Facebookbot(configuration) {
// Create a core botkit bot
var facebook_botkit = Botkit(configuration || {}... | JavaScript | 0.999999 | @@ -1779,25 +1779,16 @@
var
-original_
json = J
@@ -1810,76 +1810,8 @@
dy);
-%0A var json = JSONbig.stringify(original_json)
%0A%0A
|
0688a39b21f8faf1047018e5f6fd017cca38ac0a | test for pusage error case | test/lib/dashboard-agent.spec.js | test/lib/dashboard-agent.spec.js | "use strict";
const expect = require("chai").expect;
const sinon = require("sinon");
const SocketIO = require("socket.io");
const config = require("../../lib/config");
const dashboardAgent = require("../../lib/dashboard-agent");
const pusage = require("pidusage");
describe("dashboard-agent", () => {
let server;
... | JavaScript | 0 | @@ -2804,23 +2804,395 @@
%7D);%0A %7D);
+%0A%0A it(%22should return an error when pusage fails%22, (done) =%3E %7B%0A const pidStub = sinon.stub(pusage, %22stat%22).yields(new Error(%22bad error%22));%0A%0A agent._getStats((err, metrics) =%3E %7B%0A expect(err).to.exist;%0A expect(metric... |
72ea7ca26b95ccb014ea8cbdde30514d6e66609d | Extend redis key TTL | handlers/utils.js | handlers/utils.js | 'use strict'
const url = require('url')
const F = require('fuse.js')
const h = require('highland')
const q = require('request')
const r = require('ramda')
const errors = require('restify-errors')
const expire = 1 * 60 * 24 * 7
module.exports.checkRedis = redis => type => match => otherwise => {
const key = `transitl... | JavaScript | 0.000001 | @@ -216,15 +216,25 @@
60 *
+ 60 *
24 * 7
+ * 52
%0A%0Amo
|
3a8b3649e6c09d7eb461d8aeef1edc660f467ef1 | Create directory in node_modules/{starterName} as workaround for npm issue. | lib/jitsu/commands/install.js | lib/jitsu/commands/install.js |
var jitsu = require('../../jitsu'),
winston = require('winston'),
ncp = require('ncp'),
rimraf = require('rimraf'),
path = require('path'),
fs = require('fs'),
npmModule = require('npm'),
thisPath = process.cwd();
var starters = {
helloworld: 'helloworld',
... | JavaScript | 0 | @@ -230,24 +230,59 @@
ire('npm'),%0A
+ mkdirp = require('mkdirp'),%0A
thisPath
@@ -1318,22 +1318,172 @@
-cb(err, result
+if (err) %7B%0A return cb(err);%0A %7D%0A mkdirp('./node_modules/' + starterName, 0755, function (err) %7B%0A cb(err, result);%0A %7... |
f317579701641be6613beade41046a35d417b5eb | update author comparison | lib/jobs/lib/comment-reply.js | lib/jobs/lib/comment-reply.js | const monk = require('monk')
const t = require('t-component')
const templates = require('../../templates')
const mailer = require('../../mailer')
const utils = require('../../utils')
const jobName = 'comment-reply'
const jobNameForSingleUser = 'comment-reply-single-recipient'
const template = templates[jobName]
modul... | JavaScript | 0 | @@ -760,16 +760,72 @@
Replies%0A
+ const commentAuthor = String(comment.author.id)%0A
@@ -865,23 +865,16 @@
if
-(String
(comment
.aut
@@ -869,27 +869,22 @@
(comment
-.a
+A
uthor
-.id)
!== rep
@@ -892,28 +892,16 @@
yAuthor)
- %7B%0A
usersTo
@@ -916,44 +916,32 @@
ush(
-monk.id(
co... |
bf2f403457cfc9206715877c66e4f5e3fcbf3948 | Fix emitting properties | compiler.js | compiler.js | "use strict";
/**
* XCSS compiler
*/
var BaseCompiler = require('css-stringify/lib/compiler');
var recast = require('recast');
var util = require('util');
var toCamelCase = require('to-camel-case');
var parse = require('./parser');
var compileExpr = require('./expression-compiler');
var... | JavaScript | 0.000003 | @@ -3204,19 +3204,28 @@
iteral(n
-ame
+ode.property
),%0A
|
c031aef9b21461dc9c3da50766f8fb628236b041 | correct some "data-confirm" tests | test/public/test/data-confirm.js | test/public/test/data-confirm.js | module('data-confirm', {
setup: function() {
$('#qunit-fixture').append($('<a />', {
href: '/echo',
'data-remote': 'true',
'data-confirm': 'Are you absolutely sure?',
text: 'my social security number'
}));
}
});
asyncTest('clicking on a link with data-confirm attribute. Confirm yes.... | JavaScript | 0.998727 | @@ -232,16 +232,129 @@
%7D));
+%0A%0A this.windowConfirm = window.confirm;%0A %7D,%0A teardown: function() %7B%0A window.confirm = this.windowConfirm;
%0A %7D%0A%7D);
@@ -451,100 +451,89 @@
%7B%0A
-window.confirm = function(msg) %7B%0A $(document.body).data('confirmation-
+var message;%0A // auto-... |
8450657cb37c88c621078cd3339ec9c3079b1bf2 | Handle requests with empty url | comments.js | comments.js | var Octokat = require('octokat');
var moment = require('moment');
var md5 = require('js-md5');
module.exports = Comments;
function Comments(config) {
var octo = new Octokat(config.credentials);
this.repo = octo.repos(config.owner, config.repo);
this.base = config.base;
}
Comments.prototype.submit = function(ev... | JavaScript | 0.000004 | @@ -478,23 +478,16 @@
vent.url
-.trim()
);%0A var
@@ -1790,16 +1790,43 @@
else %7B%0A
+ var url1 = url.trim();%0A
if (
@@ -1828,16 +1828,17 @@
if (url
+1
.toLower
@@ -1884,24 +1884,25 @@
return url
+1
;%0A else%0A
@@ -1928,16 +1928,17 @@
/' + url
+1
;%0A %7D%0A%7D%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.