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 |
|---|---|---|---|---|---|---|---|
d1c4ba67257adff7f5f264d4b0674927d3046c28 | fix timestamp | lib/gcAgent.js | lib/gcAgent.js | /*
* @copyright Copyright (c) Sematext Group, Inc. - All Rights Reserved
*
* @licence SPM for NodeJS is free-to-use, proprietary software.
* THIS IS PROPRIETARY SOURCE CODE OF Sematext Group, Inc. (Sematext)
* This source code may not be copied, reverse engineered, or altered for any purpose.
* This source code i... | JavaScript | 0.999726 | @@ -1765,18 +1765,8 @@
te()
-.getTime()
%0A
@@ -2339,17 +2339,24 @@
rics(%7B t
-s
+imestamp
: now, m
|
345351bde8024d2047a63fc40bb116753eeb5b3f | Remove unecessary process.exit call | lib/cmds/is.js | lib/cmds/is.js | /*
* Copyright 2013 Zeno Rocha, All Rights Reserved.
*
* Code licensed under the BSD License:
* https://github.com/eduardolundgren/blob/master/LICENSE.md
*
* @author Zeno Rocha <zno.rocha@gmail.com>
*/
var async = require('async'),
base = require('../base'),
clc = require('cli-color'),
logger = requ... | JavaScript | 0.000003 | @@ -1482,37 +1482,8 @@
g);%0A
- process.exit(0);%0A
|
c0b7a392095efb4bfe0c696d5f5097273cb19f8c | Modify commons export rule | lib/commons.js | lib/commons.js | var fs = require('fs');
var path = require('path');
var utils = require('./utils');
function setup(namespace, filepath) {
if(!fs.existsSync(filepath))
return;
var filenames = fs.readdirSync(filepath);
filenames.forEach(function(filename) {
var pos = filename.lastIndexOf('.');
... | JavaScript | 0.000001 | @@ -598,18 +598,290 @@
-return tru
+var usage = false;%0D%0A switch(typeof value) %7B%0D%0A case %22number%22:%0D%0A usage = key == key.toUpperCase();%0D%0A break;%0D%0A case %22function%22:%0D%0A usage = true;%0D%0A brea... |
b796b1d32bff5b20ef21a2526bc707492ae87f85 | Update require | models/Game.js | models/Game.js | /**
* Module dependencies.
*/
const Score = require('./Score');
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
// create a schema
const GameSchema = new Schema({
created_at: Date,
started_at: Date,
ended_at: Date,
teams: [Schema.Types.ObjectId],
scores: [Score.schema]
});
//... | JavaScript | 0 | @@ -54,17 +54,17 @@
uire('./
-S
+s
core');%0A
|
4dd57f96d54b08641283f3de24d74fc3356c4866 | Rearrange imports | models/User.js | models/User.js | 'use strict';
module.exports = function(Schema, mongoose){
var salt = app.config.security.salt
, Q = app.utils.q
, bcrypt = app.utils.bcrypt;
var UserSchema = new Schema({
username: {
type: String,
required: true,
index: true
},
... | JavaScript | 0.00005 | @@ -66,51 +66,8 @@
var
-salt = app.config.security.salt%0A ,
Q
@@ -118,16 +118,59 @@
s.bcrypt
+%0A , salt = app.config.security.salt
;%0A%0A v
|
b8c68cacf4371745e8e2fe6d2e651fde070bd4fa | Add more specs | spec/main-spec.js | spec/main-spec.js | 'use babel'
import RangePool from '../'
describe('RangePool', function() {
function getRangePool(limit: number): RangePool {
return new RangePool(limit)
}
it('cries when constructor param is negative', function() {
expect(function() {
getRangePool(-1)
}).toThrow()
})
it('accepts a number'... | JavaScript | 0 | @@ -571,16 +571,166 @@
)%0A %7D%0A
+ let total = 0%0A pool.workers.forEach(function(worker) %7B%0A total += worker.limitIndex - worker.startIndex%0A %7D)%0A expect(total).toBe(500)%0A
%7D)%0A i
@@ -4981,32 +4981,96 @@
ol.serialize())%0A
+ poolClone.workers.forEach(worker =%3E worker.setActi... |
7239054f65808f71d10dc74126e0bca1bab91fe4 | add license header | lib/handler.js | lib/handler.js | const assert = require('assert');
const util = require('util');
const Stream = require('intel').handlers.Stream;
const superEmit = Stream.prototype.emit;
function debugAssert(record) {
var ex = 'logger.' + record.levelname.toLowerCase() + '(...)';
assert(record.args.length <= 2, ex + ' takes a maximum of 2 argume... | JavaScript | 0.000001 | @@ -1,12 +1,218 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public%0A * License, v. 2.0. If a copy of the MPL was not distributed with this%0A * file, You can obtain one at http://mozilla.org/MPL/2.0/. */%0A%0A
const assert
|
9e39fd71f2587e53f92e5f4ba68c5581c0020e71 | update file /lib/connect.js | lib/connect.js | lib/connect.js | var express = require('express');
var bodyParser = require('body-parser');
var cors = require('cors');
var oracle = require("oracle");
function connectRoute() {
var connect = new express.Router();
connect.use(cors());
connect.use(bodyParser());
// GET REST endpoint - query params may or may not be populated
... | JavaScript | 0.000002 | @@ -1365,17 +1365,16 @@
%7D);%0A
-%0A
%7D);%0A%0A
|
fe785cc57acbf695a1538672d855cec00684b278 | fix sort | lib/helpers.js | lib/helpers.js | 'use babel';
// @flow
import { Disposable } from 'atom';
import AnsiToHtml from 'ansi-to-html';
import { Observable } from 'rxjs';
import type { Message, SubscribeFunction } from './types';
const entityMap = {
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": ''',
'/': '/',
'`': '&#x... | JavaScript | 0.000013 | @@ -2606,24 +2606,63 @@
urn %5B%5D;%0A %7D%0A
+ if (!key) %7B%0A return messages;%0A %7D%0A
return mes
|
d7d917b03b0851db0b02e1fd273b1e0f4d624325 | create all docs before calling back | lib/entries.js | lib/entries.js | 'use strict';
var es = require('event-stream');
var sgvdata = require('sgvdata');
var TEN_MINS = 10 * 60 * 1000;
/**********\
* Entries
* Encapsulate persistent storage of sgv entries.
\**********/
function storage(name, storage, pushover) {
// TODO: Code is a little redundant.
var with_collection = storage... | JavaScript | 0 | @@ -2394,34 +2394,32 @@
docs, fn) %7B%0A
-
with_collection(
@@ -2448,26 +2448,24 @@
on) %7B%0A
-
if (err) %7B f
@@ -2488,18 +2488,16 @@
%7D%0A
-
-
// poten
@@ -2518,18 +2518,16 @@
insert%0A
-
va
@@ -2543,24 +2543,55 @@
r = null,%0A
+ numDocs = docs.length,%0A
... |
993d62a1c1d59849618f6c4eb042aeb686245ebd | Improve German translations | lib/i18n/de.js | lib/i18n/de.js | /*eslint-disable max-len,quotes*/
export default {
"about.librariesIntro": "Diese Webseite ist ein Vorzeigeprojekt für diverse Technologie und Bibliotheken, wie z.B.:",
"about.specialThanks": "Besonderer Dank gebührt {link} um die Idee von {redux} zu starten!",
"account.home.intro": "Gratuliere! Du bist ein gesic... | JavaScript | 0 | @@ -97,36 +97,31 @@
ein
- Vorzeigeprojekt f%C3%BCr
+e Demonstration
diverse
Tec
@@ -116,16 +116,17 @@
diverse
+r
Technol
@@ -129,16 +129,17 @@
hnologie
+n
und Bib
@@ -207,23 +207,18 @@
ank
-geb%C3%BChrt
+an
%7Blink%7D
um d
@@ -213,18 +213,19 @@
%7Blink%7D
-um
+f%C3%BCr
die Ide
@@ -241,19 +241,8 ... |
798e6b58d1e3c690dc667f20e418012035f583f9 | Fix JS validation. No idea why it doesn't work the other way. Bleh. | public/application.js | public/application.js | (function($) {
$(document).ready(function() {
$('.player-link').click(function(e) {
$.get($(this).attr('href'));
e.preventDefault();
});
$('#uploader input').change(validateUploadForm);
$('#uploader input[type="text"]').on('keyup', validateUploadForm);
$('#uploader input[type="text"]').on('blur', va... | JavaScript | 0 | @@ -545,22 +545,27 @@
) %7B%0A
-return
+var valid =
%0A%09 $('#
@@ -660,32 +660,51 @@
o').val() != '';
+%0A%0A return valid;
%0A %7D);%0A%7D%0A%0Avar va
|
fe218be54fa28494c750a6ed5438655470dc79ca | throw upon errors in grid rendering test | test/render_grid.test.js | test/render_grid.test.js | var mapnik = require('mapnik');
var assert = require('assert');
var fs = require('fs');
var stylesheet = './examples/stylesheet.xml';
var reference = fs.readFileSync('./test/support/grid2.json', 'utf8');
var reference_view = fs.readFileSync('./test/support/grid_view.json', 'utf8');
describe('mapnik grid rendering ', ... | JavaScript | 0 | @@ -743,32 +743,64 @@
on(err, grid) %7B%0A
+ if (err) throw err;%0A
var
@@ -2200,39 +2200,42 @@
-assert.ok(!
+if (err) throw
err
-)
;%0A
|
a392cfa49a6d23bde0f35bab43badd79db43a746 | Fix Stepway Controls index | src/app/stepway/components/controls/index.js | src/app/stepway/components/controls/index.js | import { BlankConfig } from './blank/config/stepway.blank.config';
import {editBlankControlComponent, EDIT_BLANK_CONTROL_COMPONENT} from './blank/editBlank/stepway.editBlankControl.component';
import editBlankModule from './blank/editBlank/stepway.editBlankControl.module';
import { IpAdressConfig } from '.... | JavaScript | 0 | @@ -1580,25 +1580,25 @@
stepway.edit
-b
+B
asicSelect.c
@@ -1615,25 +1615,25 @@
%0Aimport edit
-b
+B
asicSelectMo
@@ -1896,25 +1896,25 @@
dSelect/edit
-g
+G
roupedSelect
@@ -1926,17 +1926,17 @@
way.edit
-g
+G
roupedSe
@@ -5134,17 +5134,17 @@
me: edit
-b
+B
asicSele
|
e50338804f6177faf653cf8e17d0f5ee63de1b40 | Remove gameAction property from Political Disaster prompt (#1665) | server/game/cards/02.2-TRtW/PoliticalDisaster.js | server/game/cards/02.2-TRtW/PoliticalDisaster.js | const _ = require('underscore');
const PlotCard = require('../../plotcard.js');
class PoliticalDisaster extends PlotCard {
setupCardAbilities() {
this.whenRevealed({
handler: () => {
this.selections = [];
this.remainingPlayers = this.game.getPlayersInFirstPlayer... | JavaScript | 0 | @@ -2212,47 +2212,8 @@
a',%0A
- gameAction: 'discard',%0A
|
8928cc7a9887454775466545ce3a45831ca38d40 | add f=image to esri leaflet parameters | ckanext/agsview/public/js/ags_ms_view.js | ckanext/agsview/public/js/ags_ms_view.js | // geojson preview module
ckan.module('ags_ms_view', function (jQuery, _) {
return {
options: {
table: '<div class="table-container"><table class="table table-striped table-bordered table-condensed"><tbody>{body}</tbody></table></div>',
row:'<tr><th>{key}</th><td>{value}</td></tr>',
style: {
... | JavaScript | 0 | @@ -2234,16 +2234,44 @@
lit(',')
+,%0A f: 'image'
%0A
@@ -2366,32 +2366,60 @@
url: path
+,%0A f: 'image'
%0A %7D);
|
609d61642cb1737d2a7097015def0d852378c943 | Put back changes in observer after unsuccessful commit. | static/js/tests/mqtt.test.js | static/js/tests/mqtt.test.js | const expect = require('chai').expect;
var settings = require('./mqtt/client-harness');
import { MqttClient } from "../mqtt";
describe('mqtt connection', () => {
const mqttClient = new MqttClient('localhost', 8884, 'test-client', 1);
const userName = 'admin';
const password = 'cruzrojaadmin';
it('... | JavaScript | 0 | @@ -2197,33 +2197,74 @@
= 'messageSent')
+ %7B%0A mqttClient.remove(fn);
%0A
-
@@ -2263,32 +2263,46 @@
done();%0A
+ %7D%0A
%7D;%0A%0A
@@ -2413,42 +2413,127 @@
out(
+
() =%3E
-done(new Error('timeout!')),
+%7B%0A mqttClient.remove(fn)... |
472f489d1a2175a6d39f0d5344dbce8e3ba14341 | fix scrypt test | test/run/scrypt_tests.js | test/run/scrypt_tests.js | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var scrypt = require('../../client/scrypt')
var test = require('tap').test
test(
'scrypt basic with a remote he... | JavaScript | 0.000019 | @@ -341,40 +341,8 @@
) %7B%0A
- function end() %7B t.end() %7D%0A%0A
@@ -525,16 +525,25 @@
//scrypt
+-accounts
.dev.lci
@@ -584,38 +584,40 @@
helper)%0A .
-then(%0A
+done(%0A
function (
@@ -614,32 +614,34 @@
function (K2) %7B%0A
+
t.equal(
@@ -722,36 +722,111 @@
-%7D%0A
... |
5e5d1ebc0bf0c5f9b3bf5ac4aadf5bcdd33a3838 | Move Tracking number and location to list, remove carrier name | share/spice/package_tracking/package_tracking.js | share/spice/package_tracking/package_tracking.js | (function (env) {
"use strict";
env.ddg_spice_package_tracking = function(api_result){
if (!api_result || api_result.error) {
return Spice.failed('package_tracking');
}
var logo = api_result.c;
switch (logo) {
case 'ups-packages':
logo =... | JavaScript | 0 | @@ -1099,112 +1099,8 @@
: %5B%0A
- carriers%5Bdata.c%5D,%0A %22Location: %22 + data.location,%0A
@@ -1378,16 +1378,72 @@
: data.n
+,%0A %22Location%22: data.location,
%0A
|
705b0d016d42607be84cdb98879d4f8a2db30f26 | Fix dashboard.js | client/app/pages/dashboards/dashboard.js | client/app/pages/dashboards/dashboard.js | import * as _ from 'underscore';
import template from './dashboard.html';
import shareDashboardTemplate from './share-dashboard.html';
function DashboardCtrl($routeParams, $location, $timeout, $q, $uibModal,
Title, AlertDialog, Dashboard, currentUser, clientConfig, Events) {
console.log(whatever);
this.refres... | JavaScript | 0.000009 | @@ -277,35 +277,8 @@
%7B%0A%0A
-%0A console.log(whatever);%0A%0A
th
|
eddf3f20c43ccdaee8053a30d51bce08cb08c5b7 | Update gyrolib.js | lib/gyrolib.js | lib/gyrolib.js | /*******************************************************************************
* Author: Hovig Ohannessian - Initial implementation
*******************************************************************************/
(function(window) {
'use strict'
var Gyroscope = {};
var x = 0, y = 0;
var alpha = 0, beta = 0, g... | JavaScript | 0 | @@ -1645,17 +1645,17 @@
ket.on('
-C
+c
oords',
@@ -1769,33 +1769,33 @@
;%0A%09%09%09socket.on('
-C
+c
aliberateUpperLe
@@ -1985,17 +1985,17 @@
ket.on('
-C
+c
aliberat
|
1899e85c90747ee852be53fa06958fcce61aa786 | remove reference to deleted file | src/js/app/features/features.js | src/js/app/features/features.js | var angularModule = angular.module('hylo.features', []);
require('./billing/billing');
require('./seeds/seeds');
require('./community/createCommunity');
require('./menu');
require('./mentions/userMentions')(angularModule);
| JavaScript | 0 | @@ -55,38 +55,8 @@
);%0A%0A
-require('./billing/billing');%0A
requ
|
6bd98287a8117236bb2d67605507269c146b290f | fix retrun top | public/js/game/top.js | public/js/game/top.js | class TopPage {
constructor (game) {
this.game = game;
this.scene = new Scene();
this.enabled = false;
// background image
this.bg = new Sprite(1920, 1080);
this.bg.image = this.game.assets[bgImg];
this.scene.addChild(this.bg);
// username label
... | JavaScript | 0 | @@ -4920,47 +4920,8 @@
e);%0A
- this.changeScreenToTop2();%0A
|
09c64d05597a4b6de0ce903d5576787ca5a34c82 | fix page | src/js/base/module/Clipboard.js | src/js/base/module/Clipboard.js | import lists from '../core/lists';
export default class Clipboard {
constructor(context) {
this.context = context;
this.$editable = context.layoutInfo.editable;
}
initialize() {
this.$editable.on('paste', this.pasteByEvent.bind(this));
}
/**
* paste by clipboard event
*
* @param {Event... | JavaScript | 0.000001 | @@ -518,15 +518,8 @@
ile%0A
- %0A
@@ -623,18 +623,16 @@
.items);
-;%0A
%0A i
|
39c5174ed2c55fa0311b89d21087c00481de05c2 | Fix case list breaking on language change | corehq/apps/style/static/style/js/ui_elements/ui-element-input.js | corehq/apps/style/static/style/js/ui_elements/ui-element-input.js | /* globals hqDefine, $, eventize, hqImport */
hqDefine('style/js/ui_elements/ui-element-input.js', function () {
'use strict';
var module = {};
var Input = function ($elem, initialValue, getElemValue, setElemValue, setPlaceholderValue) {
var that = this;
eventize(this);
this.ui = $... | JavaScript | 0.000041 | @@ -1867,31 +1867,74 @@
n =
-module.langcode_tag_btn
+hqImport('style/js/ui_elements/ui-element-langcode-button.js').new
(%0A
@@ -2095,16 +2095,33 @@
ted.lang
+%0A
);%0A
|
c7c211967a7b25a171a0a3de7d4f4559a8747140 | Handle case where reset triggers check without url | src/js/cilantro/models/value.js | src/js/cilantro/models/value.js | /* global define */
define([
'underscore',
'backbone',
'../structs',
'../constants'
], function(_, Backbone, structs, constants) {
// Represents a value as defined in a query condition. For a given list of
// values, a value can not be specified twice, so it is treated
// as the `id`.
... | JavaScript | 0 | @@ -2006,16 +2006,29 @@
s.length
+ %7C%7C !this.url
) return
|
2584c97a487ccbeed9b246f825fd0d37d11aee55 | Fix bad findHmms dispatch in SamplesList | client/src/js/samples/components/List.js | client/src/js/samples/components/List.js | import React from "react";
import { connect } from "react-redux";
import { forEach, slice, includes, pull } from "lodash-es";
import CreateAnalysis from "../../analyses/components/Create";
import { LoadingPlaceholder, NoneFound, ScrollList, ViewHeader } from "../../base";
import { findSamples } from "../actions";
impor... | JavaScript | 0.000002 | @@ -3613,20 +3613,18 @@
indHmms(
-null
+%22%22
, 1, fal
|
4e0e0d7a89ce5a227ddd855c6ee5f589342086a2 | remove extraneous function now | lib/helpers.js | lib/helpers.js |
'use strict';
// nodejs
var path = require('path'),
fs = require('fs-extra');
// third-party
var nunjucks = require('nunjucks');
function Helpers () {
// a shared-state singleton that can be used by any module of the template
// configure nunjucks with our known templates - this could become dynamic via runtim... | JavaScript | 0.000006 | @@ -1855,52 +1855,8 @@
));%0A
-%09%7D,%0A%09%0A%09/**%0A%09*%0A%09*/%0A%09finish: function () %7B%0A%09%09%0A
%09%7D%0A%7D
|
77c6fd30a72fb5caabe6c014546058293c1622b2 | Update comments | public/js/settings.js | public/js/settings.js | /**
* Settings configuration for jsSART
*/
var jsSART = {
// Conditions
// --------------------------------
'CONDITIONS': {
// Total number of trials a participant will see during experiment
'NUM_TRIALS': [484, 560, 646, 731, 810],
// Number of trials before being shown real-time post-block questi... | JavaScript | 0 | @@ -1524,16 +1524,36 @@
aseline
+and post-experiment
evaluati
@@ -1578,16 +1578,16 @@
arousal%0A
-
'ARO
@@ -1796,24 +1796,91 @@
%7D,%0A %5D,%0A
+ // Real-time evaluation during the experiment (between blocks)%0A
'REAL_TI
@@ -2143,31 +2143,86 @@
1%22%0A %7D,%0A
-
%5D,%0A
+ // Self-r... |
123c7d05404efbe40af0d5d6564c2037c8fb2e5e | Add `smallest`and `biggest` to helpers | lib/helpers.js | lib/helpers.js | "use strict";
/**
* Checks if the given argument is a string
*/
var isString = function isString(param) {
return typeof param === 'string' || param instanceof String;
};
/**
* Calls the given callback on every Element of an Array like Object
*/
var each = function each(iterable, callback) {
for (... | JavaScript | 0.999999 | @@ -1101,18 +1101,16 @@
%7D);%0D%0A%0D%0A
-%0D%0A
return
@@ -1128,22 +1128,713 @@
%0D%0A%7D;%0D%0A%0D%0A
-%0D%0A%0D%0A%0D%0A
+/**%0D%0A * finds the smallest of the given arguments%0D%0A * example:%0D%0A * smallest(10,40,5,42) returns 5%0D%0A */%0D%0Avar smallest = function smallest () %7B%0D%0A var reduce = Arra... |
8451c8298eb62cded555c1a115846c298cdebc84 | Make isColor method work | lib/helpers.js | lib/helpers.js | 'use babel'
export function isColor(textEditor, bufferPosition) {
return true
}
| JavaScript | 0.000001 | @@ -10,74 +10,512 @@
l'%0A%0A
-export function isColor(textEditor, bufferPosition) %7B%0A return true
+const COLOR_EXTRACTION_REGEXP = /rgb%5C(%5Cd+, %5Cd+, %5Cd+%5C)%7C%5C#%5B0-9a-f%5D%7B3,6%7D/%0A%0Aexport function isColor(textEditor, bufferPosition) %7B%0A const lineText = textEditor.getTextInRange(%5B%5BbufferPo... |
588ee3023501718c306c1ab1809c5f4f6c57fd6a | update to Promise | test/test-out-resolve.js | test/test-out-resolve.js | import test from 'ava';
import outResolve from '../src/out-resolve';
test('should return function', t => {
t.true(typeof outResolve === 'function');
});
test('only input should return file.ext', t => {
t.is(outResolve('file.ext'), 'file.ext');
});
test('only input should return tmp/file.ext', t => {
t.is(outRe... | JavaScript | 0.000001 | @@ -17,16 +17,52 @@
'ava';%0A
+import isPromise from 'is-promise';%0A
import o
@@ -178,32 +178,109 @@
unction');%0A%7D);%0A%0A
+test('should return Promise', t =%3E %7B%0A t.true(isPromise(outResolve()));%0A%7D);%0A%0A
test('only input
@@ -296,32 +296,38 @@
eturn file.ext',
+ async
t =%3E %7B%0A t.is(o
@@ -31... |
a95469005e1bb88b827793b8ff2063997d7c1e62 | fix a bug where a value changes from something to nothing, this new code will ensure validate is called | src/Form.js | src/Form.js | import React from 'react'
// http://stackoverflow.com/a/5344074
const clone = obj => JSON.parse(JSON.stringify(obj))
const initialFieldState = () => ({
value: '',
error: '',
validField: true,
visited: false,
dirty: false,
active: false,
})
class Form extends React.Component {
constructor() {
super... | JavaScript | 0 | @@ -4139,21 +4139,39 @@
(state.
+hasOwnProperty('
value
+')
) %7B%0A
|
39b85b995ed830b71a61417a87cd2e0b38247134 | Fix table redraw timer | assets/js/list.js | assets/js/list.js | var $ = require("jquery");
require("datatables-bootstrap3-plugin");
var icon_details = $("<span></span>").addClass("clickable glyphicon glyphicon-search dp_modal details");
var icon_report = $("<span></span>").addClass("clickable glyphicon glyphicon-bullhorn dp_modal report");
var icon_visit = $("<span></span>").addCl... | JavaScript | 0.000001 | @@ -3604,16 +3604,73 @@
%7D);%0A
+%0A setTimeout(function() %7B redraw_table(); %7D, 10000);%0A%0A
%7D%0A%0Afunct
@@ -4039,60 +4039,8 @@
%0A%7D%0A%0A
-setTimeout(function() %7B redraw_table(); %7D, 10000);%0A%0A
/* v
|
cb839c45e5fe6710f4f301c96e174a77f27dd29d | Fix error when form is not found | src/js/ng-geocoder.directive.js | src/js/ng-geocoder.directive.js | (function () {
angular
.module("ng-geocoder")
.directive("ngGeocoder", ngGeocoder);
ngGeocoder.$inject = ["$timeout", "$templateCache", "ngGeocoderService"];
function ngGeocoder ($timeout, $templateCache, ngGeocoderService) {
var DEFAULT_TEMPLATE_URL = "/ng-geocoder/ng-geocoder.html";
$template... | JavaScript | 0.000002 | @@ -1305,16 +1305,26 @@
;%0A%0A
+ if (form)
form.ad
|
7d7acc4960c91b2dbdc28ba010e7008e9e8cab3d | fix test-run-metrics after broken refactor | test/test-run-metrics.js | test/test-run-metrics.js | var helper = require('./helper');
if (helper.skip()) return;
helper.pass = true; // Use tap, not this check.
var Graphite = require('strong-statsd/test/servers/graphite');
var Splunk = require('strong-statsd/test/servers/splunk');
var Statsd = require('strong-statsd/test/servers/statsd');
var Syslog = require('stron... | JavaScript | 0 | @@ -769,16 +769,58 @@
Args = %5B
+%0A '--cluster=1',%0A '--no-profile',%0A
%5D;%0A%0A as
@@ -1087,39 +1087,15 @@
-%5B'--cluster=1', '--no-profile'%5D
+runArgs
,%0A
|
f5eb9cb52e6cc4bcf7319224f23be1013d4ed353 | Fix test | test/test.no-argument.js | test/test.no-argument.js | var should = require('should');
var exec = require('child_process').exec;
var cmd = 'uname -s'
exec(cmd, function(error, stdout, stderr) {
if (!stdout.includes('Darwin')) {
cmd = 'node index.js';
exec(cmd, function(error, stdout, stderr) {
error.message.should.be.exactly('Command failed: node index.js\... | JavaScript | 0.000004 | @@ -268,58 +268,82 @@
age.
-should.be.exactly('Command failed: node index.js%5Cn
+includes('Command failed:').should.be.true;%0A error.message.includes('
goog
@@ -401,20 +401,33 @@
g error.
-%5Cn
')
+.should.be.true
;%0A %7D)
@@ -634,58 +634,84 @@
age.
-should.be.exactly('Command failed: node index.js%5Cn... |
d1f2337b5652ead60902e4180545834a7d8f7bc6 | remove Func.over | src/Func.js | src/Func.js | // curry :: ((a, b) -> c) -> a -> b -> c
export const curry = (fn, ...args) => {
const c = (fnArgs) => {
if (fnArgs.length >= fn.length) {
return fn.apply(this, fnArgs);
}
return (...cArgs) => c([...fnArgs, ...cArgs]);
};
return c(args);
};
//:: ([a] -> b?, [a]) -> b?
export const app... | JavaScript | 0.000018 | @@ -452,119 +452,8 @@
);%0A%0A
-//:: (b -%3E c) -%3E (a -%3E b) -%3E a -%3E a -%3E (a -%3E c)%0Aexport const over = curry((f, g, x, y) =%3E f((g(x)), (g(y))));%0A%0A
//::
|
23183495f7aa196aa053349e8d7f1151939ffde9 | Increase zoom by 1 | public/scripts/app.js | public/scripts/app.js | angular.module('wubApp', ['ui.bootstrap', 'uiGmapgoogle-maps', 'wubServices'])
.config(function(uiGmapGoogleMapApiProvider) {
uiGmapGoogleMapApiProvider.configure({
// key: 'your api key',
v: '3.17',
libraries: 'weather,geometry,visualization'
})
})
.controller('LocationController', functio... | JavaScript | 0.000002 | @@ -433,16 +433,16 @@
e: 4
-7.610377
+3.903718
, lo
@@ -455,19 +455,17 @@
e: -
-122.2006786
+79.361654
%7D,
@@ -470,17 +470,17 @@
, zoom:
-6
+7
%7D;%0A %09$
|
3c427e0669abebf2a1cc74f76591fc5e4652245f | update basic package-file testing | test/testPackageFiles.js | test/testPackageFiles.js | /* jshint -W097 */
/* jshint strict:false */
/* jslint node: true */
/* jshint expr: true */
var expect = require('chai').expect;
var fs = require('fs');
describe('Test package.json and io-package.json', function() {
it('Test package files', function (done) {
console.log();
var fileContentI... | JavaScript | 0 | @@ -4107,38 +4107,35 @@
utf8');%0A
-expect
+if
(fileContentRead
@@ -4158,19 +4158,61 @@
icense')
-, '
+ === -1) %7B%0A console.log('Warning:
The READ
@@ -4213,32 +4213,30 @@
e README.md
-needs to
+should
have a sect
@@ -4255,83 +4255,145 @@
se')
-.not.equal(-1);%0A expect(fileConten... |
059d02a7592399c19ebd4e9f5c44d686d0b79924 | Make line numbers clickable | assets/js/main.js | assets/js/main.js | $(function(){
setup_tags();
setup_code_highlights();
});
function setup_code_highlights() {
$('.code-mirror').each(function(i,el){
var $el = $(el);
var mirror = CodeMirror(el, {
lineNumbers: true,
lineWrapping: true,
mode: $el.attr('data-hi... | JavaScript | 0.000178 | @@ -570,16 +570,228 @@
%0A %7D);
+%0A%0A $('.CodeMirror-linenumber').each(function(i, el)%7B%0A var el_id = 'L' + $(el).text();%0A $(el).wrap('%3Ca href=%22#' + el_id + '%22%3E%3C/a%3E')%0A .css(%7Bcursor: 'pointer'%7D).attr('id', el_id);%0A %7D);
%0A%7D%0A%0Afunc
|
7f4055e4459c5c2bd91c888d6d0ef0ebf89fff63 | Implement try catch in date formatting - TODO - test | lib/helpers.js | lib/helpers.js | 'use strict';
let slug = require('slug'),
path = require('path'),
moment = require('moment'),
config = require('../config'),
winston = require('winston'),
logger = new (winston.Logger)({
transports: [
new winston.transports.Console(),
new (winston.transports.File)({f... | JavaScript | 0.000771 | @@ -466,32 +466,50 @@
(s, date) =%3E %7B%0A
+ try %7B%0A
if(!date
@@ -516,32 +516,36 @@
) %7B%0A
+
+
date = moment().
@@ -563,32 +563,36 @@
DD.Y');%0A
+
%7D else %7B%0A
@@ -588,32 +588,36 @@
e %7B%0A
+
+
date = moment(da
@@ -639,32 +639,58 @... |
d33733de381435f9a84549ae14b87d8f01f32f32 | fix admin reload on firefox | lib/404/404.js | lib/404/404.js | import page from 'page'
/**
* Render 404 on backend
*/
page('*', () => {
window.location.reload(false)
})
| JavaScript | 0.000001 | @@ -63,16 +63,19 @@
e('*', (
+ctx
) =%3E %7B%0A
@@ -94,22 +94,19 @@
tion
-.reload(false)
+ = ctx.path
%0A%7D)%0A
|
a93198268de8a107d1276e7304be234a1430a8a3 | variable name clean up | src/js/tabs/desktop/register.js | src/js/tabs/desktop/register.js | var util = require('util');
var Tab = require('../../client/tab').Tab;
var RegisterTab = function ()
{
Tab.call(this);
};
util.inherits(RegisterTab, Tab);
RegisterTab.prototype.tabName = 'register';
RegisterTab.prototype.pageMode = 'single';
RegisterTab.prototype.parent = 'main';
RegisterTab.prototype.generateHtm... | JavaScript | 0.998432 | @@ -1479,17 +1479,16 @@
y_wallet
-2
';%0A
@@ -1571,32 +1571,162 @@
lick');%0A %7D;%0A%0A
+ $scope.submitSecretKeyForm = function()%7B%0A $scope.masterkey = $scope.secretKey;%0A $scope.createEmptyWallet();%0A %7D;%0A%0A
$scope.regis
@@ -2540,16 +2540,19 @@
eset();%0A
+%0A%0A%0A
%7D%5D... |
faa2ea0513f570421f269cd3556d4b4496c45b88 | remove all jq from history.js | lib/history.js | lib/history.js | // Backbone.History
// ----------------
// Handles cross-browser history management, based on either
// [pushState](http://diveintohtml5.info/history.html) and real URLs, or
// [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
// and URL fragments.
var History = Backbone.History = functi... | JavaScript | 0.000005 | @@ -2895,37 +2895,39 @@
%7B%0A
-Backbone.$(window).on
+window.addEventListener
('popsta
@@ -2936,32 +2936,39 @@
', this.checkUrl
+, false
);%0A %7D else if
@@ -3004,29 +3004,31 @@
-Backbone.$(window).on
+window.addEventListener
('ha
@@ -3047,24 +3047,31 @@
his.checkUrl
+, false
);%0A %7D%0A%0A ... |
2568fcd1358da9a2da2688b49c083cd04a8f5755 | fix bug | lib/helpers.js | lib/helpers.js | 'use babel';
let config = {};
export default {
getRem(str) {
const base = this.getBase();
const num = parseFloat(str);
if (num <= 1) {
return false;
}
const rem = Number((num / base).toFixed(atom.config.get('px2rem-plus.precision')));
let remStr = String(rem);
if (atom.config.get... | JavaScript | 0.000001 | @@ -84,17 +84,12 @@
his.
-getB
+b
ase
-()
;%0A
|
1eea96b051d7e9a27938ddde1697b69d900ef9a0 | add the lastest line | assets/js/main.js | assets/js/main.js | "use strict";
function addMarker(data, index) {
var marker = new google.maps.Marker({
position: data.location,
title: data.nickname,
map: map
});
addInfoWindow(data, marker, index);
}
function addInfoWindow(data, marker, index) {
var address = data.address,
... | JavaScript | 0.999999 | @@ -2753,24 +2753,116 @@
t%0D%0A%0D%0A %7D%0D%0A
+ // %E5%A2%9E%E5%8A%A0%E6%9C%80%E5%90%8E%E7%9A%84%E8%B7%AF%E7%BA%BF%0D%0A path3%5Broute.length - 1 - current %5D = route%5Broute.length - 1%5D.location;%0D%0A
addLine(
|
38cc8e13f2ba128f00671264cbe2a076c3c0f617 | Add real checker to `can` method. | lib/Context.js | lib/Context.js | function Context( options ) {
var self = this;
self.extends = {
resources: {
'Person': {
plugin: function(schema, options) {
schema.methods.can = self.can;
}
}
}
};
}
Context.prototype.can = function( action , object ) {
return true;
};
module.exports = Context... | JavaScript | 0 | @@ -276,19 +276,157 @@
%7B%0A
-return true
+var id = this._id.toString();%0A var map = object._show.credits.map(function(x) %7B%0A return x._person.toString();%0A %7D);%0A return (~map.indexOf( id ))
;%0A%7D;
|
66c56967a13b0224c451577442daad296d9dd498 | Add choices on history formats | lib/history.js | lib/history.js | module.exports = (() => {
const _ = require('lodash');
const utils = require('./utils');
const LOG_FORMATS = {
pretty: {
format: '%Cred%H%Creset \n\t%s %Cgreen(%cr) %C(bold blue)<%an>%Creset \n\t%C(yellow)%d%Creset',
postProcessing: _.identity
},
json: {
format: '{"sha": "%H", "mes... | JavaScript | 0 | @@ -724,89 +724,14 @@
-// TODO: should work ? Doesn't. Remove the associated coerce call%0A // option
+choice
s: _
@@ -1664,349 +1664,8 @@
SE)%0A
- .coerce(ARGUMENTS.FORMAT.name, argument =%3E %7B%0A if (!_.has(LOG_FORMATS, argument)) %7B%0A const availableOptions = %60%5B $%7B_.... |
0973c17671b06458c12762d2a6975a1fde5c9b6b | Remove old doze step | lib/install.js | lib/install.js | 'use strict';
var fs = require('fs');
var path = require('path');
var mkdirp = require('mkdirp');
var meta = require('./meta.js');
var PROVIDER_ATTEMPTS = 3;
module.exports = function(kbox) {
var sysProfiler = kbox.install.sysProfiler;
var provider = kbox.engine.provider;
var shell = kbox.util.shell;
var pro... | JavaScript | 0.000003 | @@ -2094,939 +2094,8 @@
%7B%0A%0A
- // @todo: add this step into the install docs%0A /*%0A kbox.install.registerStep(function(step) %7B%0A step.name = 'engine-docker-finalize-engine';%0A step.description = 'Halting engine on Windows...';%0A step.subscribes = %5B'core-finish'%5D;%0A step.d... |
572b2f669c424fcf1be13ef81e5811d0563a3a65 | Correct version history. | GeocacheHeight/src/header.js | GeocacheHeight/src/header.js |
//
// Works out the height of a geocache.
//
// v0.0.1 First attempt!
// v0.0.2 Updated for changes to geocaching.com layout.
// v0.0.3 Updated for more changes to geocaching.com layout.
// v1.0.4 Updated for changes to geocaching.com cache page URLS.
// v1.1.0 Updated for changes to geocaching.com. Re-writ... | JavaScript | 0 | @@ -265,33 +265,45 @@
v1.1.0 Update
-d
+ and re-write
for changes to
@@ -321,97 +321,8 @@
com.
- Re-written to use Geonames rather than Google and remove dependency on Greasemonkey API.
%0A//%0A
|
fd77a84569db570d82ddd6b5b78a77989c54ffd6 | improve Port code | src/Port.js | src/Port.js | import { getParentSvg } from './utils';
import { _p } from './points';
export default class Port {
constructor({ id, type, direction, node, ref }) {
if (!['in', 'out'].includes(direction))
throw "port direction must be 'in' or 'out'";
if (!['data', 'flow'].includes(type))
throw "type must be 'da... | JavaScript | 0.000002 | @@ -65,16 +65,89 @@
ints';%0A%0A
+const directionTypes = %5B'in', 'out'%5D%0Aconst portTypes = %5B'data', 'flow'%5D%0A%0A
export d
@@ -227,29 +227,30 @@
if (!
-%5B'in', 'out'%5D
+directionTypes
.include
@@ -325,32 +325,25 @@
if (!
-%5B'data', 'flow'%5D
+portTypes
.include
@@ -448,16 +448,17 @@
on, node
+
... |
999eaf51c0f89ada1c744911b8c38243ee8bb7ea | add patientId to relevant upload metrics | app/utils/metrics.js | app/utils/metrics.js | /*
* == BSD2 LICENSE ==
* Copyright (c) 2016, Tidepool Project
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
* This program ... | JavaScript | 0 | @@ -717,16 +717,196 @@
lodash';
+%0Aimport * as actionTypes from '../constants/actionTypes';%0A%0Aconst ADD_PATIENT_EVENTS = %5B%0A actionTypes.UPLOAD_REQUEST,%0A actionTypes.UPLOAD_FAILURE,%0A actionTypes.UPLOAD_SUCCESS,%0A%5D;
%0A%0Aconst
@@ -1040,18 +1040,20 @@
%3E %7B%0A
-le
+cons
t %7B sele
@@ -1064,16... |
16f3851280a32a3cd59df39858a4e2759a6e9e9b | Add checkboxes to load balancers table | public/components/AddLoadBalancer.js | public/components/AddLoadBalancer.js | import React from 'react';
import actions from '../actions/ipsumActions.js';
import { connect } from 'react-redux';
import request from '../util/restHelpers.js';
import { Button, Col, ControlLabel, FormControl, FormGroup, Grid, Panel, Row, Form } from 'react-bootstrap';
import { BootstrapTable, TableHeaderColumn } from... | JavaScript | 0 | @@ -340,16 +340,97 @@
able';%0A%0A
+const selectRowProp = %7B%0A mode: 'checkbox',%0A bgColor: 'rgb(238, 193, 213)',%0A%7D;%0A%0A
class Ad
@@ -1587,21 +1587,16 @@
ectRow=%7B
-this.
selectRo
@@ -2231,16 +2231,32 @@
d=%22apps%22
+ dataSort=%7Btrue%7D
%3EApplica
|
3fba3e53530cdf2ff250e432952440f8a548d344 | Fix closing all tabs. | public/javascripts/Rwiki/TabPanel.js | public/javascripts/Rwiki/TabPanel.js | Ext.ns('Rwiki');
Rwiki.TabPanel = Ext.extend(Ext.TabPanel, {
initComponent: function() {
Ext.applyIf(this, {
region: 'center',
deferredRender: false,
activeTab: 0,
enableTabScroll: true,
defaults: {
autoScroll: true
},
plugins: new Ext.ux.TabCloseMenu(),
tb... | JavaScript | 0 | @@ -2340,24 +2340,41 @@
nel, tab) %7B%0A
+ if (tab) %7B%0A
if (tab.
@@ -2390,24 +2390,26 @@
()) %7B%0A
+
+
return;%0A
@@ -2412,25 +2412,12 @@
+
%7D%0A
-%0A if (tab) %7B
%0A
|
3271089303a99fbba6b08b992eeca8844071801b | Add createElements method to Dialog component | app/assets/javascripts/comfortable_mexican_sofa/admin/modules/Dialog.js | app/assets/javascripts/comfortable_mexican_sofa/admin/modules/Dialog.js | define([
'jquery',
'DoughBaseComponent',
'eventsWithPromises'
], function (
$,
DoughBaseComponent,
eventsWithPromises
) {
'use strict';
var DialogProto,
defaultConfig = {
// uiEvents: {}
selectors: {
target: '[data-dialog-target]',
trigger: '[data-dialog-trigge... | JavaScript | 0.000001 | @@ -569,16 +569,46 @@
onfig);%0A
+ console.log(this.config);%0A
%7D%0A%0A D
@@ -730,41 +730,39 @@
-console.log(this.isInitialised);%0A
+if(!this.containerCreated) %7B%0A
@@ -776,32 +776,38 @@
eateElements();%0A
+ %7D%0A
this._setupE
@@ -1097,19 +1097,22 @@
oto.
-isInitialis
+containerCre... |
9e848ee3c37602616a825b187459accc45c02250 | Remove lastX and lastY, but kept the support | src/libs/firstPersonControls.js | src/libs/firstPersonControls.js | /**
* @author mrdoob / http://mrdoob.com/
* @author schteppe / https://github.com/schteppe
* @author alex2401 / https://github.com/sasha240100
*/
const PI_2 = Math.PI / 2;
var PointerLockControls = function ( camera, mesh, params) {
/* Velocity properties */
var velocityFactor = 1, //Same as 20 * 0.05
... | JavaScript | 0 | @@ -170,16 +170,564 @@
PI / 2;%0A
+ if(!MouseEvent.prototype.hasOwnProperty('movementX') && !MouseEvent.prototype.hasOwnProperty('mozMovementX'))%7B //Checks for support%0A //Not very stable, it's a solution that just works ! %0A MouseEvent.prototype.lastX = 0,%0A MouseEvent.prototype.lastY = 0;%0A MouseEvent.prot... |
cce09850af44f64af0539e12bfbe6bc071a29612 | Test inputCurrency setting default format @bug W-2977553@ @rev smo@ @rev ctatlah@later | aura-components/src/main/components/ui/inputCurrency/inputCurrencyTest.js | aura-components/src/main/components/ui/inputCurrency/inputCurrencyTest.js | /*
* Copyright (C) 2013 salesforce.com, inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | JavaScript | 0.000001 | @@ -1019,32 +1019,368 @@
%7D%0A %7D,
+%0A %0A /**%0A * Test that the format is set by default%0A */%0A testDefaultFormat : %7B%0A %09test : function(component) %7B%0A %09%09var expectedFormat = %22%C2%A4#,##0.00%22;%0A %09%09var format = component.get('v.format');%0A %09%09$A.te... |
eef768711c0912d4e2bc6f3e94998ea95881824f | Refactor createSpec to use importer feature instead of string replacement | test/tools/createSpec.js | test/tools/createSpec.js | 'use strict';
var sass = require('node-sass');
var fs = require('fs');
var path = require('path');
var testFolder = path.resolve(__dirname, '../');
var error = 'error';
var filesWithTildeImports = [
'imports', 'import-other-style', 'import-css'
];
function createSpec(ext) {
var basePath = path.join(testFolde... | JavaScript | 0 | @@ -167,91 +167,8 @@
or';
-%0Avar filesWithTildeImports = %5B%0A 'imports', 'import-other-style', 'import-css'%0A%5D;
%0A%0Afu
@@ -251,25 +251,48 @@
var
-node
+test
Module
-s
Path =
+ path.relative(basePath,
pat
@@ -328,108 +328,25 @@
les'
-);%0A var tildeReplacement = path.relative(basePath, nodeModules... |
229948cbd433584f3878fa161ec0967f47f6595e | Revert "WIP to allow rule configs to be functions (going to revert immediately, because there are some perf consequences here, so I'll need to revisit)" | lib/lint_js.js | lib/lint_js.js | var _ = require('lodash');
var eslint = require('eslint');
var ESLINT_CONFIG = require('./config/eslint');
var glob = require('glob');
var path = require('path');
var customRules = {};
var reactRules = require('eslint-plugin-react').rules;
_.defaults(customRules, reactRules);
var convertNameToRuleId = function(item... | JavaScript | 0 | @@ -863,29 +863,8 @@
ig =
- context.lintConfig =
_.m
@@ -892,172 +892,8 @@
);%0A%0A
-%09config.rules = _.mapValues(%0A%09%09config.rules,%0A%09%09function(item, index) %7B%0A%09%09%09if (_.isFunction(item)) %7B%0A%09%09%09%09item = item(context, index);%0A%09%09%09%7D%0A%0A%09%09%09return item;%0A%09%09%7D%0A%09);%... |
4b4a75ff11defe85673c8d1226df7704e64920ec | Fix Unexpected space before function parentheses (space-before-function-paren) | src/ably.js | src/ably.js | 'use strict';
var AblyTest = require('./ably-test');
var AblySubscriber = require('./ably-subscriber');
var Ably = function Ably(namespace) {
var self = this;
function relayPendingSubscribers(test) {
var unmatchedSubscribers = [],
pendingSubscriber;
for (var i = 0; i < self.pendi... | JavaScript | 0.998839 | @@ -4737,25 +4737,24 @@
n = function
-
(testName, v
@@ -4769,24 +4769,24 @@
callback) %7B%0A
+
var
@@ -5465,17 +5465,16 @@
function
-
(options
@@ -5877,17 +5877,16 @@
function
-
(tests)
@@ -6024,17 +6024,16 @@
function
-
(name) %7B
@@ -6232,24 +6232,24 @@
ound');%0A%7D;%0A%0A
+
Ably.prototy
@@... |
e25cd1d8f4708053a6c51ea98bd3535a224b6834 | paperjs/int-of-color - Refactor building of shapes to allow for complexity | paperjs/interaction-of-color/classes/plate_viewer.js | paperjs/interaction-of-color/classes/plate_viewer.js | class PlateViewer {
constructor(p_xSizeAndPos){
this.sizeAndPosition = p_xSizeAndPos;
}
get x(){ return this.sizeAndPosition.x; }
get y(){ return this.sizeAndPosition.y; }
get width(){ return this.sizeAndPosition.width; }
get height(){ return this.sizeAndPosition.height; }
get aspectRatio(){ return t... | JavaScript | 0.999999 | @@ -627,20 +627,181 @@
-switch (part
+let shape = this.buildShape(part);%0A shape.fillColor = this.colorFrom(part.color);%0A this.shapeGroup.addChild(shape);%0A %7D%0A%0A buildShape(shapeData)%7B%0A switch (shapeData
.sha
@@ -845,20 +845,25 @@
iewRect(
-part
+shapeData
);%0A
@@ -907,20 +907,25 ... |
97c76817eff6f7707f251a5fe6162482abce52d1 | switch dbURI to production db | app_api/models/db.js | app_api/models/db.js | // VARIABLE DECLARATIONS AND CONNECTION STRING
var mongoose = require('mongoose');
var gracefulShutdown;
//////////////////////////////////////////////
// DB CONNECTION STRINGS (DB URI) ISSUES //
//////////////////////////////////////////////
// for dev and production environments.
// mLab db info in LastP... | JavaScript | 0.000001 | @@ -862,16 +862,19 @@
B DB%0A
+ //
var dbU
@@ -906,27 +906,24 @@
/Loc8r';%0A
- //
var dbURI =
|
adc8ef12c72b1c3245c2e3851dea920e98a745c8 | Update listings. | lib/listing.js | lib/listing.js | 'use strict';
/** Load other modules. */
var _ = require('lodash'),
mapping = require('./mapping.js'),
util = require('./util.js');
/** Native method references. */
var push = Array.prototype.push;
/*----------------------------------------------------------------------------*/
/** List of all object proper... | JavaScript | 0 | @@ -1248,104 +1248,15 @@
'
-ctorByTag',%0A 'freeGlobal',%0A 'nonEnumProps',%0A 'reWords',%0A 'shadowProps',%0A 'support
+reWords
',%0A
@@ -2024,23 +2024,8 @@
ain'
-,%0A 'support'
%0A %5D
@@ -2406,25 +2406,8 @@
, %5B%0A
- 'arrayCopy',%0A
@@ -2481,125 +2481,32 @@
'
-arrayMax',%0A ... |
5517972aa1d2844939fd7237fb3efe2635a11010 | Fix throttle in resize | src/slate/block-decorators/resize.js | src/slate/block-decorators/resize.js | import React, { Component, PropTypes } from 'react';
import { throttleInput } from 'olymp';
import { findDOMNode } from 'react-dom';
import { DraggableCore } from 'react-draggable';
import cn from 'classnames';
const Cover = ({ children, style }) => (
<div style={{ backgroundColor: 'black', position: 'absolute', top... | JavaScript | 0.000002 | @@ -1753,24 +1753,29 @@
ct();%0A
+this.
throttle(()
|
a729527309bd70e2037db2b414ac5c1d59c36b91 | Fix test (promise was not being resolved the other way) | test/unit/model-stats.js | test/unit/model-stats.js | 'use strict';
const chai = require('chai');
const expect = chai.expect;
chai.use(require('chai-as-promised'));
var stats = require('../../models').Stats;
describe('Stats', function() {
it('should exist', function() {
expect(stats).to.exist;
})
const TESTING_KEY = 'testing';
const TESTING_VALUE = 5;
describe... | JavaScript | 0 | @@ -395,26 +395,22 @@
ion(
-done
) %7B%0A%09%09%09
-expect(
+return
stat
@@ -451,40 +451,8 @@
LUE)
-).to.eventually.be.ok;%0A%09%09%09done()
;%0A%09%09
|
e988f71bbffe923dda82ea823eed7159f911aa57 | remove dep on jquery. refactor: consolidate var def | lib/SpyGame.js | lib/SpyGame.js | (function(exports, $, console, undefined) {
'use strict';
var playerWeights = [],
locationWeighting = [],
playerSpyWeightDiff = 10,
playerStartingWeight = 100;
var locations = [
'Airplane',
'Bank',
'Beach',
'Casino',
'Church / Cathedral',
'Circus tent',
'Work Office party',
'Cas... | JavaScript | 0.967083 | @@ -15,11 +15,8 @@
rts,
- $,
con
@@ -2572,16 +2572,17 @@
ghtDiff)
+
%7B%0D%0A%09%09var
@@ -2598,31 +2598,69 @@
ghts = 0
+,%0D%0A%09%09%09i, %0D%0A%09%09%09weightedIndex, %0D%0A%09%09%09weighting
;%0D%0A
-%09
%09%09for (
-var
i = 0; i
@@ -2693,17 +2693,16 @@
i++) %7B%0D%0A
-%09
%09%09%09sumOf
@@ -2734,21 +2... |
515152b3e6c1847387327a549cbbbbd37a0c37e8 | Set `contentTypeJson` default to true | src/storage_manager/config/config.js | src/storage_manager/config/config.js | module.exports = {
// Prefix identifier that will be used inside storing and loading
id: 'gjs-',
// Enable/Disable autosaving
autosave: 1,
// Indicates if load data inside editor after init
autoload: 1,
// Indicates which storage to use. Available: local | remote
type: 'local',
// If autosave enab... | JavaScript | 0.000372 | @@ -1392,20 +1392,19 @@
peJson:
-fals
+tru
e,%0A%0A cr
|
ee1f958d1855b5fc6935191c8f6fd42c99e1fa4b | Fix url matching to id. | src/alza.js | src/alza.js | import _request from 'request-promise'
const jar = _request.jar()
const request = _request.defaults({
headers: {'Content-Type': 'application/json'},
jar,
})
const SCV='https://www.alza.sk/Services/EShopService.svc/'
export function* login(credentials) {
return yield request.post(`${SCV}LoginUser`, {body: JSON.... | JavaScript | 0 | @@ -368,21 +368,18 @@
dToCart(
-itemU
+%7Bu
rl, coun
@@ -379,16 +379,17 @@
l, count
+%7D
) %7B%0A co
@@ -401,13 +401,9 @@
d =
-itemU
+u
rl.m
@@ -412,24 +412,33 @@
ch(/
-d
+(d%7Cdq=)
(%5Cd*)
+(
%5C.htm
+)?
$/)%5B
-1
+2
%5D%0A
|
3fc689a60ff3443c44e7efcac3b51492c00e92ca | Use utilsHelper beforeAfter method | lib/mongoat.js | lib/mongoat.js | 'use strict';
var Mongoat = require('mongodb');
var utilsHelper = require('../helpers/utils-helper');
var connect = Mongoat.MongoClient.connect;
var hooks = {
before: {},
after: {}
};
Mongoat.Collection.prototype.before = function(optName, callback) {
if (hooks.before[optName] === undefined) {
hooks.before[... | JavaScript | 0.000001 | @@ -224,33 +224,32 @@
re = function(op
-t
Name, callback)
@@ -256,274 +256,66 @@
%7B%0A
-if (
hooks
-.before%5BoptName%5D === undefined) %7B%0A hooks.before%5BoptName%5D = %5B%5D;%0A %7D%0A%0A var promisedCallback = function (query) %7B%0A return new Promise(function(resolve, reject) %7B%0A return r... |
d294f81af95903064ec9d56cc4a720915d5696ba | Remove unnecessary toString call. | lib/monitor.js | lib/monitor.js | /**
* Module dependencies.
*/
var http = require('http');
var url = require('url');
/**
* Monitor constructor
*
* The monitor pings the checks regularily and saves the response status and time.
* The monitor doesn't interact with the model classes directly, but instead uses
* the REST HTTP API. This way, the m... | JavaScript | 0 | @@ -2545,19 +2545,8 @@
hunk
-.toString()
;%0A
|
d6391e2e54c9d3c3d5665e83b1fa3519fcfd3b63 | comment test | public/js/groups/mainScreen.js | public/js/groups/mainScreen.js | const groupsDB = DB.child("groups");
function showFooterGroupsBtn(){
convertTemplate("#footerBtn-tmpl", {}, "footer");
}
function showMemberGroupsPage(){
DB.child("users/"+userUuid+"/membership").once("value", function(groups){
var groupsUnderMebership = groups.val();
if (groupsUnderMebership != null){
... | JavaScript | 0.000002 | @@ -1,12 +1,22 @@
+//comment%0A
const groups
|
1655ae60f4c7ccb917d9705096b678703090a88f | Refactor to use doJsonRequest | lib/melilib.js | lib/melilib.js |
'use strict';
var http = require('https');
var url = require('url');
// From liqueed project (no post data, cookies)
function doRequest(method, pageurl, cb) {
var urldata = url.parse(pageurl);
if (!cb) {
cb = data;
data = null;
}
var options = {
host: urlda... | JavaScript | 0 | @@ -948,82 +948,75 @@
ion
-getSites(cb) %7B%0D%0A doRequest('GET', 'https://api.mercadolibre.com/sites/'
+doJsonRequest(method, pageurl, cb) %7B%0D%0A doRequest(method, pageurl
, fu
@@ -1248,17 +1248,10 @@
Site
+s
(
-siteId,
cb)
@@ -1251,32 +1251,36 @@
es(cb) %7B%0D%0A do
+Json
Request('GET', '
@@ -1... |
96c2a36c04ee409518d84df81b271c22570f3169 | Revert "changess" | Main.js | Main.js | /**
*
*/
VK.init({
apiId: 1755175
});
var WRONG_TEXT = 'Something goes wrong. Enter valid post address.';
var grp = '';
var us = '';
var grpAvatar = '';
var obj = [];
var parsed = [0, 0];
var grCount = 0;
var grOffset = 0;
var sexArray = [];
var manpos = [];
var wompos = [];
var wArray = [];
var mArray = [... | JavaScript | 0 | @@ -932,16 +932,18 @@
+//
groupVie
@@ -980,47 +980,78 @@
- waiting(
+%7D%0A%09%7D
);%0A
+%0A
-%7D%0A%09%7D);%0A %0A
+groupViewChanges(getGroupData());%0A waiting();//wait
%0A
@@ -1128,16 +1128,37 @@
ffset)%7B
+//,memCount,offset) %7B
%0A var
|
7f7a8dd432a24b9af22037e7c1b9ce7605e8624b | Change `containerID` to `existingTag`. | assets/js/modules/tagmanager/components/common/SetupUseSnippetSwitch.js | assets/js/modules/tagmanager/components/common/SetupUseSnippetSwitch.js | /**
* Tag Manager Setup Use Snippet Switch component.
*
* Site Kit by Google, Copyright 2022 Google LLC
*
* 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
*
* https://www.apache.org... | JavaScript | 0.000001 | @@ -1132,27 +1132,27 @@
%0A%09const
-containerID
+existingTag
= useSe
@@ -1270,27 +1270,27 @@
rID ===
-containerID
+existingTag
%0A%09%09%09? sp
@@ -1562,35 +1562,35 @@
%09%09%09%09),%0A%09%09%09%09%09
-containerID
+existingTag
%0A%09%09%09 )%0A%09%09%09:
@@ -1859,19 +1859,19 @@
%09%09%09%09
-containerID
+ex... |
5e8dd9523104f53ca17b6693df06065f3fed5f55 | Make `basePullAt` uninlinable. | lib/listing.js | lib/listing.js | 'use strict';
/** Load other modules. */
var _ = require('lodash-compat'),
mapping = require('./mapping.js'),
util = require('./util.js');
/** Native method references. */
var push = Array.prototype.push;
/*----------------------------------------------------------------------------*/
/** List of all object... | JavaScript | 0.000004 | @@ -3123,24 +3123,42 @@
sProperty',%0A
+ 'basePullAt',%0A
'baseRan
|
2e67161c2322c0495a2764d6fb6b1b41deb84c00 | update jsdoc with macro license (#105) | .jsdoc.js | .jsdoc.js | // Copyright 2019 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | JavaScript | 0 | @@ -583,16 +583,213 @@
ense.%0A//
+%0A// ** This file is automatically generated by gapic-generator-typescript. **%0A// ** https://github.com/googleapis/gapic-generator-typescript **%0A// ** All changes to this file may be overwritten. **
%0A%0A'use s
|
4c5390e1064b03ee786d53cf797171b0334f32bf | Fix test. | src/test/js/components/perfPages/formFields/dateRangePicker.test.js | src/test/js/components/perfPages/formFields/dateRangePicker.test.js | import React from 'react';
import { render } from '@testing-library/react';
import DateRangePicker from '../../../../../js/components/perfPages/formFields/dateRangePicker';
describe('Choice Field', () => {
test('Renders simple DateRangePicker', () => {
const { getByPlaceholderText } = render(<DateRangePicker />... | JavaScript | 0.000001 | @@ -257,32 +257,35 @@
%0A const %7B get
+All
ByPlaceholderTex
@@ -325,32 +325,35 @@
;%0A expect(get
+All
ByPlaceholderTex
@@ -368,34 +368,36 @@
a Date')).to
-BeVisible(
+HaveLength(2
);%0A %7D);%0A%0A
@@ -465,16 +465,19 @@
st %7B get
+All
ByPlaceh
@@ -488,24 +488,31 @@
rText, getBy
+Display
Value %7D... |
79908a953eba3c4f62953f98d30f4043d3eafdd8 | use the jsdoc-fresh theme (#164) | .jsdoc.js | .jsdoc.js | /*!
* Copyright 2018 Google LLC. 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
*
* Unless required by appli... | JavaScript | 0 | @@ -754,16 +754,13 @@
doc-
-baseline
+fresh
',%0A
|
b3be9c4c8c2066450d2939ddaa19754e504ef00a | Fix mode of node-babylonjs-blender-install.js. | bin/node-babylonjs-blender-install.js | bin/node-babylonjs-blender-install.js | #!/usr/bin/env node
'use strict';
const crossSpawn = require('cross-spawn');
const fs = require('fs');
const https = require('https');
const nodeGetopt = require('node-getopt');
const path = require('path');
const request = require('request').defaults({ strictSSL: true, });
const opt = nodeGetopt.create([
... | JavaScript | 0 | |
47f66775147922a14ad270fe2ea4abbde904440b | update jsdoc.js (#189) | .jsdoc.js | .jsdoc.js | // Copyright 2019 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | JavaScript | 0 | @@ -1034,9 +1034,9 @@
201
-8
+9
Goo
@@ -1153,16 +1153,71 @@
'lumen'
+,%0A default: %7B%0A %22outputSourceFiles%22: false%0A %7D
%0A %7D,%0A
|
fd90fc86d14de0bf0820b266ecc458950f22fb57 | add a small test [use saucelabs] | cms/tests/frontend/unit/cms.base.test.js | cms/tests/frontend/unit/cms.base.test.js | describe('cms.base.js', function () {
it('creates CMS namespace', function () {
expect(CMS).toBeDefined();
expect(CMS).toEqual(jasmine.any(Object));
expect(CMS.API).toEqual(jasmine.any(Object));
expect(CMS.KEYS).toEqual(jasmine.any(Object));
expect(CMS.BREAKPOINTS).toEqual(ja... | JavaScript | 0 | @@ -329,24 +329,63 @@
y(Object));%0A
+ expect(CMS.$).toEqual(jQuery);%0A
%7D);%0A%7D);%0A
|
3259ca5a818a34e336a6906a34f690a1fb324f1e | Rewrite error messages to use the server message | lib/akismet.js | lib/akismet.js |
/*
* akismet.js
* Provide Nodejs API bindings to the Akismet web service
* "Ham" refers to anything not spam
* See README for more info
*/
var Promise = require('bluebird');
var request = require('superagent');
require('setimmediate'); // Shim to support setImmediate in Node 0.8.x
Promise.promisifyAll(reque... | JavaScript | 0 | @@ -3607,36 +3607,37 @@
endAsync()%0A .
-then
+catch
(function(res) %7B
@@ -3634,53 +3634,48 @@
ion(
-res
+err
) %7B
-
%0A
-if (res.statusType == 2) return
+var msg = err.response.text
;%0A
@@ -3690,32 +3690,27 @@
w new Error(
-res.text
+msg
);%0A %7D)%0A
@@ -4688,36 +4688,37 @@
endAsync()%0A ... |
f38f4c5696afa343f6fa205710f56e224c2593d3 | Use .exec when testing handlers. | test/integration/helpers/adapterMethod.helper.js | test/integration/helpers/adapterMethod.helper.js | /**
* Module dependencies
*/
var assert = require('assert'),
should = require('should'),
util = require('util'),
_ = require('lodash');
/**
* Helper class for more literate asynchronous tests.
* @param {Object} config
*/
var Deferred = function (config) {
var deferred = this;
var state = {
... | JavaScript | 0 | @@ -1905,25 +1905,23 @@
tx, args
-.concat(%5B
+).exec(
%7B%0A
@@ -2659,18 +2659,16 @@
%7D
-%5D)
);%0A%0A
|
7bb048f0c41f09f5e5fd199722f8ab29eff26ab0 | Send dummy message at booting time | lib/arduino.js | lib/arduino.js | var serialPort = require('serialport');
var SerialPort = require('serialport').SerialPort;
var arduinoPort;
var connected = false;
var tag = '[Arduino] ';
var TAG_MESSAGE = "[MESSAGE]";
var TAG_NOTIFICATION = "[NOTIFICATION]";
// 5초마다 포트 상태 확인 및 연결
setInterval(function() {
connectToArduino();
}, 5000);
function co... | JavaScript | 0 | @@ -1422,32 +1422,142 @@
%0A %7D);
+%0A%0A for(var i = 10; i %3E= 10; i--) %7B%0A setTimeout(sendMessage, 100*i, i);%0A %7D
%0A %7D);%0A
|
6cdabae3654f1bd6efafe2bae96f8c62555addf8 | Remove bottom margins for `Message.Content` [skip ci] | src/components/Message/styles/Content.css.js | src/components/Message/styles/Content.css.js | import baseStyles from '../../../styles/resets/baseStyles.css'
import { BEM } from '../../../utilities/classNames'
const bem = BEM('.c-MessageContent')
const css = `
${baseStyles}
margin-bottom: 20px;
${bem.element('content')} {
max-width: 500px;
text-align: left;
&.is-rtl {
direction: rtl;
... | JavaScript | 0 | @@ -180,31 +180,8 @@
les%7D
-%0A margin-bottom: 20px;
%0A%0A
|
5e3ef775d55c9b7024155c6b517ff3f5525eb560 | remove naughty fdescribe from utils spec | aio/transforms/examples-package/utils.spec.js | aio/transforms/examples-package/utils.spec.js | const { mapObject, parseAttributes } = require('./utils');
fdescribe('utils', () => {
describe('mapObject', () => {
it('creates a new object', () => {
const testObj = { a: 1 };
const mappedObj = mapObject(testObj, (key, value) => value);
expect(mappedObj).toEqual(testObj);
expect(mappedOb... | JavaScript | 0 | @@ -53,17 +53,16 @@
ils');%0A%0A
-f
describe
|
3c11be64f25e77f0cfa63319f2ef6a09dcbf25fa | Make sure that we dont try to set a value on a non-exist object | lib/message.js | lib/message.js | var messageOptions = require("./message-options");
function Message(raw) {
if (!(this instanceof Message)) {
return new Message(raw);
}
if (!raw) {
raw = {};
}
var params = {};
Object.keys(raw).forEach(function(param) {
if(messageOptions[param]) {
para... | JavaScript | 0.000003 | @@ -726,32 +726,125 @@
= arguments%5B1%5D;%0A
+ if(!this.params.notification) %7B%0A this.params.notification = %7B%7D;%0A %7D%0A
return t
@@ -1312,32 +1312,109 @@
= arguments%5B1%5D;%0A
+ if(!this.params.data) %7B%0A this.params.data = %7B%7D;%0A %7D%0A
... |
d3aebc398fbe2613468322608ab75bc5bfadaaa7 | Resolve eslint param-reassign failure. | src/components/core/translate/translateTo.js | src/components/core/translate/translateTo.js | export default function (translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {
const swiper = this;
const {
params,
} = swiper;
if (swiper.animating && params.preventInteractionOnTransition) {
return false;
}
const minTranslate = swiper.minTranslate();... | JavaScript | 0 | @@ -360,16 +360,36 @@
late();%0A
+ let newTranslate;%0A
if (tr
@@ -423,33 +423,36 @@
%3E minTranslate)
-t
+newT
ranslate = minTr
@@ -516,17 +516,20 @@
nslate)
-t
+newT
ranslate
@@ -544,16 +544,49 @@
anslate;
+%0A else newTranslate = translate;
%0A%0A // U
@@ -624,17 +624,20 @@
rogress(
-t
+newT
ranslat... |
8001ece2d2103da7d3ee71bc24b995e2047e5d7c | Add support for custom readOnly fields | src/components/generators/ModelDetailForm.js | src/components/generators/ModelDetailForm.js | import _ from 'lodash' // eslint-disable-line
import React, {PropTypes} from 'react'
import warning from 'warning'
import {Row, Col, Button, Glyphicon} from 'react-bootstrap'
import {reduxForm, Field} from 'redux-form'
import SmartInput from '../inputs/SmartInput'
export class ModelDetailForm extends React.Component {... | JavaScript | 0 | @@ -961,16 +961,390 @@
%7C%7C key%0A
+%0A if (modelField.readOnly && modelField.display) %7B%0A return (%0A %3Cdiv key=%7Bkey%7D className=%22form-group%22%3E%0A %3Clabel className=%22control-label%22%3E%7BmodelField.label %7C%7C fieldName%7D%3C/... |
a033a73f184d5f42021b78fbc1fc2c0ebaf34df9 | add fix for node v0.5.0-pre, use evals.NodeScript when evals.Script not available, closes #46 | lib/modules.js | lib/modules.js | var fs = require('fs'),
path = require('path'),
async = require('../deps/async'),
utils = require('./utils'),
Script = process.binding('evals').Script;
// As modules are added, their original file paths are added to this object
// eg: {'lib': {'mymodule': '/home/user/project/lib/mymodule.js'}, ...}
ex... | JavaScript | 0 | @@ -119,22 +119,21 @@
'),%0A
-Script
+evals
= proce
@@ -151,17 +151,57 @@
'evals')
-.
+,%0A Script = evals.Script %7C%7C evals.Node
Script;%0A
|
f9548996a28076e568668ea52882e30c39fb09ea | Rename updateBoundingBox to updateBoundries | src/Collidable.js | src/Collidable.js | /**
* CG Space Invaders
* CG45179 16'17
*
* @author: Rui Ventura ( ist181045 )
* @author: Diogo Freitas ( ist181586 )
* @author: Sara Azinhal ( ist181700 )
*/
import { Box3 } from './lib/threejs/math/Box3';
import { Sphere } from './lib/threejs/math/Sphere';
import GameObject from './GameObject';
class Collid... | JavaScript | 0 | @@ -428,38 +428,36 @@
this.updateBound
-ingBox
+ries
= false;%0A%0A%09%09thi
@@ -1026,22 +1026,20 @@
ateBound
-ingBox
+ries
) %7B%0A%0A%09%09
@@ -1055,22 +1055,20 @@
ateBound
-ingBox
+ries
= false
|
53ce7bac1c471772abb6e25f1850e9eaf703bfa9 | Fix for Safari js strictness for profiles page | public/js/profiles.js | public/js/profiles.js | $(document).ready(function () {
ConvertTimeStamps();
});
function ConvertTimeStamps() {
var m_names = new Array("Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec");
var d_names = new Array("Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat");
$('#profiles tr').each(function()... | JavaScript | 0 | @@ -26,17 +26,24 @@
n () %7B%0D%0A
-%09
+
ConvertT
@@ -95,17 +95,24 @@
ps() %7B%0D%0A
-%09
+
var m_na
@@ -216,17 +216,24 @@
Dec%22);%0D%0A
-%09
+
var d_na
@@ -300,17 +300,24 @@
Sat%22);%0D%0A
-%09
+
$('#prof
@@ -348,87 +348,288 @@
)%7B%0D%0A
-%09 %09dt = new Date($(this).find(%... |
77348b59e621e59e43538ab2db16e26b26ea4e3b | Set option to produce 'div's instead of 'p's | src/core.js | src/core.js | (function(undefined) {
var Util = require("./util.js");
var Perseus = window.Perseus = {
Util: Util
};
Perseus.init = function(options) {
_.defaults(options, {
// Pass skipMathJax: true if MathJax is already loaded and configured.
skipMathJax: false,
// A function which takes a file o... | JavaScript | 0.000157 | @@ -647,16 +647,131 @@
ze: true
+,%0A paragraphFn: function(text) %7B%0A return React.DOM.div(%7BclassName: 'paragraph'%7D, text);%0A %7D
%0A %7D);
|
97d769cd33f76b97877ff6bc000e4e775e96e87e | Fix bug pass hubot on parameter | src/core.js | src/core.js | 'use strict';
const util = require('util');
const path = require('path');
const Bot = require('slackbots');
const db = require('./lib/db');
const Hubot = require('./hubot');
const log = require('./lib/log');
const i18n = require('./lib/i18n');
const firstRun = require('./first-run');
const Assembler = require('./ass... | JavaScript | 0 | @@ -1551,16 +1551,22 @@
(message
+, this
);%0A%7D;%0A%0Af
@@ -1586,32 +1586,39 @@
eMessage(message
+, hubot
) %7B%0A if (isChat
@@ -1745,20 +1745,21 @@
raction(
-this
+hubot
, messag
@@ -1814,20 +1814,21 @@
irstRun(
-this
+hubot
, messag
@@ -1884,20 +1884,21 @@
essage,
-this
+hubot
);%0A %7D
|
2ccf3a66c5489d76e25b59d3db2c7cf8ea211283 | Simplify choosing a letter (and also about twice as fast) | lib/passgen.js | lib/passgen.js | (function() {
/*
* Generate a random token.
*/
function create(len, alphabet) {
var result = '';
if (!alphabet) alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
var alphabetLength = alphabet.length;
if ((len === undefined) || isNaN(len)) len = 64;
for (var i = 0; i < len; ... | JavaScript | 0.000002 | @@ -402,32 +402,13 @@
abet
-.substring(rnd, rnd + 1)
+%5Brnd%5D
;%0A%09%09
|
b508ac903e2d48fa8cc5bc55b31059f9c64eaac2 | Fix left arrow in SourceTree (#6699) | src/utils/sources-tree/updateTree.js | src/utils/sources-tree/updateTree.js | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
// @flow
import { addToTree } from "./addToTree";
import { collapseTree } from "./collapseTree";
import { creat... | JavaScript | 0 | @@ -1433,17 +1433,20 @@
rentMap(
-s
+newS
ourceTre
|
e3baaa923673a8ac188f68949e1ccd15fcd95925 | Revert "lazy loading for modules." | lib/blessed.js | lib/blessed.js | /**
* Blessed
* A curses-like library for node.js.
* Copyright (c) 2013, Christopher Jeffrey (MIT License).
* https://github.com/chjj/blessed
*/
/**
* Modules
*/
function define(names, callback) {
if (!Array.isArray(names)) names = [names];
names.forEach(function(name) {
blessed.__defineGetter__(name, ... | JavaScript | 0 | @@ -168,528 +168,138 @@
*/%0A%0A
-function define(names, callback) %7B%0A if (!Array.isArray(names)) names = %5Bnames%5D;%0A names.forEach(function(name) %7B%0A blessed.__defineGetter__(name, callback);%0A %7D);%0A%7D%0A%0Afunction load(name) %7B%0A load.modules = load.modules %7C%7C %7B%7D;%0A if (load.module... |
63225488e35294ed0610beb98ec5324b1993659d | Update documentation for cancelling portin | lib/portIns.js | lib/portIns.js | "use strict";
var Client = require("./client");
var PORTIN_PATH = "portIns";
module.exports = {
cancel : function (client, portInsId, callback) {
if (arguments.length === 2) {
callback = portInsId;
portInsId = client;
client = new Client();
}
var data = {
state : "cancelled"
};
client.makeRequ... | JavaScript | 0 | @@ -92,16 +92,265 @@
ts = %7B%0A%0A
+%09/**%0A%09 * Cancels a portin based on portInsID%0A%09 * @param client Client instance%0A %09 * @param portInsId Id of portIn%0A %09 * @param callback callback function%0A %09 * @example%0A %09 * bandwidth.PortIns.cancel(client, %22portInsId%22, function(err, number)%7B%7D);%0A%0... |
a0df4e6e715f29c9e60281a70e83d9de854f86e1 | Fix incorrect log type in readFile | src/data.js | src/data.js | /**
* NTwitBot - data.js
* @file File & database IO interface.
* @author Jordan Sne <jordansne@gmail.com>
* @license MIT
*/
const fs = require('fs');
/**
* Database & IO handler class.
*/
module.exports = class Data {
/**
* Initialize the class.
* @param {Util} utils - The utilities object neede... | JavaScript | 0.000019 | @@ -5020,24 +5020,29 @@
is.utils.log
+Error
('I/O: Faile
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.