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 |
|---|---|---|---|---|---|---|---|
2ee423ba5aae11798b50b0ab41b7616411cb4594 | Ajuste no Server | index.js | index.js | var express = require('express');
var app = express();
app.set('port', (process.env.PORT || 5000));
//For avoidong Heroku $PORT error
app.get('/', function(request, response) {
var result = 'Server rodando.'
response.send(result);
})
.get('/login', function(request, response){
var result = 'Login'
... | JavaScript | 0.000001 | @@ -341,16 +341,114 @@
t);%09%0A%7D)%0A
+.get('/user', function(request, response)%7B%0A var result = 'User'%0A response.send(result);%09%0A%7D)%0A
.listen(
|
14d286438885a123d500963e657ae6b434dee878 | use this.state. Closes #26 | index.js | index.js |
/**
* Module dependencies.
*/
var debug = require('debug')('koa-views');
var resolve = require('path').resolve;
var dirname = require('path').dirname;
var assign = require('object-assign');
var fmt = require('util').format;
var join = require('path').join;
var cons = require('co-views');
var send = require('koa-sen... | JavaScript | 0.000004 | @@ -345,16 +345,17 @@
%60 method
+.
%0A *%0A * @
@@ -922,17 +922,16 @@
return;%0A
-%0A
var
@@ -961,169 +961,41 @@
s);%0A
-%0A
-/**%0A * App-specific %60locals%60, but honor upstream%0A * middlewares that may have already set this.locals.%0A */%0A%0A this.locals = this.locals
+this.state =... |
7349aab8202c224028362216b982b484e55a35fb | Remove `destructuring-assignment` rule | index.js | index.js | 'use strict';
module.exports = {
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
plugins: [
'react'
],
rules: {
'react/boolean-prop-naming': 'error',
'react/button-has-type': 'error',
'react/default-props-match-prop-types': 'error',
'react/destructuring-assignment': ['error', 'always'],
'react/f... | JavaScript | 0 | @@ -250,65 +250,8 @@
r',%0A
-%09%09'react/destructuring-assignment': %5B'error', 'always'%5D,%0A
%09%09'r
|
9bfedd65ef0731bb97e8e7e8f4aa1ac2d1649ed6 | Remove inline <script> tags before analysing the html structure; #6 | index.js | index.js | /**
* An unclosed html tag finder.
*
* @author Björn Hempel <bjoern.hempel@ressourcenmangel.de>
* @constructor
*/
exports.builder = function() { };
/* A list of self closing tags (do not add this tag to unclosed tags).
*
*/
exports.builder.prototype.selfClosingTags = [
'area',
'base',
'br',
'col... | JavaScript | 0.000004 | @@ -661,24 +661,151 @@
Tags = %5B%5D;%0A%0A
+ /* remove all inline script tags (%3Cscript%3E%3C/script%3E) */%0A html = html.replace(/%3Cscript%5B%5E%3E%5D*%3E(.%7C%5Cn)*?%3C%5C/script%3E/gi, '');%0A%0A
var line
|
9a82f0d9acdd754c79e67138fed06e583fa7df23 | Fix null values issue on process.env parse. | index.js | index.js | 'use strict';
var clone = require('clone');
var defaults = require('101/defaults');
var dotenv = require('dotenv');
var eson = require('eson');
var exists = require('101/exists');
var fs = require('fs');
var last = require('101/last');
var path = require('path');
var isEmpty = require('101/is-empty');
var isString = r... | JavaScript | 0 | @@ -2791,16 +2791,33 @@
if (
+isString(val) &&
val.matc
|
ce9295b90266a1ec4a4c53346cef48c30b7bbe3e | remove env | index.js | index.js | 'use strict';
/**
* Module dependencies.
*/
var debug = require('debug')('ware');
var Emitter = require('events').EventEmitter;
var compose = require('koa-compose');
var co = require('co');
/**
* slice() reference.
*/
var slice = Array.prototype.slice;
/**
* Ware prototype.
*/
var w = Ware.prototype;
/*... | JavaScript | 0.000765 | @@ -509,60 +509,8 @@
re;%0A
- this.env = process.env.NODE_ENV %7C%7C 'development';%0A
th
|
4ce99da8631d59622dbdc694cd566a98ab3e5977 | use path.parse() to get the root directory | index.js | index.js | 'use strict';
const pathLib = require('path');
const dirname = pathLib.dirname;
const join = pathLib.join;
const resolve = pathLib.resolve;
const npmCliPath = require('npm-cli-path');
const rootDir = resolve('/');
const getNpmCliDir = npmCliPath().then(result => {
result = dirname(result);
do {
try {
requir... | JavaScript | 0.000006 | @@ -108,22 +108,20 @@
;%0Aconst
-resolv
+pars
e = path
@@ -124,22 +124,20 @@
pathLib.
-resolv
+pars
e;%0A%0Acons
@@ -179,38 +179,8 @@
h');
-%0Aconst rootDir = resolve('/');
%0A%0Aco
@@ -233,32 +233,79 @@
%7B%0A%09
-result = dirname(result)
+const path = parse(result);%0A%09const root = path.root;%0A%09result =... |
e29a5bda24d22312609a0c8daa07b401349eee8d | put back js | index.js | index.js | smoothScroll.init(); | JavaScript | 0 | @@ -13,8 +13,622 @@
.init();
+%0A$( document ).ready(function() %7B%09%09%0A%09$.ajax(%7B%09%09%0A url: 'http://ttcat.net/udnrss/',%09%09%0A dataType: 'json',%09%09%0A jsonpCallback: 'MyJSONPCallback', // specify the callback name if you're hardcoding it%09%09%0A success: function(data)%7B%09%09%0A //... |
03834e08345921686f487375896207f565072ed9 | check typeof instead of ! for auto-collection | index.js | index.js | /**
* Module dependencies
*/
var each = require('each');
/**
* Expose the Request object
*/
module.exports = Request;
/**
* Create a hyper-path request
*
* @param {String} path
* @param {Client} client
*/
function Request(path, client) {
if (!(this instanceof Request)) return new Request(path, client);
... | JavaScript | 0 | @@ -3338,17 +3338,23 @@
data &&
-!
+typeof
body%5Bnex
@@ -3355,16 +3355,32 @@
dy%5Bnext%5D
+ === 'undefined'
&& !lin
|
a74f812ec0cbf04e3ac42dfa323f203e6561c316 | Comment on the difficulty of doing case insensitity correctly | index.js | index.js | var fs = require('fs')
var path = require('path')
var Writer = require('broccoli-writer')
var symlinkOrCopySync = require('symlink-or-copy').sync
var mapSeries = require('promise-map-series')
module.exports = TreeMerger
TreeMerger.prototype = Object.create(Writer.prototype)
TreeMerger.prototype.constructor = TreeMerge... | JavaScript | 0.000001 | @@ -1486,16 +1486,242 @@
rCase()%0A
+ // Note: We are using .toLowerCase to approximate the case%0A // insensitivity behavior of HFS+ and NTFS. While .toLowerCase is at%0A // least Unicode aware, there are probably better-suited functions.%0A
|
df0f56c9c92db94853f307b52a5baa5c5cab255e | Send 400 | index.js | index.js | var express = require('express')
var app = express()
var validUrl = require('valid-url')
var fs = require('fs');
var youtubedl = require('youtube-dl');
app.set('port', (process.env.PORT || 3000));
var log = function() {
var timestamp = new Date().toLocaleString();
var LOG_PREFIX = `[${timestamp}] -`;
//... | JavaScript | 0 | @@ -1884,32 +1884,21 @@
%7D
- else %7B%0A
+%0A
-
res.send
('He
@@ -1897,48 +1897,19 @@
send
-('Hello World!, ' + req.query.url)%0A %7D
+Status(400)
%0A%7D)%0A
|
182a3c2953903427b76e5d96db4bb96b15db483f | implement clear | index.js | index.js | module.exports = function (options) {
return {
available: function (callback) {
if (typeof navigator === 'undefined') return callback(false);
return callback(!!navigator.mimeTypes['application/x-shockwave-flash']);
},
config: function (opts, callback) {
if (opts.uploadUrl) options.upload... | JavaScript | 0.00004 | @@ -229,24 +229,103 @@
'%5D);%0A %7D,%0A
+ clear: function (callback) %7B%0A this.rec = %7B%7D;%0A callback();%0A %7D,%0A
config:
|
99429394747c7a9c8c94c762ddae72af2626e29e | make test pass | LangtonsAnt/langtonsant.js | LangtonsAnt/langtonsant.js | "use strict";
var assert = require('assert');
describe('infinite grid', function() {
describe('grid', function() {
it('exists', function() {
assert(new Plane());
});
});
});
| JavaScript | 0.000018 | @@ -40,16 +40,46 @@
ert');%0A%0A
+var Plane = function() %7B%0A%0A%7D;%0A%0A
describe
|
ff8dc6c77427ee86606cc040924f87940b05e1f5 | Add a regex | typeServices/image/png.js | typeServices/image/png.js | define(function() {
'use strict';
function split(entries) {
var rootSegment = this;
return rootSegment.getBytes(0, 8 + 8)
.then(function(rawHeader) {
if (String.fromCharCode.apply(null, rawHeader) !== '\x89PNG\r\n\x1A\n') {
return Promise.reject('PNG file signature not found');
}... | JavaScript | 0.999998 | @@ -1130,16 +1130,117 @@
split,%0A
+ regex: /%5E%5Cx89PNG%5Cr%5Cn%5Cx1A%5Cn%5Cx00%5Cx00%5Cx00%5Cx0DIHDR.%7B13%7D.*.%7B4%7DIDAT.*.%7B4%7D.*%5Cx00%5Cx00%5Cx00%5Cx00IEND....$/;%0A
%7D;%0A%0A%7D)
|
d76cc130052312768ae67e90ccbc911214c11e21 | Add PlayerDB.getKeyPattern. | src/data/player.data.js | src/data/player.data.js | 'use strict';
const _ = require('lodash');
const uuid = require('uuid');
const config = require('nconf');
const logger = require('src/util/logger.js')('player');
const Cache = require('src/util/cache.js');
const PlayerDB = {
prepareKey: (id) => {
return `player-${id}`;
},
prepareNewData: (data) => {
const n... | JavaScript | 0 | @@ -275,16 +275,66 @@
%60;%0A%09%7D,%0A%0A
+%09getKeyPattern: () =%3E %7B%0A%09%09return 'player-*';%0A%09%7D,%0A%0A
%09prepare
|
c8b8a8e875612ad41d60b4f9a528856e59ebfc78 | Add a `TODO`. | prolific.syslog/syslog.processor.js | prolific.syslog/syslog.processor.js | var tz = require('timezone')
var url = require('url')
var FACILITY = {
kern: 0,
user: 1,
mail: 2,
daemon: 3,
auth: 4,
syslog: 5,
lpr: 6,
news: 7,
uucp: 8,
clock: 9,
sec: 10,
ftp: 11,
ntp: 12,
audit: 13,
alert: 14,
local0: 16,
local1: 17,
local2: 1... | JavaScript | 0.000709 | @@ -1517,24 +1517,71 @@
) + '%3E1 ' +%0A
+// TODO NO! What? Where is the real timestamp?%0A
tz(t
|
2ffcbe8481b8a5f9ccf8ce44a87da2ddcaff558b | use josm preferences instead of create a new empty preference object | josm-scripts/2conflation.js | josm-scripts/2conflation.js | var out = java.lang.System.out;
// 1. We must ensure that we have our required layer "houses-simplifie" and OSM DATA
var housesLayer = null;
var osmLayer = null;
for (var i = 0; i < josm.layers.length; i++) {
var layer = josm.layers.get(i);
if (layer.name.endsWith("-houses-simplifie.osm")) {
housesLaye... | JavaScript | 0.000001 | @@ -3789,20 +3789,16 @@
prefs =
- new
org.ope
@@ -3829,16 +3829,21 @@
ferences
+.main
();%0A
|
5c1ab0b8a1aa93573f004fc6868c63816b74f34c | Use localized weekdays | src/DateTimePickerDays.js | src/DateTimePickerDays.js | import React, { Component, PropTypes } from "react";
import moment from "moment";
import classnames from "classnames";
export default class DateTimePickerDays extends Component {
static propTypes = {
subtractMonth: PropTypes.func.isRequired,
addMonth: PropTypes.func.isRequired,
viewDate: PropTypes.object... | JavaScript | 0.000033 | @@ -2656,24 +2656,334 @@
html;%0A %7D%0A%0A
+ renderWeekdays() %7B%0A let currentLocaleData = moment.localeData(this.props.viewDate.locale());%0A let weekdays = %5B0,1,2,3,4,5,6%5D.map(i =%3E%0A currentLocaleData.weekdaysMin(this.props.viewDate.weekday(i))%0A );%0A return weekdays.map(weekday =%3E ... |
c6a00b60810ee5811a6653858693584dac2bd3e9 | Refactor main plugin logic into $.listChanges, which returns the changes promise object, so that additional changes listeners can be added | jquery.couch.listchanges.js | jquery.couch.listchanges.js | /*
* jquery.couch.listchanges.js
* A helper for using the CouchDB changes feed to update HTML views rendered from list funs
*
* Plays well with mustache.couch.js for server-side list fun rendering:
* http://github.com/gbuesing/mustache.couch.js
*
* Copyright 2011, Geoff Buesing
* Licensed under the MIT license:... | JavaScript | 0 | @@ -1346,16 +1346,19 @@
n( $ )%7B%0A
+ %0A
$.fn.l
@@ -1383,24 +1383,125 @@
ion(opts) %7B%0A
+ $.listChanges(this, opts);%0A return this;%0A %7D%0A %0A $.listChanges = function(container, opts) %7B%0A
opts = o
@@ -1511,28 +1511,24 @@
%7C%7C %7B%7D;%0A
-var
container =
@@ -1527,20 +1527,25 @@... |
1611563673811b4e22a8a25b1baca2ac2d918893 | Fix UMD | src/fuzzy.js | src/fuzzy.js | // Improved from Bulat Bochkariov's version (http://www.quora.com/Algorithms/How-is-the-fuzzy-search-algorithm-in-Sublime-Text-designed)
const fuzzy = (searchSet, query, opts_) => {
const opts = Object.assign({
caseSensitive: false,
before: '',
after: ''
}, opts_);
if (!query) {
... | JavaScript | 0.000318 | @@ -2030,16 +2030,43 @@
es;%0A%7D;%0A%0A
+/* istanbul ignore next */%0A
(functio
@@ -2334,15 +2334,43 @@
this, fu
-zzy
+nction () %7B%0A return fuzzy;%0A%7D
));%0A
|
ecaa471682bdff95b9460bdf69457ea676dbbcd4 | fix cpu temp comparison | MMM-SystemStats.js | MMM-SystemStats.js | /* global Module */
/* Magic Mirror
* Module: MMM-SystemStats
*
* By Benjamin Roesner http://benjaminroesner.com
* MIT Licensed.
*/
Module.register('MMM-SystemStats', {
defaults: {
updateInterval: 10000,
animationSpeed: 0,
align: 'right',
language: config.language,
useSyslog: false,
th... | JavaScript | 0.000001 | @@ -1432,24 +1432,26 @@
Temp;%0A
+//
console.log(
@@ -1666,19 +1666,41 @@
-if
+var cpuTemp = Math.ceil
(parse
-In
+Floa
t(th
@@ -1716,16 +1716,134 @@
cpuTemp)
+);%0A //console.log('before compare (' + cpuTemp + '/' + this.config.thresholdCPUTemp + ')');%0A if (cpuTemp
%3E this.
@@ -192... |
07adb0f4b8e948209ff32a65a2790f7872f7459b | Implement prevention from adding duplicates to the database | backend/dynamic-web-apps/voting-app/src/database.js | backend/dynamic-web-apps/voting-app/src/database.js | const mongoose = require('mongoose');
const dotenv = require('dotenv');
dotenv.config();
mongoose.Promise = global.Promise;
const connect = async () => {
try {
await mongoose.connect(process.env.MONGODBURI);
console.log('Successfully connected to database');
return 0;
} catch (e) {
console.log('Fa... | JavaScript | 0.000003 | @@ -421,32 +421,168 @@
d) =%3E %7B%0A try %7B%0A
+ const isDuplicate = Boolean(await model.findOne(%7B username %7D));%0A if (isDuplicate) %7B%0A throw 'username already exists';%0A %7D%0A
await model.
@@ -726,16 +726,300 @@
o create
+ document');%0A return e === 'username already exists' ? 2 :... |
8797c91db22eb57dc6ed974c1273cb12e399623c | Change isOverridePossible behaviour. | src/components/Loans/OpenLoans/helpers/isOverridePossible/isOverridePossible.js | src/components/Loans/OpenLoans/helpers/isOverridePossible/isOverridePossible.js | import overridePossibleMessages from './overridePossibleMessages';
export default (errorMessage) => {
const data = {
overridable: false,
autoNewDueDate: true,
};
overridePossibleMessages.forEach(({ message, showDueDatePicker }) => {
if (errorMessage.includes(message)) {
if (showDueDatePicker) ... | JavaScript | 0 | @@ -65,45 +65,8 @@
';%0A%0A
-export default (errorMessage) =%3E %7B%0A
cons
@@ -76,18 +76,16 @@
ata = %7B%0A
-
overri
@@ -98,18 +98,16 @@
false,%0A
-
autoNe
@@ -126,50 +126,74 @@
ue,%0A
-
%7D;%0A%0A
- overridePossibleMessages.forEach((
+const isOverridableMessage = (errorMessage) =%3E %7B%0A for ... |
bb463ab27d959f176b19a146e69f2bfc19ccc97f | clean up example data file | exampleData/sequenceDataWithOrfsAndTranslations3.js | exampleData/sequenceDataWithOrfsAndTranslations3.js | var seqString1 = "gacgtctggatcctcgtctcassasdfasdsfasdfasdfasdasdgasdgasdgasdgtgccgcggccgcggccgcggacaacttgacggctacatcattcactttttcttcacaaccggcacggaactcggacgtctggatcctcgtctcatgacaacttgacggctacatcattcactttttcttcacaaccggcacggaactcggacgtctggatcctcgtctcatgacaacttgacggctacatcattcactttttcttcacaaccggcacggaactcggacgtctggatcctcgtc... | JavaScript | 0.000024 | @@ -10,404 +10,162 @@
ring
-1
=
-%22gacgtctggatcctcgtctcassasdfasdsfasdfasdfasdasdgasdgasdgasdgtgccgcggccgcggccgcggacaacttgacggctacatcattcactttttcttcacaaccggcacggaactcggacgtctggatcctcgtctcatgacaacttgacggctacatcattcactttttcttcacaaccggcacggaactcggacgtctggatcctcgtctcatgacaacttgacggctacatcattcactttttcttcacaaccggcacggaa... |
0f9eb9e867168d4fa17430c395897785223fdf2b | fix unreferenced variable | index.js | index.js | var TIMEOUT = 4000;
var _ = require('lodash'),
q = require('bluebird'),
fs = require('fs'),
glob = require('glob'),
introspect = require('introspect'),
appRootPath = require('app-root-path'),
TimeoutError = q.TimeoutError;
function defer() {
var deferred = { };
deferred.promise = new q... | JavaScript | 0.000006 | @@ -5418,16 +5418,21 @@
require(
+this.
pkgroot
|
b30bf33996d0d1fa85c791ea0dde3f95c2ef2812 | set values to undefined if not present | src/HOFs/propFormatter.js | src/HOFs/propFormatter.js | import * as React from 'react'
import { PARAMS_EXP_MAP } from "./constants"
/**
* Creates a 1-step, or complete, URL from `domain` and `src` Strings.
*
* - First, the function checks if src has a defined `domain`. If it does, it
* checks to see if `src` has a scheme, and prepends "http" or "https" as needed
* - ... | JavaScript | 0.000063 | @@ -1738,36 +1738,41 @@
ps.width %3C= 1 ?
-null
+undefined
: props.width%0A
@@ -1824,20 +1824,25 @@
%3C= 1 ?
-null
+undefined
: props
@@ -1912,20 +1912,25 @@
main) :
-null
+undefined
%0A%0A retu
|
740117209ebe3158c7577e6f02546311c8afff23 | Remove unused preventDefault() function | js/MasterSwitchComponent.js | js/MasterSwitchComponent.js | 'use strict';
var $ = require('jquery');
function MasterSwitchComponent(html, disableUi) {
this.$html = html,
this.disableUi = disableUi;
};
MasterSwitchComponent.prototype.init = function () {
var component = this;
component.$container = this.$html.find('.masterswitch');
component.$container.e... | JavaScript | 0.000001 | @@ -1478,64 +1478,8 @@
%7D;%0A%0A
-function preventDefault(e) %7B%0A e.preventDefault();%0A%7D%0A%0A
modu
|
424fac78ac05b318228f741c6bed59ac43730136 | Fix iteraction missprint | index.js | index.js | // prefixer helper function
var prefixes = ['webkit', 'moz', 'MS', 'o', ''];
var add_event_listener = function (element, type, callback) {
prefixes.forEach(function (prefix) {
if (!prefix) {
type = type.toLowerCase();
}
element.addEventListener(prefix + type, callback, false);
});
};
var export... | JavaScript | 0.999671 | @@ -611,17 +611,16 @@
),%0A i
-n
teractio
@@ -658,17 +658,16 @@
imationI
-n
teractio
|
8c6bf4ad7ab150b1ee4a70ee84ef299ee6549f87 | Fix amazon-ses/controller arguments | server/controllers/campaign/email/amazon-ses/controller.js | server/controllers/campaign/email/amazon-ses/controller.js | const queue = require('async/queue');
const AWS = require('aws-sdk');
const backoff = require('backoff');
const wrapLink = require('./analytics');
const db = require('../../../../models');
const AmazonEmail = require('./amazon');
const CampaignSubscriber = require('../../../../models').campaignsubscriber;
const Campa... | JavaScript | 0.000134 | @@ -1357,24 +1357,16 @@
= (
-userId,
generato
r, c
@@ -1361,16 +1361,32 @@
generato
+r, ListSubscribe
r, campa
@@ -1456,20 +1456,8 @@
gion
-, analysisId
) =%3E
|
d858015202f2f5f0ef415a9244054dbb05a46a0a | Allow arrow function with the `jsx-no-bind` rule | index.js | index.js | 'use strict';
module.exports = {
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
plugins: [
'react'
],
rules: {
'react/boolean-prop-naming': 'error',
'react/button-has-type': 'error',
'react/default-props-match-prop-types': 'error',
'react/forbid-component-props': 'error',
'react/no-access-state... | JavaScript | 0.000005 | @@ -1896,24 +1896,29 @@
x-no-bind':
+%5B%0A%09%09%09
'error',%0A%09%09'
@@ -1906,32 +1906,77 @@
: %5B%0A%09%09%09'error',%0A
+%09%09%09%7B%0A%09%09%09%09allowArrowFunctions: true%0A%09%09%09%7D%0A%09%09%5D,%0A
%09%09'react/jsx-no-
|
698d089aad1d94a9df34de085c48c60287a5a082 | fix #4 moment format for week should be 'Locale 4 digit week year' [gggg] instead of '4 digit year' [YYYY] | src/CalendarBaseMixin.js | src/CalendarBaseMixin.js | "use strict";
var _ = require('lodash');
var React = require('react');
var moment = require('moment');
var dateToComponentMap = {
Month: 'YYYY-MM',
Week: 'YYYY-ww',
Day: 'YYYY-DDDD'
};
var CalendarBaseMixin = {
moment: function (...args) {
var localMoment = moment.apply(this, args);
localMoment.local... | JavaScript | 0.99925 | @@ -154,20 +154,20 @@
Week: '
-YYYY
+gggg
-ww',%0A
|
85f2335050e16e0a0083e2404d9f2f55adee6966 | use alternateName of the city on search | assets/js/dataHelpers.js | assets/js/dataHelpers.js | //Retrieve the countries in ajax and return an array of value
//The selectType change the value key :
//for select input : {"value":"FR", "text":"France"}
//for select2 input : {"id":"FR", "text":"France"}
function getCountries(selectType) {
var result = new Array();
$.ajax({
url: baseUrl+'/'+moduleId+"/opendata/g... | JavaScript | 0.000001 | @@ -1077,33 +1077,42 @@
, %22text%22 :value.
-n
+alternateN
ame%7D);%0A%09%09%09%09%7D els
@@ -1170,17 +1170,26 @@
:value.
-n
+alternateN
ame%7D);%0A%09
|
1622dcc1ba4ccddc210bcda2445628b1c50b4b10 | Implement decode method that returns payload | index.js | index.js | var jws = require('jws');
var moment = require('moment');
module.exports.sign = function(payload, secretOrPrivateKey, options) {
options = options || {};
var header = {typ: 'JWT', alg: options.algorithm || 'HS256'};
if (options.expiresInMinutes)
payload.exp = moment().add('minutes', options.expiresInMinute... | JavaScript | 0.000162 | @@ -52,16 +52,95 @@
ent');%0A%0A
+module.exports.decode = function (jwt) %7B%0A return jws.decode(jwt).payload;%0A%7D;%0A%0A
module.e
@@ -325,17 +325,16 @@
Minutes)
-
%0A pay
@@ -469,18 +469,16 @@
dience;%0A
-
%0A if (o
@@ -526,18 +526,16 @@
issuer;%0A
-
%0A if (o
@@ -1117,25 +1117,28 @@
));%0A
-
... |
fae642622da4c9c4163f11d116aeae9cf7d40c08 | fix bug X-Forwarder-For | index.js | index.js | /**
* Author: petar bojinov - @pbojinov
* Date: 9/29/13
*/
/**
* @method getClientIp
*
* Get client IP address
*
* Will return 127.0.0.1 when testing locally
* Useful when you need the user ip for geolocation or serving localized content
*
* @param req
* @returns {string} ip
*/
function getClientIp(req) ... | JavaScript | 0 | @@ -113,17 +113,16 @@
dress%0A *
-
%0A * Will
@@ -441,17 +441,17 @@
Forwarde
-d
+r
-For'),%0A
@@ -1112,16 +1112,17 @@
p = getClientIp;
+%0A
|
b2b200c32ce2b69ca1da48fbc9bc5c8b13c6a28a | fix for 'Error reading from name store' | src/JBrowse/Store/Hash.js | src/JBrowse/Store/Hash.js | define( [
'dojo/_base/declare',
'dojo/_base/array',
'dojo/store/JsonRest',
'dojo/store/util/QueryResults',
'JBrowse/Digest/Crc32'
],
function(
declare,
array,
dojoJSONRest,
QueryResults,
... | JavaScript | 0.000001 | @@ -1895,16 +1895,207 @@
Ident )
+).then( function(value) %7B%0A return value;%0A %7D, function(err) %7B%0A return %7B%7D;%0A %7D
);%0A
|
22819ca54ca0bf889fbb635c4e4b3d32f21f5a0b | delete style in form | components/form/Form.js | components/form/Form.js | import React from 'react';
import Autocomplete from '../autocomplete';
import Button from '../button';
import Checkbox from '../checkbox';
import DatePicker from '../date_picker';
import Dropdown from '../dropdown';
import Input from '../input';
import RadioGroup from '../radio/RadioGroup';
import Slider from '../slide... | JavaScript | 0 | @@ -1676,72 +1676,8 @@
) %7B%0A
- const className = %60$%7Bstyle.root%7D $%7Bthis.props.className%7D%60;%0A%0A
@@ -1734,16 +1734,27 @@
ssName=%7B
+this.props.
classNam
|
d502e05264fbee5beaae194d744892af9db5812c | add dummy sking component | index.js | index.js | import createEntity from "./entity.js";
import createAnimation from "./components/animation.js";
import createCamera from "./components/camera.js";
import createAmbientLight from "./components/ambient-light.js";
import createDirectionalLight from "./components/directional-light.js";
import createPointLight from "./comp... | JavaScript | 0.000001 | @@ -3555,32 +3555,90 @@
ter(opts);%0A %7D%0A%0A
+ skin(opts) %7B%0A return %7B%7D; //TODO: implement skin%0A %7D%0A%0A
skybox(opts) %7B
|
400212655a5d56351110612ed040b5f0c8b83bf5 | win path | index.js | index.js | "use strict";
var nodecss = require("node-css"),
_ = require("lodash"),
libpath = require("path"),
CSS = nodecss.CSS;
var rxReplacePath = new RegExp(escape(libpath.sep), "g");
var MEDIA_QUERY = "(min-device-pixel-ratio: 2) and (min-resolution: 192dpi)";
var css = new CSS();
function CSSImage(){
}
CSSImag... | JavaScript | 0.99984 | @@ -148,44 +148,18 @@
h =
-new RegExp(escape(libpath.sep), %22g%22)
+/(%5C/%7C%5C%5C)/g
;%0Ava
@@ -3370,28 +3370,27 @@
%7D%0A
-if(root)%7B%0A return
+var result = root ?
lib
@@ -3416,23 +3416,19 @@
der)
-;%0A %7D else %7B%0A
+ : folder;%0A
re
@@ -3436,19 +3436,43 @@
urn
-folder;%0A %7D
+result.repl... |
d1b932eabfb2ded3b5a5bc3c3be173b5e3069119 | Edit Gruntfile.js. | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
test: {
files: ['test/**/*.js']
},
lint: {
files: ['grunt.js', 'tasks/**/*.js', 'test/**/*.js']
},
watch: {
files: '<config:lint.files>',
tasks: 'default'
},
jshint: {
options: ... | JavaScript | 0 | @@ -78,16 +78,671 @@
onfig(%7B%0A
+ compass: %7B%0A dev: %7B%0A reference: %7B%0A 'htdocs/common/css': 'htdocs/_scss',%0A 'htdocs/category/css': 'htdocs/category/_scss'%0A %7D,%0A options: %7B%0A config: 'config.rb',%0A environment: 'development'%0A ... |
e37e3aa88acc15627231482bc4119220e95767f8 | update BrowserStack to chrome 90 for Windows | common/predictive-text/unit_tests/in_browser/CI.conf.js | common/predictive-text/unit_tests/in_browser/CI.conf.js | module.exports = function(config) {
var base = require("./base.conf.js");
var timeouts = base.client.args[0];
var browserStackModifier = 10;
for(key in timeouts) {
if(typeof timeouts[key] == 'number') {
timeouts[key] = timeouts[key] * browserStackModifier;
}
}
timeouts.mobileFactor = 2; // ... | JavaScript | 0 | @@ -2051,17 +2051,16 @@
entary).
-
%0A //b
@@ -2305,25 +2305,25 @@
r_version: '
-7
+9
0.0'%0A %7D,%0A
|
5c73eb4814c5f05cd848d4ea7b8cfa12dacf0e6d | Update mainv1.min.js | Release/mainv1.min.js | Release/mainv1.min.js | var imageAddr = "https://jdc20181.github.io/testpics/winter-fog-1323462087o5i.jpg";
var downloadSize = 584000; //bytes
function ShowProgressMessage(msg) {
if (console) {
if (typeof msg == "string") {
console.log(msg);
} else {
for (var i = 0; i < msg.length; i++) {
... | JavaScript | 0.000001 | @@ -1516,10 +1516,42 @@
e *
-8;
+10; /*Adjustment Varible 8 to 10*/
%0A
|
b10a1d40fac2b1a4fd2b2d741113a6192a119b62 | Fix coloring of earthquakes above sea level (blue -> red) | js/earthquake-properties.js | js/earthquake-properties.js | export const TRANSITION_TIME = 750
export function depthToColor(depth) {
const depthRange = Math.floor(depth / 100)
switch(depthRange) {
case 0: // 0 - 100
return 0xFF0A00
case 1: // 100 - 200
return 0xFF7A00
case 2: // 200 - 300
return 0xFFF700
case 3: // 300 - 400
return 0... | JavaScript | 0.000015 | @@ -67,16 +67,116 @@
epth) %7B%0A
+ // Depth can be negative (earthquake above the sea level) - use 0-100km range color in this case.%0A
const
@@ -187,16 +187,28 @@
hRange =
+ Math.max(0,
Math.fl
@@ -223,16 +223,17 @@
h / 100)
+)
%0A switc
@@ -262,16 +262,39 @@
se 0: //
+ above the sea level or
0 - 100
|
2195315ff882b423bfb05aac67cbc53cc3c4e673 | Remove focus events from Marketo. | website-guts/assets/js/layouts/trial-form.js | website-guts/assets/js/layouts/trial-form.js | //w.optly.mrkt.inlineFormLabels();
if(!w.optly.mrkt.isMobile()){
$('#url').focus();
}
$('[name="hidden"]').val('touched');
document.querySelector('[name="hidden"]').value = 'touched';
var xhrInitiationTime;
//track focus on form fields
$('#seo-form input:not([type="hidden"])').each(function(){
$(this).focus(fu... | JavaScript | 0 | @@ -545,16 +545,80 @@
'forms'%0A
+ %7D, %7B%0A integrations: %7B%0A 'Marketo': false%0A %7D%0A
%7D);%0A
|
a6edb812192c2265a0109d09dab2314deda3fd08 | remove info line that nate couldn't search to find | Resources/lib/Todo.js | Resources/lib/Todo.js | /**
*
* @param {Object} params is an abstract object from which only necessary fields will be extracted
*/
function Todo(params) {
Ti.API.info('value of params.start is '+params.start);
return {
'start' : new Date(+params.start),
'end' : new Date(+params.end),
'description' : params.description,
};
}
modu... | JavaScript | 0 | @@ -132,64 +132,8 @@
) %7B%0A
-%09Ti.API.info('value of params.start is '+params.start);%0A
%09ret
|
7d6e8f174962079af16f96459307919bd4a9f2ec | improve code comments in DOM.parseTemplate | src/DOM.parsetemplate.js | src/DOM.parsetemplate.js | define(["DOM"], function(DOM, _forEach) {
"use strict";
// EMMET-LIKE PARSER
// -----------------
(function() {
var operators = {
// operator type / priority object
"(": 1,
")": 2,
"^": 3,
">": 4,
"+": 4,
"*": ... | JavaScript | 0 | @@ -853,24 +853,93 @@
, simple) %7B%0A
+ // wrap attribute values with quotes if they don't exist%0A
@@ -1012,24 +1012,24 @@
%22 : value);%0A
-
%7D,%0A
@@ -1184,11 +1184,9 @@
oin(
-%220%22
+0
);%0A
@@ -1872,10 +1872,8 @@
if (
-!~
empt
@@ -1907,16 +1907,20 @@
m + %22 %22)
+ %3C... |
430e8030ded989787c1ce59c3228d3a92919d73f | update LongList | src/LongList/LongList.js | src/LongList/LongList.js | /**
* @file LongList component
* @author liangxiaojun(liangxiaojun@derbysoft.com)
*/
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import List from '../List';
import Tip from '../Tip';
import Theme from '../Theme';
import Util from '../_vendors/Util';
export ... | JavaScript | 0 | @@ -460,24 +460,25 @@
restArgs) %7B%0A
+%0A
supe
@@ -500,16 +500,96 @@
tArgs);%0A
+%0A this.wheelhandler = ::this.wheelhandler;%0A%0A %7D%0A%0A wheelhandler() %7B%0A%0A
%7D%0A%0A
@@ -652,16 +652,62 @@
s.props%7D
+%0A onWheel=%7Bthis.wheelhandler%7D
/%3E%0A
@@ -4013,... |
807bc303919f905456a4340c6eb9cdec1233fccf | add run region tags (#1254) | functions/tips/index.js | functions/tips/index.js | /**
* Copyright 2018, Google, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | JavaScript | 0 | @@ -1057,16 +1057,49 @@
scopes%5D%0A
+// %5BSTART run_tips_global_scope%5D%0A
// Globa
@@ -1122,16 +1122,16 @@
) scope%0A
-
// This
@@ -1580,32 +1580,63 @@
ctionVar%7D%60);%0A%7D;%0A
+// %5BEND run_tips_global_scope%5D%0A
// %5BEND function
@@ -1690,16 +1690,48 @@
lobals%5D%0A
+// %5BSTART run_tips_global_lazy%... |
5cbc8ef7753e1ac47d6b43d4840573a3f415ac57 | Simplify build options handling and remove gitty dependency. | gulp/utils/options.js | gulp/utils/options.js | /*
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
* http://scratchdisk.com/ & http://jonathanpuckey.com/
*
* Distributed under the MIT license. See LICENSE file for details.
*
* All rights reserved.
*/
var git... | JavaScript | 0 | @@ -310,21 +310,24 @@
*/%0A%0Avar
-gitty
+execSync
= requi
@@ -334,15 +334,32 @@
re('
-gitty')
+child_process').execSync
,%0A
@@ -386,19 +386,22 @@
extend')
-;%0A%0A
+,%0A
// Requi
@@ -469,16 +469,20 @@
ber and%0A
+
// make
@@ -516,19 +516,19 @@
e date.%0A
-var
+
options
@@ -565,31 +565,8 @@
... |
bfdf25f8a13de20a97e6dbe8b6ffe575a2e19621 | fix typo in DoNotTrack variable name | assets/src/js/tracker.js | assets/src/js/tracker.js | 'use strict';
var queue = window.ana.q || [];
var trackerUrl = '//ana.dev/collect';
var commands = {
"trackPageview": trackPageview,
"setTrackerUrl": setTrackerUrl,
};
// convert object to query string
function stringifyObject(json) {
var keys = Object.keys(json);
// omit empty
keys = keys.filter(function(... | JavaScript | 0.00023 | @@ -644,17 +644,17 @@
gator.Do
-n
+N
otTrack
@@ -659,10 +659,13 @@
k ==
- 1
+= %221%22
) %7B
|
e4c9873eda0ff41ac82b15f4ea41136ee8d86301 | Set campaign theme color to green | web/src/js/components/Campaign/CampaignBase.js | web/src/js/components/Campaign/CampaignBase.js | import React from 'react'
import PropTypes from 'prop-types'
import { withTheme } from '@material-ui/core/styles'
import IconButton from '@material-ui/core/IconButton'
import CloseIcon from '@material-ui/icons/Close'
import moment from 'moment'
import FadeInDashboardAnimation from 'js/components/General/FadeInDashboard... | JavaScript | 0.000001 | @@ -3276,34 +3276,16 @@
rimary,%0A
- // TODO%0A
@@ -3286,38 +3286,38 @@
main: '#
-FF0000
+028502
',%0A lig
@@ -3314,38 +3314,38 @@
light: '#
-FF0000
+0aac0a
',%0A %7D,%0A
@@ -3412,26 +3412,8 @@
ry,%0A
- // TODO%0A
@@ -3422,30 +3422,30 @@
main... |
5c18f40de3ef0682fa08df4d44035330e7aa0250 | add logging | packages/angularjs/rendering/template-finder.js | packages/angularjs/rendering/template-finder.js | var fs = require('fs');
var _ = require('lodash');
module.exports = function templateFinderFactory(templateFolder, extension) {
var templateFolderPaths = fs.readdirSync(templateFolder);
var templateMap = _.indexBy(templateFolderPaths);
return function templateFinder(doc) {
return templateMap[doc.id ... | JavaScript | 0.000001 | @@ -43,16 +43,46 @@
odash');
+%0Avar log = require('winston');
%0A%0Amodule
@@ -152,16 +152,83 @@
sion) %7B%0A
+%0A log.debug('templateFinderFactory', templateFolder, extension);%0A%0A
var te
|
b79696c9d8866bf4912360001a5baee79afa7fb7 | 优化获取 entry 的方式 | packages/matman-crawler/src/model/CrawlerParser.js | packages/matman-crawler/src/model/CrawlerParser.js | import fs from 'fs';
import path from 'path';
import glob from 'glob';
/**
* 爬虫脚本类,用于处理所有的前端爬虫脚本
*/
export default class CrawlerParser {
/**
* 构造函数
*
* @param {Object} opts 参数
* @param {String} opts.rootPath 项目的根目录
* @param {String} [opts.testPath] 端对端测试代码的目录
* @param {String} [opt... | JavaScript | 0.000087 | @@ -1977,16 +1977,39 @@
= %7B%7D;%0A%0A
+ // %E8%8E%B7%E5%8F%96%E6%89%80%E6%9C%89%E7%9A%84 js %E6%96%87%E4%BB%B6%0A
@@ -2102,16 +2102,28 @@
sult
-.forEach
+%0A .filter
((it
@@ -2147,189 +2147,272 @@
-let matchResult = item.match(this.crawlerMatch);%0A%0A if (matchResult)... |
c2710e99bf335e5c01dd7a865375ae74b4feef17 | changing geocode query to country temp | api/src/pipeline/jobs/geocode.job.js | api/src/pipeline/jobs/geocode.job.js | import { query, queryAACT } from '../../util/db';
import { Client } from '@googlemaps/google-maps-services-js';
import { bulkUpdate } from '../../search/elastic';
import logger from '../../util/logger';
const zg = require('zip2geo');
const util = require('util');
let IS_RUNNING = false;
export const geocodeStudies... | JavaScript | 0.998723 | @@ -1497,16 +1497,33 @@
' where
+f.country=$1 and
f.nct_id
|
67ec355a3c15eabb7cff3fff5fd2c9d3a8be48ca | Update end time | web/src/js/components/Campaign/CampaignBaseView.js | web/src/js/components/Campaign/CampaignBaseView.js | import React from 'react'
// import PropTypes from 'prop-types'
import { QueryRenderer } from 'react-relay'
import graphql from 'babel-plugin-relay/macro'
import environment from 'js/relay-env'
import withUserId from 'js/components/General/withUserId'
import CampaignBase from 'js/components/Campaign/CampaignBase'
impor... | JavaScript | 0.000001 | @@ -550,15 +550,15 @@
19-0
-3-29T20
+4-01T18
:00:
|
d88ea7e43f784d26c2cfadb38d881f14cea24a6f | update Dropdown | src/Dropdown/Dropdown.js | src/Dropdown/Dropdown.js | /**
* @file Dropdown component
* @author liangxiaojun(liangxiaojun@derbysoft.com)
*/
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {findDOMNode} from 'react-dom';
import classNames from 'classnames';
import RaisedButton from '../RaisedButton';
import Popup from '../Popup';
impo... | JavaScript | 0.000001 | @@ -2108,32 +2108,41 @@
%0A
+ iconCls,
triggerValue, r
@@ -2184,16 +2184,16 @@
Ripple,%0A
-
%0A
@@ -3328,16 +3328,64 @@
rValue%7D%0A
+ iconCls=%7BiconCls%7D%0A
@@ -5356,16 +5356,47 @@
s.any,%0A%0A
+ iconCls: PropTypes.string,%0A
righ
@@ -6224,1... |
e1109e8ca694d6f02f8df422dec93b3cce2f8f25 | Improve error exception report for Android Monitor | src/engine/sequencer.js | src/engine/sequencer.js | var Timer = require('../util/timer');
var Thread = require('./thread');
var YieldTimers = require('../util/yieldtimers.js');
function Sequencer (runtime) {
/**
* A utility timer for timing thread sequencing.
* @type {!Timer}
*/
this.timer = new Timer();
/**
* Reference to the runtime o... | JavaScript | 0 | @@ -4830,16 +4830,37 @@
e.error(
+%0A
'Excepti
@@ -4888,10 +4888,24 @@
tion
-',
+ for opcode: ' +
%0A
@@ -4925,38 +4925,25 @@
-%7B
opcode
-: opcode, exception:
+ + '%5Cn' +
e
-%7D
);%0A
|
5e61e85b6a8d1c6d92c2487fbca9cd92b7e78894 | Add sync localStorage with state | options/containers/Options.js | options/containers/Options.js | import React, { PropTypes } from 'react';
import { loginTrello, logoutTrello, tryAuthTrello } from '../actions/trello';
import { connect } from 'react-redux';
class Option extends React.Component {
constructor(props) {
super(props);
this.state = {
trelloToken: null,
};
}
componentWillMount() {... | JavaScript | 0.000001 | @@ -357,237 +357,8 @@
');%0A
- // TODO: Look for token in chrome.storage.sync. If exist then save to localstorage.%0A console.log(localStorage.trello_token);%0A console.log('this.props.trelloToken', this.props.trelloToken, typeof this.props.trelloToken);
%0A
@@ -408,32 +408,41 @@
localStorage.
+setIte... |
3a31407868e94dda080d6128e29030b85312685a | Update boundRequest for clusto queries to include specified headers | index.js | index.js | 'use strict';
var _ = require('lodash');
var Prober = require('airlock');
var request = require('request');
module.exports.ClustoClient = ClustoClient;
function ClustoClient(options) {
options = options || {};
this._baseURL = options.baseURL || 'http://localhost:9996';
if (this._baseURL.slice(-1) === '/'... | JavaScript | 0 | @@ -1996,16 +1996,46 @@
method,%0A
+ headers: headers,%0A
|
9b41ecb700d0ab5f536a294e11bd3e3bb94b88cd | support url resource | index.js | index.js | "use strict";
var fs = require("fs");
var path = require('path');
var loaderUtils = require("loader-utils");
module.exports = function(source) {
this.cacheable && this.cacheable();
var cb = this.async();
if (!cb) {
return source;
}
try {
var code = source.split('// mod... | JavaScript | 0.000001 | @@ -396,24 +396,100 @@
orts = %5B%5D;%0D%0A
+ var require = function(url) %7B%0D%0A return url;%0D%0A %7D;%0D%0A
eval
@@ -658,16 +658,17 @@
ilename)
+;
%0D%0A
|
a58fec1e76541178db2149229355de874c9a80f4 | update Dropdown | src/Dropdown/Dropdown.js | src/Dropdown/Dropdown.js | /**
* @file Dropdown component
* @author liangxiaojun(liangxiaojun@derbysoft.com)
*/
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {findDOMNode} from 'react-dom';
import RaisedButton from '../RaisedButton';
import Popup from '../Popup';
import Theme from '../Theme';
import Uti... | JavaScript | 0.000001 | @@ -196,16 +196,53 @@
ct-dom';
+%0Aimport classNames from 'classnames';
%0A%0Aimport
@@ -2361,27 +2361,22 @@
-selfTrigger
+button
ClassNam
@@ -2383,46 +2383,39 @@
e =
-(popupVisible ? ' activated' : '') + (
+classNames('dropdown-trigger',
isAb
@@ -2413,33 +2413,32 @@
er', isAbove ? '
-
above' : ' bl... |
283e897a8cba36d3a2aaabe3432ccae55f92f5bb | check injector definition before exec | src/mixins/injectable.js | src/mixins/injectable.js | import { internal } from '../helpers/internal.js';
export const InjectableMixin = (SuperClass) => class extends SuperClass {
constructor(...args) {
super(...args);
internal(this).injected = {};
}
initialize(config = {}) {
return super.initialize(config)
.then(() =>
... | JavaScript | 0 | @@ -1420,32 +1420,75 @@
in injectors) %7B%0A
+ if (injectors%5Bname%5D) %7B%0A
@@ -1549,24 +1549,42 @@
rs%5Bname%5D));%0A
+ %7D%0A
|
dbaeae24abb4c95ca589f112b9891e08446b474e | Clean gruntfile | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
paths: {
src: 'src',
test: 'test',
dist: 'dist'
},
clean: {
dist: 'dist',
coverage: 'test/coverage'
},
jshint: {
options: ... | JavaScript | 0.000001 | @@ -397,35 +397,35 @@
%0A %7D,%0A
-all
+src
: %7B%0A src:
@@ -429,123 +429,156 @@
rc:
-%5B%0A 'Gruntfile.js',%0A '%3C%25= paths.src %25%3E/**/*.js',%0A '%3C%25= paths.test %25%3E/spec/*.js'%0A %5D
+'%3C%25= paths.src %25%3E/**/*.js'%0A %7D,%0A test: %7B%... |
c841fb2b05a589b1adf9dd9ed63ea5280e4a4afd | Support constraints "none" and null as "no constraint" | packages/constraint-solver/constraint-solver.js | packages/constraint-solver/constraint-solver.js | var semver = Npm.require('semver');
ConstraintSolver = {};
// catalog is a catalog.Catalog object. We have to pass this in because
// we're in a package and can't require('release.js'). If this code
// moves to the tool, or if all of the tool code moves to a star, we
// should get cat from release.current.catalog rat... | JavaScript | 0 | @@ -6074,32 +6074,66 @@
if (constraint
+ !== null && constraint !== %22none%22
) %7B%0A cons
|
5d11e02008731a78f302841863a83fe7ed3c37b9 | change plnkr form to open in same window | docs/app/src/examples.js | docs/app/src/examples.js | angular.module('examples', [])
.factory('formPostData', ['$document', function($document) {
return function(url, fields) {
var form = angular.element('<form style="display: none;" method="post" action="' + url + '" target="_blank"></form>');
angular.forEach(fields, function(value, name) {
var input = a... | JavaScript | 0 | @@ -115,24 +115,306 @@
, fields) %7B%0A
+ /**%0A * Form previously posted to target=%22_blank%22, but pop-up blockers were causing this to not work.%0A * If a user chose to bypass pop-up blocker one time and click the link, they would arrive at%0A * a new default plnkr, not a plnkr with the desired temp... |
e615d5ef189fc3ffe9027c37a9aa95173756cbb5 | 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 | @@ -2163,16 +2163,29 @@
age%5D();%0A
+%09println(m);%0A
%7D;%0A%0AkeyP
|
0b575f63b99834745c1fa227ce9736baa27a1d32 | Fix async/await in `ember-try` config | config/ember-try.js | config/ember-try.js | 'use strict';
const getChannelURL = require('ember-source-channel-url');
module.exports = function() {
return {
useYarn: true,
scenarios: [
{
name: 'ember-lts-2.12',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
}),
... | JavaScript | 0.000002 | @@ -84,16 +84,22 @@
xports =
+ async
functio
@@ -99,16 +99,17 @@
function
+
() %7B%0A r
@@ -1502,32 +1502,38 @@
'ember-source':
+ await
getChannelURL('
@@ -1542,16 +1542,16 @@
lease')%0A
-
@@ -1672,32 +1672,38 @@
'ember-source':
+ await
getChannelURL('
@@ -1814,32 +1814,32 @@
Dependencies: %7... |
8c5a99c366d59d577836d0368fe7cf22cf04fbc2 | Add ajax call back to tags entrance point | qipr_approver/static/qipr/js/app.js | qipr_approver/static/qipr/js/app.js |
//this automatically executes
! function () {
window.Toaster = function () {
var timeToShow = 500,
timeToHide = 5000,
Toaster = function () {
var self = this;
this.toast = document.getElementById('toast') || undefined;
this.show = ()... | JavaScript | 0 | @@ -1110,16 +1110,20 @@
//////%0A%0A
+
//setup
@@ -1139,16 +1139,20 @@
nctions%0A
+
var typi
@@ -1194,16 +1194,20 @@
ntifier%0A
+
var done
@@ -1256,16 +1256,20 @@
conds)%0A%0A
+
//on key
@@ -1292,16 +1292,20 @@
untdown%0A
+
startTyp
@@ -1331,16 +1331,20 @@
(node)%7B%0A
+
clea
@@... |
bb0ef31d06a62557517b9f3ed4e7e4da8603a51a | use Conductor.error as rejection handler | cards/github-repositories/app/routes/application.js | cards/github-repositories/app/routes/application.js | function rejectionHandler(reason) {
console.error(reason);
console.assert(reason);
throw reason;
}
import 'card' as card;
var ApplicationRoute = Ember.Route.extend({
setupController: function(controller, model) {
this._super(controller, model);
var repositoryService = card.consumers['repository'];
... | JavaScript | 0.000001 | @@ -1,111 +1,4 @@
-function rejectionHandler(reason) %7B%0A console.error(reason);%0A console.assert(reason);%0A%0A throw reason;%0A%7D%0A%0A
impo
@@ -403,23 +403,22 @@
ll,
-rejectionHandle
+Conductor.erro
r);%0A
|
8126515cb88f3d555342b55e04c716a9466c9f65 | Add user id blacklist mechanism | src/index.js | src/index.js | import Koa from 'koa';
import Router from 'koa-router';
import rollbar from 'rollbar';
import koaBody from 'koa-bodyparser';
import redis from './redisClient';
import { checkSignature, captureRawBody } from './checkSignature';
import lineClient from './lineClient';
import processMessages from './processMessages';
con... | JavaScript | 0.000001 | @@ -357,16 +357,88 @@
outer();
+%0Aconst userIdBlacklist = (process.env.USERID_BLACKLIST %7C%7C '').split(',')
%0A%0Arollba
@@ -1270,16 +1270,215 @@
%7D) =%3E %7B%0A
+ if (userIdBlacklist.indexOf(userId) !== -1) %7B%0A // User blacklist%0A console.log(%60%5BLOG%5D Blocked user INPUT =%5Cn$%7BJSON.string... |
709eb49369d09bfc481d02c82bd96fcf7946a9a3 | add getXmlAttribute | src/foam/java/PropertyInfo.js | src/foam/java/PropertyInfo.js | /**
* @license
* Copyright 2017 The FOAM Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless ... | JavaScript | 0.000001 | @@ -912,32 +912,96 @@
t'%0A %7D,%0A %7B%0A
+ class: 'Boolean',%0A name: 'xmlAttribute'%0A %7D,%0A %7B%0A
class: 'St
@@ -4345,32 +4345,211 @@
%7D,%0A %7B%0A
+ name: 'getXmlAttribute',%0A type: 'boolean',%0A visibility: 'public',%0A body... |
866c5908e8fc8cfdd1fcc39cd74bd2552428f222 | Extend stateSaver mixin with additional methods | src/mixins/stateSaver.js | src/mixins/stateSaver.js |
import {arrayEach} from './../helpers/array';
import {defineGetter} from './../helpers/object';
const MIXIN_NAME = 'stateSaver';
const STATE_PREFIX = 'state_';
/**
* Mixin object to extend functionality for save/restore object state.
*
* @type {Object}
*/
const stateSaver = {
/**
* Internal states storage.
... | JavaScript | 0 | @@ -1,17 +1,16 @@
-%0A
import %7BarrayEac
@@ -915,16 +915,295 @@
d 0;%0A %7D
+,%0A%0A /**%0A * Clear component state.%0A *%0A * @param %7BString%7CNumber%7D stateId%0A */%0A clearState(stateId) %7B%0A this._states%5BSTATE_PREFIX + stateId%5D = void 0;%0A %7D,%0A%0A /**%0A * Clear all previously save... |
dc712f6971c07039e65c4fbf27ffd87f9c7eceec | add (Accessor.toString) use toString of AccessorExpr | src/expression/2.ast.js | src/expression/2.ast.js | var Ast_Body,
Ast_Statement,
Ast_Value,
Ast_Array,
Ast_Object,
Ast_FunctionRef,
Ast_SymbolRef,
Ast_Accessor,
Ast_AccessorExpr,
Ast_UnaryPrefix,
Ast_TernaryStatement
;
(function(){
Ast_Body = class_create({
constructor: function Ast_Body (parent) {
this.parent = parent;
this.type = type_Body;
th... | JavaScript | 0 | @@ -2589,38 +2589,41 @@
function()%7B%0A%09%09%09
-return
+var str =
this.body + (th
@@ -2620,49 +2620,179 @@
body
- + (this.next == null ? '' : ('.' + this.
+,%0A%09%09%09%09next = this.next;%0A%09%09%09if (next == null) %7B%0A%09%09%09%09return str;%0A%09%09%09%7D%0A%09%09%09if (next.type === type_AccessorExpr) ... |
2fd6616c368e869edb4668687d4ee825458d8c14 | Make Files nav item selected in file detail page | website/static/js/pages/view-file-tree-page.js | website/static/js/pages/view-file-tree-page.js | 'use strict';
var $ = require('jquery');
var fileBrowser = require('../fileViewTreebeard');
var nodeApiUrl = window.contextVars.node.urls.api;
$(document).ready(function() {
// Treebeard Files view
$.ajax({
url: nodeApiUrl + 'files/grid/'
})
.done(function (data) {
new fileBrowser(data... | JavaScript | 0 | @@ -1043,14 +1043,84 @@
%0A %7D);
+%0A $('.osf-project-navbar li:contains(%22Files%22)').addClass('active');
%0A%0A%7D);%0A
|
c3f76ae591343088046692b9bc4e6f4ec1ce4361 | Add ember-alpha tests | config/ember-try.js | config/ember-try.js | /*jshint node:true*/
module.exports = {
scenarios: [
{
name: 'default',
bower: {
dependencies: { }
}
},
{
name: 'ember-1.13',
bower: {
dependencies: {
'ember': '~1.13.0'
},
resolutions: {
'ember': '~1.13.0'
}
}... | JavaScript | 0.000001 | @@ -922,24 +922,236 @@
%7D%0A %7D%0A
+ %7D,%0A %7B%0A name: 'ember-alpha',%0A allowedToFail: true,%0A bower: %7B%0A dependencies: %7B%0A %22ember%22: %22alpha%22%0A %7D,%0A resolutions: %7B%0A %22ember%22: %22alpha%22%0A %7D%0A %7D%0A
... |
b3f23a2aad0ab5fbc3c5764e486b4c9ad3ed8c11 | reset GithubSluggerInstance after it's imported | docs/common/utilities.js | docs/common/utilities.js | import GithubSlugger from 'github-slugger';
const GithubSluggerInstance = GithubSlugger();
// TODO(jim): Not sure what is the point of this.
export const toString = node => {
if (typeof node === 'string') {
return node;
} else if (Array.isArray(node)) {
return node.map(toString).join('');
} else if (nod... | JavaScript | 0 | @@ -86,16 +86,48 @@
ger();%0A%0A
+GithubSluggerInstance.reset();%0A%0A
// TODO(
|
65aa1015374f3a027fe1677180201379b77b5faa | Fix ArrayView (#5025) | src/foam/u2/view/ArrayView.js | src/foam/u2/view/ArrayView.js | /**
* @license
* Copyright 2019 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'foam.u2.view',
name: 'ArrayView',
extends: 'foam.u2.View',
requires: [
'foam.core.FObject',
'foam.u2.layout.Cols',
'foam.u2.layout.Rows'
],
exports... | JavaScript | 0 | @@ -1908,16 +1908,47 @@
x%5D = n;%0A
+ this.updateData();%0A
|
85b4c5786cdb766f01c60124a37c62a8e0e7743a | send context menu clicks to any tab | background.js | background.js | chrome.browserAction.onClicked.addListener(() => chrome.tabs.create({
// launch the URL (from the manifest to avoid duplication)
url: chrome.runtime.getManifest().content_scripts[0].matches[0],
}));
let cache = null;
chrome.runtime.onMessage.addListener((request, sender) => {
// trigger sending context menu cli... | JavaScript | 0 | @@ -201,89 +201,8 @@
);%0A%0A
-let cache = null;%0A%0Achrome.runtime.onMessage.addListener((request, sender) =%3E %7B%0A
// t
@@ -245,25 +245,27 @@
o th
-is
+e
tab
-as well%0A
+that sent it%0A
chro
@@ -317,16 +317,21 @@
ItemId %7D
+, tab
) =%3E %7B%0A
@@ -331,16 +331,66 @@
=%3E %7B%0A
+// console.log(... |
048d099fba7d8ee8494816921891abee456a8cfa | Fix callback naming bug | index.js | index.js | const path = require('path');
const os = require('os');
const mkdirp = require('mkdirp');
const multimatch = require('multimatch');
const async = require('async');
const tinify = require('tinify');
const debug = require('debug')('metalsmith-tinify');
const cache = require('./lib/cache');
module.exports = function(op... | JavaScript | 0.000002 | @@ -997,36 +997,36 @@
%0A return
+do
ne
-xt
(err);%0A %7D%0A%0A
@@ -1214,36 +1214,36 @@
return
+do
ne
-xt
(err);%0A %7D
|
a9c446e37f23be0e047c0006a3f1fd72faf1b971 | Refactor navigation logic | src/files/navigation.js | src/files/navigation.js | var sidebarOpen = false;
var animationEnded = true;
var menuLinkEl = document.getElementsByClassName("menu-link")[0];
var sidebarEl = document.getElementsByClassName("sidebar")[0];
menuLinkEl.addEventListener( "click", handleSidebar );
sidebarEl.addEventListener( "click", handleSidebar );
function handleSidebar ( eve... | JavaScript | 0.000001 | @@ -22,37 +22,48 @@
se;%0Avar
-animationEnded = true
+menuLinkText = %5B%22Menu%22, %22Close%22%5D
;%0Avar me
@@ -86,32 +86,24 @@
ent.
-getElementsByClassName
+querySelector
(%22
+.
menu
@@ -109,19 +109,16 @@
u-link%22)
-%5B0%5D
;%0Avar si
@@ -140,44 +140,82 @@
ent.
-getElementsByClassName(%22sidebar%22)%5B0%5... |
775684bd27ff80113669f561378c21b501780d6a | Set some Slack settings variable to public | packages/rocketchat-slackbridge/server/settings.js | packages/rocketchat-slackbridge/server/settings.js | Meteor.startup(function() {
RocketChat.settings.addGroup('SlackBridge', function() {
this.add('SlackBridge_Enabled', false, {
type: 'boolean',
i18nLabel: 'Enabled',
public: true
});
this.add('SlackBridge_Client_ID', '', {
type: 'string',
enableQuery: {
_id: 'SlackBridge_Enabled',
value: t... | JavaScript | 0 | @@ -348,17 +348,34 @@
ient_ID'
+,%0A%09%09%09public: true
%0A
-
%09%09%7D);%0A%0A%09
@@ -539,16 +539,33 @@
_Secret'
+,%0A%09%09%09public: true
%0A%09%09%7D);%0A%0A
@@ -907,16 +907,33 @@
Enabled'
+,%0A%09%09%09public: true
%0A%09%09%7D);%0A%0A
@@ -1185,24 +1185,24 @@
ion_Token',%0A
-
%09%09%09i18nDescr
@@ -1233... |
8bf1f138d68783b4d50756789eaa19809dafff48 | use correct date format | app/assets/javascripts/datepicker.js | app/assets/javascripts/datepicker.js | $(document).ready(function(){
// you must set a dateFormatter for datetimepicker to use or
// you'll get an error
$.datetimepicker.setDateFormatter('moment');
$('.datepicker').datetimepicker({
timepicker: false,
format: 'dddd, MMMM D, YYYY'
});
$('.datetimepicker').datetimepicker({
format: 'dd... | JavaScript | 0.999573 | @@ -227,38 +227,30 @@
format: '
-dddd, MMMM D,
+MM/DD/
YYYY'%0A %7D);%0A
|
93e1c77aedaf096c8fb8f3a8eb2bcfd1131bed6d | Fix tests | packages/core/spec/Rules/CopyTargetsToRoot_spec.js | packages/core/spec/Rules/CopyTargetsToRoot_spec.js | /* @flow */
import 'babel-polyfill'
import path from 'path'
import CopyTargetsToRoot from '../../src/Rules/CopyTargetsToRoot'
import { initializeRule } from '../helpers'
async function initialize (options = {}, filePath = 'file-types/PortableDocumentFormat.pdf') {
return initializeRule({
RuleClass: CopyTargets... | JavaScript | 0.000003 | @@ -630,32 +630,41 @@
const %7B rule
+, options
%7D = await initi
@@ -831,36 +831,39 @@
ld', 'execute',
-null
+options
, ...rule.parame
@@ -1044,32 +1044,41 @@
const %7B rule
+, options
%7D = await initi
@@ -1235,36 +1235,39 @@
ld', 'execute',
-null
+options
, ...rule.parame
@@ -1438,32 +1438,41 @@
... |
90490083802dcced5d2489ce782904ea8ad23294 | Add line after passport method | generators/app/templates/services/passport/index.js | generators/app/templates/services/passport/index.js | import passport from 'passport'
<%_ if (passwordSignup) { _%>
import { Schema } from 'bodymen'
import { BasicStrategy } from 'passport-http'
<%_ } _%>
import { Strategy as BearerStrategy } from 'passport-http-bearer'
import { Strategy as JwtStrategy, ExtractJwt } from 'passport-jwt'
import { jwtSecret, masterKey } from... | JavaScript | 0.000049 | @@ -985,16 +985,17 @@
, next)%0A
+%0A
%3C%25_ %7D _%25
|
82dd1831c541b73109ea2dc95863f949a7b493fe | Fix user-agent | background.js | background.js | const USER_AGENT = 'Explode/0.1';
const API_ROOT = 'http://api.longurl.org/v2/';
const FETCH_DELAY = 1000;
const SERVICES_CACHE_TIME = 86400 * 1000;
const EXTRA_SERVICES = ['j.mp', 'flic.kr', 'w33.us'];
var services = {};
var outstandingReqs = [];
var curReq = null;
/* An overly-simple XMLHttpRequest wrapper */
func... | JavaScript | 0.99984 | @@ -23,17 +23,17 @@
plode/0.
-1
+2
';%0Aconst
@@ -639,22 +639,50 @@
ent=
-Explode%252F0.1'
+' +%0A encodeURIComponent(USER_AGENT)
;%0A
|
f4f5ba0a1d615af5c09bb200c1e940ecc57bec19 | Add URI.js in the exports. | index.js | index.js | var path = require('path');
module.exports = {
name: 'ember-data-factory-guy',
included: function(app) {
this._super.included(app);
this.app = app;
// need to load mockjax in development and test environment since ember tests
// can be run from browser in development mode
if (app.tests) {
... | JavaScript | 0 | @@ -390,16 +390,76 @@
x.js');%0A
+ app.import(app.bowerDirectory + '/urijs/src/URI.js');%0A
%7D%0A
|
74118767135b8e65f083ce3aed4cf2b192c41c82 | remove no-longer-needed links object from Gruntfile. | Gruntfile.js | Gruntfile.js | /*
* Assemble
* http://github.com/assemble/assemble
*
* Copyright (c) 2013 Assemble
* MIT License
*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Project paths and files.
links: grunt.file.readYAML('docs/data/url.yml'),
// package.json
pkg: grunt.file... | JavaScript | 0 | @@ -191,95 +191,8 @@
g(%7B%0A
-%0A // Project paths and files.%0A links: grunt.file.readYAML('docs/data/url.yml'),%0A%0A
@@ -612,24 +612,25 @@
*/'%0A %7D,%0A
+%0A
jshint:
@@ -953,24 +953,427 @@
an'%0A %7D%0A
+ %7D,%0A%0A // Run simple tests.%0A assemble: %7B%0A tests: %7B%0A ... |
591cb09fd1a542ebb66aebc31122067bc1b5d360 | apply theme update only when changed | packages/fela-bindings/src/ThemeProviderFactory.js | packages/fela-bindings/src/ThemeProviderFactory.js | /* @flow */
import { shallowEqual } from 'recompose'
import { objectEach } from 'fela-utils'
import createTheme from './createTheme'
export default function ThemeProviderFactory(
BaseComponent: any,
renderChildren: Function,
statics?: Object
): any {
class ThemeProvider extends BaseComponent {
theme: Obje... | JavaScript | 0 | @@ -586,16 +586,68 @@
void %7B%0A
+ if (this.props.theme !== nextProps.theme) %7B%0A
th
@@ -675,24 +675,32 @@
rops.theme)%0A
+ %7D%0A
%7D%0A%0A s
|
66c5eb5679c2fe4a2e0da3fc91cf4f87431c29ee | update comment | handlers/levelHandler.js | handlers/levelHandler.js | /**
* @file levelHandler
* @author Sankarsan Kampa (a.k.a k3rn31p4nic)
* @license GPL-3.0
*/
const levelUpMessages = xrequire('./assets/levelUpMessages.json');
/**
* Handles user's experience points and levels
* @param {Message} message Discord.js message object
* @returns {void}
*/
module.exports = async mes... | JavaScript | 0.000003 | @@ -5455,17 +5455,27 @@
%0A /
-/
+**%0A *
HACK: W
@@ -5544,18 +5544,18 @@
,%0A
-//
+ *
a race
@@ -5624,18 +5624,18 @@
s%0A
-//
+ *
the cac
@@ -5690,18 +5690,18 @@
.%0A
-//
+ *
Therefo
@@ -5768,18 +5768,18 @@
w%0A
-//
+ *
roles t
@@ -5814,18 +5814,18 @@
.%0A
-//
... |
eb8f858f8b134019224cf03e308ded9a4b7d4308 | increase history buffer for slower and more contemplative imagery. it evokes a life of relaxation | app/assets/javascripts/real_audio.js | app/assets/javascripts/real_audio.js | var Anima = Anima || {};
var spectrumBuffer = (function() {
var xDivisions = 40;
var yDivisions = 25;
var strokeColor = [255,255,255];
var fillColor = [255,255,255];
var spectrumBuffer = new Array(xDivisions);
for (var i = 0; i < xDivisions; ++i) {
spectrumBuffer[i] = [];
for (var j = 0; j < yDivi... | JavaScript | 0 | @@ -1862,20 +1862,20 @@
w Array(
-1024
+4096
);%0A var
@@ -3054,24 +3054,26 @@
rigin - y);%0A
+//
proces
|
8ae9078ffa15e3c230df60897e47943b52770c59 | fix opt_extraInfoSpec and some vars declarations | background.js | background.js | var callback = function(details) {
details.requestHeaders.push( {name: 'My-Custom-Header', value: 'custom-value'} );
return {requestHeaders: details.requestHeaders};
};
var filter = {urls: ["https://urlwheremyheaderwillbeset.com"]};
var opt_extraInfoSpec = ["requestHeaders"];
chrome.webRequest.onBeforeSendHeader... | JavaScript | 0 | @@ -28,17 +28,32 @@
ails) %7B%0A
-
+%0A var headers =
details
@@ -67,16 +67,50 @@
tHeaders
+, blockingResponse = %7B%7D;%0A headers
.push( %7B
@@ -120,10 +120,9 @@
e: '
-My
+X
-Cus
@@ -142,16 +142,18 @@
value: '
+x-
custom-v
@@ -167,122 +167,117 @@
);%0A%0A
+%0A
-return %7BrequestHeaders: details.reque... |
ee332683e6493729be804acadf3e30b686137d4e | Add error message | ratelimiter/index.js | ratelimiter/index.js | var redis = require('redis'),
client = redis.createClient(),
async = require('async');
var RateLimiter = function(sourceName, globalDailyLimit, globalHourlyLimit, userDailyLimit, userHourlyLimit) {
// Initialize instance variables
this.sourceName = sourceName || "undefinedSource";
this.globalDailyLimit = globalD... | JavaScript | 0.000003 | @@ -530,17 +530,16 @@
VALUE;%0A%0A
-%0A
%09// Keep
@@ -3030,37 +3030,8 @@
ulti
-.setnx(globalDailyKey, 0)%0A%09%09%09
.inc
@@ -3040,32 +3040,32 @@
globalDailyKey)%0A
+
%09%09%09.ttl(globalDa
@@ -3205,38 +3205,8 @@
ulti
-.setnx(globalHourlyKey, 0)%0A%09%09%09
.inc
@@ -3379,35 +3379,8 @@
ulti
-.setnx(userDailyKe... |
130053cf05d0481127cc4aaeb7fcf75f84d9a0c5 | make textExtractor return text in same order as document | js/preload/textExtractor.js | js/preload/textExtractor.js | /* send bookmarks data. */
function isVisible (el) {
// https://github.com/jquery/jquery/blob/305f193aa57014dc7d8fa0739a3fefd47166cd44/src/css/hiddenVisibleSelectors.js
return el.offsetWidth || el.offsetHeight || (el.getClientRects && el.getClientRects().length)
}
function extractPageText (doc, win) {
var mayb... | JavaScript | 0.000005 | @@ -636,16 +636,17 @@
%0A while
+
(maybeNo
@@ -677,82 +677,8 @@
de =
- maybeNodes%5B0%5D%0A%0A // remove the node from the list of nodes to check%0A
may
@@ -1249,23 +1249,28 @@
i =
-0; i %3C cnl; i++
+cnl - 1; i %3E= 0; i--
) %7B%0A
@@ -1309,116 +1309,8 @@
%5Bi%5D%0A
- // text node%0A if (chi... |
f1f07bf629c69d72966ced9e03f5e3a0015e94d6 | remove test step in build | Gruntfile.js | Gruntfile.js | 'use strict';
var path = require('path');
module.exports = function(grunt) {
// Load grunt tasks automatically
require('jit-grunt')(grunt, {
express: 'grunt-express-server',
useminPrepare: 'grunt-usemin',
ngtemplates: 'grunt-angular-templates',
protractor: 'grunt-protractor-runner',
injector: ... | JavaScript | 0.000001 | @@ -2752,20 +2752,8 @@
, %5B%0A
- 'test',%0A
|
34268275b8728446d950d07bd0997d960f4215ac | use index of array instead of keys (#377) | packages/gdl-frontend/components/BookList/index.js | packages/gdl-frontend/components/BookList/index.js | // @flow
/**
* Part of GDL gdl-frontend.
* Copyright (C) 2017 GDL
*
* See LICENSE
*/
import React, { type Element } from 'react';
import { css } from '@emotion/core';
import styled from '@emotion/styled';
import { Trans } from '@lingui/react';
import { Typography, Button } from '@material-ui/core';
import View f... | JavaScript | 0 | @@ -2221,26 +2221,24 @@
y(5)
-.keys()
%5D.map(
+(_,
index
+)
=%3E
|
7349d3a25e792e1da25d11ca328be9c2405d18ef | change role to tag | config/platforms.js | config/platforms.js | module.exports = [
{
name: 'PlayStation',
role: 'PlayStation',
alias: [
'PS4',
'PS3',
'PS',
'PSN',
],
},
{
name: 'Xbox',
role: 'XBox',
alias: [
'xb',
'xbox',
'xb1',
'xbl',
'xbo',
],
},
];
| JavaScript | 0 | @@ -49,26 +49,16 @@
-role: 'PlayStation
+tag: 'PS
',%0A
@@ -162,19 +162,16 @@
-role
+tag
: 'XB
-ox
',%0A
|
16ba2e5ec8f51c52e9c6bb1a91c941ebdb1801e8 | add long-arrow-down icon | src/frontend/lite/src/main.js | src/frontend/lite/src/main.js | import Vue from "vue";
import App from "./App.vue";
import store from "./store";
import router from "./router";
import i18n from "./i18n";
import "./components";
import VueSlider from "vue-slider-component";
import "vue-slider-component/theme/antd.css";
Vue.component("VueSlider", VueSlider);
import ToggleButton from... | JavaScript | 0.998278 | @@ -837,16 +837,33 @@
faListUl
+, faLongArrowDown
%7D from
@@ -1178,32 +1178,51 @@
stUl,%0A faLock,%0A
+ faLongArrowDown,%0A
faSearchMinus,
|
7add032f2209659f89bd121300aa5deb46bd6903 | add comments | helpers/messageParser.js | helpers/messageParser.js | /**
* Used to check messages for conditions like being a command ot answer to keyboard
*/
let strings = require('./strings');
/**
* Checks if message is '/start' bot command
* @param {Telegram:Message} message Message to check
* @return {Boolean} true if '/start', false otherwise
*/
function botCommand... | JavaScript | 0 | @@ -797,16 +797,17 @@
alse;%0A%7D%0A
+%0A
/**%0A * C
@@ -1633,9 +1633,10 @@
ommand%0A%7D
+;
%0A
|
21dee31662ee02b5dd1b5e3b4369973b8bf9ca1f | Add app example | example/app.js | example/app.js | // This is a test harness for your module
// You should do something interesting in this harness
// to test out the module and to provide instructions
// to users on how to use it by example.
// open a single window
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var label = Ti.UI.createLabel();
win.add... | JavaScript | 0.000001 | @@ -1,224 +1,4 @@
-// This is a test harness for your module%0A// You should do something interesting in this harness %0A// to test out the module and to provide instructions %0A// to users on how to use it by example.%0A%0A%0A// open a single window%0A
var
@@ -24,17 +24,20 @@
indow(%7B%0A
-%09
+
backgrou
@@ -4... |
f488eda003153a34cd93984ebf985e29535946ce | add static 404.html | lib/builder/generator.js | lib/builder/generator.js | import fs from 'fs'
import { copy, remove, writeFile, mkdirp } from 'fs-extra'
import _ from 'lodash'
import { resolve, join, dirname, sep } from 'path'
import { minify } from 'html-minifier'
import Tapable from 'tappable'
import { isUrl, promisifyRoute, waitFor, flatRoutes } from 'utils'
import Debug from 'debug'
con... | JavaScript | 0.000002 | @@ -3873,24 +3873,110 @@
/index.html%0A
+ path = (path === '/404/index.html') ? '/404.html' : path // /404 -%3E /404.html%0A
debu
|
0dc4caa8dc187a54684c866491e5d1ed16c10670 | return all fields by default | index.js | index.js | 'use strict'
const ps = require('./lib/processlist')
const then = require('pify')
const es6snapshot = then(ps.snapshot)
const allowedFields = Object.freeze([
'name',
'pid',
'ppid',
'path',
'threads',
'owner',
'priority',
'cmdline'
])
const defaultFields = {
pid: true,
name: true,
path: true
}
... | JavaScript | 0.000001 | @@ -277,39 +277,120 @@
%7B%0A
-pid: true,%0A name: true,%0A path
+name: true,%0A pid: true,%0A ppid: true,%0A path: true,%0A threads: true,%0A owner: true,%0A priority: true,%0A cmdline
: tr
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.