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 |
|---|---|---|---|---|---|---|---|
275e7d1aaba2a4d88f68e5df926ff5fcb7c4c396 | add missing var statement | index.js | index.js | var fs = require('fs')
, findExec = require('find-exec')
, child_process = require('child_process')
, players = [
'mplayer',
'afplay',
'mpg123',
'mpg321',
'play... | JavaScript | 0.000001 | @@ -778,16 +778,20 @@
)%7B%7D%0A
+var
isURL =
|
44ce967ed6172f83682f89e9a8c1168382241e1e | add query remainder check | share/spice/news/news.js | share/spice/news/news.js | function ddg_spice_news(apiResult) {
"use strict";
// Words that we have to skip in DDG.isRelevant.
var skip = [
"news",
"headline",
"headlines",
"latest",
"breaking",
"update",
"s:d",
"sort:date"
];
// Some sources need to be set by ... | JavaScript | 0 | @@ -1221,18 +1221,8 @@
one
- word from
%0A
@@ -1228,16 +1228,26 @@
//
+ word from
each en
@@ -1251,18 +1251,63 @@
entity
-to
+(and the rest of the query words) to%0A //
be good
@@ -1358,16 +1358,27 @@
of check
+%0A //
though.
@@ -1467,24 +1467,57 @@
ngth %3E 0) %7B%0A
+ ... |
64561d1f853949d4dc52168d104dfacdc03cac41 | add getCmd() and getRspCode() APIs | index.js | index.js | 'use strict';
var fs = require('fs'),
Enum = require('enum'),
_defs = JSON.parse(fs.readFileSync(__dirname + '/defs/defs.json', { encoding: 'utf8' })),
_specificRid = _defs.specificRid,
DEFS = {
_defs: _defs,
RspCode: null,
Cmd: null,
Oid: null,
UniqueRid: null,
... | JavaScript | 0.000001 | @@ -1282,24 +1282,445 @@
**********/%0A
+DEFS.getCmd = function (cmdId) %7B%0A if (typeof cmdId !== 'number' && typeof cmdId !== 'string')%0A throw new TypeError('cmdId should be type of string or number.');%0A%0A return this.Cmd.get(cmdId);%0A%7D;%0A%0ADEFS.getRspCode = function (code) %7B%0A if (type... |
e6d77fe9d269abae2fe30cd72e61f9868fc98ed3 | fix misnamed test | test/unit/domain/extended-validation.test.js | test/unit/domain/extended-validation.test.js | require('../../support');
var expect = require('chai').expect;
var loopback = require('loopback');
var ItemSchema = require('../../../lib/domain/item-schema');
var extendedValidation = require('../../../lib/domain/extended-validation');
var app = loopback();
app.set('restApiRoot', '/api');
describe('ItemSchema exte... | JavaScript | 0.999157 | @@ -2423,32 +2423,36 @@
it('should
+not
be detected', fu
|
56077931898a7e27a001707f71d80ec49f104faf | Remove newline | lib/node_modules/@stdlib/math/index.js | lib/node_modules/@stdlib/math/index.js | 'use strict';
// MODULES //
var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
// STDMATH //
var stdmath = {};
setReadOnly( stdmath, 'base', {} );
// Constants:
setReadOnly( stdmath, 'FLOAT64_PI', require( '@stdlib/math/constants/float64-pi' ) );
setReadOnly( stdmath, 'FLOAT64_TWO_PI', requir... | JavaScript | 0.000073 | @@ -1685,17 +1685,16 @@
' ) );%0A%0A
-%0A
setReadO
|
2069dda89641903bd52688ca0d1ba3b35f084328 | add back indents from over-zealous editor configuration | index.js | index.js | var through = require('through');
var browserify = require('browserify');
var chokidar = require('chokidar');
module.exports = watchify;
watchify.browserify = browserify;
function watchify(opts) {
if (!opts) opts = {};
var b = typeof opts.bundle === 'function' ? opts : browserify(opts);
var cache = {};
... | JavaScript | 0.000001 | @@ -483,17 +483,21 @@
= true;%0A
+
%0A
-
if (
@@ -590,25 +590,29 @@
alse;%0A %7D%0A
+
%0A
-
if (opts
@@ -694,17 +694,21 @@
;%0A %7D%0A
+
%0A
-
b.on
@@ -776,25 +776,29 @@
kg;%0A %7D);%0A
+
%0A
-
b.on('de
@@ -859,17 +859,21 @@
%7D);%0A
+
%0A
-
func
@@ -9... |
92e24d8d67bc672368fb13f7436ee24e04695d3e | Update namespace | lib/node_modules/@stdlib/math/iter/lib/index.js | lib/node_modules/@stdlib/math/iter/lib/index.js | /**
* @license Apache-2.0
*
* Copyright (c) 2019 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | JavaScript | 0.000001 | @@ -1275,32 +1275,212 @@
r/divide' ) );%0A%0A
+/**%0A* @name iterMod%0A* @memberof ns%0A* @readonly%0A* @type %7BFunction%7D%0A* @see %7B@link module:@stdlib/math/iter/mod%7D%0A*/%0AsetReadOnly( ns, 'iterMod', require( '@stdlib/math/iter/mod' ) );%0A%0A
/**%0A* @name iter
|
238602097e48ab7098b1ed478b13427e114bf80b | Use `new Error()` when throwing. | src/Native/WebAPI/Document.js | src/Native/WebAPI/Document.js | Elm.Native = Elm.Native || {};
Elm.Native.WebAPI = Elm.Native.WebAPI || {};
Elm.Native.WebAPI.Document = Elm.Native.WebAPI.Document || {};
Elm.Native.WebAPI.Document.make = function (localRuntime) {
localRuntime.Native = localRuntime.Native || {};
localRuntime.Native.WebAPI = localRuntime.Native.WebAPI || {};
... | JavaScript | 0 | @@ -1000,16 +1000,26 @@
throw
+new Error(
%22Got unr
@@ -1072,16 +1072,17 @@
adyState
+)
;%0A
|
d4fc5c200698ebe5d25763b6630f28be9b2b49c0 | fix for node 0.10 | test/cli.js | test/cli.js | "use strict";
var test = require("tape");
var parse = require("../");
var spawn = require("child_process").spawn;
var spawnSync = require("child_process").spawnSync;
var fs = require("fs");
/* Test the CLI API functions as expected, not interested in correct output here */
try{
fs.mkdirSync("tmp");
} catch(err){
... | JavaScript | 0.000001 | @@ -111,60 +111,8 @@
wn;%0A
-var spawnSync = require(%22child_process%22).spawnSync;%0A
var
@@ -852,20 +852,16 @@
= spawn
-Sync
(%0A
@@ -1002,16 +1002,55 @@
%0A );%0A
+ handle.on(%22close%22, function()%7B%0A
var
@@ -1084,24 +1084,28 @@
src.json%22);%0A
+
t.equal(
@@ -1132,12 +113... |
06427d663d0b2669ccc77748fed701e46ec807b3 | Add support for playing gifs on mouse enter/leave | src/skins/vector/views/molecules/MImageTile.js | src/skins/vector/views/molecules/MImageTile.js | /*
Copyright 2015 OpenMarket Ltd
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 to in writing, software
... | JavaScript | 0 | @@ -2333,24 +2333,799 @@
%7D%0A %7D,%0A%0A
+ _isGif: function() %7B%0A var content = this.props.mxEvent.getContent();%0A return (content && content.info && content.info.mimetype === %22image/gif%22);%0A %7D,%0A%0A onImageEnter: function(e) %7B%0A if (!this._isGif()) %7B%0A ... |
f7e630cf2b887fa38eac1ab8c35a66b59ddd56e1 | add & condense init tests | test/cli.js | test/cli.js | /* eslint node/no-unsupported-features: 0 */
import fs from 'fs';
import {resolve} from 'path';
import write from 'temp-write';
import readPkg from 'read-pkg';
import execa from 'execa';
import test from 'ava';
global.Promise = Promise;
const cli = resolve('../exbox.js');
const ver = readPkg.sync('..').version;
cons... | JavaScript | 0.000001 | @@ -1800,26 +1800,16 @@
box.init
-: debugger
', async
@@ -1808,32 +1808,32 @@
', async t =%3E %7B%0A
+
%09const out = awa
@@ -1860,24 +1860,24 @@
%5B'init'%5D);%0A
-
%09t.is(out, '
@@ -1904,16 +1904,167 @@
ExBox!'
+, 'debugger');%0A%0A%09t.true(fs.existsSync(HOME), '%60homedir%60 exists');%0A%0A%09const files ... |
5d6a3401b2900e7d69399676ff3cd1c4b4e0d57c | set as undefined | index.js | index.js | module.exports = function (max) {
if (!max) throw Error('hashlru must have a max value, of type number, greater than 0')
var size = 0, cache = Object.create(null), _cache = Object.create(null)
function update (key, value) {
cache[key] = value
size ++
if(size >= max) {
size = 0
_cache = ... | JavaScript | 0.999875 | @@ -418,37 +418,61 @@
urn
-key in cache %7C%7C key in _cache
+cache%5Bkey%5D !== undefined %7C%7C _cache%5Bkey%5D !== undefined
%0A
@@ -517,23 +517,33 @@
if(
-key in cache) %7B
+cache%5Bkey%5D !== undefined)
%0A
@@ -547,23 +547,16 @@
-delete
cache%5Bke
@@ -561,57 +561,88 @@
key%5D
-%0A s... |
1de4f63dd08e4472680e0c389a827994857a334b | replace request invalid return false with if block | handlers/receive/handler.js | handlers/receive/handler.js | 'use strict'
const database = require('../../lib/database/database')
const log = require('../../lib/utility/log')
const route = require('../../lib/http/route')
const request = require('./request')
module.exports.handle = (event, context, callback) => {
let data = request.getParams(event)
if (!request.isValid(data... | JavaScript | 0.000478 | @@ -296,9 +296,8 @@
if (
-!
requ
@@ -329,21 +329,12 @@
k))
-return false%0A
+%7B%0A
da
@@ -350,24 +350,26 @@
t(data)%0A
+
.then(() =%3E
@@ -410,16 +410,18 @@
mail'))%0A
+
.the
@@ -485,16 +485,18 @@
k))%0A
+
.catch(f
@@ -509,24 +509,26 @@
n (error) %7B%0A
+
log.er
@@ -584,16 +... |
33c2c4aacb62c17718dde8f66d7ba1a8afac008c | Improve wording in tz selector | indico/htdocs/js/indico/Common/TimezoneSelector.js | indico/htdocs/js/indico/Common/TimezoneSelector.js | /* This file is part of Indico.
* Copyright (C) 2002 - 2017 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 | @@ -2587,22 +2587,26 @@
TZRadio,
+ ' ',
$T(%22
-
Use the
@@ -2614,16 +2614,17 @@
vent
-s' local
+/category
tim
@@ -2628,17 +2628,16 @@
timezone
-
%22)));%0A
@@ -2752,22 +2752,26 @@
TZRadio,
+ ' ',
$T(%22
-
Your sav
@@ -2929,14 +2929,18 @@
dio,
+ ' ',
$T(%22
-
Spec
|
5b0e2fce9ff611ea575e50a264db25ce3d7a5801 | fix naming in tests | tests/unit/components/frost-action-bar-test.js | tests/unit/components/frost-action-bar-test.js | import {expect} from 'chai'
import {unit} from 'ember-test-utils/test-support/setup-component-test'
import {beforeEach, describe, it} from 'mocha'
const test = unit('frost-action-bar')
describe(test.label, function () {
test.setup()
let component, button212, button28, onClick, disabled
beforeEach(function () ... | JavaScript | 0.000038 | @@ -1352,38 +1352,39 @@
hould convert a
-button
+control
to a POJO', fun
@@ -1682,33 +1682,39 @@
mponent
-is a frost button
+has an onClick property
', funct
@@ -1838,37 +1838,49 @@
mponent
-i
+doe
s not
-a frost button
+have an onClick property
', funct
@@ -2454,25 +2454,31 @@
ent
-is a frost button
+has... |
8b61cb1d8fc1790b53c64af79b27590e5324d431 | Update {id}.js | handlers/strategery/{id}.js | handlers/strategery/{id}.js | 'use strict';
var repository = require('../../lib/strategeryRepository');
module.exports = {
get: function getStrategery(req, res) {
res.json(repository.get(req.params['id']));
}
};
| JavaScript | 0.000019 | @@ -114,12 +114,9 @@
ion
-getS
+s
trat
@@ -120,16 +120,24 @@
rategery
+_getById
(req, re
|
1b37e643861efb970b21be36d026c7e8d34be839 | fix test | tests/integration/components/bs-alert-test.js | tests/integration/components/bs-alert-test.js | import { setupRenderingTest } from 'ember-qunit';
import { module, test } from 'qunit';
import { hbs } from 'ember-cli-htmlbars';
import { click, render, settled } from '@ember/test-helpers';
module('Integration | Component | bs-alert', (hooks) => {
setupRenderingTest(hooks);
test('check has button', async functi... | JavaScript | 0.000002 | @@ -1019,37 +1019,16 @@
%7D /%3E%60);%0A
- await settled();%0A
awai
|
e6cac70e1cc48e9105336e17fc7894860c716f0a | Stop failing spec | node/spec/lib/memorize_spec.js | node/spec/lib/memorize_spec.js | describe('Memorize', function() {
describe('when setting it on beforeAll ', function() {
beforeAll(function() {
this.memorize('object', function() {
return { id: 1 };
});
this.memorize('object2', { id: 2 });
this.memorize({
object3: function() {
return { id: 3 }... | JavaScript | 0.000002 | @@ -3745,24 +3745,25 @@
%7D);%0A%0A
+x
it('does not
|
2cc1d990d0713e95d8a98add3daea75f43ecd67e | Remove console.log in integration test | tests/integration/ember-table-jsonapi-test.js | tests/integration/ember-table-jsonapi-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
let bindModel = [
{
id: 1,
username: 'YippieKiYay',
emailAddress: 'john.mcclane@domain.com',
firstName: 'John',
lastName: 'McClane',
isAdmin: true,
createdAt... | JavaScript | 0.000001 | @@ -4549,44 +4549,8 @@
();%0A
- console.log($component.html());%0A
|
ae011be11cb0e0287d922b7781afca85739d0f12 | Change approach to solution | sieve-of-eratosthenes.js | sieve-of-eratosthenes.js | // Sieve of Eratosthenes
/*RULES:
Function takes one parameter
Return an array of all prime numbers from 0-parameter
*/
/*PSEUDOCODE:
1) Find square root of parameter
2) Create an array of numbers from 0-parameter
3) Loop through numbers, but stop until square root (if a float, stop after number rounded up?... | JavaScript | 0 | @@ -417,50 +417,120 @@
var
-arr = %5B...Array(num + 1)%5D.map((x, i) =%3E i)%0A%0A
+primes = %5B%5D;%0A%0A for (var i = 0; i %3C= n; i++)%7B%0A primes%5Bi%5D = true;%0A %7D%0A%0A primes%5B0%5D = false;%0A primes%5B1%5D = false;
%0A%7D
|
cb801116ac2dd2b41bfca39a3a5c20c6e2aedcf2 | update FormWidget doc | FormWidget.js | FormWidget.js | /** @module delite/FormWidget */
define([
"dcl/dcl",
"./Widget"
], function (dcl, Widget) {
/**
* Base class for widgets that extend `HTMLElement`, but conceptually correspond
* to native HTML elements such as `<checkbox>` or `<button>`,
* which can be children of a `<form>` node.
*
* Note that FormWidget... | JavaScript | 0 | @@ -714,38 +714,8 @@
ing%7D
- module:delite/FormWidget.name
%0A%09%09
@@ -828,37 +828,8 @@
ing%7D
- module:delite/FormWidget.alt
%0A%09%09
@@ -941,39 +941,8 @@
ing%7D
- module:delite/FormWidget.value
%0A%09%09
@@ -1062,42 +1062,8 @@
ber%7D
- module:delite/FormWidget.tabIndex
%0A%09%09
@@ -1114,14 +1114,17 @... |
b58db34df5c20bc91fa6b7cc99f9171f96514775 | simplify the dropdown options | site/src/pages/Buttons.js | site/src/pages/Buttons.js | /* eslint no-script-url: 0 */
var React = require('react');
var { Dropdown, Tooltip, Button, ButtonGroup } = require('elemental');
const DROPDOWN_OPTIONS = [
{ type: 'item', anchor: 'javascript:;', label: 'Action' },
{ type: 'item', anchor: 'javascript:;', label: 'Another action' },
{ type: 'item', anchor: 'javasc... | JavaScript | 0.999127 | @@ -160,173 +160,59 @@
%0A%09%7B
-type: 'item', anchor: 'javascript:;', label: 'Action' %7D,%0A%09%7B type: 'item', anchor: 'javascript:;', label: 'Another action' %7D,%0A%09%7B type: 'item', anchor: 'javascript:;',
+label: 'Action' %7D,%0A%09%7B label: 'Another action' %7D,%0A%09%7B
lab
@@ -313,48 +313,10 @@
%7D... |
b16608083a31decb9ba9fd66891ea47bb6a6b876 | using object literal | index.js | index.js |
var fs = require('fs')
, path = require('path')
, Chain = require('traverse-chain');
/**
* Outline the APIs.
*/
var find = module.exports = {
// file: function(pat, root, callback) {}
// dir: function(pat, root, callback) {}
// eachfile: function(pat, root, action) {}
// eachdir: functi... | JavaScript | 0.999122 | @@ -1142,24 +1142,12 @@
urn
-Object.prototype
+(%7B%7D)
.toS
|
8c4d2648d8b6111be3c01e22ef2407a9a0085763 | Send role in body with token | api/controllers/token.js | api/controllers/token.js | 'use strict';
const tokenize = require('../services/tokenize');
module.exports.new=function *(){
const token = tokenize.sign(this.state.user);
this.body={
token: token,
_id: this.state.user._id
};
};
| JavaScript | 0 | @@ -199,16 +199,48 @@
user._id
+,%0A role: this.state.user.role
%0A %7D;%0A%7D;
|
8dcd5de54d29b1395153f7ccb3ccc8019e6249d5 | Fix eslint warnings | src/helpers/gather-os-metrics.js | src/helpers/gather-os-metrics.js | const pidusage = require('pidusage');
const os = require('os');
const v8 = require('v8');
const sendMetrics = require('./send-metrics');
const debug = require('debug')('express-status-monitor');
let eventLoopStats;
try {
eventLoopStats = require('event-loop-stats');
} catch (error) {
console.warn('event-loop-stat... | JavaScript | 0.000013 | @@ -208,16 +208,39 @@
opStats;
+ // eslint-disable-line
%0A%0Atry %7B%0A
@@ -286,16 +286,39 @@
stats');
+ // eslint-disable-line
%0A%7D catch
|
ff9007606bf900314d07c7052de73c2cc6fed377 | fix typo | test/run.js | test/run.js | var showdown = new require('../src/showdown'),
fs = require('fs'),
path = require('path'),
should = require('should');
var runTestsInDir = function(dir, converter) {
// Load test cases from disk
var cases = fs.readdirSync(dir).filter(function(file){
return ~file.in... | JavaScript | 0.999991 | @@ -2455,16 +2455,17 @@
ut sourc
+e
file (%22
@@ -2698,8 +2698,9 @@
%7D);%0A%0A%7D
+%0A
|
b6e0999265f9973366aae35c426b6ae5f6c59e0b | Use Array.isArray to check for array | index.js | index.js | function classNames() {
var classes = '';
var arg;
for (var i = 0; i < arguments.length; i++) {
arg = arguments[i];
if (!arg) {
continue;
}
if ('string' === typeof arg || 'number' === typeof arg) {
classes += ' ' + arg;
} else if (Object.prototype.toString.call(arg) === '[object Array]') {
class... | JavaScript | 0.000001 | @@ -249,64 +249,26 @@
if (
-Object.prototype.toString.call(arg) === '%5Bobject Array%5D'
+Array.isArray(arg)
) %7B%0A
|
9773ec3b950ca679827c25c6c88e42bb770b23a3 | remove unnecessary check | packages/core-js/modules/esnext.async-iterator.flat-map.js | packages/core-js/modules/esnext.async-iterator.flat-map.js | 'use strict';
// https://github.com/tc39/proposal-iterator-helpers
var $ = require('../internals/export');
var aFunction = require('../internals/a-function');
var anObject = require('../internals/an-object');
var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy');
var getAsyncIterator = requ... | JavaScript | 0.000001 | @@ -1011,25 +1011,16 @@
rator =
-anObject(
getAsync
@@ -1035,17 +1035,16 @@
(mapped)
-)
;%0A
|
2877957ce617ff6d6037d1b4bd29ffb722d8a4be | change path by stem for each node so path can be maintained from parth | index.js | index.js | 'use strict';
// ## dependencies
//
var util = require('./lib/util');
// ## exports
//
exports = module.exports = Manifold;
// # Manifold constructor
//
// arguments
// - `opt` type `Object` optional
//
// returns
// - manifold instance
//
function Manifold(o){
if(!(this instanceof Manifold)){
return new Ma... | JavaScript | 0 | @@ -2245,20 +2245,20 @@
-path
+stem
: util.f
@@ -2263,28 +2263,28 @@
.fold((node.
-path
+stem
%7C%7C '') + '
@@ -2350,12 +2350,12 @@
ode.
-path
+stem
%7C%7C
@@ -3439,17 +3439,16 @@
.argv;%0A%0A
-%0A
found
@@ -3682,17 +3682,16 @@
ound; %7D%0A
-%0A
util.m
|
2c78af391f52c2bf721ab65291ab86e531c93250 | delete x-ample from session.js | api/resources/session.js | api/resources/session.js | exports.post = {
"tags": ["session"],
"description": "Метод логина пользователя",
"parameters": [
{
"name": "login",
"description": "Логин пользователя",
"type": "string"
},
{
"name": "password",
"description": "Пароль пользователя",
"type": "string"
}
],
"responses": {
"200": {
"des... | JavaScript | 0 | @@ -471,167 +471,8 @@
%09%7D,%0A
-%09%22x-amples%22: %5B%7B%0A%09%09%22description%22: %22%D0%BB%D0%BE%D0%B3%D0%B8%D0%BD %D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D0%B5%D0%BB%D1%8F%22,%0A%09%09%22request%22: %7B%0A%09%09%09%22params%22: %7B%0A%09%09%09%09%22login%22: %22dmitrydorofeev%22,%0A%09%09%09%09%2... |
ee69fc6ae85e85ed7e2bc86905aae15a42282fa8 | Fix table headers | index.js | index.js | class ApiService {
constructor () {
this.url = 'https://36yfx8yfid.execute-api.eu-west-1.amazonaws.com/dev';
}
}
class TopicsService {
constructor ($http, apiService) {
this.$http = $http;
this.apiService = apiService;
}
getTopics () {
if (!this.topicsPromise) {
this.topicsPromise = t... | JavaScript | 0.000008 | @@ -1342,20 +1342,16 @@
%3Cth%3E
-Vote
%3C/th%3E%0A
@@ -1366,13 +1366,42 @@
%3Cth%3E
-Score
+%3Ci class=%22material-icons%22%3Estar%3C/i%3E
%3C/th
@@ -1498,28 +1498,28 @@
d=%22::topic.t
-itle
+opic
%22%3E%3C/td%3E%0A
@@ -1814,42 +1814,8 @@
e%22%3E%3C
-i class=%22material-icons%22%3Estar%3C/i%3E%3C
/td... |
8660d85a758cdb6f14688e9df65a85b2305b5428 | Use arrow function notation | app-node/routes/posts.js | app-node/routes/posts.js | var Post = require('../models/post.js');
var postsApi = {
getAll: function (req, res) {
return Post.find(function (err, posts) {
if (!err) {
return res.send({ "posts": posts });
} else {
return res.send(500, err);
}
});
},
... | JavaScript | 0.000075 | @@ -63,36 +63,29 @@
getAll:
- function
(req,
-
res)
+ =%3E
%7B%0A
@@ -314,36 +314,29 @@
getById:
- function
(req,
-
res)
+ =%3E
%7B%0A
@@ -555,36 +555,29 @@
newPost:
- function
(req,
-
res)
+ =%3E
%7B%0A
@@ -1013,36 +1013,29 @@
ditPost:
- function
(req,
-
res)
+ =%3E
%7B%0A ... |
11396e09a9f262e6b9b183f9c7bf4563907a2fc0 | Add support for WV in Interpreter | examples/interpreter.js | examples/interpreter.js | var example = require("washington")
var ExactProperty = require("../object-pattern").ExactProperty
var WildcardProperty = require("../object-pattern").WildcardProperty
var Negator = require("../object-pattern").Negator
var ObjectPattern = require("../object-pattern").ObjectPattern
var Interpreter = function (source) ... | JavaScript | 0 | @@ -275,16 +275,79 @@
tPattern
+%0Avar WildcardValue = require(%22../object-pattern%22).WildcardValue
%0A%0Avar In
@@ -1168,16 +1168,61 @@
this))%0A%0A
+ propertyValue = this.value(propertyValue)%0A%0A
if (pr
@@ -1662,16 +1662,138 @@
) )%0A%7D%0A%0A%0A
+Interpreter.prototype.value = function (source) %7B%0A if... |
51af78e84577f907b1089cd62246232643088377 | change default options, remove signf from enrichment service relates to #549 | src/server/enrichment-map/enrichment/enrichment.js | src/server/enrichment-map/enrichment/enrichment.js | /*
documentation for enrichment
sample request URL: http://localhost:3000/api/enrichment/?genes=HCFC1 ATM
parameter:
genes - [string] a list of gene symbols delimited by whitespace
return:
[vector of Object] relevant info for valid genes
*/
const request = require('request');
const _ = require('lodash');
// remove #W... | JavaScript | 0 | @@ -884,17 +884,17 @@
icant%22:
-1
+0
,%0A %22sor
@@ -1026,17 +1026,20 @@
r_thr%22:
-1
+0.05
,%0A %22min
@@ -1924,36 +1924,8 @@
%7B%7D;%0A
- const signfIndex = 1;%0A
@@ -2260,101 +2260,406 @@
-_.forEach(responseInfo, elem =%3E %7B%0A ret%5Belem%5BtermIdIndex%5D%5D = %7B signf: elem%5Bsi... |
d5e38fc4c6c152b0302bc1a4a939b75cc22e3484 | Print file content when we can't find a pattern in it | index.js | index.js | /**
* Collection of test assertions helpers
*
* It mixes in the native node.js `assert` module. So you can just use this module as a
* drop-in replacement.
*
* @mixes nodejs/assert
* @example
* var assert = require('yeoman-assert');
*/
'use strict';
var fs = require('fs');
var _ = require('lodash');
var pat... | JavaScript | 0 | @@ -2851,32 +2851,55 @@
file, 'utf8');%0A%0A
+ var match = false;%0A
if (typeof r
@@ -2921,34 +2921,32 @@
g') %7B%0A
-assert.ok(
+match =
body.indexOf
@@ -2961,106 +2961,78 @@
%3E -1
-, file + ' did not
+;%0A %7D else %7B%0A
match
-%5C'' +
+=
regex
- + '%5C'.');%0A return;%0A %7D... |
ac96be0120333c47b36e65e05b9f6d37b19db664 | Use iterative algorithm instead of recursive | index.js | index.js | /*jslint node:true*/
"use strict";
// Map the characters to escape to their escaped values. The list is derived
// from http://www.cespedes.org/blog/85/how-to-escape-latex-special-characters
var escapes = {
'{': '\\{',
'}': '\\}',
'\\': '\\textbackslash{}',
'#': '\\#',
'$': '\\$',
'%': '\\%',
... | JavaScript | 0.000129 | @@ -447,374 +447,13 @@
',%0A%7D
-,%0A /**%0A * Escape a string to be used in JS regular expression.%0A * Code from http://stackoverflow.com/a/6969486%0A * @param str the string to be used in a RegExp%0A * @return the escaped string, ready to be used for RegExp%0A */%0A escapeRegExp = function... |
933efd1dabba09699d4581fe9840f5056f01550a | fix context prop typo | src/Scene.js | src/Scene.js | import { degreesToRadians } from "./util/math";
import Transform from "./lib/Transform";
let defaults = {
debug: false
};
/**
* Handles rendering entities onto the canvas element
* @class Scene
* @requires Transform
*
* @param {HTMLElement} canvas - The active canvas element
* @param {Camera} camera - The ... | JavaScript | 0.001086 | @@ -3091,22 +3091,18 @@
this.c
-ontex
t
+x
.fillSty
|
54be2867dfee215671de10edfe2a95ba51f6b074 | Fix 10s early eof (timeout) bug | src/io/xhr-moz-chunked-loader.js | src/io/xhr-moz-chunked-loader.js | import Log from '../utils/logger.js';
import {BaseLoader, LoaderStatus, LoaderError} from './loader.js';
// For FireFox browser which supports `xhr.responseType = 'moz-chunked-arraybuffer'`
class MozChunkedLoader extends BaseLoader {
static isSupported() {
try {
let xhr = new XMLHttpRequest();... | JavaScript | 0 | @@ -1127,48 +1127,8 @@
ll;%0A
- this._xhr.ontimeout = null;%0A
@@ -1153,32 +1153,32 @@
onerror = null;%0A
+
this
@@ -1404,37 +1404,8 @@
e);%0A
- xhr.timeout = 10000;%0A
@@ -1570,32 +1570,32 @@
ess.bind(this);%0A
+
xhr.onlo
@@ -1634,60 +1634,8 @@
s);%0A
- x... |
81065eec19580ae033c8c0a6098c926f8aae51f1 | Fix image not being centered. | src/Slide.js | src/Slide.js | import React, { Component, PropTypes } from 'react'
import { blue500, blue700 } from 'material-ui/styles/colors'
const styles = {
mobile: {
root: {
color: 'white',
backgroundColor: blue500,
height: '100%'
},
media: {
position: 'relative',
top: '50%',
transform: 'transl... | JavaScript | 0.000001 | @@ -1763,104 +1763,104 @@
-position: 'relative',%0A top: '50%25',%0A transform: 'translateY(-50%25)',%0A height: '100%25
+height: '100%25',%0A display: 'flex',%0A justifyContent: 'center',%0A alignItems: 'center
'%0A
@@ -3016,26 +3016,8 @@
ght:
- '100%25', maxWidth:
'10
|
a327f4a0bf9693b52c1356c307532954c682972e | Fix cryptget memory issues | www/common/cryptget.js | www/common/cryptget.js | define([
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad-netflux/chainpad-netflux.js',
'/common/common-util.js',
'/common/common-hash.js',
'/common/common-realtime.js',
'/common/outer/network-config.js',
'/bower_components/chainpad/chainpad.dist.js',
], function (C... | JavaScript | 0.000008 | @@ -780,32 +780,183 @@
e); %7D%0A %7D%0A
+ if (S.session && S.session.stop) %7B%0A try %7B%0A S.session.stop();%0A %7D catch (e) %7B console.error(e); %7D%0A %7D%0A
var abor
|
6f7ba62c801074052df1919be4608587407f55b7 | Update slide class to newest logic of shapes and animations | src/Slide.js | src/Slide.js | import FigTextShape from 'kittik-shape-fig-text';
import ImageShape from 'kittik-shape-image';
import RectangleShape from 'kittik-shape-rectangle';
import TextShape from 'kittik-shape-text';
import PrintAnimation from 'kittik-animation-print';
import SlideAnimation from 'kittik-animation-slide';
const shapes = {
fi... | JavaScript | 0 | @@ -298,22 +298,22 @@
%0A%0Aconst
-shapes
+SHAPES
= %7B%0A f
@@ -416,18 +416,18 @@
nst
-animations
+ANIMATIONS
= %7B
@@ -637,492 +637,943 @@
*
- You must pass serialized Object representation of each %7B@link Shape%7D as an array to this constructor.%0A *%0A * @param %7BArray%3CShape%3E%7D shapes Array... |
7e5b36d52984e292d2a0ac611154a576aa9b5129 | Update segment io keys, prod settings. Closes #153 | config/environment.js | config/environment.js | /* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'diesel',
environment: environment,
baseURL: '/',
locationType: 'auto',
authBaseUri: "http://localhost:4000",
apiBaseUri: "http://localhost:4001",
aptibleHosts: {
'legacy-dashboard': "http://... | JavaScript | 0 | @@ -560,18 +560,18 @@
y: '
-qxwhj8ys4t
+B4MXa1tl9Z
',%0A%0A
@@ -2844,16 +2844,53 @@
%0A %7D;%0A
+ ENV.segmentioKey = 'KsTMCT4BN5';%0A
%7D%0A%0A i
@@ -2924,16 +2924,285 @@
ion') %7B%0A
+ ENV.authBaseUri = %22https://auth.aptible.com%22;%0A ENV.apiBaseUri = %22https://api.aptible.com%22;%0A ENV.apt... |
9e8c9a285b31d3c0eef26ed340df228e5290c10c | fix bug with map and path.basename | index.js | index.js | var debug = require('debug')('district')
var quote = require('quotemeta')
var findup = require('findup')
var mkdirp = require('mkdirp')
var once = require('once')
var uniq = require('uniq')
var path = require('path')
var fs = require('fs')
module.exports = district
function district(namespace, linked, dir... | JavaScript | 0 | @@ -685,16 +685,42 @@
ked.map(
+function (d) %7B%0A return
path.bas
@@ -724,19 +724,27 @@
basename
+(d)%0A %7D
))%0A
+%0A
if (du
|
8338dfd5b37306583161cd4002414548b1fbc9df | Return hash from sync() | src/Store.js | src/Store.js | 'use strict'
const EventEmitter = require('events').EventEmitter
const Log = require('ipfs-log')
const Index = require('./Index')
const DefaultOptions = {
Index: Index,
maxHistory: 256
}
class Store {
constructor(ipfs, id, dbname, options = {}) {
this.id = id
this.dbname = dbname
th... | JavaScript | 0.000005 | @@ -2114,26 +2114,28 @@
ise.resolve(
-%5B%5D
+hash
)%0A%0A let n
@@ -3281,24 +3281,56 @@
n(() =%3E
-newItems
+Log.getIpfsHash(this._ipfs, this._oplog)
)%0A %7D%0A%0A
|
6bdb963080b2f25ac5e1dcd25d7f9b568a2381ad | Enable BYO node-matrix-assets, and expose getAssetsById | index.js | index.js | module.exports = function assets () {
var asset = require('node-matrix-assets')
return {
folder: require('./assets/folder')(asset),
site: require('./assets/site')(asset),
page: require('./assets/page')(asset)
}
}
| JavaScript | 0 | @@ -31,25 +31,35 @@
ts (
+asset
) %7B%0A
-var
+asset =
asset
-=
+%7C%7C
req
@@ -228,15 +228,53 @@
)(asset)
+,%0A getAssetById: asset.getAssetById
%0A %7D%0A%7D%0A
|
e36c521b80d0e6753b4127b87a4e3906f3dd7c16 | Fix empty array handling in denorm migration | packages/lesswrong/server/scripts/recomputeDenormalized.js | packages/lesswrong/server/scripts/recomputeDenormalized.js | /* global Vulcan */
import { Collections, getCollection } from 'meteor/vulcan:core';
import { getFieldsWithAttribute } from './utils';
import { migrateDocuments } from '../migrations/migrationUtils'
Vulcan.recomputeAllDenormalizedValues = async () => {
for(let collection of Collections) {
await Vulcan.recomputeD... | JavaScript | 0.000015 | @@ -3286,24 +3286,67 @@
documents%60)%0A
+ if (nonEmptyUpdates.length %3E 0) %7B%0A
await
@@ -3391,16 +3391,18 @@
+
nonEmpty
@@ -3410,16 +3410,18 @@
pdates,%0A
+
@@ -3445,18 +3445,28 @@
%7D%0A
-);
+ );%0A %7D
%0A %7D,%0A
|
dbb7809055482a2e77e6315febe4482764e8689e | Fix string formatting args. | kolibri_exercise_perseus_plugin/assets/src/i18n.js | kolibri_exercise_perseus_plugin/assets/src/i18n.js | /*
* Utils that wrap vue-intl functions in a way that makes them accessible to Perseus
*/
import createFragment from 'react-addons-create-fragment';
import { removeBackslashesInString } from '../../translationUtils';
import translator from './translator';
// We sometimes need to translate messages without filling i... | JavaScript | 0.00003 | @@ -3229,26 +3229,71 @@
= (
-options,
+...args) =%3E %7B%0A const options = args%5B0%5D;%0A const
str
-)
=
-%3E %7B
+ args%5B1%5D;
%0A i
@@ -3298,21 +3298,16 @@
if (arg
-ument
s.length
@@ -3339,24 +3339,47 @@
'string') %7B%0A
+ throw new Error();%0A
return '
|
547e1f63fb510e8714f95e4f61e3e6f1b242de57 | Test for #assignTime | jasmine/spec/NoteSpec.js | jasmine/spec/NoteSpec.js | describe("Note", function(){
beforeEach(function() {
note = new PinPoint.Note();
localStorage["time"] = "0:30"
localStorage["url"] = "http://www.youtube.com/12i3t47grfi"
});
it("should be defined.", function(){
expect(note).toBeDefined();
});
describe("#assignURL", function(){
it("should... | JavaScript | 0 | @@ -875,13 +875,308 @@
);%0A %7D);
+%0A%0A describe(%22#assignTime%22, function()%7B%0A it(%22should assign note's noteTime attribute to a time.%22, function()%7B%0A note.assignTime();%0A expect(note.noteTime).not.toEqual(%22%22);%0A expect(note.noteTime).not.toEqual(undefined);%0A expect(note... |
1a48ed095b19422979ce224f6c674b55fa911988 | convert freqency view to use axes.js from chart.js | public/js/views/visualizations/frequency_view.js | public/js/views/visualizations/frequency_view.js | chorus.views.visualizations.Frequency = chorus.views.Base.extend({
render: function() {
var $el = $(this.el);
$el.addClass("visualization");
var data = new chorus.presenters.visualizations.Frequency(this.model).present();
chorus.chart.frequency(
this.chartArea(this.el),
... | JavaScript | 0 | @@ -154,16 +154,17 @@
tion%22);%0A
+%0A
@@ -256,111 +256,521 @@
-chorus.chart.frequency(%0A this.chartArea(this.el),%0A data,%0A %7B yAxisTitle
+var buckets = _.pluck(data, 'bucket');%0A%0A var counts = _.pluck(data, 'count')%0A%0A var svg = d3.select(this... |
9dc8bce3a40232b652f28a7aa47b519fbdf552e5 | update passthrough example | examples/passthrough.js | examples/passthrough.js | /**
* A very simple example that provides a connection to the FICS server as a
* REPL interface. This pipes stdin from the process into the socket and
* the socket into stdout.
*/
var FicsClient = require("./../");
var socket = (new FicsClient()).getSocket();
process.stdin.pipe(socket);
socket.pipe(process.stdout)... | JavaScript | 0 | @@ -248,20 +248,70 @@
()).
-getS
+s
ocket
-();
+; // accessing this private attribute is not recommended
%0A%0Apr
|
e707ae40f02d69c587be44d37a68a75c42820c4f | Add error logging to Store callback | src/Store.js | src/Store.js | 'use strict';
var EventEmitter = require('events').EventEmitter;
var assign = require('object-assign');
var con = require('./util/console');
/**
* Store class
*/
class Store {
/**
* Constructs a Store object, extends it with EventEmitter and supplied
* methods parameter, and creates a mixin property for u... | JavaScript | 0.000001 | @@ -136,16 +136,169 @@
ole');%0A%0A
+function withErrorLogging(f) %7B%0A return function() %7B%0A try %7B%0A f.apply(this, arguments);%0A %7D catch(e) %7B%0A con.error(e.stack);%0A %7D%0A %7D;%0A%7D;%0A%0A
/**%0A * S
@@ -730,24 +730,41 @@
lback =
+withErrorLogging(
callback
.bind(th
@@ -755,1... |
6ec3c4529c9a1766587f059a3f3a92f362e15107 | Refresh library hotfix | src/js/actions/LibraryActions.js | src/js/actions/LibraryActions.js | import AppDispatcher from '../dispatcher/AppDispatcher';
import AppConstants from '../constants/AppConstants';
import app from '../constants/app.js';
import mmd from 'musicmetadata';
import fs from 'fs';
import path from 'path';
import mime from 'mime';
import walkSync from 'walk-sync';
const dia... | JavaScript | 0 | @@ -104,16 +104,58 @@
stants';
+%0Aimport AppActions from './AppActions';
%0A%0Aimport
|
ccb81ab9baa2976db365477a5dc974f9a567bd7f | Fix rebase | app/lib/db.js | app/lib/db.js | const path = require('path');
const fs = require('fs');
const streamsql = require('streamsql');
const config = require('./config');
const mysql = require('mysql');
var dbs = {};
function getDbConfig (prefix) {
prefix += '_';
return {
driver: config(prefix+'DRIVER', 'mysql'),
host: config(prefix+... | JavaScript | 0.000003 | @@ -578,16 +578,47 @@
fix));%0A%0A
+ var db = dbs%5Bprefix%5D;%0A %0A
func
|
db50183639a3b469cb3d7ad69c1e7fe54d28b292 | use absolute positioning for squares | Chess/index.ios.js | Chess/index.ios.js | "use strict";
var React = require("react-native");
var {
AppRegistry,
StyleSheet,
Text,
TouchableHighlight,
View,
} = React;
var BoardLib = require("./board")
var {
WHITE,
BLACK,
EMPTY,
Board,
} = BoardLib;
var App = React.createClass({
getInitialState() {
return new Board()
},
render() {... | JavaScript | 0.000001 | @@ -710,24 +710,39 @@
)%0A %7D%0A%7D)%0A%0A
+var CELL = 94%0A%0A
var Square =
@@ -934,24 +934,181 @@
quare%0A %7D%0A
+ var left = this.props.x * CELL%0A var bottom = this.props.y * CELL%0A var styleList = %5Bstyles.square, colorStyle,%0A %7Bleft, bottom%7D%5D%0A
if (this
@@ -1... |
f13ad9d76e89581029af839d9216dec963aa5c8a | Add a comment for the toggleAllComplete method. | todo-example/backbone_require/js/views/app.js | todo-example/backbone_require/js/views/app.js | define([
'jquery',
'underscore',
'backbone',
'collections/todos',
'views/todos',
'text!templates/stats.html'
], function($, _, Backbone, Todos, TodoView, statsTemplate){
var AppView = Backbone.View.extend({
// Instead of generating a new element, bind to the existing skeleton of
// the App alr... | JavaScript | 0 | @@ -3300,24 +3300,96 @@
0);%0A %7D,%0A%0A
+ // Change each todo so that it's %60done%60 state matches the check all%0A
toggleAl
|
645f0763b5ee28a3d972e4a89554c49d67394f6e | Use empty string for name param | app/controllers/stops.js | app/controllers/stops.js | import Ember from 'ember';
var computed = Ember.computed;
export default Ember.Controller.extend({
queryParams: ['name'],
name: null,
nameField: computed.oneWay('name'),
actions: {
search: function() {
this.set('name', this.get('nameField'));
}
}
});
| JavaScript | 0 | @@ -130,12 +130,10 @@
me:
-null
+''
,%0A%0A
|
07b3fb4b58bf1a61850d0878d6299873dccbb83a | enable auth | index.js | index.js | var elasticsearch = require('elasticsearch')
var AgentKeepAlive = require('agentkeepalive')
var client = new elasticsearch.Client({
host: 'localhost:80',
maxSockets: 20,
maxRetries: 50,
createNodeAgent: function (connection, config) {
return new AgentKeepAlive(connection.makeAgentConfig(config))
... | JavaScript | 0.000006 | @@ -38,16 +38,41 @@
earch')%0A
+var url = require('url')%0A
var Agen
@@ -111,16 +111,180 @@
live')%0A%0A
+var host = 'http://localhost:80'%0Avar user = 'user'%0Avar pass = 'pass'%0A%0Avar urlObj = url.parse(host)%0AurlObj.auth = user+':'+pass%0A%0Avar hoststring = url.format(urlObj)%0A
var clie
@@ -329,22 +329,18 @... |
d0e16839d6ae940676ae3c7a00010d653b36190d | Make heading small | src/components/Brand.js | src/components/Brand.js | import React from 'react'
import { Link } from 'gatsby'
import { rhythm, scale } from '../utils/typography'
export function Brand({ title, dimmed = false }) {
if (dimmed) {
return (
<h3
style={{
display: 'inline-block',
fontFamily: `Montserrat, sans-serif`,
marginTop: ... | JavaScript | 0.001613 | @@ -68,15 +68,8 @@
ythm
-, scale
%7D f
@@ -128,475 +128,13 @@
itle
-, dimmed = false %7D) %7B%0A if (dimmed) %7B%0A return (%0A %3Ch3%0A style=%7B%7B%0A display: 'inline-block',%0A fontFamily: %60Montserrat, sans-serif%60,%0A marginTop: 0,%0A marginBottom: rhythm(... |
f8fa21565af79e8a2c76bd90a8e2dceebb76e861 | add comment for using another testing code (react) | cypress/support/step-definitions/draggable-steps.js | cypress/support/step-definitions/draggable-steps.js | import { draggableItem, draggableItemByPosition } from '../../locators/draggable';
Then('Draggable {string} is dragged to {int}', (record, destinationId) => {
draggableItemByPosition(destinationId).should('contain', record);
});
When('I drag Draggable {string} to {int}', (record, destinationId) => {
draggableItem... | JavaScript | 0 | @@ -290,32 +290,92 @@
inationId) =%3E %7B%0A
+ // added new drag&drop method to test react-dnd component%0A
draggableItem(
|
f7d63cebd05b029b3a2541cb746bfd0c5d70d4a0 | make it accept options object as second argument | index.js | index.js | /*!
* base-task-alias <https://github.com/tunnckoCore/base-task-alias>
*
* Copyright (c) 2016 Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk)
* Released under the MIT license.
*/
'use strict'
var isValid = require('is-valid-app')
var extend = require('extend-shallow')
function arraify (val) {
... | JavaScript | 0.00002 | @@ -1920,16 +1920,22 @@
s (name,
+ opts,
aliases
@@ -1934,24 +1934,159 @@
aliases) %7B%0A
+ var isOk = Array.isArray(opts)%0A aliases = isOk ? opts : aliases%0A opts = !isOk && typeof opts === 'object' ? opts : %7B%7D%0A%0A
arraif
@@ -2146,16 +2146,22 @@
k(alias,
+ opts,
%5Bname%5D)
|
25debd989bffed67007133bf134420928af0aab1 | enable description objects instead of explicitly setting type and label | src/components/Chart.js | src/components/Chart.js | var React = require('react');
var GoogleChartLoader = require('./GoogleChartLoader');
var DEFAULT_COLORS = require('../constants/DEFAULT_CHART_COLORS');
var uniqueId = 0;
var generateUniqueId = function() {
uniqueId++;
return "reactgooglegraph" + uniqueId;
};
var Chart = React.createClass({
chart: null,
wra... | JavaScript | 0 | @@ -1519,42 +1519,8 @@
s%5Bi%5D
-.type, this.props.columns%5Bi%5D.label
);%0A%09
|
074554861115dce91ee5f28a6d8a19772e7ae56f | Load list only once | app/router.js | app/router.js | define(function(require, exports, module) {
"use strict";
var app = require("app");
// External dependencies.
var Backbone = require("backbone");
var VoluntaryWork = require("modules/voluntary-work");
var Types = require("modules/types");
var Municipalities = require("modules/municipalities");
// De... | JavaScript | 0 | @@ -965,21 +965,20 @@
%22%22: %22
-index
+list
%22,%0A
@@ -1305,24 +1305,26 @@
mlist%0A
+//
$('ul.itemLi
@@ -1335,24 +1335,71 @@
.html('');%0A%0A
+ if($('ul.itemList %3E li').length %3C 1) %7B%0A
this.v
@@ -1428,16 +1428,18 @@
+
+
success:
@@ -1453,24 +1453,26 @@
on(items)... |
e8677fc128b5c6365d002c1b154cab48e547b034 | fix commandline info bug | index.js | index.js | var U2 = require('uglify-js');
module.exports = function singleQuote(codeIn) {
var code = codeIn;
var hasReturn = code.indexOf('\r\n') !== -1;
var hasCommandLineInfo = code.substr(0, 2) === '#!';
var commandlineInfo = '';
code = code.replace(/\r/g, '');
if (hasCommandLineInfo) {
var endOfLine = (code.indexOf('... | JavaScript | 0.000001 | @@ -1166,16 +1166,77 @@
nt);%0A%09%7D%0A
+%09U2.parse(code); //do sanity-check so we don't mess up files%0A
%09code =
@@ -1319,69 +1319,8 @@
de;%0A
-%09U2.parse(code); //do sanity-check so we don't mess up files%0A
%09ret
|
09bf9a580195c6e0734e342866c21c255d6c2b79 | Refactor interpretation of the randomizer option into a function | ably.js | ably.js | (function (root, factory) {
'use strict';
/* istanbul ignore next: untestable with Node-style definition */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ably-test', 'ably-subscriber'], factory);
} else {
/* istanbul ignore e... | JavaScript | 0.000069 | @@ -1395,32 +1395,729 @@
)%5D);%0A %7D%0A%0A
+ function interpretRandomizer(options) %7B%0A var randomizer;%0A if (!options.hasOwnProperty('randomizer')) %7B%0A randomizer = self.randomizers%5B'default'%5D;%0A %7D else %7B%0A if (typeof optio... |
83a00175886abec70906fb5b2c1afade3a4d7bb2 | Add routes for static mock pages | app/router.js | app/router.js | import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.route('stops', { path: "/" }, function() {
this.route('near-by', { path: '/' });
this.route('search');
this.route('favorites');
});
... | JavaScript | 0 | @@ -442,16 +442,303 @@
_id' %7D);
+%0A%0A // STATIC PAGES%0A this.route('mocks', function() %7B%0A this.route('home');%0A this.route('results', function() %7B%0A this.route('stops');%0A this.route('routes');%0A %7D);%0A this.route('detail', function() %7B%0A this.route('stops');%0A th... |
79e033e7b78ba6a21ed7ee20668b5781009ffb6b | Fix prop types | src/Token.js | src/Token.js | /* @flow */
import React, { Component } from 'react';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import { ENTER, UP, DOWN } from './key-codes';
import type {
CustomElementsType,
TokenPropType,
ResultType,
ComponentClassesType
} from './types';
import uniqueId from './unique-id'... | JavaScript | 0.000004 | @@ -565,22 +565,19 @@
iption:
-string
+any
,%0A drop
@@ -824,30 +824,28 @@
: PropTypes.
-string
+node
,%0A dropdown
@@ -882,30 +882,28 @@
: PropTypes.
-string
+node
,%0A id: Prop
@@ -969,19 +969,16 @@
pes.bool
-ean
,%0A toke
|
f9cfd64685860aa3af544dfcb2dbd479d15e37c1 | add more comments | index.js | index.js | 'use strict';
const assert = require('assert');
// ovt reference
let Ovt;
// Types mappings
const typeMappings = {
array: ['any'],
object: 'any',
alternatives: 'any',
func: 'any',
buffer: 'any',
regexp: 'any'
};
const supportTypes = ['object', 'array'];
function typeMapper(type) {
return typeMappings... | JavaScript | 0 | @@ -417,16 +417,159 @@
d params
+ schema%0A// %5B%0A// %7B name: 'gender', type: 'string' %7D,%0A// %7B name: 'profile', type: 'object' %7D,%0A// %7B name: 'hobbies', type: %5B'string'%5D %7D%0A// %5D
%0Afunctio
|
a4b54a0f0c04e217c2540123133c78b7311926ce | remove board spec temoparily (#1337) | protractor.config.js | protractor.config.js | exports.config = {
useAllAngular2AppRoots: true,
getPageTimeout: 30000,
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['src/tests/**/*.spec.js'],
exclude: ['src/tests/**/EE/*.spec.js', 'src/tests/**/TBD/*.spec.js', 'src/tests/**/orderOfExecution.spec.js', 'src/tests/**/work-item-timeStamp.... | JavaScript | 0 | @@ -229,32 +229,62 @@
/TBD/*.spec.js',
+ 'src/tests/**/board.spec.js',
'src/tests/**/o
|
9c6e154f0fa89eb50dce16d3c79776b7d259f9c6 | Add line break | src/js/pages/ChatMessagesPage.js | src/js/pages/ChatMessagesPage.js | import React, { PropTypes, Component } from 'react';
import TopNavBar from '../components/ui/TopNavBar';
import DailyMessages from '../components/ui/DailyMessages';
import MessagesToolBar from '../components/ui/MessagesToolBar';
import AuthenticatedComponent from '../components/AuthenticatedComponent';
import translate... | JavaScript | 0.000001 | @@ -4507,16 +4507,47 @@
%3Cbr /%3E%0A
+ %3Cbr /%3E%0A
|
f409cc09e05e058f193881bd9998db217d88b5fd | Update index | index.js | index.js | JavaScript | 0.000001 | @@ -0,0 +1,264 @@
+var Hapi = require('hapi');%0A%0Avar server = new Hapi.Server();%0A%0Aserver.connection(%7B%0A host: 'localhost',%0A port: 8000%0A%7D);%0A%0Aserver.route(%7B%0A method: 'GET',%0A path: ':/hello',%0A handler: function (request, reply) %7B%0A reply('Data Weather!');%0A %7D%0A%7D);%0A%0Aserver.... | |
f918eede6e54fc7fe1ce5b805bf053880f93cdc6 | Fix false positive polyfill detection | to-array.js | to-array.js | 'use strict';
var aFrom = require('es5-ext/array/from')
, clear = require('es5-ext/array/#/clear')
, eIndexOf = require('es5-ext/array/#/e-index-of')
, isCopy = require('es5-ext/array/#/is-copy')
, remove = require('es5-ext/array/#/remove')
, invoke... | JavaScript | 0.999881 | @@ -814,16 +814,41 @@
t')%0A%0A ,
+ isArray = Array.isArray,
push =
@@ -867,16 +867,19 @@
ype.push
+%0A
, sort =
@@ -899,19 +899,16 @@
ype.sort
-%0A
, splice
@@ -1416,16 +1416,24 @@
;%0A%09%09%09if
+(isArray
(this.__
@@ -1442,16 +1442,17 @@
tData__)
+)
%7B%0A%09%09%09%09s
|
18396bf4eba8329e9fdf92883ad9e0d73dba4732 | Fix type mismatch in user check | index.js | index.js | /**
* hive.js
* Copyright (C) 2013-2015 Marcel Klehr <mklehr@gmx.net>
*
* This program 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, or
* (at your option) any later ve... | JavaScript | 0.000002 | @@ -1796,17 +1796,16 @@
.user !=
-=
user.id
|
7119320b3cb0c222f6ebc3c484c73c50b9856094 | move left and right keys to function | src/components/Modes.js | src/components/Modes.js | import React, { Component} from 'react';
import NoteSection from './NoteSection';
import ModeChooser from './ModeChooser';
import NoteChooser from './NoteChooser';
import '../styles/Modes.css';
import app_data from '../config/data.js';
import chevronLeft from '../statics/feath... | JavaScript | 0.000001 | @@ -1161,174 +1161,8 @@
: %5B%5D
-,%0A left_keys: %5B'H', 'h', 'j', 'J', 'ArrowLeft', 'ArrowDown', 'Backspace'%5D,%0A right_keys: %5B'L', 'l', 'k', 'K', 'ArrowRight', 'ArrowUp', 'Space'%5D
%0A
@@ -2698,24 +2698,25 @@
nt.key;%0A
+%0A
if (this
@@ -2707,31 +2707,216 @@
-i... |
b06b602a074815e60d19a041a0aa5ba963dbe833 | Fix non https links | modules/mod_citybrandingmap/assets/js/script.js | modules/mod_citybrandingmap/assets/js/script.js | //lat,lng,zoom,language,menu_filter_area are set outside
var citybranding_mod_map;
var citybranding_markers = [];
var mc;
var infoWindow = new google.maps.InfoWindow({
maxWidth: 350
});
function citybranding_mod_map_initialize() {
var center = new google.maps.LatLng(lat,lng);
var mapOptions = {
zoom: parseI... | JavaScript | 0.000024 | @@ -2234,32 +2234,33 @@
er.setIcon('http
+s
://maps.google.c
@@ -2564,16 +2564,17 @@
on('http
+s
://maps.
|
1649b6f622ca73755fdeb0d5ecb9c5d5f85bffbe | Remove the callback from .get | index.js | index.js | /* global require, process, module */
'use strict';
var fs = require('fs'),
path = require('path');
function DotConfig(filepath) {
var options = null;
function readFile(filepath) {
var rawData = '{}';
try {
rawData = fs.readFileSync(filepath);
} catch(err) {
if (err.code === 'ENOENT') {
fs.wri... | JavaScript | 0.000002 | @@ -728,12 +728,8 @@
(key
-, fn
) %7B%0A
@@ -837,45 +837,19 @@
%0A%09%09%09
-if (typeof fn === 'function') fn(key)
+return null
;%0A%09%09
|
5031b4d6dfbcea5be19759e67e3d0630ed19ea20 | Add a "Back" button on order confirmation page. | src/components/Order.js | src/components/Order.js | import RaisedButton from 'material-ui/RaisedButton';
import TextField from 'material-ui/TextField';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import moment from 'moment';
import React from 'react';
import Relay from 'react-relay';
import theme from '../theme';
import OrderVariablesMutation from '../muta... | JavaScript | 0.000019 | @@ -785,22 +785,46 @@
: true,%0A
+ ordered: false,%0A
%7D%0A
-
%0A get
@@ -1424,16 +1424,185 @@
%7D)
+, %7B%0A onSuccess: () =%3E %7B%0A this.setState(%7B%0A ordered: true,%0A %7D);%0A %7D%0A %7... |
cc438fc4c64dbe565b10c6e1ba0fed204bca90fb | fix fetching regions | app/javascript/providers/country-data-provider/index.js | app/javascript/providers/country-data-provider/index.js | import { PureComponent } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import reducerRegistry from 'app/registry';
import { CancelToken } from 'axios';
import * as actions from './actions';
import reducers, { initialState } from './reducers';
const mapStateToProps = ({ locat... | JavaScript | 0.000008 | @@ -1234,38 +1234,36 @@
leRegionFetch =
-params
+adm0
=%3E %7B%0A const
@@ -1381,33 +1381,28 @@
etRegions(%7B
-...params
+adm0
, token: thi
|
8cfb5fde6f60306f9f381724893e9e83213e2560 | Work code | index.js | index.js | 'use strict';
var parse = require('babel-core').transform;
module.exports = function (options) {
options = options || {};
return function (files) {
return files.map(function (file) {
var result = parse(file.contents, options);
return {
type: 'File',
program: result.ast,
l... | JavaScript | 0.000001 | @@ -52,16 +52,75 @@
ansform;
+%0Avar attachComments = require('estraverse').attachComments;
%0A%0Amodule
@@ -177,16 +177,91 @@
s %7C%7C %7B%7D;
+%0A options.ast = true;%0A options.code = false;%0A%0A var attachComment = true;
%0A%0A retu
@@ -370,16 +370,52 @@
ptions);
+%0A var ast = result.ast.program;
%... |
3b115b532194c85416e0f2c8ce4836ead2f5d6ae | Adjust max length to 34 | index.js | index.js | 'use strict';
/**
* Regular expression for matching Bitcoin addresses
*
* @api public
*/
module.exports = function () {
return /(?:^|\s)(?:[13][1-9A-Za-z][^O0Il]{24,33})/g;
};
| JavaScript | 0.999999 | @@ -166,17 +166,17 @@
Il%5D%7B24,3
-3
+2
%7D)/g;%0A%7D;
|
e4f69eab27220ff00969382d0a9419e1c7640a8a | Fix a PropType. | src/components/Story.js | src/components/Story.js | import React, { PropTypes } from 'react';
import slug from 'slug';
const Story = (props) => {
let storyClassName = '';
// if the story is on the homepage ditch extra classes
if (props.homepage) {
storyClassName='story-cell';
} else {
storyClassName='story-cell six columns';
}
function viewStory () {
cons... | JavaScript | 0.000001 | @@ -1079,22 +1079,22 @@
opTypes.
-string
+number
,%0A%09title
|
13a53cd0bf83bd98bdded1b30f65fc8e9d7319f3 | Print Body and Contexts | index.js | index.js | 'use strict';
const express = require('express');
const bodyParser = require('body-parser');
const restService = express();
restService.use(bodyParser.json());
restService.post('/hook', function (req, res) {
console.log('hook request');
try {
var speech = 'empty speech';
if (req.body) {
... | JavaScript | 0 | @@ -420,16 +420,104 @@
uestBody
+.object);%0A console.log(%22-----%22);%0A console.log(requestBody.contexts
);%0A%0A
|
0378b03e5301afb7d0249bf75ae06afacf09bbb8 | update modify request body eg | examples/middleware/bodyDecoder-middleware.js | examples/middleware/bodyDecoder-middleware.js | /*
bodyDecoder-middleware.js: Basic example of `connect.bodyParser()` middleware in node-http-proxy
Copyright (c) Nodejitsu 2013
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 ... | JavaScript | 0 | @@ -1728,86 +1728,8 @@
dy)%0A
- console.log('dsfgsdgsdgsdrtwergtsdgf', JSON.stringify(req.body).length)%0A
|
ee5ff161044ba4915f708c514d0c76e3e02dd54c | add pause on click | src/components/board.js | src/components/board.js | /**
* Created by devin on 12/2/15.
*/
import React, { Component } from 'react';
import mui from 'material-ui';
import {GridList, GridTile, IconButton} from 'material-ui';
import _ from 'lodash';
import ChessTile from './chessTile';
export default class Board extends React.Component {
constructor(props) {
... | JavaScript | 0.000002 | @@ -402,18 +402,146 @@
epNum: 1
-%7D;
+, paused:false%7D;%0A %7D%0A _pause() %7B%0A let currentPause = this.state.paused;%0A this.setState(%7Bpaused: !currentPause%7D)
%0A %7D%0A
@@ -2661,24 +2661,66 @@
render() %7B%0A
+ if (!this.state.paused) %7B%0A
setTimeo
@@ -2734,24... |
d16968f1cbc41cff1f971405d74312c4a2b9a453 | Move background-color check in to the if condition | converter.js | converter.js | 'use strict';
var webpage = require('webpage');
var page = webpage.create();
var system = require('system');
var options = JSON.parse(phantom.args[0]);
var log = console.log;
// make sure phantom never outputs to stdout
console.log = console.error = function () {
system.stderr.writeLine([].slice.call(arguments).join... | JavaScript | 0 | @@ -1650,25 +1650,13 @@
%7B%0A%09%09
-var background =
+if (!
wind
@@ -1730,28 +1730,8 @@
or')
-;%0A%0A%09%09if (!background
) %7B%0A
|
ead5e5dbe3a55ebf40924d66e7f432e77a4d561e | return producer's result | operators.js | operators.js | var Observable = require('./observable');
exports.merge = function merge(monads) {
return Observable(function(onNext) {
monads.forEach(function(monad) {
if (monad.isAsync) {
monad.subscribe(onNext);
} else {
monad.bind(onNext);
}
});
});
};
exports.concat = function concat(monads) {};
exports.... | JavaScript | 0.000185 | @@ -117,16 +117,23 @@
xt) %7B%0A%09%09
+return
monads.f
|
301c90e477e3b9921fee4b0e54d561a17ab300db | add stepNum | src/components/board.js | src/components/board.js | /**
* Created by devin on 12/2/15.
*/
import React, { Component } from 'react';
import mui from 'material-ui';
import {GridList, GridTile, IconButton} from 'material-ui';
import _ from 'lodash';
import ChessTile from './chessTile';
export default class Board extends React.Component {
constructor(props) {
... | JavaScript | 0.000003 | @@ -390,16 +390,28 @@
ng: true
+, stepNum: 1
%7D;%0A %7D
@@ -3509,9 +3509,26 @@
rds%5B
-3
+this.state.stepNum
%5D).m
|
724ee7a62fe68468bd8e9de29667b33559500730 | Fix rolloff factor | src/audio.js | src/audio.js | // panner taken from https://developer.mozilla.org/en-US/docs/Web/API/PannerNode
var context = new (window.AudioContext || window.webkitAudioContext)();
var panner = context.createPanner();
panner.panningModel = 'HRTF';
panner.distanceModel = 'inverse';
panner.refDistance = 1;
panner.maxDistance = 10000;
panner.rollof... | JavaScript | 0.000001 | @@ -323,17 +323,20 @@
actor =
-1
+0.05
;%0Apanner
|
614c18bc78f1e034b57abe3bef023dd3161df971 | Remove interest group delete button | app/routes/interestgroups/components/InterestGroupEdit.js | app/routes/interestgroups/components/InterestGroupEdit.js | // @flow
import React, { Component } from 'react';
import GroupForm from 'app/components/GroupForm';
import styles from './InterestGroup.css';
import { Flex, Content } from 'app/components/Layout';
import { Link } from 'react-router';
import Button from 'app/components/Button';
export default class InterestGroupEdit e... | JavaScript | 0 | @@ -1018,206 +1018,8 @@
h1%3E%0A
- %3CButton%0A onClick=%7B() =%3E removeInterestGroup(interestGroup.id)%7D%0A className=%7Bstyles.deleteButton%7D%0A %3E%0A Slett gruppen%0A %3C/Button%3E%0A
|
3353d788c807ac9e62a3ef5d209245c382aa97b1 | disable logging of unknown uniforms | source/Renderer/shader.js | source/Renderer/shader.js | import { UniformStruct } from '../gltf/utils.js';
import { GL } from './webgl.js';
class gltfShader
{
constructor(program, hash, gl)
{
this.program = program;
this.hash = hash;
this.uniforms = new Map();
this.attributes = new Map();
this.unknownAttributes = [];
t... | JavaScript | 0 | @@ -2225,19 +2225,20 @@
, log =
-tru
+fals
e)%0A %7B
|
a984b98587eaec0dfcdc89c3194d5de474ee442b | Update index.js | index.js | index.js | // Load up the discord.js library
const Discord = require("discord.js");
// We also load the rest of the things we need in this file:
const { promisify } = require('util');
const readdir = promisify(require("fs").readdir);
// This is your client. Some people call it `bot`, some people call it `self`,
// some might ca... | JavaScript | 0 | @@ -1356,33 +1356,36 @@
else. %0A const
-f
+cmdF
iles = await rea
@@ -1439,33 +1439,36 @@
ng a total of $%7B
-f
+cmdF
iles.length%7D com
@@ -1471,33 +1471,36 @@
commands.%60);%0A
-f
+cmdF
iles.forEach(f =
@@ -1951,17 +1951,20 @@
const
-f
+evtF
iles = a
@@ -2032,17 +2032,20 @@
al of $%7B
-f
+evtF
iles... |
3079750e0869e5baecaf75904bba3578aecfb5fd | Add Player object creator functxion | app/server.js | app/server.js | const http = require('http');
const path = require('path');
const bodyParser = require('body-parser');
const express = require('express');
const WebSocket = require('ws');
const shortid = require('shortid');
const broadcast = require('./broadcast');
/**
* Main store of all game rooms
* Is used as in-memory database
... | JavaScript | 0.000001 | @@ -364,22 +364,154 @@
layers:
-Object
+%7B%0A * %5Bid%5D: %7B%0A * color: Array,%0A * type: String,%0A * score: Number,%0A * name: String%0A * %7D%0A * %7D
,%0A *
@@ -2026,16 +2026,39 @@
room', %7B
+gameID: req.params.id,
game: ga
@@ -2248,12 +2248,237 @@
= f... |
af20820b1d685287467532856e706c3251cf691b | Fix notation for RDATE | index.js | index.js | "use strict";
// Make sure lines are splited correctly
// http://stackoverflow.com/questions/1155678/javascript-string-newline-character
var NEW_LINE = /\r\n|\n|\r/;
var COLON = ":";
// var COMMA = ",";
// var DQUOTE = "\"";
// var SEMICOLON = ";";
var SPACE = " ";
/**
* Take ical string data and convert to JSON
*
... | JavaScript | 0 | @@ -2017,16 +2017,123 @@
%7B%0A
+if (key === 'RDATE') %7B%0A value.forEach(item =%3E lines.push(%60$%7Bkey%7D:$%7Bitem%7D%60));%0A %7D else %7B%0A
value.fo
@@ -2141,24 +2141,16 @@
Each
-(function
(item
-)
+ =%3E
%7B%0A
@@ -2148,32 +2148,34 @@
em =%3E %7B%0A
+
lines.push(%22... |
9cd9d3efe1791668bfda27fd51ae5b553d89fcc7 | Change name of variable response to data | ajax.js | ajax.js | define('ajax', ['qwest'], function(qwest) {
if (!String.prototype.trim) {
(function(){
// Make sure we trim BOM and NBSP
var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
String.prototype.trim = function () {
return this.replace(rtrim, "");
}
})();
}
if (!String.prototype.isEmpty) {
String.pro... | JavaScript | 0.000001 | @@ -757,32 +757,28 @@
en(function(
-response
+data
)%7B%0A%09%09%09%09%09if (
@@ -872,24 +872,20 @@
g.login(
-response
+data
, this);
@@ -992,32 +992,28 @@
cks.success(
-response
+data
, this);%0A%09%09%09
@@ -1050,32 +1050,28 @@
'%5D(function(
-response
+data
)%7B%0A%09%09%09%09%09if(c
@@ -1146,32 +1146,28 @@
... |
ce84d7a53ca1cfa775fa8f14e48014bf5bfcbeb9 | Remove emitChange from mixin.js | src/components/mixin.js | src/components/mixin.js | import twzipcode from 'twzipcode-data'
import { keyBy, identity } from 'lodash'
export default {
props: {
valueLocale: {
type: String,
default: 'zh-tw'
},
textLocale: {
type: String,
default: 'zh-tw'
},
selected: {
type: String
}
},
methods: {
getData ({ ... | JavaScript | 0.000001 | @@ -236,50 +236,8 @@
tw'%0A
- %7D,%0A selected: %7B%0A type: String%0A
@@ -1169,324 +1169,8 @@
%7D
-,%0A%0A emitChange (value) %7B%0A if (this.$root.bus) %7B%0A let id = this.$props.id%0A this.$root.bus.$emit(%60$%7Bid%7D:change%60, %7B%0A value%0A %7D)%0A ... |
121a87a98054ca409008c9dd38dba0390ff68bf2 | Remove the dropdown link if not required | tools/htdocs/components/10_Masthead_Tools.js | tools/htdocs/components/10_Masthead_Tools.js | /*
* Copyright [1999-2016] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
*
* 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.o... | JavaScript | 0 | @@ -1669,9 +1669,8 @@
if (
-!
resp
@@ -1680,24 +1680,151 @@
e.empty) %7B%0A%0A
+ this.elLk.toolsTabs.find('a:not(:first-child)').remove().end().find('.dropdown').removeClass('dropdown');%0A%0A %7D else %7B%0A%0A
this.e
|
92222d2dfc9462df5c3c4466ef2d307925144b17 | Fix bug on ValueResolver | ez-client/src/main/js/utils/value-resolver.js | ez-client/src/main/js/utils/value-resolver.js | import JSONPath from 'jsonpath';
import StringUtils from './string-utils';
// TODO: unit tests...
export default class ValueResolver {
/**
* Create a resolver function and immediately resolve the given value
*/
static resolve(value, props) {
return ValueResolver.create(props)(value);
}
/**
* Cre... | JavaScript | 0 | @@ -336,16 +336,26 @@
function
+ (closure)
which r
@@ -838,39 +838,32 @@
%7B%0A if (
-typeof
value ==
= %22number%22)%C2%A0
@@ -854,67 +854,17 @@
e ==
-= %22number%22)%C2%A0%7B%0A value = %22%22 + value;%0A %7D else if (
+ null %7C%7C
type
@@ -876,168 +876,20 @@
lue
-=
+!
== %22
-number%22... |
a71ea0eceab0348293b95db297d9bce18970431e | add missing height parameter | index.js | index.js | require('dotenv').load()
let debug = require('debug')('index')
let local = require('./local')
let parallel = require('run-parallel')
let rpc = require('./rpc')
let zmq = require('./zmq')
// recursively calls connectBlock(id) until `bitcoind[id].next` is falsy
function connectBlock (id, height, callback) {
debug(`Co... | JavaScript | 0.000007 | @@ -519,32 +519,40 @@
ocal.connect(id,
+ height,
(err) =%3E %7B%0A
|
638d3ed4aeedf5981d1aac791f9d6b723e486697 | Move dashboards to redux store | ui/src/dashboards/containers/DashboardPage.js | ui/src/dashboards/containers/DashboardPage.js | import React, {PropTypes} from 'react';
import {Link} from 'react-router';
import {connect} from 'react-redux'
import _ from 'lodash';
import Header from 'src/dashboards/components/DashboardHeader';
import EditHeader from 'src/dashboards/components/DashboardHeaderEdit';
import Dashboard from 'src/dashboards/components... | JavaScript | 0 | @@ -104,16 +104,58 @@
-redux'%0A
+import %7BbindActionCreators%7D from 'redux';%0A
import _
@@ -430,24 +430,92 @@
ges.hson';%0A%0A
+import * as dashboardActionCreators from 'src/dashboards/actions';%0A%0A
import %7BgetD
@@ -614,16 +614,53 @@
const %7B%0A
+ arrayOf,%0A bool,%0A func,%0A number,%0A
shape,
@@ ... |
a496c3fff5d0406ba7b33750c42d212dca286204 | Fix missing dependency. | index.js | index.js | var h = require('virtual-dom/h')
var Emitter = require('component-emitter')
var fields = require('data-fields')
var createHeader = require('./header')
/**
* Create a form from the row of a dataset and its properties
* @name createDataForm
* @param {Object} options
* @param {Boolean} options.header
* @param {Object} op... | JavaScript | 0.000004 | @@ -105,16 +105,57 @@
ields')%0A
+var formatter = require('data-format')()%0A
var crea
|
a0cac82e763f6b6e947bd28f409481eddc35882b | remove event listener after it fires once | site/source/js/script.js | site/source/js/script.js | var bgmap = L.map('background-map', {
center: [68.41, 16.53],
zoom: 10,
scrollWheelZoom: false,
doubleClickZoom: true,
touchZoom: true,
zoomControl: false,
tap: false,
attributionControl: false
});
L.esri.Layers.basemapLayer('Imagery', {
hideLogo: true
}).addTo(bgmap);
if (map) {
m... | JavaScript | 0.000001 | @@ -343,17 +343,16 @@
able();%0A
-%0A
map.on
@@ -365,22 +365,60 @@
k%22,
-function
+accidentalScroll);%0A%7D%0A%0Afunction accidentalScroll
()
+
%7B%0A
-
ma
@@ -447,13 +447,46 @@
le();%0A
-%7D)
+map.off(%22click%22, accidentalScroll);
%0A%7D%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.