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 |
|---|---|---|---|---|---|---|---|
294a9e925d70aef06e21441dfec03a57346d219e | add infra catalog | src/components/NaviMenu/ChildrenMenu/Catalog.js | src/components/NaviMenu/ChildrenMenu/Catalog.js | /*
*
* NaviMenu
*
*/
import React, { useState } from 'react'
// import T from 'prop-types'
import { buildLog } from '@utils'
import { ICON_CMD } from '@config'
import { SpaceGrow } from '@components/BaseStyled'
import ChildrenItems from './ChildrenItems'
import { Wrapper, Item, Icon } from '../styles/children_... | JavaScript | 0.000001 | @@ -1242,32 +1242,444 @@
.svg%60,%0A %7D,%0A %7B%0A
+ id: '108',%0A title: '%E5%9F%BA%E7%A1%80%E8%AE%BE%E6%96%BD',%0A icon: %60$%7BICON_CMD%7D/navi_fire.svg%60,%0A children: %5B%0A %7B%0A id: '101',%0A title: '%E5%85%A8%E9%83%A8',%0A icon: %60$%7BICON_CMD%7D/navi_china.svg%60,%0... |
0aa076f79988be8029a9c2d008156f91194935a4 | Update index.js | js/index.js | js/index.js | $.getJSON("assets/english.json", function(data){
var treasures = data.treasures;
$(document).ready(function(){
for (var treasure in treasures)
{
console.log(treasure);
opt = $('<option/>', {value: treasure.id, text: treasure.name});
$('#select-item').append(opt);
}
});
});
| JavaScript | 0.000002 | @@ -121,24 +121,17 @@
or (var
-treasure
+i
in trea
@@ -147,37 +147,8 @@
%7B%0A
- console.log(treasure);%0A
@@ -186,16 +186,20 @@
treasure
+s%5Bi%5D
.id, tex
@@ -209,16 +209,20 @@
treasure
+s%5Bi%5D
.name%7D);
|
2885d4b1a03b2ee9feee603cde947ba66abea734 | add more error handling to handlebars task | lib/tasks/handlebars.js | lib/tasks/handlebars.js | "use strict";
var assemble = require('assemble');
var runSequence = require('run-sequence').use(assemble);
var extname = require('gulp-extname');
var controller = require('../assemble/plugins/controller.js');
var errorHandler = require('../assemble/plugins/error');
var livereload = require('gulp-livereload');
var task... | JavaScript | 0 | @@ -1230,16 +1230,59 @@
name())%0A
+ .on('error', errorHandler)%0A
@@ -1348,33 +1348,119 @@
.
-pipe(controller.collect()
+on('error', errorHandler)%0A .pipe(controller.collect())%0A .on('error', errorHandler
);%0A
|
dfac3e5ee543f2a7e3e033672a589aa49e1569ba | remove redundant comment | src/openlmis-form/openlmis-datepicker.directive.js | src/openlmis-form/openlmis-datepicker.directive.js | /*
* This program is part of the OpenLMIS logistics management information system platform software.
* Copyright © 2017 VillageReach
*
* This program is free software: you can redistribute it and/or modify it under the terms
* of the GNU Affero General Public License as published by the Free Software Foundation, e... | JavaScript | 0.000002 | @@ -3468,110 +3468,8 @@
) %7B%0A
- // Necessary if scope.value changed, angular.copy will prevent from digest dateString%0A
|
812bc271cde30433b6beb23b7430c6ccd2b5dd09 | fix edit task title bug | public/javascripts/angular/controllers.js | public/javascripts/angular/controllers.js | Array.remove = function(array, from, to) {
var rest = array.slice((to || from) + 1 || array.length);
array.length = from < 0 ? array.length + from : from;
return array.push.apply(array, rest);
};
function findArrayIndex(array, id){
var index = -1;
var len = array.length;
for(var i=0; i<len; i++){
if (i... | JavaScript | 0.000001 | @@ -6236,35 +6236,8 @@
le;%0A
- alert($scope.title);%0A
@@ -6545,11 +6545,8 @@
ope.
-old
titl
|
843141c6c8690dcc48c2067cc52f0e63ad136b44 | make correct hashIntPair + add unhash | core/hashNumberPair.js | core/hashNumberPair.js | 'use strict';
// http://stackoverflow.com/a/13871379
export function hashUIntPair(a, b) {
return a >= b ? a * a + a + b : a + b * b;
}
export function hashIntPair(a, b) {
var A = (a >= 0 ? 2 * a : -2 * a - 1);
var B = (b >= 0 ? 2 * b : -2 * b - 1);
var C = ((A >= B ? A * A + A + B : A + B * B) / 2);
return ... | JavaScript | 0.000171 | @@ -97,17 +97,20 @@
urn
+(
a %3E= b
+)
?
+(
a *
@@ -122,21 +122,276 @@
+ b
+)
:
-a + b * b;
+(b * b + a);%0A%7D%0A%0Aexport function unhashUIntPair(n) %7B%0A let x = Math.sqrt(n) %7C 0; // x = a %3C b ? b : a%0A let r = n - x * x; // r = a %3C b ? a : a+b%0A if (r %3C x) %7B // r = a, x = b, a %3... |
1c99de43fbb279e844f3e3da3508b1e44ebeb54e | Remove enableAgent config | lib/config/config.js | lib/config/config.js | /**
* default config
*/
module.exports = {
port: 8360, // server port
// host: '127.0.0.1', // server host
workers: 0, // server workers num, if value is 0 then get cpus num
stickyCluster: false, // sticky cluster
createServer: undefined, // create server function
startServerTimeout: 3000, // before start... | JavaScript | 0.000001 | @@ -623,53 +623,8 @@
10s%0A
- enableAgent: false, // enable agent worker%0A
js
|
abf86fcceb17cd308c1c6c6a6751bbe86cd28d17 | Move add and remove layer into functions | lib/tileLayerManager.js | lib/tileLayerManager.js | 'use strict';
var EventEmitter = require('events').EventEmitter
var moment = require('moment')
var assert = require('assert')
function nowIsWithin(on, off) {
if (!on || !off) return false
on = on.split(':')
off = off.split(':')
var now = moment()
var start = moment()
start.hour(on[0])
star... | JavaScript | 0 | @@ -798,141 +798,129 @@
-//if theres some reason to add a layer%0A //either theres no time set%0A //or theres time set and time matches now%0A
+this.removeLayer(key)%0A %7D else %7B%0A this.addLayer(key)%0A %7D%0A %7D, this)%0A %7D%0A%0A removeLayer(layerName) %7B%0A
-... |
8c7dc9e602cc3730a4ca5d6ff3c7200ef5540a5f | Add update Patient selector query for patient history | src/selectors/patient.js | src/selectors/patient.js | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
import { UIDatabase } from '../database';
import { sortDataBy } from '../utilities';
export const selectPatientHistory = ({ patient }) => {
const { currentPatient } = patient;
const { transactions } = currentPatient;
// Create a query string `tr... | JavaScript | 0 | @@ -444,16 +444,20 @@
tring =
+%60($%7B
transact
@@ -460,16 +460,21 @@
sactions
+%0A
.map((%7B
@@ -510,16 +510,21 @@
$%7Bid%7D%22%60)
+%0A
.join('
@@ -528,16 +528,41 @@
(' OR ')
+%7D) AND type != %22cash_in%22%60
;%0A retu
|
80d4630fcc293ddbf0600a3f96cd9584394d7bdf | check mqtt.retain env var bolean value | lib/configService.js | lib/configService.js | /*
* Copyright 2016 Telefonica Investigación y Desarrollo, S.A.U
*
* This file is part of iotagent-json
*
* iotagent-json is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the L... | JavaScript | 0.000005 | @@ -2762,16 +2762,26 @@
T_RETAIN
+ == 'true'
;%0A %7D%0A
|
15a6346f784d0689faff54e417c61259293f1b95 | Put back the general "require from node_modules" case | lib/index.js | lib/index.js | /**
* Module dependencies
*/
var generate = require('./generate');
var path = require('path');
var reportback = require('reportback')();
/**
* Generate module(s)
*
* @param {Object} scope [description]
* @param {Function} cb [description]
* @return {[type]} [description]
*/
module.exports = f... | JavaScript | 0.000162 | @@ -1413,16 +1413,173 @@
do ...%0A%0A
+ // Try requiring from node_modules%0A try %7B%0A Generator = require(module);%0A %7D catch (e) %7B%0A requireError = throwIfModuleNotFoundError(e, module);%0A %7D%0A%0A
// Try
|
b2746b539affb1efe39a9a3737760bf9f77d23b0 | Fix bugs in SerialConnection. | src/serial-connection.js | src/serial-connection.js | /*! resol-vbus | Copyright (c) 2013-2014, Daniel Wippermann | MIT license */
'use strict';
var _ = require('lodash');
var Q = require('q');
var serialport;
try {
serialport = require('serialport');
} catch (ex) {
// eat it
}
var Connection = require('./connection');
var optionKeys = [
'path',
];
... | JavaScript | 0 | @@ -1199,15 +1199,13 @@
ort.
-destroy
+close
();%0A
@@ -3401,107 +3401,474 @@
-this.on('data', onConnectionData);%0A%0A var serialPort = new serialport.SerialPort(this.path
+var onConnectionEstablished = function() %7B%0A _this.reconnectTimeout = 0;%0A%0A _this._setConnectionState(S... |
e451bdc36f0ff58345eecd6d1aab6aeeaec2b933 | fix ^^ | src/core/fontmetrics.js | src/core/fontmetrics.js | /**
This library rewrites the Canvas2D "measureText" function
so that it returns a more complete metrics object.
This library is licensed under the MIT (Expat) license,
the text for which is included below.
** -----------------------------------------------------------------------------
CHANGELOG:
2012... | JavaScript | 0.000001 | @@ -1904,18 +1904,16 @@
;'%0A %7D;%0A
-
%0A funct
@@ -1927,11 +1927,11 @@
apeH
-tml
+TML
(st
|
7db7e5a594381ac6f2744b99652177fa0b5c60fb | use new valuesForSaving method | lib/index.js | lib/index.js | var Mobware = require('mobware2'),
_ = require('lodash'),
pkginfo = require('pkginfo')(module),
pkginfo = module.exports,
MongoDB = require('mongodb'),
MongoClient = MongoDB.MongoClient,
ObjectID = MongoDB.ObjectID;
exports = module.exports = Connector;
// --------- Mongo DB connector -------
function Connecto... | JavaScript | 0 | @@ -2183,19 +2183,18 @@
lues
-(false,true
+ForSaving(
),%0A%09
@@ -2493,18 +2493,18 @@
lues
-(true,true
+ForSaving(
),%0A%09
|
618b4e378e290fe73db0af76c2b4409ad51b2c23 | Reposition logic for video | app/assets/javascripts/lentil/addfancybox.js | app/assets/javascripts/lentil/addfancybox.js | var FancyBoxCloseFunctionState = {
// object literal for tracking important
// state information so we know
// how to change the url in response
// to user actions such as
// dismissing fancybox from clicking or using back button
popcalled: false,
fancyboxvisible: false,
pathname: windo... | JavaScript | 0 | @@ -3666,16 +3666,170 @@
deo%3E');%0A
+%09%09%09%09var vid = $(%22.fancybox-inner%22).children(%22video%22)%5B0%5D;%0A%09%09%09%09vid.oncanplay = function() %7B%0A%09%09%09%09%09console.log(%22Ready!%22);%0A%09%09%09%09%09$.fancybox.reposition();%0A%09%09%09%09%7D%0A
%09%09%09%09//re
|
e3bdb412bf5338da9161caa9cca400509a7b7fbd | Add CustomerRequisition pageInfoColumns | src/pages/dataTableUtilities/getPageInfoColumns.js | src/pages/dataTableUtilities/getPageInfoColumns.js | /* eslint-disable dot-notation */
/**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2016
*/
import { pageInfoStrings, programStrings } from '../../localization';
import { formatDate } from '../../utilities';
import { MODAL_KEYS } from '../../utilities/getModalTitle';
/**
* PageInfo rows/columns for use with ... | JavaScript | 0 | @@ -1380,23 +1380,24 @@
arty', '
-program
+editable
MonthsTo
@@ -1564,16 +1564,110 @@
ent'%5D%5D,%0A
+ customerRequisition: %5B%5B'monthsToSupply', 'entryDate'%5D, %5B'customer', 'requisitionComment'%5D%5D,%0A
%7D;%0A%0Acons
@@ -3373,17 +3373,25 @@
%0A %7D,%0A
-m
+editableM
onthsToS
@@ -3734,16 +3734,9 @@
,%... |
ba1675b7c3a9025190b03feefa5f24878f865653 | Move poweroff and reboot to index.js | js/index.js | js/index.js | // Copyright 2014-2015 runtime.js project authors
//
// 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.000001 | @@ -1440,110 +1440,303 @@
);%0A%0A
-// Builtin shell commands%0Arequire('./shell/clear');%0Arequire('./shell/echo');%0Arequire('./shell/power');
+runtime.shell.setCommand('poweroff', function(args, env, cb) %7B%0A env.stdio.writeLine('Going down, now!');%0A runtime.machine.shutdown();%0A cb(0);%0A%7D);%0A%0Aruntime... |
9a747852c87f706cc53c7a9128c28d4e6643ee13 | Transform arguments to array | src/ggrc/assets/javascripts/models/mixins.js | src/ggrc/assets/javascripts/models/mixins.js | /*!
Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
Created By: brad@reciprocitylabs.com
Maintained By: brad@reciprocitylabs.com
*/
(function (can) {
can.Construct('can.Model.Mixin', {
extend... | JavaScript | 0.001051 | @@ -5585,16 +5585,56 @@
t = %7B%7D;%0A
+ var relatedObjectsDeferreds = %5B%5D;%0A
va
@@ -5799,48 +5799,8 @@
);%0A%0A
- var relatedObjectsDeferreds = %5B%5D;%0A
@@ -5866,32 +5866,42 @@
%0A _.each(
+_.toArray(
arguments, funct
@@ -5885,32 +5885,33 @@
oArray(arguments
+)
, function (map... |
7fa2cee42d2d3935bbe0120ebf3c8a4c20b44f94 | Fix .native | src/modules/app/controls/OrbitControlsModule.js | src/modules/app/controls/OrbitControlsModule.js | import {Vector3} from 'three';
import {ControlsModule} from '../ControlsModule';
import {ThreeOrbitControls} from './lib/ThreeOrbitControls';
export class OrbitControlsModule extends ControlsModule {
constructor(params = {}, patchEvents = true) {
super(params, patchEvents);
this.params = Object.assign({
... | JavaScript | 0.000068 | @@ -489,24 +489,31 @@
arams.object
+.native
%0A : man
|
04161b13c9718620afc31f0fde5410d1fc3ca923 | Fix FIXME | scripts/pageContent.js | scripts/pageContent.js | 'use strict';
const VideoViewer = window.VideoViewer = (function () {
const self = {};
const videoviewer = $('.videoviewer')[0];
const video = $(videoviewer).find('video')[0];
self.hide = () => {
$(video).find('source').remove();
video.pause();
videoviewer.dataset.show = 'false';
};
self.show... | JavaScript | 0.000002 | @@ -2743,16 +2743,128 @@
dered);%0A
+ if ($('main')%5B0%5D.children.length %3C 6) %7B%0A $('section.loading')%5B0%5D.innerHTML = i18n.noMoreContent;%0A %7D%0A
%7D, 'js
@@ -3460,73 +3460,8 @@
) %7B%0A
- // FIXME this doesn't trigger when content %3C page height%0A
|
9f54ddf575b873fd7c15ff4ee56afc189a409fb7 | Update app_test.js | gr-socket-server/app_test.js | gr-socket-server/app_test.js | var assert = require('assert')
, http = require('http')
, greenroom = require('./app')
, callbackFired = false;
greenroom.server.listen(80);
http
.cat('http://localhost')
.addCallback(function(data) {
callbackFired = true;
//assert.equal('hello world', data);
greenroom.server.close();
console.wr... | JavaScript | 0.000004 | @@ -55,25 +55,19 @@
p')%0A ,
-greenroom
+app
= requi
@@ -271,25 +271,19 @@
a);%0A
-greenroom
+app
.server.
@@ -392,8 +392,9 @@
ed);%0A%7D);
+%0A
|
383d6a577a74629851e08ab8b2a8e229a60e5375 | check latest version | packages/cli/src/bin/flint.js | packages/cli/src/bin/flint.js | #!/usr/bin/env node
var Program = require('commander')
var colors = require('colors')
/* START -- make `flint run` default command -- */
var flintIndex = getFlintIndex()
// find where index of flint is
function getFlintIndex() {
let index = 0
for (let arg of process.argv) {
if (arg.indexOf('flint') > 0) retu... | JavaScript | 0 | @@ -795,24 +795,31 @@
m view flint
+@latest
version -lo
|
4cb406caf4795da5026a891922a56904eb78b9df | Fix $.ajax().success() for jQuery 3.0 | app/assets/javascripts/subdivision_select.js | app/assets/javascripts/subdivision_select.js | var SubdivisionSelect = (function() {
SubdivisionSelect.subdivisionSelector = "select[data-subdivision-selector]";
SubdivisionSelect.countrySelector = "select[id$=country]";
function SubdivisionSelect(element) {
this._countrySelect = element;
this._subdivisionSelect = $(element).
closest("form").
... | JavaScript | 0 | @@ -801,15 +801,12 @@
%7D).
-success
+done
(fun
|
69d0a311b6d9124c1b17a8077d56efb02d9c2892 | Update scrollbar.js | drawing/scrollbar.js | drawing/scrollbar.js | var isInScrollBar = function(canvas, context, x, y){
var height = 400;
var width = 30;
var distanceFromTop = 100;
return x > canvas.width - width && y > distanceFromTop && y < distanceFromTop + height;
}
var getScrollPositionFromScrollBar = function(canvas, context, y, maxScroll){
var height = 400;
var width =... | JavaScript | 0.000001 | @@ -1941,17 +1941,17 @@
%22bold 1
-0
+2
px Arial
|
f973a2dfbf7d5cf5dd4d1f6059016b1bbb69899e | add RAF polypill to utils index | src/core/utils/index.js | src/core/utils/index.js | var CONST = require('../const');
/**
* @namespace PIXI.utils
*/
var utils = module.exports = {
_uid: 0,
_saidHello: false,
Ticker: require('./Ticker'),
EventData: require('./EventData'),
eventTarget: require('./eventTarget'),
pluginTarget: require('./pluginTarget'),
Pol... | JavaScript | 0 | @@ -128,16 +128,80 @@
false,%0A%0A
+ RAFramePolyfill:require('./requestAnimationFramePolyfill'),%0A
Tick
@@ -411,16 +411,17 @@
lyK'),%0A%0A
+%0A
/**%0A
|
ec720c304062672d859c1bcbe9270e94306239cd | fix metrics reporting of request size | lib/utilities/monitoringHandler.js | lib/utilities/monitoringHandler.js | const errors = require('arsenal');
const client = require('prom-client');
const collectDefaultMetrics = client.collectDefaultMetrics;
let crrStatsPulled = false;
const numberOfBuckets = new client.Gauge({
name: 'cloud_server_number_of_buckets',
help: 'Total number of buckets',
});
const numberOfObjects = new c... | JavaScript | 0 | @@ -2218,21 +2218,29 @@
observe(
-bytes
+newByteLength
);%0A
|
4265eef20198eb0b876d87de884dc261d9b6b61d | Rename delete method to remove | packages/dom/cookie/cookie.js | packages/dom/cookie/cookie.js | /**
* @module cookie
* @category DOM
*/
module.exports = (function () {
/**
* Creates a new cookie.
*
* @function set
* @param {String} name The name of the cookie to create.
* @param {String} value The value of the cookie to create.
* @param {Object} [options]
* @param {String} [options.path=... | JavaScript | 0.000001 | @@ -3107,84 +3107,8 @@
%7D%0A%0A
- if (typeof name === 'undefined') %7B%0A return document.cookie;%0A %7D%0A%0A
@@ -3363,21 +3363,21 @@
unction
-delet
+remov
e%0A * @
@@ -3532,21 +3532,21 @@
cookie.
-delet
+remov
e('foo')
@@ -3585,21 +3585,21 @@
unction
-delet
+remov
eCookie(
@@ -3834,21 +... |
5b5a166b7660ab49b16bebd59e2a4ff8452120dd | Convert images that are also in the base stylesheet. | lib/css-transform.js | lib/css-transform.js | const chokidar = require('chokidar')
const fs = require('fs')
const mimeType = require('mime')
const mkdirp = require('mkdirp')
const path = require('path')
const postcss = require('postcss')
const postcssNext = require('postcss-cssnext')
const postcssImport = require('postcss-import')
const postcssReporter = require('... | JavaScript | 0 | @@ -776,16 +776,48 @@
%7D),%0A
+ base64ify(process.cwd()),%0A
po
@@ -1679,86 +1679,8 @@
) %7B%0A
- const source = css.source.input.file%0A const dir = path.dirname(source)%0A
@@ -2048,16 +2048,102 @@
else %7B%0A
+ const source = css.source.input.file%0A const dir = path.dir... |
7d73da01fc77b61c8e0022fe512796622dd66720 | Simplify maxDate | app/client/views/activities/form/autoform.js | app/client/views/activities/form/autoform.js | import SlimSelect from 'slim-select';
import 'slim-select/dist/slimselect.min.css';
import flatpickr from "flatpickr";
import 'flatpickr/dist/flatpickr.min.css';
import moment from 'moment';
import { Finnish } from "flatpickr/dist/l10n/fi.js"
AutoForm.addHooks(['activityForm'], {
'onSuccess': function (formType) {
... | JavaScript | 0.999999 | @@ -1863,38 +1863,15 @@
te:
-moment().endOf('day').toDate()
+%22today%22
,%0A
|
bcbba9625a84ae494745c008e9725371fbbb93cc | fix icons | packages/icons/fa4/styled.es6 | packages/icons/fa4/styled.es6 | import { createComponent } from 'olymp-fela';
export default Wrapped =>
createComponent(
({ theme, color }) => ({
fill:
color === true
? theme.color
: typeof color === 'string' ? color : 'rgba(0, 0, 0, 0.85)',
}),
Wrapped,
[
'width',
'height',
'size... | JavaScript | 0.000001 | @@ -30,13 +30,13 @@
om '
-olymp
+react
-fel
@@ -95,30 +95,277 @@
(%7B
+%0A
theme,
- color %7D) =%3E (%7B
+%0A color,%0A width,%0A height,%0A size,%0A onClick,%0A margin,%0A marginLeft,%0A marginRight,%0A marginTop,%0A marginBottom,%0A %7D) =%3E (%7B%0A ... |
96d46c78aac8147038a1fb895849651a0ff5d702 | update console.logs for improper script usage | scripts/prepConsent.js | scripts/prepConsent.js | const fs = require('fs');
const path = require('path');
const syncCsvParse = require('csv-parse/lib/sync');
const _ = require('lodash');
const moment = require('moment');
// Check command line arguments
if (process.argv.length !== 3) {
console.log('Command line argument missing, aborting...');
console.log('');
... | JavaScript | 0 | @@ -342,103 +342,55 @@
ode
-tools/consent-teacher-moments.js tmp/PRIVATE_SENSITIVE_DATA/consent-teacher-moments/UserConsent
+scripts/prepConsent.js tmp/consented-latest-raw
.csv
|
edcc824c41ea8c99b375a725d252c769e36d9e2b | Remove zoomable prop; add zoomDisabled prop | autoHeightWebView/index.js | autoHeightWebView/index.js | 'use strict';
import React, { useState, useEffect, useRef, useImperativeHandle, forwardRef } from 'react';
import { StyleSheet, Platform, ViewPropTypes } from 'react-native';
import PropTypes from 'prop-types';
import { WebView } from 'react-native-webview';
import { reduceData, getWidth, isSizeChanged, shouldUpda... | JavaScript | 0.000001 | @@ -2932,20 +2932,24 @@
,%0A zoom
+Dis
able
+d
: PropTy
@@ -3302,26 +3302,8 @@
'*'%5D
-,%0A zoomable: true
%0A%7D;%0A
|
fbbad7cbb205afcc96e8718d8b9823d0d7ab49f7 | improve isGroupWithServices boolean | plugins/services/src/js/components/modals/ServiceDestroyModal.js | plugins/services/src/js/components/modals/ServiceDestroyModal.js | import { Confirm } from "reactjs-components";
import { routerShape } from "react-router";
import PureRender from "react-addons-pure-render-mixin";
import React, { PropTypes } from "react";
import { injectIntl, intlShape } from "react-intl";
import ModalHeading from "#SRC/js/components/modals/ModalHeading";
import Stri... | JavaScript | 0.000001 | @@ -2367,28 +2367,31 @@
vice) %7B%0A
-if (
+return
service inst
@@ -2445,54 +2445,8 @@
%3E 0
-) %7B%0A return true;%0A %7D%0A%0A return false
;%0A
|
68b32e891a08b3b24217f59493283e5891119a4b | Update github-toggle-expanders.user.js | github-toggle-expanders.user.js | github-toggle-expanders.user.js | // ==UserScript==
// @name GitHub Toggle Expanders
// @version 1.0.4
// @description A userscript that toggles all expanders when one expander is shift-clicked
// @license https://creativecommons.org/licenses/by-sa/4.0/
// @author Rob Garrison
// @namespace https://github.com/Mottie
// @include ... | JavaScript | 0 | @@ -939,16 +939,63 @@
_bucket
+.js-details-container, .release-timeline-tags
.js-deta
|
aa494b2e564b2f2b3ff8efb2a9112edef0d928ff | Add the fucking NewRelic key | newrelic.js | newrelic.js | /**
* New Relic agent configuration.
*
* See lib/config.defaults.js in the agent distribution for a more complete
* description of configuration variables and their potential values.
*/
exports.config = {
/**
* Array of application names.
*/
app_name : ['Segment'],
/**
* Your New Relic license key.
... | JavaScript | 0.000009 | @@ -203,16 +203,17 @@
fig = %7B%0A
+%0A
/**%0A
@@ -259,17 +259,16 @@
app_name
-
: %5B'Segm
@@ -274,16 +274,17 @@
ment'%5D,%0A
+%0A
/**%0A
@@ -337,31 +337,55 @@
_key
-
: '
-license key here
+3b27fea0ee497bbeb501cab516c9599f25fe942d
',%0A
+%0A
lo
@@ -393,13 +393,13 @@
ging
-
: %7B%0A
+%0A
@... |
4931e69a4fa2f5f28259218a8f14fb542e41f339 | remove log | lib/index.js | lib/index.js | var Readable = require('readable-stream').Readable;
/**
* Tests that two readable streams are equal.
*
* @param {Readable|Stream} readStream2
* @param {Readable|Stream} readStream2
* @param {Function(!Error, Boolean)} callback
*/
module.exports = function streamEqual(readStream1, readStream2, callback) {
read... | JavaScript | 0.000001 | @@ -2303,56 +2303,8 @@
) %7B%0A
- console.log('no data', stream.stream.id);%0A
|
cfb4e3f25bbe1579b96d30d81b7a82a5bcf6ce43 | Set reserved usernames | lib/api.js | lib/api.js | // /api endpoint and authentication.
var log = require('./log');
var pg = require('pg');
var configuration = require('./conf');
var pgConfig = configuration.pg;
pgConfig.pg = pg;
var EmailLogin = require('email-login');
var emailLogin = new EmailLogin({
db: new EmailLogin.PgDb(pgConfig),
mailer: configuration.mail... | JavaScript | 0.000001 | @@ -562,16 +562,27 @@
res) %7B%0A
+ if (err) %7B
log.err
@@ -589,16 +589,18 @@
or(err);
+ %7D
%0A res.s
@@ -634,12 +634,23 @@
res.
-end(
+json(%7Berrors: %5B
msg
@@ -666,114 +666,598 @@
nal
-server error%5Cn');%0A%7D%0A%0Afunction signup(req, res) %7B%0A var email = req.data.email;%0A var name = req.data.... |
a1f38851a9deafed8e8ef23b1fd1db9f200721db | Use event.which to get keycode | app/components/Fields/Group/NewBlockModal.js | app/components/Fields/Group/NewBlockModal.js | import React, { Component, PropTypes } from 'react';
import Input from 'components/Input';
import Button from 'components/Button';
import { slugify } from 'utils/helpers';
export default class NewBlockModal extends Component {
static propTypes = {
confirm: PropTypes.func.isRequired,
close: PropTypes.func,
... | JavaScript | 0.000001 | @@ -925,23 +925,20 @@
(e.
-key === 'Enter'
+which === 13
) th
|
d6dc1ffb0d21716a0afbc9de3de075b0e22b472d | Add find method to Collection. | fileshack/static/fileshack/js/collections.js | fileshack/static/fileshack/js/collections.js | /*
* Copyright (c) 2012 Peter Kuma
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish... | JavaScript | 0 | @@ -1337,16 +1337,200 @@
;%0A %7D,
+%0A %0A find: function(func) %7B%0A%09var view = null;%0A%09Object.each(this.views, function(v) %7B%0A%09 if (view) return; // Already found.%0A%09 if (func(v)) view = v;%0A%09%7D);%0A%09return view;%0A %7D,
%0A%0A ad
|
0dea69099014c0ebc0e624f1d651968259c372a6 | clear box timeout on rerender | src/RenderingMonitor.js | src/RenderingMonitor.js | import mobservable from 'mobservable';
import mobservableReact from 'mobservable-react';
const getCost = renderTime => {
switch(true) {
case renderTime < 25: return 'cheap';
case renderTime < 100: return 'acceptable';
default: return 'expensive'
}
};
export default class RenderingMonitor {
boxesLis... | JavaScript | 0 | @@ -1406,16 +1406,87 @@
+ if (box._timeout) clearTimeout(box._timeout);%0A box._timeout =
setTime
|
e40b4d799a2a4246dd870379124c1c8a5a3b00f3 | save view in local storage if possible | js/index.js | js/index.js | d3.layout = {};
window.minute = window.minute || {views:{}};
minute.dataFrom = null;
minute.lines = null;
minute.csv = null;
minute.view = 'basic';
minute.timeout = null;
minute.loadingDom = d3.select('#load').node();
minute.wrapDom = document.getElementById("keystrokes");
minute.gather = function(cb){
minute.loadin... | JavaScript | 0 | @@ -269,16 +269,180 @@
kes%22);%0A%0A
+minute.start = function()%7B%0A%09var view = window.localStorage === undefined ? 'basic' : (window.localStorage.getItem(%22view%22) %7C%7C 'basic');%0A%09minute.changeView(view);%0A%7D%0A%0A
minute.g
@@ -1646,9 +1646,85 @@
draw();%0A
-%7D
+%0A%09if(window.localStorage)%7B%0A%09... |
057b8cce2faa4f0528a68a6b71b265349294ce80 | allow for earlier versions of node | src/RunWrappers/Node.js | src/RunWrappers/Node.js | /**
* Wrapper to manage services via PM2
*/
var _ = require('lodash');
var path = require('path');
var pm2 = require('pm2');
var semver = require('semver');
require('colors');
function Runner() {
}
Runner.prototype.init = function(bosco, next) {
this.bosco = bosco;
pm2.connect(next);
}
Runner.prototype.disconne... | JavaScript | 0 | @@ -3380,16 +3380,17 @@
emver.gt
+e
(service
@@ -3408,12 +3408,11 @@
n, '
-0.12
+1.0
.0')
@@ -3507,16 +3507,164 @@
node');%0A
+ %7D else if(semver.gte(service.nodeVersion, '0.12.0')) %7B%0A nvmNodePath = path.join('/.nvm/versions/node/','v' + service.nodeVersion,'/bin/node');%0A
%7D else
@@ -3697,38 +3697,2... |
6ee34e1ced9e8d089d8ef21a7d04855e568f4b53 | Fix errors pointed out by JSCS from `gulpfile.js` | gulpfile.js | gulpfile.js | var fs = require('fs');
var path = require('path');
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')(); // Load all gulp plugins
// automatically and attach
// them to the `plugins` object
var runSequence... | JavaScript | 0.000001 | @@ -78,127 +78,33 @@
');%0A
-var plugins = require('gulp-load-plugins')(); // Load all gulp plugins%0A //
+%0A// Load all gulp plugins
aut
@@ -113,16 +113,19 @@
atically
+%0A//
and att
@@ -131,57 +131,8 @@
tach
-%0A //
th... |
d327f35f7f3d1ccaa1493e58eedfe03e8fe735dc | Fix exception | lib/web/routes/hooks.js | lib/web/routes/hooks.js | /*
* Copyright 2011 Rackspace
*
* 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... | JavaScript | 0.000264 | @@ -3588,22 +3588,44 @@
erged_by
-.login
+ ? pr.merged_by.login : null
;%0A //
@@ -4280,17 +4280,16 @@
n_one)%7B%0A
-%0A
|
5b2a834aa5b8f946862823b70d88974f6db6a12f | fix problem when permission is granted | notifyMe.js | notifyMe.js | typeof null
notifyMe = function() {
this.delayTime = 0;
this.appearTime = 10000;
this.iconUrl = "drawable/Logo256.png";
this.onClick;
this.requestPermission = function () {
if (!("Notification" in window)) {
alert("This browser does not support desktop notification");
}
// Otherwise, we need to ask the ... | JavaScript | 0.000007 | @@ -543,367 +543,14 @@
%09%09%09%09
-var notification;%0A%09%09%09%09%09if (this.iconUrl == null) %7B%0A%09%09%09%09%09%09notification = new Notification(displayString);%0A%09%09%09%09%09%7D else %7B%0A%09%09%09%09%09%09var options = %7B%0A%09%09%09%09%09%09%09%09icon: this.iconUrl%0A%09%09%09%09%09%09%7D%0A%09%09%09%... |
b3b6a9c0f7bac4f0a52c9715b596f93708b36f72 | update gulp release | gulpfile.js/tasks/release.js | gulpfile.js/tasks/release.js | 'use strict';
/**
* @param {Object} gulp The gulp object
* @param {Object} config The configuration for gulp tasks. To get a property using `config.a.b.c` or `config.get('a.b.c')`
* @param {Object} LL Lazy required libraries and other data
* @param {Object} args The parsed arguments from commen... | JavaScript | 0 | @@ -3307,48 +3307,273 @@
var
-command = util.format('git add %25s
+packageJSON = LL.reload('packageJSON');%0A var tag = packageJSON.version;%0A var command = util.format('%5C%0A git add %25s && %5C%0A git commit -m %22update version to %25s%22 --no-e... |
70b7deab7e772fbedd65d22781fee81fd98b5955 | Update build script to include shadow | create_build_script.js | create_build_script.js | var fs = require('fs'),
execSync = require('execSync').exec;
var modules = [
'text',
'cufon',
'gestures',
'easing',
'parser',
'freedrawing',
'interaction',
'serialization',
'image_filters',
'gradient',
'pattern',
'node'
];
// http://stackoverflow.com/questions/5752002/find-all-possible-sub... | JavaScript | 0 | @@ -233,16 +233,28 @@
ttern',%0A
+ 'shadow',%0A
'node'
|
a9da5be9c569760140d4f70e35cda0044027f55e | rename action test | tests/integration/components/pagination-pager-test.js | tests/integration/components/pagination-pager-test.js | import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, click } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | pagination-pager', function(hooks) {
setupRenderingTest(hooks);
test('it renders', async func... | JavaScript | 0.000949 | @@ -439,39 +439,51 @@
%7D);%0A%0A test('it
-renders
+fires change action
', async functio
|
0d3773045dcade29b8a847c230a51e3831c2d317 | Print response to debug | js/index.js | js/index.js | $(document).ready(function() {
var page = 1;
var data;
if (typeof pagination !== 'undefined') {
if (pagination === true) {
$(".pagination").css("display", "block");
}
}
if (typeof top_active !== 'undefined') {
$("nav a." + top_active).addClass("active");
}
if (typeof channel !== 'undefined') {
if ... | JavaScript | 0.000001 | @@ -1367,20 +1367,24 @@
ole.log(
-data
+response
);%0A%0A%09%09%09%09
|
ac91fe789ff1361845810058732b1a56d0509f0a | prepare to release 0.3.1 | lib/index.js | lib/index.js | import Backbone from 'backbone'
import objectPath from './object-path'
import deepCopy from './deep-copy'
const DEFAULTS = Object.freeze({
pathSeparator: '.',
pathParser: null
})
const _defaults = Object.assign({}, DEFAULTS)
function updateObjectPath () {
objectPath.pathSeparator = _defaults.pathSeparator
c... | JavaScript | 0.000008 | @@ -884,17 +884,17 @@
rn '0.3.
-0
+1
' %7D%0A%0A /
|
0c9fc7e3dd673d244ec2c74f30a4411f66f0f8aa | Use autoloadTranspiler | lib/extension-es6.js | lib/extension-es6.js | /*
* Extension to detect ES6 and auto-load Traceur or Babel for processing
*/
function es6(loader) {
loader._extensions.push(es6);
var transpiler, transpilerModule, transpilerRuntimeModule, transpilerRuntimeGlobal;
var isBrowser = typeof window !== 'undefined' && !!window.Window && window instanceof window.W... | JavaScript | 0 | @@ -223,23 +223,32 @@
%0A%0A var
-isBrows
+autoloadTranspil
er = typ
@@ -278,172 +278,51 @@
ed'
-&& !!window.Window && window instanceof window.Window;%0A var isWorker = typeof self !== 'undefined' && !!self.WorkerGlobalScope && self instanceof WorkerGlobalScope
+%7C%7C typeof WorkerGlobalScope !== 'undefined'
... |
b7b9165a9d49a232a1e9ad583b971e7df492a703 | fix example-minimal ball color sometimes being invalid | examples/example-minimal/javascript/main.js | examples/example-minimal/javascript/main.js | /**
* @fileoverview Minimal is the smalles GameJs app I could think of, which still shows off
* most of the concepts GameJs introduces.
*
* It's a pulsating, colored circle. You can make the circle change color
* by clicking.
*
*/
var gamejs = require('gamejs');
var SCREEN_WIDTH = 400;
var SCREEN_HEIGHT = 400;... | JavaScript | 0.000004 | @@ -758,16 +758,17 @@
.color %3E
+=
Ball.CO
|
ba1c4e4d8046594717a28e59ef7df64432db941a | Swap shallow for mount in workflow selection tests This allows us to test the full component lifecycle. | app/pages/project/workflow-selection.spec.js | app/pages/project/workflow-selection.spec.js | import React from 'react';
import assert from 'assert';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import apiClient from 'panoptes-client/lib/api-client';
import WorkflowSelection from './workflow-selection';
function StubPage() {
return <p>Hello</p>;
}
const location = {
query: {}
};
const con... | JavaScript | 0 | @@ -58,23 +58,21 @@
mport %7B
-shallow
+mount
%7D from
@@ -324,37 +324,8 @@
= %7B%0A
- initialLoadComplete: true,%0A
ro
@@ -1589,15 +1589,13 @@
r =
-shallow
+mount
(%0A
|
068c8b6bdcc46c7542c32ce2400caa850aa8a395 | fix gulpfile packaging | client/gulpfile.js | client/gulpfile.js | // Include gulp
var gulp = require('gulp');
var del = require('del');
var runSequence = require('run-sequence');
var exec = require('child_process').exec;
var bump = require('gulp-bump');
var args = require('yargs').argv;
// The default task (called when you run `gulp` from cli)
gulp.task('default', ['build']);
gulp... | JavaScript | 0.000002 | @@ -273,17 +273,16 @@
rom cli)
-
%0Agulp.ta
@@ -761,16 +761,145 @@
package
+ --baseContentUrl https://github.com/jpogran/puppet-vscode/client --baseImagesUrl https://github.com/jpogran/puppet-vscode/client
',%0A f
@@ -1436,17 +1436,16 @@
n to the
-
%0A ///
@@ -1521,17 +1521,16 @@
ps 1.0.0
-
%0A ///... |
1e8ef9b7b32541241f75a53dd0cff8860aa27c2d | Fix #20 | lib/index.js | lib/index.js | import inquirer from 'inquirer'
import semafor from 'semafor'
import packager from 'electron-packager'
import path from 'path'
import util from 'util'
export default function interactive () {
// Logging library.
const log = semafor()
// Get the name from the package.json file.
function getPackageName () {
... | JavaScript | 0 | @@ -3384,25 +3384,16 @@
if (
-%0A
(options
@@ -3385,36 +3385,40 @@
if ((options.
-arch
+platform
.indexOf('darwin
@@ -3431,20 +3431,24 @@
options.
-arch
+platform
.indexOf
@@ -3467,16 +3467,18 @@
+
(options
@@ -3474,32 +3474,28 @@
(options.
-platform
+arch
.indexOf('ia
@@ -3506,32... |
398419f3bdd0c9be245adc7b087a4da436621958 | remove composition event listeners in v-model unbind | src/directives/model.js | src/directives/model.js | var utils = require('../utils'),
isIE9 = navigator.userAgent.indexOf('MSIE 9.0') > 0
module.exports = {
bind: function () {
var self = this,
el = self.el,
type = el.type,
tag = el.tagName
self.lock = false
// determine what event to listen to
... | JavaScript | 0 | @@ -827,47 +827,102 @@
-el.addEventListener('compositionstart',
+this.cLock = function () %7B%0A compositionLock = true%0A %7D%0A this.cUnlock =
fun
@@ -954,35 +954,36 @@
mpositionLock =
-tru
+fals
e%0A %7D)%0A
@@ -969,33 +969,32 @@
false%0A %7D
-)
%0A el.a... |
eeeb05fa4367fe6acf253dd5e8fa597badcb715c | Remove not needed import | embark-ui/src/components/ContractLayout.js | embark-ui/src/components/ContractLayout.js | import PropTypes from "prop-types";
import React from 'react';
import { TabContent, TabPane, Nav, NavItem, NavLink, Card, Button, CardTitle, CardText, Row, Col } from 'reactstrap';
import classnames from 'classnames';
import ContractOverview from '../components/ContractOverview';
import ContractLoggerContainer from '.... | JavaScript | 0.000001 | @@ -111,53 +111,8 @@
Link
-, Card, Button, CardTitle, CardText, Row, Col
%7D f
|
2e74f9ea202cc8cf7ab2f40c1752ea82baa859ca | Update index.js | js/index.js | js/index.js | var mySwiper = new Swiper ('.swiper-container', {
onInit: function(swiper){
swiperAnimateCache(swiper); //隐藏动画元素
swiperAnimate(swiper); //初始化完成开始动画
},
onSlideChangeEnd: function(swiper){
swiperAnimate(swiper); //每个slide切换结束时也运行当前slide动画
},
pagination: '.swiper-pagination',
paginationClickable: tru... | JavaScript | 0.000002 | @@ -575,7 +575,4 @@
0);%0A
-//%0A
|
c3f0ca58d48bd685209be58e968747ff0ba84e28 | Add auth parameter to cookie | sdk/src/Application.js | sdk/src/Application.js | import Style from './style.css';
import ChatHeaderTemplate from './chat-header.html';
import ChatFooterTemplate from './chat-footer.html';
import Constants from './Constants';
import AuthType from './AuthType';
export default class Application {
constructor() {
//Default options
this.options = {
authTy... | JavaScript | 0.000001 | @@ -1245,13 +1245,25 @@
===
-'Dev'
+AuthType.DEV_AUTH
) %7B%0A
@@ -1309,16 +1309,37 @@
dentity:
+ this._apiKey + '_' +
opts.us
@@ -1391,16 +1391,57 @@
assword)
+,%0A authType: this.options.authType
%0A %7D
|
560222d40a2c8d9217164ad3ceef2aebcb16eed6 | Fix typo | app/scripts/configs/available-for-plugins.js | app/scripts/configs/available-for-plugins.js | /**
* Code that is available to plugin tracks.
*/
// Libraries
import * as PIXI from 'pixi.js';
// Tracks
import Annotations2dTrack from '../Annotations2dTrack';
import ArrowheadDomainsTrack from '../ArrowheadDomainsTrack';
import BarTrack from '../BarTrack';
import BedLikeTrack from '../BedLikeTrack';
import CNVIn... | JavaScript | 0.999999 | @@ -3213,26 +3213,26 @@
;%0A%0Aconst fac
-o
t
+o
ries = %7B%0A C
@@ -3322,18 +3322,18 @@
s,%0A fac
-o
t
+o
ries,%0A
|
2695fc83ef252d9ddc7f335852845f790bb0a6b2 | Modify 'searchToUpperCase()' function to work on every word in a string | helpers/searchToUpperCase.js | helpers/searchToUpperCase.js | module.exports.searchToUpperCase = (string) => {
return string.charAt(0).toUpperCase() + string.slice(1);
}; | JavaScript | 0.002382 | @@ -46,9 +46,12 @@
%3E %7B%0A
-%09
+
retu
@@ -60,16 +60,61 @@
string.
+replace(/%5Cw%5CS*/g, (txt) =%3E %7B%0A %09return txt.
charAt(0
@@ -135,23 +135,42 @@
) +
-string.slic
+txt.substr(1).toLowerCas
e(
-1
);%0A
+ %7D);%0A
%7D
-;
|
2313a55e56c2c497e51f63be02412c7d7779ea75 | Fix potential bug of referencing super ctor dynamically instead of statically | library/services/storage-compat.js | library/services/storage-compat.js | /*
* IFrameTransport - Storage Service Extension
*
* Use a cookie to capture which key changed for IE8
* Use a cookie to ignore "storage" events that I triggered
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) define('ift-storage-service-compat', ['localstorage-events', 'ift-storag... | JavaScript | 0 | @@ -786,16 +786,23 @@
%0A%0A var
+Storage
Service
@@ -825,16 +825,62 @@
torage')
+;%0A%0A var StorageCompatService = StorageService
.extend(
@@ -936,38 +936,30 @@
%7B%0A
-ift.service('storage')
+StorageService
.apply(t
@@ -1255,16 +1255,29 @@
orage',
+StorageCompat
Service)
|
73f0b3d05199b816c59fac65c11ab6bcdcaf9f3f | revert zero-width character change | src/main/js/ephox/phoenix/wrap/Navigation.js | src/main/js/ephox/phoenix/wrap/Navigation.js | define(
'ephox.phoenix.wrap.Navigation',
[
'ephox.bud.Unicode',
'ephox.perhaps.Option',
'ephox.phoenix.api.data.Spot'
],
function (Unicode, Option, Spot) {
/**
* Return the last available cursor position in the node.
*/
var toLast = function (universe, node) {
if (universe.... | JavaScript | 0.000002 | @@ -45,33 +45,8 @@
%5B%0A
- 'ephox.bud.Unicode',%0A
@@ -125,17 +125,8 @@
on (
-Unicode,
Opti
@@ -1651,31 +1651,18 @@
if (
-Unicode.trimNative(text
+text.trim(
).le
|
8149c479e639293cff82f4f1423acc0ad18d099f | Make sure to only scope nodes once | src/document-watcher.js | src/document-watcher.js | /**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://... | JavaScript | 0 | @@ -2341,24 +2341,276 @@
s(host).is;%0A
+ // rescope current node and subtree if necessary%0A if (newScope !== currentScope) %7B%0A if (currentScope) %7B%0A StyleTransformer.dom(n, currentScope, true);%0A %7D%0A StyleTransformer.dom(n, newScope);%0A %7D%0A
... |
9d2d1aaba3b7a55f828e1d7955521dd3800d34f2 | Change to manage reactive data by cell. | js/index.js | js/index.js | const slice = (() => {
const splitAt = (array, n) => [array.slice(0, n), array.slice(n)];
const reduceConcat = a => a.length ? a.reduce((a, b) => [a].concat(reduceConcat(b))) : [];
return (array, n) => {
const splitted = splitAt(array, n);
var p = splitted;
while (p[1].length !== 0)... | JavaScript | 0 | @@ -3279,22 +3279,17 @@
-%7D,%0A
-created
+boxes
: fu
@@ -3303,24 +3303,28 @@
) %7B%0A
+
+
const OFFSET
@@ -3367,24 +3367,28 @@
,%5D;%0A
+
const INDICE
@@ -3422,24 +3422,160 @@
, 19, 20,%5D;%0A
+ return OFFSETS.map(offset =%3E INDICES.map(index =%3E this.cells%5Binde... |
3518f89cb825261ad758f04bbfb463b0caedbd41 | change start rule for peg grammar | gulpfile.js | gulpfile.js | const gulp = require('gulp');
const peg = require('gulp-peg');
const mocha = require('gulp-mocha');
const babel = require('gulp-babel');
const GRAMMAR_PATH = 'src/grammar/*.pegjs';
const HELPER_PATH = 'src/helper/**/*.js';
gulp.task('make:grammar', () => {
gulp.src(GRAMMAR_PATH)
.pipe(peg({ allowedStartRules: [... | JavaScript | 0.000004 | @@ -318,29 +318,17 @@
: %5B'
-Programm', 'Statement
+InitBlock
'%5D %7D
|
d9494acf72213cb4dd4f08acff7c72ffe7dfdfd0 | Revert enable overlay for grunt serve | grunt/config/openui5_connect.js | grunt/config/openui5_connect.js | // configure the openui5 connect server
module.exports = function(grunt, config) {
// libraries are sorted alphabetically
var aLibraries = config.allLibraries.slice();
aLibraries.sort(function(a, b) {
// ensure that the wrapper is handled before the
// original library to allow an overlay
if (b.name == `${a.n... | JavaScript | 0 | @@ -202,214 +202,8 @@
) %7B%0A
-%09%09// ensure that the wrapper is handled before the%0A%09%09// original library to allow an overlay%0A%09%09if (b.name == %60$%7Ba.name%7D-wrapper%60) %7B%0A%09%09%09return 1;%0A%09%09%7D%0A%09%09if (a.name == %60$%7Bb.name%7D-wrapper%60) %7B%0A%09%09%09return -1;%0A%09%09%7D%0A
%09... |
027e3e648bc19a6daad28ea871c4b91793045a10 | Update .eslintrc.js | .eslintrc.js | .eslintrc.js | module.exports = {
env: {
es6: true,
mocha: true,
node: true
},
'extends': 'eslint:recommended',
parserOptions: {
ecmaVersion: 2019
},
rules: {
'brace-style': [2, '1tbs', { allowSingleLine: true }],
'comma-dangle': [2, 'never'],
'dot-notati... | JavaScript | 0 | @@ -174,10 +174,10 @@
: 20
-19
+20
%0A
|
518604c609e7840dc3c23377f777bf7fd3dba2c6 | Add '@private' annotation. | observer.js | observer.js | /* vim: set filetype=javascript shiftwidth=4 tabstop=4 expandtab: */
/*
* @repository
* https://github.com/saneyuki/observer-js
* @license
* BSD 2-Clause License.
*
* Copyright (c) 2014, Tetsuharu OHZEKI <saneyuki.snyk@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and ... | JavaScript | 0.000035 | @@ -1733,24 +1733,41 @@
%0A%0D%0A /**%0D%0A
+ * @private%0D%0A
* @type
|
b1f14b14adc17fbcb73fb21cfcf8e3be8f4ec75d | fix .eslintrc prettier error | .eslintrc.js | .eslintrc.js | module.exports = {
extends: ['airbnb-base', 'prettier', 'plugin:promise/recommended'],
rules: {
'prettier/prettier': ['error'],
'no-process-env': 'error',
'no-multiple-empty-lines': [
'error',
{
max: 2,
maxBOF: 0,
maxEOF: 0,
},
],
'no-tabs': 'off',
'no-restricted-syntax': 'off',
'cl... | JavaScript | 0.000001 | @@ -2278,39 +2278,8 @@
ed',
- 'prettier/@typescript-eslint',
'pl
|
4195cf89130828399f7bace1d302d4a447ce7d56 | Update build-system/extern.js | build-system/extern.js | build-system/extern.js | /**
* Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
*
* 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
*
* U... | JavaScript | 0 | @@ -1402,18 +1402,18 @@
/**%0A * G
-S
I
+S
(Google
|
36863b5c96631505b5b8ad98bbb36fdd364e6615 | Remove gulp clean task | gulpfile.js | gulpfile.js | 'use strict'
const fs = require('fs')
const path = require('path')
const del = require('del')
const gitRevSync = require('git-rev-sync')
const ghpages = require('gh-pages')
const runSequence = require('run-sequence')
const gulp = require('gulp')
const gulplog = require('gulplog')
const $ = require('gulp-load-plugins'... | JavaScript | 0.000042 | @@ -1023,84 +1023,8 @@
%5D)%0A%0A
-gulp.task('clean', () =%3E (%0A del(%5B%0A paths.build,%0A paths.dist%0A %5D)%0A))%0A%0A
gulp
|
8ebae588e8bb06aff6e1695e0fc6a067a5a47940 | Modify no-console rule | .eslintrc.js | .eslintrc.js | module.exports = {
"extends": "airbnb",
"installedESLint": true,
"plugins": [
"react"
]
}; | JavaScript | 0.000003 | @@ -18,36 +18,29 @@
%7B%0A
- %22
extends
-%22
:
-%22
+'
airbnb
-%22
+'
,%0A
- %22
inst
@@ -50,17 +50,16 @@
edESLint
-%22
: true,%0A
@@ -64,27 +64,23 @@
,%0A
- %22
plugins
-%22
: %5B%0A
@@ -79,24 +79,107 @@
- %22react%22%0A %5D
+'react',%0A %5D,%0A rules: %7B%0A 'no-consol... |
14b8e9550fc2ba764cdf72971d354c11be61576f | Check if login form is complete before login | js/login.js | js/login.js | function login() {
var url = $('#serv').val();
var realm = $('#realm').val();
var auth = $('#auth').val();
if (auth == 'no') {
$('#login-btn').html('...');
wsConnectAnonymous(url, realm);
} else if (auth == 'wampcra') {
$('#login-btn').html('...');
var id = ... | JavaScript | 0.000001 | @@ -254,54 +254,8 @@
) %7B%0A
- $('#login-btn').html('...');%0A %0A
@@ -365,24 +365,113 @@
%0A
+if (id.user != '' && id.password != '') %7B%0A %09$('#login-btn').html('...');%0A %09
$('#user').v
@@ -478,28 +478,26 @@
al('');%0A
-
+%09%09
$('#password
@@ -517,32 ... |
ac8045b96931e1ca35f5bf9b880e963a92ed7cd1 | add custom info request types | lib/graphql/types.js | lib/graphql/types.js | const { gql } = require('apollo-server-express')
module.exports = gql`
type Coin {
cryptoCode: String!
display: String!
minimumTx: String!
cashInFee: String!
cashInCommission: String!
cashOutCommission: String!
cryptoNetwork: String!
cryptoUnits: String!
batchable: Boolean!
}
type LocaleInfo {
coun... | JavaScript | 0 | @@ -1055,24 +1055,409 @@
Boolean!%0A%7D%0A%0A
+type CustomScreen %7B%0A text: String!%0A title: String!%0A%7D%0A%0Atype CustomInput %7B %0A type: String!%0A constraintType: String!%0A label1: String%0A label2: String%0A choiceList: %5BString%5D%0A%7D%0A%0Atype CustomRequest %7B%0A name: String!%0A input: Cust... |
7c75ba8d830aaa2d809d6b1cb525fa382c14e91a | return raw response as JSON | lib/app.js | lib/app.js | /*jshint node:true, strict:false */
var express = require('express'),
url = require('url'),
request = require('request'),
u = require('underscore');
var app = express();
app.use(express.logger());
app.use(express['static'](__dirname + '/..'));
app.configure('production', function(){
var airbrakeKey = process... | JavaScript | 0.999901 | @@ -2815,17 +2815,16 @@
ass
-as string
+via JSON
%0A
@@ -2841,45 +2841,36 @@
y =
-'%22' + body.replace(/%22/g, '%5C%5C%22') + '%22'
+JSON.stringify(%7Bdata: body%7D)
;%0A
|
70142e96af8959d472c2b820cfebc039e1ca7082 | Fix --proxy argument to ember server | gulpfile.js | gulpfile.js | /* global require */
var gulp = require('gulp'),
spawn = require('child_process').spawn,
ember,
node;
gulp.task('server', function () {
if (node) node.kill(); // Kill server if one is running
node = spawn('node', ['server.js'], {cwd: 'node', stdio: 'inherit'});
node.on('close', function (code) {
... | JavaScript | 0 | @@ -529,22 +529,34 @@
'--proxy
--port=
+=http://localhost:
3900'%5D,
|
37ae1a94daa87e1dd8333604ba7df2f62632ccdd | Update templating-engine.js | src/templating-engine.js | src/templating-engine.js | import {createScopeForTest} from 'aurelia-binding';
import {Container, inject} from 'aurelia-dependency-injection';
import {DOM} from 'aurelia-pal';
import {Controller} from './controller';
import {ModuleAnalyzer} from './module-analyzer';
import {Animator} from './animator';
import {ViewResources} from './view-resourc... | JavaScript | 0 | @@ -2821,32 +2821,33 @@
the View lifecy
+c
le.%0A */%0A enha
|
547e8f6111443fd9488413c3bee7d89696fbc51e | Add spacebars->tracker package dependency | packages/spacebars/package.js | packages/spacebars/package.js | Package.describe({
summary: "Handlebars-like template language for Meteor",
version: '1.0.4'
});
// For more, see package `spacebars-compiler`, which is used by
// the build plugin and not shipped to the client unless you
// ask for it by name.
//
// The Spacebars build plugin is in package `templating`.
//
// Add... | JavaScript | 0 | @@ -430,24 +430,46 @@
('htmljs');%0A
+ api.use('tracker');%0A
api.use('b
|
385d67936b27521d344fb4834981ec77009e65d3 | format usage | lib/ask.js | lib/ask.js | var path = require('path'),
flatiron = require('flatiron'),
argv = require('optimist').argv,
_ = require('underscore'),
remote = require('./commandlinefu'),
local = require('./mongo')
var cli = exports
var help = ['usage: ask [action] [options]', '', 'query and add commands right from the terminal.', '', ... | JavaScript | 0.000007 | @@ -221,16 +221,21 @@
help = %5B
+%0A
'usage:
@@ -258,20 +258,28 @@
tions%5D',
- '',
+%0A '',%0A
'query
@@ -321,20 +321,28 @@
minal.',
- '',
+%0A '',%0A
'action
@@ -345,16 +345,20 @@
tions:',
+%0A
'add
@@ -425,16 +425,20 @@
d(!!).',
+%0A
'exec %3C
@@ -480,16 +480,20 @@
en id.',... |
e7aaae24d3644fd2d238b057aa2643414af0744c | Add `gulp netlify` task | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var file = require('gulp-file');
var rename = require('gulp-rename');
var replace = require('gulp-replace');
var streamify = require('gulp-streamify');
var uglify = require('gulp-uglify');
var gutil = require('gulp-util');
var zip = require... | JavaScript | 0.999999 | @@ -714,16 +714,54 @@
docs'%7D)%0A
+%09.option('www-dir', %7Bdefault: 'www'%7D)%0A
%09.argv;%0A
@@ -2763,32 +2763,514 @@
est(out));%0A%7D);%0A%0A
+gulp.task('netlify', %5B'build', 'docs', 'samples'%5D, function() %7B%0A%09var root = argv.output;%0A%09var out = path.join(root, argv.wwwDir);%0A%0A%09return merge(%0A%0... |
97e639725e14647466c7fbf6626ecee4878648f3 | Exit on Ctrl+C. | lib/index.js | lib/index.js | /**
* Module dependencies
*/
var server = require('./server')
var service = require('./service')
var discovery = require('./discovery')
var Superpipe = require('superpipe')
/**
* Micromono constructor
*/
var Micromono = function() {
var micromono = this
// Store instances of services
micromono.services = {... | JavaScript | 0 | @@ -1451,16 +1451,126 @@
ervices)
+%0A%0A process.on('SIGINT', function() %7B%0A console.log('%5CnShutting down micromono...')%0A process.exit(0)%0A %7D)
%0A%7D%0A%0A/**%0A
|
dfdbd13eb96c9e9b3649adb9a9babfe2f1a32da3 | Fix overwritten property in .eslintrc.js | .eslintrc.js | .eslintrc.js | module.exports = {
extends: './.eslintrc.google.js',
parserOptions: {
"ecmaVersion": 2017,
"sourceType": "module",
},
env: {
es6: true,
},
rules: {
'arrow-parens': 0,
'block-spacing': 0,
'brace-style': 0,
'camelcase': 0,
'comma-dang... | JavaScript | 0.000001 | @@ -433,38 +433,8 @@
0,%0A
- 'linebreak-style': 0,%0A
|
f370716ed2d864f0f37e672d7ce7c8c8b22362f5 | update eslintrc | .eslintrc.js | .eslintrc.js | module.exports = {
"extends": "airbnb"
}; | JavaScript | 0.000001 | @@ -40,6 +40,61 @@
nb%22%0A
+ rules: %7B%0A 'import/no-unresolved': 0,%0A %7D%0A
%7D;
+%0A
|
eaba6439393f942c4409e670f485102ae7fbb37d | i need sleep | lib/box.js | lib/box.js |
var mongoose = require('mongoose');
var boxSchema = new mongoose.Schema({
timestamp: { type: Date, default: Date.now, expires: 7*24*60*60 },
tags: [ String ],
street1: { type: String, required: true },
street2: { type: String, required: true },
city: { type: String, required: true },
state: { ... | JavaScript | 0.998474 | @@ -435,16 +435,19 @@
: '2d' %7D
+%0A%7D)
%0A%0Amodule
|
47f8540b0d594aceb726dda96e64d346fc9e1e6e | Method 2 | lib/index.js | lib/index.js | /**
*
* STREAM: moving median
*
*
* DESCRIPTION:
* - Transform stream factory to find sliding-window median values (moving median) over a numeric data stream.
*
*
* NOTES:
*
*
* TODO:
*
*
* HISTORY:
* - 2014/08/04: Created. [RJSmith]
*
* DEPENDENCIES:
* [1] through2
*
* ... | JavaScript | 0.999941 | @@ -26,16 +26,27 @@
g median
+ - method 2
%0A*%0A*%0A*
|
0412d238a94b0da2e8d9ecf54422c6d053ec6fc5 | Use Browser environment | .eslintrc.js | .eslintrc.js | module.exports = {
extends: 'airbnb',
rules: {
'import/no-extraneous-dependencies': ["error", { "devDependencies": true }],
'max-len': ["warn", 160, 4, {"ignoreUrls": true}],
'no-multi-spaces': ["error", { exceptions: { "ImportDeclaration": true } }],
'no-param-reassign': ["error", { props: false }]... | JavaScript | 0.000001 | @@ -1079,12 +1079,46 @@
lse,%0A %7D
+,%0A env: %7B%0A browser: true,%0A %7D,
%0A%7D;%0A
|
21c9fbf928fdc85ffc1e016446552594b0603a5b | store global again in js | html/tests/js/test-webbox.js | html/tests/js/test-webbox.js |
var host = document.location.host;
if (host.indexOf(':') >= 0) {
host = host.slice(0,host.indexOf(':'));
}
$(document).ready(function() {
console.log('http://'+host+':8211/js/webbox-backbone.js');
var test_pasta = function() {
store.login('webbox', 'foobar').then(function(x) {
console.log('logged in ');
s... | JavaScript | 0 | @@ -1030,19 +1030,16 @@
%22 %7D);%0A%09%09
-//
window.s
|
935e6251b74bdc27c7717b2fefa29a99fdee60aa | update interface for collectHostSnmp | lib/jobs/snmp-job.js | lib/jobs/snmp-job.js | // Copyright 2014-2015, Renasar Technologies Inc.
/* jshint: node:true */
'use strict';
var di = require('di');
module.exports = snmpJobFactory;
di.annotate(snmpJobFactory, new di.Provide('Job.Snmp'));
di.annotate(snmpJobFactory, new di.Inject(
'Job.Base',
'JobUtils.Snmptool',
'JobUtils.SnmpParser',
... | JavaScript | 0 | @@ -1593,57 +1593,8 @@
data
-, Snmptool, parser, logger, Q, _, self.mibNameMap
)%0A
@@ -2039,85 +2039,56 @@
on (
-%0A machine, Snmptool, parser, logger, Q, _, mibNameMap
+machine) %7B%0A var self = this,
%0A
-) %7B%0A
var
@@ -2083,20 +2083,16 @@
-var
mibsToQu
@@ -4436,16 ... |
2459a4d976b7faa9e65362aa7135277c0d7d1ee2 | Edit database details | server/models/index.js | server/models/index.js | 'use strict';
import dotenv from 'dotenv';
import fs from 'fs';
import path from 'path';
import Sequelize from 'sequelize';
dotenv.config();
const basename = path.basename(module.filename);
const env = process.env.NODE_ENV || 'development';
const config = require('../../server/config/config')[env];
const db = {};
... | JavaScript | 0 | @@ -480,65 +480,57 @@
ize(
-config.database, config.username, config.password, config
+process.env.DB_URL, %7B%0A dialect: 'postgres'%0A %7D
);%0A%7D
|
0318bb88830e80bc891e08bb5132d0f670f057e8 | Fix tests. | src/__tests__/parser.js | src/__tests__/parser.js | import ava from 'ava';
import Parser from '../parser';
const suite = [
['block | inline', {
nodes: [{
type: 'keyword',
value: 'block',
exclusive: true
}, {
type: 'keyword',
value: 'inline',
exclusive: true
}]
}],
... | JavaScript | 0 | @@ -3069,44 +3069,244 @@
e: '
-length',%0A exclusive: fals
+percentage',%0A exclusive: true%0A %7D, %7B%0A type: 'data',%0A value: 'length',%0A exclusive: false%0A %7D, %7B%0A type: 'data',%0A value: 'percentage',%0A ... |
928f4c32b2af5c747de1645a6a38d6509a0093da | Allow es6 syntax | .eslintrc.js | .eslintrc.js | module.exports = {
extends: ["eslint:recommended", "plugin:prettier/recommended"],
plugins: ["prettier"],
rules: {
"prettier/prettier": "error",
"no-console": [
"error",
{
allow: ["error"]
}
]
},
env: {
node: true
}
};
| JavaScript | 0.000002 | @@ -253,16 +253,31 @@
node:
+ true,%0A es6:
true%0A
|
8c193a77d5e44ca2ae5708cbb65b47ca8e197dce | Fix the sound in the menu | renanbrg/dropstory/js/states/Menu.js | renanbrg/dropstory/js/states/Menu.js | /*global State, Config*/
State.Menu = function(game) {
"use strict";
this.game = game;
this.inicioSound = null;
};
State.Menu.prototype = {
preload: function() {
"use strict";
this.game.load.image('level1preloaderbg', Config.preloaderLevel1.dir);
this.game.load.spritesheet('b... | JavaScript | 0 | @@ -1307,16 +1307,69 @@
= true;%0A
+ %7D%0A if (!this.inicioSound.isPlaying) %7B%0A
|
ce4902f436f65440be22afa1b5823ef3d038b4ca | fix commonjs shim | build/js/twgl-start.js | build/js/twgl-start.js | (function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} if (typeof exports !== 'undefined') {
exports = factory();
} else {
root.twgl = factory();
}
}(this, function () {
| JavaScript | 0.000003 | @@ -121,23 +121,22 @@
(typeof
-exports
+module
!== 'un
@@ -143,16 +143,34 @@
defined'
+ && module.exports
) %7B%0A
@@ -173,16 +173,23 @@
+module.
exports
|
132dd7f18eda078a79ac486c6f63763ae8321b97 | create http server | src/events/http/Http.js | src/events/http/Http.js | import HttpEventDefinition from './HttpEventDefinition.js'
import HttpServer from './HttpServer.js'
export default class Http {
#httpServer = null
constructor(serverless, options, lambda) {
this.#httpServer = new HttpServer(serverless, options, lambda)
}
start() {
return this.#httpServer.start()
}
... | JavaScript | 0.000322 | @@ -150,117 +150,197 @@
%0A%0A
-constructor(serverless, options, lambda) %7B%0A this.#httpServer = new HttpServer(serverless, options, lambda)
+#lambda = null%0A%0A #options = null%0A%0A #serverless = null%0A%0A constructor(serverless, options, lambda) %7B%0A this.#lambda = lambda%0A this.#options = opti... |
7d97e7cedcc6dd24328c28b1ce4bb16c84fb4ca4 | Add flow types to Scanner class | lib/lexer/scanner.js | lib/lexer/scanner.js | export default class Scanner {
constructor (code = "", options = {indexOffset: 0, lineOffset: 0, lineStartOffset: 0}) {
const indexOffset = (options.indexOffset > 0 ? options.indexOffset : 0);
const lineOffset = (options.lineOffset > 0 ? options.lineOffset : 0);
const lineStartOffset = (options.lineStartOffset >... | JavaScript | 0 | @@ -1,8 +1,18 @@
+// @flow%0A%0A
export d
@@ -41,329 +41,327 @@
%0A%09co
-nstructor (code = %22%22, options = %7BindexOffset: 0, lineOffset: 0, lineStartOffset: 0%7D) %7B%0A%09%09const indexOffset = (options.indexOffset %3E 0 ? options.indexOffset : 0);%0A%09
+de: Array%3Cstring%3E;%0A%09index: number;%0A%09line: num... |
0dfdf520edef6606f2aa64fa7edac5748d311270 | remove uneeded dependency | server/routes/admin.js | server/routes/admin.js | var express = require('express');
var bodyParser = require('body-parser');
var router = express.Router();
var bcrypt = require('bcryptjs');
var fs = require('fs');
var logger = require('../log');
var path = require('path');
var util = require('util');
var passport = require('passport');
require('../config/passport')(pa... | JavaScript | 0.000003 | @@ -193,36 +193,8 @@
');%0A
-var path = require('path');%0A
var
|
58fc9cb05e30ca4e0798000e1149592f1fd38e2b | enforce curley brace if statements with eslint | .eslintrc.js | .eslintrc.js | module.exports = {
"env": {
"browser": true,
"es2021": true,
"node": true,
"amd": true,
},
globals: {
'luxon': 'readonly',
'XLSX': 'readonly',
'jspdf': 'readonly'
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"semi": "er... | JavaScript | 0 | @@ -633,13 +633,33 @@
rue %7D%5D,%0A
+%09%09%22curly%22: %22error%22,%0A
%09%7D%0A%7D%0A
|
2fc510911f9a5a70ad4e07f28ef04c3f32acd962 | Fix isBN not always returning a boolean | lib/is-bn.js | lib/is-bn.js | 'use strict'
var BN = require('bn.js')
module.exports = isBN
//Test if x is a bignumber
//FIXME: obviously this is the wrong way to do it
function isBN(x) {
return x && typeof x === 'object' && x.words
}
| JavaScript | 0.000269 | @@ -196,14 +196,23 @@
&&
+Boolean(
x.words
+)
%0A%7D%0A
|
2f390ceb5df7ed733e873686ba2d4faba70cac1f | add missing JS file | build/lib/swc/index.js | build/lib/swc/index.js | "use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*-------------------------------------------------... | JavaScript | 0.000001 | @@ -640,16 +640,412 @@
gulp%22);%0A
+/**%0A * SWC transpile stream. Can be used as stream but %60exec%60 is the prefered way because under the%0A * hood this simply shells out to swc-cli. There is room for improvement but this already works.%0A * Ideas%0A * * use API, not swc-cli%0A * * invoke binaries directly, don... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.