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 |
|---|---|---|---|---|---|---|---|
6c2624db197e1a1d0eb015694c761f8354e263a1 | Add copyFromRepo method | src/index.js | src/index.js |
/**
* Module dependencies.
*/
import Client from './client';
/**
* Export application.
*/
export default async options => {
const { owner, repo, token, labels } = options;
// Instantiate client.
const client = new Client({ owner, repo });
// Authenticate user.
client.authenticate(token);
// Updat... | JavaScript | 0 | @@ -77,57 +77,72 @@
ort
-application.%0A */%0A%0Aexport default async
+%60updateLabels%60.%0A */%0A%0Aexport async function updateLabels(
options
- =%3E
+)
%7B%0A
@@ -327,14 +327,11 @@
//
-Update
+Set
the
@@ -408,22 +408,757 @@
client.
-update
+setLabels(labels);%0A%7D%0A%0A/**%0A * Export %60copyLabelsFr... |
b655e169fc749dfd40a62ba4816fdeb0cc274329 | Fix broken test | src/index.js | src/index.js | export default class {
constructor() {
this.property = false
}
}
| JavaScript | 0.000255 | @@ -58,12 +58,11 @@
y =
-fals
+tru
e%0A
|
36c7ee8efa872ad3ded2db6734c37c29540511f2 | Remove unnecessary 'meteor.' prefix from {main,test}Module self-tests. | tools/tests/app-config.js | tools/tests/app-config.js | var selftest = require('../tool-testing/selftest.js');
var Sandbox = selftest.Sandbox;
selftest.define("meteor.mainModule", function () {
const s = new Sandbox();
s.createApp("app-config-mainModule", "app-config");
s.cd("app-config-mainModule");
const run = s.run(
"test",
"--full-app",
"--driver-p... | JavaScript | 0.999955 | @@ -98,23 +98,16 @@
define(%22
-meteor.
mainModu
@@ -1917,23 +1917,16 @@
define(%22
-meteor.
testModu
|
edea7b3a885d5360afb3f2da68b9f6672a11306a | Remove redundant length check | src/index.js | src/index.js | export function createSelectorCreator(valueEquals) {
return (selectors, resultFunc) => {
if (!Array.isArray(selectors)) {
selectors = [selectors];
}
const memoizedResultFunc = memoize(resultFunc, valueEquals);
return state => {
const params = selectors.map(sel... | JavaScript | 0 | @@ -1280,68 +1280,8 @@
) %7B%0A
- if (a.length != b.length) %7B%0A return false;%0A %7D%0A
|
dc283e2e0d836a5ed18edcd2023721228f8958ad | test collection service | test/server/api/services/admin/usersSpec.js | test/server/api/services/admin/usersSpec.js | 'use strict';
var app = require('../../../../../api/Headless.api.js');
var service = require('../../../../../modules/service');
describe('users admin API service', function UsersTestSuite() {
it("should connect to the database", function(done) {
app.connect(function() {
done();
});
});
it("l... | JavaScript | 0 | @@ -68,65 +68,8 @@
s');
-%0Avar service = require('../../../../../modules/service');
%0A%0Ade
@@ -331,26 +331,20 @@
t =
+app.
service
-.load(app,
+(
'adm
@@ -605,11 +605,12 @@
;%0A%09%7D);%0A%0A
-
%7D);
+%0A
|
5c507afb3b5fab1e94b4a855dae25391f2821519 | update metrik video | src/pages/projects/Metrik/index.js | src/pages/projects/Metrik/index.js | import React, { Component, PropTypes } from 'react'
import { color } from '../../../vars'
import HeroFeature from '../../../components/HeroFeature'
import Container from '../../../components/Container'
import Column from '../../../components/Column'
import Block from '../../../components/Block'
import List from '../.... | JavaScript | 0 | @@ -3547,16 +3547,16 @@
deo/
-13218689
+20782092
1?co
|
ee8f50f45daea323b7c405c087f99bc55648b697 | add option | picPPT.js | picPPT.js | /*
* picPPT
*
* https://github.com/Mystist/picPPT
*
* Copyright (c) 2013 Foundation and other contributors
*
* License: https://github.com/Mystist/picPPT/blob/master/MIT-LICENSE.txt
*
*/
(function ($) {
var methods = {
init: function(options) {
var defaults = {
"subImgWidth": 55,
... | JavaScript | 0.000029 | @@ -337,16 +337,52 @@
%22: false
+,%0A %22intervalTime%22: 10000-6180
%0A %7D
@@ -3144,26 +3144,37 @@
%7D,
-10000-6180
+tThis.st.intervalTime
);%0A %7D
|
163dbd0b4e4296c9c906a8b3efab292aca0a848a | Fix the shebang in run.js to go before the copyright! | bin/run.js | bin/run.js | /**
* @license
* Copyright 2016 Google Inc. 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 requir... | JavaScript | 0 | @@ -1,8 +1,29 @@
+#!/usr/bin/env node%0A%0A
/**%0A * @
@@ -644,37 +644,16 @@
e.%0A */%0A%0A
-#!/usr/bin/env node%0A%0A
var lib
|
f99eb00a712f7ad8afe3d8c909499f346310ebd3 | Fix integration tests | src/parser/core/tests/log-tools.js | src/parser/core/tests/log-tools.js | import decompress from 'decompress';
import EventEmitter from 'parser/core/modules/EventEmitter';
import getConfig from 'parser/getConfig';
const _CACHE = {};
// asynchronously load and parse a log. returns a promise that resolves
// to the log object
export async function loadLog(filename) {
if (_CACHE[filename] !... | JavaScript | 0.000001 | @@ -1404,26 +1404,22 @@
const
-friendlies
+player
= log.r
@@ -1601,22 +1601,22 @@
const
-builds
+config
= getCo
@@ -1642,17 +1642,64 @@
r.specID
-)
+, log.meta.player.type);%0A const builds = config
.builds;
@@ -1928,16 +1928,28 @@
rClass(%0A
+ config,%0A
%7B%0A
@@ -2021,26 +2021,22 @@
%7D,%... |
35a5103c1664962b1f0c8ff68ff2647473ba8d78 | Remove console.log(name) debugging for fillmybelly | justeat.js | justeat.js | /************************************************************************************************
* Main content script for Just Check extension - displays food hygiene information on Just-Eat
* and Hungry House takeaway clearing house websites.
*
* For Hungry House, this only works when the website is in 'expande... | JavaScript | 0.000001 | @@ -2878,39 +2878,8 @@
s);%0A
- %0A console.log(name)%0A
%0A
|
cbe4bcb411826c9775f1d4cd6fa847f77dde4c33 | save create event form step | test/acceptance/features/events/step_definitions/event-create.js | test/acceptance/features/events/step_definitions/event-create.js | const faker = require('faker')
const { client } = require('nightwatch-cucumber')
const { defineSupportCode } = require('cucumber')
defineSupportCode(({ Given, Then, When }) => {
const Events = client.page.Events()
When(/^I navigate to the create an event page$/, async () => {
await Events
.navigate()
... | JavaScript | 0.000001 | @@ -6055,32 +6055,133 @@
meError')%0A %7D)%0A%0A
+ Then(/%5EI click the save button$/, async () =%3E %7B%0A await Events%0A .click('@saveButton')%0A %7D)%0A%0A
Then(/%5EI verif
|
af6278564285738707c9a4ca6ba98abbc8ef9a12 | Trim every key from data-i18n attribute before parsing. | src/index.js | src/index.js | const defaults = {
tName: 't',
i18nName: 'i18n',
handleName: 'localize',
selectorAttr: 'data-i18n',
targetAttr: 'i18n-target',
optionsAttr: 'i18n-options',
useOptionsAttr: false,
parseDefaultValueFromContent: true
};
function init(i18next, $, options = {}) {
options = { ...defaults, ...options };
... | JavaScript | 0 | @@ -2169,24 +2169,108 @@
ion(m, k) %7B%0A
+ // .trim(): Trim the comma-separated parameters on the data-i18n attribute.%0A
if (
@@ -2294,16 +2294,23 @@
arget, k
+.trim()
, opts);
|
0906ea18c5f151347fa503968bf71bace9121a78 | Update app.js | 6/cosmosdbwebapp/app.js | 6/cosmosdbwebapp/app.js | "use strict";
var config = require("./config");
var url = require('url');
var http = require('http');
// Create a connection to Cosmos DB
// Here, we use the Document model, and define a connection policy
var documentClient = require("documentdb").DocumentClient;
var lib = require("./node_modules/documentdb/... | JavaScript | 0.000002 | @@ -2050,24 +2050,26 @@
dpoint + '%5Cn
+%5Cn
');%0D%0A %7D);
|
037ef730bf9ae2c1a4cda53f32adf89bd4872520 | Use Heroku database connection | config/production.js | config/production.js | 'use strict';
const postgres = {
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
name: process.env.DB_NAME,
port: process.env.DB_PORT,
};
module.exports = {
knex: {
dialect: 'pg',
connection: {
host: postgres.host,
user: postgres.user,
pas... | JavaScript | 0 | @@ -12,402 +12,96 @@
';%0A%0A
-const postgres = %7B%0A host: process.env.DB_HOST,%0A user: process.env.DB_USER,%0A password: process.env.DB_PASSWORD,%0A name: process.env.DB_NAME,%0A port: process.env.DB_PORT,%0A%7D;%0A%0Amodule.exports = %7B%0A knex: %7B%0A dialect: 'pg',%0A connection: %7B%0A host: ... |
9b80a673f24eb91e3b433010bbaa4f76a9b7af82 | Use bash notation to get the username | lib/partials/username.js | lib/partials/username.js | //
// BEGIN LICENSE BLOCK
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Raül Pérez
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitati... | JavaScript | 0.000001 | @@ -1249,27 +1249,13 @@
urn
-process.env.LOGNAME
+%22%5C%5Cu%22
;%0A%7D;
|
689bd0efbcf02623243790aa191c450e743c039a | make serializable | lib/dependencies/ContextElementDependency.js | lib/dependencies/ContextElementDependency.js | /*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const ModuleDependency = require("./ModuleDependency");
class ContextElementDependency extends ModuleDependency {
constructor(request, userRequest) {
super(request);
if (userRequest) {
this.userR... | JavaScript | 0.000008 | @@ -109,16 +109,78 @@
rict%22;%0A%0A
+const makeSerializable = require(%22../util/makeSerializable%22);%0A
const Mo
@@ -227,16 +227,16 @@
ency%22);%0A
-
%0Aclass C
@@ -341,16 +341,17 @@
quest);%0A
+%0A
%09%09if (us
@@ -451,17 +451,348 @@
nt%22;%0A%09%7D%0A
-%7D
+%0A%09serialize(context) %7B%0A%09%09const %7B wri... |
d83589d4f8147ece3eff1f7db9151f21ca9dd587 | replace deprecated avoriaz function | test/unit/specs/components/NoteForm.spec.js | test/unit/specs/components/NoteForm.spec.js | import Vuex from 'vuex'
import { mount } from 'avoriaz'
import cloneDeep from 'lodash/cloneDeep'
import '@/directives'
import '@/filters'
import { options } from '@/store'
import NoteForm from '@/components/NoteForm'
jest.mock('@/firebaseApp')
describe('NoteForm', () => {
let testOptions
beforeEach(() => {
t... | JavaScript | 0.000028 | @@ -1093,16 +1093,15 @@
%5B0%5D.
-dispatch
+trigger
('cl
|
1ea0595806750b52ae10cf71b75498e7b6dd37e7 | return pollinfo | route/voteRouter.js | route/voteRouter.js | 'use strict';
const express = require('express');
const twilio = require('twilio');
const debug = require('debug')('rv:vote-router');
const httpError = require('http-errors');
const ExpressSSE = require('express-sse');
const Poll = require('../model/poll');
const User = require('../model/user');
const voteRouter = n... | JavaScript | 0.000227 | @@ -1480,16 +1480,35 @@
le-line%0A
+ return pollInfo;%0A
%7D%0A%0AvoteR
|
e154eb3a89b2ac791ec3eeb3b431a4a73d49bea1 | update templates/default test image (#485) | tests/images/create.js | tests/images/create.js | exports.default = [
'.gitignore',
'package.json',
'README.md',
'src/assets/favicon.ico',
'src/assets/icons/android-chrome-192x192.png',
'src/assets/icons/android-chrome-512x512.png',
'src/assets/icons/apple-touch-icon.png',
'src/assets/icons/favicon-16x16.png',
'src/assets/icons/favicon-32x32.png',
'src/asset... | JavaScript | 0 | @@ -59,16 +59,33 @@
ME.md',%0A
+%09'src/.babelrc',%0A
%09'src/as
@@ -641,16 +641,122 @@
dex.css'
+,%0A%09'src/tests/__mocks__/browserMocks.js',%0A%09'src/tests/__mocks__/fileMocks.js',%0A%09'src/tests/header.test.js'
%0A%5D;%0A%0Aexp
|
9d1676804725b71d32c7c206de39a34964aba306 | Support closing of InAppBrowser on BlackBerry 10 | lib/blackberry/plugin/qnx/InAppBrowser.js | lib/blackberry/plugin/qnx/InAppBrowser.js | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); y... | JavaScript | 0 | @@ -890,16 +890,118 @@
rowser')
+,%0A browser = %7B%0A close: function () %7B %7D //dummy so we don't have to check for undefined%0A %7D
;%0A%0Avar n
@@ -1056,32 +1056,39 @@
sted) %7B%0A
+return
core._orig.apply
@@ -1222,32 +1222,59 @@
ion.href = url;%0A
+ return window;%0A
... |
91ec81d965513dc77348a5efcb07028952852358 | remove console.log | src/index.js | src/index.js | import http from 'http';
import express from 'express';
import cors from 'cors';
import morgan from 'morgan';
import bodyParser from 'body-parser';
import initializeDb from './db';
import middleware from './middleware';
import api from './api';
import config from '../config/';
let app = express();
app.server = http.cr... | JavaScript | 0.000006 | @@ -555,26 +555,8 @@
%3E %7B%0A
-%09console.log(db);%0A
%09//
|
545c95535c613a0b93e938a4e881d8f96448726c | Update app.js | lib/app.js | lib/app.js | 'use strict'
const http = require('http');
const https = require('https');
class Tiny {
/*
* create a Tiny instance.
* you need credential options to set up a https server.
* Example:
*
* const fs = require('fs');
*
* const options = {
* key: fs.readFileSync('test/fixtures/keys/age... | JavaScript | 0.000002 | @@ -84,24 +84,25 @@
Tiny %7B%0A%0A /*
+*
%0A * create
@@ -853,24 +853,25 @@
%7D%0A %7D%0A%0A /*
+*
%0A * bind a
@@ -1181,16 +1181,17 @@
%7D%0A%0A /*
+*
%0A * li
|
b9be98d857d7f839061aeaa8bb3ecd76579f9793 | move browser input check into constructor | lib/components/form/date-time-selector.js | lib/components/form/date-time-selector.js | // import moment from 'moment'
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, FormGroup, FormControl, Row, Col, Button } from 'react-bootstrap'
// import { SingleDatePicker } from 'react-dates'
import { connect } from 'react-redux'
import moment from 'moment'
import { setQuery... | JavaScript | 0.000007 | @@ -461,16 +461,158 @@
/time'%0A%0A
+function checkInput (type) %7B%0A var input = document.createElement('input')%0A input.setAttribute('type', type)%0A return input.type === type%0A%7D%0A%0A
class Da
@@ -1108,201 +1108,8 @@
%7D%0A
- %7D%0A%0A componentDidMount () %7B%0A const checkInput = (type) =%3E %7B... |
220362f1e8c0d4e92f17f7eb4746c8a2a5734021 | Update index.js | src/index.js | src/index.js | import React from 'react';
import PropTypes from 'prop-types';
export default class ReactGoogleAutocomplete extends React.Component {
static propTypes = {
onPlaceSelected: PropTypes.func,
types: PropTypes.array,
componentRestrictions: PropTypes.object,
bounds: PropTypes.object,
fields: PropTypes.... | JavaScript | 0.000002 | @@ -1502,24 +1502,11 @@
= '
-disable-autofill
+off
';%0A
|
34852bf55d1a27debaafb33928c3d8f6c414f705 | use of const instead let | lib/css/classes/node-collection-vendor.js | lib/css/classes/node-collection-vendor.js | "use strict";
let NodeVendor = require('./node-vendor');
/**
* Class with common methods for nodes with vendors that behaves like collections
*/
class NodeCollectionVendor extends require('./node-collection-name') {
clone (data) {
let clone = super.clone(data);
clone.vendor = this.vendor;
... | JavaScript | 0 | @@ -8,18 +8,20 @@
rict%22;%0A%0A
-le
+cons
t NodeVe
|
9b1cf16ef6ebdb2c98f02d7efe26701b6837ce80 | make sure connection is open before sending command | src/index.js | src/index.js | import assert from 'assert';
import WebSocket from 'ws';
import wsmp from 'websocket-monkeypatch';
import { log, error } from './log';
import TunnelClient from './tunnel-client';
wsmp(WebSocket);
const serverUrl = process.env.TC_SERVER_URL || 'ws://localhost:8080/ws';
const networkId = process.env.TC_NETWORK_ID;
con... | JavaScript | 0.000001 | @@ -682,24 +682,83 @@
n', () =%3E %7B%0A
+ if (this._wsConn.readyState === this._wsConn.OPEN) %7B%0A
log('Suc
@@ -790,16 +790,18 @@
shed');%0A
+
retr
@@ -813,16 +813,18 @@
0;%0A
+
ws.sendC
@@ -862,16 +862,22 @@
orkId);%0A
+ %7D%0A
%7D);%0A%0A
|
8c1624307309ba32cd964a058c1b8a8e12e92956 | add ; | lib/plugins/helper/is.js | lib/plugins/helper/is.js | 'use strict';
function isCurrentHelper(path, strict) {
path = path || '/';
var currentPath = this.path.replace(/^[^\/].*/, function(_) {
return '/' + _
});
if (strict) {
if (path[path.length - 1] === '/') path += 'index.html';
path = path.replace(/^[^\/].*/, function(_) {
return '/' + _
... | JavaScript | 0 | @@ -149,24 +149,26 @@
turn '/' + _
+ ;
%0A %7D);%0A%0A if
@@ -310,16 +310,18 @@
'/' + _
+ ;
%0A %7D)%0A
@@ -533,16 +533,18 @@
'/' + _
+ ;
%0A %7D)%0A%0A
|
3068b78e80ac545afcfe511b6a4d55fe6990eea7 | add mouse vector | src/index.js | src/index.js | import helpers from './helpers/helpers'
const { flatten, sampleArray, roundDown } = helpers
import { scaleOrdinal, schemeCategory10, scaleLinear } from 'd3-scale'
import { forceSimulation, forceLink, forceManyBody, forceCenter, forceX, forceY } from 'd3-force'
import { select, selectAll, event } from 'd3-selection'
imp... | JavaScript | 0.000001 | @@ -708,16 +708,47 @@
cene(),%0A
+ mouse = new THREE.Vector2(),%0A
camera
@@ -5106,16 +5106,165 @@
gth)%0A%7D%0A%0A
+document.addEventListener(%22mousemove%22, e =%3E %7B%0A e.preventDefault()%0A mouse.x = (e.pageX / width) * 2 - 1%0A mouse.y = -(e.pageY / height) * 2 + 1%0A%7D)%0A%0A
Promise.
|
79bee058343aa2af1330c5d522e4ea2e11739f2b | Remove entityInSight | lib/plugins/ray_trace.js | lib/plugins/ray_trace.js | const Vec3 = require('vec3')
module.exports = inject
function inject (bot) {
const rayTraceBlock = (maxSteps = 256, vectorLength = 5 / 16) => {
const { height, position, yaw, pitch } = bot.entity
const cursor = position.offset(0, height, 0)
const x = -Math.sin(yaw) * Math.cos(pitch)
const y = Math.... | JavaScript | 0.000056 | @@ -661,640 +661,39 @@
%0A%0A
-const rayTraceEntity = (maxSteps = 256, vectorLength = 5 / 16) =%3E %7B%0A const %7B height, position, yaw, pitch %7D = bot.entity%0A const cursor = position.offset(0, height, 0)%0A%0A const x = -Math.sin(yaw) * Math.cos(pitch)%0A const y = Math.sin(pitch)%0A const z = -... |
ebba4fc8e7e857a2c904107c3f3fa9b0e28b02cc | Create playlist returns playlist instead of id | routes/playlists.js | routes/playlists.js | var express = require('express');
var router = express.Router();
var Sequelize = require('sequelize');
var Playlist = require('../models/playlist');
var PlaylistVideo = require('../models/playlistVideo');
var PlaylistUser = require('../models/playlistUser');
var Video = require('../models/video');
var User = require('.... | JavaScript | 0 | @@ -2736,24 +2736,182 @@
playlist) %7B%0A
+ Playlist.findOne(%7Bwhere: %7Bid: playlist.id%7D,%0A include: %5B%0A %7Bmodel: User, attributes: %5B'username'%5D%7D%0A %5D%7D).then(function(playlistResult)%7B%0A
res.json
@@ -2928,18 +2928,24 @@
: true,
-id
+playlist
: playli
@@ -2946,19 +29... |
99e32c66b177f698faa6905546eab9c8f1fc86bc | check rights for articles | app/controllers/articleController.js | app/controllers/articleController.js | /**
* Created by vedi on 11/15/13.
*/
'use strict';
var
_ = require('lodash'),
Q = require('q'),
Article = require('mongoose').model('Article'),
BaseController = require('./base.server.controller')
;
var ArticleController = BaseController.extend({
ModelClass: Article,
path: '/api/articles',
fields: ['t... | JavaScript | 0 | @@ -96,16 +96,60 @@
e('q'),%0A
+ HTTP_STATUSES = require('http-statuses'),%0A
Articl
@@ -623,88 +623,577 @@
,%0A
-prepareData: function (req, res, callback) %7B%0A callback(null, %7Buser: req.user%7D
+updateOptions: %7B%0A pre: function(req, res, callback) %7B%0A if (req.restifizer.action !== 'delete... |
9d6ff82017931c660ea6d659e22d0b405e5bf388 | Return full quote objects from Quote API, Change / to /create | routes/v1/quotes.js | routes/v1/quotes.js | var express = require('express');
var router = express.Router();
var models = require('../../models/index');
router.get('/', function (req, res) {
models.Quote.find({}).then(function (quotes) {
return res.json({count: quotes.length, quotes: quotes});
});
});
router.get('/random', function (req, res) {
mode... | JavaScript | 0 | @@ -475,24 +475,30 @@
uter.post('/
+create
', function
@@ -677,22 +677,29 @@
n (err,
-result
+existingQuote
) %7B%0A
@@ -789,14 +789,21 @@
if (
-result
+existingQuote
) %7B%0A
@@ -832,24 +832,46 @@
s(200).json(
+%7Bquote: existingQuote%7D
);%0A %7D%0A
@@ -875,17 +875,20 @@
var
-q
+newQ
uote =... |
e93809e418ccf6050924455220509233fae6aa4b | fix stupid typo | src/index.js | src/index.js | function XHR() {
if (window.XMLHttpRequest) return new XMLHttpRequest();
try { return new ActiveXObject('msxml2.xmlhttp.6.0'); } catch (e) {}
try { return new ActiveXObject('msxml2.xmlhttp.3.0'); } catch (e) {}
try { return new ActiveXObject('msxml2.xmlhttp'); } catch (e) {}
}
function contains(array, value) {... | JavaScript | 0.99999 | @@ -1609,25 +1609,25 @@
f (req.ready
-s
+S
tate !== 4)
|
57f024721df3cd15a4480532ed2d4283c1717ce3 | Handle load error | src/index.js | src/index.js | import React, { PureComponent } from 'react'
// Returns a new stateful component, given the specified state handlers and a pure component to render with
export default (Pure, handlersIn, { onChange } = {}) => class Organism extends PureComponent {
state = handlersIn.initial(this.props)
// Uses `load` handler, if ... | JavaScript | 0.000001 | @@ -533,16 +533,77 @@
dater))%0A
+ .catch(error =%3E this.setState(%7B loadError: error %7D))%0A
%7D%0A
|
9785b3e829832717f7070d23a57985e122e1619c | Add checks for render environment and window object | src/index.js | src/index.js | import React, { Component, PropTypes } from 'react';
export let IntercomAPI = window.Intercom || function() { console.warn('Intercom not initialized yet') };
export default class Intercom extends Component {
static propTypes = {
appID: PropTypes.string,
app_id: PropTypes.string
};
static displayName = ... | JavaScript | 0 | @@ -45,16 +45,129 @@
'react';
+%0Aconst canUseDOM = !!(%0A (typeof window !== 'undefined' &&%0A window.document && window.document.createElement)%0A);
%0A%0Aexport
@@ -176,32 +176,46 @@
et IntercomAPI =
+ (canUseDOM &&
window.Intercom
@@ -214,16 +214,17 @@
Intercom
+)
%7C%7C func
@@ -558,22 +558,34 @@
(!app... |
20f8296722d42f1a32889f7fdb1c0007c9bdf56e | Update index.js | src/index.js | src/index.js | var transformFor = require("./forStatement");
var transformIf = require("./ifStatement");
var transformChoose = require("./chooseStatement");
var transformWith = require("./withStatement");
module.exports = function jcsPlugin(babel) {
var nodeHandlers = {
For: transformFor(babel),
If: transformIf(babel),
... | JavaScript | 0.000002 | @@ -439,35 +439,8 @@
) %7B%0A
- // console.log(path)%0A
|
26bf82cbe0c052d0b5501ed8a9e9f794adca56fc | Fix entry script | src/index.js | src/index.js | var createApp = require("./create_app.js");
module.exports = createApp;
| JavaScript | 0.000001 | @@ -64,10 +64,18 @@
reateApp
+.default
;%0A
|
c568c5f502d8df50a1407a6d6737b6133722b429 | Fix a bug in Gerrit backend. | src/backends/gerrit.js | src/backends/gerrit.js | // Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | JavaScript | 0.000001 | @@ -5121,17 +5121,37 @@
ers.find
-(
+Index(%0A
(user) =
|
fc27bb859a3f41ce7b60357c4dd7fe713777b89f | Reset style after execute output | src/index.js | src/index.js | // Stringify styles
function stringify(style) {
if (typeof style === 'string') {
return style
}
return Object.keys(style)
.map(key => {
return `${key}:${style[key]}`
})
.join(';')
}
function capitalize(word) {
return word[0].toUpperCase() + word.slice(1)
}
function cholk(text) {
retur... | JavaScript | 0.000002 | @@ -308,22 +308,30 @@
xt) %7B%0A
-return
+const result =
%7B%0A s
@@ -375,16 +375,61 @@
xt,%0A %7D%0A
+ cholk._style = %7B%7D // Reset%0A return result%0A
%7D%0A%0Acholk
|
aa18609d5b9b9c78666de21820a3bdd02b7956ef | abort on inconsistent data | lib/nxt.js | lib/nxt.js | (function() {
const nxtjs = require('nxtjs');
const DoubleChecker = require('doublechecker');
const config = require('./config');
class Nxt {
constructor() {
this.client = new DoubleChecker({
numUseSources: config.get('nxt:numSources'),
dataType: 'json',
ignoreJSONKeys: co... | JavaScript | 0.000003 | @@ -131,16 +131,48 @@
nfig');%0A
+ const log = require('./log');%0A
%0A%0A clas
@@ -672,16 +672,384 @@
%7D%0A
+ if (data.score %3C 1) %7B%0A console.log(data.data)%0A const numNodes = Math.round(data.frequency / data.score);%0A log.error(%0A 'Inconsisten... |
011afdc120ba5accd1bffb344e1eb04b101523f8 | fix radius for smaller sampling | elevation/js/elevation.js | elevation/js/elevation.js | var app = angular.module('elevation', []);
var hash_params = L.Hash.parseHash(location.hash);
serviceUrl = server.prod;
token = accessToken.prod;
//??
app.run(function($rootScope) {
var hash_loc = hash_params ? hash_params : {
'center' : {
'lat' : 47.2200,
'lng' : 9.3357
},
'zoom' : 12
};... | JavaScript | 0 | @@ -1466,27 +1466,8 @@
4',%0A
- size: '90%25',%0A
@@ -3656,18 +3656,17 @@
%5D.lon%5D,
-10
+5
, resamp
|
fd7cafbe70c49863fc4f9db4b24bd59557ae4848 | make Blocky from signer Addr | app/containers/Dashboard/index.js | app/containers/Dashboard/index.js | import React, { PropTypes } from 'react';
import QRCode from 'qrcode.react';
import { FormattedMessage } from 'react-intl';
import { createStructuredSelector } from 'reselect';
import { makeSelectAccountData } from '../AccountProvider/selectors';
import messages from './messages';
import { modalAdd, modalDismiss } fro... | JavaScript | 0 | @@ -177,18 +177,16 @@
%0A%0Aimport
- %7B
makeSel
@@ -199,16 +199,42 @@
ountData
+, %7B makeSignerAddrSelector
%7D from
@@ -2431,29 +2431,26 @@
s.props.
-account.proxy
+signerAddr
%7D /%3E%0A
@@ -3978,16 +3978,48 @@
es.any,%0A
+ signerAddr: PropTypes.string,%0A
accoun
@@ -4127,16 +4127,56 @@
Data(),%0A... |
37a82a35de898d88c0499e24aed17fbacc0035fb | remove spaces | lib/req.js | lib/req.js |
/**
* Module dependencies.
*/
var request = require('superagent');
var merge = require('extend');
var qs = require('querystring');
var ends = require('./endpoints');
var debug = require('debug')('wp-connect:req');
/**
* Default options
*/
var default_opts = {
url: {
api_rest_v1: "https://public-api.wordp... | JavaScript | 0.00073 | @@ -1147,17 +1147,16 @@
%0A %7D%0A%0A
-
opts = o
@@ -1922,25 +1922,24 @@
pts.data) %7B%0A
-
req.send
|
a82247a15ef404d1584b415c38063a6a44e77cc5 | test mongolab | config/_base.js | config/_base.js | /* eslint key-spacing:0 spaced-comment:0 */
import _debug from 'debug';
import path from 'path';
import { argv } from 'yargs';
const debug = _debug('app:config:_base');
const config = {
env : process.env.NODE_ENV || 'development',
// ----------------------------------
// Project Structure
// -----------------... | JavaScript | 0.00001 | @@ -681,80 +681,72 @@
db:
-'mongodb://%3Cdbuser%3E:%3Cdbpassword%3E@ds025792.mlab.com:25792/heroku_ng4rkjxz
+ process.env.MONGOLAB_URI %7C 'mongodb://localhost:27017/hackathon
',%0A%0A
|
7de34b8ec8849e93206af0ca4131ff5bb03af7c8 | Fix linting error | lib/run.js | lib/run.js | 'use strict'
const { join, resolve } = require('path')
const { app, ipcMain: ipc, powerSaveBlocker } = require('electron')
const { createWindow } = require('electron-window')
const { errors, helpers, ONE_AND_DONES } = require('./mocha')
const run = require('mocha/lib/cli/run')
const ansi = require('ansi-colors')
const... | JavaScript | 0.000001 | @@ -3287,16 +3287,17 @@
if
+
(argv.in
@@ -3300,16 +3300,17 @@
v.index)
+
%7B%0A
@@ -3311,20 +3311,19 @@
-
-
if
+
(fs.exis
@@ -3362,16 +3362,17 @@
index)))
+
%7B%0A
@@ -3371,28 +3371,24 @@
%7B%0A
-
-
argv.index =
@@ -3432,15 +3432,15 @@
-
%7D
+
else
+ ... |
40880447545913f075682c4c50f005d72cda7c81 | clean up | config/tasks/copy.js | config/tasks/copy.js | var vfs = require("vinyl-fs");
module.exports = function(config) {
return function () {
return vfs.src([
config.paths.fonts + "**/*",
config.paths.img + "**/*",
config.paths.webRoot + "email.php"
]).pipe(vfs.dest(config.paths.build));
};
};
| JavaScript | 0.000001 | @@ -221,19 +221,16 @@
ths.
-webRoot
+app
+ %22
+/
emai
|
b04c13fc4d3b419bac6935108e4453a3e397f91e | Use rollup json parser | config/entry.js | config/entry.js | const replace = require('rollup-plugin-replace');
const buble = require('rollup-plugin-buble');
const banner = require('./banner');
const pack = require('../package.json');
function toUpper (_, c) {
return c ? c.toUpperCase() : '';
}
const classifyRE = /(?:^|[-_/])(\w)/g;
function classify (str) {
return str.repl... | JavaScript | 0.000001 | @@ -85,24 +85,68 @@
in-buble');%0A
+const json = require('rollup-plugin-json');%0A
const banner
@@ -1044,16 +1044,30 @@
gins: %5B%0A
+ json(),%0A
bu
|
64c81fdc95e28638a193728e9ae651b76dec08b5 | copy webpack plugin wasn't in production config | webpack.production.config.js | webpack.production.config.js | 'use strict';
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var StatsPlugin = require('stats-webpack-plugin');
module.exports = {
entry: [
path.join(__dirname, 'app/main.js')
... | JavaScript | 0 | @@ -122,24 +122,80 @@
k-plugin');%0A
+var CopyWebpackPlugin = require('copy-webpack-plugin');%0A
var ExtractT
@@ -242,24 +242,24 @@
k-plugin');%0A
-
var StatsPlu
@@ -1033,16 +1033,77 @@
)%0A %7D)
+,%0A new CopyWebpackPlugin(%5B%0A %7B from: 'assets' %7D%0A %5D)
%0A %5D,%0A
@@ -1391,17 +1391,16 @@... |
ee8aa3b5150915461ad00a05e49aae3ee666ca8e | Fix "Looks good" unit test. | app/editors/reagic-editor.spec.js | app/editors/reagic-editor.spec.js | var React = require("react");
var renderToDOMNode = require("../render-to-dom-node.js");
var ReagicEditor = require("./reagic-editor.js");
class EditorExample extends ReagicEditor {
renderEditor(){
return <input onChange={() => this.onChange()} ref="input"></input>
}
readData(value){
var ne... | JavaScript | 0 | @@ -1379,18 +1379,9 @@
in(%22
-Looks good
+%E2%9C%94
%22);%0A
|
40ef493ba51ee8b6d67c5bc34b8ddfe2d899bab1 | include support for brackets | templatestring.js | templatestring.js | "use strict";
module.exports = function(str, obj) {
str = str || "";
return str.replace(/\$\{[^}]+\}/g, function(match){
var keyArray = match.replace(/^\$\{|}$/g, "").split(".");
var currentVal = obj;
for(var i = 0; i < keyArray.length; i++) {
currentVal = currentVal[keyArra... | JavaScript | 0 | @@ -8,16 +8,833 @@
rict%22;%0A%0A
+function createIndexArray(str) %7B%0A /** Take the index specified in the template and convert it into an array%0A * of indecies that will be applied to the obj argument%0A */%0A // start by splitting the string on periods or braces.%0A // we explicitly claim proper... |
8674091b8af2ebd80e79572d40fa61e92aef49eb | fix tautology in Ukrainian language title | customize.dist/messages.js | customize.dist/messages.js | (function () {
// add your module to this map so it gets used
var map = {
'ca': 'Català',
'cs': 'Čeština',
'de': 'Deutsch',
'el': 'Ελληνικά',
'es': 'Español',
'eu': 'Euskara',
'fi': 'Suomi',
'fr': 'Français',
//'hi': 'हिन्दी',
'it': 'Italiano',
'ja': '日本語',
'nb': 'Norwegi... | JavaScript | 0.999992 | @@ -507,25 +507,18 @@
': '
-%D1%83
+%D0%A3
%D0%BA%D1%80%D0%B0%D1%97
-%CC%81
%D0%BD%D1%81%D1%8C%D0%BA%D0%B0
- %D0%BC%D0%BE%CC%81%D0%B2%D0%B0
',%0A
|
62dc2032179d73882d41193bf6fdc0ba52e8ddd7 | set error.details to an empty string, when none are available, closes #95 | lib/server/send-error.js | lib/server/send-error.js | 'use strict';
let l10n = require('./l10n');
function sendError (req, res, next) {
if (!res) return next();
res.sendError = (status, message, details) => {
if (status instanceof Error && status.name === 'MongoError' && status.code == 11000) { // duplicate key
message = 'duplicate key';... | JavaScript | 0.000001 | @@ -1065,16 +1065,37 @@
.json(%7B
+%0A
message:
@@ -1111,16 +1111,36 @@
slation,
+%0A
details
@@ -1148,16 +1148,22 @@
details
+ %7C%7C ''
%7D)%0A
|
5644b36f31c134e2b922da8416746ec290f92135 | Update status bar immediately after changing pane items | lib/status-bar-view/dafny-status-bar-view.js | lib/status-bar-view/dafny-status-bar-view.js | 'use babel';
import {
Disposable,
CompositeDisposable,
} from 'atom';
import DafnyStatusBarElement from './dafny-status-bar-element.js';
export default class DafnyStatusBarView {
constructor(statusBar) {
this.statusBar = statusBar;
this.statusBarElements = new Map();
this.subscriptions = new Compo... | JavaScript | 0 | @@ -442,20 +442,14 @@
nDid
-Stop
Chang
-ing
+e
Acti
|
b1a707a491933d0cab291ebf5d38247296b44226 | Add rests in generator | app/generator/smgGeneratorFactory.js | app/generator/smgGeneratorFactory.js | /**
* Music Generator
* @param ngModule
*/
module.exports = function (ngModule) {
ngModule.factory('Generator', function () {
var Service = {
createMusic: createMusic
};
var currentAttributes = {};
function createMusic() {
var output = 'tabstave notation=... | JavaScript | 0 | @@ -3709,46 +3709,221 @@
-output += oneBeatOutput(notesToMake);%0A
+var isRest = randomNumber(1, 5) === 1 ? true : false;%0A output += oneBeatOutput(notesToMake);%0A%0A if(isRest) %7B%0A // rests%0A output += ' ## ';%0A %7D else %7B%0A
@@ -39... |
9907b822c60d75816f8bcd3929efbf1e7a0ad845 | Update RockPaperScissors.js | skills/RockPaperScissors.js | skills/RockPaperScissors.js | module.exports = function(skill, info, bot, message, db) {
var userData = message.text.match(/\<(.*?)\>/g);
console.log('messaage text: ' + message.text);
console.log('userdata' + userData);
if (userData) {
// if there is a user is mentioned initiate the challenge!
//for (var i = 0, len = userData... | JavaScript | 0 | @@ -1200,32 +1200,61 @@
ame.toString();%0A
+ console.log(challenged);%0A
%7D);%0A %0A
@@ -1432,24 +1432,57 @@
toString();%0A
+ console.log(challenger);%0A
%7D);%0A
|
1a5ee341e8737544e0f884273bd12f4596170f77 | fix Google Analytics code | webpack.production.config.js | webpack.production.config.js | var Webpack = require('webpack');
var path = require('path');
var nodeModulesPath = path.resolve(__dirname, 'node_modules');
var buildPath = path.resolve(__dirname, 'public', 'build');
var mainPath = path.resolve(__dirname, 'app', 'scripts', 'index.jsx');
var autoprefixer = require('autoprefixer-core');
module.exports... | JavaScript | 0.000003 | @@ -1047,16 +1047,17 @@
pp.com%22'
+,
%0A
|
a38814610c63ea71e94f7f8bc999ad1b163bd7e6 | set watcher to testfiles | app/templates/Gruntfile.js | app/templates/Gruntfile.js | 'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*'... | JavaScript | 0.000001 | @@ -624,32 +624,127 @@
sass'%5D%0A %7D,%0A
+ scripts: %7B%0A files: %5B'js/*.js', 'test/*Spec.js'%5D,%0A tasks: %5B'test'%5D%0A %7D,%0A
livereload
|
7598e11a0515f221a167a37a10ff22c696d464e1 | Update BlocksWorker.js | CNN/Net/BlocksWorker.js | CNN/Net/BlocksWorker.js | /**
* @file This file is both an importable module and a main javascript file of web worker.
*
*/
//import * as Blocks from "./Blocks.js";
export { Proxy };
/**
* A wrapper of worker for
* Many workers cascade in chain. Every worker handles one neural network. When apply() is called, the input (usually a large m... | JavaScript | 0.000001 | @@ -1483,16 +1483,18 @@
rkerId %3C
+ (
totalWo
@@ -1502,16 +1502,22 @@
kerCount
+ - 1 )
), the
@@ -1561,16 +1561,32 @@
/%0A init
+_and_create_next
( totalW
@@ -1618,24 +1618,43 @@
orkerId ) %7B%0A
+//??? in cascade ?%0A
this.dis
@@ -1785,16 +1785,182 @@
%7C%7C 0;%0A%0A
+ let remainedWorkerCount = t... |
e5e5c7206995bedcb5496c1a62c64ca241a6ed2f | Fix humanize filter | app/javascript/packs/config_field.js | app/javascript/packs/config_field.js | 'use strict'
import 'lodash/lodash'
const ConfigField = {
template: "#vue-config-field",
props: [
"pluginType",
"option",
"initialExpression",
"initialTimeFormat",
],
data: function() {
return {
expression: null,
timeFormat: null
}
},
filters: {
humanize: function(... | JavaScript | 0.000011 | @@ -366,11 +366,12 @@
ace(
-%22_%22
+/_/g
, %22
|
0f4d6771231762ec8c71f20c5da99f7ae639c0b3 | fix unit test | test/garment-purchasing/delivery-order/xls.js | test/garment-purchasing/delivery-order/xls.js | var should = require('should');
var helper = require("../../helper");
var DeliveryOrderManager = require("../../../src/managers/garment-purchasing/delivery-order-manager");
var deliveryOrderManager = null;
var DataUtil = require("../../data-util/garment-purchasing/delivery-order-data-util");
var validate = require("dl-... | JavaScript | 0.000001 | @@ -1806,24 +1806,26 @@
fset=0;%0A
+//
info.user=%22u
|
34cfd1e71311299f17c3d91b96a6313d6aaccab6 | Implement Announce Banner for /benefit | src/scenes/home/landing/landing.js | src/scenes/home/landing/landing.js | import React from 'react';
import LinkButton from 'shared/components/linkButton/linkButton';
import Donate from 'shared/components/donate/donate';
import Join from 'shared/components/join/join';
import WhatWeDo from './whatWeDo/whatWeDo';
import Membership from './membership/membership';
import MoreInformation from './... | JavaScript | 0 | @@ -93,22 +93,30 @@
%0Aimport
-Donate
+AnnounceBanner
from 's
@@ -136,69 +136,37 @@
nts/
-donate/donate';%0Aimport Join from 'shared/components/join/join
+announceBanner/announceBanner
';%0Ai
@@ -334,52 +334,8 @@
ort
-Partners from './partners/partners';%0Aimport
Succ
@@ -382,16 +382,307 @@
sStories
+';%0Aim... |
052dc884f3fbaa605a76daeaf340fe7c231ce6b7 | Update TensorTools.js | CNN/util/TensorTools.js | CNN/util/TensorTools.js | export { Comparator, Asserter_Equal };
/**
*
*/
class Comparator {
/** @return Return true, if two array of tensor are equal by value. */
static isTensorArrayEqual( tensorArray1, tensorArray2 ) {
if ( tensorArray1 === tensorArray2 )
return true;
if ( tensorArray1 == null || tensorArray2 == null ... | JavaScript | 0 | @@ -3550,16 +3550,17 @@
dex %5D%7D )
+.
%60%0A
|
ce9434126a2dd4ba4379c6d530b0fb1aa92f0c04 | Set expression and time_format if needed | app/javascript/packs/config_field.js | app/javascript/packs/config_field.js | 'use strict'
import 'lodash/lodash'
const ConfigField = {
template: "#vue-config-field",
props: [
"pluginType",
"option",
"initialExpression",
"initialTimeFormat",
],
data: function() {
return {
expression: null,
timeFormat: null
}
},
filters: {
humanize: function(... | JavaScript | 0.000001 | @@ -417,49 +417,150 @@
-this.expression = this.initialExpression%0A
+if (this.option.name === %22expression%22) %7B%0A this.expression = this.initialExpression%0A %7D%0A if (this.option.name === %22time_format%22) %7B%0A
@@ -596,24 +596,30 @@
lTimeFormat%0A
+ %7D%0A
this.$on
|
9f5a90a303150abf9263a0007935e4398bec0f9c | Remove main menu | extension/src/Routes.js | extension/src/Routes.js | import React from 'react';
import { Switch, Route } from 'react-router-dom';
import PropTypes from 'prop-types';
import parseRoute from 'react/util/parseRoute';
import Extension from 'extension/src/components/Extension';
import withLoginStatus from 'react/hocs/WithLoginStatus';
import Login from 'extension/src/compo... | JavaScript | 0.000002 | @@ -331,66 +331,8 @@
n';%0A
-import MainMenu from 'extension/src/components/MainMenu';%0A
impo
@@ -1127,269 +1127,34 @@
=%3E
-%7B%0A // if we have a type, go ahead and show the blocks component%0A if (query.type) %7B%0A return (%3CBlocks /%3E);%0A %7D%0A%0A ... |
a54260c06c78578517c235beabce3903562bd645 | Fix exception while login button pressed | src/screens/MessageScreen/index.js | src/screens/MessageScreen/index.js | import React, { Component } from 'react';
import {
ListView,
} from 'react-native';
import { List, ListItem, Icon } from 'react-native-elements';
import { NavigationActions, StackNavigator } from 'react-navigation';
import Page from '../../components/Page';
import { isLoginin } from '../../utils/permission';
impor... | JavaScript | 0.000001 | @@ -2131,16 +2131,40 @@
%3CPage%0A
+ %7B...this.props%7D%0A
|
e7f9602e482f63402e3381705104e255fce927a1 | Handle document / window properly. | src/browser/Garbage.js | src/browser/Garbage.js | #ifndef __browser_Garbage__
#define __browser_Garbage__
#ifdef HIDDEN
/**
* Some code in this file is based on Mootools.net and adapted to the
* architecture of Bootstrap, with added changes in design and architecture
* where deemeded necessary.
* See http://www.bootstrap-js.net/wiki/MootoolsDifferences
*/
#endif... | JavaScript | 0.00006 | @@ -746,22 +746,20 @@
objects.
-append
+push
(window,
|
4433ea9591e2a82f68ebef63f477ee70f4eb5a0f | Remove unused variable from TestUtils. | test/TestUtils.js | test/TestUtils.js | var Immutable = require("../seamless-immutable.js");
var JSC = require("jscheck");
var assert = require("chai").assert;
var timeoutMs = 3000;
function isEqual(expected, actual) {
if ((expected instanceof Array) && (actual instanceof Array)) {
if (expected.length !== actual.length) {
return false;... | JavaScript | 0 | @@ -127,31 +127,8 @@
t;%0A%0A
-var timeoutMs = 3000;%0A%0A
func
|
1bb4ddf97f88593872cb7fd35492b4800b7c339c | disable "contextualSearch", which is enabled by default now | website/docusaurus.config.js | website/docusaurus.config.js | module.exports = {
title: 'mongodb-memory-server',
tagline:
'Spinning up mongod in memory for fast tests. If you run tests in parallel this lib helps to spin up dedicated mongodb servers for every test file in MacOS, *nix, Windows or CI environments (in most cases with zero-config).',
url: 'https://nodkz.gith... | JavaScript | 0 | @@ -594,24 +594,148 @@
ocusaurus',%0A
+ contextualSearch: false, // since docusaurus v2.beta-15, it is defaulted to %22true%22, but somehow breaks current search%0A
%7D,%0A n
|
908cb08be389bd9152524ebc56ba0dea89697b2f | add isIE8 support detection to deals with old school hacks | src/browser/support.js | src/browser/support.js | 'use strict';
/**
* @class Stimuli.browser.Support
* @singleton
* This class detects supported browser features.
*/
Stimuli.browser.Support = {
/**
* @property {Boolean}
* Is true if document supports addEventListener method
*/
documentAddEventListener: typeof document.addEventListener ===... | JavaScript | 0 | @@ -908,17 +908,150 @@
unction'
+,%0A
%0A%0A
+/**%0A * @property %7BBoolean%7D%0A * Is true if browser is ie8%0A */%0A isIE8: typeof document.addEventListener === 'undefined'
%0A%7D;
|
d2e52397aa86337446040f6d92c4f6e413c1988a | Add authSecret to config vars | config/index.js | config/index.js | var log = require('../lib/logger');
var allTheSettings = {
coinbaseApiKey: process.env.COINBASE_API_KEY,
coinbaseApiSec: process.env.COINBASE_API_SECRET,
coinbaseApiUri: process.env.COINBASE_API_URI,
coinbaseApiWallet: process.env.COINBASE_API_WALLET,
dbDb: process.env.DATABASE_DB,
dbHost: process.env.DATA... | JavaScript | 0 | @@ -566,16 +566,55 @@
.MG_PASS
+,%0A authSecret: process.env.AUTH_SECRET
%0A%7D;%0A%0Atry
|
9f3b618de0c517291210e934c62b0094ab6092e1 | Move label of compass reading to bottom middle | lib/ui/widgets/compassreadingcomponent.js | lib/ui/widgets/compassreadingcomponent.js | var React = require('react');
var size = 400;
var half = size / 2;
module.exports = React.createClass({
getInitialState: function() {
return {
value: 10,
label: this.props.label
};
},
render: function() {
return (
<svg height="100%" width="100%" viewBox="100 0 200 100">
... | JavaScript | 0.000001 | @@ -767,18 +767,18 @@
x=%22
-1
+2
00%22 y=%22
-10
+85
%22 te
|
c19aa46573371004a9c7db47d3fac06df97ab3de | Create a username #1653 | app/js/sign-up/views/_username.js | app/js/sign-up/views/_username.js | import React from 'react'
import PropTypes from 'prop-types'
import { ShellScreen } from '@blockstack/ui'
import log4js from 'log4js'
const logger = log4js.getLogger(__filename)
const defaultSponsoredName = '.id.blockstack'
const STATUS = {
CONFIRMED: 'confirmed',
AVAILABLE: 'available',
VALIDATING: 'validating... | JavaScript | 0.999186 | @@ -3937,24 +3937,22 @@
ldren: '
-Regis
+Crea
te
-r
a usern
|
13dc8548f4208151347d647ab8bf5762dc0acf65 | build to docs | config/index.js | config/index.js | // see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../docs/index.html'),
assetsRoot: path.resolve(__dirname, '../docs'),
assetsSubDirectory: 'static',
assetsPublicPat... | JavaScript | 0 | @@ -318,21 +318,16 @@
Path: '/
-docs/
',%0A p
|
3a21c16969edeb561b436719d781e1a2d828119d | fix build theme for production | app/templates/_gulpfile.js | app/templates/_gulpfile.js | 'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var ... | JavaScript | 0 | @@ -804,24 +804,71 @@
'!b
-uild',%0A '!build
+ower_components',%0A '!bower_components/**',%0A '!dist',%0A '!dist
/**'
|
5925f4b7b04923f26d45ad5ed1c34974ef42b565 | Remove prefix-manager timeout tests | test/server/chat-plugins/username-prefixes.js | test/server/chat-plugins/username-prefixes.js | /**
* Tests for the username-prefixes chat plugin.
* @author Annika
*/
'use strict';
const assert = require('assert').strict;
const {PrefixManager} = require('../../../server/chat-plugins/username-prefixes');
const PREFIX_DURATION = 10 * 24 * 60 * 60 * 1000;
describe('PrefixManager', function () {
beforeEach(() =... | JavaScript | 0.000001 | @@ -1922,302 +1922,8 @@
%09%7D);
-%0A%0A%09it('should correctly set timeouts', () =%3E %7B%0A%09%09this.prefixManager.addPrefix('forcedpublic', 'privacy');%0A%0A%09%09assert(this.prefixManager.timeouts.has('forcedpublic'));%0A%0A%09%09this.prefixManager.removePrefix('forcedpublic', 'privacy');%0A%0A%09%09assert(!this.... |
99dc0c44b6b4e1d91c66a5694e29067e73ae7e47 | Check the origin channel of the device | IoTserver/index.js | IoTserver/index.js | var net = require('net');
var mysql = require('mysql');
var sockets = [];
var svraddr = '140.115.152.224';
var svrport = 8080;
var svr = net.createServer(function(sock){
console.log('Connected: ' + sock.remoteAddress + ': ' + sock.remotePort);
sock.write('Hello ' + sock.remoteAddress + ': ' + sock.remotePort ... | JavaScript | 0 | @@ -1211,21 +1211,23 @@
sqlFind
-Empty
+Channel
= 'SELE
@@ -1815,24 +1815,363 @@
0%5D.user_id;%0A
+ //use topic or not%0A con.query(sqlFindChannel, user_id, function(err, rows)%7B%0A if(err)%0A throw err;%0A ... |
a4c0cf6bfaf774bc863565065241c73127abf1db | include request context in error | api/controllers/MessageController.js | api/controllers/MessageController.js | var email = require('email-addresses'),
format = require('util').format,
Mailgun = require('mailgun').Mailgun,
MailComposer = require('mailcomposer').MailComposer;
module.exports = {
relayFromEmail: function(req, res) {
var from = email.parseOneAddress(req.param('To')),
to = email.parseOneAddress(re... | JavaScript | 0 | @@ -572,28 +572,11 @@
(e,
-%7Bto: to, from: from%7D
+req
);%0A
|
9fe651bca97e2c7d69ffe368bbd5a015f8df623e | drop unnecessary flatten debugs | lib/workers/repository/updates/flatten.js | lib/workers/repository/updates/flatten.js | const {
getManagerConfig,
mergeChildConfig,
filterConfig,
} = require('../../../config');
const { applyPackageRules } = require('../../../util/package-rules');
const { get } = require('../../../manager');
module.exports = {
flattenUpdates,
};
function flattenUpdates(config, packageFiles) {
const updates = [... | JavaScript | 0.000001 | @@ -385,56 +385,8 @@
) %7B%0A
- logger.debug(%60flatten manager=$%7Bmanager%7D%60);%0A
@@ -446,48 +446,8 @@
r);%0A
- logger.debug('Got manager config');%0A
@@ -485,43 +485,8 @@
) %7B%0A
- logger.debug('packageFile');%0A
@@ -607,52 +607,8 @@
) %7B%0A
- logger.debug('dep ' + dep.de... |
fd5023322b489b236605e9373e4c4da8d75c4d18 | bump cpus by one | src/index.js | src/index.js | 'use strict';
module.exports = tileReduce;
var ProgressBar = require('progress');
var EventEmitter = require('events').EventEmitter;
var cpus = require('os').cpus().length;
var fork = require('child_process').fork;
var path = require('path');
var fs = require('fs');
var split = require('split');
var cover = require(... | JavaScript | 0.000001 | @@ -653,12 +653,8 @@
cpus
- - 1
; i+
|
6f1681f6ebdddd14be9248861e519def10106f46 | Remove ssh from ripple rest api endpoint. | config/nconf.js | config/nconf.js | var nconf = require('nconf');
nconf
.file({ file: './config/config.json' })
.env();
nconf.defaults({
'RIPPLE_REST_API': 'https://localhost:5990',
'DATABASE_URL': 'postgres://postgres:password@localhost:5432/ripple_gateway',
'RIPPLE_DATAMODEL_ADAPTER': 'ripple-gateway-data-sequelize-adapter',
'RIPPLE_EXPRE... | JavaScript | 0 | @@ -126,17 +126,16 @@
': 'http
-s
://local
|
23bdf6e049fc1bcbac87630ce665ef8b1aa709b8 | implement ping function | api/controllers/RequestController.js | api/controllers/RequestController.js | /**
* RequestController
*
* @description :: Server-side logic for managing requests
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
*/
module.exports = {
};
| JavaScript | 0 | @@ -189,9 +189,946 @@
%7B%0A%09
+ping: function(req, res) %7B%0A%09%09// console.info(req.params);%0A%0A%09%09Request.findOne(req.param(%22id%22)).exec(function(err, theRequest) %7B%0A%0A%09%09%09// console.info(theRequest);%0A%0A%09%09%09var userIds = %5B%5D;%0A%0A%09%09%09User.find().exec(function(err, allUsers) %7... |
f39a4b213e16e136bae0f3a410626cd579cea655 | convert extends test to mocha | lib/tags/extends.test.js | lib/tags/extends.test.js | var testCase = require('nodeunit').testCase,
swig = require('../../index');
exports['extends'] = testCase({
circular: function (test) {
swig.init({ allowErrors: true });
var circular1 = "{% extends 'extends_circular2.html' %}{% block content %}Foobar{% endblock %}",
circular2 = "{% extends 'extends_c... | JavaScript | 0.999999 | @@ -76,51 +76,85 @@
);%0A%0A
-exports%5B'extends'%5D = testCase(%7B%0A circular:
+describe('Tag: extends', function () %7B%0A%0A it('throws on circular references',
fun
@@ -152,36 +152,32 @@
ces', function (
-test
) %7B%0A swig.ini
@@ -404,26 +404,21 @@
%25%7D%22
-;
+,
%0A
-test.throws(
+ fn =
func
... |
b7f06d7fafca07f59ea76e4ce9a4e40c65949f17 | Fix #32 | app/views/BookTitleView.js | app/views/BookTitleView.js | /*
* Book Title View
*/
define(['gv', 'views/BookView'], function(gv, BookView) {
var state = gv.state;
// View: BookTitleView (title and metadata)
return BookView.extend({
template: '#book-title-template',
render: function() {
var view = this;
view.re... | JavaScript | 0.000001 | @@ -227,32 +227,159 @@
plate',%0A
+initialize: function()%7B%0A var view = this;%0A view.bindState('change:pageid', view.render, view);%0A %7D,
%0A render:
|
fc5475a6fc2416e8a26fb55627a045c57976a3a1 | Fix typo in migration. Didn't bother with new migration, nothing was ever deployed | migrations/1469038260014-AddSemesters2017.js | migrations/1469038260014-AddSemesters2017.js | 'use strict'
var db = require('../app/db');
exports.up = function(next) {
db.Semester.create([
{
name: 'סתיז תשע"ז', year: 2017, semester: 1,
startDate: new Date("2016-10-29T00:00:00.000Z"),
endDate: new Date("2017-01-26T00:00:00.000Z"),
examsStart: new Date("2017-01-28T00:00:00.000Z"),
examsE... | JavaScript | 0.999743 | @@ -110,17 +110,17 @@
me: '%D7%A1%D7%AA%D7%99
-%D7%96
+%D7%95
%D7%AA%D7%A9%D7%A2%22%D7%96',
|
7eceeaff7f002063766782cd06d2e89a17378903 | Use the Next URL parameter for redirects (#9602) | src/platform/user/authentication/utilities.js | src/platform/user/authentication/utilities.js | import appendQuery from 'append-query';
import Raven from 'raven-js';
import recordEvent from '../../monitoring/record-event';
import environment from '../../utilities/environment';
export const authnSettings = {
RETURN_URL: 'authReturnUrl',
REGISTRATION_PENDING: 'registrationPending',
PENDING_LOGIN_TYPE: 'pend... | JavaScript | 0 | @@ -1243,17 +1243,8 @@
tion
-.pathname
);%0A
|
f15edf109ac8c46e2f17078ccef6473c799e700d | Update index.js | src/index.js | src/index.js | import { h as defaultReviver, Component, Fragment } from 'preact';
import markupToVdom from './markup-to-vdom';
let customReviver;
export default class Markup extends Component {
static setReviver(h) {
customReviver = h;
}
shouldComponentUpdate({ wrap, type, markup }) {
let p = this.props;
return wrap!==p.w... | JavaScript | 0.000002 | @@ -36,18 +36,8 @@
nent
-, Fragment
%7D f
@@ -1346,33 +1346,8 @@
vdom
- && h(Fragment, %7B%7D, vdom)
%7C%7C
|
914c67ae03c2c774640e123a04edb59554f6f85d | update paths to put `static` folder in root | config/paths.js | config/paths.js |
const path = require('path');
module.exports = {
appBuild: path.join(__dirname, '..', 'client'),
appPublic: path.join(__dirname, '..', 'client'),
outputPath: path.join(__dirname, './static'),
outputName: 'bundle.js',
};
| JavaScript | 0.000001 | @@ -186,9 +186,13 @@
, '.
-/
+.', '
stat
|
1dbfadfd163f8dccb2188add1965b3bce47be449 | improve promise handling | migrations/1620954224627-add-fee-priority.js | migrations/1620954224627-add-fee-priority.js | const { saveConfig, loadLatest } = require('../lib/new-settings-loader')
exports.up = function (next) {
const newConfig = {
wallets_BTC_feeDiscount: '1'
}
return loadLatest()
.then(config => {
return saveConfig(newConfig)
.then(next)
.catch(err => {
return next(err)
... | JavaScript | 0.000545 | @@ -236,24 +236,27 @@
Config)%0A
+%7D)%0A
.then(ne
@@ -263,20 +263,16 @@
xt)%0A
-
-
.catch(e
@@ -279,20 +279,16 @@
rr =%3E %7B%0A
-
re
@@ -306,19 +306,8 @@
rr)%0A
- %7D)%0A
|
9cd311ac2bafde1f56c4468c3a875bd066b0cdb0 | Fix fetching HTML files | src/protocols/handlers/http/format_charset.js | src/protocols/handlers/http/format_charset.js | 'use strict';
const { parse: parseContentType } = require('content-type');
const { Negotiator } = require('negotiator');
const { encodingExists } = require('iconv-lite');
const pluralize = require('pluralize');
const { getWordsList } = require('../../../utilities');
const { throwError } = require('../../../error');
c... | JavaScript | 0.000004 | @@ -781,33 +781,8 @@
mes%5D
-;%0A%0A const format = mimes
%0A
@@ -817,16 +817,41 @@
defined)
+;%0A%0A const format = mimes
%0A .ma
@@ -1010,75 +1010,8 @@
%7D%0A%0A
- validateMimesCharset(%7B choices: acceptMimes, name: 'format' %7D);%0A%0A
if
@@ -1735,29 +1735,24 @@
%0A%0A validate
-Mimes
Charset(%... |
49851cff18e5019c816f0b4b40b2c615411110b3 | Use module.exports to ensure compatibility | src/index.js | src/index.js | import Submitter from './Submitter'
import SensorsAnalytics from './SensorsAnalytics'
export { Submitter }
export default SensorsAnalytics
| JavaScript | 0 | @@ -84,57 +84,145 @@
s'%0A%0A
-export %7B Submitter %7D%0Aexport default SensorsAnalytics
+// Use module.exports to ensure compatiblity with non-es6 projects%0Aexports = module.exports = SensorsAnalytics%0Aexports.Submitter = Submitter
%0A
|
80f82a045fdb860d7dc51078b363e0389fb815ad | Update roles.js | config/roles.js | config/roles.js | /**
* Roles configuration
*
* This file will give permissions to roles.
* First level keys are roles (admin, bar, log)
* and second levels values are permission that you can use with
* `PermissionService.has()`
*
* List of permissions:
*
* - alert/read : Can read all alerts
* - alert/restrictedSender : Can r... | JavaScript | 0.000001 | @@ -3554,32 +3554,60 @@
'user/read',%0A
+ 'ui/receiveAlerts',%0A
%5D,%0A 'Logi
|
e1fc9eb91eb336e83ad900098d2c2594edba5988 | Improve clockDisplay method | src/ChessVariantsTraining/wwwroot/scripts/variant960/game.js | src/ChessVariantsTraining/wwwroot/scripts/variant960/game.js | function main(fen, isPlayer, myColor, whoseTurn, isFinished, dests, wsUrl) {
if (myColor === "") myColor = null;
var ground;
var ws;
var premove = null;
var currentChatChannel = isPlayer ? "player" : "spectator";
var chats = { player: [], spectator: [] };
var clockInfo = { whiteUpdate: NaN,... | JavaScript | 0.000002 | @@ -5195,51 +5195,8 @@
) %7B%0A
- time = Math.round(time * 10) / 10;%0A
@@ -5262,219 +5262,136 @@
s =
-time %25 60;%0A if (seconds %3C 10) %7B%0A var secondsStr = %220%22 + seconds.toFixed(1);%0A %7D else %7B%0A var secondsStr = seconds.toFixed(1);%0A %7D%0A ... |
09eabbb8d2a2437ffedabafaa7f283ee33517152 | 변경 된 차트 이름이 블록에 적용되도록 refresh 추가. | src/class/DataTable.js | src/class/DataTable.js | import _find from 'lodash/find';
import _findIndex from 'lodash/findIndex';
import DataTableSource from './source/DataTableSource';
import { ModalChart, DataAnalytics } from '@entrylabs/tool';
class DataTable {
#tables = [];
#view;
modal;
selected;
banAllBlock() {
Entry.playground.blockMen... | JavaScript | 0 | @@ -3032,47 +3032,8 @@
0%5D,%0A
- chart: charts,%0A
@@ -3370,32 +3370,85 @@
);%0A
+ Entry.playground.reloadPlayground();%0A
%7D)%0A
|
a3519b95db45f340b935dba02764f3f4c6497f48 | Update v2.to.fhir.patient.channel.js | mirth-channels/v2.to.fhir.patient.channel.js | mirth-channels/v2.to.fhir.patient.channel.js | var date = msg['PID']['PID.7']['PID.7.1'].toString();
var Patient = {};
Patient.resourceType = "Patient";
Patient.gender = msg['PID']['PID.8']['PID.8.1'].toString();
Patient.birthDate = date.substr(0,4) + "-" + date.substr(4,2) + "-" + date.substr(6,2);
Patient.identifier = [{
"use": "usual",
"type": {
... | JavaScript | 0 | @@ -1,12 +1,206 @@
+//==================================================================================================%0A//HL7-v2.x PID to FHIR Resource Patient%0A//https://www.hl7.org/fhir/patient-mappings.html#v2%0A%0A
var date = m
@@ -955,25 +955,418 @@
umanName%5D;%0A%0A
-%0A
+//Patient.address = msg%5B'PID'%5D... |
18f922d77c04da2db25c71959f10181c69049383 | Develop 'link' function() logic within the 'seekBar' directive by reusing 'Foundation setupSeekBar content' for 'scope.fillStyle()' within 'seekBar.js'... | app/scripts/directives/seekBar.js | app/scripts/directives/seekBar.js | (function() {
function seekBar() {
return {
templateUrl: '/templates/directives/seek_bar.html',
replace: true,
restrict: 'E',
scope: { },
link: function(scope, element, attributes) {
}
};
}
angular
.module('blocJams')
.directive('seekBar', seekBar);
})(); | JavaScript | 0 | @@ -194,16 +194,306 @@
utes) %7B%0A
+%09%09%09%09scope.value = 0;%0A%09%09%09%09scope.max = 100;%0A%0A%09%09%09%09var percentString = function () %7B%0A%09%09%09%09%09var value = scope.value;%0A%09%09%09%09%09var max = scope.max;%0A%09%09%09%09%09var percent = value / max * 100;%0A%09%09%09%09%09return percent + %22%2... |
a84197e4fc5b7590331c60cc486c91bf3c0fc04b | clarify array cli test | test/cli-utils.js | test/cli-utils.js | var readPropertySetters = require('../lib/cli-utils').readPropertySetters;
suite('CLI Utils', function() {
test('Simple property setters', function() {
var outObj = readPropertySetters('asdf.asdf=3 p=1 test=false with spa cing actual=false', true);
assert(outObj.asdf.asdf === 3);
assert(outObj.p === 1);
... | JavaScript | 0.000001 | @@ -1330,32 +1330,65 @@
.a%5B0%5D === '1');%0A
+ assert(outObj.a%5B1%5D === '2');%0A
assert(outOb
|
f2ced993a3a4a11aaebfeb22289830a4aa2b4fe3 | Remove unused imports | test/data_test.js | test/data_test.js | import tape from 'tape';
import { test_dates, custom_seed, test_list1, test_list2_using_default_seed, test_list2_using_custom_seed,
test_list3_using_default_seed, test_list3_using_custom_seed, test_list4_using_default_seed,
test_list4_using_custom_seed, test_list5_using_default_seed, test_list5_using_custom_see... | JavaScript | 0.000001 | @@ -381,79 +381,8 @@
seed
-, test_indexers_using_default_seed,%0A test_indexers_using_custom_seed
%0A%7D f
|
6fb6ddaeb31dd6e56ca5a7ff43e1888ff27aed9b | use timeout to fix test-bot failure | tests/content/script/2279/errorBreakpoints.js | tests/content/script/2279/errorBreakpoints.js | function runTest()
{
FBTest.openNewTab(basePath + "script/2279/testErrorBreakpoints.html", function(win)
{
FBTest.enableConsolePanel(function(win)
{
var config = {tagName: "div", classes: "logRow logRow-errorMessage"};
FBTest.waitForDisplayedElement("console", config, fun... | JavaScript | 0.000001 | @@ -801,32 +801,117 @@
.click(errBP);%0A%0A
+ // xxxHonza: the timeout is a hack (but should fix test-bot failure)%0A
@@ -1399,32 +1399,38 @@
%7D
+, 2000
);%0A %7D
|
a7bd8e47aa49b0377855c395bb68d63aa6a63abf | debug jscookie issue | src/index.js | src/index.js | // WARNING: Make sure to mirror any changes in index_production.js
import { AppContainer } from 'react-hot-loader'
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
// To facilitate the temporary "auth"
import jsCookie from 'js-cookie'
window.jsCookie = jsCookie
const rootEl = documen... | JavaScript | 0.000001 | @@ -267,34 +267,107 @@
ie'%0A
-window.jsCookie = jsCookie
+console.log('set jscookie')%0Awindow.jsCookie = jsCookie%0Aconsole.log('set jscookie', window.jsCookie)
%0A%0Aco
|
860739903599fde05cedd08b6d7c005eb7d59977 | Use a relative path for sign-up template. | app/sign-up/sign-up.directives.js | app/sign-up/sign-up.directives.js | {
angular.module('marvelousnote.signUp')
.directive('signUp', [
'$state',
'UsersService',
($state, UsersService) => {
class SignUpController {
constructor() {
this.user = {};
}
submit() {
UsersService.create(this.user)
... | JavaScript | 0 | @@ -36,18 +36,16 @@
ignUp')%0A
-
.direc
@@ -66,18 +66,16 @@
%5B%0A%0A
-
'$state'
@@ -74,24 +74,35 @@
'$state',%0A
+ 'Flash',%0A
'UsersSe
@@ -117,18 +117,16 @@
-
-
($state,
Use
@@ -121,16 +121,23 @@
($state,
+ Flash,
UsersSe
@@ -147,24 +147,47 @@
ce) =%3E %7B%0A%0A
+ let flash... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.