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 |
|---|---|---|---|---|---|---|---|
4b5bf08fe9d3cf1d2c097f23f869154a5988bf71 | Add identica+twitter status fetching | modules/dent/dent.js | modules/dent/dent.js | var request = require('request');
_ = require('underscore')._;
var dent = function(dbot) {
this.dbot = dbot;
this.api = {
'post': function(content) {
var username = dbot.config.dent.username,
password = dbot.config.dent.password,
info,
au... | JavaScript | 0 | @@ -110,16 +110,329 @@
= dbot;
+%0A this.StatusRegex = %7B%0A identica: /%5Cbhttps?:%5C/%5C/identi%5C.ca%5C/notice%5C/(%5Cd+)%5Cb/ig,%0A twitter: /%5Cbhttps?:%5C/%5C/twitter%5C.com%5C/%5Cw+%5C/status%5C/(%5Cd+)%5Cb/ig%0A %7D;%0A%0A this.StatusAPI = %7B%0A identica: %22http://identi.ca/api/stat... |
98625f327569e51f549b35fdf743ecfd133ec499 | remove use of react-addons-perf | modules/web/index.js | modules/web/index.js | // @flow
// Include fetch
import 'whatwg-fetch'
import debug from 'debug'
const log = debug('web')
// Include React and react-dom.render
const React = require('react')
const { render } = require('react-dom')
if (process.env.NODE_ENV !== 'production') {
global.Perf = require('react-addons-perf')
}
// Include goo... | JavaScript | 0.000001 | @@ -207,102 +207,8 @@
om')
-%0Aif (process.env.NODE_ENV !== 'production') %7B%0A global.Perf = require('react-addons-perf')%0A%7D
%0A%0A//
|
d262deb4f0f1aaa409f33ede997e4d5ce738f8b1 | Fix signedTx & hardcode a test wallet | src/components/App.js | src/components/App.js |
import React from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
import WalletService from '../services/WalletService';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fo... | JavaScript | 0 | @@ -660,10 +660,10 @@
t =
-50
+11
;%0A
|
6d3f86011f400b8494baa1252d1b9983f9570b95 | change auth renewal default based on couchdb's default auth timeout of 600 seconds | src/config/default.js | src/config/default.js | 'use strict';
module.exports = {
url: 'http://localhost:5984',
logLevel: 'WARN',
auth: {
couchdb: {}
},
port: 3000,
authServers: [],
proxy: true,
proxyPrefix: '/',
authRenewal: 1900000
};
| JavaScript | 0 | @@ -219,14 +219,10 @@
al:
-190000
+57
0%0A%7D;
|
f874ad6637713c2c8939ec573b08f9a2589cbcca | Rename cssKey to key. | src-test/ascender/ascender_script_test.js | src-test/ascender/ascender_script_test.js | var AscenderScriptTest = TestCase('AscenderScriptTest');
AscenderScriptTest.prototype.testLoadAndFamilyVariations = function(){
var insert, css, element;
var cssKey = 'e8e3d05f-2a8b-4835-8889-7b8bb3351c61';
var onReadyTriggered = false;
var fakeDomHelper = {
insertInto: function(tag, el) {
in... | JavaScript | 0.000072 | @@ -161,53 +161,50 @@
var
-cssK
+k
ey = 'e
-8e3d05f-2a8b-4835-8889-7b8bb3351c6
+c2de397-11ae-4c10-937f-bf94283a70c
1';%0A
@@ -525,19 +525,13 @@
-cssKey:cssK
+key:k
ey,%0A
@@ -831,36 +831,33 @@
ive.com/css/' +
-cssK
+k
ey + '.css', css
@@ -929,12 +929,9 @@
' +
-cssK
+k
ey +
|
29b18047b6aaea02292f36faed2f4e2659a0a8fc | support for more than one param | src/core/decorator.js | src/core/decorator.js | /**
* Decorators to extend funcionality of cdb related objects
*/
/**
* Adds .elder method to call for the same method of the parent class
* usage:
* insanceOfClass.elder('name_of_the_method');
*/
cdb.decorators.elder = (function() {
// we need to backup one of the backbone extend models
// (it doesn't matter wh... | JavaScript | 0 | @@ -992,20 +992,21 @@
method%5D.
-call
+apply
(this, o
@@ -1397,36 +1397,93 @@
ction(method
-, options) %7B
+) %7B%0A var options = Array.prototype.slice.call(arguments, 1);
%0A i
|
b17df3007d92d2d1a0c6f416e37ee31833647b12 | add a change callback when value changes | src/currency-input.js | src/currency-input.js | import { customElement, bindable, bindingMode, computedFrom, TaskQueue } from 'aurelia-framework';
import { DOM } from 'aurelia-pal';
import { inject } from 'aurelia-dependency-injection'
import numeral from 'numeral';
const KEY_A = 65;
const KEY_Z = 90;
let nextID = 0;
@customElement('currency-input')
@bindable({
... | JavaScript | 0.000009 | @@ -1285,16 +1285,48 @@
= false;
+%0A @bindable change = () =%3E %7B %7D;
%0A%0A id =
@@ -1952,32 +1952,63 @@
te, oldValue) %7B%0A
+ let original = this.value;%0A
this.display
@@ -2556,16 +2556,16 @@
= null;%0A
-
%7D%0A
@@ -2565,24 +2565,108 @@
%7D%0A %7D
+%0A%0A if (original !== this.v... |
12d9bf09f72e1ee31ed9e3b07b5ef6ba0d8ad4e4 | constrain height to width when canChangeHeight = false | src/models/Transform.js | src/models/Transform.js | const transformOptions = {
startingWidth: {
title: 'Initial width',
min: 1,
isVisible: (state) => { return state.canChangeSize },
},
startingHeight: {
title: 'Initial height',
min: 1,
isVisible: (state) => { return state.canChangeSize && state.canChangeHeight },
},
offsetX: {
title... | JavaScript | 0.999949 | @@ -133,24 +133,186 @@
angeSize %7D,%0A
+ onChange: (changes, attrs) =%3E %7B%0A if (!attrs.canChangeHeight) %7B%0A changes.startingHeight = changes.startingWidth%0A %7D%0A return changes%0A %7D%0A
%7D,%0A start
|
7645e05e4d7143316cb169b221030e74498f0a1a | add missing semi-colon | src/ng/filter/filter.js | src/ng/filter/filter.js | 'use strict';
/**
* @ngdoc filter
* @name ng.filter:filter
* @function
*
* @description
* Selects a subset of items from `array` and returns it as a new array.
*
* Note: This function is used to augment the `Array` type in Angular expressions. See
* {@link ng.$filter} for more information about Angular arrays... | JavaScript | 0.000011 | @@ -5431,16 +5431,17 @@
xt) %3E -1
+;
%0A
|
7ab83f2722480809a71f14102a26b74c12354e70 | Remove static members from Stamen | src/ol/source/Stamen.js | src/ol/source/Stamen.js | /**
* @module ol/source/Stamen
*/
import {inherits} from '../index.js';
import OSM from '../source/OSM.js';
import XYZ from '../source/XYZ.js';
/**
* @classdesc
* Layer source for the Stamen tile server.
*
* @constructor
* @extends {ol.source.XYZ}
* @param {olx.source.StamenOptions} options Stamen options.
* ... | JavaScript | 0 | @@ -144,1142 +144,8 @@
';%0A%0A
-/**%0A * @classdesc%0A * Layer source for the Stamen tile server.%0A *%0A * @constructor%0A * @extends %7Bol.source.XYZ%7D%0A * @param %7Bolx.source.StamenOptions%7D options Stamen options.%0A * @api%0A */%0Aconst Stamen = function(options) %7B%0A const i = options.layer.indexOf('-');... |
ce50441cfe4b0e7b48a04bc0802341ed5568d0f0 | Add order list and mock url in tags | src/pages/tags/index.js | src/pages/tags/index.js | import React, { Component } from 'react';
import Tag from '../../components/Tag';
const splitTag = (raw = '') => raw.split(', ');
const getTag = (item) => {
if (item.node.tags) {
return {
tags: splitTag(item.node.tags),
title: item.node.title
}
}
return item;
};
const flatten = (arr = []) ... | JavaScript | 0 | @@ -36,16 +36,46 @@
eact';%0A%0A
+import moment from 'moment';%0A%0A
import T
@@ -189,29 +189,206 @@
%7B%0A
-if (item.node.tags) %7B
+const %7B tags, url, createdDate %7D = item.node;%0A%0A if (tags) %7B%0A const date = moment(createdDate).locale('zh-hk').format('YYYY/MM/DD');%0A const postPath = url === 'a... |
72567d930151e0f1bd06f8a82e9730aff0201fd1 | Add ModTools #mod, #admin (fixes #150) | src/plugins/ModTools.js | src/plugins/ModTools.js | const Plugin = require("./../Plugin");
module.exports = class ModTools extends Plugin {
static get plugin() {
return {
name: "ModTools",
description: "Moderation tools",
help: `- Warnings: use /warn to warn a user and delete the message (gets kicked after 3 warnings)
- B... | JavaScript | 0 | @@ -31,16 +31,49 @@
lugin%22);
+%0Aconst Util = require(%22../Util%22);
%0A%0Amodule
@@ -526,16 +526,22 @@
es it.%0A-
+ #mod,
#admin:
@@ -544,16 +544,41 @@
min: use
+ #mod to notify all mods,
#admin
@@ -2774,47 +2774,8 @@
d%22:%0A
- console.log(args);%0A
@@ -2805,32 +2805,32 @@
s.len... |
34a0b1d29895f6df0bf4130a3500059060c939f0 | Make the stare field bigger so there are no blank spaces when it rotates | src/pulses/starfield.js | src/pulses/starfield.js | var Drawing = function (p, pulse, config) {
var defaults = {};
defaults.totalFrames = 1000;
defaults.points = [];
defaults.totalPoints = 1000;
defaults.finalRotation = p.PI;
defaults.config = config;
defaults.gridWidth = config.totalCols * p.width;
defaults.gridHeight = config.totalRows * p.height;
... | JavaScript | 0.000002 | @@ -307,24 +307,148 @@
* p.height;
+%0A %0A defaults.longEdge = defaults.gridWidth;%0A if (defaults.gridHeight %3E defaults.longEdge) defaults.longEdge = gridHeight;
%0A%0A defaults
@@ -537,16 +537,69 @@
eight;%0A%0A
+ defaults.rotationX = 0;%0A defaults.rotationY = 0;%0A%0A
p.puls
@@ -1191,16 +1191,34 @@
... |
bd6a014e9cb1b0623cf950430e5655056f6f81ba | use parse descriptor to implement mtbrighton resort | lib/resorts/mtbrighton/index.js | lib/resorts/mtbrighton/index.js | var domutil = require('../../tools/domutil');
var debug = require('debug')('liftie:resort:mtbrighton');
function parse(dom) {
var liftStatus = domutil.collect(dom, 'table:nth-of-type(5) tr:not(:first-child)', function(node) {
return {
name: domutil.childText(node, '0/0'),
status: domutil.childText(no... | JavaScript | 0 | @@ -1,170 +1,34 @@
-var domutil = require('../../tools/domutil');%0Avar debug = require('debug')('liftie:resort:mtbrighton');%0A%0Afunction parse(dom) %7B%0A var liftStatus = domutil.collect(dom,
+module.exports = %7B%0A selector:
'ta
@@ -72,97 +72,49 @@
d)',
- function(node) %7B%0A return
+%0A parse:
%7B%0A... |
994aa986f7f61f2a286c223133558c9d2875b43c | use template strings | lib/returnWith/listing/index.js | lib/returnWith/listing/index.js | 'use strict';
const Promise = require('bluebird'),
_ = require('lodash'),
parseString = require('xml2js'),
log = require('../../logger'),
solr = require('../../db/solr'),
xml2js = Promise.promisifyAll(parseString);
module.exports = function find(env, query, options) {
// If query is not specified, return e... | JavaScript | 0.000001 | @@ -418,36 +418,31 @@
y =
-'
+%60
%3Croot%3E
-' +
+$%7B
query
- + '
+%7D
%3C/root%3E
-'
+%60
;%0A
@@ -1161,21 +1161,21 @@
f =
-'$' +
+%60$$%7B
(i + 1)
+%7D%60
;%0A
|
005f8558b8253f63df4cc3b887041a85ad6bc73d | Fix export of theUnsafeUndefined | racketscript-compiler/racketscript/compiler/runtime/core.js | racketscript-compiler/racketscript/compiler/runtime/core.js | // Exports classes for creating basic data types and operation on them
import { PrintablePrimitive } from './core/printable_primitive.js';
import * as Box from './core/box.js';
import * as Bytes from './core/bytes.js';
import * as Char from './core/char.js';
import * as UString from './core/unicode_string.js';
import ... | JavaScript | 0.000006 | @@ -1259,32 +1259,8 @@
Path
-,%0A theUnsafeUndefined
%0A%7D;%0A
@@ -2828,16 +2828,23 @@
ed-vars%0A
+export
const th
|
a56ffe0a7ddbd650ba664ca52e12410002d52858 | add some more tests | test/unit/index.js | test/unit/index.js | import Funnies from '../../src/index';
import FunniesComponent from '../../src/react';
import TestUtils from 'react-addons-test-utils';
import React from 'react';
import assert from 'assert';
import sinon from 'sinon';
import jsdom from 'jsdom';
describe('Funnies', function() {
let funnies;
beforeEach(() => {
... | JavaScript | 0.000075 | @@ -76,24 +76,71 @@
src/react';%0A
+import funnyMessages from '../../src/funnies';%0A
import TestU
@@ -958,266 +958,1620 @@
uld
-be able to use custom messages', () =%3E %7B%0A let customMessageFunnies = new Funnies(%5B%22message%22, %22message2%22%5D);%0A assert.notEqual(customMessageFunnies.messages.indexOf... |
eb8df252920d40ab2d55c1ce08888de2a9d63078 | Update canvas2.js | javascript/canvas2.js | javascript/canvas2.js | // Get Canvas
var canvas = document.getElementById("canvas"),
ctx = canvas.getContext("2d"),
width = 512,
height = 480;
canvas.tabIndex = 1;
canvas.width = width;
canvas.height = height;
// Background Image
var bgReady = false;
var bgImage = new Image();
bgImage.onload = function () {
bgReady = true;
};
bgIm... | JavaScript | 0.000001 | @@ -2526,10 +2526,10 @@
s, 3
+7
5
-0
, 32
|
091546c1c704a294306b21088efb5fb7758a5bcb | 添加 utils.getLetters 单元测试 | test/utils.spec.js | test/utils.spec.js | 'use strict';
/* eslint-disable no-console, max-nested-callbacks */
const { pad, isExpired, fuzzy } = require('../src/utils');
const moment = require('moment');
const mocha = require('mocha');
const chai = require('chai');
chai.should();
describe('Utils 测试', function () {
describe('# pad 测试', function () {
... | JavaScript | 0 | @@ -73,14 +73,52 @@
nst
-%7B
+moment = require('moment');%0Aconst %7B%0A
pad,
+%0A
isE
@@ -124,23 +124,39 @@
Expired,
+%0A
fuzzy
-
+,%0A getLetters%0A
%7D = requ
@@ -179,42 +179,8 @@
s');
-%0Aconst moment = require('moment');
%0A%0Aco
@@ -2742,11 +2742,188 @@
%0A %7D);%0A%0A
+ describe('# getLetters... |
1bfc4dd5f1c0444fc6dff4a5599add8eb529fe59 | use zombie to test User#show | test/views/user.js | test/views/user.js | /* test/views/user.js -- test user pages, run it with mocha
* Copyright 2014 Sergei Ianovich
*
* Licensed under AGPL-3.0 or later, see LICENSE
* Process Control Service Web Interface
*/
var request = require('supertest');
var expect = require('expect.js');
var server = request(global.url);
var User = require('.... | JavaScript | 0 | @@ -189,22 +189,21 @@
*/%0A%0Avar
-reques
+expec
t = requ
@@ -211,25 +211,25 @@
re('
-supertest
+expect.js
');%0Avar
expe
@@ -220,30 +220,31 @@
t.js');%0Avar
-expect
+Browser
= require('
@@ -247,43 +247,53 @@
re('
-expect.js');%0A%0Avar server = request(
+zombie');%0A%0Avar browser = new Browser(%7B site:
... |
14cc2032b3c44f69a19963f2ccc3db4a11da2902 | Remove unused import | src/resolvers/tokens.js | src/resolvers/tokens.js | 'use strict'
const tokens = require('../database/tokens')
const pipe = require('../utils/pipe')
const requireAuth = require('../middlewares/requireAuth')
const response = (entry) => ({
id: entry.id,
created: entry.created,
updated: entry.updated
})
module.exports = {
Mutation: {
createToken: async (parent, { i... | JavaScript | 0.000001 | @@ -55,104 +55,8 @@
ns')
-%0Aconst pipe = require('../utils/pipe')%0Aconst requireAuth = require('../middlewares/requireAuth')
%0A%0Aco
|
2c68dc46422264d389a382b6bb202095f3292017 | Add batch id, update carrieraccount type for pickups | src/resources/pickup.js | src/resources/pickup.js | import T from 'proptypes';
import base from './base';
import shipment from './shipment';
import address from './address';
export default (api) => {
const Shipment = shipment(api);
const Address = address(api);
return class Pickup extends base(api) {
static _name = 'Pickup';
static _url = 'pickups';
... | JavaScript | 0 | @@ -93,31 +93,107 @@
ort
-address from './address
+batch from './batch';%0Aimport address from './address';%0Aimport carrierAccount from './carrierAccount
';%0A%0A
@@ -283,16 +283,90 @@
ss(api);
+%0A const Batch = batch(api);%0A const CarrierAccount = carrierAccount(api);
%0A%0A retu
@@ -1062,34 +1062,159 @@
... |
233e4a7c416959b49bb45c3f12b095d16e3ee51a | Fix URL for deleting blocks | fancypages/static/fancypages/js/event-handlers.js | fancypages/static/fancypages/js/event-handlers.js | var fancypages = fancypages || {};
fancypages.eventHandlers = {
/**
* Add a new tab to an existing tab block.
*/
addNewTab: function (ev) {
ev.preventDefault();
$.ajax({
url: $(this).data('action'),
type: 'POST',
data: {
block: $(th... | JavaScript | 0.000021 | @@ -4446,16 +4446,27 @@
aseUrl +
+ 'block/' +
$(block
|
94d8be921d71fd9aabaa119b41138275508a168b | fix disabling by event type | priv/templates/drab/drab.events.js | priv/templates/drab/drab.events.js | const EVENTS = ["click", "change", "keyup", "keydown"];
const EVENTS_TO_DISABLE = <%= Drab.Config.get(:events_to_disable_while_processing) |> Drab.Core.encode_js %>;
Drab.disable_drab_objects = function (disable) {
<%= if Drab.Config.get(:disable_controls_when_disconnected) do %>
var found = document.querySelec... | JavaScript | 0.000001 | @@ -4353,17 +4353,16 @@
SABLE;%0A%0A
-%0A
for (v
@@ -4744,20 +4744,20 @@
Of(event
-_nam
+.typ
e) %3E= 0)
|
21e05c405971b81071ca4b9a8c26a4ad51c5a463 | Update upcomingSongs.js | authorization_code/public/js/upcomingSongs.js | authorization_code/public/js/upcomingSongs.js | $(document).ready(function () {
$('#results').empty;
var userID = localStorage['userID'];
var Snapster;
var playlists = [];
var currentTracks = [];
var j;
var obj = {};
var sendInfo;
// $("#filename").focus(function (event) {
$('#infoHeader').empty();
$('#infoHeader').append(... | JavaScript | 0 | @@ -4296,26 +4296,20 @@
ge%5B%22
-songArray%22%5D.length
+totalSongs%22%5D
+ 1
|
b02298ee25624bf6e477c536be9420f335ec896b | revert to original | src/app/services/EthereumHelperService.js | src/app/services/EthereumHelperService.js | import {insurechain} from "../../modules/ethereum/contract-definitions";
function EthereumService ($q, AppWeb3CheckService) {
this.insurechain = web3.eth.contract (insurechain.abi).at (insurechain.contractAddress);
this.toPromise = (contractFunc) => {
const defer = $q.defer();
return AppWeb3Ch... | JavaScript | 0.000004 | @@ -289,16 +289,17 @@
efer();%0A
+%0A
@@ -379,38 +379,17 @@
unc(
-Array.from(arguments).slice(1)
+arguments
, (e
|
449bb011ea7f5d2b196ddd01d1ea3700cf4a83ba | Apply changes for selectedData state. | src/routes/home/Home.js | src/routes/home/Home.js | import React, { PropTypes } from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './Home.css';
import AppStore from '../../store/AppStore';
import AppAction from '../../action/AppAction';
import _ from 'lodash'
import TextField from 'material-ui/TextField';
import RaisedButton fr... | JavaScript | 0 | @@ -1108,16 +1108,77 @@
edData =
+ %7B%7D%0A if(this.state.selectedData) %7B%0A newSelectedData =
_.find(
@@ -1237,24 +1237,30 @@
Data.title)%0A
+ %7D%0A
this.set
|
ce72fe4e8a6573a78d41b85a2921b9d081c94e4c | Update generator to derive from frost-component | blueprints/component/files/__root__/__path__/__name__.js | blueprints/component/files/__root__/__path__/__name__.js | /**
* Component definition for the <%= dasherizedModuleName %> component
*/
import Ember from 'ember'
const {Component} = Ember
import PropTypesMixin, {PropTypes} from 'ember-prop-types'
import computed, {readOnly} from 'ember-computed-decorators'
import layout from '<%= templatePath %>'
export default Component.e... | JavaScript | 0 | @@ -82,76 +82,8 @@
port
- Ember from 'ember'%0Aconst %7BComponent%7D = Ember%0Aimport PropTypesMixin,
%7BPr
@@ -175,16 +175,59 @@
orators'
+%0Aimport %7BComponent%7D from 'ember-frost-core'
%0A%0Aimport
@@ -298,24 +298,8 @@
end(
-PropTypesMixin,
%7B%0A
@@ -776,103 +776,21 @@
ons%0A
- hook: PropTypes.strin... |
97645ed3044415e00886b613059cf4e3b79013d5 | update sw templates (#1482) | boilerplate-generator/templates/files/serviceworkerJs.js | boilerplate-generator/templates/files/serviceworkerJs.js | importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.4.1/workbox-sw.js');
workbox.skipWaiting();
workbox.clientsClaim();
// Provide an URL to enable a custom offline page
const OFFLINE_PAGE = '/offline.html';
// Pre-cache the AMP Runtime
self.addEventListener('install', event => {
const urls = [
... | JavaScript | 0 | @@ -2058,16 +2058,21 @@
jpeg%7Csvg
+%7Cwebp
)$/,%0A w
@@ -2420,16 +2420,94 @@
e_fonts%0A
+// Cache the Google Fonts stylesheets with a stale while revalidate strategy.%0A
workbox.
@@ -2535,67 +2535,287 @@
(%0A
-new RegExp('
+/%5E
https:
-/
+%5C/%5C
/fonts
-.(?:googleapis%7C
+%5C.googleapis%5C.com/,%0A workbo... |
d837e18ebb8503ef5346a2602a908492868c0e3e | Revert "KYLIN-3049 Filter the invalid zero value of 'Auto Merge Thresholds' parameter when you create or upate a cube." | webapp/app/js/utils/utils.js | webapp/app/js/utils/utils.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"); you ... | JavaScript | 0 | @@ -3741,289 +3741,8 @@
%7D%0A
- function removeByValue(arr,val)%7B%0A for(var i=arr.length-1; i%3E=0; i--) %7B%0A if(arr%5Bi%5D == val) %7B%0A arr.splice(i, 1);%0A %7D%0A %7D%0A %7D%0A var autoMergeTimeRanges = newObj.auto_merge_time_ranges;%0A removeBy... |
7f37c60eaaeed2b792f68d14c36f499ba9458e2b | use privater properties in `UIPlugin` (#3073) | packages/@uppy/core/src/UIPlugin.js | packages/@uppy/core/src/UIPlugin.js | const { render, h, createRef, cloneElement } = require('preact')
const findDOMElement = require('@uppy/utils/lib/findDOMElement')
const BasePlugin = require('./BasePlugin')
/**
* Defer a frequent call to the microtask queue.
*/
function debounce (fn) {
let calling = null
let latestArgs = null
return (...args)... | JavaScript | 0 | @@ -221,20 +221,71 @@
queue.%0A
+ *%0A * @param %7B() =%3E T%7D fn%0A * @returns %7BPromise%3CT%3E%7D%0A
*/%0A
-
function
@@ -1000,155 +1000,8 @@
in.%0A
- *%0A * @param %7Bobject%7D main Uppy core object%0A * @param %7Bobject%7D object with plugin options%0A * @returns %7BArray%7Cstring%7D files or success/fail m... |
bfe340afb40f5e04deec4e7a064ab07579a3b0b0 | Update google demo | hoplet/demo/google.js | hoplet/demo/google.js | var goog = /^https?:\/\/(.*?)google(.*?)/;
// Initialize tour if it's the user's first time
if (goog.test(location.href)) {
console.log(prefix + "Loading tour button onto Google web page");
// Let's attach a Take Tour button to the page
// <li id="blah"><div id="startTourBtn" style="position:relative;... | JavaScript | 0 | @@ -47,88 +47,153 @@
//
-Initialize tour if it's the user's first time%0A if (goog.test(location.href)) %7B%0A
+Author choice to narrow down to a specific url%0A if (goog.test(location.href)) %7B%0A document.addEventListener(%22DOMContentLoaded%22, function()%7B%0A
@@ -262,16 +262,18 @@
%22);%0A
+ ... |
a0dad207c62dc9417cf8b337c00e1679132ff59e | add transactions/brainstree config/setup | server/config.js | server/config.js | Uploader.config({
pem: Assets.getText('gcloud.pem'),
email: Meteor.settings.gcloud.email,
bucket: Meteor.settings.gcloud.bucket
}); | JavaScript | 0 | @@ -130,8 +130,387 @@
cket%0A%7D);
+%0A%0ATransactions.setup(%7B%0A default_gateway: 'braintree',%0A backup_gateway: 'stripe',%0A store_card: false,%0A authorize_only: true,%0A%0A // braintree%0A braintree: %7B%0A channel: 'miners',%0A environment: 'sandbox',%0A merchant_id: '***REMOVED***',%0A ... |
070de59b5337e8632803594e15471cdbbcbea46d | clean up code in server.js | server/server.js | server/server.js | const express = require('express');
const path = require('path');
const app = require('express')();
const bodyParser = require('body-parser');
const handler = require('./helpers/request-handler.js');
const server = require('http').Server(app);
const io = require('socket.io')(server);
// TODO: Will move routes to own m... | JavaScript | 0.000002 | @@ -279,16 +279,35 @@
rver);%0A%0A
+const port = 3000;%0A
// TODO:
@@ -860,213 +860,8 @@
);%0A%0A
-// Routes%0A// REVIEW: Serve index.html from project root?%0Aapp.get('/', (req, res) =%3E %7B%0A // res.sendFile(path.join(__dirname, '..', 'index.html'));%0A res.sendFile(path.join(__dirname, 'index.html'));%0A%0A%7... |
d3bf22d34dc1d7c1c3438b88500858248e4b5dda | Update main.js | data/main.js | data/main.js | /*@pjs preload="data/images/logo1.png";*/
var sketchProc=function(processingInstance){ with (processingInstance){
//Setup
var wi = window.innerWidth ||
document.documentElement.clientWidth ||
document.body.clientWidth;
var he = window.innerHeight ||
document.documentElement.clientHeight ||
... | JavaScript | 0.000001 | @@ -2806,33 +2806,33 @@
%09%09if (flevel %3C 1
-8
+6
0) %7B%0A%09%09%09%09page +=
@@ -2937,17 +2937,17 @@
evel %3C 1
-8
+6
0) %7B%0A%09%09%09
|
60d3ffd4849beba18a58a2bb3b2982aba70199d4 | truncate giant reduce overflow error output | share/server/views.js | share/server/views.js | // 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
// distributed u... | JavaScript | 0.999375 | @@ -1693,24 +1693,158 @@
.length)) %7B%0A
+ var reduce_preview = %22Current output: '%22+(reduce_line.substring(0,100) + %22'... (first 100 of %22+reduce_length+' bytes)');%0A %0A
throw
@@ -1943,27 +1943,10 @@
idly
-. Current output
:
-'
%22+re
@@ -1954,15 +1954,17 @@
uce_
-line
+preview
+%22
-... |
c963ea4f3fe1b0aad9a199960d067025a2684045 | Remove network prop from builder object to prevent clobbering network name from truffle develop | packages/core/lib/commands/debug.js | packages/core/lib/commands/debug.js | const command = {
command: "debug",
description: "Interactively debug any transaction on the blockchain",
builder: {
"_": {
type: "string"
},
"network": {
describe: "Network to connect to",
type: "string"
},
"fetch-external": {
describe: "Allow debugging of external con... | JavaScript | 0 | @@ -159,94 +159,8 @@
%7D,%0A
- %22network%22: %7B%0A describe: %22Network to connect to%22,%0A type: %22string%22%0A %7D,%0A
|
001a0d60b56a5b265c9c4a0e070057ee4600938c | Allow UpdateTracker to accept config parameter | packages/decox/src/UpdateTracker.js | packages/decox/src/UpdateTracker.js | import { subscribe, EventTypes } from './defineWrappedClass';
const isUpdateMethod = name =>
name[0] === '$' && name[1] !== '$';
const isActionMethod = name =>
name[0] === '$' && name[1] === '$';
const convertEventData = data => ({
from: data.className,
methodName: data.methodName,
method: data.method,
p... | JavaScript | 0 | @@ -1,16 +1,18 @@
import %7B
+%0A
subscri
@@ -13,17 +13,37 @@
ubscribe
-,
+ as subscribeStore,%0A
EventTy
@@ -45,17 +45,18 @@
entTypes
-
+,%0A
%7D from '
@@ -416,16 +416,122 @@
or(store
+, %7B%0A subscribe = subscribeStore,%0A isUpdate = isUpdateMethod,%0A isAction = isActionMethod,%0A %7D = %7B%7... |
17073e6d86377b4ff8104fb506c501d6806ae10c | lower case | demo.js | demo.js | /*
* @Author: Ping Qixing
* @Date: 2017-06-02 20:59:16
* @Last Modified by: Ping Qixing
* @Last Modified time: 2017-06-02 21:21:19
* @ Ctrl + Alt + i
*/
/**
* Ctrl + Alt + D
*
* @returns
*/
function getUserName(local) {
if (local == true) {
return "Pint"
}
return "Qixing";
}
/**
... | JavaScript | 0.999997 | @@ -129,12 +129,12 @@
21:2
-1:19
+3:45
%0A *
@@ -176,17 +176,17 @@
+ Alt +
-D
+d
%0A * %0A *
@@ -352,17 +352,17 @@
+ Alt +
-U
+u
%E4%B8%8A%E4%BC%A0VSCod
@@ -392,17 +392,17 @@
+ Alt +
-D
+d
%E4%B8%8B%E8%BD%BDVSCod
|
c54e4225284b94d2257bd5374b3be1173c6847ce | Rename cssMatrix (no functional change) | demo.js | demo.js | "use strict"
var matrixToCSS = require("matrix-to-css")
var shell = require("gl-now")({clearColor: [0.2, 0.4, 0.8, 1.0]})
var camera = require("game-shell-orbit-camera")(shell)
var renderText = require("gl-render-text")
var mat4 = require("gl-mat4")
var mat3 = require("gl-mat3")
var vec3 = require("gl-vec3")
var quat ... | JavaScript | 0 | @@ -3104,32 +3104,107 @@
= fovPx + 'px'%0A
+ //cssWorld.style.perspectiveOrigin = '50%25 50%25' // already is the default%0A
cssWorld.style
@@ -3830,86 +3830,161 @@
%0A v
-iew%5B1%5D = -view%5B1%5D%0A view%5B5%5D = -view%5B5%5D%0A view%5B9%5D = -view%5B9%5D%0A view%5B13%5D = -view
+ar cssMatrix = mat4.clone(... |
abab31cc1b9a19d3d12c66cfa91360821bf498f4 | validate user arguments | jquery.textStretch.js | jquery.textStretch.js | /**
* textStretch.js pre-version alpha (2013.12.01)
*
* Copyright (c) 2012, 2013 Albin Larsson (mail@albinlarsson.com)
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*
**/
(function ($) {
"use strict";
// add class for calculating width. let me know if you see ... | JavaScript | 0.000006 | @@ -728,16 +728,26 @@
settings
+/arguments
%0D%0A%09%09_set
@@ -796,24 +796,489 @@
ptions);%0D%0A%0D%0A
+%09%09// check user arguments%0D%0A%09%09(function()%7B%0D%0A%09%09%09for (_i = 0; _i %3C arguments.length; _i += 1) %7B%0D%0A%09%09%09%09if (typeof _settings%5Barguments%5B_i%5D.name%5D !== arguments%5B_i%5D.typ... |
2085bbad0940f39900ee4f019f95b4dd6162a468 | Add method to register listener for 'main' element | js/components/main.js | js/components/main.js | (function(app) {
'use strict';
var dom = app.dom || require('../dom.js');
var Attributes = app.Attributes || require('../base/attributes.js');
var Button = app.Button || require('./button.js');
var Clock = app.Clock || require('./clock.js');
var Events = app.Events || require('../base/events.js');
var Li... | JavaScript | 0.000001 | @@ -1249,32 +1249,136 @@
resize();%0A %7D;%0A%0A
+ Main.prototype.on = function() %7B%0A return Events.prototype.on.apply(this._events, arguments);%0A %7D;%0A%0A
Main.prototype
|
cbf15cd470265657403304e8eb2951bfab6326c6 | enable menu by default | wowchemy/assets/js/wowchemy-slides.js | wowchemy/assets/js/wowchemy-slides.js | /*
global RevealMarkdown, RevealHighlight, RevealSearch, RevealNotes, RevealMath, RevealZoom, Reveal, mermaid, RevealMenu
*/
import * as params from '@params';
import {fixMermaid} from './wowchemy-utils';
// Enable core slide features.
var enabledPlugins = [RevealMarkdown, RevealHighlight, RevealSearch, RevealNote... | JavaScript | 0.000001 | @@ -1320,17 +1320,17 @@
enabled
-!
+=
== 'unde
|
0ea1aca60304c5d87698856c6dbe2e14771c9129 | Add replace | ng-default-avatar.js | ng-default-avatar.js | /*
* ng-default-avatar - AngularJS directive to set a default avatar with initials if user has not avatar image
* Author: Aitor Rodríguez - http://www.frontendfactory.es/
* Version: 0.1
* License: MIT
*/
'use strict';
angular
.module('ngDefaultAvatar', [])
.controller('defaultAvatarController', ['$scope'], fu... | JavaScript | 0.000029 | @@ -409,16 +409,39 @@
: 'AE',%0A
+ replace: true,%0A
%09%09%09%09scop
|
b14f0256d8deac062494d9f29b494087e0f87fd5 | Handle aria-grabbed states for draggybits. Issue #9. | js/libs/draggybits.js | js/libs/draggybits.js | (function($) {
var pluginName = 'draggyBits';
var movingClass = 'ui-moving';
var draggerClass = 'ui-dragger';
var closerClass = 'ui-closer';
var minimizeClass = 'ui-hider';
var hiddenClass = 'ui-hidden';
var isMoving = false;
var zIndex = 100;
var pos = { x:0, y:0 };
var numDraggers = 0;
var til... | JavaScript | 0 | @@ -1349,24 +1349,71 @@
me, data);%0A%0A
+ $dragger.attr('aria-grabbed', false);%0A%0A
numD
@@ -2832,24 +2832,54 @@
ction (e) %7B%0A
+ var $this = $(e.target);%0A%0A
if (!isM
@@ -2904,24 +2904,63 @@
urn;%0A %7D%0A%0A
+ $this.attr('aria-grabbed', false);%0A
$('.' +
@@ -3364,24 +336... |
71b4c0b93679924a34eba92ab7ab06af7ced4641 | Swap empty fns for noop in planet spec. | spec/planets.spec.js | spec/planets.spec.js | var _ = require('Underscore');
var Eventer = require('../src/eventer').Eventer;
var Draw = require('../src/demos/planets').Planets;
var Planets = require('../src/demos/planets').Planets;
var ctx = function() {
return {
canvas: {
width: 300,
height: 300,
},
fillRect: function() {},
beginP... | JavaScript | 0 | @@ -185,14 +185,48 @@
s;%0A%0A
-%0Avar c
+var noop = function() %7B%0A%0A%7D;%0A%0Avar canvasC
tx =
@@ -322,29 +322,20 @@
llRect:
-function() %7B%7D
+noop
,%0A be
@@ -339,37 +339,28 @@
beginPath:
-function() %7B%7D
+noop
,%0A closeP
@@ -364,29 +364,20 @@
sePath:
-function() %7B%7D
+noop
,%0A li
@@ ... |
5c529d5cb21b017dd975414e7411a64d2acc66c0 | Use same "No upload for dev channel" rule for S3 | lib/download-center.js | lib/download-center.js | 'use strict';
const _ = require('lodash');
const fs = require('fs-extra');
const debug = require('debug')('mongodb-download-center');
const AWS = require('aws-sdk');
const MANIFEST_BUCKET = 'info-mongodb-com';
let maybeUpload = (CONFIG, asset) => {
const bucket = 'downloads.10gen.com';
const key = `${CONFIG.down... | JavaScript | 0 | @@ -3681,16 +3681,139 @@
tup();%0A%0A
+ if (CONFIG.channel === 'dev') %7B%0A debug('Skipping publish to S3 for dev channel.');%0A return Promise.resolve();%0A %7D%0A%0A
CONFIG
|
bfd6715d9d3a1d8614d5429d5497c9622c6771ff | Add option to consider layout with position:fixed header | smooth-scroll.js | smooth-scroll.js | /*
* - smooth-scroll.js -
* Licence MIT
* Written by Gabriel Delépine
* Version 1.0 (2013-10-27)
* Requirement : No one, it is a framework-free fonction (ie : You do not need to include any other file in your page such as jQuery)
* Fork-me in github : https://github.com/Yappli/smooth-scroll/
* */
(function() // ... | JavaScript | 0 | @@ -84,16 +84,18 @@
1.0
+.1
(2013-1
0-27
@@ -94,12 +94,12 @@
13-1
-0-27
+1-08
)%0A *
@@ -382,25 +382,25 @@
ed = 500
-;
+,
%0A
-var
+
moving_
@@ -413,17 +413,17 @@
ncy = 15
-;
+,
// Affe
@@ -444,19 +444,174 @@
e !%0A
+
-var
+ height_fixed_header = 0, // For layout with header with position:f... |
845b08817ecfbcdeb0425e0d3ffaa47c0df2d05c | Remove case branch for group 30 as it is covered by 3d point parsing for 10. | lib/entities/attdef.js | lib/entities/attdef.js |
var helpers = require('../ParseHelpers');
module.exports = EntityParser;
function EntityParser() {}
EntityParser.ForEntityName = 'ATTDEF';
EntityParser.prototype.parseEntity = function(scanner, curr) {
var entity = {
type: curr.value,
scale: 1,
textStyle: 'STANDARD'
};
curr = s... | JavaScript | 0 | @@ -1098,91 +1098,8 @@
ak;%0A
- case 30:%0A entity.z = curr.value;%0A break;%0A
|
83bfae4651e3673b0accb8f6eb805b50491e3669 | replace fadein and fadeout effect by hide and show classic function, becaus jquery.slim doesn't inclue annimation effects | js/src/o-scroll-up.js | js/src/o-scroll-up.js | /**
* --------------------------------------------------------------------------
* Boosted (v4.0.0-alpha.4): o-scroll-up.js
* Licensed under MIT (https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
const... | JavaScript | 0 | @@ -2146,14 +2146,12 @@
OP).
-fadeIn
+show
()%0A
@@ -2199,15 +2199,12 @@
OP).
-fadeOut
+hide
()%0A
|
a0cc6f7c7e7a0a176a381b827f6a43473b125fcc | remove missed console.log | lib/extract/command.js | lib/extract/command.js | var path = require('path');
var clap = require.main.require('clap');
var common = require('../common/command.js');
var targets = ['app-profile', 'log', 'input-graph']; // first is default
function resolveCwd(value){
console.log(value);
return path.resolve(process.env.PWD || process.cwd(), value);
}
function norm... | JavaScript | 0.000001 | @@ -215,30 +215,8 @@
e)%7B%0A
- console.log(value);%0A
re
|
bd5bb335f3b20a5c8c7720125ba0cdf0fd366491 | Improve command line help | lib/generate-config.js | lib/generate-config.js | "use strict"
var fs = require('fs')
var path = require('path')
var argv = require('yargs')
.usage('Usage: $0 [options]')
.default('max', 5)
.help('help')
.argv
const CONFIG_FILE = path.join(process.cwd(), '/xd-testing.json')
fs.access(CONFIG_FILE, fs.F_OK, function(err) {
if (!err... | JavaScript | 0.000019 | @@ -85,20 +85,16 @@
yargs')%0A
-
.usa
@@ -119,20 +119,16 @@
ions%5D')%0A
-
.def
@@ -142,24 +142,185 @@
ax', 5)%0A
+.describe('max', 'Maximum number of generated devices')%0A%0A .boolean('force')%0A .alias('f', 'force')%0A .describe('force', 'Override existing config file')%0A%0A
.... |
e44c36109abd4f71d8d47d22d9a75f66dad16eea | Tweak `.forbidden` error message. (#293) | lib/generateElement.js | lib/generateElement.js | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
'use strict';
const generate = require('./generate');
/**
* Wrap SRI data for resourceUrl in a script tag
*
... | JavaScript | 0 | @@ -1613,29 +1613,16 @@
t-type%0A%0A
-
https://
@@ -1690,21 +1690,8 @@
ges%0A
-
http
@@ -1720,11 +1720,8 @@
org/
-en/
docs
|
717e778d71e4bad62fb6931090181e7e5de4c19c | Add documentation comments | Source/Scene/ModelExperimental/PointCloudAttenuationPipelineStage.js | Source/Scene/ModelExperimental/PointCloudAttenuationPipelineStage.js | import Cartesian3 from "../../Core/Cartesian3.js";
import defaultValue from "../../Core/defaultValue.js";
import defined from "../../Core/defined.js";
import OrthographicFrustum from "../../Core/OrthographicFrustum.js";
import PrimitiveType from "../../Core/PrimitiveType.js";
import ShaderDestination from "../../Render... | JavaScript | 0 | @@ -553,16 +553,135 @@
e.js%22;%0A%0A
+/**%0A * Stage to handle point cloud attenuation.%0A *%0A * @namespace PointCloudAttenuationPipelineStage%0A *%0A * @private%0A */%0A
var Poin
@@ -873,16 +873,465 @@
an3();%0A%0A
+/**%0A * This stage does the following:%0A * %3Cul%3E%0A * %3Cli%3EAdd vertex shader code to comp... |
7866a5eb4381553eb6e98d996109aeb36280f250 | fix e.touches bug in iOS 8.1.3 for tap.js directive | src/directives/tap.js | src/directives/tap.js | /**
* Simple directive for mocking tap event
*/
export default {
name: 'tap',
bind (el, { value, modifiers }) {
const threshold = window.innerWidth / 10
let start
el.addEventListener('touchstart', e => {
start = null
if (e.touches && e.touches.length === 1) {
start = e.touches[0]
... | JavaScript | 0 | @@ -295,28 +295,142 @@
-start = e.touches%5B0%5D
+// fix e.touches bug in iOS 8.1.3%0A start = %7B%0A pageX: e.touches%5B0%5D.pageX,%0A pageY: e.touches%5B0%5D.pageY%0A %7D
%0A
|
6ce082c34cd14c34e77bad03132cf0475b755394 | Fix tests for post filter inheritance | tests/lib/posts.js | tests/lib/posts.js | const chai = require( 'chai' );
const expect = chai.expect;
const sinon = require( 'sinon' );
const sandbox = require( 'sandboxed-module' );
const PostsRequest = require( '../../lib/posts' );
describe( 'wp.posts', function() {
describe( 'constructor', function() {
it( 'should create a PostsRequest instance', fun... | JavaScript | 0 | @@ -1732,27 +1732,172 @@
var
-extend = sinon.spy(
+mockFilterMixins = %7B%0A%09%09%09%09filter: 'methods',%0A%09%09%09%09getInstanceProp: function() %7B%0A%09%09%09%09%09return this._id;%0A%09%09%09%09%7D%0A%09%09%09%7D;%0A%09%09%09var extend = sinon.spy( require( 'node.extend' )
);%0A%09
@@ -1977,32 +1977,35 @@
e... |
701327780aecf24fcb34ea3372de902ee3e32c55 | migrate class to component | src/client/components/home/HomeContent.js | src/client/components/home/HomeContent.js | import React from 'react';
import ImageHome from './ImageHome';
import Features from './Features';
import HowWorks from './HowWorks';
import MoreFeatures from './MoreFeatures';
import DownloadApp from './DownloadApp';
import Newsletter from './Newsletter';
const HomeContent = React.createClass({
render() {
retur... | JavaScript | 0.000002 | @@ -5,16 +5,31 @@
rt React
+, %7B Component %7D
from 'r
@@ -35,16 +35,16 @@
react';%0A
-
import I
@@ -270,47 +270,106 @@
';%0A%0A
-const HomeContent = React.createClass(%7B
+export default class HomeContent extends Component %7B%0A constructor (props)%7B%0A super(props);%0A %7D%0A
%0A r
@@ -614,16 +614,21 ... |
7aa45c69e5207047c2efef02d53c23ef4ae3f736 | Fix page limit for selectFeed | src/commands/prompts/common/selectFeed.js | src/commands/prompts/common/selectFeed.js | const { MessageEmbed } = require('discord.js')
const { DiscordPrompt, MenuEmbed, MenuVisual } = require('discord.js-prompts')
const Translator = require('../../../structs/Translator.js')
const createLogger = require('../../../util/logger/create.js')
/**
* @typedef {Object} Data
* @property {import('../../../structs/... | JavaScript | 0 | @@ -1408,27 +1408,8 @@
mbed
-, %7B maxPerPage: 1 %7D
)%0A
|
0d2b8429e6406b2d730e4db04f2274d8bdf71fa6 | Rename var semantically for consistency | tests/post-json.js | tests/post-json.js | var data = require('../private.js'),
postJson = require('post-json');
var url = data.url.jesseTest,
body = {};
body.value1 = "hola"; // Change value of one of the keys in the JSON body object
postJson(url, body, function(err, result) {
// Do something here
});
| JavaScript | 0.000008 | @@ -1,13 +1,20 @@
var
-d
+privateD
ata = re
@@ -83,17 +83,24 @@
r url =
-d
+privateD
ata.url.
|
629970b4c6ba41d34a98380d82994f9e762b9b6d | Add two lvls tests | tests/post.spec.js | tests/post.spec.js | let mocha = require('mocha');
let chakram = require('chakram');
let before = mocha.before;
let after = mocha.after;
let describe = mocha.describe;
let it = mocha.it;
let expect = chakram.expect;
describe("POST", function() {
before(done => {
console.log("before post");
done();
});
after(done => {
co... | JavaScript | 0.000001 | @@ -1160,32 +1160,33 @@
m.wait();%0A %7D);%0A
+%0A
it(%22with objec
@@ -1432,16 +1432,17 @@
;%0A %7D);%0A
+%0A
it(%22wi
@@ -1448,16 +1448,8 @@
ith
-complex
arra
@@ -1935,32 +1935,32 @@
ve.status(200);%0A
-
expect(respo
@@ -2048,13 +2048,427 @@
);%0A %7D);
+%0A%0A it(%22with two levels array of ob... |
5a8f7eea5e64588f93a1309c1fbde300a091af3c | Fix profile chat button | src/components/profile/profilePageCtrl.js | src/components/profile/profilePageCtrl.js | const debug = require('debug')('yunity:profilePage');
export default class ProfilePageCtrl {
constructor($scope, $attrs, yAPI, yChat, $stateParams, $location) {
'ngInject';
Object.assign(this, {
$scope, $location,
yAPI, yChat,
error: null
});
const own = ("own" in $at... | JavaScript | 0.000001 | @@ -779,18 +779,20 @@
) %7B%0A
-le
+cons
t chat =
@@ -819,16 +819,21 @@
ingChat(
+this.
$scope.u
@@ -988,16 +988,23 @@
+ this.
+$scope.
user.id
|
bf4e3364b48ece118ea1e9e915737e0163becff6 | Tweak of the RoomTooltip to use DOM element for the parent rather than a React component | src/components/views/rooms/RoomTooltip.js | src/components/views/rooms/RoomTooltip.js | /*
Copyright 2015, 2016 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, sof... | JavaScript | 0 | @@ -794,22 +794,19 @@
-compon
+par
ent: Rea
@@ -1220,24 +1220,116 @@
ontainer);%0A%0A
+ // don't render tooltip if parent is undefined%0A if (this.props.parent) %7B%0A
this
@@ -1344,24 +1344,28 @@
Tooltip();%0A%0A
+
// t
@@ -1412,32 +1412,36 @@
tion us%0A
+ ... |
d3dcb4e8a563caeeec1d297f509703606d800824 | Add some docblocks | server/Media/Media.js | server/Media/Media.js | const db = require('sqlite')
const squel = require('squel')
const debug = require('debug')
const log = debug('app:media')
class Media {
static async getLibrary () {
const artists = {
result: [],
entities: {}
}
const media = {
result: [],
entities: {}
}
try {
const q... | JavaScript | 0.000001 | @@ -130,16 +130,291 @@
Media %7B%0A
+/**%0A * Get artists and %22songs%22 in a format suitable for sending to clients%0A * as quickly as possible. Only lists one media item per song (the%0A * preferred item, if one is set) and does not include providerData%0A *%0A * @return %7BPromise%7D Object with artist and media r... |
6d8d3b08cca2cb4590469a5e05175bebde95c7a2 | use href instead of replace so user can go back | public/javascripts/EventHandler.js | public/javascripts/EventHandler.js | let injectedProvider;
let Web3 = require("web3");
let web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
let web3Handler = require("./Web3Handler.js");
let contract;
let defaultAccount;
$(() =>
{
//check if plugin node is available if not use localhost
if (typeof window.web3 !== 'undefi... | JavaScript | 0 | @@ -1264,39 +1264,36 @@
window.location.
+h
re
-place
+f
(%22https://ropste
@@ -1384,39 +1384,36 @@
window.location.
+h
re
-place
+f
(%22https://rinkeb
@@ -1505,39 +1505,36 @@
window.location.
+h
re
-place
+f
(%22https://kovan.
@@ -1611,23 +1611,20 @@
ocation.
+h
re
-place
+f
(%22https:
@@ -2846,39 +2846,36... |
074d6ae4ae27e953fa8dc38bae4e1506f1f7f343 | Fix unicode in the test cases | tests/test_list.js | tests/test_list.js | /* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake_l@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */
function buildTestList() {
var testList = [];
function... | JavaScript | 0.999414 | @@ -2613,28 +2613,28 @@
nicode.js',
-5, 4
+6, 5
);%0A build
|
978571e60ef704fada004bf95f3f67144693729f | Fix paths in test_list | tests/test_list.js | tests/test_list.js | /* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake_l@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */
function buildTestList() {
var testList = [];
function... | JavaScript | 0.000019 | @@ -2111,34 +2111,28 @@
'regex/test/
-assertions
+star
/star.js', 7
@@ -2163,26 +2163,20 @@
ex/test/
-assertions
+star
/star_on
@@ -2220,26 +2220,20 @@
ex/test/
-assertions
+star
/lazy.js
|
91a27a0f26c34ed9b55e14acea186828b19b47b8 | Test Android modal keyboards and auth layouts | src/containers/ForgotPasswordContainer.js | src/containers/ForgotPasswordContainer.js | import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import shallowCompare from 'react-addons-shallow-compare'
import { isAndroid } from '../lib/jello'
import { FORM_CONTROL_STATUS as STATUS } from '../constants/status_types'
import { sendForgotPasswordRequest } from '../actions/aut... | JavaScript | 0 | @@ -141,16 +141,19 @@
ompare'%0A
+//
import %7B
@@ -1977,194 +1977,8 @@
%5D)%7D%0A
- onBlur=%7BisAndroid() ? () =%3E document.body.classList.remove('isCreditsHidden') : null%7D%0A onFocus=%7BisAndroid() ? () =%3E document.body.classList.add('isCreditsHidden') : null%7D%0A
|
e9347ac7d8494879ed70654e67e4b9aa3499f069 | Remove duplicate declaration | webroot/js/lib/ui_blocker.js | webroot/js/lib/ui_blocker.js | Frontend.UIBlocker = Class.extend({
init: function() {
},
_blockUiOptions: {
fadeIn: 50,
fadeOut: 150,
message: ' Bitte warten', // blockElement won't display with an empty message.
overlayCSS: {
backgroundColor: '#fff'
}
},
_blockUiOptions: ... | JavaScript | 0.000089 | @@ -57,240 +57,8 @@
%7B%0A%0A
- %7D,%0A _blockUiOptions: %7B%0A fadeIn: 50,%0A fadeOut: 150,%0A message: ' Bitte warten', // blockElement won't display with an empty message.%0A overlayCSS: %7B%0A backgroundColor: '#fff'%0A %7D%0A
|
725e0afd4249c1a7e67b38f40ee66e58a5cb75f1 | Update levelTracking directories | public/js/project/levelTracking.js | public/js/project/levelTracking.js | /**
* Level Tracking
* @description: Mechanism for tracking levels in gameplay
*/
// Track the levels
var levelTracking = 1;
function loadPage(id, levelMove, guide){
var currentLevel = levelTracking + parseInt(levelMove);
if(currentLevel < 1) {
document.getElementById("lowerBound").disabled = "disabled";
... | JavaScript | 0 | @@ -751,16 +751,19 @@
Text = %22
+../
level%22 +
|
05031d6692d3b1ee0a2d1e6b1cafd45f74c76713 | clear animation timeouts when restarting | src/states/HighScore.js | src/states/HighScore.js | import Phaser from 'phaser'
import axios from 'axios'
import _ from 'lodash'
import config from '../config'
import {centerGameObjects} from '../utils'
export default class extends Phaser.State {
init() {
this.stage.backgroundColor = config.css.webWhite
}
preload() {
}
create() {
const margin = 50
this.gam... | JavaScript | 0.000001 | @@ -453,24 +453,45 @@
To(0.62)%0A%0A%09%09
+this.playerTimeout =
setTimeout((
@@ -541,20 +541,16 @@
e(margin
- * 2
, 100, '
@@ -653,16 +653,35 @@
500)%0A%0A%09%09
+this.moveTimeout =
setTimeo
@@ -1696,16 +1696,86 @@
Down) %7B%0A
+%09%09%09clearTimeout(this.playerTimeout)%0A%09%09%09clearTimeout(this.moveTimeou... |
a5859d487f902d2d7997f2017a4b115473540a38 | Add promise functions to http client | src/store/api/client.js | src/store/api/client.js | import superagent from 'superagent'
import errors from '../../lib/errors'
const client = {
get (path, callback) {
superagent
.get(path)
.end((err, res) => {
// if (res.statusCode === 401) return errors.backToLogin()
callback(err, res.body)
})
},
post (path, data, callback) ... | JavaScript | 0 | @@ -1100,16 +1100,784 @@
)%0A %7D,%0A%0A
+ ppost (path, data, callback) %7B%0A return new Promise((resolve, reject) =%3E %7B%0A superagent%0A .post(path)%0A .send(data)%0A .end((err, res) =%3E %7B%0A if (res.statusCode === 401) %7B%0A errors.backToLogin()%0A ... |
7dbdd949215e0cb75a1aea2f66a126b5b531d5e7 | fix utl | src/stream-analytics.js | src/stream-analytics.js | ;(function (f) {
// RequireJS
if (typeof define === "function" && define.amd) {
define("StreamAnalytics", [], function(){ return f(); });
}
// CommonJS
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = f();
}
// Global
var g = null;
if (typeof window !== "und... | JavaScript | 0.000012 | @@ -1148,99 +1148,12 @@
http
+s
';%0A
- if (cfg.protocol === 'http') %7B%0A cfg.host = 'analytics.getstream.io/3.0';%0A %7D%0A
@@ -1180,24 +1180,25 @@
re(cfg);%0A %7D
+;
%0A%0A StreamAn
@@ -1269,24 +1269,25 @@
userId;%0A %7D
+;
%0A%0A StreamAn
@@ -1653,24 +1653,25 @@
%7D%0A %7D;%0A %7D
... |
f8bae973fc501804709407205371972db93dff28 | Put template for Alarm indices | server/lib/helpers.js | server/lib/helpers.js | /*
* Copyright 2016, Lorenzo Mangani (lorenzo.mangani@gmail.com)
* Copyright 2015, Rao Chenlin (rao.chenlin@gmail.com)
*
* This file is part of Sentinl (http://github.com/sirensolutions/sentinl)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance w... | JavaScript | 0 | @@ -3485,21 +3485,24 @@
Alarms
-Index
+Template
...');%0A
@@ -3511,35 +3511,40 @@
client.indices.
-cre
+putTempl
ate(%7B%0A inde
@@ -3531,37 +3531,36 @@
emplate(%7B%0A
-index
+name
: config.es.alar
@@ -3594,92 +3594,46 @@
-settings: %7B%0A number_of_shards: 1,%0A number_of_r... |
dbc7477a90058d9b609f07c02688533703af40c0 | Return a 404 error on unknown page routes instead of letting the frontend handle it | server/main/server.js | server/main/server.js | const bodyParser = require('body-parser');
const cookieParser = require('cookie-parser');
const cors = require('cors');
const express = require('express');
const logger = require('morgan');
const path = require('path');
const appConstants = require('../constants/app_constants');
const routeUtils = require('../utils/rou... | JavaScript | 0.000001 | @@ -1431,179 +1431,70 @@
%0A//
-API 404s%0Aapp.use(new express.Router().get(%60$%7BappConstants.VERSION_PREFIX%7D/*%60, routeUtils.notFound));%0A%0A// Redirect any other routes to index.html (single page app)%0Aapp.use(
+Serve index.html to page routes%0Aapp.get(%5B'/', '/workflow/*'%5D,
(req
@@ -1575,21 +1575,83 @... |
130b03028f8b3b1b126ebf663c321183f004014a | Use consistent quotation marks | wpcom-stats-redirect.user.js | wpcom-stats-redirect.user.js | // ==UserScript==
// @name WordPress.com classic stats
// @namespace tpenguinltg
// @description Redirects the new stats page to the classic stats page
// @include https://wordpress.com/stats*
// @version 2.2.1
// @updateURL https://github.com/tpenguinltg/wpcom-stats-redirect.user.js/raw/master/wpcom... | JavaScript | 0.000001 | @@ -1143,13 +1143,13 @@
pen(
-'GET'
+%22GET%22
, pa
@@ -1502,17 +1502,17 @@
seUrl +
-'
+%22
/wp-admi
@@ -1523,17 +1523,17 @@
dex.php?
-'
+%22
+ query
@@ -2344,17 +2344,17 @@
ats(
-'
+%22
http://
-'
+%22
+ b
|
cb1e6a01b2bb15d83836abe4173c6bfca92f027e | Remove unneccessary replace() in CrxInstaller.js | www/cdvah/js/CrxInstaller.js | www/cdvah/js/CrxInstaller.js | (function(){
'use strict';
/* global myApp */
myApp.run(['$q', 'Installer', 'AppsService', 'ResourcesLoader', 'urlCleanup', function($q, Installer, AppsService, ResourcesLoader, urlCleanup){
var platformId = cordova.require('cordova/platform').id;
function CrxInstaller(url, appId) {
... | JavaScript | 0.000003 | @@ -982,27 +982,8 @@
Path
-.replace(/%5C/$/, '')
+ '
|
894631b49ba4aa76ca764e9357f2b636ae581f53 | add prod mode eslint and uglifyjs config | gulp/core/config/scripts.js | gulp/core/config/scripts.js | var path = require('path');
var webpack = require('webpack-stream').webpack;
var BowerWebpackPlugin = require('bower-webpack-plugin');
// utils
var deepMerge = require('../utils/deepMerge');
// config
var overrides = require('../../config/scripts');
var assets = require('./common').paths.asse... | JavaScript | 0 | @@ -2,30 +2,16 @@
ar path
-
= requir
@@ -33,27 +33,16 @@
webpack
-
= requir
@@ -423,17 +423,16 @@
ets.src
-
+ '/js/*
@@ -446,18 +446,16 @@
,%0A%09%09src:
-
%5B%0A%09%09%09as
@@ -523,17 +523,16 @@
%0A%09%09dest:
-
assets.
@@ -1095,138 +1095,306 @@
%09%09%09%09
-mangle: %7B%0A... |
cc90c9691d40cc7b0363b13a75b9529735833a75 | Remove if statement from deploy | gulp/tasks/deploy/deploy.js | gulp/tasks/deploy/deploy.js | 'use strict';
var gutil = require( 'gulp-util' );
var ftp = require( 'vinyl-ftp' );
var sequence = require('run-sequence');
module.exports = function(gulp, config) {
gulp.task( 'ftp', function () {
// Makes sure you changed the site domain http://www.samplesite.com
if(!config.url == 'http://www.samplesi... | JavaScript | 0.000012 | @@ -203,134 +203,8 @@
%7B%0A%0A
- // Makes sure you changed the site domain http://www.samplesite.com%0A if(!config.url == 'http://www.samplesite.com') %7B%0A%0A
@@ -577,94 +577,8 @@
));%0A
-%0A %7D%0A else %7B%0A%0A console.log('You didn%5C't set the domain name.');%0A %0A %7D%0A%0A
... |
5bab31e416e5d9a1b6d441489b8d87c75413f912 | fix lit errors. | lib/models/bookmark.js | lib/models/bookmark.js | module.exports = function(crowi) {
var debug = require('debug')('crowi:models:bookmark')
var mongoose = require('mongoose')
var ObjectId = mongoose.Schema.Types.ObjectId
var bookmarkSchema
bookmarkSchema = new mongoose.Schema({
page: { type: ObjectId, ref: 'Page', index: true },
user: { type: ObjectI... | JavaScript | 0.000001 | @@ -1970,43 +1970,8 @@
) %7B%0A
- var User = crowi.model('User')%0A
@@ -2722,77 +2722,29 @@
ion(
-results) %7B%0A bookmarks = results%5B0%5D%0A count = results%5B1%5D%0A
+%5Bbookmarks, count%5D) %7B
%0A
|
86e08a3605b4f4cd75b3e8131a036e829fcb3a45 | Update require for new name of progress package | lib/models/pipeline.js | lib/models/pipeline.js | 'use strict';
var Promise = require('ember-cli/lib/ext/promise');
var _ = require('lodash-node');
var chalk = require('chalk');
var blue = chalk.blue;
var red = chalk.red;
/* This is a generic implementation of a pipeline with ordered, promise-aware hooks,
* pleasant logging, and failure handling. It shoul... | JavaScript | 0 | @@ -783,9 +783,8 @@
re('
-@
embe
@@ -795,17 +795,17 @@
i-deploy
-/
+-
progress
|
2f41afffbe981d054b45c785aef42dd479ecce23 | rename directive flow method .stateModel() -> pipe() | src/flow/directive.js | src/flow/directive.js | import Component from '../components/flow-component';
import Controller from './controller';
function camelCase(input) {
return input.toLowerCase().replace(/-(.)/g, function(match, group1) {
return group1.toUpperCase();
});
}
class Directive extends Component {
constructor(name) {
var directiveName = c... | JavaScript | 0.000001 | @@ -996,71 +996,47 @@
%0A%0A
-stateModel(stateModel)%7B%0A this.config.stateModel = stateModel
+pipe(pipe)%7B%0A this.config.pipe = pipe
;%0A
|
ca0205b4cc6e0fb02edd3e7cdbe08deab467ef05 | Improve cart event triggering adding the item params and start and error events | lib/payment/cartlib.js | lib/payment/cartlib.js | $.fn.extend({
cartProductClassMissingForm: function(settings){
settings = $.extend({
informationForm: ''
}, settings);
$(this).each(function() {
var formParent = $(this).submit(function(){
if (formParent.attr('satisfied')) return true;
formParent.addClass('hasMissingForm');
var formDial... | JavaScript | 0.000004 | @@ -2108,25 +2108,29 @@
%22);%0A%09%09%09%09var
-d
+itemD
ata = %7B%7D, pa
@@ -2195,25 +2195,29 @@
, v) %7B%0A%09%09%09%09%09
-d
+itemD
ata%5B%22params~
@@ -2298,25 +2298,29 @@
el) %7B%0A%09%09%09%09%09
-d
+itemD
ata%5B$(el).at
@@ -2351,24 +2351,86 @@
);%0A%09%09%09%09%7D);%0A%0A
+%09%09%09%09$(document).trigg... |
772b9724662d6152ee2ec08640886990eebd65c9 | Convert all tabs to spaces in LEB128 | lib/protocol/LEB128.js | lib/protocol/LEB128.js | 'use strict';
var leb = require('leb');
/**
* Provide operations for serializing/deserializing integer data into
* variable-length 64-bit LEB128 integer encoding [1].
*
* References:
* [1] https://en.wikipedia.org/wiki/LEB128
*
**/
var LEB128 = {
/**
* Encode an arbitrarily large positive integer value us... | JavaScript | 0.999999 | @@ -454,17 +454,18 @@
.%0A **/%0A
-%09
+
encode:
@@ -609,17 +609,18 @@
alue);%0A%0A
-%09
+
%7D,%0A%0A /*
@@ -697,17 +697,18 @@
.%0A **/%0A
-%09
+
decode:
@@ -907,9 +907,10 @@
e;%0A%0A
-%09
+
%7D,%0A%0A
|
428661ec2fc7cee39bc884ebd166e926bb4e9f8d | Add statistics support | src/ChannelEngine.js | src/ChannelEngine.js | import xhr from 'superagent';
import crypto from 'crypto';
import moment from 'moment';
export default class ChannelEngine {
constructor(tenant, apiKey, apiSecret){
this.tenant = tenant;
this.apiKey = apiKey;
this.apiSecret = apiSecret;
this.baseUri = 'https://' + tenant + '.channelengine.net';
this.apiUri ... | JavaScript | 0 | @@ -157,16 +157,29 @@
piSecret
+, environment
)%7B%0A%09%09thi
@@ -255,263 +255,1399 @@
et;%0A
+%09%09%0A
%09%09this.
-baseUri = 'https://' + tenant + '.channelengine.net';%0A%09%09this.apiUri = '/api/v1/';%0A%09%7D%0A%0A%09getOrders(statuses, callback) %7B%0A%09%09statuses = statuses %7C%7C %5B0%5D; // IN_PROGRESS... |
f45d557978e17b6461d8cae348f3069bc4c2372f | Update DOCS | docs/js/index.js | docs/js/index.js | var scrollers = [];
document.addEventListener("DOMContentLoaded", init);
function init() {
MiniBarOptions = {
alwaysShowBars: true
};
[].slice.call(document.querySelectorAll(".inner")).forEach(function(el, i, arr) {
if ( el.nodeName !== "TEXTAREA" && i < arr.length - 1 ) {
el.firstElementChild.innerHTML ... | JavaScript | 0 | @@ -388,20 +388,47 @@
owBars:
-true
+el.hasAttribute(%22data-visible%22)
,%0A%09%09%09bar
|
79f08c3ff720b2bfff49397e7bd85d02c5f84fd2 | Fix EngineBuilder to load Component correctly | src/EngineBuilder.js | src/EngineBuilder.js | var ActionEngine = require('./engine/ActionEngine');
var Action = require('./engine/Action');
function build(isServer) {
var engine = new ActionEngine(isServer);
engine.c('player', require('./engine/PlayerComponent'));
engine.c('pos', require('./Position'));
engine.c('blob', require('./Blob').component);
eng... | JavaScript | 0 | @@ -366,33 +366,33 @@
nent);%0A engine.
-s
+c
('render', requi
|
55f0db373206cbfb071ad6844e098c4a9e201cee | Extend each instance instead of extending Array | language/utils.js | language/utils.js | 'use strict';
const matchers = require('./matchers');
const MATCHER_PUNCTUATION = new RegExp('^(' + matchers.punctuation + ')+$');
function isPunctuation(text) {
return MATCHER_PUNCTUATION.test(text);
}
const MATCHER_ALPHABETIC = '(?:' + matchers.wordish + ')+';
const MATCHER_NUMERIC = '(?:' + matchers.numeric + ')... | JavaScript | 0.000002 | @@ -1707,27 +1707,29 @@
esult =
-new
+make
Tokens(
+%5B%5D
);%0A%0A%09con
@@ -2241,42 +2241,58 @@
;%0A%0A%0A
-class Tokens extends A
+function makeTokens(a
rray
+)
%7B%0A
-%0A%09raw
+%09array.raw = function
() %7B
@@ -2561,16 +2561,34 @@
;%0A%09%7D
+;
%0A%0A%09
-slice
+array.slice = function
() %7B
@@ -265... |
e8cebb79f4112e950197d6b7d4fe9cdf11b83ccc | Add duplicate() | simple.js | simple.js | 'use strict';
function $(selector){
return document.querySelector(selector);
}
function $All(selector){
return document.querySelectorAll(selector);
}
function assignGlobalObjects(list){
for(let item of Object.getOwnPropertyNames(list))
window[item] = $(list[item]);
}
function create(type, propertie... | JavaScript | 0.000067 | @@ -1352,24 +1352,92 @@
lement;%0A%7D%0A%0A%0A
+function duplicate(node)%7B%0A return document.importNode(node);%0A%7D%0A%0A%0A
function hid
|
d7459b8f01919c6758c835d922cb8234f95291bd | Add nodeListIterator | simple.js | simple.js | 'use strict';
function $(selector){
return document.querySelector(selector);
}
function $All(selector){
return document.querySelectorAll(selector);
}
function assignGlobalObjects(list){
for(let item of Object.keys(list))
window[item] = $(list[item]);
}
function assignMethods(constructor, methods){
... | JavaScript | 0.000001 | @@ -2888,32 +2888,138 @@
ment;%0A %7D%0A%7D%0A%0A%0A
+function* nodeListIterator(node_list)%7B%0A for(let i=0; i%3Cnode_list.length; i++)%0A%09yield node_list%5Bi%5D;%0A%7D%0A%0A%0A
function printf(
|
1f0db5f70ca9a8c122d102f51ff3f1caae508993 | Add inore to response rules | lib/rules/protocols.js | lib/rules/protocols.js | var protocols = ['host', 'req', 'rule', 'rulesFile', 'res', 'weinre', 'proxy', 'https2http-proxy', 'http2https-proxy', 'internal-proxy', 'pac', 'filter', 'ignore', 'enable',
'disable', 'delete', 'log', 'plugin', 'exports', 'exportsUrl', 'hostname', 'referer', 'auth', 'ua', 'etag', 'urlParams', 'dispatc... | JavaScript | 0.000001 | @@ -950,24 +950,34 @@
, 'disable',
+ 'ignore',
'replaceSta
|
dbfd5f919dfe2ecdd8868699e1dc43fba1d246d8 | Return all renders | drop.js | drop.js | 'use strict';
var express = require('express');
var mongoose = require('mongoose');
var path = require('path');
var fs = require('fs');
var bodyParser = require('body-parser');
var jwt = require('jwt-simple');
var session = require('express-session');
var bcrypt = require('bcrypt');
var formidable = require('formidabl... | JavaScript | 0.999927 | @@ -5725,24 +5725,31 @@
+return
res.sendFile
@@ -5845,24 +5845,31 @@
+return
res.render('
@@ -6021,24 +6021,31 @@
%7C 500);%0A
+return
res.render('
|
e759d21061d9519b296430d54b33f3c00b773fe4 | fix linting (#8220) | integration-tests/gatsby-image/src/pages/index.js | integration-tests/gatsby-image/src/pages/index.js | import React from 'react'
import { Link } from 'gatsby'
import PropTypes from 'prop-types'
import Layout from '../components/layout'
const IndexPage = () => (
<Layout>
<h1>Gatsby Image integration test</h1>
<h2>Please navigate to <Link to="/fixed">/fixed</Link>, <Link to="/fluid">/fluid</Link>, or <Link to=... | JavaScript | 0 | @@ -52,43 +52,8 @@
sby'
-%0Aimport PropTypes from 'prop-types'
%0A%0Aim
@@ -181,16 +181,23 @@
%3Ch2%3E
+%0A
Please n
@@ -239,16 +239,27 @@
%3C/Link%3E,
+%7B%60 %60%7D%0A
%3CLink t
@@ -321,16 +321,21 @@
%3C/Link%3E.
+%0A
%3C/h2%3E%0A
|
2a25a78080fc9a8390e0a6b832ac4f5ae3e032e0 | Fix random x axis ball speed | src/Item/Platform.js | src/Item/Platform.js | import Item, { MovingDirection, ItemType } from './Item'
import Ball from './Ball'
import ItemLoader from '../Loader/ItemLoader'
import Helper from '../Utility/Utility'
export default class Platform extends Item {
constructor(width, height, color) {
super(
[500 - (width / 2), 500 - height - 10],
[wid... | JavaScript | 0.00035 | @@ -1067,17 +1067,29 @@
tSpeed(%5B
-0
+randomSpeed()
, random
|
b07100137aa1ee4bedee2fd8bb9ffa6a23775b6b | Change the random select. | src/helpers/player.js | src/helpers/player.js | const player = require('play-sound')( opts = {} );
const Random = require('random-js');
const sounds_path = './node_modules/kaamelott-soundboard';
const sound_connect = [];
const sounds_start = [
'en_garde_espece_de_vieille_pute_degarnie',
'en_garde_ma_mignone',
];
const sounds_win = [
'putain_il_est_for... | JavaScript | 0 | @@ -575,33 +575,57 @@
nst
-index = Random.integer(0,
+song_selected = songs%5BMath.floor(Math.random() *
song
@@ -636,11 +636,10 @@
ngth
--1
)
+%5D
;%0A
@@ -677,32 +677,17 @@
song
-s%5Bindex%5D, 'index', index
+_selected
);%0A
@@ -704,16 +704,17 @@
song
-s%5Bindex%5D
+_selected
;%0A
|
32cc0a59f65c6a6b16aa84c5ffc545d1632cee6e | add isQuestion() | src/inverted-index.js | src/inverted-index.js | "use strict";
String.prototype.hasVowels = function() {
if (this.match(/[abcde]/gi) === null) {
return false;
}
return true;
};
String.prototype.toUpper = function() {
return this.replace(/[a-z]/gi, function(val) {
// check if the char is lowercase i.e. ascii 97-122
var ascii = val.charCodeAt();
... | JavaScript | 0.00243 | @@ -963,32 +963,112 @@
= function() %7B%0A
+%09if(this.match(/%5Ba-zA-Z.;%5D%7B1,%7D%5B?%5D/) == null) %7B%0A%09%09return false;%0A%09%7D%0A%0A%09return true;
%0A%7D;%0A%0AString.prot
|
fc53dd06d44f109a968bbb607905414e85694f1a | stop onboarding | lib/support/windows.js | lib/support/windows.js | const os = require('os');
const fs = require('fs');
const path = require('path');
const child_process = require('child_process');
const utils = require('../utils.js');
const KiteError = require('../kite-error');
const {STATES} = require('../constants');
const KEY_BAT = `"${path.join(__dirname, 'read-key.bat')}"`;
con... | JavaScript | 0.000001 | @@ -2686,16 +2686,94 @@
s %7C%7C %7B%7D;
+%0A var env = Object.create(process.env);%0A env.KITE_SKIP_ONBOARDING = '1';
%0A%0A ut
@@ -2857,24 +2857,36 @@
STALLER_PATH
+, %7Benv: env%7D
)%0A .then(
|
d923a56bd08e845e94f6fe1d3877fb43c9a26c21 | use timeout instead of interval, to avoid them piling up on pausing in debugger | lib/txsForAddresses.js | lib/txsForAddresses.js | 'use strict'
var typeforce = require('typeforce')
var debug = require('debug')('txsForAddresses')
var Readable = require('readable-stream')
var bitcoin = require('bitcoinjs-lib')
var deepEqual = require('deep-equal')
var noop = function () {}
/**
* options {object} (optional)
* options.addresses {Ar... | JavaScript | 0.000001 | @@ -753,25 +753,23 @@
lear
-Interval(interval
+Timeout(timeout
)%0A
@@ -801,24 +801,66 @@
%0A%0A var
-interval
+timeout%0A var interval = options.interval %7C%7C 60000
%0A var l
@@ -928,88 +928,8 @@
()%0A%0A
- if (live) %7B%0A interval = setInterval(fetch, options.interval %7C%7C 60000)%0A %7D%0A%0A
... |
7f661393b8e9fbbe46a628d3220cc2d0ef510c11 | Use Buffer.from instead of new Buffer, avoiding deprecation warning | lib/unexpectedImage.js | lib/unexpectedImage.js | /*global Uint8Array*/
const gm = require('gm');
const contentTypeByGraphicsMagickFormat = {
GIF: 'image/gif',
JPEG: 'image/jpeg',
PNG: 'image/png',
SVG: 'image/svg+xml'
};
module.exports = {
name: 'unexpected-image',
version: require('../package.json').version,
installInto(expect) {
expect.installPl... | JavaScript | 0 | @@ -763,27 +763,28 @@
ubject =
- new
Buffer
+.from
(matchDa
@@ -891,19 +891,20 @@
ct =
- new
Buffer
+.from
(sub
|
5315323982b2ed46016a9e9b06a2bee87be1d6ef | Comment out debug statements | lib/utils/httpUtils.js | lib/utils/httpUtils.js | var Promise = require("bluebird");
var request = Promise.promisifyAll(require("request"));
var buildHeaders = function(options) {
var headers = {
'Authorization' : 'Bearer ' + options.accessToken,
'Accept': options.accept || 'application/json',
'Content-Type': options.contentType || 'application/json',
... | JavaScript | 0 | @@ -1538,16 +1538,18 @@
ons);%0A
+//
console.
@@ -1966,16 +1966,18 @@
ns);%0A
+//
console.
|
76780375bbbabc7e7eddb84654614daf400e7611 | implement interfaceAdapter.getNetworkId (environment/environment) | packages/environment/environment.js | packages/environment/environment.js | const Web3 = require("web3");
const { Web3Shim, InterfaceAdapter } = require("@truffle/interface-adapter");
const expect = require("@truffle/expect");
const TruffleError = require("@truffle/error");
const Resolver = require("@truffle/resolver");
const Artifactor = require("@truffle/artifactor");
const Ganache = require... | JavaScript | 0 | @@ -2867,24 +2867,35 @@
ait
-web3.eth.net.get
+interfaceAdapter.getNetwork
Id()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.