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 |
|---|---|---|---|---|---|---|---|
698f35d4196afb6838eb892d79e491f180fe4d8e | format code | messages/handleCourseMessage.js | messages/handleCourseMessage.js | 'use strict'
const {type} = require('message-type')
const canvasApi = require('../canvasApi')
const config = require('../server/init/configuration')
const log = require('../server/init/logging')
const ugParser = require('./ugParser')
const calcSisForOmregistrerade = require('./calcSisForOmregistrerade')
const createCs... | JavaScript | 0.000061 | @@ -478,16 +478,17 @@
esc%7D) %7B%0A
+
const %7B
@@ -506,16 +506,17 @@
_desc%0A%0A
+
if (use
@@ -538,24 +538,25 @@
students) %7B%0A
+
return ug
@@ -587,20 +587,22 @@
g1Name)%0A
+
%7D%0A%0A
+
if (use
@@ -703,16 +703,17 @@
s) %7B%0A
+
return u
@@ -745,20 +745,22 @@
g1Name)%0A
+
%7D%0A%0A
+... |
5fc2d1337e5a3e90c1a884949c4af49afc7ef7fa | use .txt() for the "date" value | lib/build.js | lib/build.js |
/**
* Module dependencies.
*/
var xmlbuilder = require('xmlbuilder');
/**
* Module exports.
*/
exports.build = build;
function ISODateString(d){
function pad(n){
return n < 10 ? '0' + n : n;
}
return d.getUTCFullYear()+'-'
+ pad(d.getUTCMonth()+1)+'-'
+ pad(d.getUTCDate())+'T'
+ pad(d.get... | JavaScript | 0 | @@ -2670,19 +2670,19 @@
'date').
-raw
+txt
(ISODate
@@ -2859,17 +2859,16 @@
ring').t
-e
xt(next)
|
a365069f4c00d47a849348146298a9b0e449628b | Remove version warning message in functions emulator (#504) | lib/functionsEmulator.js | lib/functionsEmulator.js | 'use strict';
var _ = require('lodash');
var chalk = require('chalk');
var path = require('path');
var RSVP = require('rsvp');
var getProjectId = require('./getProjectId');
var utils = require('./utils');
var parseTriggers = require('./parseTriggers');
var functionsConfig = require('./functionsConfig');
var ensureDefa... | JavaScript | 0 | @@ -3367,136 +3367,8 @@
rr;%0A
- if (process.version !== 'v6.9.1') %7B%0A msg = 'Please use Node version v6.9.1, you have ' + process.version + '%5Cn';%0A %7D%0A
|
29f263950a3ea5dc70a5aec6066fe2c7391c2887 | Fix a bug in cache callback. | lib/cache.js | lib/cache.js | var http = require("http"),
url = require("url"),
util = require("util");
var map = {},
head = null,
tail = null,
size = 512,
n = 0;
var headers = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.36 (KHTML, like Gecko) Chrome/13.0.767.1 Safari/534.36"
};
modul... | JavaScript | 0 | @@ -1723,24 +1723,137 @@
unction() %7B%0A
+ var callbacks = value.callbacks;%0A delete value.callbacks; // must be deleted before callback!%0A
va
@@ -1897,22 +1897,16 @@
-value.
callback
@@ -1967,42 +1967,8 @@
%7D);%0A
- delete value.callbacks;%0A
|
3a58de3460047f8151e31ed8b506abe0f8a29bf9 | Update cache.js | lib/cache.js | lib/cache.js | var catchallDir = '/usr/local/etc/catchall',
cacheDir = catchallDir + "/cache";
var cfg = require('yaconfig').file(catchallDir + "/cached.json"),
fs = require('fs'),
crypto = require('crypto'),
path = require('path');
//yaconfig makes our directories - this is fine.
tr... | JavaScript | 0.00036 | @@ -16,23 +16,9 @@
= '
-/usr/local/etc/
+.
catc
@@ -1217,12 +1217,13 @@
content);%0A%0A%7D
+%0A
|
788bbb94da9be5d8f0a8b0b5b173d1a6e463a50e | use native isArray method | lib/check.js | lib/check.js |
/**
* Module dependencies.
*/
var fs = require('fs')
, path = require('path');
/**
* Initialize a `check` instance with the given filename.
*
* @param {String} filename
* @api public
*/
module.exports = function(filename) {
return new check(filename);
};
/**
* Initialize a new `check` with the given... | JavaScript | 0.00007 | @@ -1505,16 +1505,22 @@
epted =
+Array.
isArray(
@@ -1972,99 +1972,4 @@
;%0A %0A
-%0Afunction isArray(obj) %7B%0A return Object.prototype.toString.call(obj) === '%5Bobject Array%5D';%0A%7D;%0A
|
816203edee083d829f93072da5bcf320e7305e08 | fix pypo | lib/handlers/hydrater.js | lib/handlers/hydrater.js | 'use strict';
/**
* @file Define the hydrater endpoint
*
* Will queue requests onto the system file
*
*/
var restify = require('restify');
/**
* This handler receives a document on a POST request and process the document.
*
* @param {Object} req Request object from the client
* @param {Object} res Response... | JavaScript | 0.000003 | @@ -773,16 +773,18 @@
));%0A %7D%0A
+%0A%0A
// Pus
@@ -908,16 +908,17 @@
llback;%0A
+%0A
if(req
@@ -1061,16 +1061,17 @@
();%0A %7D%0A
+%0A
task.d
@@ -1244,16 +1244,16 @@
o queue%0A
-
server
@@ -1271,16 +1271,17 @@
(task);%0A
+%0A
logger
|
ab2e7b39c16d371cb4127313e827476ee703bd86 | clean up | lib/import-cable-type.js | lib/import-cable-type.js | /**
* @fileOverview read a csv file with cable type details and insert the cable types in mongo.
* @author Dong Liu
*/
var csv = require('csv'),
fs = require('fs'),
path = require('path'),
mongoose = require('mongoose'),
CableType = require('../model/meta.js').CableType;
var inputPath, realPath, db, line =... | JavaScript | 0.000001 | @@ -964,70 +964,8 @@
);%0A%0A
-// stream = fs.createReadStream(__dirname + '/' + fileName);%0A%0A
func
|
a931624215682a5608bd496ad5145d1dbc5875d3 | Move init to #run | lib/impulse-bin/index.js | lib/impulse-bin/index.js | /**
* Modules for commander.js and others
*
* Licensed under MIT.
* Copyright (c) 2013 David Smith <https://github.com/codeactual/>
*/
/*jshint node:true*/
'use strict';
module.exports = {
ImpulseBin: ImpulseBin,
create: function() { return new ImpulseBin(); },
extend: function(ext) { extend(ImpulseBin.pro... | JavaScript | 0.00001 | @@ -1085,47 +1085,8 @@
();%0A
- this.verbose = this.createVerbose();%0A
%7D%0A%0Ac
@@ -1990,16 +1990,55 @@
le.log);
+%0A this.verbose = this.createVerbose();
%0A%0A this
|
d8625ff5fc7609b2be1f3238a0f7d0db2b639d50 | update mbtiles log message | lib/interfaces/charts.js | lib/interfaces/charts.js | /*
* Copyright 2017 Teppo Kurki <teppo.kurki@iki.fi>
*
* 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... | JavaScript | 0 | @@ -3795,72 +3795,271 @@
ror(
-%0A 'For mbtiles support please run npm install
+'Please install mbtiles support with ')%0A console.error('npm install @mapbox/mbtiles')%0A console.error('or if you installed from npm with -g ')%0A console.error(%0A ... |
30b8c22189d25378d3db1e986b30d6766776da34 | fix js message when no collection | Resources/public/arkounay_image_bundle.js | Resources/public/arkounay_image_bundle.js | // Refresh thumbnails :
function readURL(input, $img) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$img.show();
$img.attr('src', e.target.result);
};
reader.readAsDataURL(input.files[0]);
}
}
func... | JavaScript | 0.000001 | @@ -3469,16 +3469,30 @@
%7D);%0A%0A
+ $collection =
$('.ark
@@ -3515,16 +3515,67 @@
ection')
+;%0A if ($collection.length) %7B%0A $collection
.collect
@@ -3580,16 +3580,20 @@
ction(%7B%0A
+
@@ -3632,16 +3632,20 @@
+
down: '%3C
@@ -3678,16 +3678,20 @@
+
+
ad... |
a805017c4690ef9ccaf512269d1c250dcc8b52ff | Add support for --log-file. | lib/entry.js | lib/entry.js | var child_process = require('child_process');
var fs = require('fs');
var path = require('path');
var optimist = require('optimist');
var app = require('./web/app');
var settings = require('./settings');
var crawler = require('./crawler/app');
var utils = require('./utils');
var _ = require('underscore');
exports.run... | JavaScript | 0 | @@ -358,16 +358,32 @@
ld_args;
+%0A var log_file;
%0A%0A opti
@@ -1018,24 +1018,93 @@
service');%0A
+ optimist = optimist.describe('log-file', 'File to log output to');%0A
optimist =
@@ -1265,30 +1265,48 @@
ole.log);%0A
-%7D else
+ process.exit();%0A %7D%0A%0A
if (argv.c)
@@ -1333,22 +1333,360 @@
rgv... |
539b3dd598b6e97ca80e7dd342e3d4713eba973b | Update copied and pasted test description | components/norg-app/test/norg-app.test.js | components/norg-app/test/norg-app.test.js | import { html, fixture, expect } from '@open-wc/testing';
import '../norg-app.js';
describe('NorgApp', () => {
it('renders the nodes table', async () => {
const el = await fixture(html`
<norg-app></norg-app>
`);
expect(el.shadowRoot.querySelector('main')).lightDom.to.contain(
'norg-no... | JavaScript | 0 | @@ -344,51 +344,31 @@
t('c
-hanges the page if a menu link gets clicked
+ontrols the drawer menu
', a
|
b73a2af61ea5655fdbf3b53ff42a2a20f9817b92 | change resolving of cascades files | lib/faced.js | lib/faced.js | /*jslint node: true, nomen:true*/
"use strict";
var _ = require("underscore");
var OpenCV = require("opencv");
var Detector = require("./detector");
var cascades = {
"face": "../node_modules/opencv/data/haarcascade_frontalface_alt2.xml",
"mouth": "../node_modules/opencv/data/haarcascade_mcs_mouth.xml",
"n... | JavaScript | 0 | @@ -143,16 +143,125 @@
ctor%22);%0A
+var path = require('path');%0A%0Avar hc_path = path.join( path.dirname(require.resolve(%22opencv%22)), '..', 'data');
%0Avar cas
@@ -286,37 +286,28 @@
e%22:
-%22../node_modules/opencv/data/
+path.join(hc_path, %22
haar
@@ -331,24 +331,26 @@
ce_alt2.xml%22
+)
,%0A %22mouth... |
21e0366b6e16160d38cc14eec7d8fc0e0803350c | Fix lint | src/overridable.js | src/overridable.js | import React, {PureComponent} from 'react'
import {withPropsFromContext} from 'react-context-props'
export default (styles = {}, designName) => Target => {
class OverridableComponent extends PureComponent {
constructor(props) {
super(props)
this.designName = designName || Target.displayName || Targe... | JavaScript | 0.000032 | @@ -8,16 +8,17 @@
React, %7B
+
PureComp
@@ -22,16 +22,17 @@
omponent
+
%7D from '
@@ -46,16 +46,17 @@
import %7B
+
withProp
@@ -67,16 +67,17 @@
mContext
+
%7D from '
@@ -436,32 +436,33 @@
return %7B
+
...styles, ...th
@@ -476,16 +476,17 @@
s.styles
+
%7D%0A
@@ -575,16 +575,17 @@
arget, ... |
f1d2871905f49a3c2597d124e3edfe1bbd67518d | _parent._parent in event | lib/event/index.js | lib/event/index.js | 'use strict'
const delegateEvent = require('./delegate')
const addListener = require('./listener')
exports.properties = {
hasEvents: true
}
exports.on = {
Child: {
define: {
eventCache: {
value: {}
},
key: {
set (val) {
this.parent.parent.setKey('hasEvents', true, f... | JavaScript | 1 | @@ -249,32 +249,68 @@
set (val) %7B%0A
+ // dangerous for context!%0A
this.p
@@ -308,23 +308,25 @@
this.
+_
parent.
+_
parent.s
|
9feff4f992b27bf75eeca193d1b48d3d5909949e | Fix jshint error. | src/pat/depends.js | src/pat/depends.js | /**
* Patterns depends - show/hide/disable content based on form status
*
* Copyright 2012-2013 Florian Friesdorf
* Copyright 2012-2013 Simplon B.V. - Simplon B.V. - Wichert Akkerman
*/
define([
"jquery",
"../registry",
"../core/logger",
"../lib/dependshandler",
"../core/parser"
], function($, ... | JavaScript | 0 | @@ -5006,129 +5006,8 @@
te()
-,%0A duration = (options.transition===%22css%22 %7C%7C options.transition===%22none%22) ? null : options.effect.duration
;%0A%0A
|
ef3c9923f653fbec4e4164b252efb06605c385ee | Fix linting errors | src/pat/masonry.js | src/pat/masonry.js | /**
* Patternslib pattern for Masonry
* Copyright 2015 Syslab.com GmBH
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([
"pat-registry",
"pat-parser",
"masonry",
"imagesloaded"
], function() {
... | JavaScript | 0.000075 | @@ -31,17 +31,16 @@
Masonry
-
%0A * Copy
@@ -129,17 +129,17 @@
===
-'
+%22
function
' &&
@@ -134,17 +134,17 @@
function
-'
+%22
&& defi
@@ -170,16 +170,38 @@
efine(%5B%0A
+ %22jquery%22,%0A
@@ -420,16 +420,24 @@
factory(
+root.$,
root.pat
@@ -522,16 +522,19 @@
unction(
+$,
registr... |
9c48a19e7db09ae624a5249a17fa7cc50c3f062f | create require name for custom modules | lib/flow.client.js | lib/flow.client.js | var Flow = require('flow');
var server = require('./socket');
// init flow with core module
var CoreInst = Flow({
// load module bundles and return the entry-point exports
module: function (name, callback) {
// crate script dom element
var node = document.createElement('script');
nod... | JavaScript | 0 | @@ -357,32 +357,97 @@
node.remove();%0A
+ name = name%5B0%5D === '/' ? name + '/bundle.js' : name;%0A
call
|
8c649e6f89d391e7075315cab6ef9144b3554bd4 | Fix "Source Maps are off" | lib/global-eval.js | lib/global-eval.js | // we define a __exec for globally-scoped execution
// used by module format implementations
var __exec;
(function() {
var hasBtoa = typeof btoa != 'undefined';
function getSource(load) {
var lastLineIndex = load.source.lastIndexOf('\n');
// wrap ES formats with a System closure for System global encaps... | JavaScript | 0 | @@ -564,94 +564,8 @@
);%0A%0A
- if (sourceMap.mappings)%0A sourceMap.mappings = ';' + sourceMap.mappings;%0A%0A
@@ -3536,8 +3536,9 @@
%7D%0A%0A%7D)();
+%0A
|
739dac61b706563a04eee791635094e1182ae4ea | remove commented out imports | troposphere/static/js/components/common/InstanceDetail.react.js | troposphere/static/js/components/common/InstanceDetail.react.js | import React from 'react';
import Router from 'react-router';
import Backbone from 'backbone';
import stores from 'stores';
import InstanceDetailsSection from 'components/projects/resources/instance/details/sections/InstanceDetailsSection.react';
import PastInstanceDetailsSection from 'components/projects/resources/ins... | JavaScript | 0 | @@ -830,731 +830,8 @@
';%0A%0A
- // var React = require('react/addons'),%0A // Router = require('react-router'),%0A // Backbone = require('backbone'),%0A // BreadcrumbBar = require('components/projects/common/BreadcrumbBar.react'),%0A //%0A // InstanceDetailsSection = require('components/projects/resourc... |
d96c20cd158d9dc46e7138fffc42d724fe09d3df | make output resizable only when plugin present | present/js/play.js | present/js/play.js | // Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
function initPlayground(transport) {
"use strict";
function text(node) {
var s = "";
for (var i = 0; i < node.childNodes.length; i++) {
var n = node.c... | JavaScript | 0.00001 | @@ -764,55 +764,41 @@
%0A%0A%09%09
-// TODO(adg): check that jquery etc is loaded.%0A
+if ($ && $(output).resizable) %7B%0A%09
%09%09$(
@@ -820,16 +820,17 @@
le(%7B%0A%09%09%09
+%09
handles:
@@ -840,16 +840,17 @@
,w,nw%22,%0A
+%09
%09%09%09minHe
@@ -862,16 +862,17 @@
%0927,%0A%09%09%09
+%09
minWidth
@@ -878,16 ... |
828103f6d3ffc139dce1badf6d420cc990b0d77b | Use 'protocol' and 'host' from config.server | src/modules/socket/socket-client.js | src/modules/socket/socket-client.js | /* @flow */
import eio from 'engine.io-client/engine.io';
import { bus, config } from '../../core-client.js';
import * as models from '../../models/models.js';
import stringpack from 'stringpack';
const protocol = config.server.protocol, host = config.server.apiHost;
let backOff = 1, client;
const packer = stringpac... | JavaScript | 0.000072 | @@ -202,33 +202,11 @@
nst
-protocol = config.server.
+%7B%0A%09
prot
@@ -210,21 +210,25 @@
rotocol,
-
+%0A%09
host
+,%0A%7D
= confi
@@ -239,17 +239,10 @@
rver
-.apiHost
;
+%0A
%0Alet
|
574c1c9dc1311238d216418855fa3b90dd219f72 | Add lib code | lib/index.js | lib/index.js | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.mockRes = exports.mockReq = undefined;
var _sinon = require('sinon');
var _sinon2 = _interopRequireDefault(_sinon);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// Returns a new... | JavaScript | 0.000007 | @@ -425,39 +425,38 @@
rguments.length
-%3C= 0 %7C%7C
+%3E 0 &&
arguments%5B0%5D ==
@@ -445,35 +445,35 @@
&& arguments%5B0%5D
+!
==
-=
undefined ? %7B%7D
@@ -460,37 +460,32 @@
!== undefined ?
- %7B%7D :
arguments%5B0%5D;%0A%0A
@@ -473,32 +473,37 @@
d ? arguments%5B0%5D
+ : %7B%7D
;%0A%0A var ret = %7B
@... |
fed83241144ccd26079890088371170793d4796d | Add the translate module to the main index | lib/index.js | lib/index.js | this.interaction_machine = require("./interaction_machine");
this.InteractionMachine = this.interaction_machine.InteractionMachine;
this.app = require("./app");
this.App = this.app.App;
this.dummy = require("./dummy");
this.DummyApi = this.dummy.DummyApi;
this.tester = require("./tester");
this.AppTester = this.test... | JavaScript | 0.000001 | @@ -569,24 +569,65 @@
%22./utils%22);%0A
+this.translate = require(%22./translate%22);%0A
this.test_ut
|
058514cacfa222b39c02d26df1648e47d86a7e93 | Remove unnecessary content from index.js | lib/index.js | lib/index.js | /*
* biojs-io-biom
* https://github.com/iimog/biojs-io-biom
*
* Copyright (c) 2016 Markus J. Ankenbrand
* Licensed under the MIT license.
*/
/**
@class biojsiobiom
*/
/**
* Private Methods
*/
/*
* Public Methods
*/
/**
* Method responsible to say Hello
*
* @example
*
* biojsiobiom.hello('biojs... | JavaScript | 0.000006 | @@ -145,383 +145,22 @@
*/%0A%0A
-/**%0A@class biojsiobiom%0A */%0A%0A%0A%0A/**%0A * Private Methods%0A */%0A%0A/*%0A * Public Methods%0A */%0A%0A/**%0A * Method responsible to say Hello%0A *%0A * @example%0A *%0A * biojsiobiom.hello('biojs');%0A *%0A * @method hello%0A * @param %7BString%7D name Name of a person%0... |
e7b9ebc894ef7d58fd7405ff2c2c82dfcd4bace2 | Resolve lint issues in lib/index | lib/index.js | lib/index.js | /**
* An app that makes apps.
*
* @package appmaker
* @author Andrew Sliwinski <a@mozillafoundation.org>
*/
var Vue = require('vue');
var model = require('./model');
var router = require('./router');
// Restore user state
model.restore(function (err) {
if (err) throw new Error('Could not restore user state... | JavaScript | 0 | @@ -744,20 +744,16 @@
ick'));%0A
-
%0A //
@@ -946,8 +946,9 @@
pp);%0A%7D);
+%0A
|
40701a683eb8a49625124fcc0c7aa80dc3f3104c | Group the differences | lib/index.js | lib/index.js | // Dependencies
var LevDist = require("levdist");
//function Change(removed, added, notModified,) {
// this._ = [removed, added];
// this.
//}
function Diff(oldLines, newLines, sensitivity) {
var self = this;
self.old_lines = oldLines;
self.new_lines = newLines;
self.sensitivity = sensitivity ||... | JavaScript | 0.999991 | @@ -44,18 +44,16 @@
ist%22);%0A%0A
-//
function
@@ -80,26 +80,23 @@
ed,
-notModified,
+sensitivity
) %7B%0A
-//
@@ -126,22 +126,100 @@
d%5D;%0A
-// this.%0A//
+ this.changes = LevDist(removed, added);%0A this.modified = this.changes %3E sensitivity;%0A
%7D%0A%0Af
@@ -653,53 +653,9 @@
null
-%0A ... |
939d6089384c817429b719e7a6925b48e48ee65c | Call prototype.initialize to prevent overwriting other plugins | lib/index.js | lib/index.js | var extend = require('xtend')
var Joi = require('joi')
var difference = require('lodash.difference')
module.exports = function modelBase (bookshelf, params) {
if (!bookshelf) {
throw new Error('Must pass an initialized bookshelf instance')
}
var model = bookshelf.Model.extend({
initialize: function (att... | JavaScript | 0 | @@ -324,24 +324,79 @@
options) %7B%0A
+ bookshelf.Model.prototype.initialize.call(this)%0A%0A
if (th
|
799eea05c603047500b201dbd974c65f5b7020fa | Support non-space whitespace in key mappings. This closes #141. | commands.js | commands.js | var availableCommands = {};
var keyToCommandRegistry = {};
function addCommand(command, description, isBackgroundCommand) {
if (availableCommands[command])
{
console.log(command, "is already defined! Check commands.js for duplicates.");
return;
}
availableCommands[command] = { description: descript... | JavaScript | 0 | @@ -930,52 +930,15 @@
lit(
-%22 %22); // TODO(ilya): Support all whitespace.
+/%5Cs+/);
%0A%0A
|
a033143013e39c560ed2262d38ec308c3eccd869 | Add Dapper+Twinky to exclusion list for transfemme | lib/index.js | lib/index.js | import _ from 'lodash';
const code = /`.+?`/g;
export function removeCode(text) {
return text.replace(code, '');
}
const BASE = {
core: true,
slots: [
['Non-binary', 'Trans', 'Cis', 'Questioning', 'Genderfluid', 'Bigender', 'Agender', 'Genderqueer'],
['Flexible', 'Nonconforming', 'Femmetype', 'Sophistic... | JavaScript | 0.000001 | @@ -832,32 +832,50 @@
%5B%5D%5D,%0A %5B%5B%5D, %5B
+'Dapper', 'Twinky'
%5D%5D,%0A %5B%5B%5D, %5B'B
|
176f9e1c9a9661790cedfcde6120078a5eb82a03 | Allow passing in a default set of exchanges. | lib/index.js | lib/index.js | var uri = require('url')
, dns = require('dns')
, NoDataError = require('./errors/nodataerror');
var DEFAULT_PROVIDERS = [ 'google' ];
exports = module.exports = function() {
var map = {};
DEFAULT_PROVIDERS.forEach(function(provider) {
var conf = require('./providers/' + provider);
var i, len;
... | JavaScript | 0 | @@ -175,24 +175,54 @@
ion(
-) %7B%0A %0A var map
+exchanges) %7B%0A if (!exchanges) %7B%0A exchanges
= %7B
@@ -226,17 +226,21 @@
= %7B%7D;%0A
-%0A
+ %0A
DEFAUL
@@ -280,24 +280,26 @@
ider) %7B%0A
+
var conf = r
@@ -333,24 +333,26 @@
vider);%0A
+
var i, len;%0A
@@ -351,24 +351,26 @@
i, ... |
e01d0dc03228801f895584be587dcf7afc801ace | Correct output debug statement | lib/index.js | lib/index.js | var p2list = require('properties-parser');
var p2tree = require('java.properties.js').default;
var path = require('path');
var createProperties2JsonPreprocessor = function(file, config) {
config = typeof config === 'object' ? config : {};
var distPath = config.dist || 'spec/javascripts/fixtures/json/';
var file... | JavaScript | 0.001266 | @@ -391,12 +391,15 @@
og('
-Move
+Writing
out
@@ -406,16 +406,31 @@
put: ',
+path.normalize(
distPath
@@ -457,16 +457,17 @@
'.json')
+)
;%0A file
|
906ef441890ad31529db727b06d133318e0c4dec | Switch to keyup to repaint any time the block is changed. | wagtailcodeblock/static/wagtailcodeblock/js/wagtailcodeblock.js | wagtailcodeblock/static/wagtailcodeblock/js/wagtailcodeblock.js | function CodeBlockDefinition() {
window.wagtailStreamField.blocks.StructBlockDefinition.apply(this, arguments);
}
CodeBlockDefinition.prototype.render = function(placeholder, prefix, initialState, initialError) {
var block = window.wagtailStreamField.blocks.StructBlockDefinition.prototype.render.apply(
... | JavaScript | 0 | @@ -1105,22 +1105,21 @@
eld.on('
-change
+keyup
', popul
@@ -1138,79 +1138,8 @@
e);%0D
-%0A codeField.keypress(function() %7B%0D%0A prismRepaint();%0D%0A %7D);%0D
%0A%0D%0A
|
708118c6822c56b650de66d390376da58a1e35ed | clear interval | lib/index.js | lib/index.js | 'use strict';
const restify = require('restify');
const ws281x = require('rpi-ws281x-native');
var NUM_LEDS = parseInt(process.argv[2], 10) || 10;
var pixelData = new Uint32Array(NUM_LEDS);
var itv;
ws281x.init(NUM_LEDS);
function init () {
var server = restify.createServer();
server.get('/rainbow', (req, res,... | JavaScript | 0.000003 | @@ -199,30 +199,8 @@
tv;%0A
-ws281x.init(NUM_LEDS);
%0A%0Afu
@@ -376,24 +376,71 @@
erval(itv);%0A
+ ws281x.reset();%0A ws281x.init(NUM_LEDS);%0A
var offs
|
bd01810ba846c1dfe7a438f3cb97fd6f147f3735 | remove express powered by header. added uncaught error handler | lib/index.js | lib/index.js | var express = require('express');
var bodyParser = require('body-parser');
var buildLog = require('./log.js');
var buildConfig = require('./config.js');
var buildRedis = require('./redis.js');
var buildCache = require('./cache.js');
var buildCron = require('./cron.js');
var buildRouter = require('./router.j... | JavaScript | 0.000005 | @@ -1065,16 +1065,48 @@
ress();%0A
+%09%09%09app.disable('x-powered-by');%0A
%09%09%09app.u
@@ -1228,16 +1228,191 @@
router);
+%0A%09%09%09app.use(function (e, req, res, next) %7B%0A%09%09%09%09var status = e.status %7C%7C 500;%0A%09%09%09%09res.send(status);%0A%09%09%09%09log.error('uncaught error: ' + (e.message %... |
92d72d89b9bfe74dfe181e64a8ba979ab8d6fb80 | raise error if protocol isn't valid | lib/index.js | lib/index.js | 'use strict';
const os = require('os');
const net = require('net');
const secNet = require('tls');
const http = require('http');
const https = require('https');
const util = require('util');
const winston = require('winston');
/**
* parse winston level as a string and return its equivalent numeric value
* @return {... | JavaScript | 0.000017 | @@ -3662,24 +3662,121 @@
ort, true);%0A
+ else throw new TypeError('protocol shoud be one of the following: tcp, tls, http or https');%0A
%7D;%0A%0A// Inher
|
3803a80298692ca5a7b38ccf635a79accee26fb5 | Copy user_access | lib/index.js | lib/index.js | 'use strict';
var fs = require('fs');
var MailParser = require("mailparser").MailParser;
var Encoder = require('node-html-encoder').Encoder;
var AnyfetchClient = require('cluestr');
var async = require('async');
/**
* HYDRATING FUNCTION
*
* @param {string} path Path of the specified file
* @param {string} documen... | JavaScript | 0.000001 | @@ -2366,24 +2366,80 @@
t.fileName;%0A
+ docAttachment.user_access = document.user_access;%0A
// Fil
@@ -2880,8 +2880,9 @@
ser);%0A%7D;
+%0A
|
c9a2f9b16a40449f060a50c92654fc21eb043587 | Update index.js | lib/index.js | lib/index.js | var tokenize = require('./tokenize');
var languageProcessor = require('./language-processor');
/**
* Constructor
* @param {Object} options - Instance options
*/
var Sentiment = function (options) {
this.options = options;
};
/**
* Registers the specified language
*
* @param {String} languageCode
* - Tw... | JavaScript | 0.000002 | @@ -2393,45 +2393,8 @@
re,%0A
- calculation: calculation,%0A
@@ -2456,24 +2456,61 @@
length : 0,%0A
+ calculation: calculation,%0A
toke
|
c867172e874a73de564c6900c8fbf04b25970f26 | Allow the init function to be async | packages/express/index.js | packages/express/index.js | const express = require('express');
module.exports = init => {
const app = express();
app.disable('x-powered-by');
init(app, express);
const port = process.env.PORT;
if (!port) {
throw new Error('missing port');
}
app.listen(port, () => {
console.log(`app listen on port ${port}`);
});
};
| JavaScript | 0.000142 | @@ -46,16 +46,22 @@
xports =
+ async
init =%3E
@@ -122,16 +122,22 @@
y');%0A%0A
+await
init(app
|
315b7c3c60261f0dd4d3a6aed06871473f3340d9 | returning the data | lib/index.js | lib/index.js | /**
* Fixture loader
*/
'use strict';
/**
* Module dependencies.
*/
var path = require('path');
var fs = require('fs');
/**
* Types.
*/
/**
* Load fixtures.
*/
function load(basePath, data, opts) {
fs.readdirSync(basePath).forEach(function(fileName) {
var filePath = path.join(basePath, fileName);
... | JavaScript | 0.999951 | @@ -1800,16 +1800,38 @@
, opts);
+%0A%0A return opts.scope;
%0A%7D;%0A%0A/**
|
26a4afaaf97c094d4d44149578ccf4bb803ce45c | Remove style attribute from mainNav after slide up, fixes #99 | site/javascript/garden.js | site/javascript/garden.js | // A thingy to handle the sections ----------------------------------------------
// ------------------------------------------------------------------------------
function Sections(page) {
this.page = page;
this.init();
}
Sections.prototype = {
init: function(attribute) {
this.heights = this.page.... | JavaScript | 0 | @@ -5379,16 +5379,56 @@
deUp(300
+, function() %7Bthis.removeAttr('style');%7D
);%0A
|
4b45eb37d1b8537979930a964892be6c267e019d | Fix reducer function name | site/reducers/playback.js | site/reducers/playback.js | import {
START_PLAYBACK,
PAUSE_PLAYBACK,
} from '../constants/ActionTypes'
const initialState = {
startTime: null,
pauseTime: null,
}
export default function song(state = initialState, action) {
switch (action.type) {
case START_PLAYBACK:
return Object.assign({}, state, {
startTime: perfor... | JavaScript | 0.999551 | @@ -165,12 +165,16 @@
ion
-song
+playback
(sta
|
afcb5b74c511a2c1ee0abbb521c7b2c477c2e5b6 | Remove unused vars. Fixes build | lib/index.js | lib/index.js | 'use strict';
const _handlers = Symbol('handlers');
const _queue = Symbol('queue');
const _state = Symbol('state');
const _value = Symbol('value');
class Handlers {
constructor () {
this.fulfill = null;
this.reject = null;
}
}
/**
* @class promise
*/
class FidelityPromise {
constructor (state = PENDI... | JavaScript | 0 | @@ -81,72 +81,8 @@
e');
-%0Aconst _state = Symbol('state');%0Aconst _value = Symbol('value');
%0A%0Acl
|
215d8166bbf11aec7b9cc56c18364f092b88d849 | Remove underscore.js dependency. | formErrors.js | formErrors.js | angular.module('FormErrors', [])
// just put <form-errors><form-errors> wherever you want form errors to be displayed!
.directive('formErrors', [function () {
return {
// only works if embedded in a form or an ngForm (that's in a form).
// It does use its closest parent that is a form OR ngForm
... | JavaScript | 0 | @@ -3135,27 +3135,36 @@
-_.e
+angular.forE
ach(ctrl, fu
@@ -3344,11 +3344,20 @@
-_.e
+angular.forE
ach(
|
2c5b10044921635da6e3f7b9cfa33180b7f55138 | rewrite for sensors | lib/index.js | lib/index.js | /**
* Imports
*/
var fs = require('fs')
/**
* Vars
*/
var motorPath = '/sys/class/tacho-motor/'
var paths = fs.readdirSync(motorPath).reduce(function (obj, file) {
var portName = fs.readFileSync(motorPath + file + '/port_name', 'utf-8').trim()
obj[portName] = file.trim()
return obj
}, {})
/**
* Expose de... | JavaScript | 0.000311 | @@ -67,14 +67,20 @@
otor
-Path =
+ = %7B%0A path:
'/s
@@ -105,208 +105,195 @@
or/'
-%0Avar paths = fs.readdirSync(motorPath).reduce(function (obj, file) %7B%0A var portName = fs.readFileSync(motorPath + file + '/port_name', 'utf-8').trim()%0A obj%5BportName%5D = file.trim()%0A return obj%0A%7D, %7B%7D)
+,%0A a... |
42b44fabcb141b429cb024bd173a385666d60595 | fix validate import (commonJS / ES6 compatibility issue) | lib/index.js | lib/index.js | const modDelim = '_';
const elemDelim = '__';
export function buildClassName(bemjson) {
if (!bemjson) {
return '';
}
// validation
// istanbul ignore next
if (process.env.NODE_ENV !== 'production') {
require('./validate.js')(bemjson);
}
let out = '';
// block
if (... | JavaScript | 0 | @@ -255,16 +255,24 @@
ate.js')
+.default
(bemjson
|
49e4ea4ea04539ce473da175b48d95277700e33b | Add missing use strict statement to lib/index.js | lib/index.js | lib/index.js | var Client = require('./client'),
Sandbox = require('./sandbox'),
accounts = require('./accounts'),
calendars = require('./calendars'),
contacts = require('./contacts'),
model = require('./model'),
request = require('./request'),
transport = require('./transport');
/**
* model
*/
for (var... | JavaScript | 0.000003 | @@ -1,12 +1,27 @@
+'use strict';%0A%0A
var Client =
|
ab77a4b0726e7e6ee7ee9c0ee8093a314b773175 | refactor add commands from array | lib/index.js | lib/index.js | const api = require('../api')
const getLastMessage = require('./modules/getlastmessage')
class Botact {
constructor(options) {
if (!options.confirmation || !options.token) {
throw 'Bot\'s options isn\'t full.'
}
this.msg = []
this.action = {}
this.settings = options
this.messages = { c... | JavaScript | 0.000052 | @@ -974,39 +974,32 @@
t') %7B%0A
-return
command.
some(cmd =%3E
@@ -978,36 +978,39 @@
%7B%0A command.
-some
+forEach
(cmd =%3E this.mes
@@ -1052,34 +1052,42 @@
callback)%0A %7D
-%0A%0A
+ else %7B%0A
this.message
@@ -1127,24 +1127,30 @@
= callback%0A
+ %7D%0A
%7D%0A%0A hears
@@ -12... |
f49f0c7bb89f086cf0050ef3baf02ec84237c156 | Remove eventual onEmpty DOM | lib/html5/_list.js | lib/html5/_list.js | 'use strict';
var isFunction = require('es5-ext/lib/Function/is-function')
, d = require('es5-ext/lib/Object/descriptor')
, isList = require('es5-ext/lib/Object/is-list')
, isPlainObject = require('es5-ext/lib/Object/is-plain-object')
, makeElement = require('dom-ext/lib/Document/p... | JavaScript | 0.000005 | @@ -484,16 +484,85 @@
xtend')%0A
+ , remove = require('dom-ext/lib/Element/prototype/remove')%0A
, repl
@@ -1504,24 +1504,72 @@
rs.onEmpty;%0A
+%09%09%09%09%09if (isNode(onEmpty)) remove.call(onEmpty);%0A
%09%09%09%09%7D%0A%09%09%09%09ca
|
e7ad1992ab12a19774c4be3c30724f5677314f45 | Fix a typo | lib/index.js | lib/index.js | 'use babel'
import {Motion} from './main'
import {ensureUninstalled} from './helpers'
module.exports = {
config: {
liveReload: {
description: 'Automatically reload motion page in editor',
type: 'boolean',
default: true
},
lintingDelay: {
description: 'Delay for updating lint mess... | JavaScript | 0.003765 | @@ -1273,21 +1273,22 @@
rn this.
-flint
+motion
.provide
|
62ca306b5e396e826f5da94bbd7f3b60f3f3d15e | Add more tests | web/src/js/components/Search/__tests__/SearchTextResult.test.js | web/src/js/components/Search/__tests__/SearchTextResult.test.js | /* eslint-env jest */
import React from 'react'
import {
shallow
} from 'enzyme'
const getMockProps = () => ({
result: {
title: 'Some search result',
linkURL: 'http://www.example.com',
snippet: 'This is the search result description.'
}
})
afterEach(() => {
jest.clearAllMocks()
})
describe('Sear... | JavaScript | 0 | @@ -577,12 +577,1357 @@
)%0A %7D)
+%0A%0A it('displays the title as a clickable link', () =%3E %7B%0A const SearchTextResult = require('js/components/Search/SearchTextResult').default%0A const mockProps = getMockProps()%0A mockProps.result.title = 'Hey, click to our site!'%0A const wrapper = shallow(%0... |
41a709f414e27e6d9060f3074e1f78d7a6f63e84 | Add response declaration | lib/index.js | lib/index.js | 'use strict'
// Load modules
const Wreck = require('wreck')
const Boom = require('boom')
const Hoek = require('hoek')
// Declare internals
const internals = {}
exports.register = (server, options, next) => {
server.register({
register: require('bucker'),
options: options.logger || {}
}, (err) => {
n... | JavaScript | 0 | @@ -2172,24 +2172,41 @@
nction () %7B%0A
+ let response%0A
switch (
|
70fe2dab0f4105f88105a3583348c16db5ac9763 | add lowr function | lib/index.js | lib/index.js | var async = require('async')
, etcd = new (require('node-etcd'))();
// Accepts an array of strings as configuration keys.
// Each {key1} corresponds to /config/{key1} entry in etcd.
// Returns an object with properties corresponding to input keys.
// Each property is an EventEmitter. It emits the `modified` even... | JavaScript | 0.001708 | @@ -2393,12 +2393,2348 @@
%0A %7D);%0A%7D;%0A
+%0A// The .lowr async function completes in either of two situations:%0A//%0A// 1. If the sync_root is not locked, it obtains an exclusive, distributed lock of the sync_root %0A// via etcd and returns a function that can be used to release the lock as a callback parame... |
6f5f47c0149938ed92d7e64c3e2d4200d0e6625a | Fix for returning only single device | src/plugins/ble.js | src/plugins/ble.js | // install : cordova plugin add https://github.com/don/cordova-plugin-ble-central#:/plugin
// link : https://github.com/don/cordova-plugin-ble-central
angular.module('ngCordova.plugins.ble', [])
.factory('$cordovaBLE', ['$q', function ($q) {
return {
scan: function (services, seconds) {
... | JavaScript | 0 | @@ -235,16 +235,28 @@
, %5B'$q',
+ '$timeout',
functio
@@ -260,16 +260,26 @@
tion ($q
+, $timeout
) %7B%0A%0A
@@ -351,32 +351,58 @@
q = $q.defer();%0A
+ var devices = %5B%5D;%0A
ble.scan
@@ -447,33 +447,36 @@
%7B%0A
-q.resolve
+devices.push
(result);%0A
@@ -522,32 +522,32 @@
.rej... |
462fa68d7ea0c6eb1bf5e4230c519a1e0be3cf95 | Add a function to ease page creation. | page/index.js | page/index.js | module.exports = {
detail: require('./detail'),
search: require('./search')
};
| JavaScript | 0 | @@ -1,83 +1,620 @@
-module.exports = %7B%0A detail: require('./detail'),%0A search: require('./search')
+//Dependency%0Avar React = require('react');%0Avar detailMixin = require('./detail').mixin;%0A%0A//Function to help page creation.%0Amodule.exports = %7B%0A detail: detailMixin,%0A search: require('./search'),%0... |
ef9ccdded16892d965871416a615c1c2506cae2b | Set the public directory. | lib/index.js | lib/index.js | "use strict";
const BloggifyCore = require("bloggify-core")
, ul = require("ul")
, defaults = require("./defaults")
, Lien = require("lien")
;
/**
* bloggifyServer
* The Bloggify server.
*
* @name bloggifyServer
* @function
* @param {Number} a Param descrpition.
* @param {Number} b Param descrp... | JavaScript | 0 | @@ -539,32 +539,33 @@
ns %7D;%0A %7D%0A
+%0A
options
@@ -633,24 +633,105 @@
, options);%0A
+%0A options.server.public = %60$%7Bthis.paths.root%7D/$%7Boptions.server.public%7D%60;%0A%0A
this
|
18f39e6beb8a5461c1689d23bb649e6afee49acc | increase nodejs memory limits | lib/index.js | lib/index.js | #!/bin/sh
':' // ; export MAX_MEM="--max-old-space-size=60"; exec "$(command -v node || command -v nodejs)" "${NODE_OPTIONS:-$MAX_MEM}" "$0" "$@"
/*
* @copyright Copyright (c) Sematext Group, Inc. - All Rights Reserved
*
* @licence SPM Agent for MongoDB is free-to-use, proprietary software.
* THIS IS PROPRIETARY S... | JavaScript | 0.000001 | @@ -53,9 +53,10 @@
ize=
-6
+12
0%22;
|
d3c5aa99800a362f0af86e709913beb7015112bd | customize enhancements #2 | module/Customize/public/scripts/zork/customize.js | module/Customize/public/scripts/zork/customize.js | /**
* User interface functionalities
* @package zork
* @subpackage user
* @author David Pozsar <david.pozsar@megaweb.hu>
*/
( function ( global, $, js )
{
"use strict";
if ( typeof js.customize !== "undefined" )
{
return;
}
var customCssSelector = "head link.customize-stylesheet[data-... | JavaScript | 0 | @@ -1277,16 +1277,28 @@
%22href%22
+
: href
@@ -1337,16 +1337,28 @@
%22type%22
+
: %22tex
@@ -1402,16 +1402,28 @@
%22rel%22
+
: %22st
@@ -1435,38 +1435,227 @@
eet%22
-%0A %7D
+,%0A %22class%22 ... |
2c3a6ea785caa13aafdf30dcaff8468d54c4b612 | Fix change event on preferences’ redirect list | pages/list.js | pages/list.js | import binarySearch from './binary-search.js';
import compareSequences from './compare-sequences.js';
// Sort siblings next to each other, but don’t separate a (TODO: effective) TLD from the component before.
// https://bugzilla.mozilla.org/show_bug.cgi?id=1315558
const getDomainSort = domain => {
const components = ... | JavaScript | 0 | @@ -4061,37 +4061,40 @@
ctChanged) %7B%0A%09%09%09
-allow
+redirect
List.dispatchEve
|
54c16c82884055987ca52a50fcc50f5583ff0766 | Support resetting a build for requiring | lib/index.js | lib/index.js | /*
Copyright (c) 2012, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://yuilibrary.com/license/
*/
var log = require('./log'),
fs = require('fs'),
path = require('path'),
pack = require('./pack'),
args = require('./args'),
find = require('./util').find,
CWD = process.... | JavaScript | 0 | @@ -959,41 +959,57 @@
-var options = opts %7C%7C args.parse(
+log.reset();%0A var options = args.defaults(opts
),%0A
@@ -2245,24 +2245,79 @@
t();%0A %7D%0A%0A
+ if (options.silent) %7B%0A log.silent();%0A %7D%0A%0A
log.info
@@ -3699,24 +3699,65 @@
/builder');%0A
+ ... |
d7a5954bc099f702c419d90e940bafbab77c7106 | change conditiona in setDestination to !nearestHuman from NH == null or undefined | public/js/board.js | public/js/board.js | var Board = function( attributes ){
this.humanoid;
this.humanoids = attributes.humanoids || [];
this.width = attributes.width || '600px';
this.height = attributes.height || '400px';
}
Board.prototype = {
isPositionEqual: function( position1, position2 ){
return position1.x === position2.x && position1.y... | JavaScript | 0.000002 | @@ -1990,16 +1990,17 @@
if(
+!
nearestH
@@ -2008,48 +2008,8 @@
man
-=== null %7C%7C nearestHuman === undefined
) %7B
|
809ddd475e59b6bc08dc60342d482e8a78b86290 | Add comment | lib/index.js | lib/index.js | 'use strict';
var transform = require('babel-core').transform;
var MagicString = require('magic-string');
var traverse = require('babel-traverse')['default'];
var PersistentFilter = require('broccoli-persistent-filter');
function LazyCode(node, options) {
PersistentFilter.call(this, node, options);
}
LazyCode.prot... | JavaScript | 0 | @@ -956,16 +956,232 @@
1%5D.end;%0A
+ // TODO make this generic%0A // Ember CLI is making assumptions on evaluation being in the%0A // module body. The environment has a try/catch return which%0A // requires an outer scope%0A
@@ -1245,24 +1245,24 @@
ronment') %7B%0A
-
... |
aed045646fa7f33f4ac1e657c2e0b04326b11b3f | Fix non camelCase identifiers | lib/node/column-namer.js | lib/node/column-namer.js | 'use strict';
function strip_table_name(name) {
return name.split('.').pop();
}
// This class is used to help generate the names of node query columns
module.exports = class ColumnNamer {
constructor (columns) {
this.columns = columns.map(name => strip_table_name(name));
}
uniqueName(baseName... | JavaScript | 0.999999 | @@ -18,32 +18,31 @@
nction strip
-_
+T
table
-_n
+N
ame(name) %7B%0A
@@ -266,16 +266,15 @@
trip
-_
+T
table
-_n
+N
ame(
|
5fe32b5cb0ff7d66db112171af86583a4f6cd7aa | Replace double backslash in file paths on Windows with single forward slash, fixes #5 | lib/index.js | lib/index.js | var through = require("through");
var path = require("path");
console.warn("Injecting Rewireify into modules");
module.exports = function rewireify(file, options) {
options = {
ignore: options.ignore || ""
};
var ignore = ["__get__", "__set__", "rewire"].concat(options.ignore.split(","));
if (/\.json$/.... | JavaScript | 0 | @@ -492,16 +492,194 @@
r;%0A %7D%0A%0A
+ function pathTo(file) %7B%0A var relpath = __dirname;%0A%0A if (path.sep == %22%5C%5C%22) %7B%0A relpath = relpath.replace(/%5C%5C/g, %22/%22);%0A %7D%0A%0A return path.join(relpath, file);%0A %7D%0A%0A
functi
@@ -689,17 +689,16 @@
end() %7B%0A
-%0A
... |
482904105748551fa859fcda702baae33d33fe80 | Fix typo | lib/passport-yj/index.js | lib/passport-yj/index.js | /*
* Module dependencies
*/
var Strategy = require('./strategy');
/*
* Framework version
*/
require('pgkinfo')(module, 'version');
/*
* Expose constructors
*/
exports.YJStrategy = Strategy;
| JavaScript | 0.999999 | @@ -107,10 +107,10 @@
e('p
-g
k
+g
info
|
6daf0ffe40d554926808657c747a0cfd8092bd0f | Fix bug with IdP Discovery script | modules/discojuice/www/discojuice/idpdiscovery.js | modules/discojuice/www/discojuice/idpdiscovery.js | /*
* IdP Discovery Service
*
* An implementation of the IdP Discovery Protocol in Javascript
*
* Author: Andreas Åkre Solberg, UNINETT, andreas.solberg@uninett.no
* Licence: LGPLv2
*/
var IdPDiscovery = function() {
var acl = true;
var returnURLs = [];
var serviceNames = {
'http://dev.andreas.feide.no/si... | JavaScript | 0.000001 | @@ -1790,24 +1790,95 @@
on(e) %7B%0A%09%09%09%0A
+// %09%09%09console.log('ReturnTo');%0A// %09%09%09console.log(e);%0A// %09%09%09return;%0A%09%09%09%0A
%09%09%09var retur
@@ -2191,16 +2191,21 @@
0; i %3C
+this.
returnUR
@@ -2231,16 +2231,21 @@
%09%09%09%09if (
+this.
returnUR
@@ -2283,16 +2283,17 @@
= true;%... |
7e7261f0ef2e1044775eec2824a863b3b77966c2 | change public api | lib/index.js | lib/index.js | var esprima = require('esprima');
var fs = require('fs');
var skip = /^\s+\*/gm;
var mapName = function(elm){
return elm.name;
};
var findReturns = function(expr){
var returns = []
expr.body.forEach(function(expr){
if(expr.type === 'ReturnStatement'){
if(expr.argument.type === 'Litera... | JavaScript | 0 | @@ -3308,20 +3308,16 @@
ts.parse
-Data
File = f
@@ -3375,20 +3375,24 @@
ts.parse
-Data
+Contents
(fs.read
@@ -3458,12 +3458,16 @@
arse
-Data
+Contents
= f
@@ -4096,12 +4096,62 @@
results;%0A%7D;%0A
+%0Amodule.exports.parse = module.exports.parseFile;%0A
|
b593b0434d39420196ab742beb7137eb336ccced | Fix casing | source/static/scripts.js | source/static/scripts.js | // Piwik/Matomo
var _paq = _paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.openfisca.org"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//stats.data.gouv.fr/";
_paq.push(['setTrackerUrl', u+'piwik.php'])... | JavaScript | 0.000002 | @@ -931,17 +931,17 @@
n a new
-W
+w
indow%0A%0A
|
ae8b3a33c1cb288ba476c1155f94184c9f108f23 | Add suit selection | public/js/index.js | public/js/index.js | $('#simulate').click(function () {
boardData = {
table: { flop: ['ah', 'td', 'jh'] },
hands: [['ac', 'jd'], ['90%']]
};
submitData(boardData, function(data){
$('#output').append($('<pre>').text(JSON.stringify(data, null, ' ')));
});
});
$('#cardPicker').on('show.bs.mo... | JavaScript | 0 | @@ -1,12 +1,68 @@
+var suits = %5B'clubs', 'spades', 'diamonds', 'hearts'%5D;%0A%0A
$('#simulate
@@ -1125,16 +1125,631 @@
500%0A %7D);%0A%7D);%0A
+%0A/*%0A * Modal suit pickers:%0A */%0A%0A/*%0A * When you click on a suit image, it will display the cards associated with the suit and hide the old display.%0A */%0A(... |
55fc827b45bcee19b29bd1f732d6978632f43030 | Add alert command | lib/index.js | lib/index.js | define(['require', 'exports', './terminal', './env', './fs/index'], function(require, exports, terminal, env, fs) {
var Terminal = exports.Terminal = terminal.Terminal;
var Environment = exports.Environment = env.Environment;
var Filesystem = exports.Filesystem = fs.Filesystem;
exports.Machine = (function() {
f... | JavaScript | 0.000026 | @@ -1685,32 +1685,334 @@
%09%09%7D%0A%09%09%09%09%09%09%09%09%09%7D,%0A
+%09%09%09%09%09%09%09%09%09alert: %7B%0A%09%09%09%09%09%09%09%09%09%09executable: true,%0A%09%09%09%09%09%09%09%09%09%09command: %7B%0A%09%09%09%09%09%09%09%09%09%09%09exec: function(args, context) %7B%0A%09%09%09%09%09%09%09%09%09%09%09%09if(arg... |
d81ddccf6f38c9e8e7545d8fd892faa37bc6eeb5 | Update Invitation Service's updateInvitation method to return the result | lib/invitations.js | lib/invitations.js | var async = require('async'),
crypto = require('crypto'),
pg = require('pg'),
config = require('../config'),
INVITATIONS = 'SELECT * FROM invitations ORDER BY id',
INVITATION_BY_ID = 'SELECT * FROM invitations WHERE id=$1 LIMIT 1',
INVITATION_GUESTS = 'SELECT * FROM guests WHERE in... | JavaScript | 0 | @@ -2582,32 +2582,44 @@
%5Bid%5D, function (
+err, results
) %7B%0A
@@ -2646,38 +2646,48 @@
callback
-.apply(null, arguments
+(err, results && results.rows%5B0%5D
);%0A
|
2a16ebd43ac451e4dff7a4f9cedfddfa2ef971e2 | remove test code | lib/jobs/create.js | lib/jobs/create.js | 'use strict';
var method = require('./../method');
var assign = require('lodash.assign');
var path = require('path');
var os = require('os');
var fs = require('fs');
var AdmZip = require('adm-zip');
/**
* @memberof jobs
* @method create
* @description Create a new Paperspace job.
* @param {object} params - Job cr... | JavaScript | 0.000873 | @@ -2596,16 +2596,19 @@
CK IN:%0A%09
+//
cwd = '/
|
914fd59719b4480d2b3b46b2c3f52c098667f0c5 | Fix null value | lib/protocol/endpoint.js | lib/protocol/endpoint.js | "use strict";
const EventEmitter = require("events");
const noop = () => {};
const noopLogger = {
fatal: noop,
error: noop,
warn : noop,
info : noop,
debug: noop,
trace: noop,
child: function() { return this; }
};
const CLIENT_PRELUDE = Buffer.from("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n");
module.exports ... | JavaScript | 0.000176 | @@ -3352,16 +3352,55 @@
if (
+this._lastSuccessPingedTime != null &&
(Date.no
@@ -3436,16 +3436,21 @@
Time) %3E
+this.
_PingedT
@@ -3645,16 +3645,17 @@
te.now()
+;
%7D);%0A
|
d808a3f88a6eb69719351cab2f5d47456b321df9 | update default colors | public/js/likes.js | public/js/likes.js | /* globals define, app, ajaxify, bootbox, socket, templates, utils */
$(document).ready(function () {
'use strict';
require([
'translator'
], function (translator) {
var events = {
'event:voted' : likesDidUpdate,
'posts.upvote': likeDidChange,
... | JavaScript | 0.000001 | @@ -635,13 +635,13 @@
('#9
-e9e9e
+E9E9E
'),
@@ -666,13 +666,13 @@
r('#
-ff000
+4CAF5
0'),
@@ -5493,8 +5493,9 @@
%7D);%0A%7D);
+%0A
|
2e075f5cc86f883f179003d543a321787f1c9971 | Update prefs.js | public/js/prefs.js | public/js/prefs.js | window.prefs = {};
$(document).ready(function() {
window.api.get("prefs/get/name-subj", function(data) {
var btnTrue = data.val;
if(btnTrue == "1") {
$("prefs-hwView-swap").prop("checked", true);
}
$("#prefs-hwView-swap").change(function() {
if(btnTrue == "1") {
btnTrue = "0";
... | JavaScript | 0.000001 | @@ -456,16 +456,241 @@
%7D);%0A
+ alert(%22buttonstuff!%22);%0A %7D);%0A $(%22#usr-btn%22).click(function() %7B%0A var usrname = $(%22#usr-name%22).val();%0A window.api.post(%22prefs/setName%22, %7B name: %22#%7Busrname%7D%22 %7D, function() %7B%0A alert(%22maybe this worked!%22);%0A %7D);%0A
... |
71f24279ef1a2f852735cbc9522cdfcce17eb725 | remove duplicate | lib/index.js | lib/index.js | 'use strict';
var _ = require('lodash');
// Tasks
//
// require('./tasks/docs/browserSync.js');
// require('./tasks/docs/clean.js');
// require('./tasks/docs/copy.js');
// require('./tasks/docs/deploy.js');
// require('./tasks/docs/ngdocs.js');
// require('./tasks/docs/readme.js');
// require('./tasks/docs/resolveDoc... | JavaScript | 0.004769 | @@ -1883,59 +1883,8 @@
);%0A%0A
- require('./tasks/docs/clean.js')(gulp, config);%0A%0A
re
|
7f61b5dca20864208fbcaad669423446a6164137 | Add year-parser test case | db/test/unit/tdsystem/year-parser.spec.js | db/test/unit/tdsystem/year-parser.spec.js | 'use strict';
var client = require('cheerio-httpcli');
var parser = require('../../../js/tdsystem/year-parser');
var util = require('../../../js/swimtrack-util');
var testUrl = 'http://www.tdsystem.co.jp/i2015.htm';
describe('Test 2015 top page', function() {
it('should find a right meet and venue from a given meet n... | JavaScript | 0.000041 | @@ -365,21 +365,8 @@
Url,
- 'Shift_JIS',
fun
@@ -474,16 +474,58 @@
.meets;%0A
+ expect(meets.length).toEqual(198);%0A%0A
le
|
dde71cf4893ce6503370a8e018697c4b3d010261 | Use local version of async-each | lib/index.js | lib/index.js |
/**
* Module dependencies
*/
var LZString = require('./vendor/lz-string');
var Promise = require('promise');
var map = require('map');
var each = require('each');
var type = require('type');
// bug, see: https://github.com/paulmillr/async-each/issues/2
require('async-each');
var asyncEach = wind... | JavaScript | 0 | @@ -211,71 +211,24 @@
');%0A
-%0A// bug, see: https://github.com/paulmillr/
+var
async
--each/issues/2%0A
+Each =
requ
@@ -249,42 +249,8 @@
h');
-%0Avar asyncEach = window.asyncEach;
%0A%0A/*
|
5da7fca1ad5ac8541c282d0c2cc7c3b288bbf933 | fix registration logic | AdapterResolver.js | AdapterResolver.js | (function (define) {
define(function () {
"use strict";
var adapters;
adapters = {};
/**
* Finds an adapter for the given object and the role.
* This is overly simplistic for now. We can replace this
* resolver later.
* @param object {Object}
* @param type {String}
* @description Loops through all Ada... | JavaScript | 0.000001 | @@ -819,16 +819,17 @@
%0A%09%09if (!
+(
type in
@@ -837,16 +837,17 @@
dapters)
+)
adapter
|
b926723724dfdd4563ca31b7abfaa16943a2e507 | read api key from environment | server/routes/spotsHW.js | server/routes/spotsHW.js | var express = require('express');
var uuid = require('uuid');
var router = express.Router();
var SPOTS_API_KEY;
if(process.env.BUILD == 'development') {
SPOTS_API_KEY = '1234';
} else {
SPOTS_API_KEY = uuid();
}
console.log("Using SPOTS_API_KEY = %s", SPOTS_API_KEY)
router.post('/update/:key/:lotID/:spotID/:vacan... | JavaScript | 0 | @@ -108,13 +108,11 @@
_KEY
-;%0Aif(
+ =
proc
@@ -123,96 +123,22 @@
env.
-BUILD == 'development') %7B%0A SPOTS_API_KEY = '1234';%0A%7D else %7B%0A SPOTS_API_KEY = uuid();%0A%7D
+SPOTS_API_KEY;
%0Acon
|
370e4f4b2d9c7c7449389f3d47c5d985af8ee4b9 | add event for left arrow | Animals/js/main.js | Animals/js/main.js | //create a new Game instance
//set the game dimensions and set the Phaser.AUTO (OpenGL or Canvas)
var game = new Phaser.Game(640, 360, Phaser.AUTO);
//create a game state (this contains the logic of the game)
var GameState = {
//assets are loaded in this function
preload: function(){
//load ... | JavaScript | 0.000001 | @@ -2161,32 +2161,335 @@
n: 1%7D;%0A %0A
+ this.leftArrow.inputEnabled = true;//enable input%0A this.leftArrow.input.pixelPerfectClick = true;//this will the clickable area to shape of the sprite and not a regular rectangle%0A this.leftArrow.events.onInputDown.add(this.changeAnimal, this);/... |
4ef671e04c87c671bc6c9950cd5e5334553c906d | Fix syntax error according to eslint | modules/core/client/app/init.js | modules/core/client/app/init.js | 'use strict';
//Start by defining the main module and adding the module dependencies
angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies);
// Setting HTML5 Location Mode
angular.module(ApplicationConfiguration.applicationModuleName).config(['$loc... | JavaScript | 0.000675 | @@ -1602,17 +1602,16 @@
%0A if(
-
(fromSta
@@ -1788,17 +1788,16 @@
signin')
-
) %7B%0A
@@ -1986,17 +1986,16 @@
up again
-
%0A s
|
31e4bddbca6b5e50a4958a956a48bdbf61045086 | Fix lint errors | lib/index.js | lib/index.js | // TODO: ES2015 maybe, baby?
var rollup = require('rollup');
var babel = require('rollup-plugin-babel');
var camelCase = require('camel-case');
var pkg = require('./package.json');
var name = pkg.name;
var moduleName = 'ReactLibStarterkit';
var formats = ['es6', 'cjs', 'umd'];
module.exports = function(options) {
... | JavaScript | 0 | @@ -143,106 +143,8 @@
);%0A%0A
-var pkg = require('./package.json');%0Avar name = pkg.name;%0Avar moduleName = 'ReactLibStarterkit';%0A%0A
var
@@ -202,16 +202,26 @@
function
+ rollupLib
(options
@@ -230,107 +230,108 @@
%7B%0A
-// TODO: Hmm, a voice in my head says we shouldn't modify arguments%0A options = opt... |
6fb41f60c91166c9f72e3f32ac78dafa617bf5a8 | allow remote connections for socket | server/static/js/main.js | server/static/js/main.js | $(document).ready(function(){
var ws = new WebSocket('ws://127.0.0.1:9010');
ws.onopen = function(){
enableKeys();
$('#socket-status').removeClass('label-default label-success label-danger')
.addClass('label-success')
.text('online');
};
ws.onerror = function(){
... | JavaScript | 0 | @@ -61,17 +61,40 @@
s://
-127.0.0.1
+' + window.location.hostname + '
:901
|
ca055ec16fc2871e28cc9b8f2b0c9fc443e0f9b5 | Fix typo | modules/ext.thanks.corethank.js | modules/ext.thanks.corethank.js | ( function () {
'use strict';
function reloadThankedState() {
$( 'a.mw-thanks-thank-link' ).each( function ( idx, el ) {
var $thankLink = $( el );
if ( mw.thanks.thanked.contains( $thankLink ) ) {
$thankLink.before( mw.message( 'thanks-thanked', mw.user, $thankLink.data( 'recipient-gender' ) ).escaped() ... | JavaScript | 0.000001 | @@ -1650,16 +1650,17 @@
or occur
+r
ed, enab
|
035b23de64769966fc68e28f752311b40f0f11a0 | Flairs should be lowercase | modules/flair/DestinyTheGame.js | modules/flair/DestinyTheGame.js | const base = require( './base.js' );
module.exports = Object.assign( {}, base, {
isDev: function isDev ( user ) {
if ( !user[ this.type ] ) {
return false;
}
for ( const flairString of this.list ) {
if ( user[ this.type ].includes( flairString ) ) {
... | JavaScript | 0.999999 | @@ -405,17 +405,17 @@
'
-V
+v
erified-
Bung
@@ -414,16 +414,16 @@
ied-
-B
+b
ungie-
-E
+e
mplo
|
94abbde4e9a58168089cb802c84f621420e5a2fa | Fix emit name | lib/index.js | lib/index.js | 'use strict';
var rump = module.exports = require('rump');
var configs = require('./configs');
var originalAddGulpTasks = rump.addGulpTasks;
// TODO remove on next major core update
rump.addGulpTasks = function(options) {
originalAddGulpTasks(options);
require('./gulp');
return rump;
};
rump.on('update:main', ... | JavaScript | 0.000007 | @@ -373,20 +373,16 @@
e:server
-:dev
');%0A%7D);%0A
@@ -472,12 +472,8 @@
rver
-:dev
', o
|
69c04f13abf149f929c9c248e123cadb3e5b35c2 | Update elite flairs | modules/flair/EliteDangerous.js | modules/flair/EliteDangerous.js | module.exports = {
getFlairs: function getFlairs () {
return this.list;
},
list: [
'bot img',
'cmdr img alliance',
'cmdr img cobra',
'cmdr img empire',
'cmdr img federation',
'cmdr img sidey',
'cmdr img skull',
'cmdr img viper',
... | JavaScript | 0 | @@ -138,177 +138,750 @@
mg a
-lliance',%0A 'cmdr img cobra',%0A 'cmdr img empire',%0A 'cmdr img federation',%0A 'cmdr img sidey',%0A 'cmdr img skull',%0A 'cmdr img viper
+duval',%0A 'cmdr img alduval',%0A 'cmdr img alliance',%0A 'cmdr img antal',%0A ... |
941049a2cabb292f189a4496589eac834a5cf68f | Improve documentation | panopticon.js | panopticon.js | /*
Example schema:
var personSchema = mongoose.Schema({
name: String,
email: String,
pets: [{
name: String
}]
});
var pn = require('panopticon');
var rules = {
'name': function(newValue) {
this // the document at the point of post-save
},
'email': {
'surname': function() {
... | JavaScript | 0.000004 | @@ -1981,110 +1981,68 @@
*
- %3CdiffItem%3E - array representing diff of item. %0A * - Length 1 is addition %5Bnew%5D
+%0A * Returns the new value of a document property
%0A
@@ -2044,32 +2044,33 @@
y%0A *
+%0A
- Le
@@ -2069,100 +2069,86 @@
-- Le... |
6451a9eb19509cd1335bd7accd58175cac30edee | load simple keyboard by default | addons/point_of_sale/static/src/js/keyboard.js | addons/point_of_sale/static/src/js/keyboard.js | openerp.point_of_sale.load_keyboard = function load_keyboard(instance, module){ //module is instance.point_of_sale
"use strict";
// ---------- OnScreen Keyboard Widget ----------
// A Widget that displays an onscreen keyboard.
// There are two options when creating the widget :
//
// * 'ke... | JavaScript | 0.000004 | @@ -342,17 +342,8 @@
le'
-%7C 'full'
(def
@@ -347,16 +347,25 @@
default)
+ %7C 'full'
%0A //
@@ -1051,20 +1051,22 @@
del %7C%7C '
-full
+simple
';%0A
|
12643745c29f46b214074383b2bd8c3a22b9b8ae | fix bug in usaa scrape/example | service/examples/usaa.js | service/examples/usaa.js | var Nightmare = require('nightmare');
var nightmare = Nightmare({ show: false, frame: false });
var path = require('path');
var getPrivateInfo = require('./getPrivateInfo').usaa;
nightmare
.goto('https://mobile.usaa.com/inet/ent_logon/Logon?acf=1')
.click('#logOnButton a')
.type('input#input_onlineid', getPrivat... | JavaScript | 0 | @@ -802,16 +802,30 @@
r(result
+.toLowerCase()
))%0A
|
183654150e87967e8d94a93fb39157061b5a970d | remove alert | PlatformProject.AdminConsole/app/Controllers/TenantController.js | PlatformProject.AdminConsole/app/Controllers/TenantController.js | angular.module('admin').controller('tenantController', ['$scope', '$window', 'TenantService', 'SharedServices', function ($scope, $window, TenantService, SharedServices)
{
$scope.isFormMode = false;
$scope.isEdit = false;
loadRecords();
//Function to load all Tenant records
function loadRecords() ... | JavaScript | 0.000001 | @@ -496,36 +496,8 @@
ta;%0A
- alert(pl.data);%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.