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 |
|---|---|---|---|---|---|---|---|
f80f8c0a85fc52c6b442a65717b82200179ffbb6 | Add fallback for undefined scope | index.js | index.js | "use strict"
var fs = require('fs')
var gutil = require('gulp-util')
var homeConfig = require('home-config')
var path = require('path')
var request = require('request')
var syncRequest = require('sync-request')
var strformat = require('strformat')
var through = require("through2")
var observable = require("riot-observ... | JavaScript | 0.000001 | @@ -3754,32 +3754,103 @@
'./'%0A %7D%0A
+ if (!options.scope) %7B%0A options.scope = ''%0A %7D%0A
return o
|
639aae95f3b57429a493bcd060f7fdf839a44e7b | Add general comments related to react / conventions | client/src/components/signin-non-redux-form.js | client/src/components/signin-non-redux-form.js | import React, {Component} from 'react';
class SignIn extends Component {
constructor(props) {
super(props);
this.state = {
username: '',
password: '',
error: null
};
this.handleSubmit = this
.handleSubmit
.bind(this);
... | JavaScript | 0 | @@ -762,51 +762,284 @@
-this.setState(%7Berror: %22Invalid username%22%7D);
+// I see mixed usage of single and double quote in this file. I prefer single quote as the convention.%0A this.setState(%7Berror: %22Invalid username%22%7D);%0A // Below statement is not guaranteed to print expecte... |
8e3a5edbb5972cf383f1e5ad3bbf6458151dd204 | remove @require jQuery (Mastodon have already) :crocodile: | mastodonLangRemover.user.js | mastodonLangRemover.user.js | // ==UserScript==
// @name mastodonLangRemover
// @namespace https://arthurlacoste.com
// @version 0.0.3
// @description Remove a lang from web interface
// @author Arthur Lacoste <arthak@gmail.com>
// @match *://*/web/*
// @match *://*/settings/preferences
// @require http://a... | JavaScript | 0 | @@ -292,89 +292,8 @@
ces%0A
-// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js%0A
// @
|
e506db2b547072659b47d983326b2ec935f2ada8 | Add error handling | index.js | index.js | var webshot = require('webshot'),
FeedParser = require('feedparser'),
fs = require('fs'),
EventEmitter = require('events'),
request = require('request'),
FormData = require('form-data')
const gyazoId = fs.readFileSync(process.env.HOME + '/.gyazo.id', 'utf8')
var items = []
fs.createReadStream('./... | JavaScript | 0.000002 | @@ -322,13 +322,12 @@
ata/
-test2
+dump
')%0A
@@ -805,16 +805,35 @@
ole.log(
+'Got %25d articles',
items.le
@@ -1095,160 +1095,8 @@
k)%7B%0A
- //var renderStream = webshot(link)%0A //renderStream.setMaxListeners(2)%0A // renderStream.on('finish', function(data) %7B%0A // writeImage(data)%0A //%7D)%0A
v... |
4891d05b8feb85b9ddc1462a6b5ce6cfcc2a01aa | Use the Chrome App's name instead of its inscrutable origin. | request_device_dialog.js | request_device_dialog.js | /*
Copyright 2014 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 required by applicable law or agreed to in ... | JavaScript | 0 | @@ -4624,16 +4624,20 @@
o.origin
+Name
;%0A th
|
c17416c81d2bbad85452b15d614958196cabc867 | Add tests for state hasMouseOver | app/scripts/components/DonationWidget.spec.js | app/scripts/components/DonationWidget.spec.js | import React from 'react'
import sinon from 'sinon'
import { expect } from 'chai'
import { render, mount, shallow } from 'enzyme'
import DonationWidget from './DonationWidget.jsx'
describe('DonationWidget', () => {
let props = {
editable: false,
mobilization: {},
widget: {},
}
let context = {
r... | JavaScript | 0.000001 | @@ -1863,12 +1863,569 @@
%7D)%0A %7D)
+%0A%0A describe('overlay states', () =%3E %7B%0A%0A it('should change state.hasMouseOver when mouseEnter div', () =%3E %7B%0A let wrapper = shallow(%3CDonationWidget %7B...props%7D /%3E)%0A wrapper.simulate('mouseEnter')%0A expect(wrapper.state().hasMouseOver... |
f5c7cf2beef7383c628f31e055756e32db3f2e6b | update adapter query to data model change | lib/cayley_adapter.js | lib/cayley_adapter.js | // RDF constants
const RDF_SYNTAX = '<http://www.w3.org/1999/02/22-rdf-syntax-ns#';
const FLOW_VOCAB = '<http://schema.jillix.net/vocab/';
const SCHEMA = '<http://schema.org/';
/* ADAPTER CAYLEY QUERIES */
// get entrypoint for adapter
exports.adapter = (g, entrypoint_name) => {
return [
// get entrypoin... | JavaScript | 0 | @@ -493,32 +493,67 @@
', 'predicate')%0A
+ .Out(FLOW_VOCAB + 'json%3E')%0A
.Out(RDF
@@ -1813,32 +1813,67 @@
', 'predicate')%0A
+ .Out(FLOW_VOCAB + 'json%3E')%0A
.Out(RDF
|
1c8b361f3d9cbf133641fca3bda9088040f0156c | add possibility of plural | res/js/generateReadme.js | res/js/generateReadme.js | // Increases in probability of a sentence/the readme
// ending with each additional word
var DELTA_WORD_SENTENCE = 0.017;
var DELTA_SENTENCE_README = 0.0016;
function normalize(arr) {
var sum = arr.reduce((a, b) => a + b, 0);
return arr.map(val => val / sum);
}
// Probabilities
// Format is [noun, verb, adj, ... | JavaScript | 0.999999 | @@ -2031,19 +2031,58 @@
h =
-PROB_KEYS%5B6
+(Math.random() %3C 0.7) ? PROB_KEYS%5B6%5D : PROB_KEYS%5B8
%5D;%0A%0A
|
da9b7d5df0f9b98a3c7408a07afbb7f66d5e092f | Change default grunt task to both build and test (thanks @nanonoxi) | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-karma');
grunt.initConfig({
paths: {
src: [
'src/index.js',
... | JavaScript | 0 | @@ -2127,16 +2127,32 @@
'build'
+,%0A 'test'
%0A %5D);
|
e993297f6071af0168ddba2713729556b8090e27 | Removing unneccessary blank lines | src/zoomifytilesource.js | src/zoomifytilesource.js | (function($) {
/**
* @class ZoomifyTileSource
* @classdesc A tilesource implementation for the zoomify format.
*
* @memberof OpenSeadragon
* @extends OpenSeadragon.TileSource
* @param {Number} width - the pixel width of the image.
* @param {Number} height
* @param {Number} t... | JavaScript | 0.999779 | @@ -1423,17 +1423,16 @@
h - 1;%0A%0A
-%0A
@@ -1480,17 +1480,16 @@
ions%5D);%0A
-%0A
%7D;%0A%0A
@@ -3118,17 +3118,16 @@
%7D,%0A%0A
-%0A
|
ee06ae2506a17f0751a193d7a049f600893d6aed | replace qunit by jasmine in grunt | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
// show elapsed time at the end
require('time-grunt')(grunt);
// load grunt tasks just in time
require('jit-grunt')(grunt, {
usebanner: 'grunt-banner'
});
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
banner: '/*! \n * <%... | JavaScript | 0.998917 | @@ -1256,20 +1256,20 @@
s.js', '
-test
+spec
/*.js'%5D%0A
@@ -1284,187 +1284,8 @@
%7D,%0A%0A
- blanket_qunit: %7B%0A options: %7B%0A urls: %5B'test.html?coverage=true&gruntReport'%5D,%0A threshold: 70%0A %7D,%0A unit: %7B%7D%0A %7D,%0A%0A
@@ -4... |
2dc731e131457c18679ff05e484aa906291d67b6 | Add up.migrate.removedEvent(type, replacementExpression) | src/unpoly-migrate/migrate.js | src/unpoly-migrate/migrate.js | const u = up.util
/*-
@module up.migrate
*/
up.migrate = (function() {
const config = new up.Config(() => ({
logLevel: 'warn'
}))
// function getPath(object, path) {
// for (let leg in path.split('.')) {
// object = object[leg]
// }
// return object
// }
//
// function setPath(objec... | JavaScript | 0 | @@ -1894,24 +1894,210 @@
ewType%0A %7D%0A%0A
+ // Maps old event type to new event type%0A const removedEvents = %7B%7D%0A%0A function removedEvent(type, replacementExpression = null) %7B%0A removedEvents%5Btype%5D = replacementExpression%0A %7D%0A%0A
function f
@@ -2284,24 +2284,333 @@
ewEventType%0A
+ ... |
cfccb8c281c662ec1fbef5ffe149f2dda8bed511 | remove android-tester | app/pinchy.js | app/pinchy.js | const apiInterface = require('./interface')
const five = require('johnny-five');
const board = new five.Board();
let connectedDevices = [];
let accTriggered = false;
//implement security on device recognition,
//only those who are connected can communicate
module.exports = board.on('ready', function() {
let cli... | JavaScript | 0.000551 | @@ -743,239 +743,8 @@
oid%0A
- setTimeout( () =%3E %7B%0A let testMessage = responseFactory('notify', 'pinchy-android-tester', '4QrvLoxFAM4', 5000, null, null);%0A console.log('sends notify');%0A apiInterface.publishMessage(testMessage);%0A %7D, 2000);%0A%0A
@@ -810,20 +810,22 @@
actory('
-... |
e81b2a4ddb67c2ebbe4fd155818a4cb0ffb5f026 | refactor `matchesKey` | index.js | index.js | module.exports = function parseOptions(argv, options) {
let args = {}, unknownOptions = []
for (let i = 0; i < argv.length; i++) {
let foundOption = false
const keys = Object.keys(options)
for (let j = 0; j < keys.length; j++) {
const key = keys[j]
const alias = options[key].alias
i... | JavaScript | 0.000006 | @@ -1,8 +1,110 @@
+function matchesKey(arg, key, alias) %7B%0A return arg === %60-$%7Bkey%7D%60 %7C%7C alias && arg === %60--$%7Balias%7D%60%0A%7D%0A%0A
module.e
@@ -422,66 +422,39 @@
if (
-argv%5Bi%5D === %60-$%7Bkey%7D%60 %7C%7C alias && argv%5Bi%5D === %60--$%7Balias%7D%60
+matchesKey(argv%5Bi%5D, key, alias)
) ... |
f9f2f656cc9fa753ac8cd23e059bcc9ec382dcf9 | fix change main coin list | src/modules/dex/directives/dexBlock/DexBlock.js | src/modules/dex/directives/dexBlock/DexBlock.js | (function () {
'use strict';
/**
* @param Base
* @param {JQuery} $element
* @param {app.utils} utils
* @param {app.i18n} i18n
* @return {DexBlock}
*/
const controller = function (Base, $element, utils, i18n) {
class DexBlock extends Base {
constructor() {... | JavaScript | 0 | @@ -2740,32 +2740,182 @@
setMode = true;%0A
+ utils.wait().then(() =%3E %7B%0A $element.find('input.change-base-asset-input').focus();%0A %7D);%0A
|
ca16cf5895112c0f8d7440d6eb8450334ab40219 | use gormmet datetime | app/src/components/SpotlightArticles/index.js | app/src/components/SpotlightArticles/index.js | import React, { PropTypes } from 'react';
import styles from './index.module.scss';
import cssModules from 'react-css-modules';
import Heading from 'grommet-udacity/components/Heading';
import Paragraph from 'grommet-udacity/components/Paragraph';
import Box from 'grommet-udacity/components/Box';
import Button from 'gr... | JavaScript | 0.000019 | @@ -347,16 +347,68 @@
utton';%0A
+import DateTime from 'grommet/components/DateTime';%0A
import %7B
@@ -1028,16 +1028,76 @@
name%7D%60%7D%0A
+ %3CDateTime value=%7B%60at $%7Barticle.created_at%7D%60%7D /%3E%0A
|
57847fa8582a6d5bd9e1fa5be101f917a94e8d05 | fix analytics path | app/router.js | app/router.js | import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.reopen({
location: 'history',
notifyGoogleAnalytics: function() {
return ga('send', 'pageview', {
'page': this.get('url'),
'title': this.get('url'... | JavaScript | 0.000001 | @@ -264,16 +264,36 @@
'page':
+ '/audio-backpack' +
this.ge
@@ -318,16 +318,36 @@
'title':
+'/audio-backpack' +
this.ge
|
a4f2f803595536fa67de6985ef63b0c81bf9dcca | deprecate exclude option | index.js | index.js | var path = require('path');
var exec = require('child_process').exec;
var merge = require('merge');
var dargs = require('dargs');
var Writer = require('broccoli-caching-writer');
var rsvp = require('rsvp');
var fse = require('fs-extra');
var expand = require('glob-expand');
var ignoredOptions = [
'compassCommand... | JavaScript | 0.998674 | @@ -3668,16 +3668,35 @@
le.log('
+%5Bbroccoli-compass%5D
DEPRECAT
@@ -3970,42 +3970,163 @@
%0A%0A
-var exclude = %5B'!.sass-cache/**'%5D;
+if (options.exclude) %7B%0A console.log('%5Bbroccoli-compass%5D DEPRECATION: The exclude option has been deprecated in favour of the %60cleanOutput%60 option');%0A %7D
%0... |
83da46fb184925260a0f3db7452021725acd46a2 | Update Router | app/router.js | app/router.js | import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
export default Router.map(function() {
});
| JavaScript | 0.000001 | @@ -175,12 +175,558 @@
ion() %7B%0A
+ // /login%0A this.route('login');%0A%0A // /employees%0A this.resource('employees', function() %7B%0A //// /employees/2 - render into outlet in employees template%0A //this.resource('employee', %7Bpath: ':id'%7D);%0A%0A //// /employees/new%0A ... |
a563b49877bd798a4edb6dcbe617912a50253740 | Put missing return back in | src/utils/array/StableSort.js | src/utils/array/StableSort.js | /**
* @author Richard Davey <rich@photonstorm.com>
* @author Angry Bytes (and contributors)
* @copyright 2022 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
var Device = require('../../device');
/**
* The comparator function.
*
* @ignore
*
* @para... | JavaScript | 0.000046 | @@ -768,24 +768,157 @@
compare)%0A%7B%0A
+ // Short-circuit when there's nothing to sort.%0A var len = array.length;%0A%0A if (len %3C= 1)%0A %7B%0A return array;%0A %7D%0A%0A
// Rathe
|
2970102288c0c254c0987e7fda712ce73d35e5d6 | set adnoce type to 1 for visits (pushTrackingData) | lib/clienttracking.js | lib/clienttracking.js | var db = require('mongoose');
var models = require('./databasemodels.js');
var Log = require('log'), log = new Log('info');
var io = null;
/**
* Sets the socket to transport messages to adnoce server
* @param socket.io socket
*/
var setSocketIO = function(io_) {
if (io === null) io = io_;
}
exports.setSocketIO = ... | JavaScript | 0 | @@ -2886,18 +2886,45 @@
-agent'%5D
-,
+%7D %0A %7D %0A additionalData.
adnocety
@@ -2930,23 +2930,12 @@
ype
-: 100%7D %0A %7D
+= 1;
%0A v
|
0ae53425f57db12d121cd1f39284440e90529b2b | Implement Fizz | fizzbuzz/src/fizzbuzz.js | fizzbuzz/src/fizzbuzz.js | 'use strict'
module.exports = {
fizzBuzz: function(num) {
if(num%15 === 0) {
return 'FizzBuzz';
}
}
} | JavaScript | 0.998234 | @@ -96,16 +96,62 @@
zBuzz';%0A
+%09%09%7D else if (num%253 === 0) %7B%0A%09%09%09return 'Fizz';%0A
%09%09%7D%0A%09%7D%0A%7D
|
708208dac699032c176923422449b9d877237fad | correct x bias | src/local.js | src/local.js | 'use strict';
const regression = require('./regression');
const numeric = require('numeric');
const get = require('lodash/get');
const fs = require('fs');
const FreeSurfer = require('freesurfer-parser');
const pify = require('pify');
const DECLARATION_INPUTS_KEY = require('./constants').DECLARATION_INPUTS_KEY;
/**
*... | JavaScript | 0.000009 | @@ -3298,28 +3298,8 @@
dX =
- X%5B0%5D.length === 1 ?
add
@@ -3309,12 +3309,8 @@
s(X)
- : X
;%0A
@@ -4002,32 +4002,81 @@
%0A %7D);%0A%0A
+ // filter based on first passed in ROI%0A
return
|
b126e4456b6a9cb4317fad208fdb9f1bec84e80d | simplify quota logic | lib/commands/quota.js | lib/commands/quota.js | /*jshint esversion: 6 */
/* globals Buffer*/
const Quota = module.exports;
const Util = require("../common-util");
const Package = require('../../package.json');
const Https = require("https");
Quota.applyCustomLimits = function (Env) {
var isLimit = function (o) {
var valid = o && typeof(o) === 'object' ... | JavaScript | 0.998541 | @@ -1152,48 +1152,8 @@
) %7B%0A
- if (Env.adminEmail === false) %7B%0A
@@ -1178,28 +1178,24 @@
imits(Env);%0A
-
if (Env.
@@ -1226,34 +1226,12 @@
alse
-) %7B return; %7D%0A if (
+ %7C%7C
Env.
@@ -1268,99 +1268,19 @@
turn
-; %7D%0A throw new Error(%22allowSubscriptions must be fa... |
8632713965259495c092b6426fae46c9b43ca341 | enable es6 | index.js | index.js | module.exports = {
extends: [
'eslint-config-defaults'
].map(require.resolve),
env: {
node: true
},
rules: {
'array-callback-return': 2,
'class-methods-use-this': 2,
'eol-last': 2,
'func-call-spacing': 2,
'id-blacklist': 0,
indent: ['error', 2],
'keyword-spacing': [2, {
... | JavaScript | 0 | @@ -97,18 +97,200 @@
-node: true
+es6: true,%0A node: true%0A %7D,%0A parserOptions: %7B%0A ecmaVersion: 6,%0A sourceType: 'module',%0A ecmaFeatures: %7B%0A generators: false,%0A objectLiteralDuplicateProperties: false%0A %7D
%0A %7D
|
94b0380e99fbb6d2ff6ddcf4df9e3e1af76e9c6e | fix failing test | index.js | index.js | var ent = require('ent');
var htmlparser = require('htmlparser2');
var CSSselect = require('CSSselect');
var domutils = require('domutils');
module.exports = hyperfast;
function hyperfast (html, params) {
var elems = htmlparser.parseDOM(html);
Object.keys(params).forEach(function (key) {
var val = par... | JavaScript | 0.000006 | @@ -207,45 +207,215 @@
-var elems = htmlparser.parseDOM(html)
+// wrap elements so that there's always a root element%0A // available, e.g. node.parent is never null%0A var wrapped = htmlparser.parseDOM('%3Cwrap%3E' + html + '%3C/wrap%3E');%0A var elems = wrapped%5B0%5D.children
;%0A%0A
|
8ec90a204511b7727010c6ef5699f3a2b084041d | Remove unnecessary newlines | src/ol/interaction/dragrotateandzoominteraction.js | src/ol/interaction/dragrotateandzoominteraction.js | goog.provide('ol.interaction.DragRotateAndZoom');
goog.require('goog.asserts');
goog.require('goog.math.Vec2');
goog.require('ol');
goog.require('ol.ViewHint');
goog.require('ol.events.ConditionType');
goog.require('ol.events.condition');
goog.require('ol.interaction.Interaction');
goog.require('ol.interaction.Pointer... | JavaScript | 0.001686 | @@ -1626,20 +1626,16 @@
AndZoom,
-%0A
ol.inte
|
1c93670fd67b7312aac12ee07fbd45226fdd6576 | add message properties | lib/common/message.js | lib/common/message.js | // Copyright 2014, Renasar Technologies Inc.
/* jshint node: true */
'use strict';
var di = require('di');
module.exports = MessageFactory;
di.annotate(MessageFactory, new di.Provide('Message'));
di.annotate(MessageFactory,
new di.Inject(
'Assert',
'Tracer'
)
);
function MessageFactory (ass... | JavaScript | 0.000001 | @@ -570,33 +570,330 @@
nger
-);%0A assert.ok(data
+, 'Messenger must be specified.');%0A assert.object(data, 'Data must be an object.');%0A assert.object(options, 'Options must be specified.');%0A assert.object(options.fields, 'Options must contain a fields property.');%0A assert.obj... |
c486c330b7f3fea7332c07b585f2025471dd2cb1 | simplify main module code | index.js | index.js | /*!
* sort-algorithms-js
* index (main module object)
* Copyright(c) 2015 Eyas Ranjous <eyas@eyasranjous.info>
* MIT Licensed
*/
'use strict';
module.exports = (function() {
var self = {},
src = './lib/';
self.bubbleSort = require(src + 'bubbleSort');
self.insertionSort = require(src + 'ins... | JavaScript | 0.033999 | @@ -164,76 +164,14 @@
s =
-(function() %7B%0A%0A var self = %7B%7D,%0A src = './lib/';%0A%0A self.
+%7B%0A
bubb
@@ -172,26 +172,25 @@
bubbleSort
- =
+:
require(src
@@ -186,23 +186,23 @@
require(
-src + '
+'./lib/
bubbleSo
@@ -205,27 +205,22 @@
leSort')
-;
+,
%0A
-self.
insertio
@@ -216... |
1543b959ff526cf3bc627918319d8d1985c647d2 | convert to QueryStringMachine | js/scenery-phet-main.js | js/scenery-phet-main.js | // Copyright 2014-2016, University of Colorado Boulder
/**
* Main file for the scenery-phet library demo.
*
* @author Sam Reid
*/
define( function( require ) {
'use strict';
// modules
var ButtonsView = require( 'SCENERY_PHET/demo/ButtonsView' );
var ComponentsView = require( 'SCENERY_PHET/demo/Components... | JavaScript | 0.999999 | @@ -777,70 +777,160 @@
R =
-phet.chipper.getQueryParameter( 'backgroundColor' ) %7C%7C
+QueryStringMachine.get( 'backgroundColor', %7B%0A type: 'string', // CSS color format, e.g. 'green', 'ff8c00', 'rgb(255,0,255)'%0A defaultValue:
'white'
;%0A%0A
@@ -925,16 +925,22 @@
'white'
+%0A %7D )
;%0A%0A var
|
b7d25bd0c84dcb5c8fb88aac8d400ff2fdc81069 | Comment heroku production | config/env/production.js | config/env/production.js | /**
* Production environment settings
*
* This file can include shared settings for a production environment,
* such as API keys or remote database passwords. If you're using
* a version control solution for your Sails app, this file will
* be committed to your repository unless you add it to your .gitignore
* ... | JavaScript | 0 | @@ -1286,30 +1286,32 @@
-connections: %7B
+// Heroku Deploy
%0A
-
+//
sigm
@@ -1324,16 +1324,19 @@
%0A
+ //
adapte
@@ -1364,54 +1364,18 @@
+ //
host:
- process.env.OPENSHIFT_MYSQL_DB_HOST %7C%7C
'us
@@ -1418,16 +1418,19 @@
+ //
user:
(pro
@@ -1429,79 +1429,242 @@
er:
-(... |
cf002dcaf9075e3e8394976a74c0b807ef90879d | Remove check-module from whitespace rule | index.js | index.js | const commonRules = {
'arrow-parens': true,
'arrow-return-shorthand': true,
'binary-expression-operand-order': true,
'class-name': true,
'comment-format': {
options: ['check-space'],
},
'eofline': true,
'forin': true,
'import-spacing': true,
'indent': {
options: ['tabs'],
},
'jsdoc-format': true,
'labe... | JavaScript | 0 | @@ -2405,27 +2405,8 @@
l',%0A
-%09%09%09'check-module',%0A
%09%09%09'
|
396fe405c85135c4e92e6e88cf61e6a4b3545842 | Move event initialization into the constructor too | src/pivotal-ui/components/forms/link-updater.js | src/pivotal-ui/components/forms/link-updater.js | var $ = require('jquery');
var isInvalid = require('npm-user-validate').username;
var errorClass = "has-error";
var LinkUpdater = function(el){
this.el = $(el);
this.updater = this.el.find(".link-updater");
this.input = this.el.find("input");
this.pathDisplay = this.el.find("p strong");
this.demoValue = thi... | JavaScript | 0 | @@ -240,24 +240,118 @@
d(%22input%22);%0A
+ this.input.on(%22input%22, function(e)%7B%0A this.updateValue(e.target.value);%0A %7D.bind(this));%0A%0A
this.pathD
@@ -1440,17 +1440,8 @@
%0A
- var lu =
new
@@ -1462,94 +1462,8 @@
l);%0A
-%0A lu.input.on(%22input%22, function(e)%7B%0A lu.updateValue(e... |
54842a1a26e50a04c4de1cd6807977b85d4dcdef | Add support dropdown header button in place of just guide. Add fancy caret from font awesome in place of the unicode one. | siggy.globalnotes.js | siggy.globalnotes.js | function globalnotes(options)
{
this.defaults = {
baseUrl: ''
};
this.settings = $.extend(this.defaults, options);
this.globalNotesEle = null;
this._blinkNotesInterval = null;
this.globalNotes = '';
this.editingGlobalNotes = false;
this.siggyMain = null;
}
globalnotes.prototype.initialize = function()
{... | JavaScript | 0 | @@ -552,16 +552,49 @@
tes
-▼
+%3Ci class=%22fa fa-caret-square-o-down%22%3E%3C/i%3E
');%0A
@@ -685,16 +685,47 @@
tes
-▲
+%3Ci class=%22fa fa-caret-square-o-up%22%3E%3C/i%3E
');%0A
|
f9bea8debeea8cf77ec43e52219b3f95451250cd | use promise | index.js | index.js | var express = require('express');
module.exports = function (done) {
var self = this;
self.express = express;
self.expressApp = express();
process.nextTick(done);
};
| JavaScript | 0.000862 | @@ -82,16 +82,60 @@
= this;%0A
+ return new Promise(function (resolve) %7B%0A
self.e
@@ -152,16 +152,18 @@
xpress;%0A
+
self.e
@@ -191,29 +191,24 @@
;%0A
-process.nextTick(done
+ resolve();%0A %7D
);%0A%7D
|
92fd374e87bbe5f6b810458365eee453fda9080d | Update production.js | config/env/production.js | config/env/production.js | 'use strict';
module.exports = {
baseUrl: process.env.BASE_URL || process.env.HEROKU_APP_NAME + '.herokuapp.com' || 'tellform.com',
db: {
uri: process.env.MONGODB_URI || process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || '0.0.0.0') + '/mean',
},
port: p... | JavaScript | 0.000001 | @@ -395,16 +395,216 @@
m.com',%0A
+%09socketPortExternallyVisible: (process.env.SOCKET_PORT_EXTERN_VISIBLE === 'TRUE' %7C%7C !process.env.SOCKET_PORT_EXTERN_VISIBLE), //socketPortExternallyVisible set to true in production config by default%0A
%09socketP
|
72bc029db9f328c5a31d0aab6893bd6c1295ad23 | remove unused code | index.js | index.js |
'use strict';
var slice = Array.prototype.slice;
function clone(obj) {
var copy;
if('object' === typeof obj && !!obj) {
if(Array.isArray(obj)) {
copy = [];
obj.forEach(function(element, index) {
if(typeof element === 'object') {
copy[index] = clone(element);
} else {
... | JavaScript | 0.000017 | @@ -907,41 +907,8 @@
s);%0A
- var argsKey = args.join('');%0A
|
d2ce30ff755041400f7dc90ed535603431e52db7 | Check if view's `$()` exists before modifying | packages/ember-forms/lib/controls/unbound_select.js | packages/ember-forms/lib/controls/unbound_select.js | var fmt = Ember.String.fmt;
/**
`Ember.Select` is meant to be bound to collections with a changing nature,
but with big collections, it comes with a big performance penalty. In order
to address this issue, we've created a "static" one - meaning that won't
change as the associated collection changes. This make... | JavaScript | 0.000001 | @@ -1399,32 +1399,58 @@
ver(function()%7B%0A
+ if(!this.$()) return;%0A
var value =
|
1633d80edd8101f8fdcce5fea0bdb789054983b4 | Add promptChoice with Facebook Button Template (4) | app/server.js | app/server.js | 'use strict'
// Load env for local development
if (['staging', 'production'].indexOf(process.env.NODE_ENV) === -1) {
require('dotenv').config({path: `${process.cwd()}/.env`})
}
const bodyParser = require('body-parser')
const express = require('express')
const config = require('./config')
const msn = require('./mess... | JavaScript | 0 | @@ -2288,16 +2288,56 @@
sage))%0A%0A
+ let promptChoiceButtonsData = null%0A%0A
if (
|
62559cc08eee14b1f92be273a00c6c418de99022 | add angular and fileupload dependencies to production config | config/env/production.js | config/env/production.js | 'use strict';
module.exports = {
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/keyz-beat',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
],
js: [
'public/lib/angular/angulars... | JavaScript | 0 | @@ -308,19 +308,166 @@
ular
-/angularsss
+-file-upload/dist/angular-file-upload-html5-shim.min.js',%09%09%09%0A%09%09%09%09'public/lib/angular/angular.js',%0A%09%09%09%09'public/lib/angular-file-upload/dist/angular-file-upload
.min
|
46ef98116b75ba5bed90888853df5f3e6e4fe716 | fix separator | index.js | index.js | var stream = require('stream')
var util = require('util')
var gen = require('generate-object-property')
var quote = new Buffer('"')[0]
var comma = new Buffer(',')[0]
var lf = new Buffer('\n')[0]
var cr = new Buffer('\r')[0]
var Parser = function(opts) {
if (!opts) opts = {}
if (Array.isArray(opts)) opts = {header... | JavaScript | 0.000003 | @@ -378,26 +378,26 @@
%0A%0A this.sep
-er
+at
ator = opts.
@@ -395,26 +395,26 @@
r = opts.sep
-er
+at
ator ? new B
@@ -423,26 +423,26 @@
fer(opts.sep
-er
+at
ator)%5B0%5D : c
@@ -1808,18 +1808,18 @@
this.sep
-er
+at
ator%0A v
|
3d7f6a60c05fe8d4dd14525c1966332a1959f9a6 | update prepopulate module with new count policy | lib/db/populate.db.js | lib/db/populate.db.js | /**
* @fileOverview The tokens model.
*/
var Promise = require('bluebird');
var terminus = require('terminus');
var logger = require('../main/logger.main');
var Db = require('./db-main');
var period = require('../models/period-bucket.model');
var Populate = module.exports = Db.extend(function() {
this.set = Prom... | JavaScript | 0 | @@ -32,16 +32,19 @@
model.%0A
+ *%0A
*/%0Avar
@@ -242,16 +242,67 @@
model');
+%0Avar UsageModel = require('../models/usage.model');
%0A%0Avar Po
@@ -1958,16 +1958,18 @@
is clear
+ed
all log
@@ -2147,16 +2147,25 @@
period',
+ 'count',
functio
@@ -2447,16 +2447,40 @@
res%5B2%5D;
+%0A var count = res%5B3... |
93990d53fab4576d4c5440b38c1068374ad7b531 | Store CalendarDay as a postgres date | packages/fields/types/CalendarDay/Implementation.js | packages/fields/types/CalendarDay/Implementation.js | const parse = require('date-fns/parse');
const format = require('date-fns/format');
const { Implementation } = require('../../Implementation');
const { MongooseFieldAdapter } = require('@voussoir/adapter-mongoose');
const { KnexFieldAdapter } = require('@voussoir/adapter-knex');
class CalendarDay extends Implementatio... | JavaScript | 0.000014 | @@ -2008,22 +2008,222 @@
ble.
-text(this.path
+date(this.path);%0A %7D%0A%0A setupHooks(%7B addPostReadHook %7D) %7B%0A addPostReadHook(item =%3E %7B%0A if (item%5Bthis.path%5D) %7B%0A item%5Bthis.path%5D = format(item%5Bthis.path%5D, 'YYYY-MM-DD');%0A %7D%0A return item;%0A %7D
);%0A
|
d57ecc75d29e3193daf63bd1af5ecd9c08c37544 | Remove legacy code and update log for deis app build | lib/deis-api/index.js | lib/deis-api/index.js | var config = require('lib/config');
var log = require('lib/debug')('manager:deis-api');
var DeisAPI = require('deis-api');
var Batch = require('mjlescano-batch');
var env = require('./env');
// var build = require('./build');
var deisConfig = config('deis');
var deis = new DeisAPI({
controller: deisConfig.controller... | JavaScript | 0 | @@ -3207,364 +3207,8 @@
) %7B%0A
- // build(%7B%0A // app: deployment.name,%0A // controller: deisConfig.controller,%0A // image: deisConfig.image%0A // %7D, function(err)%7B%0A // if (err) %7B%0A // log('Error building %5C'%25s%5C' app: %25s', deployment.name, err);%0A // return done(err);%0A ... |
b4df34b7576c5801d4f0b42c6da76ca8c5a4a063 | change link in footer | troposphere/static/js/components/Footer.react.js | troposphere/static/js/components/Footer.react.js | import React from 'react';
import Backbone from 'backbone';
import modals from 'modals';
import actions from 'actions';
import context from 'context';
export default React.createClass({
displayName: "Footer",
propTypes: {
profile: React.PropTypes.instanceOf(Backbone.Model)
},
onFeedback: funct... | JavaScript | 0 | @@ -931,39 +931,27 @@
ef=%22
-http://user.iplantcollaborative
+www.jetstream-cloud
.org
|
f986310761e4b215b8547aec224b84424d6bf072 | refactor signature of internal compose function | lib/dispatch/index.js | lib/dispatch/index.js | import { create as createMethod,
find as findMethod } from '../common/methods'
import { OK, Created, Empty } from '../common/success'
import { BadRequestError, NotFoundError, MethodError,
nativeErrors } from '../common/errors'
export { default as create } from './create'
export { default as delete } from './delete... | JavaScript | 0.000001 | @@ -2698,25 +2698,16 @@
compose(
-context,
...flows
@@ -2715,16 +2715,25 @@
method%5D)
+(context)
%0A%7D%0A%0A%0A/*!
@@ -2844,35 +2844,8 @@
%0A *%0A
- * @param %7B*%7D initialValue%0A
* @
@@ -2878,39 +2878,40 @@
ons%0A * @return %7B
-Promise
+Function
%7D%0A */%0Afunction c
@@ -2922,22 +2922,8 @@
se (
-initi... |
2704f76a3304c56544634215746a063b2966c94e | change number of columns | js/boo/main.js | js/boo/main.js | var Letter = function() {
this.htmlEl = $('<div/>');
};
Letter.prototype.setValue = function(val) {
if (this.value) { return; }
var sets = Constants.sets;
var index = getRandomInt(0, sets[val]["values"].length - 1);
val = sets[val]["values"][index];
this.htmlEl.text(val);
};
Letter.prototype.hardcode = funct... | JavaScript | 0.000017 | @@ -2196,34 +2196,34 @@
(var i = 0; i %3C
-48
+60
; i++) %7B%0A%09%09lett
@@ -2721,18 +2721,18 @@
0; i %3C
-48
+60
; i++)
@@ -3110,17 +3110,18 @@
ength -
-8
+10
) %7B%0A%09%09%09%09
@@ -3158,17 +3158,18 @@
Index +
-8
+10
- (curr
@@ -3183,17 +3183,18 @@
Index %25
-8
+10
);%0A%09%09%09%7D%0A
|
e40e1b8be3e04583d5bd654da82553e26c162211 | add content-type & content-encoding | index.js | index.js | var AWS = require('aws-sdk');
var request = require('request');
const stream = require('stream');
function uploadToS3(s3, params, cb) {
var pass = new stream.PassThrough();
s3.upload(Object.assign({}, params, { Body: pass }))
.send(function(err, data) {
if (err) {
cb(err, data);
}
if... | JavaScript | 0.000002 | @@ -804,24 +804,291 @@
e == 200) %7B%0A
+ if (resp.headers%5B'content-type'%5D) %7B%0A params.ContentType = resp.headers%5B'content-type'%5D;%0A %7D%0A if (resp.headers%5B'content-encoding'%5D) %7B%0A params.ContentEncoding = resp.headers%5B'content-encoding'%5D;%0A ... |
fb562d16d149de18446911d8a9417c278c584370 | fix webpack config | packages/redux-devtools-inspector/webpack.config.js | packages/redux-devtools-inspector/webpack.config.js | var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var CleanWebpackPlugin = require('clean-webpack-plugin');
var ExportFilesWebpackPlugin = require('export-files-webpack-plugin');
var pkg = require('./package.json');
var isProduction = process.env.NOD... | JavaScript | 0.000002 | @@ -1560,12 +1560,10 @@
?
-null
+%7B%7D
%0A
|
298b40e87875caf6a9122e30df367828223e76f6 | Set classes on ef-list based on context | addon/components/ef-nav.js | addon/components/ef-nav.js | import Ember from 'ember';
const {
Component
} = Ember;
/**
* @module
* @augments ember/Component
*/
export default Component.extend({
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
... | JavaScript | 0.000001 | @@ -723,16 +723,223 @@
Events%0A%0A
+ /**%0A * didInsertElement event hook%0A *%0A * Contextualize the list component%0A *%0A * @returns %7Bundefined%7D%0A */%0A didInsertElement() %7B%0A this._super(...arguments);%0A%0A this.setListContext();%0A %7D,%0A%0A
// ---
@@ -1005,24 +1005,24 @@
-----... |
165c6e10939ef6c9253c4b8cc5a9c6814d98287f | Update task controller to update its content after task edition | desktop/app/components/tasks/tasks_controller.js | desktop/app/components/tasks/tasks_controller.js | /*
eslint no-shadow: ["error", { "allow": ["$scope"] }]
*/
/*
eslint no-underscore-dangle: ["error", { "allow": ["_id",] }]
*/
angular.module('MainApp')
.controller('TaskControl', ($scope, $mdDialog, db) => {
$scope.current = undefined;
$scope.isShown = true;
$scope.do = false;
$scope.delete = false;... | JavaScript | 0 | @@ -1074,17 +1074,245 @@
-%7D);%0A %7D
+ db.find('open', (tasks) =%3E %7B%0A $scope.tasks = tasks;%0A %7D);%0A %7D);%0A %7D;%0A $scope.$on('Update tasks', () =%3E %7B%0A db.find('open', (tasks) =%3E %7B%0A $scope.tasks = tasks;%0A $scope.$apply();%0A %7D);%0A... |
b5b0e1c5329ff84273ef7d1b6fe39b96c86f4f74 | Fix Boneheaded Mistake | addon/lib/browser-store.js | addon/lib/browser-store.js | export default {
tokenStoreName: 'token',
sessionName: 'es_session',
setAPIToken(token) {
Cookies.set(this.tokenStoreName, token, { path: '/' });
},
getAPIToken() {
return Cookies.get(this.tokenStoreName);
},
removeAPIToken() {
Cookies.remove(this.tokenStoreName);
},
removeSessionToke... | JavaScript | 0.000001 | @@ -54,16 +54,17 @@
nName: '
+_
es_sessi
|
3f058984bde39a5013c2b98e44fed9e9e2c42146 | Change the way to find the controller (inside the component) | packages/storefront/addon/components/yebo-search.js | packages/storefront/addon/components/yebo-search.js | // Dependencies
import Ember from 'ember';
import layout from '../templates/components/yebo-search';
/**
The search form
@class YeboDetails
@namespace Component
@extends Ember.Component
*/
export default Ember.Component.extend({
layout: layout,
// The text that is going to be searched
searchText: '',
... | JavaScript | 0 | @@ -681,27 +681,12 @@
-// @todo Check if _
+let
cont
@@ -696,82 +696,64 @@
ler
-is the correct to use in this case%0A let controller = this._controller
+= this.get('container').lookup('controller:application')
;%0A%0A
|
8d328db656f485e902c6764a088f7d6b6f66cd01 | Fix pathParameters check | functions/entity-post.js | functions/entity-post.js | 'use strict'
const _ = require('lodash')
const _h = require('./_helpers')
const aws = require('aws-sdk')
const { ObjectId } = require('mongodb')
const allowedTypes = [
'_viewer',
'_expander',
'_editor',
'_owner',
'_public',
'_parent'
]
const rightTypes = [
'_viewer',
'_expander',
'_editor',
'_owne... | JavaScript | 0 | @@ -805,16 +805,40 @@
et eId =
+ event.pathParameters &&
event.p
|
50ee9c9badcfd8dd8a836a6ea530cc9cf41476b5 | Include non-enumerable properties. Fixes gaearon/react-hot-loader#60 | packages/react-proxy/modules/makeAssimilatePrototype.js | packages/react-proxy/modules/makeAssimilatePrototype.js | 'use strict';
/**
* Returns a function that establishes the first prototype passed to it
* as the "source of truth" and patches its methods on subsequent invocations,
* also patching current and previous prototypes to forward calls to it.
*/
module.exports = function makeAssimilatePrototype() {
var storedPrototy... | JavaScript | 0.000001 | @@ -1107,92 +1107,76 @@
-for (var key in freshPrototype) %7B%0A if (freshPrototype.hasOwnProperty
+Object.getOwnPropertyNames(freshPrototype).forEach(function
(key)
-)
%7B%0A
-
@@ -1225,25 +1225,19 @@
y%5D;%0A
- %7D%0A %7D
+%7D);
%0A %7D%0A%0A
@@ -1392,39 +1392,73 @@
-for (var ... |
bc8edb29dfce07d0555d5c54adaa166c90c33b37 | Update carousel.js | js/carousel.js | js/carousel.js | $(document).ready(function(){
$('.responsive-3').slick({
arrows: false,
dots: true,
infinite: true,
speed: 300,
slidesToShow: 3,
slidesToScroll: 1,
touchThreshold: 20,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
infinite: true... | JavaScript | 0.000001 | @@ -935,33 +935,33 @@
slidesToShow:
-3
+4
,%0A slides
|
d7d73875ca3f3299c928471781fac751d2e8b981 | fix eslint error | src/admin/service/upload/tencent.js | src/admin/service/upload/tencent.js | const fs = require('fs');
const path = require('path');
const COS = require('cos-nodejs-sdk-v5');
const Base = require('./base');
const readFileAsync = think.promisify(fs.readFile);
const statAsync = think.promisify(fs.stat);
module.exports = class extends Base {
// 导入方法
async uploadMethod(filename, config) {
... | JavaScript | 0.000005 | @@ -775,23 +775,8 @@
%0A
- const result =
awa
|
7819c82da3cb12af368f952d2185710c90adfaef | Allow print dialogs in IFrames | src/sap.ui.fl/src/sap/ui/fl/util/IFrameRenderer.js | src/sap.ui.fl/src/sap/ui/fl/util/IFrameRenderer.js | /*!
* ${copyright}
*/
sap.ui.define([
], function(
) {
"use strict";
function _setDimensionAsStyle (oRm, sDimension, sValue) {
if (sValue !== "" || sValue.toLowerCase() === "auto") {
oRm.style(sDimension, sValue);
}
}
/**
* IFrame renderer.
* @namespace
*/
var IFrameRenderer = {apiVersion: 2};
... | JavaScript | 0.000001 | @@ -1007,16 +1007,29 @@
e-origin
+ allow-modals
%22);%0A%09%09oR
|
2edffc58dc2454be62081c5cb0e20b1b2fccd1a2 | test commit please ignore | dcommands/update.js | dcommands/update.js | var e = module.exports = {};
var bu;
var exec = require('child_process').exec;
var bot;
e.init = (Tbot, blargutil) => {
bot = Tbot;
bu = blargutil;
e.category = bu.CommandType.CAT;
};
e.requireCtx = require;
e.isCommand = true;
e.hidden = false;
e.usage = 'Yo shit waddup we\'re updating';
e.info = 'Does ... | JavaScript | 0 | @@ -150,16 +150,21 @@
rgutil;%0A
+ %0A
e.ca
|
9ec850aa06f4a3e5072fb298542099ea992666c2 | Add copy data for post, file | lib/extend/context.js | lib/extend/context.js | const helper = require('think-helper');
const assert = require('assert');
const cookies = require('cookies');
const url = require('url');
const PARAM = Symbol('context-param');
const POST = Symbol('context-post');
const FILE = Symbol('context-file');
/**
* extend context
*/
module.exports = {
/**
* get userAge... | JavaScript | 0 | @@ -4355,16 +4355,34 @@
%5BPOST%5D =
+ Object.assign(%7B%7D,
this.re
@@ -4417,22 +4417,17 @@
ody.post
- %7C%7C %7B%7D
+)
;%0A %7D%0A
@@ -5046,16 +5046,34 @@
%5BFILE%5D =
+ Object.assign(%7B%7D,
this.re
@@ -5112,14 +5112,9 @@
file
- %7C%7C %7B%7D
+)
;%0A
|
f9a22e60a3b3ad62c3e429f53b7d03efe141e50a | Remove file extension (dynamically) from indexed list of files and their contents | face-read.js | face-read.js | 'use strict';
var fs = require('fs');
/*
* read *.txt files at given `path',
* return array of files and their
* textual content
*/
exports.read = function (path, type, callback) {
var textFiles = {};
var regex = new RegExp("\\." + type);
fs.readdir(path, function (error, files) {
if (error)... | JavaScript | 0 | @@ -507,16 +507,69 @@
es%5Bfile%5D
+%0A .slice(0, (type.length * -1) - 1 )
%5D = fs.r
@@ -603,16 +603,18 @@
+
+ '/'%0A
@@ -629,16 +629,18 @@
+
+
+ files%5B
@@ -637,32 +637,34 @@
+ files%5Bfile%5D%0A
+
|
048b7cdfecfada285bf552f676037a702dd65508 | Move 'on' to a separate function | index.js | index.js | var optionalParam = /\((.*?)\)/g;
var namedParam = /(\(\?)?:\w+/g;
var splatParam = /\*\w+/g;
var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
module.exports = function(history) {
var handlers = [];
history && start();
return {
on: function(route, cb) {
if (!isRegExp(route)) {
... | JavaScript | 0.000145 | @@ -252,16 +252,93 @@
on:
+ on,%0A goTo: goTo,%0A start: start,%0A stop: stop%0A %7D;%0A%0A
functio
@@ -338,16 +338,19 @@
function
+ on
(route,
@@ -359,28 +359,24 @@
) %7B%0A
-
if (!isRegEx
@@ -383,28 +383,24 @@
p(route)) %7B%0A
-
@@ -433,34 +433,26... |
f3a352d145c15a8aef72de6f2889303ce983cb2a | Fix for Firefox bug NS_ERROR_NOT_AVAILABLE | game/src/WebcamPlugin.js | game/src/WebcamPlugin.js | // More Phaser plugins here: https://github.com/photonstorm/phaser-plugins
/**
* Provides access to the Webcam (if available)
*/
Phaser.Plugin.Webcam = function (game, parent) {
Phaser.Plugin.call(this, game, parent);
if (!game.device.getUserMedia)
{
return false;
}
navigator.getUserMed... | JavaScript | 0.000016 | @@ -1834,32 +1834,50 @@
s.stream)%0A %7B%0A
+ try %7B%0A
this.con
@@ -1910,26 +1910,297 @@
0, 0);%0A
+ %7D catch (e) %7B%0A if (e.name == %22NS_ERROR_NOT_AVAILABLE%22) %7B%0A // Just try again. This is a bug in Firefox.%0A // https://bugzilla.mozilla... |
273070054fd4df692b6a1a925569334c2519c7cb | Fix dbg-sourcemaps-bogus intermittent (#6728) | src/test/mochitest/browser_dbg-sourcemaps-bogus.js | src/test/mochitest/browser_dbg-sourcemaps-bogus.js | /* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Test that an error while loading a sourcemap does not break
// debugging.
requestLongerTimeout(2);
add_task(async function() {
// NOTE: the CORS call makes the test run times inconsistent
const dbg = awa... | JavaScript | 0 | @@ -359,78 +359,25 @@
tml%22
-);%0A const %7B%0A selectors: %7B getSourceCount %7D,%0A getState%0A %7D = dbg
+, %22bogus-map.js%22)
;%0A%0A
@@ -743,16 +743,30 @@
d.%0A is(
+dbg.selectors.
getSourc
@@ -772,16 +772,20 @@
ceCount(
+dbg.
getState
|
0d4fef12ebfdcb603bb165fe170de2624dbaf81d | fix JSON.stringify argument, add whitespace | lib/git-json-merge.js | lib/git-json-merge.js | var fs = require('fs');
var xdiff = require('xdiff');
var oursFileName = process.argv[2];
var baseFileName = process.argv[3];
var theirsFileName =process.argv[4];
var ours = JSON.parse(fs.readFileSync(oursFileName, 'utf-8'));
var base = JSON.parse(fs.readFileSync(baseFileName, 'utf-8'));
var theirs = JSON.parse(fs.rea... | JavaScript | 0.000443 | @@ -140,16 +140,17 @@
leName =
+
process.
@@ -480,12 +480,12 @@
se,
-true
+null
, 4)
|
871065f1f67266de5e775e97237dbd5b56cf5920 | extend theme | packages/tocco-theme/src/ToccoTheme/defaultTheme.js | packages/tocco-theme/src/ToccoTheme/defaultTheme.js | export default {
colors: {
paper: '#fff',
secondary: '#11587f',
secondaryLight: '#9BC0D5',
text: '#4f5e60',
backgroundBody: '#EDF1F5',
backgroundBreadcrumbs: '#DEE6ED',
signal: {
danger: {
paper: '#EF9A9A', // Red 200
text: '#B71C1C' // Red 900
},
info: {
... | JavaScript | 0 | @@ -37,24 +37,48 @@
er: '#fff',%0A
+ primary: '#B22A31',%0A
secondar
|
41e4cf225d52bef0548cf4c30e296e27f6549a11 | Fix .idle() | index.js | index.js | var EventEmitter = require('events').EventEmitter;
module.exports = function watch(func) {
var events = new EventEmitter;
var wrapper = function () {
var args = [].slice.call(arguments);
var callback = args.pop();
if (wrapper.running === 0) events.emit('start');
wrapper.runnin... | JavaScript | 0.000003 | @@ -797,16 +797,24 @@
return
+wrapper.
running
|
be22b0d905a65cc4f4fbab6b3319f34cd462a1ed | Remove prefix, automagically handled by favicon plugin | gatsby-node.js | gatsby-node.js | const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
module.exports.onCreateWebpackConfig = ({ actions, stage, getConfig }, { logo, icons = {}, title, background }) => {
if (stage === 'develop-html' || stage === 'build-html') {
actions.setWebpackConfig({
plugins: [
new FaviconsWebpackP... | JavaScript | 0 | @@ -527,75 +527,8 @@
n',%0A
- prefix: getConfig().output.publicPath + 'icons-%5Bhash%5D/',%0A
|
be6a560478f4e97435dc1a00f99bd2b57afa06ae | Fix some issues | agendor-api-integration.js | agendor-api-integration.js | "use strict"
var userToken = process.env.AGENDOR_TOKEN;
var agendorUrl = "https://api.agendor.com.br/v1/";
var request = require('request');
module.exports.nextTask = function nextTask(sendTextMessage, sender, res) {
request({
url: agendorUrl + "tasks",
headers: {"Authorization": "Token " + userToken},
q... | JavaScript | 0.013428 | @@ -739,20 +739,35 @@
matTask(
-body
+JSON.parse(body)%5B0%5D
);%0A
|
096c0abc7ba0a8879fdfc49b8d8242e8ccdfca1c | remove unnecessary ternary | index.js | index.js | var gutil = require('gulp-util');
var through = require('through2');
module.exports = function(opts){
'use strict';
var rootRegEx;
if (!opts) {
throw new gutil.PluginError("gulp-assetpaths", "No parameters supplied");
}
if (!opts.filetypes || (!opts.filetypes instanceof Array)){
throw n... | JavaScript | 0.999036 | @@ -2142,31 +2142,16 @@
rtIndex)
- ? true : false
;%0A %7D%0A fu
|
bfbf6ea2c0432f57f00303a0cb89e4392a790b98 | add problems count to 'Problems' pane | pkg/ui/src/components/dashboard/ResourceProblems.js | pkg/ui/src/components/dashboard/ResourceProblems.js | import React from 'react'
import PropTypes from 'prop-types'
import { List, ListItem } from 'material-ui/List'
import Subheader from 'material-ui/Subheader'
import Divider from 'material-ui/Divider'
import Paper from 'material-ui/Paper'
import { grey500, white, red900 } from 'material-ui/styles/colors'
import { Link } ... | JavaScript | 0.000002 | @@ -1703,16 +1703,37 @@
Problems
+ (%7Bresources.length%7D)
%3C/Subhea
|
825c416f8ad4a8b8614ce184635f9d95a2526906 | bump router on plunker closes #1927 | public/docs/_examples/systemjs.config.plunker.js | public/docs/_examples/systemjs.config.plunker.js | /**
* PLUNKER VERSION (based on systemjs.config.js in angular.io)
* System configuration for Angular 2 samples
* Adjust as necessary for your application needs.
*/
(function(global) {
var ngVer = '@2.0.0-rc.4'; // lock in the angular package version; do not let it float to current!
var routerVer = '@3.0.0-beta... | JavaScript | 0 | @@ -314,17 +314,17 @@
.0-beta.
-1
+2
'; // lo
|
ceae454588f573c07f1cbcc9a6587d5d1f8a1cff | Make it so that you can reject certain matches from being downloaded. | get-similar.js | get-similar.js | var fs = require("fs");
var async = require("async");
var JSONStream = require("JSONStream");
var ArgumentParser = require("argparse").ArgumentParser;
var argparser = new ArgumentParser({
description: "Downloads image similarity data from MatchEngine. " +
"Outputs JSON results to the specified file."
});
... | JavaScript | 0 | @@ -882,24 +882,125 @@
s of.%22%0A%7D);%0A%0A
+argparser.addArgument(%5B%22--reject%22%5D, %7B%0A help: %22Reject certain matches from being downloaded.%22%0A%7D);%0A%0A
var args = a
@@ -1504,24 +1504,218 @@
%7D);%0A %7D%0A%0A
+ if (args.reject) %7B%0A var reject = new RegExp(%22%5E(?:%22 + args.rej... |
955f92cca4456f271a5f955949184d7309d4f51d | Disable ember-cli-qunit's lintTree hook. | index.js | index.js | 'use strict';
var eslint = require('broccoli-lint-eslint');
module.exports = {
name: 'ember-cli-eslint',
included: function (app) {
this._super.included(app);
this.jshintrc = app.options.jshintrc;
this.options = app.options.eslint || {};
},
lintTree: function(type, tree) {
return eslint(tree, {... | JavaScript | 0 | @@ -101,16 +101,162 @@
slint',%0A
+%0A // instructs ember-cli-qunit and ember-cli-mocha to%0A // disable their lintTree implementations (which use JSHint)%0A isDefaultJSLinter: true,%0A%0A
includ
@@ -300,20 +300,38 @@
included
-(
+.
app
+ly(this, arguments
);%0A t
@@ -417,16 +417,17 @@
%7D;%0A %7D,%0A
+%... |
264d5b46d84077de49b5932aaec205f614f16aac | fix version detection for Ember beta and alpha (canary) | index.js | index.js | /* eslint-env node */
'use strict';
const Funnel = require('broccoli-funnel');
const StripClassCallCheck = require('babel6-plugin-strip-class-callcheck');
const fastbootTransform = require('fastboot-transform');
const VersionChecker = require('ember-cli-version-checker');
module.exports = {
name: 'ember-popper',
... | JavaScript | 0 | @@ -1613,38 +1613,29 @@
mberChecker.
-satisfies('%3E=
+gte('
2.10.0')) %7B%0A
@@ -1836,30 +1836,21 @@
Checker.
-satisfies('%3E=
+gte('
1.13.0')
@@ -2447,22 +2447,13 @@
ker.
-satisfies('%3E=
+gte('
2.10
|
2e068471e4c91b135703e6ecd9df84f1dc2f1bb3 | Fix typo in event name | jakecache.js | jakecache.js | const _eventHandlers = Symbol('eventHandlers')
let CustomEvent = window.CustomEvent
let DOMException = window.DOMException
let ErrorEvent = window.ErrorEvent
let ProgressEvent = window.ProgressEvent
class PolyfilledEventTarget {
constructor (names) {
this[_eventHandlers] = {}
names.map(name => {
this... | JavaScript | 0.99958 | @@ -1605,16 +1605,17 @@
super(%5B'
+a
bort', '
|
e5a9f16a790ceb907ebb311568cb713a76ca99ab | add comment to indicate type templates | index.js | index.js | function getName(value) {
if (value === undefined) return ''
if (value === null) return ''
// if (value.constructor.name !== undefined) return fn.name
// why not constructor.name: https://kangax.github.io/compat-table/es6/#function_name_property
var match = value.constructor.toString().match(/function (.*?)\(... | JavaScript | 0 | @@ -1021,32 +1021,63 @@
break%0A %7D%0A%0A
+ // evaluate type templates%0A
case 'object
|
6b63c2eda5be34fa157431d5e3bfae721f1bdb4d | Use shift instead of splice (when possible) in queue | lib/internal/queue.js | lib/internal/queue.js | import indexOf from 'lodash/_baseIndexOf';
import isArray from 'lodash/isArray';
import noop from 'lodash/noop';
import onlyOnce from './onlyOnce';
import setImmediate from './setImmediate';
import DLL from './DoublyLinkedList';
import wrapAsync from './wrapAsync';
export default function queue(worker, concurrency, p... | JavaScript | 0.000001 | @@ -1921,10 +1921,92 @@
dex
-%3E
=
+== 0) %7B%0A workersList.shift();%0A %7D else if (index %3E
0)
|
2f5f23b789754bd1837f731da833c209d002102f | Handle options not being passed. | index.js | index.js | /*!
* express-timeout-header
* Copyright (c) 2015, CableLabs, Inc.
* All rights reserved.
*
* Written by Brendan Long <b.long@cablelabs.com>
* License: BSD-2-Clause (http://opensource.org/licenses/BSD-2-Clause)
*/
"use strict";
var etag = require("etag");
var fs = require("fs");
var path = require("path");
var... | JavaScript | 0.000001 | @@ -434,24 +434,54 @@
options) %7B%0A
+ options = options %7C%7C %7B%7D;%0A%0A
root = p
|
6d90ddbd3f33bf796bac522099d26335dda766f5 | Fix use of undeclared react-icons dependency in story (#2008) | packages/@sanity/components/src/tabs/stories/withIcons.js | packages/@sanity/components/src/tabs/stories/withIcons.js | import Tab from 'part:@sanity/components/tabs/tab'
import TabPanel from 'part:@sanity/components/tabs/tab-panel'
import TabList from 'part:@sanity/components/tabs/tab-list'
import {action} from 'part:@sanity/storybook/addons/actions'
import {select} from 'part:@sanity/storybook/addons/knobs'
import React from 'react'
... | JavaScript | 0 | @@ -436,18 +436,16 @@
%0Aimport
-Fa
Calendar
@@ -459,26 +459,25 @@
om '
-react-icons/lib/fa
+part:@sanity/base
/cal
@@ -481,16 +481,21 @@
calendar
+-icon
'%0A%0Aexpor
@@ -738,10 +738,8 @@
on:
-Fa
Cale
|
86c98c1f3c0e251e8b198269cc4d5d63d9d001c2 | update mainscene | src/scenes/mainscene.js | src/scenes/mainscene.js | /*
* mainscene.js
* 2015/12/22
* @auther minimo
* This Program is MIT license.
*/
phina.define('MainScene', {
superClass: 'phina.display.CanvasScene',
init: function() {
this.superInit();
this.player = Player()
.addChildTo(this)
.setPosition(SC_W*0.5, SC_H*0.7);
var group ... | JavaScript | 0 | @@ -199,24 +199,45 @@
perInit();%0A%0A
+ var that = this;%0A
this.pla
@@ -257,18 +257,16 @@
)%0A
-
-
.addChil
@@ -275,18 +275,16 @@
o(this)%0A
-
.s
@@ -312,24 +312,229 @@
SC_H*0.7);%0A%0A
+/*%0A var label = phina.display.Label('count')%0A .addChildTo(this)%0A .setPosition(SC_W... |
caaeb366b3f512a0cdb2529c0698004ad4014ac6 | Fix empty props | src/behaviours/translation/index.js | src/behaviours/translation/index.js | import {t} from 'i18next';
const Translation = Component => class TranslatedComponent extends Component {
constructor() {
super();
this.i18n = t;
}
};
export default Translation;
| JavaScript | 0.000009 | @@ -116,16 +116,21 @@
tructor(
+props
) %7B%0A
@@ -139,16 +139,21 @@
super(
+props
);%0A
@@ -180,16 +180,17 @@
%7D%0A%7D;%0A%0A
+%0A
export d
|
23acaa1e2d30af78da5063e90d427e0eff693e9f | Add ReceiptHandle to message type | src/schema/sqs/index.js | src/schema/sqs/index.js | import AWS from 'aws-sdk';
import Promise from 'bluebird';
import merge from 'merge';
import helpers from '../../utils/helpers';
import {
GraphQLObjectType,
GraphQLNonNull,
GraphQLList,
GraphQLString,
GraphQLInputObjectType
} from 'graphql/lib/type';
const sqs = new Promise.promisifyAll(new AWS.SQS());
cons... | JavaScript | 0 | @@ -3950,16 +3950,396 @@
oded).%60%0A
+ %7D,%0A ReceiptHandle: %7B%0A type: GraphQLString,%0A description: %60An identifier associated with the act of%0A receiving the message. A new receipt handle%0A is returned every time you receive a message.%0A ... |
1d2b773eeed4a4f554edc70c24056df77135d9f5 | Fix tokens | lib/js-yaml/tokens.js | lib/js-yaml/tokens.js | 'use strict';
var $$ = require('./core');
function Token(startMark, endMark) {
this.startMark = startMark || null;
this.endMark = endMark || null;
}
Token.prototype.hash
Token.prototype.toString = function toString() {
var values = [], self = this;
Object.getOwnPropertyNames(this).forEach(function (ke... | JavaScript | 0.000017 | @@ -171,16 +171,18 @@
ype.hash
+ =
%0AToken.p
|
61e83a88264ff368848129d85293c54607046d86 | Fix #132 | static/js/clientHooks.js | static/js/clientHooks.js | /**
* # Client Hooks Module
*
* ## License
*
* 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 L... | JavaScript | 0.000001 | @@ -1332,16 +1332,44 @@
%7D%0A %7D%0A%0A
+ setTimeout(function() %7B%0A
if (ty
@@ -1402,32 +1402,34 @@
'undefined') %7B%0A
+
updateLinks(
@@ -1462,16 +1462,18 @@
token);%0A
+
%7D else
@@ -1525,24 +1525,26 @@
ned') %7B%0A
+
updateLinks(
@@ -1587,17 +1587,30 @@
ord);%0A
-%7D
+ %7D%0A ... |
a953435789a1680f007c7c44cf1fad0de921189f | Revert back to original function | index.js | index.js | 'use strict';
/**
* Adds commas to a number
* @param {number} number
* @return {string}
*/
module.exports = function(number) {
return number.toLocaleString('en-US');
}; | JavaScript | 0.000019 | @@ -149,27 +149,56 @@
r.to
-Locale
String(
-'en-US
+).replace(/(%5Cd)(?=(%5Cd%7B3%7D)+(?!%5Cd))/g, '$1,
');%0A
|
2fe8be96b1c1af5bdeb68db97f52bc9b94f23ac8 | Drop support for IE8 (for now) | js/Events.js | js/Events.js | var Events = (function() {
"use strict";
var isOldIE = !('addEventListener' in document);
function listenTo(eventName, handler, useCapture) {
if (isOldIE) {
document.attachEvent('on' + eventName, handler);
} else {
document.addEventListener(eventName, handler, useCa... | JavaScript | 0 | @@ -43,307 +43,8 @@
%22;%0A%0A
- var isOldIE = !('addEventListener' in document);%0A%0A function listenTo(eventName, handler, useCapture) %7B%0A if (isOldIE) %7B%0A document.attachEvent('on' + eventName, handler);%0A %7D else %7B%0A document.addEventListener(eventName, handler... |
4fcc489ad3c8e6c61778d7be6949d7bbef4c8ad5 | Update the path to Amanda in the ‘amanda.js’ file | tests/validators/format/alpha.js | tests/validators/format/alpha.js | // Load dependencies
var amanda = require('../../../src/amanda.js');
/**
* Test #1
*/
exports['Test #1'] = function(test) {
var count = 0;
var schema = {
required: true,
format: 'alpha'
};
[
'abc',
'ABC',
'Abc',
'aBc'
].forEach(function(data) {
amanda.validate(data, schema, f... | JavaScript | 0.000001 | @@ -49,18 +49,19 @@
/../
-src/amanda
+dist/latest
.js'
|
6432001d590dcd623f6c0fcd0d675782e4b3bc71 | Improve code: remove unneed object quotes | index.js | index.js | const discord = require('discord.js');
const client = new discord.Client();
const rpn = require('request-promise-native');
const crypto = require('crypto');
const Gamedig = require('gamedig');
let config = require("./config.json");
let commands = {
"state": {
"func": (msg) => query(msg, () => msg.... | JavaScript | 0.000027 | @@ -265,17 +265,14 @@
%7B%0A%09
-%22
state
-%22:
+:
%7B%0A%09
@@ -381,16 +381,13 @@
%7D,%0A%09
-%22
list
-%22:
+:
%7B%0A%09
@@ -668,23 +668,21 @@
%09%7D%0A%09%7D,%0A%09
-%22
start
-%22
: powerC
@@ -695,22 +695,20 @@
art%22),%0A%09
-%22
stop
-%22
: powerC
@@ -720,25 +720,23 @@
top%22),%0A%09
-%22
rest... |
13aeff391d592b0ec5ec959a8d0803cfdc3ac79e | Add Styleguide.sortSections() to pre-sort sections instead of during every .section() query. | lib/kss_styleguide.js | lib/kss_styleguide.js | var KssStyleguide, sectionQueryMatch;
/**
* An instance of this class is returned on finishing `kss.traverse`.
* Exposes convenience methods for interpreting data.
*
* @param {Object} data The data object generated by traverse.
*/
module.exports = KssStyleguide = function (data) {
if (!(this instanceof KssStyleg... | JavaScript | 0 | @@ -487,18 +487,17 @@
%7B%0A%09%09// S
-or
+e
t all th
@@ -502,56 +502,28 @@
the
-sections.%0A%09%09this.data.sections = this.section();
+referenceURI values.
%0A%09%09l
@@ -683,37 +683,32 @@
ata.sections%5Bi%5D.
-data.
reference);%0A%09%09%7D%0A
@@ -700,23 +700,76 @@
eference
+()
);%0A%09%09%7D%0A
+%09%09// S... |
ffa8e12c12b23a3d86c2f5a55538175e160ce782 | Fix returns | index.js | index.js | const _ = require('lodash');
class Speechlet {
constructor(text) {
this._markup = [];
if (text) {
this._markup.push(text);
}
this._exposeSayAsConvenienceMethods();
}
_exposeSayAsConvenienceMethods() {
let interpretAs = ['characters', 'spell-out', 'cardinal', 'ordinal', 'digits',
... | JavaScript | 0.000001 | @@ -1349,16 +1349,33 @@
Tag%7D%60);%0A
+ return this;%0A
%7D%0A%0A /
@@ -3196,24 +3196,31 @@
text) %7B%0A
+return
this.amazonE
@@ -3255,33 +3255,16 @@
ed%22 %7D);%0A
- return this;%0A
%7D%0A%0A /
@@ -3955,24 +3955,31 @@
.8s%22) %7B%0A
+return
this.break(%7B
@@ -3994,33 +3994,16 @@
ime %7D... |
c8e07230385b55b3552569e3317f27c5a100a836 | Fix closing window on Windows | deploy/core/main.js | deploy/core/main.js | "use strict";
var app = require('app'), // Module to control application life.
BrowserWindow = require('browser-window'), // Module to create native browser window.
dialog = require("dialog"),
ipc = require("ipc"),
fs = require('fs'),
optimist = require('optimist');
// Keep a global reference of... | JavaScript | 0 | @@ -890,24 +890,63 @@
w.focus();%0A%0A
+ if (process.platform == 'win32') %7B%0A
window.on(
@@ -958,32 +958,66 @@
%22, function() %7B%0A
+ if (window.webContents)%0A
window.webCo
@@ -1040,30 +1040,136 @@
%22, %22blur%22);%0A
+
%7D);%0A
+ %7D else %7B%0A window.on(%22blur%22, function() %... |
34ed97f0d0b3ffd12d2c9a419d5a21bcf10cfdc2 | disable redux-logger in production | source/flux/index.js | source/flux/index.js | /**
* @flow
* Root reducer for state storage
*/
import {createStore, applyMiddleware} from 'redux'
import {createLogger} from 'redux-logger'
import reduxPromise from 'redux-promise'
import reduxThunk from 'redux-thunk'
import {init} from './init'
import {app} from './parts/app'
import {bus} from './parts/bus'
impo... | JavaScript | 0 | @@ -786,66 +786,143 @@
%0A%7D%0A%0A
-const logger = createLogger(%7Bcollapsed: () =%3E true%7D)%0Aconst
+let store%0Aif (process.env.NODE_ENV === 'production') %7B%0A store = createStore(aao, applyMiddleware(reduxPromise, reduxThunk))%0A%7D else %7B%0A
sto
@@ -943,15 +943,19 @@
re(%0A
+
aao,%0A
+
ap
@@ ... |
46a5c9c63e9a63672047eeb94de91853a36d6ac8 | Make logout clear user/team cache. | static/js/services/session.js | static/js/services/session.js | var sessionServiceModule = angular.module('sessionServiceModule', [
'ngResource',
'globalServices',
]);
sessionServiceModule.service('sessionService', [
'$resource', '$location', 'errorService',
function($resource, $location, errorService) {
this.sessionData = $resource('/api/session');
... | JavaScript | 0 | @@ -760,16 +760,37 @@
logout =
+ function() %7B%0A
this.se
@@ -805,16 +805,79 @@
a.remove
+();%0A this.user = null;%0A this.team = null;%0A %7D
;%0A%0A
|
49beff0a32cd589357a69359b184c3c431ef3d6e | change config location | index.js | index.js | #!/usr/bin/env node
var argv = require('minimist')(process.argv.slice(2)),
path = require('path'),
fs = require('fs'),
rl = require('readline-sync'),
child = require('child_process'),
cfgfile = argv.config || argv.c || path.join(__dirname, '_config.json'),
cfg = get_config(),
proj = argv._... | JavaScript | 0.000002 | @@ -234,35 +234,58 @@
v.c
-
%7C%7C
- path.join(__dirname, '_
+%0A path.join(process.env.HOME, '.uh.
conf
|
c97f5a666bfb6e4401ce506847e72f15bfc4b599 | Create login functionality in Ally framework | plugins/gui-core/gui-resources/scripts/js/views/auth.js | plugins/gui-core/gui-resources/scripts/js/views/auth.js | define
([
'jquery', 'jquery/superdesk', 'dust/core', 'utils/sha512', 'jquery/tmpl', 'jquery/rest', 'bootstrap',
'tmpl!auth',
],
function($, superdesk, dust, jsSHA)
{
<<<<<<< HEAD
var AuthLogin = function(username, password, logintoken){
=======
var AuthDetails = function(username){
var authDetails ... | JavaScript | 0 | @@ -1220,29 +1220,16 @@
ssion);%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A
%09%09%09local
@@ -1445,437 +1445,8 @@
');%0A
-=======%0A%09%09%09//localStorage.setItem('superdesk.login.id', user.Id);%0A%09%09%09localStorage.setItem('superdesk.login.name', user.UserName);%0A%09%09%09localStorage.setItem('superdesk.login.email', u... |
dfc26ee623578ac7a5fce63c8a8b81a26bb420f3 | Tweak JSDoc | toolkits/landcover/impl/bands.js | toolkits/landcover/impl/bands.js | /**
* @license
* Copyright 2019 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... | JavaScript | 0.000001 | @@ -2191,360 +2191,194 @@
pute
- spectral indices for the given image.%0A * Note: The image is expected to have the toolkit's %22common%22 band names.%0A *%0A * @param %7B!ee.Image%7D image The input image.%0A * @param %7B!Array%3Cstring%3E%7D i
+s and adds the specified set of spectral indices to an image. I
ndic
+i... |
23df0266ddce1079345ac9e1d540f613be7590ea | Update quickstart.js | packages/google-cloud-memcache/samples/test/quickstart.js | packages/google-cloud-memcache/samples/test/quickstart.js | // Copyright 2020 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | JavaScript | 0.000001 | @@ -630,19 +630,16 @@
path');%0A
-//
const %7Ba
@@ -754,47 +754,8 @@
');%0A
-const %7B assert %7D = require('console');%0A
cons
|
f62d1996f28cd9700a5720d8111a7f93b4f0eb4c | Handle event state for searchTerm. | js/Search.js | js/Search.js | import React from 'react'
import preload from '../public/data.json'
import ShowCard from './ShowCard'
const Search = React.createClass({
render () {
return (
<div className='search'>
{preload.shows.map((show) => {
return (
<ShowCard key={show.imdbID} {...show} />
)
... | JavaScript | 0.000001 | @@ -137,64 +137,444 @@
%7B%0A
-render () %7B%0A return (%0A %3Cdiv className='search'%3E%0A
+getInitialState () %7B%0A return %7B%0A searchTerm: ''%0A %7D%0A %7D,%0A handleSearchTermChange (event) %7B%0A this.setState(%7BsearchTerm: event.target.value%7D)%0A %7D,%0A render () %7B%0A retu... |
a3b20105bb92b34846b3560a8c2e97ea3a5bad97 | move to react 16 | src/server/ssr/index.js | src/server/ssr/index.js | /**
* @flow
* @desc
*/
import React from 'react'
import chalk from 'chalk'
// import _ from 'lodash'
import {renderToNodeStream, renderToStaticNodeStream} from 'react-dom/server'
import {ServerStyleSheet, StyleSheetManager} from 'styled-components'
import {configureRootComponent, configureApp} from 'common/app'
// i... | JavaScript | 0.000382 | @@ -75,76 +75,24 @@
lk'%0A
-// import _ from 'lodash'%0Aimport %7BrenderToNodeStream, renderToStatic
+import %7BrenderTo
Node
@@ -261,52 +261,8 @@
pp'%0A
-// import %7BaddLocaleData%7D from 'react-intl'%0A
impo
@@ -1597,16 +1597,45 @@
AppTag)%0A
+%09res.write(%60%3Cdiv id=%22app%22%3E%60)%0A
%09stream.
@@ -1685,1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.