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
ac5ef57cfa4c27f64bd4113f3d486ad237316d70
Stop any type of logging.
components/util/loggingUtils.js
components/util/loggingUtils.js
const DEBUG_MODE_ON = true; /** * This file contains several logging functions used all accross the application. */ function createMsgHead(depth, debug) { var e = new Error; var line = e.stack.split('\n')[depth]; var re = RegExp('[^ ]*$'); var fileFullpathString = re.exec(line)[0]; var re2 = Reg...
JavaScript
0
@@ -780,24 +780,26 @@ h, debug);%0A%0A +// console. @@ -834,24 +834,26 @@ (object) %7B%0A +// cons
66c68defdbb614f9f41d849cb346884045566324
disable parallel uploads (set to 1)
frontui/static/scripts/checklist.saved.view.js
frontui/static/scripts/checklist.saved.view.js
/** * */ define(['jquery', 'dropzone', 'pica'], function($, dropzone, pica) { 'use strict'; var Dropzone = window.Dropzone; Dropzone.autoDiscover = false; function base64ToFile(dataURI, origFile) { var byteString, mimestring; if (dataURI.split(',')[0].indexOf('base64') !== -1) { ...
JavaScript
0
@@ -1340,16 +1340,48 @@ e: false +,%0A parallelUploads: 1 %0A
3cb0147dd121b617538c86e37af50d64611ae11d
Fix PluginInfo.getConfig (broken by previous commit)
core/PluginInfo.js
core/PluginInfo.js
var fs = require("fs"); function PluginInfo(manager, directory) { this.manager = manager; this.directory = directory; this.loaded = false; this.events = {}; this.reloadMeta(); } PluginInfo.prototype.reloadMeta = function () { var file = this.directory + "/meta.json"; this.meta = JSON.par...
JavaScript
0
@@ -2603,23 +2603,32 @@ return -manconf +%5Bthis.meta.name%5D ;%0A%7D;%0A%0APl
4ace19e726dff9edc55dc2d4e7d22ba0a5c240a0
Fix bug
generators/app/templates/src/assets/js/main.js
generators/app/templates/src/assets/js/main.js
/** * Created by Sanchez */ 'use strict'; window.game = new Phaser.Game('100', '100', Phaser.CANVAS, 'mycanvas', null, true); window.game.state.add('Boot', require('./states/boot')); window.game.state.add('Preloader', require('./states/preloader')); window.game.state.add('State1', require('./states/state1')); window...
JavaScript
0.000002
@@ -4400,33 +4400,33 @@ that.rootResize -1 +2 ();%0A
03c67958ee354dd55c5b283c9747b1a832eff2e2
Use standard URL patterns for bookmarks.
webapp/app/adapters/bookmark.js
webapp/app/adapters/bookmark.js
"use strict"; import ApplicationAdapter from './application'; import Ember from 'ember'; export default ApplicationAdapter.extend({ buildURL: function (type, id, record) { var url = [], host = Ember.get(this, 'host'), prefix = this.urlPrefix(); if (Ember.$.isNumeric(id)) { url.push('bookme...
JavaScript
0
@@ -1,18 +1,4 @@ -%22use strict%22;%0A impo @@ -44,35 +44,8 @@ on'; -%0Aimport Ember from 'ember'; %0A%0Aex @@ -89,429 +89,8 @@ d(%7B%0A - buildURL: function (type, id, record) %7B%0A var url = %5B%5D,%0A host = Ember.get(this, 'host'),%0A prefix = this.urlPrefix();%0A%0A if (Ember.$.isNumeric(id))...
78134b232296fcbbe9060adf51d94d419704341a
Update DateTime.js
scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Schema/XSD/DateTime.js
scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Schema/XSD/DateTime.js
/* * Jsonix is a JavaScript library which allows you to convert between XML * and JavaScript object structures. * * Copyright (c) 2010 - 2014, Alexey Valikov, Highsource.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that ...
JavaScript
0.001441
@@ -2422,17 +2422,17 @@ fset()) -+ +- (calend @@ -2861,16 +2861,17 @@ mezone: +- value.ge
905c15b30a71b049bc7219b4e1d943f2332c9ae9
Reset scenario form inputs to 0 prior to showing them
webapp/static/js/OutputPanel.js
webapp/static/js/OutputPanel.js
OutputPanel = OpenLayers.Class({ /** * Constructor: OutputPanel * * Parameters: * options - {Object} Options for panel. */ initialize: function(options) { this.layers = options.layers; this.activities = options.activities; this.div = jQuery(options.div); this...
JavaScript
0
@@ -6084,16 +6084,60 @@ his.div) +%0A .find('input').val(0).end() .show();
62d2edbad388898a1708b73ec31cd03191b376a6
fix reset reCaptcha code and make it available as a separate method #2
addon/components/g-recaptcha.js
addon/components/g-recaptcha.js
import Ember from 'ember'; import Configuration from '../configuration'; export default Ember.Component.extend({ classNames: ['g-recaptcha'], sitekey: Configuration.siteKey, tabindex: Ember.computed.alias('tabIndex'), renderReCaptcha() { if (Ember.isNone(window.grecaptcha)) { Ember.run.later(() =...
JavaScript
0
@@ -884,16 +884,151 @@ %7D%0A %7D,%0A%0A + resetReCaptcha() %7B%0A if (Ember.isPresent(this.get('widgetId'))) %7B%0A window.grecaptcha.reset(this.get('widgetId'));%0A %7D%0A %7D,%0A%0A succes @@ -1314,115 +1314,30 @@ -if (Ember.isPresent( this. +re set -('widgetId'))) %7B%0A window.grec...
f3f5e5379ab9142c12df591f7f975ac88e4aeeda
Fix set wrong month
addon/components/pick-a-date.js
addon/components/pick-a-date.js
import Ember from 'ember'; const { Component } = Ember; const DEFAULT_DATE_FORMAT = 'd mmmm, yyyy'; /** * @public * * @param disabled - (boolean) disable the datepicker * @param placeholder - (string) the text to display in the input when nothing is selected * @param options - (object) options available via the ...
JavaScript
0.000001
@@ -2245,13 +2245,12 @@ .set -Month +Date (dat @@ -2259,13 +2259,12 @@ tem. -month +date );%0A @@ -2269,36 +2269,37 @@ %0A newDate.set -Date +Month (dateItem.date); @@ -2288,28 +2288,29 @@ th(dateItem. -date +month );%0A if (t
e46866e6176e0ea667fdb4fbcb7a9d381d5df09f
remove extandable from first-by-id
addon/properties/first-by-id.js
addon/properties/first-by-id.js
import Ember from 'ember'; import { first, prop } from './index'; import { isBlank } from '../util/string'; const { merge } = Ember; export default first.extend(opts => { opts = merge({ id: prop('id') }, opts); opts.id = prop.wrap(opts.id); return { owner: [ opts.id.key() ], document: [ 'id' ], qu...
JavaScript
0.000333
@@ -32,15 +32,8 @@ rt %7B - first, pro @@ -52,16 +52,49 @@ index';%0A +import %7B first %7D from './proxy';%0A import %7B @@ -156,16 +156,35 @@ Ember;%0A%0A +// %7B id: 'value' %7D%0A export d @@ -194,21 +194,8 @@ ult -first.extend( opts @@ -274,16 +274,16 @@ ts.id);%0A - return @@ -283,16 +283,22 @@ re...
b05c819fb4e9cf37c50a4a892a23f5957436b977
Use process argv as inspection source
repl/index.js
repl/index.js
var UDF = require( '..' ) var BlockDevice = require( 'blockdevice' ) var util = require( 'util' ) var fs = require( 'fs' ) var path = require( 'path' ) function inspect( value ) { return util.inspect( value, { depth: null, colors: process.stdout.isTTY, }) } var EOL = '\n' console.log( EOL + 'UDF', inspec...
JavaScript
0
@@ -144,16 +144,49 @@ 'path' ) +%0Avar argv = process.argv.slice(2) %0A%0Afuncti @@ -383,56 +383,29 @@ ath. -join( process.env.HOME, 'Downloads', 'image.iso' +resolve( argv.shift() )%0Av
2de43cb9ea18d981bfcb2cf3436efcc287f767d3
Save items while editing
cothink/cothink.js
cothink/cothink.js
Items = new Mongo.Collection("items"); // visible_items has no persistent storage visible_items = new Mongo.Collection(null); Router.route('/', function () { this.render("body"); }); Router.route('/item/:_id', function () { var params = this.params; var id = params._id; var item = Items.findOne({_id:...
JavaScript
0
@@ -1639,32 +1639,169 @@ ._id);%0A %7D +,%0A%0A %22keyup input%5Btype=text%5D%22: function(event) %7B%0A Items.update(this._id, %7B$set: %7Btext: event.target.value%7D%7D);%0A %7D, %0A %7D);%0A%0A Te
df6fdaf25aa5166a250bfefa6797af2be12367c8
Extract some variables
src/react/tooltip/tooltip.js
src/react/tooltip/tooltip.js
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; export class Tooltip extends React.PureComponent { static propTypes = { visible: PropTypes.bool, size: PropTypes.oneOf(['auto','sm', 'md', 'lg']), isSticky: PropTypes.bool }; static defaultProps = { ...
JavaScript
0.999999
@@ -2426,20 +2426,39 @@ ) %7B%0A -if ( +const triggerChanged = this.pro @@ -2485,24 +2485,118 @@ rops.trigger +;%0A const displayChanged = this.props.display !== nextProps.display;%0A%0A if (triggerChanged ) %7B%0A if @@ -2767,48 +2767,22 @@ if ( -this.props.display !== nextProps. display +Changed...
320ea18bfbb989dd9e53d1451392c645e8b16b16
Add commenting
src/reducers/PagesReducer.js
src/reducers/PagesReducer.js
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import { DataTablePageReducer } from '../pages/dataTableUtilities/reducer/DataTablePageReducer'; import getPageInitialiser from '../pages/dataTableUtilities/getPageInitialiser'; export const PagesReducer = (state = {}, action) => { const { type } = a...
JavaScript
0
@@ -239,16 +239,184 @@ iser';%0A%0A +/**%0A * Redux reducer controlling the %60pages%60 field.%0A * @param %7BObject%7D state Redux state, %60pages%60 field.%0A * @param %7BObject%7D action An action object, following FSA%0A */%0A export c
d69caafc4844d904ca213797fccb9bded80c4630
Fix database errors not displaying
admin/server/api/item/update.js
admin/server/api/item/update.js
module.exports = function (req, res) { var keystone = req.keystone; if (!keystone.security.csrf.validate(req)) { return res.apiError(403, 'invalid csrf'); } req.list.model.findById(req.params.id, function (err, item) { if (err) return res.status(500).json({ err: 'database error', detail: err }); if (!item) re...
JavaScript
0.000061
@@ -591,28 +591,32 @@ res. -status(500).json(err +apiError(500, err.detail );%0A%09
3ec80af7259d131e063d9422dd48ff86e8142c2f
Correct typo of description
react/src/components/masthead/components/SprkMastheadLittleNav/SprkMastheadLittleNav.js
react/src/components/masthead/components/SprkMastheadLittleNav/SprkMastheadLittleNav.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import uniqueId from 'lodash/uniqueId'; import SprkMastheadSelector from '../SprkMastheadSelector/SprkMastheadSelector'; class SprkMastheadLittleNav extends Component { constructor(props) { super(pr...
JavaScript
0.992416
@@ -3696,16 +3696,17 @@ link ite +m .%0A
1067b086c1ce6415e8fec50ee10e7bad4b371b3d
test edit
demo.js
demo.js
alert("This is a demo of the BYU Web Community CDN (2.0.4-dev-changed-again)");
JavaScript
0.000001
@@ -55,26 +55,8 @@ .0.4 --dev-changed-again )%22);
7112582c0f4f37869281dd547c4b558a13e1262a
migrate event-spec to es6
test/core/events/event-spec.js
test/core/events/event-spec.js
/** * The MIT License (MIT) * * Copyright (c) 2015 Mickael Jeanroy * * 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 ...
JavaScript
0.000011
@@ -1161,26 +1161,21 @@ Event', -function() +() =%3E %7B%0A%0A it @@ -1201,36 +1201,33 @@ event', -function() +() =%3E %7B%0A -var +const type = @@ -1229,35 +1229,37 @@ pe = 'foo';%0A -var +const target = %7B%7D;%0A @@ -1252,35 +1252,37 @@ arget = %7B%7D;%0A -var +const params = null;%0A...
282064c3476913be7ea9aa628d667f2a7e10b7fe
Reset the store after import
controllers/settings/labs.js
controllers/settings/labs.js
var LabsController = Ember.Controller.extend(Ember.Evented, { needs: ['feature'], uploadButtonText: 'Import', importErrors: '', labsJSON: Ember.computed('model.labs', function () { return JSON.parse(this.get('model.labs') || {}); }), saveLabs: function (optionName, optionValue) { ...
JavaScript
0
@@ -1681,32 +1681,403 @@ n(function () %7B%0A + // Clear the store, so that all the new data gets fetched correctly.%0A self.store.unloadAll('post');%0A self.store.unloadAll('tag');%0A self.store.unloadAll('user');%0A self.store.unloadAll('role...
67a2c6819c6dbadce236137caef37d54667987af
fix for date values passed to MySQL... I guess mac MySQL isn't as generous as windows MySQL when taking javascript Date() objects?
src/server/data/feedPosts.js
src/server/data/feedPosts.js
var Q = require("q"); var sha1 = require("sha1"); var database = require("../database.js"); exports.writePostsToDatabase = function(rssUrl, posts) { var rssUrlHash = sha1(rssUrl); var inserts = posts.map(function(post) { var postRecord = JSON.parse(JSON.stringify(post)); ...
JavaScript
0
@@ -94,16 +94,376 @@ s%22);%0D%0A%0D%0A +function formatDateForMysql(date) %7B%0D%0A return date.getUTCFullYear() + '-' +%0D%0A ('00' + (date.getUTCMonth()+1)).slice(-2) + '-' +%0D%0A ('00' + date.getUTCDate()).slice(-2) + ' ' + %0D%0A ('00' + date.getUTCHours()).slice(-2) + ':' + %0D%0A ...
6e162ceda34d1b9de87dafbdeb093a34d977ad23
Test for any incoming message
test/failover-on-write-test.js
test/failover-on-write-test.js
var net = require('net'), path = require('path'), assert = require('assert'), spawn = require('child_process').spawn, async = require('async'), jsonStream = require('json-stream'), cb = require('assert-called'); var PORT0 = 5434, PORT1 = 5435, gotFirstConnection = false, child; var...
JavaScript
0.000006
@@ -298,16 +298,41 @@ false,%0A + firstClosed = false,%0A chil @@ -334,16 +334,16 @@ child;%0A - %0Avar ser @@ -595,49 +595,20 @@ && -chunk.service === 'health/process/uptime' +!firstClosed ) %7B%0A @@ -693,24 +693,50 @@ .destroy();%0A + firstClosed = true;%0A %7D%0A %7D)); @@ -974,32 +974,...
8438981da138ecfaf5530b8f08dd58d7bb4f2d57
update config
test/fixture/webpack.config.js
test/fixture/webpack.config.js
import path from 'path'; import {extractor} from 'webpack-component-loader-smarty-parser'; module.exports = { entry: './test/fixture/entry.js', resolveLoader: { alias: { 'webpack-component-loader': path.join(__dirname, '../../index.js'), }, }, output: { path: path.resolve(__dirname, '..', 'a...
JavaScript
0.000001
@@ -1,27 +1,134 @@ -import path from 'path' +const path = require('path');%0Aconst ExtractTextPlugin = require(%22extract-text-webpack-plugin%22);%0Aconst webpack = require('webpack') ;%0A%0Ai @@ -220,16 +220,30 @@ entry: + %7B%0A entryA: './test @@ -260,16 +260,17 @@ ntry +A .js',%0A reso @@ -269,118 +26...
45582400395eefe5ca2822f0f26daa0f6627950a
Add some spacing
test/flux/studentStore.test.js
test/flux/studentStore.test.js
// test/flux/studentStore.test.js jest.dontMock('../../app/flux/studentStore') jest.dontMock('dom-storage') import Storage from 'dom-storage' let local = new Storage(null, {strict: true}) window.localStorage = local describe('studentStore', () => { let studentStore = undefined beforeEach(() => { localStorage.clea...
JavaScript
0.002552
@@ -627,32 +627,33 @@ tStore.students%0A +%0A %09%09studentStore.i @@ -697,32 +697,33 @@ tStore.students%0A +%0A %09%09studentStore.i @@ -727,32 +727,32 @@ e.initStudent()%0A - %09%09let twoChange @@ -767,32 +767,33 @@ tStore.students%0A +%0A %09%09studentStore.i @@ -1052,32 +1052,33 @@ Be(threeChange)%0A +%0...
c7d506d664dc4d3c5b9f2fa563fcdaeadfa79657
Update shortcut for zen mode
mixins/editor-route-base.js
mixins/editor-route-base.js
import ShortcutsRoute from 'ghost/mixins/shortcuts-route'; import styleBody from 'ghost/mixins/style-body'; import loadingIndicator from 'ghost/mixins/loading-indicator'; var EditorRouteBase = Ember.Mixin.create(styleBody, ShortcutsRoute, loadingIndicator, { actions: { save: function () { this...
JavaScript
0
@@ -856,20 +856,16 @@ %0A %7D,%0A - %0A sho @@ -988,23 +988,24 @@ ' -ctrl+al +alt+shif t+z': 't
d5f839571becdb98eae3976d030aff1a5d8b93ef
add a success callback to the store / delete documents methods
application/search/library/elastic-manager.js
application/search/library/elastic-manager.js
/*jslint node: true */ /*global require */ module.exports = function (util, events, http, settings) { "use strict"; var elasticSettings = settings.elastic; exports.deleteDocument = function (index, type, id) { var postRequest = { hostname: elasticSettings.hostname, path: ...
JavaScript
0
@@ -214,20 +214,37 @@ type, id +, successCallback ) %7B%0A - %0A @@ -726,32 +726,75 @@ h + %22deleted%22);%0A + successCallback(true);%0A @@ -876,32 +876,76 @@ %22not deleted%22);%0A + successCallback(false);%0A @@ -1096,32 +1096,68 @...
94963f879af929ea5b6802eb08e5838391fdbcd5
Add validation error case to entry integration test
test/integration/entry-test.js
test/integration/entry-test.js
'use strict'; var buster = require('buster'); var assert = buster.assert; var refute = buster.refute; var util = require('../util'); var client = util.client; var wait = util.wait; buster.testCase('Entry', { prepare: function() { this.timeout = 30e3; var that = this; return client.createSpace({ ...
JavaScript
0
@@ -1514,32 +1514,248 @@ ;%0A %7D);%0A %7D,%0A%0A + 'can not be updated with invalid data ': function() %7B%0A this.entry.fields.foo = %7B'en-US': 'bar'%7D;%0A return this.space.updateEntry(this.entry).catch(function(error) %7B%0A assert.defined(error);%0A %7D);%0A%0A %7D,%0A%0A 'can be read':
e9e255c0a423f47354b453513bb7c2128ca8d24f
Update browser tests to test for IDB exception codes.
chrome/test/data/indexeddb/object_store_test.js
chrome/test/data/indexeddb/object_store_test.js
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. function recordNotFound() { debug('Removed data can no longer be found'); debug('Retrieving an index'); shouldBe("objectStore.index('fname_inde...
JavaScript
0.000009
@@ -954,163 +954,526 @@ ion -dataAddedSuccess()%0A%7B%0A debug('Data added');%0A%0A var result = objectStore.get(1);%0A result.onsuccess = getSuccess;%0A result.onerror = unexpectedErrorCallback +addWithSameKeyFailed()%0A%7B%0A debug('Adding a record with same key failed');%0A shouldBe(%22event.code%22, %22webk...
b9136cd549155cb0a4712e02f4390c9c66ec230d
Remove unnecessary log on select
app/app/controls/BaseControl.js
app/app/controls/BaseControl.js
/* Copyright (c) 2017 Jirtdan Team and other collaborators Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, ...
JavaScript
0
@@ -2499,32 +2499,16 @@ -console.log(%22Selected%22); +// Empty %0A
000f6066965f2712e8f7e3a9695654025bc46eb8
fix scrolling issue once again
app/assets/javascripts/ajaxr.js
app/assets/javascripts/ajaxr.js
//= require history_jquery (function(window, undefined) { // get some globals var History = window.History, $ = window.jQuery, document = window.document, ajaxr; // container for event handlers var handlers = { beforeSend: [], success: [], complete: [], error: [] ...
JavaScript
0
@@ -2284,46 +2284,8 @@ %5D);%0A - //$.ajaxr.currentUrl = url;%0A @@ -3026,16 +3026,33 @@ tion%0A + if (scroll %3E= 0) $(windo @@ -3071,16 +3071,32 @@ scroll); +%0A scroll = 0; %0A%0A va @@ -3385,24 +3385,41 @@ on(event) %7B%0A + scroll = -1;%0A var url @@ -3483,17 +3483,16 @@ , ...
e9d90804ffe60622e467beefed2fc3131985a490
Revert "Apply style rules to make page fixed when modals shown."
app/assets/javascripts/modal.js
app/assets/javascripts/modal.js
// Simple library that can be used to create a modal dialog. // Requires no setup. Just create HTML container: // <div id="my-modal" class="modal">Content</div> // and then call: // Portal.showModal(clickHandler, "#my-modal"); // Close button and overlay will be automatically added. // Related styles are in modal.scss ...
JavaScript
0
@@ -951,60 +951,8 @@ ) %7B%0A - jQuery('html, body').css(%7B'overflow': 'hidden'%7D);%0A Po @@ -1437,58 +1437,8 @@ ) %7B%0A - jQuery('html, body').css(%7B'overflow': 'auto'%7D);%0A jQ
5cfa193b8db69b8749a6acbeb489c92e521a0b68
Comment out console.log
client/app/scripts/dispatcher/app-dispatcher.js
client/app/scripts/dispatcher/app-dispatcher.js
const flux = require('flux'); const _ = require('lodash'); const AppDispatcher = new flux.Dispatcher(); AppDispatcher.dispatch = _.wrap(flux.Dispatcher.prototype.dispatch, function(func) { const args = Array.prototype.slice.call(arguments, 1); console.log(args[0]); func.apply(this, args); }); module.exports = ...
JavaScript
0.000001
@@ -242,16 +242,19 @@ s, 1);%0A + // console
6345bcb4c6671c308063f70c3276d5a26cf68f15
use GET parameter to populate query input field
assets/js/media-archive-app/js/controllers.js
assets/js/media-archive-app/js/controllers.js
var mediaArchiveApp = angular.module('mediaArchiveApp', []); mediaArchiveApp.controller('MediaArchiveCtrl', function ($scope, $http) { $scope.items = []; $scope.mediatypes = { audio: false, video: false}; $scope.loadItems = function() { var httpRequest = $http({ method: 'GET', url: '/media/se...
JavaScript
0
@@ -151,16 +151,118 @@ s = %5B%5D;%0A + %0A // use GET parameter to populate query input field%0A $scope.search = $location.search('search');%0A $scope
d08f6b46e4bb684fc22a068727f06d1e0dba685c
Fix linting
app/assets/javascripts/users.js
app/assets/javascripts/users.js
angular.module("app", ["ngResource"]) .factory('User', ["$resource", function($resource){ return $resource('users/:id', { "id" : "@_id" }, { update: { method: 'PUT'}}); }]).controller("UserCtrl", ["$scope", "User", function($scope, User) { $scope.createForm = {}; $scope.users = User.query(); $...
JavaScript
0.000004
@@ -526,38 +526,40 @@ uery();%0A %7D) +; %0A %7D +; %0A%0A $scope.rem @@ -658,22 +658,24 @@ %7D) +; %0A %7D +; %0A%0A $s @@ -782,20 +782,22 @@ %7D) +; %0A %7D +; %0A%7D%5D);%0A
199b5db47c73167c9901b56e8f5e2acf4c922283
add comment to kick-off block and fix indentation
curcuma_preview.js
curcuma_preview.js
'use strict' var getFileExtension = function (urlOrPath) { var pathname = /^https?/.test(urlOrPath) ? new URL(urlOrPath).pathname : urlOrPath return (/.*\.(.+)$/.exec(pathname) || [])[1] } var getImageMIME = function (urlOrPath) { var mimeMap = new Map([ ['png', 'image/png'], ['jpg', 'image/jpeg'], ...
JavaScript
0
@@ -977,16 +977,42 @@ %7D)%0A%7D%0A%0A +// kick off for file view%0A if (vali @@ -1321,25 +1321,21 @@ agment)%0A - %7D)%0A - %7D%0A%0Avar s
b420c35e6d1a2f3e63ad7ab8509072d9713570d0
Remove unused canvas requires in draw.js
draw.js
draw.js
var Q = require('q'); var fs = require('fs'); var _ = require('lodash'); var Canvas = require('canvas'); var canvg = require("canvg"); var fontSize = require('./lib/fontsize'); var titleParts = require('./lib/titleparts'); var svgCompile = require('./lib/svgcompile'); var svgRender = require('./lib/svgrender'); var t...
JavaScript
0
@@ -69,70 +69,8 @@ h'); -%0Avar Canvas = require('canvas');%0Avar canvg = require(%22canvg%22); %0A%0Ava
1bedf743ebb4b15226a8e7180a1c8e18d99feee9
Fix import path
app/authenticators/osf-token.js
app/authenticators/osf-token.js
import Ember from 'ember'; import ENV from '../../config/environment'; import BaseAuthenticator from 'ember-simple-auth/authenticators/base'; export default BaseAuthenticator.extend({ session: Ember.inject.service(), restore() { return Ember.$.ajax({ url: `${ENV.apiUrl}/api/user_info`, ...
JavaScript
0.000012
@@ -40,19 +40,16 @@ rom '../ -../ config/e
424445700b3acf644df358291b8a44d269450b2a
urlcow.com
src/sites/link/urlcow.com.js
src/sites/link/urlcow.com.js
$.register({ rule: { host: /^(urlcow|miniurl)\.com$/, }, ready: function () { 'use strict'; var url = $.$$('script').find(function (n) { var m = n.innerHTML.match(/window\.location = "([^"]+)"/); if (!m) { return _.nop; } return m[1]; }); if (!url) { _.wa...
JavaScript
0.999999
@@ -29,16 +29,24 @@ ost: /%5E( +www%5C.)?( urlcow%7Cm
c90dcb2283b128229e85f91f4045f0a1af2540f4
Use fragment identifier for standalone viewer configuration.
src/standalone/standalone.js
src/standalone/standalone.js
function anError(error) { var errorMsg = document.createElement('div'); errorMsg.className = 'pnlm-info-box'; errorMsg.innerHTML = '<p>' + error + '</p>'; document.getElementById('container').appendChild(errorMsg); } function parseURLParameters() { var URL = decodeURI(window.location.href).split('?...
JavaScript
0
@@ -267,16 +267,198 @@ var +URL;%0A if (window.location.hash.length %3E 0) %7B%0A // Prefered method since parameters aren't sent to server%0A URL = %5Bwindow.location.hash.slice(1)%5D;%0A %7D else %7B%0A URL = de @@ -495,24 +495,28 @@ split('?');%0A + URL.shif @@ -516,24 +5...
fed877a860bd4a45429ac930a33b1998b66810f8
include all non-enumerable globals in global scope
eval.js
eval.js
var vm = require('vm') var isBuffer = Buffer.isBuffer var requireLike = require('require-like') function merge (a, b) { if (!a || !b) return a var keys = Object.keys(b) for (var k, i = 0, n = keys.length; i < n; i++) { k = keys[i] a[k] = b[k] } return a } // Return the exports/module.exports variab...
JavaScript
0.000051
@@ -146,29 +146,144 @@ a%0A -var keys = Object.key +// Include all non-enumerable variables, including console (v10+),%0A // process (v12+), URL, etc.%0A var keys = Object.getOwnPropertyName s(b) @@ -1021,221 +1021,8 @@ al)%0A - // console is non-enumerable in node v10 and above%0A sandbox.console = global...
8e1a0bfcf5b8dc3636250f6cff2a3b4c3404840d
Fix up some bugs in the image similarity syncing script.
utils/sync-similarity.js
utils/sync-similarity.js
"use strict"; const async = require("async"); const core = require("../core"); const pastec = require("pastec")({ server: process.env.PASTEC_URL, }); core.init(() => { // Models const Artwork = core.models.Artwork; console.log("Finding artwork records..."); Artwork.find().stream() .on(...
JavaScript
0
@@ -321,16 +321,24 @@ %22data%22, +function (artwork @@ -338,19 +338,16 @@ artwork) - =%3E %7B%0A @@ -367,16 +367,67 @@ ause();%0A +%0A console.log(%22Syncing%22, artwork._id);%0A%0A @@ -483,24 +483,24 @@ lback) =%3E %7B%0A - @@ -547,32 +547,154 @@ , matches) =%3E %7B%0A...
91575f0f8fb092671caa59bdcd9213356e58f9ee
Update nl.js
src/langs/nl.js
src/langs/nl.js
/* =========================================================== * nl.js * Dutch translation for Trumbowyg * http://alex-d.github.com/Trumbowyg * =========================================================== * Author : Danny Hiemstra * Github : https://github.com/dhiemstra */ jQuery.trumbowyg.langs.nl = { ...
JavaScript
0
@@ -1172,16 +1172,15 @@ t: ' -Herstell +Annuler en',
2e7afdbadd6efbace07cb876907df2a8312de941
Refactor e2e test for plugins
test/client/e2e/e2e.plugins.js
test/client/e2e/e2e.plugins.js
/** * * E2E tests for the History plugin * */ var assert = require("chai").assert; describe('History section', function() { var expected, selector, menu, bsUrl; var ptor = protractor.getInstance(); var url; beforeEach(function () { browser.ignoreSynchronization = true; browser.get...
JavaScript
0
@@ -91,23 +91,23 @@ scribe(' -History +Plugins section @@ -437,32 +437,39 @@ n () %7B%0A%0A +expect( element.all(by.r @@ -512,90 +512,34 @@ nt() +) .t -hen(function (count) %7B%0A assert.equal(1, count);%0A %7D);%0A%0A +oBe(1);%0A expect( elem @@ -591,78 +591,16 @@ nt()...
fd190693582b6dd5c86680487c408eba080524ba
Update Hapi.js
src/lib/Hapi.js
src/lib/Hapi.js
/** * # Parse.js * * This class interfaces with Parse.com using the rest api * see [https://parse.com/docs/rest/guide](https://parse.com/docs/rest/guide) * */ 'use strict'; /** * ## Async support * */ require('regenerator/runtime'); /** * ## Imports * * Config for defaults and underscore for a couple o...
JavaScript
0
@@ -2,21 +2,20 @@ **%0A * # -Parse +Hapi .js%0A * %0A @@ -44,21 +44,20 @@ es with -Parse +Hapi .com usi @@ -88,72 +88,48 @@ http -s :// -parse.com/docs/rest/guide +hapijs.com/api %5D(http -s :// -parse.com/docs/rest/guide +hapijs.com/api )%0A *
aa661a875cbc2b2be7c365f19e3a98d933e99b8f
Remove timeout from test
test/client/js/event-target.js
test/client/js/event-target.js
/** * Copyright 2015-2016, Google, Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
JavaScript
0
@@ -621,16 +621,20 @@ t before +Each afterEa @@ -900,16 +900,20 @@ before +Each (() =%3E %7B @@ -1060,36 +1060,34 @@ rect callback', -done +() =%3E %7B%0A eventT @@ -1186,33 +1186,8 @@ %7D);%0A - setTimeout(() =%3E %7B%0A @@ -1228,34 +1228,8 @@ 1);%0A - done();%0A %7D, 10);%0A %7D)...
e9ad483b380af5d622c1c8bc38eab5f0e7818be8
Increase timeout in axn with error test (100ms)
test/component/error_in_axn.js
test/component/error_in_axn.js
/* * Copyright 2016 Telefonica Investigación y Desarrollo, S.A.U * * This file is part of perseo-fe * * perseo-fe is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the License, ...
JavaScript
0
@@ -3784,9 +3784,9 @@ %7D, -5 +1 00);
307c07cd8a342dbd2552e6ee6ffd717c69b19685
Add 140 tweet character logic, remove semi-colon from quotes
projects/random-quotes/random-quotes.js
projects/random-quotes/random-quotes.js
$(document).ready(function() { // show the first quote once loaded getQuotes(); // quote API - thanks to Forismatic.com function getQuotes() { $.ajax({ url: "http://api.forismatic.com/api/1.0/", jsonp: "jsonp", data: { lang: "en", method: "getQuote", format: "json...
JavaScript
0.000514
@@ -499,32 +499,33 @@ or = %22Anonymous%22 +; %0A %7D%0A%0A @@ -520,16 +520,128 @@ %7D%0A%0A + // remove semi-colons because it ends quote%0A data.quoteText = data.quoteText.replace(/;/g, %22%22);%0A%0A @@ -938,24 +938,25 @@ ;%0A %7D%0A +%0A // t @@ -958,76 +9...
e2d0d1986ff065554f89ac035e25e63e68ab2d6b
fix changing stack order did not change color order
tx_highered/static/tx_highered/js/ethnicity-chart.js
tx_highered/static/tx_highered/js/ethnicity-chart.js
/*globals $, d3, D3StackedBarChart, enrollment_chart_url */ (function() { "use strict"; // private functions from // https://raw.github.com/mbostock/d3/master/src/layout/stack.js // for re-ordering data function d3_layout_stackReduceSum(d) { return d.reduce(d3_layout_stackSum, 0); } function d3_layo...
JavaScript
0.000001
@@ -657,24 +657,46 @@ ;%0A var +stackOrder,%0A stack = d3.l @@ -709,16 +709,16 @@ stack()%0A - @@ -871,17 +871,17 @@ duceSum) -, +; %0A @@ -889,17 +889,18 @@ - index +stackOrder = d @@ -944,17 +944,17 @@ rn sums%5B -a +b %5D - sums @@ -954,17 +954,17 @@ - sums%5B -b ...
54e84bbe2e2f246fec5c91410ad6b24ab3691b00
fix typo.
src/lib/classify.js
src/lib/classify.js
var _class = (function() { function __super__() { return this.constructor.__super__.prototype; } function inherits(_class, parent) { _class.__super__ = parent; var f = function() {}; f.prototype = parent.prototype; f.prototype.constructor = parent; _class.prototype = new f(); _class....
JavaScript
0.00016
@@ -382,32 +382,33 @@ IT_INSTANCE_ORIG +I N_PROPS'%5D;%0A%0A @@ -427,32 +427,33 @@ IT_INSTANCE_ORIG +I N_PROPS'%5D = func @@ -509,32 +509,33 @@ IT_INSTANCE_ORIG +I N_PROPS'%5D;%0A @@ -1263,32 +1263,33 @@ IT_INSTANCE_ORIG +I N_PROPS'%5D;%0A _ @@ -1307,32 +1307,33 @@ IT_INSTANCE_ORIG +I N_PROPS'%5D ...
6d0b5848513d5190334a8c746793473965e02b11
Fix wiredep task
gulp/tasks/wiredep.js
gulp/tasks/wiredep.js
'use strict'; // Inject bower components module.exports = function (gulp, plugins, config) { return function () { var wiredep = require('wiredep').stream; gulp.src('app/styles/*.scss') .pipe(wiredep({ ignorePath: /^(\.\.\/)+/ })) .pipe(gulp.dest('app/styles')); //gulp.src('app/layouts/*.jade'...
JavaScript
0.999079
@@ -532,32 +532,34 @@ %5D%0A %7D))%0A +// .pipe(gulp.dest( @@ -575,13 +575,42 @@ uts'));%0A + .pipe(gulp.dest('app'));%0A %7D;%7D;%0A
3e1bf27387f6780ce0685645498f786c8405825b
update single-quote to double-quote
app/assets/javascripts/events.js
app/assets/javascripts/events.js
$(document).on('ready page:load', function (event) { $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, events: '/events/', timezone: 'local', aspectRatio: 2.5 }); $(".quick-datetime-select").quickDatetime...
JavaScript
0
@@ -8,17 +8,17 @@ ent).on( -' +%22 ready pa @@ -24,17 +24,17 @@ age:load -' +%22 , functi @@ -50,17 +50,17 @@ ) %7B%0A $( -' +%22 #calenda @@ -60,17 +60,17 @@ calendar -' +%22 ).fullCa @@ -104,17 +104,17 @@ left: -' +%22 prev,nex @@ -120,17 +120,17 @@ xt today -' +%22 ,%0A @@ -141,15 +141,15 @@ e...
b475638be27da25e88650a6466b98b6631eed15e
Make the link to GitHub fully qualified (#21)
src/lib/cli/args.js
src/lib/cli/args.js
import path from 'path'; import yargs from 'yargs'; import npm from '../../../package'; import {defaultConfig} from './config'; const examples = appName => ` Examples: ${appName} report -i "src/**/*.js" ${appName} report -p /path/to/project -i "src/**/*.js" -x "src/test/**/*.js" ${appName} report -t html -p /...
JavaScript
0
@@ -507,16 +507,20 @@ //github +.com /rpl/flo
8336df1741a663b458cd96ba12ad2c3e13f89b84
Increment version number in source
flow.js
flow.js
// Javascript Library for Multi-step Asynchronous Logic // Version 0.2.2 // Copyright (c) 2010 William R. Conant, WillConant.com // Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php (function(){ // converts native arguments object to an array and applies function function applyArgs(f...
JavaScript
0.000002
@@ -64,17 +64,17 @@ ion 0.2. -2 +3 %0A// Copy
7b2cc22b4d762ab514c70f90ee38cfd58828d976
remove uneeded comments
app/jsx/media_recorder/index.js
app/jsx/media_recorder/index.js
/* * Copyright (C) 2016 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
JavaScript
0.000001
@@ -20,9 +20,9 @@ 201 -6 +8 - p @@ -691,87 +691,8 @@ s/%3E. -%0A%0A %3CText as=%22div%22 size=%22small%22 weight=%22light%22%3E%0A %7B'Pwning the order'%7D%0A %3C/Text%3E %0A */
171be7571cb84c3f81ba2531caee1c650f3a2f8b
Handle multiple keys shortcut.
test/keyboard-shortcut-spec.js
test/keyboard-shortcut-spec.js
/* * - key combo Meta+S should fire on keyup * - key combo Meta+I+I should fire on keyup * **/ if (typeof define !== 'function') { var define = require('amdefine')(module) } define(function() { describe('tests suite', function() { it('should execute', function() { expect(true).toBe(true); }); }...
JavaScript
0.000001
@@ -373,24 +373,37 @@ ) %7B%0A it(' +with one key should call @@ -533,33 +533,36 @@ mapShortcut -( +s(%5B%5B shortcut, callba @@ -563,16 +563,18 @@ callback +%5D%5D );%0A @@ -660,28 +660,172 @@ ;%0A -%7D);%0A %0A%7D);%0A%0Afunction + it('with two keys should call according callback', function(...
e4522d9492d00e38ae045fe14b247abea553ebe1
add event.source check
test/spec/messageevent.test.js
test/spec/messageevent.test.js
/* global describe, it */ (function () { 'use strict'; describe("MessageEvent", function () { context("when use MessageEvent constructor", function () { var called = false; var messageListener; // helper var addMessageEvent = function (listner) { ...
JavaScript
0
@@ -1888,32 +1888,136 @@ ction (event) %7B%0A + if(event.source !== window) %7B%0A return;%0A %7D%0A
55cb112ee995e1d17a1d872d152931239935af7a
use params prop instead of inline query params
src/lib/validate.js
src/lib/validate.js
module.exports = {}; const api = require('./api'); const emailValidator = require('email-validator'); module.exports.validateUsernameLocally = username => { if (!username || username === '') { return {valid: false, errMsgId: 'general.required'}; } else if (username.length < 3) { return {valid: ...
JavaScript
0
@@ -3198,66 +3198,8 @@ i(%7B%0A - uri: %60/accounts/check_email/?email=$%7Bemail%7D%60,%0A @@ -3218,13 +3218,14 @@ : '' +, // -N +n ot h @@ -3238,16 +3238,12 @@ by -the API -, +; use @@ -3267,16 +3267,94 @@ ructure%0A + params: %7Bemail: email%7D,%0A uri: '/accounts/...
2fb702cc36592b69fb064802887de4bc181115e9
comment reminder for later
app/assets/javascripts/mdedit.js
app/assets/javascripts/mdedit.js
// Hacked and used https://github.com/jbt/markdown-editor which uses the lovely WTFPL // http://codemirror.net/ // Another option might be to check out http://jrmoran.com/playground/markdown-live-editor/ //= require md-editor/marked.js //= require md-editor/highlight.pack.js //= require md-editor/codemirror/lib/codemir...
JavaScript
0
@@ -1519,24 +1519,324 @@ /script%3E');%0A + // we should call the rails sanitize method on save to remove the blacklisted entities and prevent them from getting into the db.%0A // Then, only the person entering the code is exposed, if they bypass this naive filter. Later, when we display to another user who goe...
1b18e69e4cfafcca635ca76106318a1e4b90ce26
implement graft using just foldMap
free.js
free.js
const daggy = require("daggy") if (Function.prototype.map == null) { Object.defineProperty(Function.prototype, 'map',{ value: function(g) { const f = this return function(x) { return g(f(x)) } }, writable: true, configurable: true, enumerable: false }) } const compose = (f,g) => x ...
JavaScript
0
@@ -1855,281 +1855,8 @@ %0A%7D%0A%0A -const graft = (of) =%3E (a) =%3E a.graft(of)%0AFree.prototype.graft = function(f) %7B%0A return this.cata(%7B%0A Pure: (x) =%3E Free.Pure(x),%0A Lift: (x, g) =%3E f(x).map(g),%0A Ap: (x, y) =%3E Free.Ap(x.graft(f), y),%0A Join: (x) =%3E Free.Join(x.map(graft(f))...
fdd094493e2b29c4752961a0883dfb605c5457a1
Fix file_base regex in upload.js
app/assets/javascripts/upload.js
app/assets/javascripts/upload.js
/* * Handle media file uploads directly to S3, and create new asset records. * * Manage the form submission, intercepting the submit event. * Provide upload status. For successful uploads, create the new asset record * and send the user to the asset's page. * */ (function() { $(document).ready(function()...
JavaScript
0.000175
@@ -1690,16 +1690,19 @@ *)%5C.%5Ba-z +0-9 %5D+$/i, %22
4779147e57e2f8db422f1bc262948f96a385fc83
Update debug.js
scripts/debug.js
scripts/debug.js
function show(state) { document.getElementById('window').style.display = state; document.getElementById('wrap').style.display = state; }
JavaScript
0.000001
@@ -16,18 +16,17 @@ tate) %7B%0A - +%09 document @@ -81,17 +81,17 @@ %0A - +%09 document @@ -136,17 +136,184 @@ = state; - +%0A %09if (state == 'none') %7B%0A %09%09inputD.setValue();%0A %09%09var bp = document.getElementById(%22inputD%22).getElementsByClassName(%22break_point%22)%5B0%5D;%0A %09%09...
a67a4c0677abfd191de0330e18507f834315e7b3
Add a line to prevent TestPilot from installing.
test/resources/firefox/user.js
test/resources/firefox/user.js
user_pref("browser.console.showInPanel", true); user_pref("browser.dom.window.dump.enabled", true); user_pref("browser.firstrun.show.localepicker", false); user_pref("browser.firstrun.show.uidiscovery", false); user_pref("dom.allow_scripts_to_close_windows", true); user_pref("dom.disable_open_during_load", false); user...
JavaScript
0
@@ -1726,20 +1726,97 @@ atibility%22, false);%0A +user_pref(%22extensions.installDistroAddons%22, false); // prevent testpilot etc%0A
f5d7e57bbefc54174bb0b55c0ea2c452f91852f9
Update graph.js
scripts/graph.js
scripts/graph.js
process.graph = function(args, stdin, stdout, stderr, comm){ amount = parseInt(args[1]); data = {}; length = 0; max = [0, 0]; stdin.readln(collect); function collect(line){ stderr.writeln(line) if(comm.dead){comm.finish(0);return} values = data.split(":"); data[values[0]] =...
JavaScript
0.000001
@@ -271,20 +271,20 @@ alues = -data +line .split(%22
bde30130cbc2e52630775eca33189295579a392c
fix logger config not loaded
src/modcolle.js
src/modcolle.js
'use strict'; const express = require('express'); const bodyParser = require('body-parser'); const expressHandlebars = require('express-handlebars'); const passport = require('passport'); const session = require('express-session'); const LocalStrategy = require('passport-local').Strategy; const dmmAuthenticator = requ...
JavaScript
0.000004
@@ -8,16 +8,130 @@ rict';%0A%0A +const winston = require('winston');%0Aconst loggerConfig = require('./config/loggerSettings.json');%0AsetupLogger();%0A%0A const ex @@ -521,122 +521,8 @@ s(); -%0A%0Aconst winston = require('winston');%0Aconst loggerConfig = require('./config/loggerSettings.json');%0AsetupLogger(); ...
40829dffb03fb9df39db4c588d964c0a13b6fa1e
Fix bug filename : App -> app
scripts/index.js
scripts/index.js
'use strict'; var React = require('react'), App = require('./App'); React.render(<App />, document.body);
JavaScript
0.000208
@@ -59,17 +59,17 @@ uire('./ -A +a pp');%0A%0AR @@ -104,8 +104,9 @@ t.body); +%0A
2f0b17e2802634c9151fa351fda2c293e5054895
Fix module variables scope problem
node_modules/StudioAPI/StudioAPI.js
node_modules/StudioAPI/StudioAPI.js
var Client = require(__dirname+'/file_connect.js').Client; //Создаем объект для обращения к серверу (Функции GET и POST) client = new Client(); var Broker = { server :'http://localhost:57772/mdg-dev/', NewClass : { data: { namespace: "", nameClass: "", Super: "", Abstract: "...
JavaScript
0.000001
@@ -1,12 +1,25 @@ +(function()%7B%0A var Client = @@ -3306,8 +3306,22 @@ Broker;%0A +%7D).call(this);
bf9817a46dd5321539fc1ed43c79b820a1237095
fix roads assets
game.js
game.js
/** * Created by shaibenvalid on 1/20/17. */ var gameOptions = { gameWidth: 960, // game width, in pixels gameHeight: 600, // game height, in pixels tileSize: 60, // tile size, in pixels colors: [0xff0000, 0x00ff00, 0x0000ff, 0xffff00] // tile colors }; var gameLevelObj = new GameLevel(); ...
JavaScript
0.000001
@@ -5451,23 +5451,24 @@ , x, y, -tileTyp +assetNam e, i, j)
190c966e890466f19bc43b4121fbfee408ad1ae1
fix rosie
app/containers/HomePage/index.js
app/containers/HomePage/index.js
import React from 'react'; import Helmet from 'react-helmet'; import { FormattedMessage } from 'react-intl'; import Button from 'components/Button'; import messages from './messages'; import ImgContainer from './ImgContainer'; import VideoContainer from './VideoContainer'; import HotelsPage from '../HotelsPage'; impor...
JavaScript
0.000005
@@ -2224,16 +2224,19 @@ +%7B/* %7Bdays%7D d @@ -2311,16 +2311,87 @@ /%3Eto go! +*/%7D%0A happy %7B-days%7D-day%0A %3Cbr /%3E%0A anniversary! %0A
ec836700897085be76815c77137eeb398a7dab6a
Fix AI First Bug
game.js
game.js
/* vim: set ts=4 sw=4 tw=4 et : */ var pa = 99; var wa = 0; var pb = 99; var wb = 0; var human = (Math.random() > 0.5); // Random starting player var aiPlayed = false; var round = 1; const aiRecord = function() { } const evaluate = function() { if (wa > wb) var toInc = $('#sa'); else if (wb > wa) var toInc = $('#sb...
JavaScript
0.000051
@@ -2184,24 +2184,74 @@ !human) -aiPlay(); +%7B%0A aiPlay();%0A human = true;%0A %7D %0A%09%09%7D);%0A
bd54302c71ce7eda9358d13356d4a7f78b89c9ea
Use pipeline in deal()
game.js
game.js
var m = require('mori'); var set = require('./setLogic.js'); // map{'deck': <card sequence ordered by ID>, // 'toDeal': #queue <of card IDs as ints in random order>, // 'board': map{ <slot id>: <card id> }, // 'players': map{<name>: map{'color': <int>, // 'score': <int>, // ...
JavaScript
0
@@ -1679,48 +1679,8 @@ ) %7B%0A - var deck = m.get(oldState, 'deck');%0A @@ -1889,50 +1889,95 @@ n m. -assoc(m.assoc(oldState, 'board', newBoard) +pipeline(oldState,%0A m.curry(m.assoc, 'board', newBoard),%0A m.curry(m.assoc , 't @@ -1994,16 +1994,22 @@ wToDeal) +%0A ) ;%0A%7D%0A%0Aexp
da51d67b681acffe70a1727875d3b9093de5d903
Switch to DSL for OTP authentication.
app/otp/handlers/authenticate.js
app/otp/handlers/authenticate.js
exports = module.exports = function(parse, csrfProtection, loadState, authenticate, proceed) { /* return [ require('body-parser').urlencoded({ extended: false }), ceremony.loadState('mfa'), authenticator.authenticate('session'), authenticator.authenticate('mfa-otp'), ceremony.complete('mfa'),...
JavaScript
0
@@ -35,16 +35,22 @@ n(parse, + flow, csrfPro @@ -61,19 +61,8 @@ ion, - loadState, aut @@ -74,17 +74,8 @@ cate -, proceed ) %7B%0A @@ -402,24 +402,55 @@ lencoded'),%0A + flow('authenticate-otp',%0A function @@ -460,32 +460,34 @@ q, res, next) %7B%0A + console.lo @@ -510,24 +510,26 @@ ATING....
3e7a8b694ed05b7ce7f6435f5f14e111ccf423e5
fix title tag when owner had no name set
app/routes/owner/repositories.js
app/routes/owner/repositories.js
import Ember from 'ember'; import TravisRoute from 'travis/routes/basic'; import config from 'travis/config/environment'; export default TravisRoute.extend({ needsAuth: false, titleToken(model) { return "" + model.name; }, model(params, transition) { var options; options = {}; if (this.get('...
JavaScript
0.000002
@@ -203,26 +203,57 @@ -return %22%22 + model. +var name = model.name %7C%7C model.login;%0A return name
b2fb68b2cfd7fe9f644d563a00675c3938c799ae
make the SESSION_SECRET error more explicit
server/config.js
server/config.js
var fs = require('fs'); var path = require('path'); /** * Merges two objects. * * When conflicting, erases the values in the first object with the values * from the second one. * * Returns the first object (`obj`). * * @param {Object} obj * @param {Object} other * @return {Object} */ function merge(obj, o...
JavaScript
0.000015
@@ -2162,16 +2162,268 @@ ig);%0A%7D%0A%0A +if (!process.env.SESSION_SECRET)%0A throw new Error(%22Cannot set up sessions without a secret.%5Cn%5Cn%22 +%0A %22Did you forget to setup the SESSION_SECRET variable?%5Cn%22 +%0A %22Try to run %60make runserver%60 to solve the problem.%5Cn%...
18d17058d13f66c1b7610e6c6dd0f1f40cda375c
Update server directory
server/router.js
server/router.js
require('dotenv').config(); const express = require('express'); const router = express.Router(); const request = require('request-promise'); const handler = require('./apihandler'); const Houndify = require('houndify'); const path = require('path'); const https = require('https'); const fred = require('./fred/engine')...
JavaScript
0
@@ -444,16 +444,20 @@ rc/index +.jsx ');%0A%7D);%0A @@ -966,18 +966,16 @@ s) =%3E %7B%0A - %0A fred(
248c4bb9b07ba47877b818ae269562d3aa64c463
remove skip test on exponents
test/transform/exponentTest.js
test/transform/exponentTest.js
import createTestHelpers from '../createTestHelpers'; const {expectTransform, expectNoChange} = createTestHelpers(['exponent']); describe('Exponentiation operator', () => { it('should convert Math.pow()', () => { expectTransform( 'result = Math.pow(a, b);' ).toReturn( 'result = a ** b;' ); ...
JavaScript
0.000002
@@ -511,31 +511,10 @@ %0A%0A -// Issue #196%0A it.skip +it ('sh
b8c8eb2a37d70824bb22e077552be7dfecc1c000
add window centered
test/unit/general-mode.spec.js
test/unit/general-mode.spec.js
'use strict' const test = require('tape') const sinon = require('sinon') const proxyquire = require('proxyquire') function stubGeneralMode (moveOrThrow) { return proxyquire('../../lib/general-mode', { '../components/pane-importer-exporter': () => ({fakeImporterExporterMethod: 1}), '../components/pane-closer'...
JavaScript
0.000026
@@ -568,32 +568,40 @@ createWindow +Centered : sinon.spy()%0A @@ -590,32 +590,32 @@ ed: sinon.spy()%0A - %7D%0A const wCha @@ -1776,32 +1776,40 @@ createWindow +Centered : sinon.spy(),%0A @@ -2283,32 +2283,40 @@ rid.createWindow +Centered .getCall(0).call @@ -2488,24 +2488,32 @@ createWindow +Cen...
b7062c0ac4fe1f565dec83bb662d4352ecd4e0da
Fix test with modelName
test/unit/store/toast-store.js
test/unit/store/toast-store.js
import { Dispatcher } from 'consus-core/flux'; import ToastStore from '../../../.dist/store/toast-store'; import { assert } from 'chai'; describe('ToastStore', () => { beforeEach(() => { Dispatcher.handleAction('CLEAR_ALL_DATA'); Dispatcher.handleAction('CREATE_TOAST', { text: 'A' ...
JavaScript
0.000024
@@ -1292,16 +1292,51 @@ s: '123' +,%0A modelName: 'Resistor' %0A @@ -1482,19 +1482,30 @@ sfully: +Resistor ( 123 +) ');%0A
281c4f2ed0ac24258b1bfa6ed678a6c3abd6c120
Set text to 'starting' amount of dots when setting the interval
src/loading-dots.js
src/loading-dots.js
'use strict'; /** * @ngdoc directive * @name angularLoadingdots.directive:loadingDots * @description An AngularJS directive to display loading dots in the form of text" * # loadingDots */ angular.module('angularLoadingDots', []) .directive('loadingDots', function ($interval) { /** * Repeats a characte...
JavaScript
0.004605
@@ -2008,18 +2008,18 @@ var m -ax +in @@ -2058,17 +2058,20 @@ es.m -ax +in Dots, -5 +0, 0 );%0A @@ -2072,34 +2072,34 @@ 0);%0A var m -in +ax = numbe @@ -2130,27 +2130,25 @@ es.m -in +ax Dots, -0, 0, max - +5, min + 1);%0A @@ -2795,32 +2795,126 @@ ise);%0A %7D%0A + ...
46eec54d091c5ebd191964d9dbdb699e26e36162
fix path
server/server.js
server/server.js
var CronJob = require("cron").CronJob, megapisUtil = require("./util"), _ = require("lodash"), jf = require("jsonfile"), moment = require("moment"), log4js = require("log4js"), log = log4js.getLogger("megapis-server"); /* load config/global.json for each config.tasks: make job with s...
JavaScript
0.000017
@@ -483,22 +483,16 @@ validate -Worker Config(c
110714e49b55d6557d72c6e75a751b2b47b6076f
test commit #9
server/server.js
server/server.js
var express = require('express'), app = express(), http = require('http'), path = require('path'), body = require('body-parser'), cfenv = require('cfenv'), ibmbluemix = require('ibmbluemix'), IBMData = require('ibmdata'), IBMPush =...
JavaScript
0
@@ -925,28 +925,30 @@ rvices(' -iotf-service +cel_cierra_iot ');%0A%0Aif( @@ -1240,28 +1240,30 @@ Config%5B' -iotf-service +cel_cierra_iot '%5D;%0A%7D%0A%0A/
e8986752c48761cc8ad465ea75c31f046bf1267b
Update the Rpi
server/server.js
server/server.js
const bleno = require('bleno') const testCharacteristic = require('./characteristics/test') const lightCharacteristic = new require('./characteristics/light') const antiTheftCharacteristic = require('./characteristics/antiTheft') const ids = require('../global/ble').bleIds const PrimaryService = bleno.PrimaryService...
JavaScript
0
@@ -152,16 +152,18 @@ /light') +() %0Aconst a
5f671a0a475336bfd61d290b4e90502436e4f7a5
Add missing semicolons
server/server.js
server/server.js
var express = require('express') var app = express() app.use(express.static('client')); app.listen(3000, function () { console.log('Reactivity app listening on port 3000!') })
JavaScript
0.999999
@@ -25,16 +25,17 @@ xpress') +; %0Avar app @@ -46,16 +46,17 @@ xpress() +; %0A%0Aapp.us @@ -175,8 +175,10 @@ 0!') +; %0A%7D) +; %0A
ea8604a1060e67ae61c850a75485a20820c3d1d9
Update multiplayer settings based on testing
server/server.js
server/server.js
var express = require('express'); // This stops some error complaining var app = express() , http = require('http') , server = http.createServer(app).listen(8080, 511, console.log('Listening on :8080')) , io = require('socket.io').listen(server); var connected_tanks = 0; var TANK_LIMIT = 20; // The maximum ...
JavaScript
0
@@ -294,17 +294,17 @@ LIMIT = -2 +1 0; // Th @@ -1469,24 +1469,26 @@ n: %7Bx: 150+( +2. 5*tank_id*Ma @@ -1524,16 +1524,18 @@ z: 150+( +2. 5*tank_i @@ -5888,8 +5888,9 @@ %0A %7D%0A%7D +%0A
0fc383dceada93d6009925e8c5fa01341f298fc4
implement global state object, assign balanced teams on connection
serverRewrite.js
serverRewrite.js
var express = require('express'); var app = express(); var http = require('http'); var server = http.createServer(app); server.listen(8080); var io = require('socket.io').listen(server); var canvas = io.of('/canvas'); var conductor = io.of('/conductor'); var clients = io.of('/client'); io.set('log level', 1); // reduce...
JavaScript
0
@@ -280,16 +280,70 @@ ient');%0A +var state = %7B%0A connections: 0,%0A %221%22: 0,%0A %222%22: 0%0A%7D;%0A io.set(' @@ -1425,16 +1425,230 @@ ;%0A %7D);%0A + cond.on('changeColorSplit', function(data)%7B%0A // clients(%221%22).emit(data%5B1%5D.colors); // presumes existence of data.colors%0A // clients(...
4215916ff13aeea05704fa6aae830d651d2fd327
Fix typo and use UTF-8 everywhere
service/index.js
service/index.js
var polyfillio = require('../lib'), express = require('express'), app = express(), packagejson = require('../package.json'), origamijson = require('../origami.json'), helpers = require('./helpers'), path = require('path'), parseArgs = require('minimist'), ServiceMetrics = require('./metrics'); 'use strict'; v...
JavaScript
0.000054
@@ -786,32 +786,46 @@ application/json +;charset=utf-8 %22);%0A%09res.send(JS @@ -1183,16 +1183,30 @@ ion/json +;charset=utf-8 %22);%0A%09res @@ -1342,16 +1342,30 @@ xt/plain +;charset=utf-8 %22);%0A%09res @@ -2571,33 +2571,32 @@ pplication/json; - charset=utf-8'); @@ -3054,17 +3054,16 @@ on/json; - charset...
a77a97968bd693a5cb2b28c4ef9a163c4356f57b
Update animateScroll call signature (#129)
test/spec/spec-smoothScroll.js
test/spec/spec-smoothScroll.js
describe('Smooth Scroll', function () { 'use strict'; describe('API', function () { it('should export the smoothScroll module', function () { expect(smoothScroll).toBeDefined(); }); it('should expose public functions', function () { expect(smoothScroll.init).toE...
JavaScript
0
@@ -2584,459 +2584,118 @@ -// TODO: uncomment one, remove the other and .tohaveBeenCalled when the animateScroll signature bug is fixed.%0A // expect(smoothScroll.animateScroll).toHaveBeenCalledWith(elt, '#anchor', jasmine.objectContaining(settingsStub), jasmine.any(Object));%0A // expect(sm...
46bc145b7668e60c5b44d4c3a91593d95cefdd9f
Fix test
test/unit/dialects/oracledb.js
test/unit/dialects/oracledb.js
// global it, describe, expect 'use strict'; var _ = require('lodash'); var expect = require('chai').expect; var knex = require('../../../knex'); var config = require('../../knexfile'); describe("OracleDb externalAuth", function() { var knexInstance = knex({ client: 'oracledb', connection: { user ...
JavaScript
0.000004
@@ -1212,34 +1212,60 @@ %7B%0A -this.timeout(20000);%0A var +var knexClient;%0A%0A before(function(done) %7B%0A const con @@ -1294,16 +1294,18 @@ cledb);%0A + conf.f @@ -1350,19 +1350,17 @@ Ob'%5D;%0A -var + knexCli @@ -1380,35 +1380,8 @@ nf); -%0A%0A before(function(done) %7B %0A @@ -2100,3...
06601d8b51d91b0989c1ab7428fab3fd990de6a8
Fix coverage for vgl
testing/test-runners/server.js
testing/test-runners/server.js
/* global require, module */ 'use strict'; // jshint ignore: line var express = require('express'), bodyParser = require('body-parser'), xml = require('xmlbuilder'), fs = require('fs'), app = express(), cov = {}; /** * Combine coverage results. */ function combine(files) { var f, l; for (f i...
JavaScript
0.000002
@@ -2127,16 +2127,48 @@ name': f +.replace(/%5Esrc%5C/vgl/, 'vgl/src') ,%0A
b8a6b47a533bb3b8fe68fcbaa3656237d493332e
Fix permissions.
tests/constructor-prototype.js
tests/constructor-prototype.js
#!/usr/local/bin/seed // Returns: 0 // STDIN: // STDOUT:Hello World // STDERR: Seed.import_namespace("Gtk"); Gtk.init(null, null); Gtk.Window.prototype.hello = "Hello World"; a = new Gtk.Window(); Seed.print(a.hello);
JavaScript
0.002374
b7faaf9f323605f039bf9eb885fec8dff3ce11ac
Use isSet for arrays instead of ajax
test/test_sammy_application.js
test/test_sammy_application.js
(function($) { $(function() { with(jqUnit) { context('Sammy.Application', 'init', { before: function() { this.app = new Sammy.Application(function() { this.random_setting = 1; }); } }) .should('create a sammy object', function() { defined(t...
JavaScript
0
@@ -1824,19 +1824,19 @@ is -Obj +Set (%5B'boosh
e2eb4dbdee4f2ce25771b1b67a03ea9066d34555
Fix syntax error and remove unecessary bolierplate.
test/unexpectedMxhr.browser.js
test/unexpectedMxhr.browser.js
/* global expect:true */ describe('unexpectedMxhr', function () { it('should mock out a status code', function () { return expect('GET /', 'with xhr mocked out', { response: { statusCode: 201 } }, 'to yield response', 201); }); it('should mock out a s...
JavaScript
0
@@ -5294,85 +5294,8 @@ e',%0A - function (message) %7B%0A expect(message, 'to equal',%0A @@ -5427,20 +5427,22 @@ method: +%5C 'GET +%5C ' %7D, res @@ -5597,41 +5597,8 @@ ')%22%0A - );%0A %7D%0A
26bbf03cb1517a9e86b006025c2af99ef220425e
Revert changes making this an a tag.
website/app/application/directives/mc-flow-button.js
website/app/application/directives/mc-flow-button.js
(function (module) { module.directive("mcFlowButton", ["mcFlow", "current", "mcapi", "User", mcFlowButtonDirective]); function mcFlowButtonDirective(mcFlow, current, mcapi, User) { return { restrict: 'E', replace: true, scope: { dir: "=dir" ...
JavaScript
0
@@ -354,15 +354,52 @@ : %22%3C -a%3E%3C span + style='color: #64b5f6; cursor: pointer' tit @@ -483,12 +483,8 @@ pan%3E -%3C/a%3E %22,%0A
a78afddecf3ad3bb65533759a2947ac71df619f6
Add test for asserting request headers.
test/unexpectedMxhr.browser.js
test/unexpectedMxhr.browser.js
/* global expect:true */ describe('unexpectedMxhr', function () { it('should mock out a status code', function () { return expect('GET /', 'with xhr mocked out', { response: { statusCode: 201 } }, 'to yield response', 201); }); it('should mock out a s...
JavaScript
0
@@ -1625,32 +1625,528 @@ 201);%0A %7D);%0A%0A + it('should allow checking the request headers', function () %7B%0A return expect(%7B%0A url: 'HEAD /',%0A headers: %7B%0A 'X-Is-Test': 'yes'%0A %7D%0A %7D, 'with xhr mocked out', %7B%0A reque...
869925513ad952d3a2370766c2d6f4db34228a74
Set timeout for tests with xhr.
test/vgl-text-geometry.spec.js
test/vgl-text-geometry.spec.js
describe("VglTextGeometry component", function() { const {VglTextGeometry, VglNamespace, VglFont} = VueGL; const assert = chai.assert; this.timeout(5000); describe("Parameters of a instance should be same as the component properties.", function() { it("When properties are number.", function(done...
JavaScript
0
@@ -153,17 +153,17 @@ timeout( -5 +7 000);%0A
990f48c1e01c732b931ba5d9b54d427e22ef8e3a
Fix some spec bugs.
tests/specs/web-worker.spec.js
tests/specs/web-worker.spec.js
/*global WebWorker:false */ (function () { 'use strict'; var worker = null, WebWorkerEvent = null, exampleWorkerUrl = null; WebWorkerEvent = WebWorker.Event; exampleWorkerUrl = "/js/example-worker.js"; describe("WebWorker", function () { it("should be defined", function ...
JavaScript
0
@@ -2985,32 +2985,194 @@ r Listeners = %7B%0A + %22WORKER_LOADED%22: function () %7B%0A worker.start();%0A return;%0A %7D,%0A @@ -3204,32 +3204,32 @@ : function () %7B%0A - @@ -3706,...
2b19ed3b6dfdc6519a892df74d6aa0aeb064b13a
Fix vis reg tests
tests/visual-regression/run.js
tests/visual-regression/run.js
const { spawn, execSync } = require("child_process"); const { join } = require("path"); const chalk = require("chalk"); const proq = require("proq"); const tests = [ { pattern: "Thinking in React", args: ["examples/thinking-in-react/src/index.js"] }, { pattern: "Simple Counter in Cycle.js", args:...
JavaScript
0.000003
@@ -143,16 +143,80 @@ proq%22);%0A +const stripAnsi = require(%22strip-ansi%22);%0A%0Aconst TIMEOUT = 10000; %0Aconst t @@ -706,41 +706,12 @@ ch(/ -Compiled/) && data.match(/Server: +Open /);%0A @@ -1616,23 +1616,33 @@ Promise( +( resolve +, reject) =%3E %7B%0A @@ -1783,24 +1783,185 @@ %22)%0A %7D);%0A%0A...
0de994f3d3ef3b545ff412579b1af1cc3bba4689
add solution
Algorithms/JS/arrays/evaluateReversePolishNotation.js
Algorithms/JS/arrays/evaluateReversePolishNotation.js
// Evaluate Reverse Polish Notation // Evaluate the value of an arithmetic expression in Reverse Polish Notation. // Valid operators are +, -, *, /. Each operand may be an integer or another expression. // Examples: // ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 // ["4", "13", "5", "/", "+"] -> (4 + (13 / 5...
JavaScript
0.000003
@@ -440,8 +440,831 @@ -%3E 364%0A%0A +%0A%0A%0Avar evalRPN = function(tokens) %7B%0A var a, b;%0A var stack = %5B%5D;%0A for (var i = 0; i %3C tokens.length; i += 1) %7B%0A if (tokens%5Bi%5D === '+') %7B%0A stack.push(stack.pop() + stack.pop());%0A console.log(stack)%0A %7D...
a5ab9cbdce66178ef5339b8f1e6316dd3906597e
add logic
Algorithms/JS/arrays/evaluateReversePolishNotation.js
Algorithms/JS/arrays/evaluateReversePolishNotation.js
// Evaluate Reverse Polish Notation // Evaluate the value of an arithmetic expression in Reverse Polish Notation. // Valid operators are +, -, *, /. Each operand may be an integer or another expression. // Examples: // ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 // ["4", "13", "5", "/", "+"] -> (4 + (13 / 5...
JavaScript
0.002571
@@ -508,16 +508,461 @@ r%7D%0A */%0A%0A +%0A// Stack Approach%0A%0A// create two variables that will be used as pointers for order of subtraction and division%0A// create empty stack to start out%0A// loop through tokens%0A // Add every token as an integer in the stack, unless it's an operation.%0A // if element is ...
6ea4d2ab0d3c796b544c66dcca4d05d326042c1c
add better error handling in the lowest level of the request
init.js
init.js
"use strict"; var mode = process.env['ROADS_ENV'] || 'dev'; var Models = require('roads-models'); require('./libs/roadsmodelpromise.js').mixin(Models.ModelRequest.prototype); var Config = require('./base/config'); var http_server = require('roads-httpserver'); var Project = require('./base/project'); var bifocals_mod...
JavaScript
0.000001
@@ -2739,16 +2739,51 @@ ponse);%0A +%09%09view.content_type = 'text/html';%0A %09%09view.d @@ -2896,24 +2896,33 @@ tes.500');%0A%0A +%09%09try %7B%0A%09 %09%09// allow a @@ -2981,16 +2981,17 @@ e route%0A +%09 %09%09if (re @@ -3074,16 +3074,17 @@ = -1) %7B%0A +%09 %09%09%09view. @@ -3123,61 +3123,16 @@ ';%0A%0...
e5900ce20cbf1f7945cdad6202341243718c6aa4
Improve html logger.
src/loggers/html.js
src/loggers/html.js
import fs from 'fs'; import {join} from 'path'; import {inspect} from 'util'; import camelCase from 'camelcase'; import HtmlEntities from 'html-entities'; import completed from '../completed'; const encode = new HtmlEntities.AllHtmlEntities().encode; const entries = []; export function pass (property, syntax, parsed...
JavaScript
0.000001
@@ -252,22 +252,63 @@ %0A%0Aconst -entrie +passes = %5B%5D;%0Aconst progressing = %5B%5D;%0Aconst fail s = %5B%5D;%0A @@ -366,89 +366,269 @@ -// Don't log properties that we completed%0A if (~completed.indexOf(property)) %7B +if (~completed.indexOf(property)) %7B%0A passes.push(%60%0A %3Ch2 id...
a44b6ab5233afdc1c31b7bb618e9fd36ffda6ba2
Use encodeURIComponent directly and remove unneeded code. (#479)
src/main/helpers.js
src/main/helpers.js
/* * Minio Javascript Library for Amazon S3 Compatible Cloud Storage, (C) 2015 Minio, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENS...
JavaScript
0
@@ -742,275 +742,41 @@ %7B%0A -var output = string%0A // this was originally escape instead of encodeURIComponent but escape is deprecated.%0A output = output.replace(/%5B%5EA-Za-z0-9_.~%5C-%25%5D+/g, encodeURIComponent)%0A%0A // AWS percent-encodes some extra non-standard characters in a URI%0A output = outpu...