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 |
|---|---|---|---|---|---|---|---|
4a9162e494e20346736603b5012bb13a524e8b43 | correct readmePath | scripts/build-docs.js | scripts/build-docs.js | 'use strict';
const execa = require('execa');
const updateSection = require('update-section');
const transform = require('doctoc/lib/transform');
const fs = require('fs-extra');
const path = require('path');
const rootDir = process.cwd();
var startDocToc = '<!-- START doctoc generated instructions please keep commen... | JavaScript | 0.000194 | @@ -3083,16 +3083,38 @@
rootDir,
+ 'packages', 'razzle',
'README
|
5960c06e51e16307035e6c5edc63526bc2bb0ab2 | Update message_types.js | src/types/message_types.js | src/types/message_types.js | export const MESSAGE_SET = 'message_set';
export const MESSAGE_ERROR = 'message_error'; | JavaScript | 0.000003 | @@ -18,16 +18,19 @@
AGE_SET
+
= 'messa
@@ -65,16 +65,17 @@
E_ERROR
+
= 'messa
@@ -84,8 +84,9 @@
_error';
+%0A
|
3bfaa155d0e2be43151f6e223f891c79d5838231 | Fix callback call of noteon cb. | imports/ui/pages/mqtt-media-player/midi-player.js | imports/ui/pages/mqtt-media-player/midi-player.js | /**
* Soundfont Loading and Player
* https://www.npmjs.com/package/soundfont-player
*
* GM prerendered Soundfonts
* https://github.com/gleitz/midi-js-soundfonts
*/
import WebMidi from 'webmidi'
import Soundfont from 'soundfont-player'
import Synth from './synth.js'
export default class MidiPlayer {
constructor(ctx) ... | JavaScript | 0 | @@ -1757,24 +1757,45 @@
ctave);%0A
+ break;%0A %7D%0A
if(thi
@@ -1849,33 +1849,8 @@
ve)%0A
- break;%0A %7D%0A
|
faf6ac311b14219a96c331a4dd7733c5dfa0e318 | Revert my previous 'fix' for point projection | src/util/pointProjector.js | src/util/pointProjector.js | var cornerstoneTools = (function ($, cornerstone, cornerstoneTools) {
"use strict";
if(cornerstoneTools === undefined) {
cornerstoneTools = {};
}
if(cornerstoneTools.referenceLines === undefined) {
cornerstoneTools.referenceLines = {};
}
// projects a patient point to an image... | JavaScript | 0.000002 | @@ -495,38 +495,35 @@
x = imagePlane.
-column
+row
Cosines.dot(poin
@@ -577,35 +577,38 @@
y = imagePlane.
-row
+column
Cosines.dot(poin
@@ -850,38 +850,35 @@
x = imagePlane.
-column
+row
Cosines.clone().
@@ -983,35 +983,38 @@
y = imagePlane.
-row
+column
Cosines.clone().
|
cdae3ba21f3730d65e665a99e43e3d9c6c65aa81 | Fix assets loader | assets/js/loader.js | assets/js/loader.js | //= require modernizr.custom
//= require yepnope/yepnope
//= require_self
var load_assets = window.load_assets = (function () {
function collect(obj, prop) {
var out = [], i, l;
for (i in obj) {
if (obj.hasOwnProperty(i) && obj[i][prop]) {
out.push(obj[i][prop]);
}
}
return out... | JavaScript | 0.000001 | @@ -320,16 +320,38 @@
t;%0A %7D%0A%0A
+ function noop() %7B%7D%0A%0A
functi
@@ -381,24 +381,128 @@
callback) %7B%0A
+ callback = callback %7C%7C noop;%0A%0A if (0 === assets.length) %7B%0A callback();%0A return;%0A %7D%0A%0A
yepnope(
|
fbed720c2663b1abc73f8d0c8d9e653ad3b32dc4 | Fix year check | src/utils/formatPeriods.js | src/utils/formatPeriods.js | // npm packages
import moment from 'moment';
// This function takes in a list of user defined dates and a callback function
// and returns the result of the callback, once the dates have been validated,
// correctly formatted and defined as a period with both a start date and an
// end date.
export function formatPeri... | JavaScript | 0.999793 | @@ -2152,16 +2152,27 @@
).year()
+.toString()
? momen
|
7d33afe4a1ef138a1cf3c06d2a6c5a920089fa35 | enable prev button when one loop mode | assets/js/player.js | assets/js/player.js | Vue.component('player', {
props: ['player'],
methods: {
playerStart() {
fetch('/player/start', { method: 'POST' });
},
playerPause() {
fetch('/player/pause', { method: 'POST' });
},
playerNext() {
fetch('/player/next', { method: 'POST' });
},
playerPrev() {
fetch... | JavaScript | 0.000001 | @@ -2771,21 +2771,17 @@
ode
-!
+=
== '
-playlist
+none
' %7C%7C
|
7de19e63c92a7af0b2854892e439be7aa676c845 | Update beta.js | Beta/beta.js | Beta/beta.js | var imageAddr = "https://jdc20181.github.io/testpics/winter-fog-1323462087o5i.jpg";
var downloadSize = 584000; //bytes
function ShowProgressMessage(msg) {
if (console) {
if (typeof msg == "string") {
console.log(msg);
} else {
for (var i = 0; i < msg.length; i++) {
... | JavaScript | 0.000001 | @@ -1425,19 +1425,16 @@
%7B%0A
- //
var dur
@@ -1469,14 +1469,16 @@
) /
-1
+2
000;%0A
+//
var
@@ -1523,17 +1523,17 @@
Time) /
-1
+2
000);%0A
|
c791aadc136fbadfa24703f81c28024201fb214e | Change redirect URL to post page | assets/js/script.js | assets/js/script.js | /**
* Ostium CMS
* A content management system for Wolestech based website
* Script.js
* Script utama untuk mengatur interaksi user dengan aplikasi
* Include: Ajax
* @copyright Copyright (c) 2017, Wolestech | Adnan Zaki (https://wolestech.com/)
* @license https://github.com/adnzaki/ostium_cms/blob/master/L... | JavaScript | 0 | @@ -1459,16 +1459,25 @@
baseUrl
+ + 'post'
;%0A
|
d019d8fe943d16540ba654d01af5325884d36362 | fix redux actions for plugin update | backoffice/src/plugins/actions.js | backoffice/src/plugins/actions.js | import { backend } from '../api'
import { toastr } from 'react-redux-toastr'
export const actions = {
UPDATE_PLUGIN_REQUESTED: 'UPDATE_PLUGIN_REQUESTED',
PLUGIN_UPDATE_SUCCESS: 'PLUGIN_UPDATE_SUCCESS',
UPDATE_PLUGIN_LOADED: 'UPDATE_PLUGIN_LOADED',
ADD_PLUGIN_REQUESTED: 'ADD_PLUGIN_REQUESTED',
ADD_PLUGIN_SUC... | JavaScript | 0 | @@ -763,32 +763,138 @@
%7B plugin %7D,%0A%7D)%0A%0A
+const pluginUpdateLoaded = eltName =%3E (%7B%0A type: actions.UPDATE_PLUGIN_LOADED,%0A payload: %7B eltName %7D%0A%7D)%0A%0A
export const upd
@@ -1250,33 +1250,118 @@
%7B%0A dispatch(
-%7B
+pluginUpdateLoaded(pluginEltName))%0A %7D%0A%7D%0A%0Aconst addPlugi... |
26fd92fb8f9a77dab7fcc612047b908c20392f19 | support future durations with durationReal (partially fix #27) | plugins/date.js | plugins/date.js | function DatePlugin(bot) {
var self = this;
self.name = "date";
self.help = "Date manipulation plugin";
self.depend = [];
self.toUTC = function(date) {
// TODO: this breaks everything: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#Differences_in_assumed_time-zone
... | JavaScript | 0 | @@ -1019,24 +1019,131 @@
n(d1, d2) %7B%0A
+%09%09var future = d1.getTime() %3E d2.getTime();%0A%09%09if (future) %7B%0A%09%09%09var tmp = d1;%0A%09%09%09d1 = d2;%0A%09%09%09d2 = tmp;%0A%09%09%7D%0A%0A
%09%09var vars =
@@ -1221,16 +1221,16 @@
Year%22%5D;%0A
-
%09%09//bot.
@@ -1629,16 +1629,94 @@
nt);%0A%09%09%7D
+%... |
d87f25ee2095bf182bc4521bc050c716ffbeb66a | Update search.js | assets/js/search.js | assets/js/search.js | // http://rayhightower.com/blog/2016/01/04/how-to-make-lunrjs-jekyll-work-together/
// http://katydecorah.com/code/lunr-and-jekyll/
jQuery(function() {
// Initialize lunr with the fields to be searched, plus the boost.
idx = lunr(function () {
this.field('url');
this.field('prefLabel');
});
// Get the ... | JavaScript | 0.000001 | @@ -560,17 +560,29 @@
subjects
-%22
+: %22 + $.now()
);%0A $
@@ -727,17 +727,29 @@
ed index
-%22
+: %22 + $.now()
);%0A %7D);
|
c610f17c5d077bb0465a01f781aa5a13e84a20d4 | Fix for TypeError | tasks/rasterize.js | tasks/rasterize.js | /*global require, module*/
var path = require("path");
var async = require("async");
var RSVP = require('rsvp');
var rasterize = require('svg2png');
var getSvgDimensions = require('../lib/getSvgDimensions');
var chalk = require("chalk");
var numCPUs = require("os").cpus().length;
/**!
*
* Get the width of a single... | JavaScript | 0 | @@ -2428,24 +2428,66 @@
m, next) %7B%0A%0A
+ item.file.src = item.file.src%5B0%5D;%0A
var
|
15750b0af270da07917b70457cf09bda97d3d935 | Use shallow document comparisons in uniqueSort | src/selector/uniqueSort.js | src/selector/uniqueSort.js | define( [
"../core",
"../var/document",
"../var/sort"
], function( jQuery, document, sort ) {
"use strict";
var hasDuplicate;
// Document order sorting
function sortOrder( a, b ) {
// Flag for duplicate removal
if ( a === b ) {
hasDuplicate = true;
return 0;
}
// Sort on method existence if only one inp... | JavaScript | 0.000004 | @@ -522,16 +522,210 @@
ocument%0A
+%09// Support: IE 11+, Edge 17 - 18+%0A%09// IE/Edge sometimes throw a %22Permission denied%22 error when strict-comparing%0A%09// two documents; shallow comparisons work.%0A%09// eslint-disable-next-line eqeqeq%0A
%09compare
@@ -754,17 +754,16 @@
%7C a ) ==
-=
( b.own
@@ -977,16... |
a1cf5b136a29b853305b70b702ee34dae7d91d19 | Update ToggleButton type definitions | packages/web/src/components/basic/ToggleButton.js | packages/web/src/components/basic/ToggleButton.js | import React, { Component } from "react";
import { connect } from "react-redux";
import {
addComponent,
removeComponent,
watchComponent,
updateQuery
} from "@appbaseio/reactivecore/lib/actions";
import {
checkValueChange,
checkPropChange
} from "@appbaseio/reactivecore/lib/utils/helper";
import types from "@appb... | JavaScript | 0 | @@ -3260,28 +3260,28 @@
: types.
-addComponent
+funcRequired
,%0A%09compo
@@ -3294,26 +3294,29 @@
: types.
-componentI
+stringRequire
d,%0A%09data
@@ -3423,27 +3423,20 @@
: types.
-multiSelect
+bool
,%0A%09react
@@ -3474,31 +3474,28 @@
: types.
-removeComponent
+funcRequired
,%0A%09title
@@ -3529,27 +3529,28 @@... |
a4171d6da60af84a47f4be58599858fc75f91d31 | add timing information | gui/gui.js | gui/gui.js | // vim:ts=4:sw=4:expandtab
var tmpl;
// Add an econtains selector which checks for equality
$.expr[":"].econtains = function(obj, index, meta, stack){
return (obj.textContent || obj.innerText || $(obj).text() || "").toLowerCase() == meta[3].toLowerCase();
}
$(document).ready(function() {
$("#status").replace... | JavaScript | 0 | @@ -724,24 +724,71 @@
ace file%22);%0A
+ var at_req = (new Date).getTime();%0A
@@ -834,32 +834,85 @@
ction(indata) %7B%0A
+ var got_data = (new Date).getTime();%0A
@@ -927,46 +927,54 @@
log(
-%22
+'
JSON
-trace file loaded, rendering...%22
+parsed in ' + (g... |
d90d58b3216ce8625e59ce5ffccc7d6ca25fbb1d | Test push hook #4 | src/server/routes/hooks.js | src/server/routes/hooks.js | import Inferno from 'inferno'
import fs from 'fs'
import sys from 'sys'
import path from 'path'
import { exec } from 'child_process'
import crypto from 'crypto'
import router from 'koa-router'
export default router()
.get('/api/hooks', async(ctx, next) => {
const { fields, headers } = ctx.request
if (getSecre... | JavaScript | 0 | @@ -751,27 +751,8 @@
) %7B%0A
- // placeholder%0A
|
69fb656b18f9a77309ddf7008acaf2dfc1728bb3 | Enable importing json files | packages/scripts/buildPackage.js | packages/scripts/buildPackage.js | /** @todo Refactor this module to not have side effects */
const path = require("path");
const rollup = require("rollup");
const babel = require("rollup-plugin-babel");
const commonjs = require("rollup-plugin-commonjs");
const nodeResolve = require("rollup-plugin-node-resolve");
const postcss = require("rollup-plugin-... | JavaScript | 0 | @@ -1289,24 +1289,36 @@
rt%5D%0A %7D),%0A
+ json(),%0A
babel(%7B%0A
@@ -1390,28 +1390,16 @@
mmonjs()
-,%0A json()
%0A %5D%0A%7D;%0A
|
a09bb04c2224e63aafd22a845671eb9159297ccb | Add constants for news preference | packages/shared/lib/constants.js | packages/shared/lib/constants.js | export const MAIN_USER_KEY = 'USER_KEYS';
export const SECURE_SESSION_STORAGE_KEY = 'SECURE';
export const MAILBOX_PASSWORD_KEY = 'proton:mailbox_pwd';
export const UID_KEY = 'proton:UID';
export const INTERVAL_EVENT_TIMER = 30 * 1000;
export const EVENT_ACTIONS = {
DELETE: 0,
CREATE: 1,
UPDATE: 2,
UPDA... | JavaScript | 0.000001 | @@ -4443,12 +4443,107 @@
= 99999900;%0A
+export const NEWS = %7B%0A ANNOUNCEMENTS: 1,%0A FEATURES: 2,%0A NEWSLETTER: 4,%0A BETA: 8%0A%7D;%0A
|
36149f2f5917a88c387bbf57c6214427d80b8744 | update unittest | example/client/app/enterprise/enterprise.spec.js | example/client/app/enterprise/enterprise.spec.js | /*global describe, it, expect, beforeEach, inject */
'use strict';
describe( 'enterprise modul', function() {
beforeEach( module( 'enterprise' ) );
// newCtrl tests
describe('enterprise newCtrl', function() {
var newCtrl, scope;
beforeEach( inject( function( $controller ) {
sc... | JavaScript | 0 | @@ -960,16 +960,456 @@
tion() %7B
+%0A var scope, editCtrl;%0A%0A beforeEach( inject( function($controller ) %7B%0A scope = %7B%0A enterpriseCrew: %5B%0A %7Bname: 'Picard', description: 'Captain'%7D,%0A %7Bname: 'Riker', description: 'Numbe... |
e033ad998d708dd3dd579a92652b27ac6030ddb6 | Fix no keys | packages/shared/lib/keys/keys.js | packages/shared/lib/keys/keys.js | import {
getKeys,
decryptMessage,
decryptPrivateKey as decryptArmoredKey,
getMessage,
encodeBase64,
arrayToBinaryString,
encryptMessage
} from 'pmcrypto';
import getRandomValues from 'get-random-values';
import { VERIFICATION_STATUS } from 'pmcrypto/lib/constants';
import { noop } from '../... | JavaScript | 0.9995 | @@ -1,20 +1,16 @@
import %7B
-%0A
getKeys
@@ -10,20 +10,16 @@
getKeys,
-%0A
decrypt
@@ -30,56 +30,8 @@
age,
-%0A decryptPrivateKey as decryptArmoredKey,%0A
get
@@ -38,20 +38,16 @@
Message,
-%0A
encodeB
@@ -52,20 +52,16 @@
eBase64,
-%0A
arrayTo
@@ -73,20 +73,16 @@
yString,
-%0A
enc... |
0ac38378d20b716db976bb14823ae840f2c7c27d | Add colouring of dropdown row off ROAD | src/widgets/DropdownRow.js | src/widgets/DropdownRow.js | /* eslint-disable react/forbid-prop-types */
/**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
import React from 'react';
import { StyleSheet, TextInput } from 'react-native';
import PropTypes from 'prop-types';
import { DropDown } from './DropDown';
import { FlexRow } from './FlexRow';
import { SUSS... | JavaScript | 0 | @@ -308,16 +308,28 @@
import %7B
+ LIGHT_GREY,
SUSSOL_
@@ -1579,16 +1579,56 @@
holder%7D%0A
+ placeholderTextColor=%7BLIGHT_GREY%7D%0A
/%3E%0A
|
d62e0f222f492fe2c88be3e656133ac56089544d | Add localtunnel option to browserSync | grunt/browser-sync.js | grunt/browser-sync.js | // Local web server running on port 9001 with livereload functionality
module.exports = function(grunt) {
grunt.config('browserSync', {
options: {
watchTask: true,
server: {
baseDir: './'
}
},
bsFiles: {
src: [
'... | JavaScript | 0 | @@ -181,16 +181,55 @@
: true,%0A
+ tunnel: '%3C%25= pkg.name %25%3E',%0A
|
bb2cbcc90f739a7122b5ec03aa35fbd7c7f3d87e | Disable smooth scrolling | scripts/navigation.js | scripts/navigation.js | function rebuildToC() {
var ToC =
"<div class='table-of-contents'>" +
"<h2>On this page:</h2>" +
"<ul>";
var newLine, el, title, link;
$("#content h1").each(function() {
el = $(this);
title = el.text();
link = "#" + el.attr("id");
newLine =
"<li>" +
"<a href='" + link + "'>" +
title +
"</a>... | JavaScript | 0.000002 | @@ -518,18 +518,16 @@
ent',%0A%09%09
-//
'smoothS
@@ -567,19 +567,29 @@
ler
-didn't work
+flips between anchors
on
|
f326eb5bfa7a6d7199cc44972d9b19c83125d3e4 | Fix typo (#273) | src/shared/utils/config.js | src/shared/utils/config.js | /* @flow */
/* eslint-disable no-console */
/* eslint-disable import/global-require */
/* eslint-disable import/prefer-default-export */
/* eslint-disable no-underscore-dangle */
// This resolves the correct configuration source based on the execution
// environment. For node we use the standard config file, however,... | JavaScript | 0.001193 | @@ -682,16 +682,17 @@
s.env.IS
+_
NODE ===
|
0b807cc11d77a8264e73f469d1675fcd6df7c27c | Remove console log | src/lib/completeIssue.js | src/lib/completeIssue.js | const Request = require('request');
module.exports = (options, cb) => {
const headers = {
'User-Agent': 'GitPom',
'Authorization': `token ${options.access_token}`
};
const labelUrl = options.issueUrl + '/labels';
const newLabelPayload = [ 'Ready for Review' ];
Request.delete({
url: labelUrl + '/I... | JavaScript | 0.000002 | @@ -413,38 +413,8 @@
e %7B%0A
- console.log(res, body);%0A
|
f6e13275ac7d39cf2a3784437f5096d523f642ad | Change the icon on instructions view to chevrons | src/client/react/user/views/Instructions/InstructionCollapse.js | src/client/react/user/views/Instructions/InstructionCollapse.js | import React from 'react';
import autobind from 'core-decorators/es/autobind';
import { Button, Intent, Collapse } from '@blueprintjs/core';
import MarkdownRenderer from '../../../../../../lib/react/components/MarkdownRenderer';
import '../../scss/components/_instruction-panel.scss';
@autobind
class InstructionColla... | JavaScript | 0 | @@ -674,20 +674,33 @@
en?'
-remove':'add
+chevron-up':'chevron-down
'%7D o
|
1c32a349abeba6dceb6d0a4bc19b8d9840b0ea26 | add weinre | biz/weinre/app.js | biz/weinre/app.js | var cp = require('child_process');
var path = require('path');
var util = require('../../util');
var config = util.config;
cp.spawn('node', [path.join(__dirname, 'weinre.js'), '--boundHost',
config.WEINRE_HOST, '--httpPort', config.weinreport], {
stdio: [ 0, 1, 2 ]
}); | JavaScript | 0.000104 | @@ -208,26 +208,15 @@
-config.WEINRE_HOST
+'-all-'
, '-
|
fe999968c4fa132ef84b048885133b18d55b7be6 | fix tags formatting in WEs CSV exports (#177) | app/utils/file-downloader.js | app/utils/file-downloader.js | /* eslint-disable no-console */
import CSV from 'papaparse'
import FileSaver from 'file-saver'
import { lruToUrl } from './lru'
const translateValue = (value, type, mode) => {
mode = mode.toUpperCase() || 'TEXT'
let array_separator = ' '
if (type === 'array of string with pipe') {
array_separator = '|'
... | JavaScript | 0 | @@ -922,58 +922,8 @@
e ==
- 'JSON')%7B%0A return value%0A %7D else if(mode ==
'MD
@@ -1009,37 +1009,21 @@
return
-JSON.stringify(
value
-)
%0A %7D%0A%0A
|
fee3dc115bc3c22b7a500a0c07425858f4b72095 | reformat code | bl/lib/editPin.js | bl/lib/editPin.js | 'use strict';
const lib = {
"mail": require("../../lib/mail.js"),
"pin": require("../../lib/pin.js")
};
let bl = null;
let local = (soajs, inputmaskData, options, cb) => {
let modelObj = bl.user.mt.getModel(soajs);
options = {};
options.mongoCore = modelObj.mongoCore;
inputmaskData = inputmas... | JavaScript | 0.999729 | @@ -949,16 +949,17 @@
(error)
+
%7B%0A
@@ -1490,16 +1490,17 @@
user.id)
+
%7B%0A
|
c06f1bbc6ff84e79df1fe0398dcaf0a1b698988d | add some nice effects to element instructions so they start out hidden | src/scripts/controllers/apply_page.controller.js | src/scripts/controllers/apply_page.controller.js | /**
* Javascript for the apply_page controller
* Everything in hear needs to be value added so JS isn't necessary for applicants
*/
$(document).ready(function(){
//Add the datepicker to the DateInput element
$('div.form input.DateInput').datepicker({
showOn: "button",
buttonImage: "resource/foundation/media/... | JavaScript | 0 | @@ -368,11 +368,418 @@
ue%0A%09%7D);%0A
+ %0A $('div.field p.instructions').each(function(i)%7B%0A var p = $(this);%0A p.hide();%0A var label = $('label', $(this).siblings('div.element').first()).first();%0A var img = $('%3Cimg%3E').attr('src', 'resource/foundation/media/icons/information.png').attr('tit... |
742b9cea533bcd10dd780fef281905aebd45c664 | Update start-stop.js | scripts/start-stop.js | scripts/start-stop.js | //@auth @req(action, envName)
var c = jelastic.env.control, e = envName, s = session;
switch (action) {
case 'start': return c.StartEnv(e, s);
case 'stop': return c.StopEnv(e, s, -1);
case 'sleep': return c.SleepEnv(e, s);
default: return {result: 99, error: 'unknown action [' + a + ']'}
}
| JavaScript | 0.000001 | @@ -291,16 +291,21 @@
n %5B' + a
+ction
+ '%5D'%7D%0A
|
a1621492f2bf30c0c4a0f81275c837eb8876921a | Allow inline images to be in subdirectories | wikilike.js | wikilike.js | /* wikilike.js version history
*
* 2.0 2018-11-28
* Rewritten to work as file reformatting footer script link.
*
* 1.0 2015-06-28
* Initial single page application style implementation.
*/
if (!String.prototype.format) {
String.prototype.format = function() {
var args = ar... | JavaScript | 0.000001 | @@ -2036,16 +2036,18 @@
A-Z0-9_.
+%5C/
%5D+%5C.(png
|
edb1b482fc0b5f54c9a6d990474a2cba1bdf26bd | include orgs in search index | cron/daily/populate_search_index.js | cron/daily/populate_search_index.js | import config from 'config';
import algoliasearch from 'algoliasearch';
import Promise from 'bluebird';
import { Op } from 'sequelize';
import models from '../../server/models';
import { types as collectiveTypes } from '../../server/constants/collectives';
import { chunkArray } from '../../server/lib/utils';
import em... | JavaScript | 0.000002 | @@ -1127,16 +1127,36 @@
type:
+%7B%0A %5BOp.or%5D: %5B
collecti
@@ -1174,16 +1174,56 @@
LECTIVE,
+ collectiveTypes.ORGANIZATION%5D,%0A %7D,
%0A i
@@ -1261,16 +1261,17 @@
%0A %7D
+,
%0A %7D,%0A
|
f81a6a0cc97bfd9def9ff2364d9c307fdb26471a | change port from 3000 to 8080 | application/config/config.js | application/config/config.js | /*
* Configuration
*
* @version 1.0
* @author Robin <robin@cubettech.com>
* @Date 23-10-2013
*/
var path = require('path');
//port number
global.sleekConfig.appPort = 3000;
global.sleekConfig.appHost = 'localhost';
global.sleekConfig.siteUrl = 'http://localhost:3000';
global.sleekConfig.env = 'development';
... | JavaScript | 0.000015 | @@ -168,19 +168,19 @@
pPort =
-300
+808
0;%0A%0Aglob
@@ -269,11 +269,11 @@
ost:
-300
+808
0';%0A
|
f5845a72bbe7f0e51089b7231140837fee0f9e4c | Change spec to match indVars naming convention | specs/clientspecs/viewexperiment/IndVars.spec.js | specs/clientspecs/viewexperiment/IndVars.spec.js | var mocha = require('mocha');
var expect = require('chai').expect;
var React = require('react');
var ReactDOM = require('react-dom');
var TestUtils = require('react-addons-test-utils');
var mockStore = require('../../utils/mockStore');
var mockRequire = require('mockrequire');
//mock out the sub-component
var IndVar ... | JavaScript | 0 | @@ -849,10 +849,8 @@
dVar
-Id
s =
|
01810252a4949ea71c55e35da319ebbe90181009 | Make sure CA generation is daisy chained | src/ggrc/assets/javascripts/controllers/assessment_generator.js | src/ggrc/assets/javascripts/controllers/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
*/
can.Component.extend({
tag: "assessment-generator-button",
... | JavaScript | 0.000002 | @@ -961,16 +961,56 @@
ols, dfd
+, inner_dfd = new $.Deferred().resolve()
;%0A%0A
@@ -1194,24 +1194,25 @@
%7D);%0A
+%0A
retu
@@ -1371,38 +1371,183 @@
-return this._generate(control)
+// We are rewriting inner_dfd to make sure _generate calls are%0A // daisy chained%0A inn... |
094e744690638cd73270075b14a7690e4363029d | Fix tests. | lib/assets/test/spec/cartodb3/editor/style/style-definition-model.spec.js | lib/assets/test/spec/cartodb3/editor/style/style-definition-model.spec.js | var StyleDefinitionModel = require('../../../../../javascripts/cartodb3/editor/style/style-definition-model');
describe('editor/style/style-definition-model', function () {
beforeEach(function () {
this.model = new StyleDefinitionModel({
type: 'simple',
properties: {
labels: {
hello... | JavaScript | 0 | @@ -1953,32 +1953,58 @@
blending: null,%0A
+ resolution: null,%0A
aggregat
|
a0de11a5a6d2a858e73fe1fba584a0650dd752d2 | Fix test failing because we were passing the constructor instead of the element instance. | src/lifecycle/created.js | src/lifecycle/created.js | import { render } from '../api/symbols';
import data from '../util/data';
import eventsApplier from './events';
import patchAttributeMethods from './patch-attribute-methods';
import propsInit from './props-init';
import prototypeApplier from './prototype';
import support from '../native/support';
const isPolyfilled = ... | JavaScript | 0 | @@ -3450,20 +3450,20 @@
b =%3E cb(
-this
+elem
));%0A
|
00e925b6a2cc3c49232e1d19257295cf9ddbc9d8 | fix redirection emails on nexus form | scripts/components/nexus-form-validate.js | scripts/components/nexus-form-validate.js | var $nexusForm = $('.js_nexus_form'),
$modalAlert = $('#nexus-alert-modal'),
$modalAlertError = $('#nexus-alert-modal-error'),
$btnAlertOk = $modalAlert.find('#js_nexus_btn_alert_ok'),
$btnAlertError = $modalAlertError.find('#js_nexus_btn_alert_ok-error'),
$textAreaDescription = $('#company-detail-text'),
f... | JavaScript | 0 | @@ -495,16 +495,29 @@
ost:4000
+%7C127%5C.0%5C.0%5C.1
)+/ig,%0A
|
91de2b5990995b3c4a7e7109de255aa5a92a93f2 | Enable fcs logger | src/speakeasy/SpeakEasy.js | src/speakeasy/SpeakEasy.js | define([
'Ctl.speakeasy/Version',
'Ctl.speakeasy/Config',
'Ctl.speakeasy/Notification',
'Ctl/Logger',
'Ctl/Promise',
'Ctl/Ajax',
'Ctl/Utils',
'Ctl/Auth',
'fcs',
'Ctl.speakeasy/CallManager'
], function (Version, Config, Notification, Logger, Promise, Ajax, Utils, Auth, fcs, CallMa... | JavaScript | 0.000001 | @@ -884,18 +884,16 @@
-//
initFcsL
|
9ec113f6fc513df7883c78eb842f882d7859adb4 | Fix loadJsonp spy | Specs/Core/BingMapsGeocoderServiceSpec.js | Specs/Core/BingMapsGeocoderServiceSpec.js | /*global defineSuite*/
defineSuite([
'Core/BingMapsGeocoderService',
'Core/loadJsonp',
'Core/Rectangle',
'Specs/createScene'
], function(
BingMapsGeocoderService,
loadJsonp,
Rectangle,
createScene) {
'use strict';
var service;
var scene;
beforeEach(function() {
s... | JavaScript | 0.000028 | @@ -468,32 +468,147 @@
ecs();%0A %7D);%0A%0A
+ afterAll(function() %7B%0A loadJsonp.loadAndExecuteScript = loadJsonp.defaultLoadAndExecuteScript;%0A %7D);%0A%0A
it('construc
@@ -869,64 +869,19 @@
-jasmine.createSpy('testSpy', loadJsonp).and.returnValue(
+var data =
%7B%0A
@@ -1054,33 +10... |
88b187909a3335c1811df7b05303e28a5688b4be | FIX #2 | helpers.js | helpers.js | "use strict";
var deepEqual = require("deep-equal");
module.exports = {
/**
* Extend the object with the members of provided dictionaries.
* Allows recursive extension of objects.
*
* @param {Object} obj receiving object
* @param {Object} ..members additional members dictionaries
* ... | JavaScript | 0 | @@ -3857,34 +3857,142 @@
-value = parseFloat(value);
+if (value) %7B%0A value = parseFloat(value);%0A %7D else %7B%0A value = %22%22;%0A %7D
%0A
@@ -4524,45 +4524,178 @@
-record%5BfieldName%5D = value.toString();
+if (value && %22string... |
3ce5bab0c25dfe6bbfac83e4fa0aea1235ff214d | add kendodatasource factory | helpers.js | helpers.js | WAF.define('kendoHelpers', [], function() {
'use strict';
return {
toDate: function(str) {
if (str instanceof Date) {
return str;
}
if (typeof str == 'string') {
return new Date(str);
}
return null;
}
};
}); | JavaScript | 0 | @@ -1,5 +1,4 @@
-%EF%BB%BF
WAF.
@@ -36,17 +36,17 @@
tion() %7B
-%0D
+%0A
%09'use st
@@ -55,47 +55,1263 @@
ct';
-%0D%09%0D%09return %7B%0D%09%09toDate: function(str) %7B%0D
+%0A%09%0A%09function kendoDatasourceFromWakanda(wakandaDatasource, pageSize) %7B%0A%09%09var fetchOptions = null;%0A%09%09if (pageSize) %7B%0A%... |
8797cdabe82ecf8031278cc5630c2b3c93bbc0d7 | Copy the control templates from the plugins as well | bin/download_settings_controls.js | bin/download_settings_controls.js | #!/usr/bin/env node
var https = require('https');
var fs = require('fs');
var download = function(url, dest, cb) {
var file = fs.createWriteStream(dest);
var request = https.get(url, function(response) {
response.pipe(file);
file.on('finish', function() {
file.close(cb); // close() is async, call c... | JavaScript | 0 | @@ -743,501 +743,1686 @@
ngs
-updated%22);%0A%7D);%0A%0Adownload(%22https://raw.githubusercontent.com/e-mission/cordova-server-sync/master/www/ui/ionic/js/sync-settings.js%22, %22www/js/control/sync-settings.js%22, function(message) %7B%0A console.log(%22Sync collection settings updated%22);%0A%7D);%0A%0Adownload(... |
b198fe8823311195d3b4ab70cd3626877dc90d48 | Disable chart animations | src/main/js/app/chart.js | src/main/js/app/chart.js | (function () {
var updateIntervalMs = 1000;
var animate = true;
(function createLineChart() {
var randomData = Array(20);
var last = 0;
for (var i = 0; i < randomData.length; i++) {
var num = last + (Math.random() * 2 - 1);
randomData[i] = num;
n... | JavaScript | 0.000001 | @@ -60,19 +60,20 @@
imate =
-tru
+fals
e;%0A%0A
|
fdc4e8f67b3a907c45d64f026b32fe9a01d849e1 | Add transition duration for accordion animation | src/accordion/Accordion.js | src/accordion/Accordion.js | /**
* @overview An Accordion module comprised of sections that toggle open and close
* @module Accordion.js
*/
export const Accordion = {
accordionSection : `.js-accordion-section`,
accordionSectionContent : `.js-accordion-section-content`,
accordionSectionTrigger: `.js-accordion-section-toggle`,
openClass:... | JavaScript | 0 | @@ -334,16 +334,43 @@
n-open%60,
+%0A transitionDuration: 500,
%0A%0A /**%0A
@@ -1565,16 +1565,41 @@
ideDown%60
+, this.transitionDuration
);%0A %7D,%0A
@@ -1913,16 +1913,41 @@
slideUp%60
+, this.transitionDuration
);%0A %7D,%0A
|
a6464d21c71f1983fbd7e5a5fb6e4d77a9a74c9e | Add reset for global properties | src/actions/Conditional.js | src/actions/Conditional.js | import { Action } from '../lib/Action';
import { Util } from '@aegis-framework/artemis';
import { FancyError } from '../lib/FancyError';
export class Conditional extends Action {
static setup () {
// In here we'll save up what branch was taken every time we execute a
// conditional.
this.engine.history ('condi... | JavaScript | 0 | @@ -592,16 +592,363 @@
', %5B%5D);%0A
+%09%09return Promise.resolve();%0A%09%7D%0A%0A%09static reset () %7B%0A%09%09// Whether a conditional that was run is pending rollback on the next time%0A%09%09// a revert is issued.%0A%09%09this.engine.global ('_conditional_pending_rollback', %5B%5D);%0A%0A%09%09// Whether a con... |
538c03a12b5165acffc06b08b17d2d42d4f32db6 | Update APPLY_MOVE value to “APPLY_MOVE” | src/actions/GameActions.js | src/actions/GameActions.js | import { VS_HUMAN } from "../reducers/Game.js";
import computeMove from "./AI.js";
// Game action types
export const APPLY_MOVE = "PLAYER_MOVE";
export const RESET_GAME = "RESET_GAME";
export const SET_GAME_MODE = "SET_GAME_MODE";
export const START_NEXT_MATCH = "START_NEXT_MATCH";
const MOVE_TIMEOUT = 200;
// GRID_... | JavaScript | 0 | @@ -129,14 +129,13 @@
= %22
-PLAYER
+APPLY
_MOV
|
6e678f3427967a72779cd78004436a9ee647bf0c | Fix placeholder cycle inconsistencies | src/actions/Placeholder.js | src/actions/Placeholder.js | import { Action } from './../lib/Action';
import { Util } from '@aegis-framework/artemis';
export class Placeholder extends Action {
static matchString ([ action ]) {
return action === '$';
}
constructor ([action, name, ...args]) {
super ();
this.name = name;
this.action = this.engine.$ (name);
this.ar... | JavaScript | 0.000005 | @@ -341,32 +341,80 @@
%09willApply () %7B%0A
+%09%09let promise = Promise.resolve (this.action);%0A%0A
%09%09if (this.name.
@@ -431,38 +431,41 @@
_') === 0) %7B%0A%09%09%09
-return
+promise =
Util.callAsync
@@ -501,32 +501,55 @@
.this.arguments)
+;%0A%09%09%7D%0A%0A%09%09return promise
.then ((action)
@@ -545,... |
6ca1a333e84e1113c25b01a4fe5fab347a7c6c8e | change button name in list component | packages/strapi-plugin-setings-manager/admin/src/components/List/index.js | packages/strapi-plugin-setings-manager/admin/src/components/List/index.js | /**
*
* List
* params:
* -handlei18n: bool
* used for the buttonComponent to render label with FormattedMessage
* - listButtonLabel: string
* - listTitle: string
* - noListButtonPopUp: bool
* prevent from displaying the List button
* - renderRow: function
* overrides the default rendering of the List tr ... | JavaScript | 0.000002 | @@ -630,28 +630,36 @@
%0Aimport
-Strapi
Button
+PrimaryHotline
from 'c
@@ -1215,20 +1215,28 @@
%3C
-Strapi
Button
+PrimaryHotline
%0A
|
9a8c9613d2b96d2c2e623008cde68cc9f7fbd63b | fix support test library | src/BooJs.Tests/resources/BooJs.Tests.Support.js | src/BooJs.Tests/resources/BooJs.Tests.Support.js | Boo.define('BooJs.Tests.Support', ['Boo', 'exports'], function (Boo, exports) {
exports.Gender = {
Male: 0,
Female: 1
};
exports.Card = {
clubs: 0,
diamonds: 1,
hearts: 2,
spades: 3
};
function Character(name) {
this.Name = null;
this... | JavaScript | 0.000001 | @@ -1018,16 +1018,20 @@
s.Click(
+this
);%0A %7D
|
3e22537cef58d9993ff736a2717849061466afc7 | Test b64.encode rejects Promise if input is not a buffer | test/b64.encode.js | test/b64.encode.js | import test from 'ava';
import b64 from '../';
import values from './fixtures/values';
test('b64.encode returns a Promise', t => {
const returnValue = b64.encode(values.buffer);
t.true(returnValue instanceof Promise);
});
test('b64.encode encodes buffer to Base64', async t => {
const result = await b64.encode(valu... | JavaScript | 0.000211 | @@ -819,12 +819,134 @@
0 %7D));%0A%7D);%0A
+%0Atest('b64.encode rejects Promise if input is not a buffer', async t =%3E %7B%0A%09await t.throws(b64.encode(values.string));%0A%7D);%0A
|
9a3e6bdaea80f9bd5cda9e4c691eb5eaae2180f9 | fix test | test/build/main.js | test/build/main.js | var assert = require('assert');
var path = require('path');
var fs = require('fs');
var cli = require('../../lib/cli.js');
var testDir = path.join(__dirname, '/env/app');
function sortByPath(a, b) {
return a.path > b.path ? 1 : a.path < b.path ? -1 : 0;
}
function checkResult(flow, expectedPath, preprocessContent... | JavaScript | 0.000002 | @@ -1655,16 +1655,17 @@
(/%5C/ig;/
+g
, '%5C/gi;
|
c0ccc5dd0a8216a75dea1c224fec140500373801 | Fix some leftover issues from renaming browserify-dataset-sync-wrapper | gulp/tasks/default.js | gulp/tasks/default.js | var gulp = require('gulp');
var config = require('../config');
gulp.task('watch', function() {
gulp.watch(config.css.watch, ['css']);
gulp.watch(config.coffeelint.watch, ['coffeelint']);
gulp.watch(config.browserify.app.watch, ['browserify-app']);
gulp.watch(config.browserify... | JavaScript | 0.000004 | @@ -425,16 +425,29 @@
wserify-
+dataset-sync-
wrapper'
|
56297fc6a32646350bf9fdd823c27af1bd1ce1be | Fix cloudfront root | gulp/tasks/publish.js | gulp/tasks/publish.js | var gulp = require('gulp');
var rename = require('gulp-rename');
var awspublish = require('gulp-awspublish');
var cloudfront = require("gulp-cloudfront");
var aws = {
key: process.env.AWS_KEY,
secret: process.env.AWS_SECRET,
bucket: process.env.S3_BUCKET,
distributionId: process.env.DISTRIBUTION_ID
};
gulp.ta... | JavaScript | 0.000001 | @@ -301,16 +301,49 @@
UTION_ID
+,%0A patternIndex: /%5Eindex%5C.html$/
%0A%7D;%0A%0Agul
|
60c7ad55522570479e7062c8b5c0cdd4afb3e323 | Deploy new mongo | backend/iot/main.js | backend/iot/main.js | var request = require('request');
var async = require('async');
var util = require('util');
var mongoose = require('mongoose');
var Client = mongoose.model('Client');
var getter = require('./getter');
var mongoose = require('mongoose')
var adSchema = mongoose.model('Ad');
var _sent = [];
Array.prototype.same = func... | JavaScript | 0.000001 | @@ -1594,32 +1594,48 @@
(_sent.same(ads)
+ %7C%7C ads.same(%5B%5D)
)%7B%0A%09%09%09%09%09return;%0A
@@ -2388,16 +2388,32 @@
ame(ads)
+ %7C%7C ads.same(%5B%5D)
)%7B%0A%09%09%09%09%09
@@ -2447,21 +2447,16 @@
= ads;%0A
-%09%09%09%09%09
%0A%09%09%09%09%09so
|
ccb3874a7c3633259e0080326dda7b64e197c0af | handle non-transparent proxy calls from testem | remote/index.js | remote/index.js | /* eslint no-console: off */
'use strict';
var fs = require('fs');
var path = require('path');
var express = require('express');
var backstop = require('../core/runner');
var PATH_TO_CONFIG = path.resolve(process.cwd(), 'backstop');
var _config = require(PATH_TO_CONFIG);
module.exports = function (app) {
app._bac... | JavaScript | 0 | @@ -572,16 +572,276 @@
bodies%0A%0A
+ //Handle non-transparent proxy calls from testem (ember compatibility)%0A app.use(function(req, res, next) %7B%0A req.url = req.url%0A .replace(/%5C/backstop%5C/dview/,'/dview')%0A .replace(/%5C/backstop%5C/dtest/,'/dtest');%0A next();%0A %7D);... |
d5a39e6dc6ff9ed4195590546845c0a7e1f06e77 | use === on exit | test/cli_runner.js | test/cli_runner.js |
var jasmine = require('jasmine-node'),
verbose = false,
colored = true;
for (var key in jasmine) {
if (jasmine.hasOwnProperty(key))
global[key] = jasmine[key];
}
process.argv.forEach(function(arg) {
if (arg === '--no-color') {
colored = false;
}
if (arg === '--silent') {
verbose = false;
... | JavaScript | 0.000008 | @@ -436,16 +436,17 @@
Count ==
+=
0) %7B%0A
|
669f1670846c8236d4f34f3712239d9dccc68297 | Update test | test/connection.js | test/connection.js | var zoom = require('../lib');
var expect = require('chai').expect;
describe('connection', function() {
this.timeout(20000);
it('should get/set values', function() {
expect(zoom.connection('192.83.186.170:210/INNOPAC')
.set('preferredRecordSyntax', 'usmarc')
.get('preferredRecordSyntax')).to.equal('usm... | JavaScript | 0.000001 | @@ -3149,28 +3149,8 @@
eam(
-%7Bchunk: 1, limit: 1%7D
)%0A
@@ -3428,35 +3428,70 @@
');%0A
+ %7D%0A %7D)%0A
-done();%0A %7D
+.on('close', function() %7B%0A done();
%0A %7D)%0A
|
57ebc8ea157e076a437158a27564ce56b6b2892a | Test for presence of engine functions mainly | test/engineTest.js | test/engineTest.js | // Copyright, 2013-2014, by Tomas Korcak. <korczis@gmail.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, cop... | JavaScript | 0 | @@ -2084,32 +2084,33 @@
Url()', function
+
() %7B%0A
@@ -2129,32 +2129,33 @@
ned()', function
+
() %7B%0A
@@ -2305,32 +2305,33 @@
e URL', function
+
() %7B%0A
@@ -2638,32 +2638,33 @@
data', function
+
() %7B%0A
@@ -3130,32 +3130,33 @@
once', function
+
() %7B... |
c2cee8439e589eab8eda7d0707ca521ddf02d6ba | Revert "Disable intermittent event module test" | test/event-test.js | test/event-test.js | // event-test.js
//
// Test the event module
//
// Copyright 2012, E14N https://e14n.com/
//
// 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-... | JavaScript | 0 | @@ -2616,87 +2616,8 @@
);%0A%0A
-module.exports = %7B%7D; // TODO reenable this test when it's not intermittent%0A%0A//
suit
|
10f1ace4824320c9b9fa3b545f33ef97526883eb | Correct "without the callback" test | test/functional.js | test/functional.js | // Copyright (c) 2015. David M. Lee, II
'use strict';
var chai = require('chai');
var cls = require('continuation-local-storage');
var expect = chai.expect;
var ns = cls.createNamespace('test');
var counter = 0;
// chai config
chai.use(require('dirty-chai'));
chai.config.includeStack = true;
// load shim
require('.... | JavaScript | 0.000016 | @@ -2216,35 +2216,50 @@
nd();%0A
-cb(
+setTimeout(cb, 100
);%0A %7D, do
|
6f40e051a7bb70cec86e2f4937a5edad03ca8ec8 | stop wrapping incompatible methods | src/angular-parse-patch.js | src/angular-parse-patch.js | /*
* Part of mcwebb/angular-parse-patch
* Coypyright 2015 Matthew Webb <matthewowebb@gmail.com>
* MIT License
* Based on @brandid/parse-angular-patch released under the MIT license (2014)
*/
(function (window) {
var angular = window.angular,
module = angular.module('mcwebb.parse-patch', []),
methodsToUpdate =... | JavaScript | 0.000001 | @@ -697,24 +697,8 @@
ach'
-, 'first', 'get'
%5D,%0A%09
|
c1e35c5daeefac355a8856e7921ad854bb3ee956 | Set default params | plugins/api.js | plugins/api.js | import qs from 'querystring'
class API {
constructor (ctx) {
this.fetch = this.fetch.bind(this)
this.request = this.request.bind(this)
this.get = this.get.bind(this)
this.post = this.post.bind(this)
this.delete = this.delete.bind(this)
this.patch = this.patch.bind(this)
this._token = ''
... | JavaScript | 0.000002 | @@ -657,24 +657,167 @@
ce, body) %7B%0A
+ const defaults = %7B%0A include_post_raw: 1,%0A include_directed_posts: 0%0A %7D%0A const queryObj = Object.assign(%7B%7D, defaults, body)%0A
const pa
@@ -836,20 +836,24 @@
ringify(
-body
+queryObj
)%0A co
@@ -1590,16 +1590,70 @@
s.id%7D%60,%0A
+ ... |
46ce93ca90fe958ef82358e38b00c183aea9ff03 | Upgrade to 1.3.1, add Zepto support | hof.min.js | hof.min.js | (function(e){e.fn.hugeOnFacebook=function(t){var n={linkClass:"",addData:!1,minLikes:10,hugeLikes:50,popClass:"popular",hugeClass:"hugeonfacebook",likesVisible:!1,likesVisibleClass:"likesVisible"},r=e.extend({},n,t);if(this.attr("id"))var i="#"+this.attr("id")+" ";else if(this.attr("class"))var s="."+this.attr("class")... | JavaScript | 0 | @@ -1,17 +1,17 @@
-(
+!
function(e)%7Be.fn
@@ -7,12 +7,12 @@
ion(
-e)%7Be
+a)%7Ba
.fn.
@@ -39,16 +39,16 @@
ion(
-t
+b
)%7Bvar
-n
+c
=%7Bli
@@ -194,11 +194,11 @@
e%22%7D,
-r=e
+d=a
.ext
@@ -208,11 +208,11 @@
(%7B%7D,
-n,t
+c,b
);if
@@ -232,17 +232,17 @@
d%22))var
-i
+e
=%22#%22+thi
@@ -289,17 +289,17 @@
s... |
abdbf9996f20422b72c215ec553fd137fc9054be | set up social buttons | server/config/xsrf.js | server/config/xsrf.js | 'use strict';
var crypto = require('crypto');
function uid(len) {
return crypto.randomBytes(Math.ceil(len * 3 / 4))
.toString('base64')
.slice(0, len)
.replace(/\//g, '-')
.replace(/\+/g, '_');
}
// The xsrf middleware provide AngularJS style XSRF-TOKEN provision and validation
// Add it to your ... | JavaScript | 0.000001 | @@ -459,24 +459,26 @@
RF token%0A
+/*
var token =
@@ -1445,24 +1445,26 @@
%7D%0A %7D
+*/
%0A // All
|
3065e58cbf235f23619bfee3e8faf4318597628f | Remove references to old addon name | test/index-test.js | test/index-test.js | /* globals describe, it */
/* jshint node: true, esnext: false, expr: true */
/* jscs: disable */
'use strict';
var emberFunctionalHelpersIndex = require('../index');
var expect = require('chai').expect;
describe('index', function() {
describe('#exclusionFilter', function() {
it('should return `true` if a file ... | JavaScript | 0 | @@ -110,38 +110,21 @@
';%0A%0Avar
-emberFunctionalHelpers
+addon
Index =
@@ -482,38 +482,21 @@
esult =
-emberFunctionalHelpers
+addon
Index.ex
@@ -807,38 +807,21 @@
esult =
-emberFunctionalHelpers
+addon
Index.ex
@@ -1130,38 +1130,21 @@
esult =
-emberFunctionalHelpers
+addon
Index.ex
@@ -1502,38 +1502,21 @... |
18508c8ad5454b2f4d6c00b0300bd918659eb3ab | Add electron version exception test | test/index.spec.js | test/index.spec.js | "use strict";
const babelPresetEnv = require("../lib/index.js");
const assert = require("assert");
const { versions: electronToChromiumData } = require("electron-to-chromium");
describe("babel-preset-env", () => {
describe("getTargets", () => {
it("should return the current node version with option 'current'", ... | JavaScript | 0 | @@ -1805,32 +1805,392 @@
%7D);%0A %7D);
+%0A%0A it(%22should error if electron version is invalid%22, () =%3E %7B%0A const fixtures = %5B%0A %220.19%22,%0A 0.19,%0A 999,%0A %22999%22,%0A %5D;%0A%0A fixtures.forEach((electronVersion) =%3E %7B%0A assert.throws... |
ecca8ef251e0546fed79e24b78079d357b9c9658 | Check if every item in results is an object | test/index.test.js | test/index.test.js | const getResults = require('../lib')
const nock = require('nock')
const test = require('tape')
test('check results', (assert) => {
let today = (new Date()).toISOString().substring(0, 10)
getResults(today)
.then(results => {
assert.equal(Array.isArray(results), true, 'results should be an array')
a... | JavaScript | 0.000169 | @@ -306,16 +306,122 @@
array')%0A
+ results.forEach(i =%3E assert.equal(typeof i, 'object', 'every item in results should be an object'))%0A
as
|
a9372f38a149de7ce8f3a81f71a0973a213b7ddf | fix import statement | test/index.test.js | test/index.test.js | /* global describe, it */
import { expect } from 'chai'
import { Form, UnboundInput } from '../src/index'
import Frig from '../src/index'
describe('defaultTheme', () => {
it('throws when given something that is not an object', () => {
const fn = Frig.defaultTheme.bind(null, 5)
expect(fn).to.throw(Error, /In... | JavaScript | 0.000008 | @@ -56,16 +56,22 @@
'%0Aimport
+ Frig,
%7B Form,
@@ -109,40 +109,8 @@
dex'
-%0Aimport Frig from '../src/index'
%0A%0Ade
|
44a7f04701ce43b66ccc17f48e3fe413c40e1fdb | remove console.logs | test/index.test.js | test/index.test.js | 'use strict';
const chai = require('chai');
const expect = chai.expect;
const libstorj = require('..');
const mockbridge = require('./mockbridge.js');
const mockbridgeData = require('./mockbridge.json');
describe('libstorj', function() {
let server;
before(function(done) {
server = mockbridge.listen(3000, ... | JavaScript | 0.000002 | @@ -3106,99 +3106,8 @@
) %7B%0A
- console.log(result%5Bi%5D.created);%0A console.log(typeof result%5Bi%5D.created);%0A
|
07411327e9a3027b179f1d1d0577222cc5d17ebd | Add missing platforms (#9412) | test/karma.conf.js | test/karma.conf.js | // @flow weak
const path = require('path');
const webpack = require('webpack');
const browserStack = {
username: process.env.BROWSERSTACK_USERNAME,
accessKey: process.env.BROWSERSTACK_ACCESS_KEY,
build: `material-ui-${new Date().toISOString()}`,
};
// Karma configuration
module.exports = function setKarmaConfi... | JavaScript | 0 | @@ -2798,35 +2798,32 @@
Chrome',%0A
- //
'BrowserStack_F
@@ -2830,35 +2830,32 @@
irefox',%0A
- //
'BrowserStack_S
@@ -2869,19 +2869,16 @@
%0A
- //
'Browse
@@ -3238,35 +3238,32 @@
%7D,%0A
- //
BrowserStack_Fi
@@ -3270,35 +3270,32 @@
refox: %7B%0A
- //
base: 'Brow... |
86a654c94cb257880731cce8fd806e153fb299df | Update karma.conf.js | test/karma.conf.js | test/karma.conf.js | module.exports = (config) => {
var configuration = {
basePath: '../',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['requirejs', 'benchmark'],
// list of files / patterns to load in the browser
files: [
'test/test-main.js',
... | JavaScript | 0.000001 | @@ -1568,52 +1568,8 @@
ers:
- process.env.TRAVIS ? %5B%22Chrome_travis_ci%22%5D :
%5B%22C
|
d6d9f062628448a3b2e640cb48936a1a763bda64 | test common - require assert | test/lib/common.js | test/lib/common.js |
expect = require('chai').expect
async = require('async')
DynamoDB = require('../../lib/dynamodb')()
DynamoDB.on('error', function(op, error, payload ) {
//console.log(op,error,payload)
})
DynamoDB.on('beforeRequest', function(op, payload ) {
//console.log("--------------------------------")
//console.log(op,payloa... | JavaScript | 0.000058 | @@ -51,16 +51,42 @@
async')%0A
+assert = require('assert')
%0ADynamoD
|
b4071e71212fff71fa14bebc9080735f6322dc17 | fix runner output test | test/lib/runner.js | test/lib/runner.js | var rewire = require('rewire'),
sinon = require('sinon'),
expect = require('chai').expect,
docker = require('../spec_helper').docker,
Factory = require('../spec_helper').FactoryGirl,
Runner = rewire('../../lib/runner');
describe('Runner', function() {
var sleepCode = Factory.create('sleepCode... | JavaScript | 0.000015 | @@ -856,17 +856,60 @@
= stream
-)
+ %7C%7C data.chunk === '%5Cn')%0A
return;
|
fdf4448d9d956224d101a4df56b498e7ef5c6a83 | Fix cache control headers | routes/badge.js | routes/badge.js | var path = require("path")
var manifest = require("../lib/manifest")
var brains = require("../lib/brains")
var getDepsType = require("./helpers/get-deps-type")
function getBadgePath (status, opts) {
opts = opts || {}
var type = opts.type ? opts.type + "-" : ""
var retina = opts.retina ? "@2x" : ""
var extensi... | JavaScript | 0.000001 | @@ -690,54 +690,8 @@
%7B%7D%0A%0A
- res.setHeader(%22Cache-Control%22, %22no-cache%22)%0A%0A
va
@@ -1030,16 +1030,211 @@
%7D%0A %7D%0A%0A
+ var sendFileOpts = %7B%0A lastModified: false,%0A etag: false,%0A headers: %7B%0A %22Cache-Control%22: %22no-cache, no-store, must-revalidate%22,%0A %22... |
34fc90f76ea250eee21accd27df437d1b829da73 | fix some error | routes/index.js | routes/index.js | var express = require('express');
var dbUtils = require('../utils/dbUtils');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
var no = req.query.p;
var id = req.query.id;
no = !!no && Number(no) > 0 ? Number(no) : 1;
var params = {
body: {
... | JavaScript | 0.000543 | @@ -503,37 +503,32 @@
dbUtils.get
-Count
('bing', params,
|
c505dd046f3452da259887998f0a21118d5acf42 | fix #76 past residency showing on front page | routes/index.js | routes/index.js | var express = require('express')
var router = express.Router()
var path = require('path')
var debug = require('debug')('app:' + path.basename(__filename).replace('.js', ''))
var async = require('async')
var op = require('object-path')
var mapper = require('../helpers/mapper')
var featured = []
var prog... | JavaScript | 0 | @@ -4831,32 +4831,267 @@
vent, null, 2))%0A
+ if (event%5B'end-time'%5D) %7B%0A var eventEndDate = (event%5B'end-time'%5D).slice(0,10)%0A if (eventEndDate %3C new Date().toJSON().slice(0,10)) %7B return callback(null) %7D%0A %7D%0A else %7B return callback(null) %7D%0A
... |
ae7313d190410db9c335e635eed2c65082d0491c | update index.js file in router | routes/index.js | routes/index.js | "use strict";
/*
Created by lx on 2016/11/17
Name: Xuan Li
CWID:10409939
Email: xli100@stevens.edu
*/
const passport = require('passport');
const express = require('express');
const router = express.Router();
const userRoutes = require('./user');
const cityRoutes = require('./city');
const siteRoutes... | JavaScript | 0.000001 | @@ -371,24 +371,63 @@
%22./food%22);%0D%0A
+const blogRoutes = require(%22./blog%22);%0D%0A
const xss =
|
f31ebdc08f832230e5fd5e89f50fe838e2c8d95e | Update default response on root API endpoint | routes/index.js | routes/index.js | var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.status(200).send('This is the Journey app.');
});
module.exports = router;
| JavaScript | 0 | @@ -145,13 +145,47 @@
00).
-send(
+json(%7B%0A success: true,%0A message:
'Thi
@@ -205,13 +205,17 @@
ney
-app.'
+API.'%0A %7D
);%0A%7D
|
3e17c18ca29ad37d7dfee1f78f10ad5bb624a8c7 | allow CORS | routes/index.js | routes/index.js | var sites = require( './sites' );
function setup( app ) {
app.get( '/sites/:id', sites.getSite );
//app.get( '/sites/*', sites.handle )
};
module.exports.setup = exports.setup = setup; | JavaScript | 0.000019 | @@ -51,16 +51,261 @@
app ) %7B
+%0A %0A app.all( '*', function(req, res, next) %7B%0A res.header( %22Access-Control-Allow-Origin%22, %22*%22 );%0A res.header( 'Access-Control-Allow-Methods', 'GET' );%0A res.header( %22Access-Control-Allow-Headers%22, %22X-Requested-With%22 );%0A next();%0A %7D);
%0A%0... |
8ab4f297657a0bb2ce2a82debe78b4b76460ec0e | Add plugin javascript file | www/safe.js | www/safe.js | var exec = require('cordova/exec');
exports.coolMethod = function(arg0, success, error) {
exec(success, error, "safe", "coolMethod", [arg0]);
};
| JavaScript | 0.000001 | @@ -1,61 +1,491 @@
-var exec = require('cordova/exec');%0A%0Aexports.coolMethod =
+/**%0A * @title Safe - cordova.plugins.bridge.safe%0A * @overview Easy to use cryptographic operations for Cordova.%0A * @copyright %C2%A9 2014 cordova-bridge%0A * @license GPLv2%0A * @author Carlos Antonio%0A * @version 0.1.0%0A*/%0A%0A... |
b03000bd4b47971a931559db3da91b71d690c2f7 | Update login.js | routes/login.js | routes/login.js | var express = require('express');
var router = express.Router();
var request = require('request');
var passport = require('passport');
var FacebookStrategy = require('passport-facebook').Strategy;
var userCtrl = require('../controllers/userCtrl');
var userModel = require('../models/userModel');
var userID;
router.use(... | JavaScript | 0.000001 | @@ -497,18 +497,16 @@
e',%0A
-//
callback
@@ -573,24 +573,26 @@
llback%22%0A
+//
callbackURL:
|
d85497a275cf98d27544cc2bb7846d02fa72e9f4 | Fix capturing the twitter identity information | packages/accounts-twitter/twitter_server.js | packages/accounts-twitter/twitter_server.js | (function () {
Accounts.oauth.registerService('twitter', 1, function(oauthBinding) {
var identity = oauthBinding.get('https://api.twitter.com/1/account/verify_credentials.json');
return {
serviceData: {
id: identity.id,
screenName: identity.screen_name,
accessToken: oauthBindin... | JavaScript | 0.000248 | @@ -177,16 +177,21 @@
s.json')
+.data
;%0A%0A r
|
1a55110c33f7baa50b16c22a83bf4ed9489d61fa | update table name to lowercase | routes/mysql.js | routes/mysql.js | var mysql = require('mysql');
var moment = require('moment');
var serviceInfo = JSON.parse(process.env.VCAP_SERVICES || '{}');
var getConnectionParams = function() {
return {
host: process.env.MYSQL_SERVICE_HOST,
user: 'sentimentuser',
password: 'password',
database: 'sentimentdb'
};
}
exports.ge... | JavaScript | 0.00151 | @@ -707,29 +707,29 @@
OY FROM
-SENTIMENTDATA
+sentimentdata
ORDER B
@@ -3478,29 +3478,29 @@
ME FROM
-SENTIMENTDATA
+sentimentdata
GROUP B
|
8b4d82b2ceda5d5b09f5f25a4af366e757481b82 | Add brief documentation for Ember.Object | packages/ember-runtime/lib/system/object.js | packages/ember-runtime/lib/system/object.js | // ==========================================================================
// Project: Ember Runtime
// Copyright: ©2011 Strobe Inc. and contributors.
// License: Licensed under MIT license (see license.js)
// ==========================================================================
require('ember-runtime/mixin... | JavaScript | 0 | @@ -473,16 +473,221 @@
@class%0A
+%0A %60Ember.Object%60 is the main base class for all Ember objects. It is a subclass%0A of %60Ember.CoreObject%60 with the %60Ember.Observable%60 mixin applied. For details,%0A see the documentation for each of these.%0A%0A
@exten
|
d7409821cb0bd55faf51b7ce0ce2c6b5579d3e28 | Tag Filtering Row / Section Formatting | lib/templates/default/fulldoc/html/js/cucumber.js | lib/templates/default/fulldoc/html/js/cucumber.js | function cucumberSearchFrameLinks() {
$('#features_list_link').click(function() {
toggleSearchFrame(this, relpath + 'feature_list.html');
});
$('#tags_list_link').click(function() {
toggleSearchFrame(this, relpath + 'tag_list.html');
});
}
$(cucumberSearchFrameLinks);
function toggle... | JavaScript | 0 | @@ -1078,16 +1078,74 @@
aTags);%0A
+ hideEmptySections();%0A fixSectionRowAlternations();%0A
%7D%0A%0Afunct
@@ -2239,69 +2239,546 @@
tion
-(section) %7B%0A%0A%7D%0A%0Afunction fixSectionRowAlternation(section) %7B%0A
+s() %7B%0A%09%0A%09%5B%22feature%22,%22scenario%22%5D.forEach(function(section,index,sections... |
02548573df9b4d5d936e6b61d2193f9305a84434 | Remove stray `}` from docs | src/models/cart-model.js | src/models/cart-model.js | import BaseModel from './base-model';
import CartLineItem from './cart-line-item-model';
import assign from '../metal/assign';
import setGuidFor from '../metal/set-guid-for';
import { GUID_KEY } from '../metal/set-guid-for';
function objectsEqual(one, two) {
if (one === two) {
return true;
}
return Object.k... | JavaScript | 0.000004 | @@ -4488,17 +4488,16 @@
m(123, 2
-%7D
).then(c
|
03bc553b07a23dc8698d7d6ca12f17b87da5dbd7 | Clean up socket.js, remove debug spam | brolink/socket.js | brolink/socket.js | /* Injected into the webpage we're linking to
* I recommend using GreaseMonkey or something similar to automatically inject,
* but you can also just do something like:
* <script src='http://127.0.0.1/socket.js'></script>
*/
var ___brolink = function () {
console.log("Hey, Listen!: Brolink loaded!");
// Change... | JavaScript | 0.000004 | @@ -258,56 +258,8 @@
) %7B%0A
-%09console.log(%22Hey, Listen!: Brolink loaded!%22);%0A%09
%0A%09//
@@ -381,158 +381,46 @@
) %7B
-console.log(%22Hey, Listen!: Connected to Brolink!%22); %7D;%0A%09socket.onclose = function(evt) %7B console.log(%22Hey, Listen!: No longer connected to Brolink!%22);
+ %7D;%0A%09socket.o... |
6032452716808cf5918f7b2e11e988f13ee6e178 | comment out console.log AWS ACCESS KEY | routes/s3lib.js | routes/s3lib.js | /*routes/s3lib.js of reverse_airbnb */
var aws = require('aws-sdk');
var fs = require('fs');
var listing_lib = require('./listing_lib.js'); // find at local path
var _ = require('underscore');
if (process.env.AWS_ACCESS_KEY && process.env.AWS_SECRET_KEY){
console.log("[INFO]s3lib.js has been using environmental key... | JavaScript | 0.000001 | @@ -565,16 +565,19 @@
T_KEY;%0A%0A
+//
console.
|
1f3441c456b7ee96a534980caf8e550dd49a5810 | disable eslint checks and add externs | packages/eslint-plugin-googlejs/Makefile.js | packages/eslint-plugin-googlejs/Makefile.js | const closurePackage = require('google-closure-compiler');
const ClosureCompiler = closurePackage.compiler;
var compiler = new ClosureCompiler(
{
js: [
'index.js',
'./lib/*.js',
],
externs: [
'./externs.js',
],
language_in: 'ECMASCRIPT6_STRICT',
warning_level: 'VERBOSE',
... | JavaScript | 0 | @@ -102,16 +102,57 @@
piler;%0A%0A
+/* eslint-disable googlejs/camelcase */%0A%0A
var comp
@@ -269,16 +269,52 @@
/externs
+-eslint.js',%0A './externs-estree
.js',%0A
|
244b0096444fe56fe8aa5b054fc524bf61f42482 | Fix initial setup device creation | routes/setup.js | routes/setup.js | module.exports = function(app, security) {
var async = require('async')
, Role = require('../models/role')
, User = require('../models/user')
, Device = require('../models/device')
, userTransformer = require('../transformers/user');
var passwordLength = null;
Object.keys(security.authentication.... | JavaScript | 0.000001 | @@ -2312,32 +2312,112 @@
n(user, done) %7B%0A
+ req.device.registered = true;%0A req.device.userId = user._id;%0A
Device
|
0389bec76ea38ca16a20c3d7f2c38cd80f638f1d | fix problem with users login | routes/users.js | routes/users.js | var express = require('express');
var crypto = require('crypto');
var db = require('../helpers/db')();
var dateHelper = require('../helpers/date')();
var atob = require('atob');
var router = express.Router();
/*********************************/
/* GET user by name and password */
/*********************************/
r... | JavaScript | 0.000008 | @@ -870,16 +870,36 @@
%09%09else%7B%0A
+%09%09%09if(results%5B0%5D)%7B%0A%09
%09%09%09delet
@@ -924,16 +924,17 @@
ord;%0A%09%09%09
+%09
delete r
@@ -949,16 +949,21 @@
%5D.date;%0A
+%09%09%09%7D%0A
%09%09%09res.r
|
55db6a94a2f69c4bcbe142678beaf955034bdfaa | Remove non existent filter from Analytics. | assets/js/modules/analytics-4/index.js | assets/js/modules/analytics-4/index.js | /**
* Analytics-4 module initialization.
*
* Site Kit by Google, Copyright 2021 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/LIC... | JavaScript | 0 | @@ -655,712 +655,49 @@
*/%0A%0A
-/**%0A * WordPress dependencies%0A */%0Aimport %7B addFilter %7D from '@wordpress/hooks';%0Aimport %7B __ %7D from '@wordpress/i18n';%0A%0A/**%0A * Internal dependencies%0A */%0Aimport %7B isFeatureEnabled %7D from '../../features';%0A%0Aexport %7B registerStore %7D from './datastore';... |
c660a034ee546cee721638778eec849552d51ffe | fix email submit | static/js/client/waiter.js | static/js/client/waiter.js | Waiter.prototype.emailContainerSelector = ".email-container";
Waiter.prototype.emailSuccessContainerSelector = ".email-success-container";
Waiter.prototype.emailFormSelector = "form";
Waiter.prototype.rankSelector = ".rank";
Waiter.prototype.referralLinkSelector = ".referral-link";
Waiter.prototype.dataReferralLinkSel... | JavaScript | 0 | @@ -1479,11 +1479,8 @@
ay()
-%5B0%5D
,%0A
@@ -1588,12 +1588,32 @@
ata.
-id =
+push(%7Bname: 'id', value:
_th
@@ -1634,16 +1634,18 @@
itlistID
+%7D)
;%0A%0A
|
3903efd0503d56de43c17eb7f7124c1971c268a9 | fix scroll bug | static/js/html_actuator.js | static/js/html_actuator.js | function HTMLActuator() {
this.tileContainer = document.querySelector(".tile-container");
this.scoreContainer = document.querySelector(".score-container");
this.bestContainer = document.querySelector(".best-container");
this.messageContainer = document.querySelector(".game-message");
this.chatList = d... | JavaScript | 0 | @@ -433,16 +433,418 @@
ore = 0;
+%0A%0A // ...%0A var self = this;%0A self.chatContainer.dataset.autoScroll = %22true%22;%0A self.chatContainer.addEventListener(%22scroll%22, function(evt) %7B%0A self.chatContainer.dataset.autoScroll = %22false%22;%0A // if scroll at bottom %0A if(self.chatContainer.scrol... |
eafd5a731afa8a735dc40d45d8c213faf3871d8e | Remove dead code: messages.flags.send_force_collapse. | static/js/message_flags.js | static/js/message_flags.js | var message_flags = (function () {
var exports = {};
var batched_updaters = {};
function batched_updater(flag, op, immediate) {
var queue = [];
var on_success;
var start;
function server_request() {
// Wait for server IDs before sending flags
var real_msgs = _.filter(queue, function (... | JavaScript | 0.000163 | @@ -2565,140 +2565,8 @@
%7D;%0A%0A
-exports.send_force_collapse = function send_force_collapse(messages, value) %7B%0A send_flag(messages, %22force_collapse%22, value);%0A%7D;%0A%0A
expo
|
10439aadbe9f4247f86f60a8abb2f1daaf0726ce | Remove logger reference | test/stale.test.js | test/stale.test.js | const expect = require('expect')
const {createRobot} = require('probot')
const Stale = require('../lib/stale')
const notFoundError = {
code: 404,
status: 'Not Found',
headers: {}
}
describe('stale', () => {
let robot
let github
beforeEach(() => {
robot = createRobot()
const issueAction = expect.c... | JavaScript | 0.000001 | @@ -3899,16 +3899,8 @@
ale'
-, logger
%7D)%0A
|
83e8bc67ed12ea73831f76af4649dff817dc4066 | Update sumologic.js | lib/bridges/sumologic.js | lib/bridges/sumologic.js | var util = require('util')
, os = require('os')
, client = {}
, S3StreamLogger = require('s3-streamlogger').S3StreamLogger
, metalogger = require('../metalogger');
var bucketDetails = {
bucket: '',
access_key_id: '',
secret_access_key: '',
name_format: '%Y-%m-%d-%H-%M-' + (proce... | JavaScript | 0 | @@ -2280,932 +2280,34 @@
%0A i
-f(args.length === 1) %7B%0A /* %0A If the argument is an object, then pass it through so that we can %0A search subfield values in sumologic. If not, then it might be a formatted%0A string, so we should try not to run it through util inspect.%0A */%0A if (args%... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.