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
b04bcc1a26d147d1338347ef1fd54f544bade911
Fix build script for google closure and CommonJS
gulpfile.js
gulpfile.js
/** * Copyright 2015 The Incremental DOM Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
JavaScript
0.00015
@@ -3286,32 +3286,39 @@ osure(done) %7B%0A +delete env.NODE_ENV = u @@ -3309,36 +3309,24 @@ env.NODE_ENV - = undefined ;%0A env.min @@ -3763,24 +3763,31 @@ monJS() %7B%0A +delete env.NODE_ENV @@ -3790,20 +3790,8 @@ _ENV - = undefined ;%0A
dc2da9ae3a9924aa00dcf6a492a2c52316df2cc5
Include version when archiving theme
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var clean = require('gulp-clean'); var replace = require('gulp-replace'); var filter = require('gulp-filter'); var zip = require('gulp-zip'); var jshint = require('gulp-jshint'); var stylish = require('jshint-stylish'); var uglify = require('gulp-uglify'); var minifyCSS = require('gul...
JavaScript
0
@@ -931,16 +931,58 @@ ox-model +-' + require('./package.json').version + ' .zip'%0A%7D;
df568d629895526162c9d974168f0fd38112ebc0
Update browserSync options
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var sass = require('gulp-sass'); var autoprefixer = require('gulp-autoprefixer'); var plumber = require('gulp-plumber'); var browserSync = require('browser-sync').create(); var reload = browserSync.reload; var BROWSERS = [ "> 5%", "ie > 0", "Firefox > 0", "Chrome > 0", "Opera > 0"...
JavaScript
0.000001
@@ -528,19 +528,89 @@ -open: false +logPrefix: %22Pattern Library%22,%0A browser: %5B%22google chrome%22, %22firefox%22, %22safari%22%5D %0A %7D
05193f121443055e30da6bdf7acbb8da3f4083fd
fix failures
gulpfile.js
gulpfile.js
'use strict'; var grep = require('gulp-grep-stream'); var mocha = require('gulp-mocha'); var watch = require('gulp-watch'); var gulp = require('gulp'); var debug = require('gulp-debug'); var filter = require('gulp-filter'); var jshint = require('gulp-jshint'); function runMocha(source) { return source.pipe(grep('**/...
JavaScript
0.000005
@@ -149,43 +149,8 @@ ');%0A -var debug = require('gulp-debug');%0A var
3185750e6d47e89ab2b91be1ed788ca36dc5723e
Use nconfg to configure Ripple Rest API
workers/listener.js
workers/listener.js
var Ripple = require('ripple-lib') var request = require('request') var RippleAddress = require('../app/models/ripple_address.js'); var RippleTransaction = require('../app/models/ripple_transaction.js'); var RippleSimpleClient = require('../lib/ripple_simple_client.js'); var sequelize = require("../config/initializers/...
JavaScript
0
@@ -329,16 +329,60 @@ e.js%22);%0A +var nconf = require('../config/nconf.js');%0A%0A %0Avar cli @@ -426,37 +426,38 @@ rl: -process.env. +nconfg.get(' RIPPLE_ -SIMPLE +REST _API +'); %0A%7D);
0363f215c66409a3c91dd4a9d49fde7ad59f19f7
test ueser.name
gulpfile.js
gulpfile.js
'use strict'; var config = require('./webpack.config'); var gutil = require('gulp-util'); var path = require('path'); var gulp = require('gulp'); var os = require('os'); var nodefn = require('when/node'); var server = require('./test/server'); var webpack = require('webpack'); var execFile = require('child_process').e...
JavaScript
0.000006
@@ -435,17 +435,16 @@ Tests;%0A%0A -%0A function
9905d9d061735f95a93df3fdb6336f244f33d58f
Add updateTaskTemplateProperties method.
website/src/app/project/experiments/services/experiments-service.service.js
website/src/app/project/experiments/services/experiments-service.service.js
class ExperimentsService { /*@ngInject*/ constructor(projectsAPI) { this.projectsAPI = projectsAPI; } getAllForProject(projectID) { return this.projectsAPI(projectID).one('experiments').getList(); } createForProject(projectID, experiment) { return this.projectsAPI(proje...
JavaScript
0
@@ -1249,24 +1249,260 @@ %7B%7D);%0A %7D%0A%0A + updateTaskTemplateProperties(projectID, experimentID, taskID, updateArgs) %7B%0A return this.projectsAPI(projectID).one('experiments', experimentID).one('tasks', taskID)%0A .one('template').customPUT(updateArgs);%0A %7D%0A%0A deleteTa
f1b061c5e93cf7b46ae44b50d24ad4a1baeb7fb9
fix hello test
test/connect/hello-test.js
test/connect/hello-test.js
// LICENSE : MIT "use strict"; import assert from "power-assert"; import connect from "connect" import hello from "../../src/connect/hello"; import http from "http"; import fetch from "node-fetch"; describe("hello", function () { var responseText = "test"; var server; before(function (done) { var ap...
JavaScript
0.000122
@@ -687,16 +687,31 @@ al(text, + responseText); %0A
a8641980e48e0d77c84ed21aacdc29a7c021165f
document layout properties in RouteConfig interface
src/interfaces.js
src/interfaces.js
/** * A configuration object that describes a route. */ interface RouteConfig { /** * The route pattern to match against incoming URL fragments, or an array of patterns. */ route: string|string[]; /** * A unique name for the route that may be used to identify the route when generating URL fragments. * Re...
JavaScript
0
@@ -1386,16 +1386,138 @@ iewPort. + The values may optionally include properties related to layout: %0A * %60layoutView%60, %60layoutViewModel%60 and %60layoutModel%60. %0A */%0A @@ -2926,16 +2926,348 @@ tring;%0A%0A + /**%0A * specifies the file name of a layout view to use.%0A */%0A layoutView: string;...
211a15272a3d445705ff8d7f5dd15aa9e39f6eb3
extend mapEdge()
src/io/crystal.js
src/io/crystal.js
import * as spacegroups from '../geometry/spacegroups'; import * as sgtable from './sgtable'; import { coordinateChanges } from '../geometry/types'; const V = coordinateChanges; const matrixError = (A, B) => V.div(V.norm(V.minus(A, B)), V.norm(A)); const eps = Math.pow(2, -50); const trim = x => Math.abs(x) < eps ? ...
JavaScript
0
@@ -707,24 +707,25 @@ t mapEdge = +( coordinateCh @@ -724,24 +724,32 @@ dinateChange +, nodes) =%3E ends =%3E @@ -790,14 +790,13 @@ == ' -Intege +Vecto r') @@ -812,43 +812,16 @@ urn -p;%0A %7D%0A else %7B%0A return %7B%0A + - orig @@ -888,16 +888,145 @@ )%0A %7D%0A + %7D%0A else %7B%0...
e4bd767c5258a1795e6fcdb6c755548bf9c43ef5
Use TEST_REPORT_PATH env variable
src/methods.js
src/methods.js
const path = require('path'); const fs = require('fs'); const xmlbuilder = require('xmlbuilder'); const mkdirp = require('mkdirp'); const stripAnsi = require('strip-ansi'); const defaultStylesheet = require('./style'); /** * Fetches config from package.json */ const packageJson = require(path.join(process....
JavaScript
0
@@ -1090,16 +1090,48 @@ tPath %7C%7C + process.env.TEST_REPORT_PATH %7C%7C path.jo
158e125ee8feaa803b7e7df7b06db7307eb07c43
Check that is params !== null
src/js/nettest.js
src/js/nettest.js
/* * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. */ 'use strict'; // Test whether it can connect via UDP to a TURN server // Get a TURN config, and ...
JavaScript
0.000403
@@ -4074,24 +4074,43 @@ if (params + !== null && params .optional%5B0%5D
cd99d44704946519a82d22c89c08aac08e49263b
Use Math.cosh of ES6/2015 if available
src/ol/math.js
src/ol/math.js
goog.provide('ol.math'); goog.require('goog.asserts'); /** * Takes a number and clamps it to within the provided bounds. * @param {number} value The input number. * @param {number} min The minimum value to return. * @param {number} max The maximum value to return. * @return {number} The input number if it is wi...
JavaScript
0
@@ -484,85 +484,672 @@ %0A * -@param %7Bnumber%7D x X.%0A * @return %7Bnumber%7D Hyperbolic cosine of x.%0A */%0Aol.math. +Return the hyperbolic cosine of a given number. The method will use the%0A * native %60Math.cosh%60 function if it is available, otherwise the hyperbolic%0A * cosine will be calculated via the re...
01f792c212ee9383a5a3d218af322ad7f3c3c7a4
Set original key from alias; don't set alias key
src/options.js
src/options.js
import {covenance, CovenantBroken} from 'covenance' import frosty from 'frosty' import _ from 'underscore' const DEFAULTS = { chunk: 1, delay: 0, scope: null }; const ALIASES = { chunk: ['chunksize'], delay: [ 'yield', 'yieldtime', 'delaytime' ], scope: [] }; const SCHEMA = Object.getOwnPro...
JavaScript
0.000008
@@ -1427,16 +1427,23 @@ y = (key +, alias ) =%3E %7B%0A @@ -1459,19 +1459,21 @@ options%5B -key +alias %5D === un @@ -1541,19 +1541,21 @@ options%5B -key +alias %5D;%0A @@ -1622,16 +1622,21 @@ !setkey( +key, key)) %7B%0A @@ -1698,16 +1698,21 @@ (setkey( +key, alias))
4120db87347ff441ec3cc15ea74654d9a28ebc11
update tests for latest AVA version
test.js
test.js
import test from 'ava'; import fn from './'; // For more comprehensive tests, see: // https://github.com/sindresorhus/buf-indexof/blob/master/test.js test(t => { const x = new Buffer('abcdef'); t.true(fn(x, 'a')); t.true(fn(x, new Buffer('a'))); t.true(fn(x, 'f')); t.false(fn(x, 'a', 1)); t.false(fn(x, 'x')); ...
JavaScript
0
@@ -316,18 +316,8 @@ ));%0A -%09t.end();%0A %7D);%0A
17501f58998cf4060e1b187520f1df46c3155fd6
Add a nicer test/benchmark
test.js
test.js
var Parser = require('./index.js'); var parser = new Parser(['rows', true, 'doc', '_id']); var npm = require('fs').readFileSync('./npm.json'); console.time('JSON--'); parser.write(npm); console.timeEnd('JSON--') console.time('toString') npm = npm.toString(); console.timeEnd('toString') console.time('JSON'); JSON.par...
JavaScript
0.000067
@@ -37,28 +37,67 @@ var -parser = new Parser( +npm = require('fs').readFileSync('./npm.json');%0Avar path = %5B'ro @@ -124,64 +124,146 @@ id'%5D -) ;%0A -var npm = require('fs').readFileSync('./npm.json');%0A%0A +%0Apath.reduce(function (path, item) %7B%0A path.push(item);%0A%0A var parser = new Parser(path...
521047f5bec425027c348ead6c06a450df4b0458
Add input test
test.js
test.js
'use strict'; var test = require('ava'); var isNegative = require('./'); test(function (t) { t.assert(isNegative(-1)); t.assert(!isNegative(0)); t.assert(!isNegative(1)); t.end(); });
JavaScript
0.000066
@@ -182,8 +182,207 @@ ();%0A%7D);%0A +%0Atest('throws if input isn%5C't a number', function (t) %7B%0A%09t.plan(2);%0A%0A%09try %7B%0A%09%09isNegative('foo');%0A%09%09t.fail();%0A%09%7D catch (err) %7B%0A%09%09t.assert(err);%0A%09%09t.assert(err.message === 'Expected a number');%0A%09%7D%0A%7D);%0A
117f940f90c27cda8d72530eb002777b79ab20c6
add test for arguments
test.js
test.js
var test = require("tap").test; var nextTick = require('./'); test('should work', function (t) { t.plan(5); nextTick(function (a) { t.ok(a); nextTick(function (thing) { t.equals(thing, 7); }, 7); }, true); nextTick(function (a, b, c) { t.equals(a, 'step'); t.equals(b, 3); t.equals...
JavaScript
0.000001
@@ -360,8 +360,167 @@ ');%0A%7D);%0A +%0Atest('correct number of arguments', function (t) %7B%0A t.plan(1);%0A nextTick(function () %7B%0A t.equals(2, arguments.length, 'correct number');%0A %7D, 1, 2);%0A%7D);%0A
a4d988eaf754551222359fca964d506d154e161d
Update the specs again
test.js
test.js
const test = require('tape-catch'); import doxie from './module/index'; test('Does what the demo says', (is) => { const myData = [ {isPrivate: false}, {isPrivate: true}, {isPrivate: false}, ]; is.deepEqual( doxie([])(myData), {chunks: [ {data: {isPrivate: false}}, {data: {isPriv...
JavaScript
0
@@ -117,22 +117,27 @@ const -myData +doxComments = %5B%0A @@ -240,22 +240,27 @@ xie(%5B%5D)( -myData +doxComments ),%0A %7B @@ -541,61 +541,152 @@ ( -comments) =%3E comments.filter(myFilter),%0A %5D)(myData +input) =%3E Object.assign(%7B%7D, input, %7Bchunks:%0A input.chunks.filter(myFilter)...
792e809a6b269de376cd0c571aa0cc9f32b1d9c3
Fix tests
test.js
test.js
import fs from 'fs' import test from 'ava' import pify from 'pify' import childProcess from 'child_process' const expected = fs.readFileSync('expected.html', 'utf8') const fixtureFile = 'fixture.html' const outputFile = 'output.html' test('strips html comments', async t => { t.plan(1) const stdout = await pify(c...
JavaScript
0.000003
@@ -105,519 +105,242 @@ ss'%0A -%0Aconst expected = fs.readFileSync('expected.html', 'utf8')%0Aconst fixtureFile = 'fixture.html'%0Aconst outputFile = 'output.html'%0A%0Atest('strips html comments', async t =%3E %7B%0A t.plan(1)%0A%0A const stdout = await pify(childProcess.execFile)('./cli.js', %5BfixtureFile%5D)%0A...
b111d8ad29fa9d26e1c0a849341a7fb63110ca46
Update humedad1_accessory.js
accessories/humedad1_accessory.js
accessories/humedad1_accessory.js
var Humidity = 0.0; // MQTT Setup var mqtt = require('mqtt'); console.log("Connecting to MQTT broker..."); var mqtt = require('mqtt'); var options = { port: 1883, host: '192.168.0.67', clientId: 'Humedad1' }; var client = mqtt.connect(options); console.log("Humidity Sensor Connected to MQTT broker"); client.subsc...
JavaScript
0
@@ -179,12 +179,13 @@ 168. -0.67 +1.125 ',%0A
483f33aed5248f09b2d119948268bbcf30c0fdde
update tests for latest AVA version
test.js
test.js
import test from 'ava'; import zenObservable from 'zen-observable'; import fn from './'; // for `zen-observable` on Node.js 0.10 global.Promise = Promise; test(t => { t.true(fn(zenObservable.of(1, 2))); t.false(fn(null)); t.false(fn({foo: true})); t.false(fn(function () {})); t.end(); });
JavaScript
0
@@ -68,18 +68,17 @@ %0Aimport -fn +m from '. @@ -169,18 +169,17 @@ %09t.true( -fn +m (zenObse @@ -206,18 +206,17 @@ t.false( -fn +m (null)); @@ -225,18 +225,17 @@ t.false( -fn +m (%7Bfoo: t @@ -255,36 +255,19 @@ lse( -fn(function () %7B%7D));%0A%09t.end( +m(() =%3E %7B%7D) );%0A%7D
7dc620080f0609dbfa22acbc8392c4de040d99bc
Fix test cases for self closing tags
test.js
test.js
var expect = require('expect.js'), defaultOpts = require('cheerio').prototype.options, _ = require('lodash'), parse = require('cheerio/lib/parse'), render = require('./index.js'); var html = function(preset, str, options) { options = _.defaults(options || {}, _.defaults(preset, defaultOpts)); var d...
JavaScript
0.000002
@@ -1078,16 +1078,17 @@ t; case%22 +/ %3E');%0A @@ -1743,21 +1743,22 @@ ual('%3Cbr +/ %3E');%0A - %7D);%0A%0A @@ -1975,16 +1975,17 @@ parsing%22 +/ %3E');%0A %7D @@ -2165,16 +2165,17 @@ checked +/ %3E');%0A %7D @@ -2307,24 +2307,24 @@ =%22name%22/%3E';%0A - expect(h @@ -2361,16 +2361,17 @@ e=%2...
20f9e8f5e5e35c8bf02d812ae3e80118688f01a7
Revert "fix standard violations"
test.js
test.js
import test from 'ava' import commonPathPrefix from './' test('returns an empty string if there is no common prefix', (t) => { t.is(commonPathPrefix(['foo', 'bar'], '/'), '') }) test('returns the longest common prefix', (t) => { t.is(commonPathPrefix(['/foo/bar/baz/qux', '/foo/bar/baz/quux'], '/'), '/foo/bar/baz...
JavaScript
0
@@ -105,35 +105,33 @@ common prefix', -(t) +t =%3E %7B%0A t.is(com @@ -208,35 +208,33 @@ common prefix', -(t) +t =%3E %7B%0A t.is(com @@ -349,19 +349,17 @@ paths', -(t) +t =%3E %7B%0A @@ -496,19 +496,17 @@ refix', -(t) +t =%3E %7B%0A @@ -661,19 +661,17 @@ path', -(t) +t =%3E %7B%0A @@ -1215...
7cae8a7f2133123f8eb45cf9f02338e786a49e97
add test messages
test.js
test.js
'use strict'; var test = require('tape'); var tryjson = require('.'); test('valid json', function (t) { var obj, objs = [ null, '', 'txt', 6, -0.2, 1e6, 1/3, [], {}, true, false, [[[[[1]]]]], {a: 1, b: 2}, ...
JavaScript
0.000001
@@ -433,24 +433,62 @@ ction (o) %7B%0A + var json = JSON.stringify(o);%0A obj @@ -503,33 +503,20 @@ n.parse( -JSON.stringify(o) +json );%0A @@ -544,25 +544,33 @@ typeof obj, -' +json + ' should have @@ -639,18 +639,26 @@ ay(obj), + json + ' + should h @@ -714,17 +714,25 @@ o, obj, -...
16513219e6ed9cef8e6e262f4775a2783eefccff
fix path to main index
test/integration/promise-wrappers/test-promise-wrappers.js
test/integration/promise-wrappers/test-promise-wrappers.js
var config = require('../../common.js').config; var skipTest = false; if (typeof Promise == 'undefined') { console.log('no Promise support, skipping test'); skipTest = true; process.exit(0); } var assert = require('assert'); var createConnection = require('../../../promise.js').createConnection; var createPool...
JavaScript
0.00007
@@ -471,16 +471,19 @@ ('../../ +../ index.js
7455f9bc4b04abb945c5ca3a91ad029ba65c6255
refactor fileFetcher, cache failed requests
src/lib/fileFetcher.js
src/lib/fileFetcher.js
var Promise = require('es6-promise').Promise var SimpleCache = require('simple-lru-cache') var transport = require('./transport') var cache = new SimpleCache({ 'maxSize': 1000 }) var fetchQueue = {} var getFileFromNetwork = function (url) { return new Promise(function (resolve, reject) { if (fetchQueue[url])...
JavaScript
0
@@ -1,49 +1,4 @@ -var Promise = require('es6-promise').Promise%0A var @@ -39,16 +39,16 @@ cache')%0A + var tran @@ -135,796 +135,8 @@ %7D)%0A%0A -var fetchQueue = %7B%7D%0A%0Avar getFileFromNetwork = function (url) %7B%0A return new Promise(function (resolve, reject) %7B%0A if (fetchQueue%5Burl%5D) %7B%0A ...
84be4ce28ff63cfcc2d0fffe79f2278d3f3acd91
Fix file not found when running from different directory
rapidity.js
rapidity.js
var falafel = require('falafel'); var fs = require('fs'); var data = {}; var pwd = process.cwd(); var posToLineCol = function(string, pos) { var before = string.substring(0, pos).split("\n"); var line = before.length; var col = before[before.length - 1].length; return line + ':' + col; }; require.extensions...
JavaScript
0
@@ -3177,18 +3177,29 @@ ileSync( +__dirname + ' -. /templat
20fe45ee27f8807a135c76b96f0e337b87cfe424
Tweak routes
project/src/js/routes.js
project/src/js/routes.js
import helper from './ui/helper'; import home from './ui/home'; import game from './ui/game'; import analyse from './ui/analyse'; import challenge from './ui/challenge'; import tv from'./ui/tv'; import correspondence from'./ui/correspondence'; import otb from'./ui/otb'; import ai from'./ui/ai'; import settingsUi from'....
JavaScript
0.000001
@@ -2092,26 +2092,27 @@ s/:filter': -fa +sli dingPage(use
ad2127cd06adfb00d7f2b407c8efbb3ef337e3a3
Fix signin for stage
server/config.js
server/config.js
require('dotenv').config(); const production = process.env.NODE_ENV === 'production'; const oneDay = 24 * 60 * 60; function get(name, fallback, options = {}) { if (process.env[name]) { return process.env[name]; } if (fallback !== undefined && (!production || !options.requireInProduction)) { ...
JavaScript
0
@@ -1031,16 +1031,43 @@ ePrefix: + get('LICENCE_ROLE_PREFIX', 'LICENC @@ -1068,16 +1068,17 @@ LICENCE' +) %0A %7D,%0A
e73ed7d37608d076666fc14a7139f77680af5ea2
Remove debug logging
public/application.js
public/application.js
var phaxMachine = { faxLogs: { render: function() { $.getJSON("/logs.json", {}, function(response, status, jqXHR) { if (response.success) { phaxMachine.createAlert("success", response.message) phaxMachine.faxLogs.populateFaxLogsTable(response.data) phaxMachine.faxLogs.makeRecipientsClickable() ...
JavaScript
0.000002
@@ -2493,71 +2493,8 @@ ow)%0A -%09%09%09%09console.log(recipientRow)%0A%09%09%09%09console.log(recipientsTable)%0A %09%09%09%7D
93edcb28b49c9675a5689c4b837ccd1b70a3e72d
Fix Panoramio
www/js/Panoramio.js
www/js/Panoramio.js
// Panoramio plugin for Leaflet // https://github.com/shurshur/Leaflet.Panoramio L.Panoramio = L.FeatureGroup.extend({ options: { async: true }, initialize: function(options) { L.Util.setOptions(this, options); this._layers = []; }, onAdd: function(map, insertAtTheBottom) { this._map = map; this._inse...
JavaScript
0.000001
@@ -599,43 +599,11 @@ data -, options=%7B%7D) %7B%0A%09%09var layers = %5B%5D;%0A +) %7B %0A%09%09f
a2c536a1e3ee789f7f8e1dd4c1c8ce9fd9569f8f
Fix tooltip callback template for scalar entry
inst/htmlwidgets/trackWidget.js
inst/htmlwidgets/trackWidget.js
HTMLWidgets.widget({ name: 'trackWidget', type: 'output', factory: function(el, width, height) { // Some util functions var tnr = {}; tnr.tooltip_callback = function (header, entries) { var header = header; var entries = entr...
JavaScript
0
@@ -323,32 +323,212 @@ s;%0A %0A + // entries may be a scalar variable, but we need an array%0A if (typeof entries != %22object%22) %7B%0A entries = %5Bentries%5D;%0A %7D%0A %0A var @@ -1168,24 +1168,26 @@ %0A +// tnr.add_...
e3b37d3db629b9b16ce01c9bb535271fc538d8c9
Fix webvr button and animation loop
client/pages/examples/threejswebvr/hello-threejswebvr/index.js
client/pages/examples/threejswebvr/hello-threejswebvr/index.js
import React from 'react' import ReactDOM from 'react' import * as THREE from 'three' import Example from '-/components/example' import notes from './readme.md' import { WEBVR } from 'three/examples/jsm/vr/WebVR.js' console.log(WEBVR) let button let renderer const didMount = ({ canvas, container }) => { const scen...
JavaScript
0
@@ -538,16 +538,45 @@ nvas %7D)%0A + renderer.vr.enabled = true%0A button @@ -613,34 +613,67 @@ )%0A -renderer.vr.enabled = true +document.getElementById('webvr-button').appendChild(button) %0A%0A @@ -1063,21 +1063,16 @@ mera)%0A - %7D)%0A cube @@ -1091,16 +1091,18 @@ += 0.01%0A + cube @@ -1...
22fe4cea69f49f9189f797138283e2c1216e1834
Add start to checkers
src/log-parser.js
src/log-parser.js
'use strict'; const LOG_REGEXES = { zoneChange: /name=(.*) id=(\d+).*to (FRIENDLY|OPPOSING) (.*)$/, actionStart: /ACTION_START Entity=\[(.*)\] SubType=(.*) Index=-?\d+ Target=\[(.*)\]/, entity: /(?:name=([\w\s]+))? (?:id=(\d+))? zone=(\w+) zonePos=(\d+) cardId=(\w+) player=(\d+)/, start: /id=(\d) ChoiceType=MU...
JavaScript
0.000001
@@ -444,16 +444,26 @@ _attack' +, '_start' %5D;%0A f
f079907c2f3c51d98377d36d18986aa1bae57c4b
Change jsDoc for init()
nfieldapi.js
nfieldapi.js
module.exports = (function Nfield () { var Promise = require('bluebird'); var nfieldInstance; /** * Creates Nfield instance * @param {Object} nfieldParams - Parameters to configure Nfield user to use with API, must contain server url and user credentials * @param {Object=} requestParams - Parame...
JavaScript
0
@@ -4175,173 +4175,43 @@ e : -function publicConfigure (nP, rP) %7B%0A updateParams(nP, rP);%0A %7D,%0A signIn : function publicSignIn (cred, cb) %7B%0A return signIn(cred, cb);%0A %7D +updateParams,%0A signIn : signIn ,%0A @@ -4440,32 +4440,236 @@ ser credentials%0A + * @param...
c6af3c441f8bde3384e3ca604903bb01755e2fac
fix bug in take
throughs.js
throughs.js
var k = 0 var map = exports.map = function (read, map) { var _k = k++ if('string' == typeof map) { var key = map map = function (data) { return data[key] } } map = map || function (e) {return e} return function (end, cb) { read(end, function (end, data) { var data = !end ? map(data) : null ...
JavaScript
0
@@ -1183,12 +1183,8 @@ read -able (end
d8720bedcc7775e03b896aa6ea425cec5994a84c
Use privileged hashtag for posts from the TA column
public/config.js
public/config.js
Xpt.initialize({ app_title: "Crosspoint", init_columns: [ { title: "全体のメッセージ" , in_filter: function(p) { return !p.content.match(/#GROUP-ONLY/i); } , out_filter: function(p) { return true; } , in_map: function(p) { return p; } , out_map: function(p) { return p; ...
JavaScript
0
@@ -779,16 +779,17 @@ match(/# +# TA/i); %7D @@ -781,32 +781,32 @@ tch(/##TA/i); %7D%0A - , out_fi @@ -908,16 +908,17 @@ place(/# +# TA/ig, %22 @@ -984,16 +984,17 @@ nt += %22# +# TA%22; ret @@ -1032,33 +1032,26 @@ older: %22 -%E8%B3%AA%E5%95%8F%E3%81%99%E3%82%8B... / %E5%9B%9E%E7%AD%94%E3%81%99%E3%82%...
f4bf33c7b8b04b1f72ee2feae83e1c7b304c2aaf
Work migration with different link collections.
migrations/1613348381637-replaceFileLinks.js
migrations/1613348381637-replaceFileLinks.js
/* eslint-disable no-await-in-loop */ const mongoose = require('mongoose'); // eslint-disable-next-line no-unused-vars const { alert, error } = require('../src/logger'); const { connect, close } = require('../src/utils/database'); const { lessonSchema } = require('../src/services/lesson/model'); const { linkSchema } ...
JavaScript
0
@@ -605,24 +605,27 @@ st LinkModel +Old = mongoose. @@ -635,16 +635,106 @@ el('link +Old613348381637', linkSchema, 'linksBackup');%0Aconst LinkModelNew = mongoose.model('linkNew 61334838 @@ -1094,26 +1094,27 @@ await L -esson +ink Model +Old .find(%7B @@ -1382,32 +1382,35 @@ await LinkModel +Old .find(link...
18845ccc928a92070c3819f0da1087a00bb9f2ae
Fix SilverStripe embed shortcode stripped out of content Fixes #41
javascript/shortcodable.js
javascript/shortcodable.js
(function($) { $.entwine('ss', function($) { // handle change on shortcode-type field $('select.shortcode-type').entwine({ onchange: function(){ this.parents('form:first').reloadForm('type', this.val()); } }); // add shortcode controller url ...
JavaScript
0
@@ -1378,29 +1378,27 @@ rtcodes( -ed.getContent +$(this).val (), ed);
7c5a1860223839c712234d971032f2284599b25c
add full code to readfile.js
readfile.js
readfile.js
var fs = require('fs');
JavaScript
0.000001
@@ -17,8 +17,72 @@ ('fs');%0A +var data = fs.readFile('data.json', 'utf8');%0Aconsole.log(data);%0A
f5f2fca28c62cd43f352a136bbd0f11c2ef88311
use mongoids for challenge.id (#39676)
client/plugins/fcc-source-challenges/create-challenge-nodes.js
client/plugins/fcc-source-challenges/create-challenge-nodes.js
const crypto = require('crypto'); function createChallengeNode(challenge, reporter) { // challengeType 11 is for video challenges (they only have instructions) // challengeType 7 is for certificates (they only have tests) if ( typeof challenge.description[0] !== 'string' && (challenge.challengeType !== 1...
JavaScript
0
@@ -982,54 +982,8 @@ enge -,%0A %7B id: challenge.id + internal.type %7D %0A
b22047fb88c271ac29a09d734cf574ade8d02058
Fix require.
test/lib/renderTestSpec.js
test/lib/renderTestSpec.js
'use strict'; global.Promise = require('Promise'); var coreTests = require('./coreTests'), helperTests = require('./helperTests'), assert = require('assert'), Dust = require('../../lib/Dust'), Stack = require('../../lib/Stack'), Context = require('../../lib/Context'); describe('Test the basic functionality of du...
JavaScript
0
@@ -34,17 +34,17 @@ equire(' -P +p romise')
c084113abcc7c16dc889b9c75a427697ea7027bf
Rename actions in games.js (GAME -> GAMES)
frontend/src/redux/games.js
frontend/src/redux/games.js
// @flow import { fromJS } from 'immutable'; import GamesState from '../models/games'; import type { GameMapType, GameNormalMapType, GameShape, Game } from '../models/games'; import type { Map, List } from 'immutable'; export const types = { UPDATE_GAMES: 'GAME/UPDATE_GAMES', REQUEST_CREATE_GAME: 'GAME/REQUEST_CRE...
JavaScript
0
@@ -253,24 +253,25 @@ GAMES: 'GAME +S /UPDATE_GAME @@ -294,32 +294,33 @@ EATE_GAME: 'GAME +S /REQUEST_CREATE_ @@ -344,32 +344,33 @@ JOIN_GAME: 'GAME +S /REQUEST_JOIN_GA @@ -397,24 +397,25 @@ _GAME: 'GAME +S /REQUEST_JOI @@ -439,24 +439,25 @@ LOBBY: 'GAME +S /ENTER_LOBBY @@ -478,16 +478,17 @@ E: 'GAME +S /EN...
41f0db860a5d4397e7a320bf0dd3e743bf41bf18
add to desc
Algorithms/Concepts/backtracking.js
Algorithms/Concepts/backtracking.js
// What is Back­track­ing Programming?? // Recur­sion is the key in back­track­ing pro­gram­ming. // As the name sug­gests we back­track to find the solu­tion. // We start with one pos­si­ble move out of many avail­able moves and try to solve the prob­lem // if we are able to solve the prob­lem with the selected move ...
JavaScript
0
@@ -34,16 +34,166 @@ ming??%0A%0A +%0A// Back%C2%ADtrack%C2%ADing is a gen%C2%ADeral algo%C2%ADrith%C2%ADmic tech%C2%ADnique that con%C2%ADsid%C2%ADers search%C2%ADing every pos%C2%ADsi%C2%ADble com%C2%ADbi%C2%ADna%C2%ADtion%0A// in order to solve a problem.%0A // Recur
7d46b5e089ee8bf63d083314df30fccae829afd5
Document and cleanup colorUtils
src/components/ColorNamePicker/utils/colorUtils.js
src/components/ColorNamePicker/utils/colorUtils.js
/* eslint-disable */ /** * Return the luma from a hex color string * * @param {string} color Hex color with # * @returns {Int} Luma value 0 - 100 where: * 0 = Darkest * 255 = Brightest */ export function lumaFromColor (color) { const c = color.substring(1) // strip # const rgb ...
JavaScript
0
@@ -26,578 +26,238 @@ %0A * -Return the luma from a hex color string%0A *%0A * @param %7Bstring%7D color Hex color with #%0A * @returns %7BInt%7D Luma value 0 - 100 where:%0A * 0 = Darkest%0A * 255 = Brightest%0A */%0Aexport function lumaFromColor (color) %7B%0A const c = +Lighten / Dar...
f2fe5bec5c41791f4dcfe73195182c4f251ea866
Fix issue with flags winning game - Don't use the updateAll method when toggling flags as only 1 item is passed in
client-src/js/app/game/ItemsStore.js
client-src/js/app/game/ItemsStore.js
var Dispatcher = require('../../modules/Dispatcher'); var ItemsConstants = require('./ItemsConstants'); var ItemsModelFactories = require('./ItemsModelFactories'); var PlayersConstants = require('./PlayerConstants'); var RegisteredStore = require('../../modules/RegisteredStore'); var Immutable = require('../../modules/...
JavaScript
0
@@ -1228,24 +1228,406 @@ ommit();%0A%7D%0A%0A +function updateFlaggedItem(item)%7B%0A var found = false;%0A var i = 0;%0A var len = data.flags.length;%0A while(i %3C len)%7B%0A if(data.flags%5Bi%5D.id == item.id)%7B%0A found = true;%0A break;%0A %7D%0A i++;%0A ...
d233398d8a5c94b2249a2a5bd405d06f831a84aa
input name= updates
public/application.js
public/application.js
// once page is loaded ... $(document).ready(function(){ $('a[href=#new_field]').click(function(){ $('#new_fields').prepend("<div class='new_field'><p class='myEditableText sameaslabel'>Write the title here</p><input name='page[new_field]' value='' /></div>"); $('.myEditableText').click(function(){ ...
JavaScript
0.999997
@@ -337,16 +337,17 @@ $(this) +; %0A %0A @@ -535,32 +535,450 @@ ear text%0A %0A + // On focus of input, change name= to correspond to p sibling%0A editable.parent().children().filter('input').focus(function() %7B%0A input = $(this);%0A key = input.parent().children().filter('p').te...
7412caca393fd4f4edf664758296a77ced283e68
Clear new messages pill in all cases when window becomes visible
client/app/models/Window.js
client/app/models/Window.js
// // Copyright 2009-2014 Ilkka Oksanen <iao@iki.fi> // // 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 b...
JavaScript
0
@@ -656,16 +656,25 @@ servable +, autorun %7D from @@ -1684,16 +1684,114 @@ props); +%0A%0A autorun(() =%3E %7B%0A if (this.visible) %7B%0A this.newMessagesCount = 0;%0A %7D%0A %7D); %0A %7D%0A%0A
97eafcd2f76856e8430d68c5e5bfd0f3ab0e50c4
Add tests to generateLineHtml for LineByLine tests
test/line-by-line-tests.js
test/line-by-line-tests.js
var assert = require('assert'); var LineByLinePrinter = require('../src/line-by-line-printer.js').LineByLinePrinter; describe('LineByLinePrinter', function() { describe('_generateEmptyDiff', function() { it('should return an empty diff', function() { var lineByLinePrinter = new LineByLinePrinter({}); ...
JavaScript
0
@@ -590,16 +590,1610 @@ r%3E%5Cn';%0A%0A + assert.equal(expected, fileHtml);%0A %7D);%0A %7D);%0A describe('_generateLineHtml', function() %7B%0A it('should work for insertions', function() %7B%0A%0A var diffParser = require('../src/diff-parser.js').DiffParser;%0A var lineByLinePrinter = new Lin...
85ef02bbc1da5256615356a288198fb4778c49fb
disable blur features
newsanta/static/js/backend.js
newsanta/static/js/backend.js
var newsanta = newsanta || {}; newsanta.BLUR_RADIUS = 8; newsanta.CanvasBackend = function(options) { snowmachine.CanvasBackend.call(this, options); this.blur = options.blur || []; }; newsanta.CanvasBackend.prototype = Object.create(snowmachine.CanvasBackend.prototype); newsanta.CanvasBackend.prototype.render ...
JavaScript
0.000002
@@ -483,16 +483,18 @@ ) %7B%0A +// stackBlu @@ -547,24 +547,26 @@ .width,%0A +//
7dd65c88a9f250bf0531a92661445d63b66a5ffa
use a pending object to track custom IDs
packages/lib/Callback.js
packages/lib/Callback.js
"use import"; import std.js as JS; exports = Class(function() { this._fired = false; this._id = 0; this._pending = 0; this.init = function() { this._run = []; } this.fired = function() { return this._fired; } this.reset = function() { this._args = []; this._fired = false; } this.clear = function() { this.r...
JavaScript
0
@@ -12,30 +12,8 @@ %22;%0A%0A -import std.js as JS;%0A%0A expo @@ -92,17 +92,20 @@ nding = -0 +null ;%0A%09%0A%09thi @@ -193,16 +193,72 @@ ired; %7D +%0A%0A%09// preserve pending callbacks, but clear fired status %0A%09this.r @@ -321,129 +321,455 @@ ; %7D%0A -%09this.clear = function() %7B this.reset(); this._...
bb95c54cadffa4bb89d73613acbb56124e0056ae
bring in jquery
tour.js
tour.js
require(['//cdnjs.cloudflare.com/ajax/libs/intro.js/0.5.0/intro.min.js'], function(introJs) { var paths = window.tours; function getCurrentSteps() { var path = window.location.pathname; if (paths[path]) { return paths[path].steps; } for (path in paths) { ...
JavaScript
0
@@ -64,16 +64,26 @@ .min.js' +, 'jquery' %5D, funct @@ -93,16 +93,19 @@ (introJs +, $ ) %7B%0A
c8f8adaf7356ed34992e31f817ed4c1c0e70ead0
Change to handle null owner in single-question javascript transform fixes #312
database/transforms/single-question.sjs
database/transforms/single-question.sjs
/* transforms a single question document */ /* given an iterator of ids, get the reputations of these * and return a mapping of ids to reputations */ function joinReputation(owner) { var results = cts.search( cts.andQuery( [ cts.collectionQuery("com.marklogic.samplestack...
JavaScript
0
@@ -175,24 +175,210 @@ on(owner) %7B%0A + if (owner == undefined) %7B%0A return %7B %22id%22:%22unknown%22, %0A %22displayName%22:%22unknown%22, %0A %22userName%22:%22unknown%22,%0A %22reputation%22:0%0A %7D;%0A %7D%0A var resu
865076b4153c1d5ff54a6fd387b3167e4ca4664d
Split into _truncate private method
truncate.js
truncate.js
(function (module, undefined) { function getStyle(element, property) { return window.getComputedStyle(element)[property]; } function height(element) { // console.log(window.document.defaultView.getComputedStyle(element)); return element.clientHeight - parseFloat(getStyle(element, 'paddingTop')) - pa...
JavaScript
0.999934
@@ -2742,52 +2742,8 @@ %7D%0A%0A - this.originalHTML = this.originalHTML;%0A%0A @@ -2807,24 +2807,389 @@ ildNodes);%0A%0A + this._truncate(excludeRanges);%0A%0A this.element.style.visibility = 'visible';%0A %7D;%0A%0A Truncate.prototype.expand = function () %7B%0A this.element.innerHTML = this.or...
d5907ddb3cc8d52878f037e61159bce4965c4afa
Handle opening files directly from native OS
src/main/index.js
src/main/index.js
import app from 'app'; import { launchFilename, launchNewNotebook, } from './launch'; import { Menu } from 'electron'; import { defaultMenu, loadFullMenu } from './menu'; import { resolve } from 'path'; const program = require('commander'); const version = require('../../package.json').version; program .versi...
JavaScript
0
@@ -582,16 +582,119 @@ %7D%0A%7D);%0A%0A +app.on('open-file', (event, path) =%3E %7B%0A event.preventDefault();%0A launchFilename(resolve(path));%0A%7D);%0A%0A app.on('
ed9e30164bba21bed281b3d9e252b6ee5620a8d2
set eslint config
.eslintrc.js
.eslintrc.js
module.exports = { root: true, parser: "babel-eslint", parserOptions: { sourceType: "module" }, env: { browser: true, node: true }, "extends": [ "standard", "standard-react" ], "plugins": [ "babel", "react", "promise" ], rules: { "arrow-parens": 0, "generato...
JavaScript
0.000002
@@ -79,28 +79,91 @@ -sourceType: %22module%22 +ecmaVersion: 6,%0A sourceType: %22module%22,%0A ecmaFeatures: %7B%0A jsx: true%0A %7D %0A %7D
3bc4fcc0a75898df8c6c9b64754b47e794b0e232
remove debug codes
src/require.js
src/require.js
// Require Function // // Used by RCompile // (function () { /* Module references */ /* Local constants */ /* Local variables */ var _moduleAliases = {}, _moduleDefs = {}, _moduleObjs = {}, // key: full path resolved but not affixed, value: object _pathStack = [ '' ] ; ...
JavaScript
0.00018
@@ -1652,34 +1652,8 @@ = %7B%0A - abc: 123,%0A
43821ba4e535f75b47d8b652949165d35a7bb1dc
Add scene items for hamburger menu
traveller/App/Navigation/NavigationRouter.js
traveller/App/Navigation/NavigationRouter.js
import React, { Component } from 'react' import { Scene, Router } from 'react-native-router-flux' import Styles from './Styles/NavigationContainerStyle' import NavigationDrawer from './NavigationDrawer' import NavItems from './NavItems' import CustomNavBar from '../Components/CustomNavBar' // Screens Identified By The...
JavaScript
0.000001
@@ -1117,16 +1117,212 @@ ton%7D /%3E%0A + %3CScene key='travContainer' component=%7BTravContainer%7D title='Traveller' /%3E%0A %3CScene key='deviceInfo' component=%7BDeviceInfoScreen%7D title='Device Info' navBar=%7BCustomNavBar%7D /%3E%0A
de4dd25f65d174aebe2006725d598200ddda7944
Add `closeOnClick` to paper-sidenav
addon/components/paper-sidenav.js
addon/components/paper-sidenav.js
import Ember from 'ember'; import PaperNavContainer from './paper-nav-container'; export default Ember.Component.extend({ constants: Ember.inject.service(), tagName: 'md-sidenav', 'locked-open': 'gt-sm', closed: true, navContainer: Ember.computed(function () { return this.nearestOfType(PaperNavContaine...
JavaScript
0
@@ -220,16 +220,38 @@ d: true, +%0A closeOnClick: true, %0A%0A navC @@ -956,17 +956,16 @@ %0A %7D),%0A%0A -%0A didIns @@ -1523,32 +1523,61 @@ ick() %7B%0A if ( +!this.get('closeOnClick') %7C%7C this.get('isLock
cde4cb9347da25b70ca65f0894bca94c60c66eea
add attachments to general dc view
client/js/modules/types/gen/dc/dc.js
client/js/modules/types/gen/dc/dc.js
define([ 'modules/dc/views/dc', 'modules/types/gen/dc/datplot', 'modules/types/gen/dc/assoc', 'modules/types/gen/dc/imagestatusitem', 'modules/dc/views/dccomments', 'utils', 'tpl!templates/types/gen/dc/dc.html'], function(DCItemView, DatPlot, AssocSampleView, DCImageStatusItem, DCCommentsVi...
JavaScript
0
@@ -887,16 +887,61 @@ andler,%0A + 'click a.attach': 'attachments',%0A
1e2b1fa0dfc5d2253286adf533839bfac93f8256
fix relative path issue
public/controllers/controllers.js
public/controllers/controllers.js
var app = angular.module("hbase-dataflow-app", ["hbase-dataflow-app.services", "ui.bootstrap"]); app.controller("TableCtrl", function($scope, $modal, Table){ $scope.tables = Table.findAll(); $scope.createTable = function() { var name = prompt("Create a new table"); if(name){ var t = new Table(name)...
JavaScript
0.000001
@@ -1135,33 +1135,32 @@ templateUrl: %22 -/ includes/import_ @@ -1167,32 +1167,32 @@ tables_dialog%22,%0A + controller @@ -2109,33 +2109,32 @@ templateUrl: %22 -/ includes/create_ @@ -3346,33 +3346,32 @@ templateUrl: %22 -/ includes/update_ @@ -4630,32 +4630,32 @@ = $modal.open(%7B%0A + temp...
4f59b27bf38855c48a139a2ab6c6d6dd5af4c978
Disable line-ending rule, cries on Windows
.eslintrc.js
.eslintrc.js
module.exports = { 'extends': [ 'fbjs-opensource', 'prettier', ], 'plugins': [ 'flowtype', 'prettier', ], 'rules': { 'babel/no-await-in-loop': 0, 'camelcase': 0, 'flowtype/no-weak-types': 0, 'no-new': 0, 'prettier/prettier': [1, { 'bracketSpacing': false, 'jsxBr...
JavaScript
0.000001
@@ -235,24 +235,50 @@ no-new': 0,%0A + 'linebreak-style': 0,%0A 'prettie
8b89adbb252557823a92512dd866e8280cb79da0
Fix resolving .jsx for 'indico/...' paths
eslint-import-resolver.js
eslint-import-resolver.js
/* This file is part of Indico. * Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). * * Indico is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 3 of the * License...
JavaScript
0.000004
@@ -1313,16 +1313,24 @@ th, file +, config );%0A
81d19f700ffc99b55644310ba208b4ac30552a94
Declare a variable that should have been local.
jquery.flot.fillbetween.js
jquery.flot.fillbetween.js
/* Flot plugin for computing bottoms for filled line and bar charts. The case: you've got two series that you want to fill the area between. In Flot terms, you need to use one as the fill bottom of the other. You can specify the bottom of each data point as the third coordinate manually, or you can use this plugin to ...
JavaScript
0.000216
@@ -2615,16 +2615,19 @@ j = 0, l +, m ;%0A%0A
38526efd69b3070f980371f646b76c756ae95520
Remove ignoreMutation() from class
document/static/js/modules/editor/state_plugins/figure_menu.js
document/static/js/modules/editor/state_plugins/figure_menu.js
import {Plugin, PluginKey} from "prosemirror-state" import {DOMSerializer} from "prosemirror-model" import {FigureDialog} from "../dialogs" const key = new PluginKey('imageMenu') class FigureView { constructor(node, view, getPos, options) { this.node = node this.view = view this.getPos = ...
JavaScript
0.000001
@@ -165,12 +165,13 @@ ey(' -imag +figur eMen @@ -974,67 +974,8 @@ %7D -%0A%0A ignoreMutation(_record) %7B%0A return true%0A %7D%0A%0A %0A%7D%0A%0A
2141a16ae4666dd641de05bd166659c2a8724f0b
Fix issue with not filling in graph
www/static/chart.js
www/static/chart.js
if (typeof NCI === 'undefined') NCI = {}; // NCI.getChartHeight = function(){ // var chartHeight = $( window ).height()/2; // if ($( window ).width() < 400) { // chartWidth = 4*$( window ).width()/5; // chartHeight = $( window ).height()/3; // }; // return chartHeight; // }; ...
JavaScript
0.000001
@@ -2744,27 +2744,8 @@ ue,%0A -%09%09%09 yRangePad: 15,%0A %09%09%09
79ca23b130a75fdcd7147bd3b2ab2f2cf6aba7e2
Fix emails regEx
both/collections/invitations.js
both/collections/invitations.js
Invitations = new Mongo.Collection("invitations"); InvitationsSchema = new SimpleSchema({ emails: { type: [String], label: "E-mail address(es)", regex: SimpleSchema.RegEx.Email }, file: { type: String, autoform: { afFieldInput: { type: "fileUpload", collection: "Files", ...
JavaScript
0.000152
@@ -156,17 +156,17 @@ %0A reg -e +E x: Simpl
26c1eb52ccf472cbdfd0870575423e51ac0994f5
Allow multiple references per exercice.
ddoc/feverish/files/corrections-user.js
ddoc/feverish/files/corrections-user.js
/* globals $, MediumEditor */ $(function () { 'use strict' const score = function ($form, ponderation) { const ret = { ponderation: ponderation } $form.serializeArray().forEach(function (x) { ret[x.name] = x.value }) ret.note = parseFloat(ret.note) ret.ponderation = parseFloat(ret.ponderation) r...
JavaScript
0
@@ -427,28 +427,8 @@ Doc%0A - var referenceUser%0A va @@ -807,16 +807,17 @@ rue%0A %7D%0A +%0A const @@ -1125,833 +1125,63 @@ %5B0%5D%0A -%0A referenceUser = data.rows.filter(function (row) %7B%0A return row.doc.roles.indexOf('student') !== -1 &&%0A row.doc.corrections &&%0A row.doc.co...
b9df8e9716626a4a40c8f0c6c27232d3163f75a6
Correct property name
renderers/ane/question.js
renderers/ane/question.js
var lang; // Render a question Jsonary.render.register({ renderHtml: function (data, context) { result = '<div class="question">' + context.renderHtml(data.property("questionText"))+'</div>'; data.properties(['questionText', 'answers', 'image-answer'], false, function (key, subData) { result += '<div class="u...
JavaScript
0.003973
@@ -607,26 +607,25 @@ perty('image --a +A nswer'));%0A%09%09
5d9a94c940d048b65ec8bfc28484621ef5adb9e8
Fix the huge buffer spam
src/components/Player/components/Renderer.react.js
src/components/Player/components/Renderer.react.js
import React from 'react'; import path from 'path'; import wcjsRenderer from '../utils/wcjs-renderer'; import PlayerActions from '../actions'; import PlayerStore from '../store'; try { var wcjs = require(path.join(process.cwd(), 'resources/bin/', 'WebChimera.js.node')); } catch (e) { console.error('WCJS Load...
JavaScript
0.000624
@@ -96,16 +96,40 @@ nderer'; +%0Aimport _ from 'lodash'; %0A%0Aimport @@ -2341,91 +2341,43 @@ -this.player.onPositionChanged = (pos) =%3E %7B%0A PlayerActions.position(pos); +var initializeSize = _.once(() =%3E %7B %0A @@ -2553,33 +2553,32 @@ ;%0A %7D%0A -%0A %7D%0A%0A @...
abc220bc82d8797b45c7d79d53b4ece9cfc2d19b
Move profile button to right in navbar
client/components/Navbar.js
client/components/Navbar.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { withRouter, Link } from 'react-router-dom'; import { Menu, Icon } from 'semantic-ui-react'; import { logout } from '../store'; /* eslint-disable arrow-parens */ /* eslint-disable react/jsx-inde...
JavaScript
0
@@ -522,52 +522,8 @@ %7D,%0A - %7B url: '/profile', name: 'Profile' %7D,%0A @@ -767,183 +767,23 @@ -width: '145px',%0A minHeight: %603.5em%60,%0A height: %603.8em%60,%0A margin: 0,%0A top: 'auto',%0A right: 10,%0A left: 'auto',%0A position: 'fixed' +ma...
c341cf51a046f24c927da5a762beafdbad131ac6
Revert "test"
e2e-tests/protractor.conf.grunt.js
e2e-tests/protractor.conf.grunt.js
exports.config = { allScriptsTimeout: 11000000, specs: [ 'e2e-tests/tbHttpSpec.js' ], capabilities: { 'browserName': 'firefox' }, framework: 'jasmine', jasmineNodeOpts: { // High timeout interval for debugging purposes: defaultTimeoutInterval: 3000000 ...
JavaScript
0
@@ -82,18 +82,9 @@ sts/ -tbHttpSpec +* .js'
c54911346bded3ff8893271d703eed5e36b057e8
Update userChrome.jsm
chrome/utils/userChrome.jsm
chrome/utils/userChrome.jsm
let EXPORTED_SYMBOLS = []; let { classes: Cc, interfaces: Ci, utils: Cu } = Components; Cu.import('resource://gre/modules/Services.jsm'); Cu.import('resource://gre/modules/osfile.jsm'); function UserChrome_js() { Services.obs.addObserver(this, 'domwindowopened', false); }; UserChrome_js.prototype = { obse...
JavaScript
0.000001
@@ -93,104 +93,223 @@ s;%0A%0A -Cu.import('resource://gre/modules/Services.jsm');%0ACu.import('resource://gre/modules/osfile.jsm') +if (!'ChromeUtils' in this %7C%7C !'import' in ChromeUtils)%0A this.ChromeUtils = Cu;%0A%0AChromeUtils.import('resource://gre/modules/Services.jsm');%0AChromeUtils.import('chrome://userc...
e1708eb09a2f0e015bdb33e3d0978f920500e4aa
Fix up message.url equal blank case by using the stack frame
log/ConsoleEntry.js
log/ConsoleEntry.js
// See Purple/license.txt for Google BSD license // Copyright 2011 Google, Inc. johnjbarton@johnjbarton.com define(['lib/domplate/lib/domplate', 'log/ConsoleEntryRep'], function (domplate, ConsoleEntryRep) { function ConsoleEntry(message) { // http://code.google.com/chrome/devtools/docs/...
JavaScript
0.001603
@@ -395,12 +395,20 @@ -if ( +var stack = mess @@ -425,58 +425,322 @@ race -) %7B%0A this.message.stack = message.stackTrace; +;%0A if (stack && stack.length) %7B%0A this.message.stack = stack;%0A // inline scripts sometimes have a blank URL, use the stack for these.%0A if (!this.message....
d3e670b3ce8b149c4b1aae77e2644ca88ffd2b70
make example not rely on redux-actions
src/redux/modules/counter.js
src/redux/modules/counter.js
import { createAction, handleActions } from 'redux-actions'; import counterState from '../states/counterState'; // Create action types // these are just constants the must be in all caps and if the action type is // more than one word separate with an underscore ex: INCREMENT_COUNTER export const INCREMENT = 'INCREMEN...
JavaScript
0.000017
@@ -1,12 +1,288 @@ +// This file shows examples for writing reducers and action creators using both the redux-actions library%0A// and just writing them out explicitly. The method using the redux-actions module is commented out.%0A// comment in the following line if you want to use redux-actions%0A// import %7B cre @...
41c4ef657aa01e0f0c52335faf3298aa0eae283d
Remove focus set on page load - too bad on mobiles
client/search/general/general.js
client/search/general/general.js
// Search page // 'use strict'; const _ = require('lodash'); const querystring = require('querystring'); const bag = require('bagjs')({ prefix: 'nodeca' }); // An amount of search results to load in one request const LOAD_COUNT = 30; const OPTIONS_STORE_KEY = 'search_form_expanded'; // List of th...
JavaScript
0
@@ -1413,16 +1413,84 @@ 0;%0A%0A // + Don't set cursor on input - too many side effects on mobiles%0A /*// Set cur @@ -1636,16 +1636,18 @@ focus(); +*/ %0A%0A // L
e49011a7c2d599f7d54546f05a0efda0ed475ca9
Add check for firstTimeAttender in registration.
both/collections/registrants.js
both/collections/registrants.js
Registrants = new Meteor.Collection("registrants"); /* List of all monthly meetings and worship groups used for registrant meeting options */ var meetingArray = [ "Appleseed Meeting", "Berkeley Meeting", "Big Island Meeting", "Central Coast Meeting", "Conejo Valley Worship Group", "Chico Meetin...
JavaScript
0
@@ -4933,16 +4933,100 @@ ).value; +%0A registration.firstTimeAttender = this.field(%22firstTimeAttender%22).value; %0A%0A
0ac43e1e78318aa541005d068b3eb99154fa647f
Update config.js
app/scripts/config.js
app/scripts/config.js
require.iniConfig = { "general.app.foundation_url": "http://dev.ottemo.io:3000", "general.app.media_path": "media/", "themes.list.active": "blitz", // social networks "general.app.login.facebook.appId" : "728744980537129", "general.app.login.facebook.secretKey" : "58f763bd74fab043aa3b3c0221291c9...
JavaScript
0.000002
@@ -57,16 +57,30 @@ %22http:// +foundation.kg. dev.otte @@ -163,13 +163,16 @@ %22: %22 -blitz +karigran %22,%0A
cdf4721c3e38ccb4410d80b46627471d5f9c378e
clean up
client/components/editor.js
client/components/editor.js
/* global _ */ Template.editor.helpers({ owner: function () { return Session.get('isOwner') }, fileId: function () { return Session.get('fileId') }, filename: function () { return Files.findOne({ _id: Session.get('fileId') }).filename }, editors: function () { const editors = Edits.fin...
JavaScript
0.000001
@@ -1138,23 +1138,8 @@ %7D - else %7B%0A %7D %0A%0A
686aa3a3ebb04f31df292402dff3b8811b737a20
Resolve promise if `grecaptcha` already exists
src/service.js
src/service.js
/*global angular */ (function (ng) { 'use strict'; var app = ng.module('vcRecaptcha'); /** * An angular service to wrap the reCaptcha API */ app.service('vcRecaptchaService', ['$timeout', '$window', '$q', function ($timeout, $window, $q) { var deferred = $q.defer(), promise = deferre...
JavaScript
0
@@ -814,32 +814,190 @@ %7D%0A %7D%0A%0A +%0A // Check if grecaptcha is not defined already.%0A if (ng.isDefined($window.grecaptcha)) %7B%0A $window.vcRecapthaApiLoaded();%0A %7D%0A%0A return %7B
0c3fa5b30d4a77af60099ef14620635adec94c03
Adjust eslint
.eslintrc.js
.eslintrc.js
module.exports = { "env": { "browser": true, "es6": true, "jquery": true }, "extends": "eslint:recommended", "parserOptions": { "sourceType": "module" }, "rules": { "indent": [ "error", 2 ], "linebreak-style": 'off', "quotes": [ "error", "single" ]...
JavaScript
0.999449
@@ -84,17 +84,40 @@ rue%0A %7D, + %0A %22globals%22: %7B %0A %7D, %0A - %22exten @@ -220,39 +220,32 @@ %22indent%22: %5B -%0A %22error%22, %0A 2%0A @@ -236,21 +236,73 @@ or%22, -%0A 2%0A + 2 %5D,%0A %22no-unused-vars%22: %5B1, %7B%22vars%22: %22local%22, %22args%22: %22none%22%7D...
c096504360146fdb656836c5c77f37864bb68780
add flow types to `src/message-io.js`
src/message-io.js
src/message-io.js
const tls = require('tls'); const crypto = require('crypto'); const DuplexPair = require('native-duplexpair'); const EventEmitter = require('events').EventEmitter; const TYPE = require('./packet').TYPE; const Message = require('./message'); const IncomingMessageStream = require('./incoming-message-stream'); const Out...
JavaScript
0
@@ -1,12 +1,191 @@ +// @flow%0A%0A/* globals $Values */%0A%0Aimport type Debug from './debug';%0Aimport type %7B Duplex %7D from 'stream';%0Aimport type %7B TLSSocket %7D from 'tls';%0Aimport type %7B Socket %7D from 'net';%0A%0A const tls = @@ -288,16 +288,18 @@ );%0Aconst + %7B EventEm @@ -303,16 +303,17 @@ tEm...
749a56f85b089bfde53db486c50fcd89dbd63dcf
Clarify urlQueryReducer is not a redux reducer
src/redux/urlQueryReducer.js
src/redux/urlQueryReducer.js
import { replaceInUrlQueryFromAction, replaceUrlQueryFromAction, pushInUrlQueryFromAction, pushUrlQueryFromAction, } from './updateUrlQueryFromAction'; import UrlUpdateTypes from '../UrlUpdateTypes'; /** * Reducer that handles actions that modify the URL query parameters. * In this case, the actions replace ...
JavaScript
0.006393
@@ -349,16 +349,187 @@ a time.%0A + *%0A * NOTE: This is *NOT* a Redux reducer. It does not map from (state, action) -%3E state.%0A * Instead it %22reduces%22 actions into URL query parameter state. NOT redux state.%0A */%0Aexpo
af054eee1b7976bb91ed612710b410ee22764dd5
use gl drawingbuffer size as viewport size
browser/src/render/ViewState.js
browser/src/render/ViewState.js
'use strict' import YUVSurfaceShader from './YUVSurfaceShader' import Texture from './Texture' import Size from '../Size' export default class ViewState { /** * * @returns {ViewState} */ static create (view, size) { let gl = view.canvas.getContext('webgl') if (!gl) { throw new Error('This b...
JavaScript
0.000001
@@ -1071,27 +1071,58 @@ his. -size.w, this.size.h +gl.drawingBufferWidth, this.gl.drawingBufferHeight )%0A
efdbbb43a06fa3b9280a3f0e13af5302f76d21c7
Allow "Inspect Element" in non-dev
main.development.js
main.development.js
import { app, BrowserWindow, Menu, shell } from 'electron'; let menu; let template; let mainWindow = null; if (process.env.NODE_ENV === 'development') { require('electron-debug')(); // eslint-disable-line global-require } app.on('window-all-closed', () => { if (process.platform !== 'darwin') app.quit(); }); ...
JavaScript
0.000478
@@ -1280,24 +1280,27 @@ vTools();%0A +%7D%0A%0A mainWindow @@ -1351,18 +1351,16 @@ %3E %7B%0A - const %7B @@ -1376,18 +1376,16 @@ props;%0A%0A - Menu @@ -1404,34 +1404,32 @@ mplate(%5B%7B%0A - - label: 'Inspect @@ -1436,34 +1436,32 @@ element',%0A - click() %7B%0A @@ -1...
0c0083fa048db6b6b9c6aecebdad640d83e5f7b7
fix imports
app/services/login.js
app/services/login.js
//constants import * as restConstants from '../constants/rest' //helper import {callApi} from '../helpers/api' export const fetchToken = (form_data) => { let headers = new Headers(); headers.append('Accept', 'application/json'); headers.append('Origin', '*'); headers.append('Cache-Control', 'no-cach...
JavaScript
0.000002
@@ -16,26 +16,60 @@ ort -* as restConstants +%7BAPI_ENDPOINT, APPLICATION_TYPE, RESOURCES, METHODS%7D fro @@ -387,30 +387,16 @@ -Type', -restConstants. APPLICAT @@ -476,30 +476,16 @@ url: -restConstants. API_ENDP @@ -491,30 +491,16 @@ POINT + -restConstants. RESOURCE @@ -534,22 +534,8 @@ rb: -restCons...
09db70ccfde6d9d37a4b3e69069233186b28c1b8
Remove unused mutation call
client/src/store/modules/projects.js
client/src/store/modules/projects.js
import marked from 'marked' import { getWhileNext } from '../../api/http' import { formatDate, groupByFirstCharacter } from '../../utils' import projectsApi from '../../api/projects' const state = { current: null, byIds: {}, } const getters = { findById (state, getters, rootState, rootGetters) { return i...
JavaScript
0.000001
@@ -3921,34 +3921,24 @@ hen((res) =%3E - %7B%0A commit('set @@ -3953,78 +3953,8 @@ ata) -%0A commit('setNumberFinished', state.numberFinished + 1)%0A %7D )%0A
38b5677525fcf1853f4fc4086d9aac3fced2dc40
Disable no-new-mixins eslint rule
.eslintrc.js
.eslintrc.js
module.exports = { root: true, parserOptions: { ecmaVersion: 2018, sourceType: 'module' }, plugins: [ 'ember' ], extends: [ 'eslint:recommended', 'plugin:ember/recommended' ], env: { browser: true }, rules: { }, overrides: [ // node files { files: [ ...
JavaScript
0.000001
@@ -246,16 +246,49 @@ ules: %7B%0A + 'ember/no-new-mixins': 'off'%0A %7D,%0A o
e581692f6e92ebca9fde4bc745c58c6722bbca4f
simplify parabola in Explore screen icon #20
js/common/view/GQIconFactory.js
js/common/view/GQIconFactory.js
// Copyright 2018, University of Colorado Boulder //TODO #11 design screen icons /** * Creates icons for this sim. * * @author Chris Malley (PixelZoom, Inc.) */ define( require => { 'use strict'; // modules const BooleanProperty = require( 'AXON/BooleanProperty' ); const GQColors = require( 'GRAPHING_QUAD...
JavaScript
0
@@ -214,69 +214,8 @@ les%0A - const BooleanProperty = require( 'AXON/BooleanProperty' );%0A co @@ -275,24 +275,24 @@ QColors' );%0A + const GQCo @@ -702,75 +702,43 @@ nst -ModelViewTransform2 = require( 'PHETCOMMON/view/ModelViewTransform2 +Path = require( 'SCENERY/nodes/Path ' ); @@ -797,55 +797,8 @@ );%...
b7e1a587dc6ca6b390542106d8c0439477ea5144
Allow for typescript in API/WSAPI files.
server/routes.js
server/routes.js
import koaConvert from 'koa-convert' import koaStatic from 'koa-static' import KoaRouter from '@koa/router' import httpErrors from 'http-errors' import path from 'path' import fs from 'fs' import logger from './lib/logging/logger' import { getCspNonce } from './lib/security/csp' const router = KoaRouter() const jsFile...
JavaScript
0
@@ -309,16 +309,20 @@ const js +OrTs FileMatc @@ -357,18 +357,23 @@ bind(/%5C. +( js +%7Cts) $/)%0A%0Afun @@ -710,16 +710,20 @@ ilter(js +OrTs FileMatc @@ -811,13 +811,30 @@ me, -'.js' +path.extname(filename) )%0A
1e4be418218509ca41607e276492d39d96c5ea73
Fix bug that was switching the types of the ids to always string
src/middleware.js
src/middleware.js
import get from 'lodash/get'; import v4 from 'uuid/v4'; import { normalize } from 'normalizr'; import { getEntitiesSlice } from './selectors'; import { arrayFrom } from './utils'; // UTILS {{{ function normalizeData(schema, data) { const dataWithIds = arrayFrom(data).map((e) => e.id ? e : { ...e, id: v4() }); re...
JavaScript
0
@@ -155,16 +155,21 @@ rrayFrom +, log %7D from @@ -524,16 +524,86 @@ %5D,%0A + id: entitiesAndKey.entities%5Bid%5D.id ? entitiesAndKey.entities%5Bid%5D.id : id,%0A @@ -1581,32 +1581,46 @@ nFirst(schema))%0A + .map(log)%0A .map((payloa
28aac452d975dc73480b314d8e5d01e95882e8ad
Add dash to comment
public/js/application.js
public/js/application.js
$(document).ready(function() { // This is called after the document has loaded in its entirety // This guarantees that any elements we bind to will exist on the page // when we try to bind to them // See: http://docs.jquery.com/Tutorials:Introducing_$(document).ready() $(".form-answer form").on("submit", f...
JavaScript
0
@@ -819,16 +819,23 @@ .append( +%22- %22 + input_co
331b5024fb5b0ac2cb4a1a6dfa2dba1ef8d50ee8
Remove ESLint rules concerning spacing
.eslintrc.js
.eslintrc.js
// Copyright 2020 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. const path = require('path'); const rulesDirPlugin = require('eslint-plugin-rulesdir'); rulesDirPlugin.RULES_DIR = path.join(__dirname, 'scripts', 'eslint...
JavaScript
0.999448
@@ -2322,522 +2322,8 @@ %5D,%0A%0A - // spacing details%0A 'space-infix-ops': 2,%0A 'space-in-parens': %5B2, 'never'%5D,%0A 'no-whitespace-before-property': 2,%0A 'keyword-spacing': %5B%0A 2, %7B%0A 'overrides': %7B%0A 'if': %7B'after': true%7D,%0A 'else': %7B'after': true%...
c81bacb9f413e2d70d253460472b21c1d3036642
Add chapter 2, exercise 1
eloquent_js/chapter02/ch02_ex01.js
eloquent_js/chapter02/ch02_ex01.js
let str = ""; for (let i = 0; i < 7; ++i) { str += "#"; console.log(str) } // Nicer solution: use loop like // for (let str = "#"; str.length < 8; str += "#")
JavaScript
0.020608
@@ -1,68 +1,49 @@ +for ( let s -tr = %22 +# %22; -%0Afor (let i = 0; i %3C 7; ++i) %7B%0A str + s.length %3C 8; s += %22#%22 -;%0A +) %7B%0A%09 cons @@ -55,95 +55,9 @@ og(s -tr)%0A%7D%0A%0A// Nicer solution: use loop like%0A// for (let str = %22#%22; str.length %3C 8; str += %22#%22) +);%0A%7D %0A
ebe4969c51c0bda7a3f6e90f02958ca31ec02b9c
Add livereload back into dev-site task.
gulpfile.js
gulpfile.js
var SITE_DIR = './famous-angular-docs/'; var SITE_DIR_RELATIVE = '/famous-angular-docs/'; var EXPRESS_PORT = 4000; var EXPRESS_ROOT = __dirname + '/app'; var EXPRESS_DOCS_ROOT = __dirname + SITE_DIR_RELATIVE + '_site'; var LIVERELOAD_PORT = 35729; // Load plugins var gulp = require('gulp'), sass = require('gulp-ru...
JavaScript
0
@@ -3940,62 +3940,19 @@ nd)) -;%0A%7D);%0A%0Agulp.task('live-reload', function() %7B%0A return +%0A .pipe( live @@ -3965,16 +3965,17 @@ (server) +) ;%0A%7D);%0A%0A/ @@ -4400,49 +4400,104 @@ - // -This might go over the watch limit%0A%09 +because .styl compiles into .css, do not watch .css, else you w...
1bffb0289b01bb9173b362775c6d21bc14e6a471
Use second callback to then instead of catch
src/middleware.js
src/middleware.js
import createLocalStorageStore from './storage/localStorage' import { AUTHENTICATE } from './actionTypes' import { authenticateFailed, authenticateSucceeded, restore } from './actions' const createAuthMiddleware = (config = {}) => { const storage = config.storage || createLocalStorageStore() const authenticators =...
JavaScript
0
@@ -1343,29 +1343,10 @@ %7D -)%0A .catch( +, () =
0eaade64c3d8d06fbe430f3356bf23ca6747b220
Add Promise for node 0.10 testing
test/source/unfold-test.js
test/source/unfold-test.js
require('buster').spec.expose(); var expect = require('buster').expect; var unfold = require('../../lib/source/unfold').unfold; var take = require('../../lib/combinator/slice').take; var observe = require('../../lib/combinator/observe').observe; var sentinel = { value: 'sentinel' }; var other = { value: 'other' }; d...
JavaScript
0
@@ -239,16 +239,60 @@ observe; +%0Avar Promise = require('../../lib/Promise'); %0A%0Avar se
188881058df3189af7e4530b7088bd91ea8f0282
rename genome name column
public/js/p3/widget/GenomeGrid.js
public/js/p3/widget/GenomeGrid.js
define([ "dojo/_base/declare","dijit/layout/BorderContainer","dojo/on", "dojo/dom-class","dijit/layout/ContentPane","dojo/dom-construct", "./PageGrid","./formatter" ], function( declare, BorderContainer, on, domClass,ContentPane,domConstruct, Grid,formatter ){ return declare([Grid], { region: "center", query...
JavaScript
0.000063
@@ -581,32 +581,30 @@ e: %7Blabel: %22 -Organism +Common Name%22, fiel @@ -656,32 +656,30 @@ e: %7Blabel: %22 -Organism +Genome Name%22, fiel
cb4dd7b5116678e1f5cd1fe6b79d5ef2cda72607
Add zoom options to playground
playground/playground.js
playground/playground.js
window.onload = function() { // Lots of global variables to make debugging easier var vm = new window.VirtualMachine(); window.vm = vm; var toolbox = document.getElementById('toolbox'); var workspace = window.Blockly.inject('blocks', { toolbox: toolbox, media: '../node_modules/scrat...
JavaScript
0
@@ -332,16 +332,125 @@ edia/',%0A + zoom: %7B%0A controls: true,%0A wheel: true,%0A startScale: 0.75%0A %7D,%0A