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 |
|---|---|---|---|---|---|---|---|
e9fbd5d94d68dda3b2b92accbc663c9da509bbc6 | Add a warning to the use of the 'fire' from FireBehavior | polygerrit-ui/app/behaviors/fire-behavior/fire-behavior.js | polygerrit-ui/app/behaviors/fire-behavior/fire-behavior.js | /**
* @license
* Copyright (C) 2019 The Android Open Source Project
*
* 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 require... | JavaScript | 0.000044 | @@ -1429,24 +1429,105 @@
options) %7B%0A
+ console.warn('%5C'fire%5C' is deprecated, please use dispatchEvent instead!');%0A
option
|
0c5a31e2dd0db3793586340c0b93f530f7ca8990 | Add alert for covid chatbot sunset on May 15 (#20906) | src/applications/coronavirus-chatbot/createCoronavirusChatbot.js | src/applications/coronavirus-chatbot/createCoronavirusChatbot.js | import React from 'react';
import ReactDOM from 'react-dom';
import './sass/coronavirus-chatbot.scss';
export default async (store, widgetType) => {
// Derive the element to render our widget.
const root = document.querySelector(`[data-widget-type="${widgetType}"]`);
if (root) {
const {
ChatbotWrapper,... | JavaScript | 0 | @@ -413,16 +413,17 @@
pper');%0A
+%0A
Reac
@@ -434,16 +434,596 @@
.render(
+%0A %3C%3E%0A %3Cva-alert%0A close-btn-aria-label=%22Close notification%22%0A status=%22info%22%0A visible%0A %3E%0A %3Ch3 slot=%22headline%22%3E%0A This chatbot won%E2%80... |
d75d9ea50625f51ee845c48c296a0016b36446a8 | Refactor node-tech-http methods | techAvSched.js | techAvSched.js | /**
*
* @param options.url
* @param options.secret
*/
module.exports = function(options, http) {
return {
/**
* Schedule a job
*
* @param {Object} requestBody The job definition
*/
scheduleJob: function(ruuid, requestBody) {
return http.p... | JavaScript | 0.000001 | @@ -315,32 +315,55 @@
http.post(ruuid,
+ %7B%0A url:
options.url + %22
@@ -386,41 +386,43 @@
ef%22,
- requestBody, null, null, null, %7B
+%0A body: requestBody,
%0A
@@ -754,24 +754,47 @@
.post(ruuid,
+ %7B%0A url:
options.url
@@ -824,19 +824,45 @@
on/ack%22,
- %7... |
a971027f0601510979febdc5d4940417d9759caa | Use jQuery's each() function instead of Array.forEach(). Also simplify an if statement. | share/spice/whois/whois.js | share/spice/whois/whois.js | (function (env) {
"use strict";
// turns on/off debugging output
var is_debug = false;
// spice callback function
env.ddg_spice_whois = function(api_output) {
// for debugging
if(is_debug) console.log('api_output:', api_output);
// Check for API error and exit early if found
// ... | JavaScript | 0 | @@ -3540,20 +3540,19 @@
l;%0A%09
-arr.forEach(
+$.each(arr,
fun
@@ -3557,16 +3557,23 @@
unction(
+index,
obj) %7B%0A%09
@@ -3580,101 +3580,254 @@
-if(obj && typeof obj%5Bkey%5D !== 'undefined' && obj%5Bkey%5D !== '') %7B%0A%09%09if(!first) first = obj%5Bkey%5D
+// get the value at the specified key%0A%09 ... |
311780ff4db7ef6cf653308d8cd98a2abbf399d5 | Fix missing Range import | app/views/lib/Chart/InnerChart.js | app/views/lib/Chart/InnerChart.js | import React from 'react';
import pureRender from '../../../util/pureRender';
import { Iterable } from 'immutable';
import Measure from './Measure';
import Note from './Note';
/**
* This piece is kept separate because it only re-renders if the following props change:
*
* - Notes
* - Number of measures in song
* ... | JavaScript | 0.000091 | @@ -88,16 +88,23 @@
Iterable
+, Range
%7D from
|
1ce9482721917fa007346d42f6a314819096c114 | replace card text if cart is empty | public/app.js | public/app.js | function something()
{
var x = window.localStorage.getItem('bbb'); //x = hh['bbb']
x = x * 1 + 1; //x = x + 1
window.localStorage.setItem('bbb', x); //hh['bbb'] = x
alert(x);
}
function add_to_cart(id)
{
var key = 'product_' + id;
var x = window.localStorage.getItem(... | JavaScript | 0.998251 | @@ -1598,17 +1598,17 @@
tion can
-s
+c
el_order
@@ -1698,24 +1698,72 @@
_button();%0A%0A
+ $('#cart').text('Your cart is now empty');%0A%0A
return f
|
d12c22bcd977b818dd107cfe5a5fe072f9bbab74 | Add tests for saying more than | tests/arity.js | tests/arity.js | var overload = require('../src/overload');
var should = require('should');
describe('overload', function() {
describe('arity', function() {
it('should exist', function() {
overload.should.have.property('arity');
});
it('should work', function() {
var two_or_three = ... | JavaScript | 0 | @@ -909,16 +909,481 @@
%7D);
+%0A%0A it('should work with saying more than or equal to', function() %7B%0A var obj = %7B%7D;%0A var res = 0;%0A%0A overload.add(obj, 'work', overload.arity(3), function() %7B%0A res++;%0A %7D);%0A%0A obj.w... |
e6957b2a68b522a2483ab268cd835b8c706aca36 | Set script executable | .github/ci_support/deploy_sonatype_snapshot_bundles.js | .github/ci_support/deploy_sonatype_snapshot_bundles.js | #!/usr/bin/env node
/*
* Copyright 2020 The Closure Compiler 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 re... | JavaScript | 0.000002 | |
12e9bc407c74dea6efe1d7de25e134ab27e89811 | Update migrate-mongo.js | bin/migrate-mongo.js | bin/migrate-mongo.js | #! /usr/bin/env node
const program = require("commander");
const _ = require("lodash");
const Table = require("cli-table3");
const migrateMongo = require("../lib/migrate-mongo");
const pkgjson = require("../package.json");
function printMigrated(migrated = []) {
migrated.forEach(migratedItem => {
console.log(`M... | JavaScript | 0 | @@ -420,16 +420,27 @@
essage%7D%60
+, err.stack
);%0A pro
|
cfba44ba5184f35ce9379161e6a22f94cc7f4d32 | change the variable declaration | html-extract.js | html-extract.js | /**
* Extract HTML text.
*/
var cheerio = require("cheerio"),
gutil = require("gulp-util"),
PluginError = gutil.PluginError,
through2 = require("through2"),
PLUGIN_NAME = "html-text";
/**
* ## `html-extract`
*
* Extract text from HTML.
*
* @param {Object} opts Options
* @param {String} opts.sel Ele... | JavaScript | 0.000007 | @@ -560,16 +560,29 @@
tracted;
+%0A var els;
%0A%0A if
@@ -816,20 +816,16 @@
;%0A
-var
els = co
|
b4c9b780be70ad46ecc5fefb1439ac009de28abe | Change the map tile layer to use OpenStreetMap HOT. | name/static/name/js/map.js | name/static/name/js/map.js | "use scrict";
$(function() {
var form = $("form[name=map]"),
url = form.attr('action'),
attribution = form.find('#attribution').html(),
tileLayerUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
config = {maxZoom: 18, attribution: attribution};
// Set a default view in case there are no L... | JavaScript | 0 | @@ -194,11 +194,14 @@
map.
-org
+fr/hot
/%7Bz%7D
|
3f20348e71ac0a782fc27acc1e855d0370c99549 | fix typo | app/provider/controller.js | app/provider/controller.js | 'use strict';
angular.module('streamium.provider.controller', ['ngRoute'])
.config(['$routeProvider',
function($routeProvider) {
$routeProvider.when('/provider', {
templateUrl: 'provider/create.html',
controller: 'CreateStreamCtrl'
});
$routeProvider.when('/provider/:streamId', {
temp... | JavaScript | 0.999991 | @@ -1333,22 +1333,20 @@
rovider.
-camera
+init
(%0A
|
35abf5cb0873bc285d1267b49d0fbe3726756d8c | Test server now can do broadcast | test-server.js | test-server.js | var http = require('http');
var url = require('url');
var sockjs = require('./lib/sockjs');
var sockjs_opts = {
sockjs_url: "http://172.16.173.128:8000/sockjs.js"
};
var sjs_echo = new sockjs.Server(sockjs_opts);
sjs_echo.on('open', function(conn){
console.log(' [+] echo open', conn.session);
conn.on(... | JavaScript | 0 | @@ -279,38 +279,35 @@
+%5D echo open
-', conn.sessio
+ ' + con
n);%0A conn
@@ -368,38 +368,34 @@
%5D echo close
-', conn.sessio
+ ' + con
n, e);%0A %7D
@@ -475,32 +475,46 @@
message
-',
+ ' +
conn
-.session,
+,%0A
JSON.st
@@ -540,12 +540,68 @@
e(0,
-128)
+64))+%0A ... |
4c892a71fe97778ccd7efa2c6f577e324576a39c | change path of sw.js | init_worker.js | init_worker.js | if (navigator.serviceWorker) {
console.log("ServiceWorkers are supported");
navigator.serviceWorker.register('sw.js', {
scope: './'
})
.then(function(reg) {
console.log("ServiceWorker registered", reg);
})
.catch(function(error) {
console.log(... | JavaScript | 0.000001 | @@ -112,16 +112,22 @@
gister('
+/blog/
sw.js',
|
d60ccc76a59eef9b38374513f1d023f1c021d0db | debug=false | example/app.js | example/app.js | /**
* OnePage Example
*
* @author Zongmin Lei <leizongmin@gmail.com>
*/
var express = require('express');
var OnePage = require('../');
var one = new OnePage({debug: true});
one.add('demo', __dirname + '/demo');
var app = express();
app.use(one.middleware);
app.get('/', function (req, res, next) {
console.log... | JavaScript | 0.999999 | @@ -169,11 +169,12 @@
ug:
-tru
+fals
e%7D);
|
31417a3ad1f5973b90d2458c66256438f6d46378 | Fix another bug (this time a very old one) -- again, surfaced by linter (originally introduced in https://github.com/balderdashy/sails/commit/54cbd39aeff71bdcd0ad7bb0eb8c4be784386eef#diff-5e4fe99f0141fd36baf23d7f65734db2R58) | bin/sails-console.js | bin/sails-console.js | /**
* Module dependencies
*/
var nodepath = require('path');
var REPL = require('repl');
var _ = require('@sailshq/lodash');
var chalk = require('chalk');
var CaptainsLog = require('captains-log');
var rconf = require('../lib/app/configuration/rc')();
var Sails = require('../lib/app');
var SharedErrorHelpers = requ... | JavaScript | 0.000096 | @@ -4449,16 +4449,19 @@
in(sails
+App
.config.
|
f99450bd39dba71efbe67f0c631bd1fb610c5314 | fix for prod | routes/views/product.js | routes/views/product.js | const keystone = require('keystone');
const indexNormalizeProduct = require('./helper/index').normalizeProduct;
function getRandomProducts(count) {
return new Promise((resolve, reject) =>
keystone
.list('Product')
.model
.find({available: true})
.aggregate({$... | JavaScript | 0 | @@ -258,24 +258,75 @@
%0A
+ // FIXME: check for available: true%0A //
.find(%7Bavai
|
2b67c5b213012f52bf32c91b09df083309523214 | Use Node.prototype.getRootNode if available. | src/dom_util.js | src/dom_util.js | /**
* Copyright 2016 The Incremental DOM 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
*
* Unless ... | JavaScript | 0 | @@ -1410,39 +1410,16 @@
;%0A%0A%0A/**%0A
- * @param %7B!Node%7D node%0A
* @retu
@@ -1477,14 +1477,33 @@
ins
+this
node.%0A
+ * @this Node%0A
*/%0A
@@ -1511,26 +1511,60 @@
onst getRoot
- =
+Node = Node.prototype.getRootNode %7C%7C
function(no
@@ -1557,28 +1557,24 @@
%7C%7C function(
-node
) %7B%0A let cu
... |
d9bb16028b2e53349acda5713166dee2831ac8cb | update example/app.js for PR#2 | example/app.js | example/app.js | // This is a test harness for your module
// You should do something interesting in this harness
// to test out the module and to provide instructions
// to users on how to use it by example.
// open a single window
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var label = Ti.UI.createLabel();
win.add... | JavaScript | 0 | @@ -188,16 +188,102 @@
ample.%0A%0A
+var correlationId = 'TiTestFairyExampleId';%0Avar checkpointName = 'ExampleCheckPoint';%0A
%0A// open
@@ -334,9 +334,10 @@
w(%7B%0A
-%09
+
back
@@ -359,13 +359,36 @@
ite'
+,%0A layout: 'vertical'
%0A%7D);%0A
+%0A
var
@@ -417,36 +417,1003 @@
bel(
-);%0Awin.add(label);%0Aw... |
058a6b3dbc6b4248b46b14c57975fe87c5f2a72e | Add breadcrumb refresh | BackofficeBundle/Resources/public/js/backboneRouter.js | BackofficeBundle/Resources/public/js/backboneRouter.js | var OrchestraBORouter = Backbone.Router.extend({
//========[ROUTES LIST]===============================//
routes: {
'node/show/:nodeId': 'showNode',
'node/create/:parentNodeId': 'createNode',
'template/show/:templateId': 'showTemplate',
'template/create': 'createTemplate',
'websites/list': 'list... | JavaScript | 0.000001 | @@ -531,39 +531,52 @@
nodeId) %7B%0A
- displayLoader
+this.initDisplayRouteChanges
();%0A show
@@ -770,37 +770,52 @@
teId) %7B%0A
-displayLoader
+this.initDisplayRouteChanges
();%0A show
@@ -988,37 +988,52 @@
ion() %7B%0A
-displayLoader
+this.initDisplayRouteChanges
();%0A tabl
@@ -1110,21 +11... |
9f3d439d64460cf6bbeb6084ece216b1fdfdbda9 | Fix slice | mac/filetypes/open_AIFF.js | mac/filetypes/open_AIFF.js | define(['itemObjectModel', 'mac/roman', 'mac/extendedFloat'], function(itemOM, macRoman, extendedFloat) {
'use strict';
function wordAlign(v) { return v + v % 2; }
function open(item) {
return item.getBytes().then(function(bytes) {
if (String.fromCharCode.apply(null, bytes.subarray(0, 4)) !== 'FO... | JavaScript | 0.000002 | @@ -4235,16 +4235,58 @@
e.slice(
+%0A pos + 8 + 4,%0A
pos + 8
@@ -4286,19 +4286,16 @@
os + 8 +
- 4,
dv.getU
@@ -4319,12 +4319,8 @@
lse)
- - 4
);%0A
|
0615d096cea5af65291f040bb287e45ea1b0d02c | make pdf viewer work with text editor | apps/files_pdfviewer/js/viewer.js | apps/files_pdfviewer/js/viewer.js | function hidePDFviewer() {
showPDFviewer.shown = false;
$('table').show();
$('#controls').html(showPDFviewer.oldcode);
$("#viewer").remove();
$("#loading").remove()
document.title = showPDFviewer.lastTitle;
PDFView.active=false;
}
function showPDFviewer(dir,filename){
if(!showPDFviewer.shown){
$("#editor").h... | JavaScript | 0 | @@ -163,16 +163,38 @@
emove()%0A
+%09$(%22#editor%22).show();%0A
%09documen
@@ -251,16 +251,39 @@
=false;%0A
+%09$('iframe').remove();%0A
%7D%0A%0Afunct
|
4f4bcb2fa02557d9732d775dafb689c4c2db6b68 | refactor quota store | troposphere/static/js/stores/QuotaStore.js | troposphere/static/js/stores/QuotaStore.js | define(function (require) {
var _ = require('underscore'),
Dispatcher = require('dispatchers/Dispatcher'),
Store = require('stores/Store'),
Collection = require('collections/QuotaCollection'),
stores = require('stores');
var _models = null;
var _isFetching = false;
//
// CRUD Operat... | JavaScript | 0.998626 | @@ -32,95 +32,12 @@
var
-_ = require('underscore'),%0A Dispatcher = require('dispatchers/Dispatcher'),%0A
+Base
Stor
@@ -56,16 +56,20 @@
'stores/
+Base
Store'),
@@ -75,16 +75,21 @@
,%0A
+Quota
Collecti
@@ -135,132 +135,86 @@
on')
-,%0A s
+;%0A%0A var QuotaS
tore
-s
=
-require('stores'... |
842c33ab1f314bc9306d50950a02eabb00f62f28 | Clean Up | src/Parser/Druid/Restoration/Modules/Talents/Photosynthesis.js | src/Parser/Druid/Restoration/Modules/Talents/Photosynthesis.js | import React from 'react';
import StatisticBox from 'Main/StatisticBox';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import { formatNumber, formatPercentage } from 'common/format';
import Analyzer from 'Parser/Core/Analyzer';
import Combatan... | JavaScript | 0.000001 | @@ -1385,26 +1385,15 @@
- (1
-00
/ (1
-00 + (100 *
+ +
PHO
@@ -1421,17 +1421,16 @@
REASE)))
-)
;%0A %7D%0A
@@ -2113,32 +2113,34 @@
ationIncrease))%7D
+ %25
%3C/b%3E%3C/li%3E%0A
@@ -2258,16 +2258,18 @@
rease))%7D
+ %25
%3C/b%3E%3C/li
|
3c8cc1be64864a2e1dfcf9eaba769c269f0aa207 | Refactor tests a bit | tests/index.js | tests/index.js | /* global describe:true, it: true */
import assert from 'assert';
import {
Tweenable,
interpolate,
setBezierFunction,
unsetBezierFunction
} from '../src/main';
function forceInternalUpdate (tweenable) {
Tweenable._timeoutHandler(tweenable,
tweenable._timestamp,
tweenable._delay,
tweenable._durat... | JavaScript | 0 | @@ -21,17 +21,49 @@
rue, it:
-
+true, beforeEach:true, afterEach:
true */%0A
@@ -195,16 +195,104 @@
main';%0A%0A
+const now = Tweenable.now;%0A%0Adescribe('shifty', function () %7B%0A let tweenable, state;%0A%0A
function
@@ -317,21 +317,14 @@
te (
-tweenable
) %7B%0A
+
Tw
@@ -358,24 +358,26 @@
enable,%0... |
a2d09bbed21d49065a36ecd65c678c4f242bc8b9 | Add failing test | tests/index.js | tests/index.js | var test = require('tape');
var printer = require('../app/index.js');
test('printing function', function(t) {
t.equal(printer(), 'Hello world!');
t.end();
}); | JavaScript | 0.000138 | @@ -161,8 +161,91 @@
d();%0A%7D);
+%0A%0Atest('failing test', function(t) %7B%0A t.equal(printer(),'fail');%0A t.end();%0A%7D)
|
731cc25386a1f956bc1c0d811a72e7cacb4e1db4 | update module name in example | example/app.js | example/app.js | var nodeThinkGear = require('../lib');
var tgClient = nodeThinkGear.createClient({
appName:'NodeThinkGear',
appKey:'0fc4141b4b45c675cc8d3a765b8d71c5bde9390'
});
tgClient.on('data',function(data){
console.log(data);
});
tgClient.connect();
| JavaScript | 0 | @@ -1,25 +1,20 @@
var n
-odeThinkGear
+eurosky
= requi
@@ -32,19 +32,17 @@
);%0A%0Avar
-tgC
+c
lient =
@@ -42,28 +42,23 @@
ient = n
-odeThinkGear
+eurosky
.createC
@@ -83,17 +83,16 @@
Node
-ThinkGear
+NeuroSky
',%0A%09
@@ -141,27 +141,25 @@
e9390'%0A%7D);%0A%0A
-tgC
+c
lient.on('da
@@ -207,11 +207,9 @@
);... |
480454df06015246887c6d05d535023527b076f5 | improve example controls | example/app.js | example/app.js | // Mind maps
let map = mmp.create("mmp1"),
testMap = mmp.create("mmp2"),
// Dom elements
dom = {
fontSize: document.getElementsByClassName("font-size"),
imageSize: document.getElementsByClassName("image-size"),
imageSrc: document.getElementsByClassName("image-src"),
downloadM... | JavaScript | 0.000002 | @@ -773,24 +773,27 @@
essage,
+...
argument
) %7B%0A
@@ -784,16 +784,17 @@
argument
+s
) %7B%0A
@@ -856,24 +856,27 @@
14px%22,
+...
argument
);%0A%7D%0A%0A//
@@ -867,16 +867,17 @@
argument
+s
);%0A%7D%0A%0A//
@@ -1270,16 +1270,23 @@
r = new
+window.
FileRead
@@ -1788,17 +1788,18 @@
().image
-S
... |
8937e049b51b82c7b0499d095455597864c781a8 | Update open_cicn.js | mac/resources/open_cicn.js | mac/resources/open_cicn.js | define(['mac/roman', 'mac/fixedPoint'], function(macintoshRoman, fixedPoint) {
'use strict';
return function(resource) {
var dv = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byteLength);
var pixmap = {
baseAddr: dv.getUint32(0, false),
rowBytes: dv.getUint16(4,... | JavaScript | 0.000001 | @@ -2393,25 +2393,28 @@
offset,
-colorCoun
+pixmap.offse
t, pos,
|
8805c60d90400f4ae7f510ace7c6f4336181e093 | Update ready.js | events/ready.js | events/ready.js | const version = require('../package.json').version;
const fs = require('fs');
let d = new Date();
var HK_Offset = 8 * 60;
d.setMinutes(d.getMinutes() + HK_Offset);
module.exports = client => {
let ser = client.guilds.find("name", "個人的現實");
console.log('\n I\`m Online \n AIwaz 御坂網絡 : ' + version);
clie... | JavaScript | 0.000001 | @@ -73,18 +73,20 @@
'fs');%0D%0A
-le
+cons
t d = ne
@@ -100,76 +100,50 @@
);%0D%0A
-var HK_Offset = 8 * 60;%0D%0Ad.setMinutes(d.getMinutes() + HK_Offset);%0D%0A
+const moment = require('moment-timezone');
%0D%0Amo
@@ -172,19 +172,19 @@
=%3E %7B%0D%0A
-let
+var
ser = c
@@ -237,19 +237,16 @@
le.log('
-%5Cn
I%... |
60a06c2b852f8d6ac307850279e21b04770fd44f | Update MobileNetV1.js | CNN/Conv/Stage/Stage_BlockParamsCreator/MobileNetV1.js | CNN/Conv/Stage/Stage_BlockParamsCreator/MobileNetV1.js | export { MobileNetV1 };
import * as Pool from "../../util/Pool.js";
import * as ValueDesc from "../../../Unpacker/ValueDesc.js";
import { Params } from "../Stage_Params.js";
import { Base } from "./Base.js";
/**
* Provide parameters for MobileNetV1 (i.e. no-add-inut-to-output, pointwise1 is same size of pointwise20)... | JavaScript | 0 | @@ -47,16 +47,19 @@
%22../../
+../
util/Poo
|
0c6034d2c299f75d15fc56851b772678ac99da0b | Add select2 Ukrainian and Russian locales (#2219) | decidim-core/app/assets/javascripts/decidim/select2.js.es6 | decidim-core/app/assets/javascripts/decidim/select2.js.es6 | // = require select2
// = require select2_locale_es
// = require select2_locale_eu
// = require select2_locale_ca
// = require select2_locale_fi
// = require select2_locale_fr
// = require select2_locale_it
// = require select2_locale_nl
// = require select2_locale_pt
| JavaScript | 0 | @@ -262,8 +262,70 @@
cale_pt%0A
+// = require select2_locale_uk%0A// = require select2_locale_ru%0A
|
389ccbc57a73576f185a639c3af46cae675f02e6 | Update cordova-plugin-meteor-webapp dependency | packages/webapp/package.js | packages/webapp/package.js | Package.describe({
summary: "Serves a Meteor app over HTTP",
version: '1.2.4-cordova.3'
});
Npm.depends({connect: "2.30.2",
parseurl: "1.3.0",
send: "0.13.0",
useragent: "2.0.7"});
Npm.strip({
multiparty: ["test/"],
useragent: ["test/"]
});
Cordova.depends({
'cordova-... | JavaScript | 0 | @@ -485,48 +485,48 @@
git#
-fd6d05bafd118a5ad564a860127b2dbb0748b02b
+405254b5c0a4d96db1e13c3cb7430cc48d5e4943
'%0A%7D)
|
a7d586cff1b0099294542d9503f837dbabe6d0ad | Fix lint issue | recipe-server/client/control/components/RecipeContainer.js | recipe-server/client/control/components/RecipeContainer.js | import React, { PropTypes as pt } from 'react';
import { connect } from 'react-redux';
import makeApiRequest from 'control/api';
import {
singleRecipeReceived,
setSelectedRecipe,
setSelectedRevision,
revisionsReceived,
} from 'control/actions/RecipeActions';
import {
getSelectedRevision,
} from 'control/sel... | JavaScript | 0.000002 | @@ -711,16 +711,8 @@
ps(%7B
- recipe,
rec
|
452b23495c281a888b5fd3976df86b0c5978dca7 | lowercase condition | getwhere.js | getwhere.js | var getWhere = function(name, toReturn, data, params) {
if(!params)
params = {};
var options = params.options;
var flags = params.flags;
if(typeof name != 'string') {
throw new Error("Invalid preference name");
}
if(typeof toReturn != 'string') {
throw new Error("Invalid return parameter")... | JavaScript | 0.999882 | @@ -2077,16 +2077,30 @@
ata%5Bkey%5D
+.toLowerCase()
!= opti
@@ -2107,16 +2107,30 @@
ons%5Bkey%5D
+.toLowerCase()
) %7B%0A
@@ -2854,20 +2854,21 @@
getWhere = getWhere;
+%0A
|
df297722dc889e9f88c00746136093d235b04ec4 | Test loading other registry profiles on startup (#101) | tests/index.js | tests/index.js | var $ = require('jquery');
var _ = require('underscore');
var Browser = require('zombie');
var app = require('../datapackagist/app');
var assert = require('chai').assert;
process.env.NODE_ENV = 'test';
Browser.localhost('datapackagist.io', 3000);
describe('DataPackagist core', function() {
var browser = new Brow... | JavaScript | 0 | @@ -165,17 +165,16 @@
ssert;%0A%0A
-%0A
process.
@@ -389,16 +389,17 @@
timeout(
+1
5000);%0A%0A
@@ -1492,38 +1492,8 @@
) %7B%0A
- this.timeout(10*1000);%0A%0A
@@ -1970,39 +1970,284 @@
.json%0A
-assert.fail(
+browser.visit('/tabular', function() %7B%0A browser.assert.element('#registry-list... |
d4c2add6a63787570547a02c16c5e1da0422a228 | make example more understandable | src/dropArgs.js | src/dropArgs.js | import { nAry } from 'ramda';
/**
* Accepts a function with any arity and returns a function with arity of zero.
* The returned function ignores any arguments supplied to it.
*
* @func dropArgs
* @memberOf RA
* @since {@link https://char0n.github.io/ramda-adjunct/2.10.0|v2.10.0}
* @category Logic
* @sig (...a ... | JavaScript | 0.000002 | @@ -572,12 +572,28 @@
fn)(
-3, 4
+'ignore1', 'ignore2'
); /
|
6bb27974554e215793e62cd8d835de7a33bec31b | remove test that is maybe unnecessary here | test/Person.js | test/Person.js | var expect = require('chai').expect;
var jjv = require('jjv');
describe("#oa-types", function () {
var env = jjv();
var Types;
var types;
it("should require module", function () {
Types = require('../');
expect(Types).to.exist;
});
it("should create new types map", function () {
types = new T... | JavaScript | 0 | @@ -463,535 +463,8 @@
);%0A%0A
- it(%22should add person type%22, function () %7B%0A var personSchema = require('../lib/Person');%0A var personType = types.use(personSchema);%0A expect(types.get(personSchema.id)).to.equal(personType);%0A expect(personType).to.exist;%0A expect(personType).to.have.proper... |
e0fcfb103b04c290c4572cf2acacf8b56cd16f59 | Extend timeout before killing process. | example/pub.js | example/pub.js | const R = require("ramda");
const Promise = require("bluebird");
const pubsub = require("../")("amqp://docker");
const publish = (event, index) => {
const data = { number: index + 1 };
console.log(` [-] Published event '${ event.name }' with data:`, data);
event.publish(data)
};
// Create the event.
... | JavaScript | 0 | @@ -814,17 +814,17 @@
xit(0),
-2
+5
00);%0A
|
ce6eba73389d58d6753fb5aae7975710d9bfd145 | Implement an initial AngularJS websocket wrapper. | frontend/app/js/services.js | frontend/app/js/services.js | 'use strict';
/* Services */
angular.module('myApp.services', ['ngResource'])
.value('version', '0.1')
.factory('Comment', function($resource){
return $resource('api/comments.json', {}, {
query: {method:'GET', params:{}, isArray:true}
});})
.factory('User', function($resource){
return $resource('api/user... | JavaScript | 0 | @@ -681,20 +681,562 @@
%09%7D);%0A%09%7D)
+.
%0A%0A%09
-.
+factory('websockets', function($rootScope, $q) %7B%0A%09%09return function(url, protocols) %7B%0A%09%09%09var socket = new WebSocket(url, protocols);%0A%09%09%09var deferred = $q.defer();%0A%0A%09%09%09socket.onopen = function() %7B%0A%09%09%09%09$rootScope.$... |
823f2b8bb5882a180208a61a2ea7b1a68d7f11a9 | Remove tab icon plugin | hyper/.hyper.js | hyper/.hyper.js | module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: '... | JavaScript | 0 | @@ -2343,35 +2343,8 @@
d%22,%0A
- %22hyperterm-tab-icons%22,%0A
|
2f0bfde07a25bf71b0d070c3a33e2a87c8a2d1a1 | Use final version of cordova-plugin-meteor-webapp in Webapp | packages/webapp/package.js | packages/webapp/package.js | Package.describe({
summary: 'Serves a Meteor app over HTTP',
version: '1.13.0-beta250.1',
});
Npm.depends({
'basic-auth-connect': '1.0.0',
'cookie-parser': '1.4.5',
connect: '3.7.0',
compression: '1.7.4',
errorhandler: '1.5.1',
parseurl: '1.3.3',
send: '0.17.1',
'stream-to-string': '1.2.0',
qs: '... | JavaScript | 0 | @@ -554,15 +554,8 @@
.0.0
--beta.1
',%0A%7D
|
145cfd95b9c0979d0d5f2069f4d876ad11e32184 | fix small issue with the Storage | app/requester/requester.js | app/requester/requester.js | /// <reference path="../../typings/angularjs/angular.d.ts"/>
'use strict';
var AVAILABLE_METHODS = [
{
name: 'GET',
hasBody: false
},
{
name: 'POST',
hasBody: true
},
{
name: 'PUT',
hasBody: true
},
{
name: 'DELETE',
hasBody: t... | JavaScript | 0.000001 | @@ -739,40 +739,8 @@
e) %7B
-%0A %0A Storage.add();
%0A%0A
|
f7f924abec0e24db9bb224ee07fc33608f0e0500 | Add createBoard function | frontend/src/shogi/board.js | frontend/src/shogi/board.js | import Piece from './piece';
export default class Board {
constructor() {
this.board = this.createBoard();
}
board() {
return this.board;
}
initialUsiBoard() {
return (
[
['l', 'n', 's', 'g', 'k', 'g', 's', 'n', 'l'],
['*', 'b', '*', '*', '*', '*', '*', 'r', '*'],
... | JavaScript | 0 | @@ -707,12 +707,312 @@
);%0A %7D
+%0A%0A createBoard() %7B%0A var _board = this.initialUsiBoard().map((row, y) =%3E %7B%0A var yCor = y + 1;%0A var rows = row.map((type, x) =%3E %7B%0A var xCor = 10 - x - 1;%0A return (%0A new Piece(type, xCor, yCor)%0A );%0A %7D);%0... |
0f71f3187ea1b47f86586e7595da8caa6ab32ebd | Add TODO | typescript-marionette-v2/webpack.config.js | typescript-marionette-v2/webpack.config.js | var HtmlWebpackPlugin = require("html-webpack-plugin")
var path = require("path");
var nodeModulesPath = path.resolve(__dirname, "node_modules");
var webpack = require("webpack")
module.exports = {
// TODO: Choose between source-map and eval-source-map.
devtool: "source-map",
//devtool: "eval-source-map",
devS... | JavaScript | 0.000002 | @@ -438,24 +438,71 @@
: /%5C.ejs$/,%0A
+ // TODO: Test the ejs-compiled-loader.%0A
load
|
ec9f74c3f038ac9fcbc7900710cb8885bddb3811 | move mapping objects to top of file | resources/assets/js/components/admin/AdminHomeComponent.js | resources/assets/js/components/admin/AdminHomeComponent.js | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchAdminUser } from '../../actions/admin/adminProfileActions';
import TeacherStats from './TeacherStats';
import AdminStats from './AdminStats';
import GroupStats from './GroupStats';
import ReadOnlyInput from './forms/ReadOnly... | JavaScript | 0 | @@ -322,16 +322,430 @@
nput';%0A%0A
+const mapStateToProps = (state) =%3E %7B%0A return %7B%0A adminUser: state.adminReducer.adminUser,%0A teachers: state.adminReducer.teachers,%0A admins: state.adminReducer.admins,%0A school: state.adminReducer.school,%0A groups: state.adminReducer.groups,%0A users... |
41316a3214df87b16f330bd36e47de204d04fc23 | use const instead of var | routes/eventpersonal.js | routes/eventpersonal.js | var express = require('express'),
app = express(),
validator = require('../lib/formvalidation.js');
app.get('/eventpersonal', (request, response) => {
response.render('./app/blocks/eventpersonal');
});
app.post('/eventpersonal', (request, response) => {
var form = request.body;
response.send('s... | JavaScript | 0.000328 | @@ -1,11 +1,13 @@
-var
+const
express
@@ -58,17 +58,24 @@
-validator
+isEventFormValid
= r
@@ -108,16 +108,78 @@
ion.js')
+.form.personalEventFormIsValid,%0A pg = require('pg-promise')
;%0A%0Aapp.g
@@ -343,11 +343,13 @@
-var
+const
for
@@ -366,16 +366,67 @@
t.body;%0A
+%0A if (isEventFormVali... |
454135637a3a136e327dc23a568b84a8c4accf1c | Remove delete button, prevent accidental delete. | apps/my_system/views/inspector.js | apps/my_system/views/inspector.js | // ==========================================================================
// Project: MySystem.InspectorPane
// Copyright: ©2010 Concord Consortium
// under the MIT License (see LICENSE file for more info)
// ==========================================================================
/*globals MySystem SCUI Forms... | JavaScript | 0 | @@ -972,29 +972,16 @@
nodeForm
- deleteButton
'.w(),%0A
@@ -1484,16 +1484,169 @@
%7D),%0A%0A
+ /*%0A * Sept 1, 2011: Kelly from Bekeley:%0A * This delete button will confuse students, %0A * they will use it to dismiss the window.%0A *%0A
dele
@@ -1949,16 +1949,23 @@
'%0A %7D)
+%0A ... |
942a45c9a5d422ccc9cc1e781c5cd4bdb20140f0 | Add case to formatter specs | spec/formatter.spec.js | spec/formatter.spec.js | var formatter = require('../src/formatter');
describe('formatter', function () {
it('should format numbers', function () {
expect(formatter.formatNumber(0)).toBe(0);
expect(formatter.formatNumber(0.001)).toBe('0.00100');
expect(formatter.formatNumber(0.071)).toBe('0.0710');
expect(formatter.formatNum... | JavaScript | 0.000001 | @@ -1679,22 +1679,103 @@
/06/2017');%0A
+ expect(formatter.timestampFactory('second')(timestamp)).toEqual('10:36:16');%0A
%7D);%0A%7D);%0A
|
5e60f7369e27c4d9260cdcc45aefeec6eddfa933 | fix input bug | interpreter.js | interpreter.js | var interpret=c=>{
var Ξ=[],//stack
//I/O functions
î=i=>[i=prompt`Input:`,Ξ.push(i)][0],//input
ô=i=>alert(i!=[]._?i:JSON.stringify(Ξ)),//output
ℹ=i=>[i=i!=[]._?document.getElementById("c").value[i]:document.getElementById("c").value,Ξ.push(i)][0],//source
//stack functions
ᵖ=(i=0)=>{Array.prototy... | JavaScript | 0.000002 | @@ -80,24 +80,26 @@
:%60,%CE%9E.push(i)
+,i
%5D%5B0%5D,//input
|
8e477705b2538a20f6d293e868a0e7dadcc589a8 | Fix expiry/review dates issue in UI (#1139) | ui/src/components/flatpicker/FlatPicker.js | ui/src/components/flatpicker/FlatPicker.js | /*
* Copyright 2020 Verizon Media
*
* 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 t... | JavaScript | 0 | @@ -1980,24 +1980,112 @@
= dateStr;%0A
+ if (dateStr === '') %7B%0A this.props.onChange(selectedDates);%0A %7D%0A
%7D%0A%0A o
|
2483669d68dd399e9597db2c413994817ef1ed61 | Update up to changes in es5-ext | test/assert.js | test/assert.js | 'use strict';
var CustomError = require('es5-ext/error/custom')
, logger = require('../lib/logger')();
module.exports = function (t, a) {
t = t(logger);
t(true, true, 'foo');
t.ok(false, 'bar');
t.not(false, true, 'not');
t.deep([1, 2], [1, 2], 'deep');
t.notDeep([1, 2], [2, 1], 'not deep');
t.throws(fu... | JavaScript | 0 | @@ -12,17 +12,17 @@
';%0A%0Avar
-C
+c
ustomErr
@@ -335,13 +335,9 @@
row
-new C
+c
usto
|
a2bc45fc0379b60bcc53b5f3b8bf62ca86f88d37 | Remove stray log. | src-electron/util/types.js | src-electron/util/types.js | /**
*
* Copyright (c) 2020 Silicon Labs
*
* 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 a... | JavaScript | 0 | @@ -2281,30 +2281,8 @@
) %7B%0A
- console.log(type)%0A
|
16e463d44b0cceaee34d0e0fa77acba41ce39f81 | fix assert typo for builds | test/builds.js | test/builds.js | var request = require("supertest");
var assert = require('assert');
var app = require("../app");
var HTTPStatus = require('http-status');
var dbschema = require('../models/dbschema.js');
describe('Requests to /builds', function () {
it('should return 201 with json', function (done) {
var testBuild = {
... | JavaScript | 0.000001 | @@ -817,16 +817,22 @@
assert
+.equal
(respons
|
5b21e9e7b9eeb9b7cb223a98f17217bc89a3d429 | Fix typo in examples/api | examples/api.js | examples/api.js | /**
* Example of acme.Client API
*/
const Promise = require('bluebird');
const acme = require('./../');
function log(m) {
process.stdout.write(`${m}\n`);
}
/**
* Function used to satisfy an ACME challenge
*
* @param {object} authz Authorization object
* @param {object} challenge Selected challenge
* @pa... | JavaScript | 0.001924 | @@ -2130,32 +2130,34 @@
/%0A%0A const
+ %7B
challenges = %7B
@@ -2156,19 +2156,17 @@
ges
-= %7B
+%7D =
authz
- %7D
;%0A%0A
|
f349adef60f15737d6f47349b15c058bc57936e7 | reword test description | tests/tests.js | tests/tests.js | var should = require('should'),
helper = require('../index.js'),
cache = {
expiryInSeconds: 60
},
ms = [],
logs = [];
describe('tests', function(){
var server = {
method: function(n, m){
ms.push(m);
}
},
request = {
log: function(t, l){
logs.push(l);
}
};
... | JavaScript | 0.000108 | @@ -673,39 +673,58 @@
it('should
-log a cachemiss
+include the method name on the log
', function(
|
62295091a66a72269b1c0c22c5f5ec7f59f51b96 | optimize ArrowStep | src/ArrowStep/ArrowStep.js | src/ArrowStep/ArrowStep.js | /**
* @file ArrowStep component
* @author liangxiaojun(liangxiaojun@derbysoft.com)
*/
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import ArrowStepItem from '../_ArrowStepItem';
class ArrowStep extends Component {
constructor(props, ...restA... | JavaScript | 0.999942 | @@ -1507,24 +1507,33 @@
+ steps &&
steps.map((
|
a9c002019e1b476057404c0351b706f090bb1b55 | Replace request with fetch | server.js | server.js | var express = require('express'),
app = express(),
http = require('http').Server(app),
io = require('socket.io')(http),
request = require('request');
app.use(express.static(__dirname + '/'));
var fields = ["currencyPair", "timestamp", "bidBig", "bidPips", "offerBig", "offerPips", "high", "low", "open"... | JavaScript | 0.000199 | @@ -125,23 +125,21 @@
tp),%0D%0A
-request
+fetch
= requi
@@ -142,23 +142,26 @@
equire('
-request
+node-fetch
');%0D%0A%0D%0Aa
@@ -383,19 +383,22 @@
nterval(
-get
+update
Data, 50
@@ -579,217 +579,59 @@
%0D%0A%0D%0A
-getData();%0D%0A%0D%0Afunction getData() %7B%0D%0A request('http://webrates.truefx.com/rates/... |
fa71df20baccdd81dbc4138bef1bbbcd64977020 | Improve gulp output. | ui/build/serve/wwwroot.js | ui/build/serve/wwwroot.js | 'use strict'
const util = require('gulp-util')
exports.fn = (gulp, paths, argv, done) => {
const connect = require('gulp-connect')
const proxy = require('proxy-middleware')
const url = require('url')
const historyApiFallback = require('connect-history-api-fallback/lib')
let proxyOptions = url.parse('http:/... | JavaScript | 0.000001 | @@ -275,16 +275,42 @@
/lib')%0A%0A
+ const apiBase = '/api'%0A%0A
let pr
@@ -380,30 +380,137 @@
ons.route =
-'/api'
+apiBase%0A%0A if (argv.nomiddlewareproxy) %7B%0A util.log('Returning HTTP/403 for ' + util.colors.green(apiBase))%0A %7D
%0A%0A connect.
@@ -715,109 +715,38 @@
(0,
-4) === '/api') %7B%0A ... |
fd09c4a0572380375a21b25588284ff94ea55b54 | update Checkbox examples | examples/containers/app/modules/fields/CheckboxExamples.js | examples/containers/app/modules/fields/CheckboxExamples.js | import React, {Component} from 'react';
import Checkbox from 'dist/Checkbox';
import CheckboxGroup from 'dist/CheckboxGroup';
import Widget from 'dist/Widget';
import WidgetHeader from 'dist/WidgetHeader';
import PropTypeDescTable from '../PropTypeDescTable';
import CheckboxDoc from 'assets/propTypes/Checkbox.json';
... | JavaScript | 0 | @@ -621,17 +621,27 @@
label:
-1
+'checkbox1'
,%0A
@@ -706,17 +706,27 @@
label:
-2
+'checkbox2'
,%0A
@@ -791,17 +791,27 @@
label:
-3
+'checkbox3'
,%0A
@@ -876,17 +876,27 @@
label:
-4
+'checkbox4'
,%0A
@@ -961,17 +961,27 @@
label:
-5
+'checkbox5'
,%0A
@@ -1259,16 +1259,20... |
e3d24fdc5ff703eef1049aedb71568519d5ce01f | set focus on input for new file | plugins/sidebar/overlays/new-file.js | plugins/sidebar/overlays/new-file.js | 'use strict';
const React = require('react');
const Card = require('react-material/components/Card');
const Button = require('react-material/components/Button');
const TextField = require('react-material/components/TextField');
const { createContainer } = require('sovereign');
const fileStore = require('../../../src/... | JavaScript | 0.000001 | @@ -694,113 +694,55 @@
-console.log('comp mountd');%0A console.log(this.refs
+this._setFocus(
);%0A
+%7D%0A%0A
co
-nsole.log(this.refs.filename.getDOMNode());
+mponentDidUpdate() %7B
%0A
@@ -751,36 +751,13 @@
his.
-refs.filename.getDOMNode().f
+_setF
ocus
@@ -1355,92 +1355,8 @@
%7D%0A%0A
- _onUp... |
779c7f0b17692753dcf7412b2e76c3d9dd51e4e8 | test coverage | test/cipher.js | test/cipher.js |
var crypto = require('crypto')
var cipher = require('../cipher')
var pull = require('pull-stream')
var tape = require('tape')
tape('encrypt/decrypt', function (t) {
var secret = crypto.createHash('sha256').update('whatever').digest()
var encrypt = cipher.encrypt(null, secret)
var decrypt = cipher.decrypt(nul... | JavaScript | 0.000001 | @@ -93,16 +93,60 @@
stream')
+%0Avar random = require('pull-randomly-split')
%0A%0Avar ta
@@ -2383,29 +2383,672 @@
encrypt.secret(secret)%0A%0A%7D)%0A
+for(var i = 0; i %3C 200; i++) (function (i) %7B%0A tape('encrypt/decrypt - ' + i, function (t) %7B%0A%0A var secret = crypto.createHash('sha256').update('whate... |
9c7bcca5dcf0ff65dcbfdf686cc84439d44674f1 | fix ceylon/ceylon-js#434 | runtime-js/callables.js | runtime-js/callables.js | function $JsCallable(callable,parms,targs) {
if (callable.getT$all === undefined) {
callable.getT$all=Callable.getT$all;
}
var set_meta = callable.$crtmm$ === undefined;
if (set_meta) {
callable.$crtmm$={ps:[],mod:$CCMM$,d:['$','Callable']};
if (parms !== undefined) {
... | JavaScript | 0.000007 | @@ -2149,22 +2149,17 @@
Empty():
-ArrayS
+s
equence(
@@ -2176,14 +2176,9 @@
ent$
-ArrayS
+s
eque
@@ -2193,16 +2193,44 @@
allable%7D
+,Absent$sequence:%7Bt:Nothing%7D
%7D);%0A
|
ac26e2cf458cf987b6a102263cdd3cdff114e885 | fix tests so they perform validations | test/client.js | test/client.js | 'use strict'
const Code = require('@hapi/code')
const Lab = require('@hapi/lab')
const { expect } = Code
const { it } = exports.lab = Lab.script()
const Drone = require('..')
const client = new Drone.Client({
url: process.env.DRONE_SERVER,
token: process.env.DRONE_TOKEN
})
it('can get the current user', (done)... | JavaScript | 0.000001 | @@ -307,21 +307,23 @@
user',
-(done
+async (
) =%3E %7B%0A
@@ -328,75 +328,438 @@
%0A c
-lient.getSelf().then((res) =%3E %7B%0A expect(res).to.be.an.object()%0A%0A
+onst res = await client.getSelf()%0A expect(res).to.be.an.object()%0A expect(res).to.contain(%5B%0A 'id',%0A 'login',%0A 'email',%0A ... |
0a3d136c9f15e60bcfbc87d5abeff0b58d9705e9 | Make vmapi default IP point to COAL one. | test/common.js | test/common.js | // Copyright 2012 Joyent, Inc. All rights reserved.
var assert = require('assert');
var crypto = require('crypto');
var path = require('path');
var Logger = require('bunyan');
var restify = require('restify');
var uuid = require('node-uuid');
var UFDS = require('sdc-clients').UFDS;
var VMAPI = require('sdc-clients').VM... | JavaScript | 0 | @@ -1482,17 +1482,17 @@
.99.99.2
-1
+2
',%0A
|
31ea67a8bcc4f8de2f5b1a4cbc018f1ff3d507f9 | reset free dev box | test/config.js | test/config.js | module.exports = {
salesforce: {
url: 'https://login.salesforce.com',
auth: {
user: 'salesforce.otr@gmail.com',
pass: 'dataervices@123456ChAiNbtuE0mFc1oc9E8BfEcl'
}
}
};
| JavaScript | 0 | @@ -142,50 +142,42 @@
s: '
-dataervices@123456ChAiNbtuE0mFc1oc9E8BfEcl
+sfdc12345w6YIUwOWrRSnob4nBdDd4Lmma
'%0A%09%09
|
b0d4ade6b12d76ce34cf063fdefed16273429f73 | use ~/ for data store | server.js | server.js | /**
* Module dependencies.
*/
require('weibo').start_gtap(80, __dirname);
| JavaScript | 0 | @@ -1,35 +1,4 @@
-/**%0A * Module dependencies.%0A */
%0Areq
@@ -30,16 +30,11 @@
80,
-__dirname
+'~/'
);%0A
|
892fdc7c775e6f2d5194ecc9a6f40da5e8146985 | make dotenv silent to stop error on the console | server.js | server.js | var express = require('express');
var app = express();
var path = require('path');
var util = require('util');
var mongodb = require('mongodb');
var mongoose = require('mongoose');
var fs = require('fs');
var multer = require('multer');
var morgan = require('morgan');
var cookieParser = require('cookie-parser');
var b... | JavaScript | 0 | @@ -915,23 +915,49 @@
';%0A%0A
-dotenv.load();%0A
+%0Arequire('dotenv').config(%7Bsilent: true%7D)
%0A%0Ava
|
654e84eef9e797e5c99d5e7587e85ab6b726e4bc | Reword assessment generation messages | src/ggrc/assets/javascripts/components/assessment_generator.js | src/ggrc/assets/javascripts/components/assessment_generator.js | /*!
Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
Created By: swizec@reciprocitylabs.com
Maintained By: swizec@reciprocitylabs.com
*/
(function (can, $) {
'use strict';
GGRC.Components('asse... | JavaScript | 0 | @@ -1448,38 +1448,37 @@
error: '
-Generating assessments
+Assessment generation
has fai
@@ -1509,45 +1509,122 @@
s: '
-Generating assessments is in progress
+Assessment generation is in process. This may take ' +%0A 'multiple hours depending on the volume
.',%0A
@@ -1657,17 +1657,16 @@
ment
-s
... |
0963e7addaba0e9d7f3bf6d343919c3c71b75289 | Update update-notifier API | lib/base.js | lib/base.js | /*
* Copyright 2013, All Rights Reserved.
*
* Code licensed under the BSD License:
* https://github.com/node-gh/gh/blob/master/LICENSE.md
*
* @author Eduardo Lundgren <edu@rdo.io>
*/
'use strict';
var fs = require('fs'),
moment = require('moment'),
github = require('github'),
logger = require('./lo... | JavaScript | 0 | @@ -469,131 +469,8 @@
);%0A%0A
-// -- Constants ----------------------------------------------------------------%0A%0Aexports.TIME_DAY = 1000 * 60 * 60 * 24;%0A%0A
// -
@@ -4557,24 +4557,58 @@
ion(path) %7B%0A
+ var pkg = require(path);%0A%0A
noti
@@ -4654,69 +4654,63 @@
kage
-Path: path,%0A ... |
d11ef35af089a6f234275755fb218bdc1811be3b | Fix mediawiki name in comment. #1391. | unpacked/extensions/TeX/mediawiki-texvc.js | unpacked/extensions/TeX/mediawiki-texvc.js | /*************************************************************
*
* MathJax/extensions/TeX/mediawiki-texvc.js
*
* Implements macros used by Wikimedia with their texvc preprocessor.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2015-2016 The MathJax Consortium... | JavaScript | 0 | @@ -144,17 +144,17 @@
by
-Wiki
media
+wiki
wit
|
06d9fc7f6550b1e7d9a41845a489c2fd5489f57c | make sure result is an instance of query in resource enhancer (#648) | src/packages/router/route/action/enhancers/resource.js | src/packages/router/route/action/enhancers/resource.js | // @flow
import { Query } from '../../../../database';
import { getDomain } from '../../../../server';
import createPageLinks from '../utils/create-page-links';
import type { Action } from '../interfaces';
/**
* @private
*/
export default function resource(action: Action<any>): Action<any> {
// eslint-disable-next-l... | JavaScript | 0 | @@ -541,32 +541,59 @@
Name === 'index'
+ && result instanceof Query
) %7B%0A %5Bdata,
|
4ca1962adc3ed822683e41aa0a4952800195ef39 | remove passport | server.js | server.js | 'use strict';
var express = require('express');
var routes = require('./app/routes/index.js');
var mongoose = require('mongoose');
var session = require('express-session');
var app = express();
require('dotenv').load();
require('./app/config/passport')(passport);
app.use('/public', express.static(process.cwd() + '/p... | JavaScript | 0.000222 | @@ -218,52 +218,8 @@
d();
-%0Arequire('./app/config/passport')(passport);
%0A%0Aap
|
23212008f39217e5211841a2456eba70e2a1aa65 | Use base_url in snippets [skip ci] | src/jupyter_contrib_nbextensions/nbextensions/snippets/main.js | src/jupyter_contrib_nbextensions/nbextensions/snippets/main.js | // Code cell snippets
define([
'jquery',
'base/js/namespace',
'base/js/dialog'
], function(
$,
Jupyter,
dialog
) {
"use strict";
var initialize = function () {
var dropdown = $("<select></select>").attr("id", "snippet_picker")
.css("... | JavaScript | 0 | @@ -773,17 +773,16 @@
se_url+%22
-/
nbextens
|
480220dc50f2d912528f7cd5cffba640f481ec11 | move check for https earlier | server.js | server.js | /*eslint-env node*/
// Setup basic express server
var express = require('express');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io')(server);
var cfenv = require('cfenv');
var appEnv = cfenv.getAppEnv();
//var port = process.env.PORT || 3000;
var port = appEnv.port;
s... | JavaScript | 0 | @@ -407,162 +407,8 @@
);%0A%0A
-//Compress%0Aapp.use(require('compression')());%0A%0A//Minify%0A//app.use(require('express-minify')());%0A%0A// Routing%0Aapp.use(express.static(__dirname + '/www'));%0A%0A
// E
@@ -1077,16 +1077,172 @@
;%0A%09%7D%0A%7D);
+%0A%0A//Compress%0Aapp.use(require('compression')());%0A%0A//M... |
542fb08d70d1d76eaae10162e07ad137d3b05e0c | format app dl | slashCommands/testSlash.js | slashCommands/testSlash.js | 'use strict'
const slapp = require('../slackSetup.js').slapp
const getRadius = require('../radius.js').getRadius
const tinyurl = require('tinyurl');
const request = require('request')
// route functions
const hardcodedLocation = require('./routes/hardcodedGeoRoute.js').hardcodedLocation
const ipGeo = require('./routes... | JavaScript | 0.000002 | @@ -1603,29 +1603,20 @@
t: '
-Sends to app d
+D
ownload
+ app
',%0A
@@ -2528,80 +2528,74 @@
-let appStore = !%5B%5D(https://goo.gl/images/famYEL)%0A return msg.say(%60
+return msg.say(%7B %0A attachments: %5B%7B%0A text: '
%3Citm
@@ -2675,16 +2675,121 @@
%7CiPhone%3E
+',%0A ... |
2091ead0da2ce1a50a2c7d2c21b552d8fba94ca8 | fix up itemConversionDidChange still working on tax and other parts of the UOM | frameworks/xm/packages/xtuple/__core__/item/models/item.js | frameworks/xm/packages/xtuple/__core__/item/models/item.js | // ==========================================================================
// Project: xTuple Postbooks - Business Management System Framework
// Copyright: ©2012 OpenMFG LLC, d/b/a xTuple
// ==========================================================================
/*globals ... | JavaScript | 0 | @@ -1247,247 +1247,82 @@
-classCode = this.get('classCode'),%0A inventoryUnit = this.get('inventoryUnit'),%0A priceUnit = this.get('priceUnit');%0A if(status & SC.Record.READY) %7B%0A //Goes here%0A if(classCode === value && inventoryUnit === value
+inventoryUnit = this.get('inventory... |
a111eba42c834b228ef106eb44def6a46fabb360 | Update component.js | sample/lib/component.js | sample/lib/component.js | var Component = function(obj) {
/**
* $display:
* - Appel de la fonction "display()"
* - Appel de la fonction "display()" des sous-composants
*/
Component.prototype.$display = function() {
if(this.display instanceof Function) {
this.display();
}
if(this.components instanceof Object) ... | JavaScript | 0.000001 | @@ -998,75 +998,264 @@
-$(eltId).bind(eventName, this.events%5BeltId%5D%5BeventName%5D.bind(this));
+var elt = document.querySelector(eltId);%0A if(elt) %7B%0A elt.addEventListener(eventName, this.events%5BeltId%5D%5BeventName%5D.bind(this), false);%0A %7D else %7B%0A ... |
c4559dc73dc661fd3bfb12364e57d2d876dcaa19 | Optimize imports. | src/Commands/Parser.js | src/Commands/Parser.js | import stringArgv from 'string-argv';
import { isInteger, isNumber, toInteger, toNumber } from 'lodash/lang';
import { endsWith, trimEnd } from 'lodash/string';
import CommandParserError from '../Errors/CommandParserError';
/**
* Parses the signature of a command.
*/
export default class Parser {
/**
* Constant... | JavaScript | 0.000001 | @@ -43,19 +43,8 @@
rt %7B
- isInteger,
isN
|
aebc2be50e50ed351105b60d617aac6cd0051a25 | Update saucelabs.karma.conf.js | saucelabs.karma.conf.js | saucelabs.karma.conf.js | 'use strict'
const yaml = require('js-yaml')
const fs = require('fs')
const browsers = {
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 10',
version: '53'
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: '49'
},
// sl_ios_safari: {
... | JavaScript | 0 | @@ -3109,17 +3109,18 @@
imeout:
-6
+12
0000,%0A
|
df009256d0c5078be7e282f8408416cfea7db252 | remove mobile safari from tests | saucelabs.karma.conf.js | saucelabs.karma.conf.js | var browsers = {
'SL_Chrome': {
base: 'SauceLabs',
browserName: 'chrome',
version: '35'
},
'SL_Firefox': {
base: 'SauceLabs',
browserName: 'firefox',
version: '26'
},
'SL_Safari': {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.9',
version: '7'
},
'SL... | JavaScript | 0 | @@ -694,130 +694,8 @@
11'%0A
- %7D,%0A 'SL_IOS_SAFARI': %7B%0A base: 'SauceLabs',%0A browserName: 'iphone',%0A platform: 'OS X 10.9',%0A version: '7.1'%0A
%7D%0A
|
8c2762b8fa9c6da7be4f6b63f3d2e6e10ff21b89 | Remove comments. | server.js | server.js | /*
* Dependencies:
* npm install express connect body-parser method-override path vhost express.io
*
*
*/
var express = require('express');
var bodyParser = require('body-parser'); // Middleware that decodes JSON and POST parameters
var methodOverride = require('method-override'); // Middleware that sim... | JavaScript | 0 | @@ -592,17 +592,16 @@
files.%0A
-%0A
var rout
@@ -668,25 +668,24 @@
e('vhost');%0A
-%0A
var app
@@ -1713,32 +1713,8 @@
ble
-called home called home
call
@@ -1773,20 +1773,29 @@
llowing
-home
+the following
as a te
|
6eb50fea9ef0f39d9cbaa67b355ae84a6695f773 | Remove semi | server.js | server.js | var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(3000, 'localhost', function (err, result) {
if (err) {
... | JavaScript | 0.000001 | @@ -25,17 +25,16 @@
ebpack')
-;
%0Avar Web
@@ -78,17 +78,16 @@
server')
-;
%0Avar con
@@ -119,17 +119,16 @@
config')
-;
%0A%0Anew We
@@ -278,17 +278,16 @@
function
-
(err, re
@@ -334,17 +334,16 @@
log(err)
-;
%0A %7D%0A%0A
@@ -396,10 +396,8 @@
0/')
-;
%0A%7D)
-;
%0A
|
2d6b0aaf7aebe25dbeff22580e6d5a15c8853fc2 | Remove erroneous server status console log | server.js | server.js | 'use strict';
var appengine = require('appengine');
var express = require('express');
var app = express();
app.use(appengine.middleware.base);
app.get('/', function(req, res) {
res.status(200).send('Hello, world!');
});
app.get('/_ah/health', function(req, res) {
res.set('Content-Type', 'text/plain');
res.se... | JavaScript | 0.000001 | @@ -977,44 +977,4 @@
%7D);%0A
-%0Aconsole.log('Listening on port 8080');%0A
|
9cb0c8ee1f56dbe8c966ea4b912f4fd73f8d3684 | Add /schema path that serves schema as plain text | server.js | server.js | import express from 'express';
import { apolloExpress, graphiqlExpress } from 'apollo-server';
import bodyParser from 'body-parser';
import cors from 'cors';
import { createServer } from 'http';
import { SubscriptionServer } from 'subscriptions-transport-ws';
import { subscriptionManager } from './data/subscriptions';... | JavaScript | 0.000002 | @@ -252,16 +252,78 @@
ort-ws';
+%0Aimport %7B printSchema %7D from 'graphql/utilities/schemaPrinter'
%0A%0Aimport
@@ -684,32 +684,168 @@
graphql',%0A%7D));%0A%0A
+graphQLServer.use('/schema', function(req, res, _next) %7B%0A res.set('Content-Type', 'text/plain');%0A res.send(printSchema(schema));%0A%7D);%0A%0A
gr... |
a34e4a25eb203f81fdcdba4eec64fca14e13abbf | add db error report in server | server.js | server.js | 'use strict'
const
express = require('express'),
bodyParser = require('body-parser'),
AWS = require('aws-sdk')
AWS.config.update({
endpoint: "http://localhost:8000",
region: "us-west-2"
})
AWS.config.credentials = new AWS.SharedIniFileCredentials()
const dynamoClient = new AWS.DynamoDB.DocumentClient()
le... | JavaScript | 0 | @@ -675,32 +675,48 @@
%7B%0A if (err)
+%0A %7B%0A
res.status(500)
@@ -751,36 +751,94 @@
tabase'%7D)%0A
-else
+ console.log('db error:', err)%0A %7D%0A else%0A %7B%0A
res.status(
@@ -865,24 +865,32 @@
'success'%7D)%0A
+ %7D%0A
%7D)%0A %7D)%0A
@@ -1004,32 +1... |
816a8c9318606af03a45b5020e5cd58b5094fc1a | Disable capture event bind | index.common.js | index.common.js | function ScrollSyncer (vertical, horizontal, usePassive) {
this._from = null
this._to = []
this._bindOptions = usePassive
? { passive: true, capture: true }
: true
this._sync = (function (e) {
var target = e.target
this._to.forEach(function (el) {
if (vertical) el.scrollTop = target.scrol... | JavaScript | 0.000001 | @@ -146,36 +146,26 @@
true
-, capture: true %7D%0A : true
+ %7D%0A : undefined
%0A%0A
|
8f0cd9989c1226bba68707c632411fa42ebea814 | add feature | server.js | server.js |
// We load the required packages
var express =require("express");
var mongoose = require("mongoose");
var bodyParser = require("body-parser");
var passport = reauire("passport");
// Create our Express application
var app = express();
// connect to the mapit database
mongoose.connect('mongodb://localhost:27017/mapit... | JavaScript | 0 | @@ -757,16 +757,29 @@
ter();%0A%0A
+//app use api
%0Aapp.use
|
44623a9c1896b8e7da840a9bba7acaecb5da1905 | define angular build directory | server.js | server.js | var express = require('express');
var bodyParser = require('body-parser');
var pg = require('pg');
var app = express();
app.use(bodyParser.json());
// Create link to Angular build directory
var distDir = __dirName + "/dist/";
app.use(express.static(distDir));
pg.defaults.ssl = true;
// Connect to the database befor... | JavaScript | 0 | @@ -204,17 +204,17 @@
= __dir
-N
+n
ame + %22/
|
5eab224fd3e17091dcfc3570c53d75322c1754dc | Improve ES2015 parsing | server.js | server.js | /*eslint-disable */
// Enable loading the server with babel
require('babel-register');
var main = require('./src/main').default;
var CONFIG = require('./config').default;
// Launch server with current config
main(CONFIG);
| JavaScript | 0.000012 | @@ -36,18 +36,20 @@
ing
-the server
+ES2016 files
wit
@@ -88,49 +88,204 @@
);%0A%0A
-var main = require('./src/main').default;
+// Resolve configuration file%0Avar path = require('path');%0Avar arg = process.argv%5B2%5D && path.resolve(process.argv%5B2%5D);%0Avar configFile = arg && arg.replace(/.js$/, '') %7C%7C ... |
2525a55291b9b27cdc0896b183e962486311c073 | add default route for index | server.js | server.js | var port = process.env.PORT | 3000;
var mongoDbuser = "APIuser";
var mongoDbpass = "loteriaparagonowa";
var mongoDbAccess = "mongodb://"+mongoDbuser+":"+mongoDbpass+"@ds064188.mlab.com:64188/loteriaparagonowaapi"
var mongoose = require('mongoose');
mongoose.connect(mongoDbAccess);
var lottery = require('./lotteryModel... | JavaScript | 0.000001 | @@ -605,24 +605,87 @@
troller');%0A%0A
+app.get('/', function(req,res)%7B%0A res.send(%22It works%22); %0A%7D);%0A%0A
app.get('/lo
|
ee5d3de6620053577d7ba0b89134d783525e1f10 | Fix show first tab if no tab is specified in url | src/Backend/Modules/MediaLibrary/Js/Components/Library.js | src/Backend/Modules/MediaLibrary/Js/Components/Library.js | import { Messages } from '../../../../Core/Js/Components/Messages'
import { Config } from '../../../../Core/Js/Components/Config'
export class Library {
constructor () {
this.currentType = null
// start or not
if ($('#library').length === 0) {
return false
}
// init edit folder dialog
... | JavaScript | 0 | @@ -1684,25 +1684,24 @@
const
-triggerEl
+navItems
= docum
@@ -1717,16 +1717,19 @@
Selector
+All
('#libra
@@ -1744,15 +1744,60 @@
item
-:first
+')%0A const tabLink = navItems%5B0%5D.querySelector('
.nav
@@ -1852,16 +1852,14 @@
ab(t
-riggerEl
+abLink
)%0A
|
9d17bc0cbbeeae1492e60c99e78767d55b5748b3 | Update server.js | server.js | server.js | 'use strict';
var express = require('express'),
requestProxy = require('express-request-proxy'), //eslint-disable-line
port = process.env.PORT || 3000,
app = express(),
http = require('http'),
sequelize = require('sequelize'),
epilogue = require('epilogue'),
Twit = require('twit');
var proxyTwit = function(request, r... | JavaScript | 0 | @@ -328,20 +328,8 @@
) %7B%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD
%0Acon
|
f808b3d62aef064e1fd233e79dfe7ffa325fd9f6 | Debug staging | server.js | server.js | // *** Express Server Setup ***
var express = require("express");
var app = express();
//Enable compression
var compression = require("compression");
app.use(compression());
// body-parser for the json
var bodyParser = require( 'body-parser' );
app.use( bodyParser.json() );
app.use( bodyParser.urlencoded( { extended... | JavaScript | 0.000001 | @@ -481,16 +481,19 @@
there.%0A
+/*%0A
if ( pro
@@ -580,16 +580,19 @@
l());%0A%7D%0A
+*/%0A
/*%0Avar h
|
2a533313d810618cb8e81869f0f3feebb00cc06b | Remove strftime, replace with moment.js module. | server.js | server.js | /**
* @desc this app uses a url parameter date value to output the date formatted as unix code and natural language.
* @author Garrick McCaskill kiwilifter808@gmail.com
* @required express, strftime
**/
var express = require('express')
,strftime = require('strftime')
,app = express();
app.get("/", (req,res... | JavaScript | 0 | @@ -212,90 +212,552 @@
var
-express = require('express')%0A ,strftime = require('strftime')%0A ,app = express();
+moment = require('moment');%0Avar express = require('express');%0Avar app = express();%0A%0A%0Afunction dateIsTimestamp(date) %7B%0A return moment.unix(date).isValid();%0A%7D%0A%0Afunction dateIsNatu... |
4b91adde9fcdac4489f062552dd96c72efa26fda | Disable some annoying JSCS stuff | server.js | server.js | // server.js
'use strict';
const express = require('express');
const app = express();
const mongoose = require('mongoose');
const morgan = require('morgan');
const bodyParser = require('body-parser'); // Pull info from HTML POST
const methodOverride = require('method-override')... | JavaScript | 0 | @@ -7,16 +7,82 @@
ver.js%0A%0A
+//jscs:disable requireTrailingComma, disallowQuotedKeysInObjects%0A%0A
'use str
|
4cac6accd3cfe40708d21f7de8b867fb3a8830d5 | Fix CORS | server.js | server.js | const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
require('dotenv').config();
const R = require('ramda');
// TODO: Remove next line after configuring unit tests
const webstatConvertor = require('./modules/webstat-convertor.js');
const gameManagement = require('... | JavaScript | 0.999969 | @@ -934,19 +934,16 @@
bodies%0A
-//
app.opti
|
133565007d22be90f80e4277f20d146ca6af1713 | add the calling of the system_user_schema.action_list_users function | system_user/system_user_manager/system_user_manager.js | system_user/system_user_manager/system_user_manager.js | "use strict";
//load the application configuration
var app_config = require ('./public/javascript/application_config.js');
// Loading and initializing the library:
var pgp = require('pg-promise')({
// Initialization Options
});
// Preparing the connection details:
// Need to change
var cn = 'postgres... | JavaScript | 0.000166 | @@ -3070,24 +3070,414 @@
;%0D%0A%09%7D);%0D%0A%09%0D%0A
+// list_users%0D%0A%09this.add(%7Brole:'system_user_manager', cmd:'list_users'%7D, function (msg, respond) %7B%0D%0A %09%09db.func('system_user_schema.action_list_users', msg._in_data)%0D%0A%09%09.then(function (data) %7B%0D%0A%09%09%09//console.log(%22DATA:%22,... |
7d384b45f15d4d4d3fe583d453d8f3ef2c5236ce | test adding https redirect as first middleware | server.js | server.js | // Bring in ("require") modules that will be needed in this app.
var express = require('express'), // web application framework
morgan = require('morgan'); // middleware for logging
// Create a class that will be our main application
var SimpleStaticServer = function() {
// set self to the scope of the class
... | JavaScript | 0 | @@ -603,13 +603,113 @@
rect
-Sec,
+HTTPS);%0A self.app.get('/fooworld', function(req,res) %7B res.send(%22%3Ch1%3Efooworld%3C/h1%3E%22); %7D;%0A self.app.use(
expr
|
6ff67a971f593f5224b58bb76d4310388a088d53 | update bm for t214p hotfix | src/Parser/Hunter/BeastMastery/Modules/Items/Tier21_4p.js | src/Parser/Hunter/BeastMastery/Modules/Items/Tier21_4p.js | import React from 'react';
import SPELLS from 'common/SPELLS/index';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import { formatNumber } from 'common/format';
import SpellIcon from "common/SpellIcon";
import SpellLink from "common/SpellLink";
const COOLDOWN_R... | JavaScript | 0 | @@ -327,17 +327,17 @@
ON_MS =
-1
+2
500;%0A%0Acl
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.