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 |
|---|---|---|---|---|---|---|---|
9ad05436780d0d0a07aa44e7b56eeb5affc889cc | Fix delegate method | delegate.js | delegate.js | /**
* @module emmy/delegate
*/
//TODO: use jquery delegate, if possible
module.exports = delegate;
var on = require('./on');
var closest = typeof document !== 'undefined' ? require('query-relative/closest') : null;
var isFn = require('mutype/is-fn');
var contains = require('contains');
/**
* Bind listener to a ... | JavaScript | 0.000033 | @@ -1037,16 +1037,22 @@
selector
+, true
);%0A%0A%09%09if
|
c958dbac5f3ffb4349e608e5dfdfc9893da60e54 | support for querying Overpass API in SSL env | src/QueryOverpass.es6 | src/QueryOverpass.es6 | import osmtogeojson from 'osmtogeojson';
import request from 'request';
export function query_overpass(query, cb, options) {
options = options || {};
request.post({
uri: options.overpassUrl || 'http://overpass-api.de/api/interpreter',
withCredentials: false
}, function (error, response, body) {... | JavaScript | 0 | @@ -156,56 +156,168 @@
-request.post(%7B%0A uri: options.overpass
+var defaultUrl;%0A if(window.location.protocol === 'https:') %7B%0A defaultUrl = 'https://overpass-api.de:443/api/interpreter'%0A %7D else %7B%0A default
Url
-%7C%7C
+=
'ht
@@ -336,16 +336,19 @@
s-api.de
+:80
/api/int
@@... |
51c806b9c1e41bbfa7a8b5c1687dfa37b689d10c | Fix broken route | app/routes/authentication/register/components/register-form-container/register-form-container-controller.js | app/routes/authentication/register/components/register-form-container/register-form-container-controller.js | // ==============================================================================
//
// app/routes/authentication/register/components/register-form-container/
// register-form-container-controller.js
//
// ==============================================================================
/**
* ApRegisterFormContainerCo... | JavaScript | 0.000485 | @@ -1805,16 +1805,21 @@
on.login
+.form
', %7B reg
|
2c31123d810dd5583eb7e89d6b6b35167fd28489 | Use `sidePages` in the demo | demo/app.js | demo/app.js | 'use strict';
require('highlight.js/styles/github.css');
require('react-ghfork/gh-fork-ribbon.ie.css');
require('react-ghfork/gh-fork-ribbon.css');
require('./demo.css');
require('../style.css');
var React = require('react');
var Fork = require('react-ghfork');
var range = require('lodash/utility/range');
var cumberb... | JavaScript | 0 | @@ -1977,32 +1977,66 @@
endPages=%7B1%7D%0A
+ sidePages=%7B2%7D%0A
|
0e35c998066ac845688bfb32e0cab65410553316 | Update app.js | demo/app.js | demo/app.js | var https = require('https');
var express = require('express');
var app = express();
var expressWs = require('express-ws')(app);
var pty = require('node-pty');
var cors = require('cors');
app.use(cors());
app.options('*', cors());
var cwds = {};
var cmd = require('node-cmd');
/*
######################################... | JavaScript | 0.000002 | @@ -3459,31 +3459,130 @@
-process.kill(term.pid);
+try %7B%0A process.kill(term.pid);%0A %7D catch (err) %7B%0A %7D%0A
%0A
|
a7c709c54a750c73be43756cdcf41f4ddcb002dc | translator.js | src/scripts/translator.js | src/scripts/translator.js | // translator.js
// jshint esversion: 6
class Translator
{
constructor()
{
this._regex = /__MSG_([^_]+)__/;
this._attrs = ['title']; // HTML attrs to translate.
this._replaceAll();
}
_replaceAll()
{
var els = document.body.querySelectorAll('*');
for (var i = 0; i < els.length; i++) {
... | JavaScript | 0.999915 | @@ -184,40 +184,46 @@
is._
-replaceAll();%0A %7D%0A%0A _replaceAll
+translatePage();%0A %7D%0A%0A _translatePage
()%0A
@@ -335,88 +335,130 @@
is._
-replaceAttrs(els%5Bi%5D);%0A this._replaceText(els%5Bi%5D);%0A %7D%0A %7D%0A%0A _replaceAttr
+translateElementAttributes(els%5Bi%5D);%0A this._transl... |
ba94c96d9ae12041dbb860f6d8d68843d8fb2820 | Add learning activities constants | kolibri/core/assets/src/constants.js | kolibri/core/assets/src/constants.js | export const UserKinds = {
ADMIN: 'admin',
COACH: 'coach',
LEARNER: 'learner',
SUPERUSER: 'superuser',
ANONYMOUS: 'anonymous',
ASSIGNABLE_COACH: 'classroom assignable coach',
CAN_MANAGE_CONTENT: 'can manage content',
};
export const CollectionKinds = {
CLASSROOM: 'classroom',
LEARNERGROUP: 'learnergr... | JavaScript | 0.000001 | @@ -680,16 +680,219 @@
w',%0A%7D;%0A%0A
+export const LearningActivityKinds = %7B%0A CREATE: 'CREATE',%0A LISTEN: 'LISTEN',%0A REFLECT: 'REFLECT',%0A PRACTICE: 'PRACTICE',%0A READ: 'READ',%0A WATCH: 'WATCH',%0A EXPLORE: 'EXPLORE',%0A TOPIC: 'TOPIC',%0A%7D;%0A%0A
// used
|
42fec2ce001495873fab9030457f267da392a624 | Disable billion laughs attack | test/api/fileUploadSpec.js | test/api/fileUploadSpec.js | const frisby = require('frisby')
const fs = require('fs')
const path = require('path')
const FormData = require('form-data')
const URL = 'http://localhost:3000'
describe('/file-upload', () => {
let file
let form
it('POST file valid PDF for client and API', done => {
file = path.resolve(__dirname, '../files... | JavaScript | 0 | @@ -2661,32 +2661,33 @@
e(done)%0A %7D)%0A%0A
+x
it('POST file ty
@@ -2743,32 +2743,115 @@
rser', done =%3E %7B
+ // FIXME Causes %22Segmentation Fault%22 on Windows and Travis-CI with libxmljs 0.18.7
%0A file = path
|
77ff5bd6c60cfc20897a02cf683c8054860493bd | Clean up the initial view if there is a song. | modules/main.js | modules/main.js | window.chords = ( typeof window.chords !== 'undefined' ) ? window.chords : {};
define( "jquery", [], function()
{
return jQuery;
} );
require( [ "jquery", "functions", "plugins", "save", "plugins/title", "plugins/chords" ], function( $, functions,
thePlugins, save )
{
$( function()
{
$.ajaxSetup( {
... | JavaScript | 0.000004 | @@ -1712,32 +1712,62 @@
ss( 'active' );%0A
+ hideOrShow( %22show%22 );%0A
%7D%0A el
@@ -1873,25 +1873,372 @@
e' );%0A
-%7D
+ hideOrShow( %22hide%22 );%0A %7D%0A %7D%0A%0A function hideOrShow( action )%0A %7B%0A $( '#items input' ).each( function()%0A %7B%0A var... |
946713c3857bd381922cea62c1c5e79ff9ac2335 | Change prefix of uploaded images from 'tmp-' to 'event-' | controllers/event/create-event.js | controllers/event/create-event.js | 'use strict';
var path = require('path');
var fs = require('fs-extra');
var _ = require('underscore');
var config = require('../../config/app-config');
var UPLOAD_DIR = config.UPLOAD_DIR;
var EVENT_IMG_DIR = config.EVENT_IMG_DIR;
var async = require('async');
var Event = require('../../models/Event');
var Image = requ... | JavaScript | 0 | @@ -2303,16 +2303,34 @@
destDir,
+ prefix: 'event-',
postfix
@@ -2356,10 +2356,28 @@
ath)
-%7D
,
+ tries: 100%7D,%0A
fun
|
dce7804ac0615fb9c8a9c31cf65c96bee703bdd5 | Streamline syntax construction. | client-vendor/after-body/jquery.contentPlaceholder/jquery.contentPlaceholder.js | client-vendor/after-body/jquery.contentPlaceholder/jquery.contentPlaceholder.js | /*
* Author: CM
*/
(function($) {
/**
* @param {Object} [lazyLoadOptions] options to lazy-load-images plugin.
* @returns {jQuery}
*/
$.fn.contentPlaceholder = function(lazyLoadOptions) {
return this.each(function() {
var options = _.defaults(lazyLoadOptions ? lazyLoadOptions : {}, {
t... | JavaScript | 0.000001 | @@ -282,27 +282,10 @@
ons
-? lazyLoadOptions :
+%7C%7C
%7B%7D,
|
1f34969f216a7333a27fbd48b97293f3a22d0ec1 | Support any callable object as callback | lib/Object/map-to-array.js | lib/Object/map-to-array.js | 'use strict';
var callable = require('./valid-callable')
, forEach = require('./for-each')
, defaultCb = function (value, key) { return [key, value]; };
module.exports = function (obj, cb/*, thisArg*/) {
var a = [], thisArg = arguments[2];
cb = (cb == null) ? defaultCb : callable(cb);
forEach(obj, function ... | JavaScript | 0.000001 | @@ -89,16 +89,52 @@
each')%0A%0A
+ , call = Function.prototype.call%0A%0A
, defa
@@ -378,15 +378,21 @@
sh(c
-b
+all
.call(
+cb,
this
|
f943bb675e900a65f86993a7f2360e95711c7044 | Test fix | spec/guitar.js | spec/guitar.js | var Guitar = require('../src/guitar.js');
var chai = require('chai');
chai.should();
var guitar = new Guitar();
describe('Guitar public interface', function() {
describe('#constructor()', function () {
it('Should return default guitar', function () {
var guitar = new Guitar();
guit... | JavaScript | 0.000001 | @@ -1622,21 +1622,28 @@
+'fret-
signs
+'
: %7B%0A
|
1c3c64c12ce25de1cc35350ed38f59089c87e795 | add modulesDuplicateDeclarations message | src/babel/messages.js | src/babel/messages.js | import * as util from "util";
export const MESSAGES = {
tailCallReassignmentDeopt: "Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",
JSXNamespacedTags: "Namespace tags are not supported. ReactJSX is not XML.",
classesIllegalBareSuper: "Illegal u... | JavaScript | 0 | @@ -1004,57 +1004,8 @@
y%22,%0A
- modulesIllegalExportName: %22Illegal export $1%22,%0A
un
@@ -1588,16 +1588,176 @@
ated%22,%0A%0A
+ modulesIllegalExportName: %22Illegal export $1%22,%0A modulesDuplicateDeclarations: %22Duplicate module declarations with the same source but in different scopes%22,%0A%0A
unde... |
7b576a71cdda5ed06558910ab25063a0ce9bfc1e | Use strict | dist/leaflet.geometryutil.js | dist/leaflet.geometryutil.js | /**
* @fileOverview Leaflet Geometry utilities for distances and linear referencing.
* @name L.GeometryUtil
*/
var L = L || exports;
L.GeometryUtil = {
/** Default snapping distance in pixels */
SNAP_DISTANCE: 15,
/**
Shortcut function for planar distance between two {L.LatLng} at current zoo... | JavaScript | 0.000083 | @@ -1,12 +1,27 @@
+%22use strict%22;%0A%0A
/**%0A * @file
|
4b4702eccfc8c8826e8110ae190ca6e7c67ecba2 | Fix test | test/components/AppTest.js | test/components/AppTest.js | const assert = require('assert')
const React = require('react')
const ReactDOM = require('react-dom')
const ReactRedux = require('react-redux')
const Redux = require('redux')
const TestUtils = require('react-addons-test-utils')
const fetchMock = require('fetch-mock')
const App = require('../../src/components/App')
con... | JavaScript | 0.000004 | @@ -2530,21 +2530,20 @@
query: '
-query
+cats
', selec
@@ -2719,24 +2719,69 @@
s().matched%0A
+ assert.equal(2, fetchedCalls.length)%0A
asse
|
df66e5b92b6036c045a308b9f7b53e590f04582f | Fix some inefficiencies in visual feedback | data/pagemod.js | data/pagemod.js | //
// In-page script of the Scrolling Gestures Add-on.
// Copyright (C) 2013 nandhp <nandhp@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/.
//
var fram... | JavaScript | 0.998241 | @@ -2703,16 +2703,32 @@
try %7B
+%0A
doc.bod
@@ -2750,52 +2750,111 @@
tem)
- %7D%0A catch (e) %7B /* Avoid
+;%0A inserted = true;%0A %7D%0A catch (e) %7B%0A /* Do not
spam
-ming
the
@@ -2868,10 +2868,41 @@
log
-*/
+if it doesn't ... |
93271968c6361062bd605c9403c1b853e02abb11 | support urac driver revamp | mw/mt/urac.js | mw/mt/urac.js | "use strict";
const uracDriver = require('soajs.urac.driver');
function Urac(param) {
let _self = this;
_self.soajs = param.soajs;
_self.userRecord = null;
_self.id = null;
if (param.oauth && 0 === param.oauth.type)
_self.userRecord = param.oauth.bearerToken;
else {
// if type... | JavaScript | 0 | @@ -1454,32 +1454,106 @@
;%0A %7D%0A
+ if (err && err.msg)%0A err = new Error(err.msg);%0A
cb(e
|
f28118fe786bf4fea5b899ff27e185df532e884d | Add Consectutive String Description solution | StringManipulation/ConsecutiveString/consecutivestring.js | StringManipulation/ConsecutiveString/consecutivestring.js | var ConsecutiveString = function(){};
/*validate k and length of the array. If the array length is 0 of less than k of k is less thatn or equal to 0
return an empty string.
if k is 1, then return the longest string.
else, loop through the string, */
ConsecutiveString.prototype.longestConsec = function(starr, k){
var... | JavaScript | 0.000001 | @@ -542,206 +542,165 @@
-for(var x = 0; x %3C= k; x++)%7B%0A var f3
+let lens
= st
+r
arr
-%5Bx%5D + starr%5Bx+1%5D + starr%5Bx+2%5D;%0A var n3 = starr%5Bx+1%5D + starr%5Bx+2%5D + starr%5Bx+3%5D;%0A if(n3.length %3E f3.length)%7B%0A
+.map( (_,i,arr) =%3E arr.slice(i,i+k).join('').length )... |
33e4cbda004aa4e453fab689efb47af2c17422e9 | Fix zero-based month number bug | heckle.js | heckle.js | var fs = require("fs");
var rmrf = require("rimraf");
var yaml = require("js-yaml");
var marked = require("marked");
var Mold = require("./mold");
var util = require("./util");
function hasFrontMatter(file) {
var fd = fs.openSync(file, "r");
var b = new Buffer(4);
var ret = fs.readSync(fd, b, 0, 4, 0) == 4 && b.... | JavaScript | 0 | @@ -925,16 +925,20 @@
1%5D, d%5B2%5D
+ - 1
, d%5B3%5D);
|
4007b28ecd4adc179b239f732f9624e90b6f830f | implement doublespeak for dictionary | doublespeak.js | doublespeak.js | document.body.innerHTML = document.body.innerHTML.replace(
new RegExp("extrajudicial", "g"), "illegal"
); | JavaScript | 0.000005 | @@ -1,53 +1,340 @@
-document.body.innerHTML = document.body.innerHTML
+var dictionary = %7B%0A%09%22extrajudicial%22: %22illegal%22,%0A%7D%0A%0AString.prototype.titleize = function() %7B%0A return this.charAt(0).toUpperCase() + this.slice(1);%0A%7D%0A%0Afunction replaceDoubleSpeak(dictionary, content)%7B%0A%0A%09var p... |
434e9a10b0776c9b90dac1a639d7174eb9452070 | update developerMode for new action style | test/core/developerMode.js | test/core/developerMode.js | 'use strict'
const chai = require('chai')
const dirtyChai = require('dirty-chai')
const expect = chai.expect
chai.use(dirtyChai)
const fs = require('fs')
const path = require('path')
const ActionHero = require(path.join(__dirname, '/../../index.js'))
const actionhero = new ActionHero.Process()
let api
require = requ... | JavaScript | 0 | @@ -506,62 +506,255 @@
+= '
-exports.randomNumber = %7B'%0AnewFileContent += ' name: %22
+const ActionHero = require(%5C'./../index.js%5C')%5Cn'%0AnewFileContent += 'module.exports = class RandomNumber extends ActionHero.Action %7B%5Cn'%0AnewFileContent += ' constructor () %7B%5Cn'%0AnewFileContent += ' super()%5... |
5e7e1fea09fbd0a63ca405f64b6197cb0ff12a1d | Update JS demo | demos/js.js | demos/js.js | class Banana {
constructor(goodOrNah) {
this.quality = goodOrNah;
}
eat() {
// omnomomnomom
const om = 'om\nnom';
}
static peelTime(length) {
const magicNumber = 123;
return length * magicNumber;
}
}
const banana = new Banana(10);
banana.eat();
console.log(Banana.peelTime(100));
cons... | JavaScript | 0 | @@ -1,20 +1,19 @@
class
-Banana
+Class
%7B%0A con
@@ -25,381 +25,464 @@
tor(
-goodOrNah
) %7B
+%7D
%0A
- this.quality = goodOrNah;%0A %7D%0A%0A eat() %7B%0A // omnomomnomom%0A
+static staticMethod() %7B%0A this.something;%0A %7D%0A%7D%0A
const
-om = 'om%5Cnnom';%0A %7D%0A%0A static peelTime(... |
917acbd297af179ff9bf1d14998697eda8f305bc | Fix menu position | src/component/Menu.js | src/component/Menu.js | (() => {
"use strict";
var doc = document.currentScript.ownerDocument;
class MenuItem {
constructor(item) {
this._el = document.createElement("li");
this._type = item.type;
if (this._type === "separator")
this._el.classList.add("separator");
else {
this._el.classList... | JavaScript | 0.000008 | @@ -3215,37 +3215,8 @@
) %7B%0A
- var left = x, top = y;%0A
@@ -3254,19 +3254,47 @@
s);%0A
+%0A
-const
+var left = x, top = y;%0A var
rec
@@ -3329,24 +3329,25 @@
ientRect();%0A
+%0A
if (wi
@@ -3412,58 +3412,8 @@
th;%0A
- if (window.innerHeight %3C y + rect.height)%0A
@@... |
a5e665f609eef5426ddf1b8962df85eca7ded290 | Update script instructions. | js/chat.js | js/chat.js | /*
* A chat server. Client codes can be found in ../resources/chat-client
* To run server, execute node chat.js
* To run client, open up ../resources/chat-client/client.html from browser
*/
var DEFAULT_USERNAME = 'Guest';
var express = require('express');
var app = express();
var server = require('http').createServ... | JavaScript | 0 | @@ -129,15 +129,19 @@
nt,
-open up
+navigate to
../
|
c626650d7aa2a53a49262d132ede5a710b8fdba3 | Update currency.js | currency.js | currency.js | 'use strict';
define(['app'], function (app) {
app.register.directive('currency', function () {
String.prototype.splice = function (idx, rem, s) {
return (this.slice(0, idx) + s + this.slice(idx + Math.abs(rem)));
};
function isEmpty(value) {
return angula... | JavaScript | 0 | @@ -3364,14 +3364,12 @@
-if (e.
+var
char
@@ -3377,112 +3377,115 @@
ode
-!== 0 && String.fromCharCode(e.charCode).match(/%5B%5E%5Cd.%5D/g)) %7B%0A e.preventDefault();
+= (typeof e.which == %22number%22) ? e.which : e.keyCode,%0A currentValue = $(this).val(),
%0A ... |
d67b7c7f49650460a639d0c01bbd4c81c749c5d4 | Fix jsdocs | react/features/conference/components/Conference.native.js | react/features/conference/components/Conference.native.js | import React, { Component } from 'react';
import { connect as reactReduxConnect } from 'react-redux';
import { connect, disconnect } from '../../base/connection';
import { Container } from '../../base/react';
import { FilmStrip } from '../../filmStrip';
import { LargeVideo } from '../../largeVideo';
import { RoomLockP... | JavaScript | 0 | @@ -2169,17 +2169,17 @@
@inherit
-D
+d
oc%0A
@@ -5534,16 +5534,17 @@
visible
+.
%0A *
|
5839c027183eb4989428c18ce89595f4b194ccbb | remove getInfo logging | providers/client_socket.js | providers/client_socket.js | try {
var socketTransportService = Components.classes["@mozilla.org/network/socket-transport-service;1"]
.getService(Components.interfaces.nsISocketTransportService);
var mainThread = Components.classes["@mozilla.org/thread-manager;1"]
.getService(Components.interfaces.nsIThreadManager).mainThread;
... | JavaScript | 0.000001 | @@ -946,40 +946,8 @@
) %7B%0A
- console.log(%22ONINPUTSTREAM%22);%0A
if
@@ -1072,310 +1072,66 @@
-console.log(%22TRYING BYTES%22);%0A console.log(binaryReader);%0A console.log(this.socket);%0A console.dir(this.socket);%0A bytesAvailable = binaryReader.available();%0A %7D catch (e) %7B%0A cons... |
37bcf7cd0456b1d2fc9e2bff683ec4bec5fd2775 | Ensure month filter values are integers | custom/icds_reports/static/js/directives/month-filter/month-filter.directive.js | custom/icds_reports/static/js/directives/month-filter/month-filter.directive.js | /* global moment, _ */
function MonthModalController($location, $uibModalInstance) {
var vm = this;
vm.months = [];
vm.years = [];
vm.monthsCopy = [];
window.angular.forEach(moment.months(), function(key, value) {
vm.monthsCopy.push({
name: key,
id: value + 1,
... | JavaScript | 0.999109 | @@ -547,32 +547,41 @@
%5D !== void(0) ?
+parseInt(
$location.search
@@ -591,16 +591,17 @@
'month'%5D
+)
: new D
@@ -685,16 +685,25 @@
id(0) ?
+parseInt(
$locatio
@@ -720,16 +720,17 @@
%5B'year'%5D
+)
: new D
|
3cb3db04ec04e21d6fe7bc6492a94b140218befb | fix rest/taskrouter/jwts/workspace/example-1 | rest/taskrouter/jwts/workspace/example-1/example-1.3.x.js | rest/taskrouter/jwts/workspace/example-1/example-1.3.x.js | // Download the Node helper library from twilio.com/docs/node/install
// These consts are your accountSid and authToken from https://www.twilio.com/console
const twilio = require('twilio');
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const workspaceSid = 'WSXXXXXXXXXXX... | JavaScript | 0 | @@ -629,21 +629,19 @@
ces();%0A%0A
-const
+var
token =
|
0a0c723ac7120c8fd482c7f0de9b5c5e8ecf68d7 | Fix plus sign replacement | js/game.js | js/game.js | class Dice extends React.Component {
constructor() {
super();
this.state = {
words: this.parseInput(this.getParams(location.search)['var']),
div: document.createElement("div")
};
this.handleSubmit = this.handleSubmit.bind(this);
this.parseInput = this.parseInput.bind(this);
this.get... | JavaScript | 0 | @@ -686,11 +686,13 @@
ace(
-'+'
+/%5C+/g
,' '
|
c80fc9045f6b85c8b7baa9a0517d34c3387b0992 | Remove superfluous console.log | src/static/js/baseball.js | src/static/js/baseball.js | /**
* Show the schedule for today's baseball gam
**/
$(function(){
getGiantsGame();
});
function getGiantsGame(){
$.get('/giants_schedule', function(data) {
var html = formatGame(data);
$("#giants").html(html);
}, 'json');
setTimeout(getGiantsGame, 60 * 60 * 1000);
};
function formatGame(data){
... | JavaScript | 0.000412 | @@ -474,29 +474,8 @@
%7D%0A
- console.log(html);%0A
re
|
77aa64e0d15a2964379cfc106f696df59b670c01 | Update with notification settings | lib/config/env.js | lib/config/env.js | /**
* Module dependencies.
*/
var env = process.env;
function on(variable) {
return variable ? JSON.parse(variable) : undefined;
}
/**
* Expose heroku helper
*/
module.exports = {
protocol: env.PROTOCOL,
host: env.HOST,
publicPort: env.PUBLIC_PORT,
privatePort: env.PORT,
mongoUrl: env.MONGOHQ_URL,
... | JavaScript | 0 | @@ -1310,16 +1310,149 @@
AVICON,%0A
+ notifications: %7B%0A %22host%22: env.NOTIFICATIONS_HOST,%0A %22port%22: env.NOTIFICATIONS_PORT,%0A %22token%22: env.NOTIFICATIONS_TOKEN%0A %7D,%0A
%22organ
|
c2bf43992b664415187fe00f7d8303e77fbcae8f | Remove console.log | unify/framework/source/class/unify/fx/MWidgetAnimation.js | unify/framework/source/class/unify/fx/MWidgetAnimation.js | /*
===============================================================================================
Unify Project
Homepage: unify-project.org
License: MIT + Apache (V2)
Copyright: 2011 - 2012 Sebastian Fastner, Mainz, Germany, http://unify-training.com
============================================================... | JavaScript | 0.000004 | @@ -2702,74 +2702,8 @@
e%5D;%0A
- console.log(%22Animation %22, animationName, value, animation);%0A
|
baf3d68e6f9b3dd76fccbc43cb01005e42eb5df1 | Fix varint() for several bytes values | dataType.js | dataType.js | function Data(buffer,offset){
this.data = new DataView(buffer);
this.offset = offset;
this.getUint8 = function(){
return this.data.getUint8(this.offset++);
};
//these two functions are ported fairly directly from
//http://trac.osgeo.org/gdal/attachment/wiki/FGDBSpecification/dump_gdbtable.py#L60
this.varuint =... | JavaScript | 0 | @@ -778,20 +778,19 @@
rn ret*s
-hift
+ign
;%0A%09%7D;%0A%09t
@@ -1291,8 +1291,9 @@
= Data;
+%0A
|
3004978f755f0e595f72226f296fa2bb3fa9cb78 | make both tests fail for fetch(url) with message: TypeError: Cannot read property 'then' of undefined | web/app/components/products/products.controller.server.spec.js | web/app/components/products/products.controller.server.spec.js | /*eslint dot-notation: "off"*/
/*eslint no-shadow: "off"*/
import {replace, when, reset} from '../../../../test-helper';
describe.only('the products controller', () => {
let productsService;
let ProductsController;
let productsController;
let makeProductsControllerWith = (productsService) => {
ProductsCo... | JavaScript | 0.000086 | @@ -608,16 +608,32 @@
e.fetch(
+'/products.json'
)).thenR
|
cc1a96c9e08fec65150caf8c1eaadd65a1264a14 | Fix use of correct viewmanager for getting views from id | unify/framework/source/class/unify/view/PopOverManager.js | unify/framework/source/class/unify/view/PopOverManager.js | /* ***********************************************************************************************
Unify Project
Homepage: unify-project.org
License: MIT + Apache (V2)
Copyright: 2009-2011 Deutsche Telekom AG, Germany, http://telekom.com
***************************************************************... | JavaScript | 0 | @@ -5929,16 +5929,23 @@
fy.view.
+widget.
ViewMana
|
ec73f232c0db376a1611d22dc6768d6409468afd | Use "mqtt" as WS protocol unless using v3 | lib/connect/ws.js | lib/connect/ws.js | 'use strict';
var websocket = require('websocket-stream'),
_URL = require('url'),
wssProperties = [
'rejectUnauthorized',
'ca',
'cert',
'key',
'pfx',
'passphrase'
];
function buildBuilder (client, opts) {
var wsOpt = {
protocol: 'mqttv3.1'
},
host = opts.hostname || 'loca... | JavaScript | 0 | @@ -267,20 +267,16 @@
l: 'mqtt
-v3.1
'%0A %7D,
@@ -437,24 +437,134 @@
port + path;
+%0A %0A if(('MQIsdp' === opts.protocolId) && (3 === opts.protocolVersion)) %7B%0A wsOpt.protocol= 'mqttv3.1';%0A %7D
%0A%0A if ('wss
|
669de131017ddd78b62d68a5324a3b63f6060d19 | Add test for server stopping during connection | test/integration/socket.js | test/integration/socket.js | 'use strict';
var Client = require('../../index')
, helper = require('../helper')
, ltx = require('node-xmpp-core').ltx
require('should')
/* jshint -W030 */
describe('Socket connections', function() {
var jid = Math.random().toString(36).substring(7) + '@localhost'
var password = 'password'
var clie... | JavaScript | 0 | @@ -5507,12 +5507,354 @@
)%0A %7D)
+%0A %0A it('Errors when the server is stopped', function(done) %7B%0A client = new Client(%7B%0A jid: jid,%0A password: password,%0A host: 'localhost'%0A %7D)%0A client.on('end', function() %7B%0A console.log(... |
fa2907b23a1a574f2e110be94734ff8cc724d84c | Remove vestigal code, improve comments | lib/angular-placeholder.js | lib/angular-placeholder.js | /*
* angular-shims-placeholder
* https://github.com/jrief/angular-shims-placeholder
*
* Add Angular directives which emulates attribute ´placeholder´ in input fields
* of type text for browsers not supporting this, ie. IE8 and below.
*
* Copyright (c) 2013 Jacob Rief
* Licensed under the MIT license.
*/
(func... | JavaScript | 0 | @@ -219,17 +219,17 @@
, ie. IE
-8
+9
and bel
@@ -1279,69 +1279,62 @@
%09%09%09%09
-%09elem.removeClass('error');%0A%09%09%09%09%7D%0A%09%09%09%7D);%0A%0A%09%09%09// view -%3E model
+%7D%0A%09%09%09%7D);%0A%0A%09%09%09// on blur, show placeholder if necessary
%0A%09%09%09
@@ -1806,16 +1806,19 @@
%09%09%09// IE
+8/... |
a4d85bb42cf25879f154fba5b647778f503984a4 | Remove extra option to absoluteUrl | docs/client/lib/navigate.js | docs/client/lib/navigate.js | navigate = function (hash) {
window.location.replace(Meteor.absoluteUrl(null, { secure: true }) + hash);
};
| JavaScript | 0 | @@ -71,30 +71,8 @@
Url(
-null, %7B secure: true %7D
) +
|
195e0ee0ccc19ebe784309f181f1bb2d56e33846 | Update module.js | new/module.js | new/module.js | var mod = {
modules: [],
controllers: [],
elements: []
}
mod.submodule = function(module, args) {
var controller = function(args) {
return (module.controller || function() {}).apply(this, args)
}.bind({}, args)
var view = function(ctrl) {
if (arguments.length > 1) args = args.concat([]... | JavaScript | 0.000002 | @@ -1,12 +1,37 @@
+mag = (function(mag) %7B%0A%0A
var mod = %7B
@@ -31,16 +31,17 @@
mod = %7B%0A
+
modul
@@ -47,24 +47,25 @@
les: %5B%5D,%0A
+
controllers:
@@ -69,16 +69,17 @@
rs: %5B%5D,%0A
+
eleme
@@ -86,20 +86,22 @@
nts: %5B%5D%0A
+
%7D%0A%0A
+
mod.sub
@@ -134,24 +134,25 @@
args) %7B%0A%... |
37619624c464c5c9f80734e1a36f3cb29930c563 | add keys to data for styling history | database.js | database.js | 'use strict';
var sqlite = require('sqlite3'),
async = require('async');
var config = require('./config.json');
var db = new sqlite.Database('servercooties.sql'),
notify = [],
pages = {};
db.serialize(function () {
db.run('CREATE TABLE IF NOT EXISTS pages (' +
' key VARCHAR(255) NOT NULL' +
... | JavaScript | 0 | @@ -4638,16 +4638,76 @@
%7C%7C %5B%5D;%0A
+ var score = average(%5Ba.status, a.responseTime/10%5D);%0A
@@ -4801,24 +4801,117 @@
sponseTime,%0A
+ responseScore: score,%0A response: getFlavor(score, config.statusCode),%0A
@@ -5046,32 +5046,39 @@
ap(function (key
+,... |
0d3e3737d14bad49a8e04152abc4312e0ee93aa0 | fix track pageview in order to display correct page in hubspot backend | lib/angulartics-hubspot.js | lib/angulartics-hubspot.js | (function (angular) {
'use strict';
/**
* @ngdoc overview
* @name angulartics-hubspot
* Enables analytics support for Hubspot (http://www.hubspot.com)
*/
angular.module('angulartics.hubspot', ['angulartics'])
.config(['$analyticsProvider', function ($analyticsProvider) {
// Don't sen... | JavaScript | 0.000001 | @@ -584,22 +584,22 @@
h(%5B'
-setPath', path
+trackPageView'
%5D);%0A
@@ -616,38 +616,38 @@
_hsq.push(%5B'
-trackPageView'
+setPath', path
%5D);%0A
|
3d1f6a28ce75c1d6199ec425531a217407b3ef5c | Update game.js | js/game.js | js/game.js | var Game = {};
var light = false;
var timerset = false;
var timersetflash = false;
var fading = false;
var currContext = "#1F3D5C";
Game.fps = 50;
Game.initialize = function() {
this.entities = [];
this.context = document.getElementById("viewport").getContext("2d");
};
Game.draw = function() {
this.conte... | JavaScript | 0.000001 | @@ -1253,24 +1253,145 @@
30);%0A %7D%0A %0A
+ var lightTime = Math.floor(Math.random() * (7000 - 3000 + 1)) + 3000; // random amount of time between 3 and 7 seconds%0A
if(light =
@@ -1562,12 +1562,17 @@
%7D,
-5000
+lightTime
);%0A
|
ca7b5fc6810cff8e0b07878b4ab348fc96009f81 | Fix spelling of "IndicatorSeparator" | docs/pages/props/index.js | docs/pages/props/index.js | // @flow
import React, { Fragment } from 'react';
import { Helmet } from 'react-helmet';
import md from '../../markdown/renderer';
import PrettyProps, { Prop } from 'pretty-proptypes';
const Props = props => (
<PrettyProps
heading=""
components={{
Button: ({ isCollapsed, ...rest }) => (
<button... | JavaScript | 0.998858 | @@ -4437,33 +4437,32 @@
### Indicator
-s
Separator%0A%0A $
|
475e23b2d5f60e1de93efe0da654b682f5a2ad09 | remove the temporary files when calling python modules | server/meteorMethods.js | server/meteorMethods.js | var exec = Npm.require('child_process').exec;
var Fiber = Npm.require('fibers');
var Future = Npm.require('fibers/future');
var fs = Npm.require('fs');
var os = Npm.require('os');
var crypto = Npm.require('crypto');
var path = Npm.require('path');
// TODO these dirs may need to be different with built meteor
// There ... | JavaScript | 0.000001 | @@ -2968,24 +2968,69 @@
= 'Info') %7B%0A
+ fs.unlinkSync(parmFile);%0A
@@ -3578,42 +3578,167 @@
-future.return(readFromFile(result)
+var data = readFromFile(result);%0A fs.unlinkSync(parmFile);%0A fs.unlinkSync(result);%0A ... |
a23af02329421e2f29c4e9fb284d16d683e6ead7 | fix #1850 wording and paragraph for improved form documentation | docs/src/sections/FormSection.js | docs/src/sections/FormSection.js | import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
import ReactPlayground from '../ReactPlayground';
import Samples from '../Samples';
export default function FormSection() {
return (
<div className="bs-docs-section">
<h1 className="page-header">
<Anch... | JavaScript | 0 | @@ -416,16 +416,25 @@
%3Cp%3E
+%0A
The %3Ccod
@@ -516,16 +516,24 @@
styling.
+%0A
The %3Cco
@@ -818,37 +818,62 @@
bel.
- To retrieve the DOM node for
+%0A %3C/p%3E%0A %3Cp%3E%0A If you need the value of
a %3C
@@ -903,19 +903,22 @@
/code%3E,
-set
+attach
a %3Ccode
@@ -929... |
fe0d1ba2d55121a69791896e0f9fec3aa70f7c3c | Add new font to JS | public/javascript/fonts.js | public/javascript/fonts.js | WebFontConfig = {
custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'Stub Serif FS', 'Stub Serif FS'],
urls: [ 'http://f.fontdeck.com/s/css/tEGvGvL6JlBfPjTgf2p9URd+sJ0/' + window.location.hostname + '/5502.css' ] }
};
(function() {
var wf = docume... | JavaScript | 0.000001 | @@ -161,16 +161,37 @@
erif FS'
+, 'Reminder Pro Bold'
%5D,%0A url
|
bb1e953905d1ea3104bd78fec279ac26e7ff34a8 | Remove unnecessary semicolon | src/syncedgetputdelete.js | src/syncedgetputdelete.js | const log = require('./log');
function shareFirst(path) {
return ( this.backend === 'dropbox' &&
path.match(/^\/public\/.*[^\/]$/) );
}
function maxAgeInvalid(maxAge) {
return maxAge !== false && typeof(maxAge) !== 'number';
};
var SyncedGetPutDelete = {
get: function (path, maxAge) {
if (this.l... | JavaScript | 0.999984 | @@ -236,17 +236,16 @@
mber';%0A%7D
-;
%0A%0Avar Sy
|
afd3113f394596e181325970f2c5b921d35737a3 | drop to plain JS for the container write to avoid intermittently crashing jQuery | public/javascripts/ajax.js | public/javascripts/ajax.js | var AjaxClass = function() {
var self = this;
self.default_container = undefined;
self.loaded_by_framework = false;
self.loading_icon = $('#loading-icon-small');
/**
* Initialize
*
* Bind event handlers and setup jQuery Address.
*
*/
self.init = function(options) {
var image = '<im... | JavaScript | 0 | @@ -4306,24 +4306,25 @@
ta ',data);%0A
+%0A
containe
@@ -4329,51 +4329,260 @@
ner.
-html(responseText).data('ajax-info', data);
+data('ajax-info', data)%0A element = container.selector.replace(/#/,'')%0A safe_div = document.getElementById(element);%0A safe_div.innerHTML = responseText;%0A// container... |
9975e5bafcc03eb5464dce7bcbcd38d601162baa | Remove commented out code. | website/app/application/processes/process-templates.service.js | website/app/application/processes/process-templates.service.js | (function (module) {
module.factory("processTemplates",
[processTemplates]);
function processTemplates() {
var self = this;
self.activeTemplate = {};
self.templates = [
{
name: "APT",
description: "Atom Probe Tomography",
... | JavaScript | 0 | @@ -5287,46 +5287,8 @@
) %7B%0A
- //var q = $q.defer();%0A
|
f09b7c2bc7fed84cde62a300347ede983c7086ef | Add JSDoc comment | lib/node_modules/@stdlib/utils/is-string/lib/index.js | lib/node_modules/@stdlib/utils/is-string/lib/index.js | 'use strict';
// MODULES //
var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
var isString = require( './generic.js' );
var isPrimitive = require( './primitive.js' );
var isObject = require( './object.js' );
// MAIN //
setReadOnly( isString, 'isPrimitive', isPrimitive );
setReadOnly( isString... | JavaScript | 0 | @@ -8,16 +8,717 @@
rict';%0A%0A
+/**%0A* Test if a value is a string.%0A*%0A* @module @stdlib/utils/is-string%0A*%0A* @example%0A* var isString = require( '@stdlib/utils/is-string' );%0A*%0A* var bool = isString( 'beep' );%0A* // returns true%0A*%0A* bool = isString( new String( 'beep' ) );%0A* // returns true%0A*%0A*... |
3660613c199a06fb663bf3ba0a910228c55fe723 | Fix for when component statuses is not defined | lib/monitoring/addon/components/cluster-dashboard/component.js | lib/monitoring/addon/components/cluster-dashboard/component.js | import C from 'ui/utils/constants';
import { on } from '@ember/object/evented';
import Component from '@ember/component';
import {
set, get, computed, observer, setProperties
} from '@ember/object';
import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import layout from ... | JavaScript | 0.000001 | @@ -3001,16 +3001,22 @@
atuses')
+ %7C%7C %5B%5D
;%0A%0A c
|
972c21cd513fffbf3799bed499e93f7cf0586282 | Fix require statement | lib/node_modules/@stdlib/utils/read-stdin/lib/read.js | lib/node_modules/@stdlib/utils/read-stdin/lib/read.js | 'use strict';
// MODULES //
var isFunction = require( '@stdlib/utils/is-function' );
var isString = require( '@stdlib/utils/is-string' ).isPrimitive;
var stream = require( '@stdlib/streams/stdlib' );
// STDIN //
/**
* Reads data from `stdin`.
*
* @param {String|null} [encoding] - string encoding. If set, data will... | JavaScript | 0.00005 | @@ -187,19 +187,18 @@
eams/std
-lib
+in
' );%0A%0A%0A/
|
6218e97779447023b78ccdb63e610b345f1e4afa | test new format | server/node/readjson.js | server/node/readjson.js | const firebase = require('./firebase.js')
const readQuestions = function () {
const questions = require('./questions.json')
return questions
}
const createButtonFromQuestionId = async (id) => {
let question = await firebase.getQuestionFromId(id)
console.log("questions in createButtonFromQuestionId = ", questi... | JavaScript | 0.000457 | @@ -714,39 +714,44 @@
ify(%7B %22answer%22:
-element
+choices%5Bkey%5D
, %22question%22: id
|
2544d308f7a6f6a6d7a47fed436fbc0bff94c50d | add function for clickable rows | resources/assets/js/app.js | resources/assets/js/app.js | window._ = require('lodash');
window.$ = window.jQuery = require('jquery');
require('bootstrap-sass');
require('chartjs'); | JavaScript | 0.000001 | @@ -114,12 +114,144 @@
('chartjs');
+%0A%0A$(document).ready(function($) %7B%0A $(%22.clickable%22).click(function() %7B%0A window.location = $(this).data(%22href%22);%0A %7D);%0A%7D);
|
b295fb2ad3410d3f2f18cb6d1f175ea582b3a9dd | remove unecessary lines | lib/controller.js | lib/controller.js | 'use strict';
const request = require('request');
const dotenv = require('dotenv');
const _ = require('lodash');
// load environment file
dotenv.load();
// proxy
// const r = request.defaults({ proxy:process.env.PROXY });
// const langs = ['javascript','java','python','css','php','ruby','c++','c','shell','c#',
// ... | JavaScript | 0.999999 | @@ -222,288 +222,8 @@
);%0A%0A
-// const langs = %5B'javascript','java','python','css','php','ruby','c++','c','shell','c#',%0A// 'objective-c','r','viml','go','perl','coffeescript','text','swift','scala','emacs lisp',%0A// 'haskell','lua','matlab','arduino','makefile','groovy','puppet','rust','powershell'%5D;%... |
3b5a987fc06010fcccaf4d4fda620e14a158110b | Update of cli | require-wiredep-cli.js | require-wiredep-cli.js | #!/usr/bin/env node
'use strict';
var pkg = require('./package.json');
var require_wiredep = require('./require-wiredep');
var argv = require('minimist')(process.argv.slice(2));
var chalk = require('chalk');
var fs = require('fs');
var args = [
{ short: 'h', full: 'help' },
{ short: 'v', full: 'version' },
{ sh... | JavaScript | 0 | @@ -330,21 +330,23 @@
full: '
-bower
+require
Json' %7D,
@@ -850,21 +850,23 @@
-b, --
-bower
+require
Json
@@ -876,21 +876,23 @@
ath to %60
-bower
+require
.json%60')
@@ -897,70 +897,8 @@
');%0A
- console.log(' -d, --directory # Your Bower directory');%0A
co
@@ -1088,223 +1088,8 @@
');%0A
- cons... |
7a4473b11a477b3ba81750f51eebecff10e57597 | Remove the 0.2 references | lib/bindings/http/receiver_binary.js | lib/bindings/http/receiver_binary.js | const Constants = require("./constants.js");
const Commons = require("./commons.js");
const Cloudevent = require("../../cloudevent.js");
const {
isDefinedOrThrow,
isStringOrObjectOrThrow
} = require("../../utils/fun.js");
function validateArgs(payload, attributes) {
Array.of(payload)
.filter((p) => isD... | JavaScript | 0.000003 | @@ -769,16 +769,51 @@
,%0A Spec
+,%0A specversion,%0A extensionsPrefix
) %7B%0A%0A t
@@ -1023,16 +1023,94 @@
Spec();%0A
+ this.specversion = specversion;%0A this.extensionsPrefix = extensionsPrefix;%0A
%7D%0A%0ABinar
@@ -1794,49 +1794,57 @@
nts.
-BINARY_HEADERS_02.SPEC_VERSION%5D !== %220.2%22
+DEFAULT_SPEC_... |
040681cfa5be9a0b095fab6f8f3c84c833245c94 | Add placeholder to attribute bindings | addon/components/one-way-input.js | addon/components/one-way-input.js | import Ember from 'ember';
const {
Component,
get
} = Ember;
export default Component.extend({
tagName: 'input',
type: 'text',
attributeBindings: [
'accept',
'autocomplete',
'autosave',
'dir',
'formaction',
'formenctype',
'formmethod',
'formnovalidate',
'formtarget',
... | JavaScript | 0 | @@ -425,24 +425,43 @@
'pattern',%0A
+ 'placeholder',%0A
'size',%0A
|
a17fbdf9a8e26a8494720d50c02d23daad812a14 | check if get request given any response | lib/controller.js | lib/controller.js | 'use strict';
const request = require('request');
const _ = require('lodash');
const base_url = 'https://api.github.com/';
const token = require('../config.json').token;
const credentials = require('../config.json').proxy;
const r = request.defaults({'proxy':`${credentials}`});
// handle search and display statistics
... | JavaScript | 0.000001 | @@ -737,16 +737,68 @@
else %7B%0A
+ console.log(response)%0A if(response)%7B%0A
sh
@@ -812,16 +812,20 @@
t = '';%0A
+
co
@@ -861,16 +861,20 @@
e.body)%0A
+
co
@@ -905,16 +905,20 @@
;%0A
+
total =
@@ -927,24 +927,28 @@
ngth;%0A
+
let e;%0A
@@ -... |
83faaf62eefd9170f9e33a615a74b149b7fc4961 | Integrate Mesos constants | src/js/structs/Job.js | src/js/structs/Job.js | import DateUtil from '../utils/DateUtil';
import Item from './Item';
import JobRunList from './JobRunList';
module.exports = class Job extends Item {
getActiveRuns() {
return new JobRunList({items: this.get('activeRuns')});
}
getCommand() {
const {cmd} = this.get('run') || {};
return cmd;
}
ge... | JavaScript | 0.000001 | @@ -100,16 +100,74 @@
unList';
+%0Aimport MesosConstants from '../constants/MesosConstants';
%0A%0Amodule
@@ -389,87 +389,45 @@
-// Default to the minimum number of
+const %7B
cpus
-per
+=
Mesos
- offer%0A const %7Bcpus = 0.01
+Constants.MIN_CPUS
%7D =
@@ -1146,10 +1146,30 @@
m =
-32
+MesosConstants... |
77ad0c8fc48eaf3c2b59507ddc1963124c11cd63 | remove extra $ from HMR query | lib/builder/webpack/client.config.js | lib/builder/webpack/client.config.js | import { each } from 'lodash'
import webpack from 'webpack'
import VueSSRClientPlugin from 'vue-server-renderer/client-plugin'
import HTMLPlugin from 'html-webpack-plugin'
import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin'
import ProgressBarPlugin from 'progress-bar-webpack-plugin'
import { Bundle... | JavaScript | 0.000006 | @@ -3767,17 +3767,16 @@
nt?name=
-$
client&r
|
32202e93543b18cc8ebd14a641c5c98f4834b352 | Fix spacing | test/scale-buckets-test.js | test/scale-buckets-test.js | const assert = require('assert');
const scaleBuckets = require('../index.js');
describe('scaleBuckets', function () {
before(function () {
this.values = ['a', 'b', 'c', 'd', 'e'];
this.scale = scaleBuckets(this.values, 1, 10);
});
it('should be a function', function () {
assert.equal(typeof scaleBu... | JavaScript | 0.000415 | @@ -1578,16 +1578,17 @@
scale(0)
+
%7D.bind(t
@@ -1649,16 +1649,17 @@
cale(11)
+
%7D.bind(t
|
8183ebd4d70fd5225c4289d7dd4b9c66427b495c | Refresh function | resources/routerManager.js | resources/routerManager.js | var EngineJS_routerManager = {
routes: [],
notFoundRouter: function() {},
defaultRouter: function() {},
getCurrentPath: function() {
return decodeURI(location.pathname).replace(/\/$/, '');
},
add: function(request, handler) {
this.routes.push({request: "/" + request, handler: ha... | JavaScript | 0.000002 | @@ -1589,24 +1589,134 @@
th);%0A %7D,%0A
+ refresh: function() %7B%0A var self = this;%0A this.check(self.getCurrentPath()); %0A %7D, %0A
mapLinks
|
c089a6458140d63c71be8145aec792709b072558 | Improve readability and consistency of array-reduce examples (#1454) | live-examples/js-examples/array/array-reduce-right.js | live-examples/js-examples/array/array-reduce-right.js | const array1 = [[0, 1], [2, 3], [4, 5]].reduceRight(
(accumulator, currentValue) => accumulator.concat(currentValue)
);
console.log(array1);
// expected output: Array [4, 5, 2, 3, 0, 1]
| JavaScript | 0 | @@ -32,16 +32,40 @@
%5B4, 5%5D%5D
+;%0A%0Aconst result = array1
.reduceR
@@ -73,11 +73,8 @@
ght(
-%0A
(acc
@@ -132,17 +132,16 @@
ntValue)
-%0A
);%0A%0Acons
@@ -148,22 +148,22 @@
ole.log(
-array1
+result
);%0A// ex
|
bb62aa77e1f1581b7ff27c1a9ca1dddd4f1e19b5 | remove unwanted require | lib/cluster/workers/IDCardRenewer.js | lib/cluster/workers/IDCardRenewer.js | 'use strict';
const { cp } = require('fs');
const { isMainThread, parentPort } = require('worker_threads');
const Redis = require('../../service/cache/redis');
class IDCardRenewer {
constructor() {
this.disposed = false;
this.redis = null;
this.refreshTimer = null;
this.nodeIdKey = null;
this.ref... | JavaScript | 0 | @@ -11,38 +11,8 @@
t';%0A
-const %7B cp %7D = require('fs');%0A
cons
|
04e4cac4e083c8f4e4127a817785f1207fffdc5b | Document and rename drawPath helper func | src/shatter.js | src/shatter.js | /**
* Creates a new Shatter object.
* @constructor
* @param {object} img - The image to shatter.
* @param {number} numPolys - The number to pieces (polygons) to split the image into.
* @param {number} scale [multiplier=1] - The amount to scale resultings pieces coordinates.
*/
function Shatter (img, numPolys, sca... | JavaScript | 0 | @@ -4413,32 +4413,24 @@
ototype.draw
-Clipping
Path(polygon
@@ -4441,16 +4441,82 @@
mpCtx);%0A
+ // create clipped canvas with polygon%0A ctx.clip();%0A
@@ -5705,16 +5705,167 @@
st;%0A%7D;%0A%0A
+/**%0A * Draw a polygon%0A * @param %7Barray%7D polygon - Any array of points to draw%0A * @para... |
ef3741b480c52bddc91558a3d95a275b2000676d | Fix lint bugs | test/spec/woopra-client.js | test/spec/woopra-client.js | describe('Woopra Client Snippet', function() {
var b = ['config', 'track', 'identify', 'visit', 'push'];
it('Can be loaded asynchronously', function(done) {
window.woopraLoaded = function() {
window.woopraLoaded = null;
window.woopra_c1 = null;
done();
};
... | JavaScript | 0.000015 | @@ -5743,51 +5743,8 @@
%7B%7D;%0A
- var spy;%0A var qSpy;%0A
|
4b2ca138145277d112a8b374d91ee4e1b08d20cb | Fix test exec under oldIE | test/src/server-marshal.js | test/src/server-marshal.js | describe('server-marshal', function() {
var $el;
beforeEach(function() {
Thorax.ServerMarshal._reset();
window.$serverSide = true;
$el = $('<div>');
});
describe('store/load', function() {
it('should create a new id if none', function() {
Thorax.ServerMarshal.store($el, 'name');
e... | JavaScript | 0.000001 | @@ -874,16 +874,23 @@
+_.each(
%5B'foo',
@@ -924,17 +924,10 @@
ull%5D
-.forEach(
+,
func
|
bd10084cf8868d8e1beaa1bd4c372fd8af177070 | Fix tests. As a side effect of the babel update, bluebird-co now considers any classes inheriting from Object as objects. | test/src/yield_handlers.js | test/src/yield_handlers.js | /**
* Created by Aaron on 7/10/2015.
*/
import Promise from 'bluebird';
import assert from 'assert';
import BluebirdCo from '../../';
BluebirdCo.addYieldHandler( function( value ) {
if( value === 13 ) {
return Promise.resolve( 10 );
}
} );
class MyModel {
constructor( value ) {
this._... | JavaScript | 0 | @@ -440,25 +440,148 @@
del
-extends Object %7B%0A
+%7B%0A%0A%7D%0A%0Aclass MyObjectModel extends Object %7B%0A constructor( value ) %7B%0A super();%0A%0A this.value = Promise.resolve( value );%0A %7D
%0A%7D%0A%0A
@@ -1792,42 +1792,8 @@
ypes
-, even if they inherit from Object
', f
@@ -2545,14 +... |
73ef6a4566270e126ba9127ed7ecd47f5a72c7c5 | fix typo in WW checklist | src/parser/monk/windwalker/modules/features/checklist/Module.js | src/parser/monk/windwalker/modules/features/checklist/Module.js | import React from 'react';
import BaseChecklist from 'parser/shared/modules/features/Checklist2/Module';
import CastEfficiency from 'parser/shared/modules/CastEfficiency';
import Combatants from 'parser/shared/modules/Combatants';
import PreparationRuleAnalyzer from 'parser/shared/modules/features/Checklist2/Preparati... | JavaScript | 0.99965 | @@ -1960,17 +1960,17 @@
hit
-c
+C
ombo: th
|
b5f8e4e32b8e2e98ac0d2b55e24e1d4ea35fcb85 | Add updateCanvasSize for future safety | activities/Gears.activity/js/activity.js | activities/Gears.activity/js/activity.js | define(["sugar-web/activity/activity","sugar-web/graphics/radiobuttonsgroup","gearsketch_main"], function (activity,radioButtonsGroup) {
// Manipulate the DOM only when it is ready.
requirejs(['domReady!'], function (doc) {
var gearSketch;
// Initialize the activity.
activity.setup();... | JavaScript | 0 | @@ -4390,32 +4390,75 @@
ientRect().top;%0A
+ gearSketch.updateCanvasSize();%0A
docu
@@ -4830,32 +4830,75 @@
ientRect().top;%0A
+ gearSketch.updateCanvasSize();%0A
docu
|
bf56f852528fcc6d5b7961500c3896a80a70e5c8 | Update the changegroup action to set_current_group | client/app/core/navigation/navigation-controller.js | client/app/core/navigation/navigation-controller.js | /** @ngInject */
export function NavigationController (Text, Navigation, Session, API_BASE, ShoppingCart, $scope, $uibModal, $state,
EventNotifications, ApplianceInfo, CollectionsApi, RBAC) {
const vm = this
const destroy = $scope.$on('shoppingCartUpdated', refresh)
const des... | JavaScript | 0.000002 | @@ -7655,12 +7655,25 @@
': '
-edit
+set_current_group
',%0A
|
24c1b48a0fa9dace874cdbe633e2930e4874fcde | remove debug code and experiment | lib/dataGetter.js | lib/dataGetter.js | // Object for getting ad writing data to and from the file
var fs = require('fs'),
defConfig = require("../config.json"), // default config (may be removed in future)
optimist = require('optimist'),
path = require("path"),
semver = require('semver');
// Initialize + load data
function DataGetter(config, base... | JavaScript | 0.000001 | @@ -1781,272 +1781,8 @@
%7D;%0A%0A
-// Get data from the file. Make a new file in case the file does not exit yet%0A// DataGetter.prototype.getDataFromFileSync = function() %7B%0A// var self = this;%0A// if (fs.existsSync(self.filePath)) %7B%0A// var data = fs.readFileSync(self.filePath);%0A%0A// %7D%0A// %7... |
a297516eaf0baaf32117da672391334872d7342b | fix comment typo | lib/container_manager/task_runner.js | lib/container_manager/task_runner.js | 'use strict';
/* eslint no-loop-func: 0 */
var logger = require('../logger');
var through2 = require('through2');
var es = require('event-stream');
/**
* Runs all the steps in a build
* @param {Array} tasks - An array of task to run. Each task is a pluging instance.
* @param {Object} opts - Options object (option... | JavaScript | 0.000031 | @@ -253,17 +253,16 @@
a plugin
-g
instanc
|
059f12973d4900e0a906428654ed5d22a54d6266 | fix doc. | lib/date-utils.js | lib/date-utils.js | /**
* Utility for date time.
* @author kuyur@kuyur.info
*/
var StringUtils = require('./string-utils.js');
/**
* Get time zone string.
* @return {string}
*/
exports.getTimezone = function() {
var offset = new Date().getTimezoneOffset();
// -540 for GMT+9 (JST)
var ahead = (offset <= 0);
offset = Math.ab... | JavaScript | 0 | @@ -577,16 +577,18 @@
er%7CDate%7D
+ t
%0A * @ret
|
7bae975f8531dfaaed112423e60e79c74c1fcd07 | use client.auth if password set; | lib/db/shredis.js | lib/db/shredis.js | var _ = require("lodash");
var shlog = require(global.C.BASEDIR + "/lib/shlog.js");
var sh = require(global.C.BASEDIR + "/lib/shutil.js");
var _w = require(global.C.BASEDIR + "/lib/shcb.js")._w;
function shRedis() {
this.client = null;
}
module.exports = shRedis;
var redis = require("redis");
var gCmds = ["get",... | JavaScript | 0 | @@ -636,78 +636,248 @@
-this.client = redis.createClient(options.port, options.host, options);
+if (!options.port) %7B options.port = null;%7D%0A if (!options.host) %7B options.host = null;%7D%0A this.client = redis.createClient(options.port, options.host, options);%0A if (options.password) %7B%0A t... |
a968a818422d12b4176f57fd2a5840d2714bec2e | 更新美团,饿了么爬取策略 | lib/eleme_task.js | lib/eleme_task.js | const request = require('request');
const promise = require('bluebird');
const logger = require('./logger');
const uuid = require('uuid');
const config = require('config');
const moment = require('moment');
const stringify = require('csv-stringify');
const fs = require('fs'), path = require('path');
const _ = require('... | JavaScript | 0 | @@ -2039,32 +2039,34 @@
lt;%0A
+//
logger.debug(%60Lo
@@ -3739,32 +3739,34 @@
e);%0A
+//
logger.debug(res
|
fbd273edbdfe1d482602fed88b6b1531b0a79662 | clean up home controller a bit | resources/frontend_client/app/home/home.controllers.js | resources/frontend_client/app/home/home.controllers.js | 'use strict';
var HomeControllers = angular.module('corvus.home.controllers', []);
HomeControllers.controller('Home', ['$scope', '$location', function($scope, $location) {
$scope.currentView = 'data';
}]);
HomeControllers.controller('HomeGreeting', ['$scope', '$location', function($scope, $location) {
var ... | JavaScript | 0 | @@ -395,61 +395,13 @@
'
-Good morning',%0A 'Howdy',%0A 'Looking good
+Howdy
',%0A
@@ -598,36 +598,8 @@
?',%0A
- 'Hodor Hodor Hodor'%0A
@@ -722,16 +722,16 @@
d thing%0A
+
@@ -822,67 +822,8 @@
0);%0A
- console.log(greetingOptions, randomGreetingIndex);%0A
|
4d8c240d7c3f338426543bb88c931a751ab0c096 | Add redraw after downlading stops if needed | www/pages/routes-and-stops/routes-and-stops-controller.js | www/pages/routes-and-stops/routes-and-stops-controller.js | angular.module('pvta.controllers').controller('RoutesAndStopsController', function ($scope, $ionicFilterBar, $cordovaGeolocation, RouteForage, StopsForage, $ionicLoading, $stateParams) {
// We can control which list is shown via the page's URL.
// Pull that param and same it for later.
$scope.currentDisplay = par... | JavaScript | 0 | @@ -1546,32 +1546,79 @@
reStops(stops);%0A
+ $scope.display($scope.currentDisplay);%0A
%7D);%0A %7D,
@@ -1968,24 +1968,71 @@
ops(stops);%0A
+ $scope.display($scope.currentDisplay);%0A
%7D);%0A
@@ -4356,49 +4356,8 @@
();%0A
- $scope.display($scope.currentDisplay);%0A
%7D);%0A
|
a0d7b9248e15b04725cc72834cebe1084a2e70e5 | CHANGE paramKey for storysource addon disable | addons/storysource/src/manager.js | addons/storysource/src/manager.js | /* eslint-disable react/prop-types */
import React from 'react';
import addons from '@storybook/addons';
import StoryPanel from './StoryPanel';
import { ADDON_ID, PANEL_ID } from '.';
export function register() {
addons.register(ADDON_ID, api => {
addons.addPanel(PANEL_ID, {
title: 'Story',
render: ... | JavaScript | 0 | @@ -404,24 +404,30 @@
mKey: 'story
+source
',%0A %7D);%0A
|
a1835333cbccdb075fbce278d4409d057121e68c | call onContentReady after loading large content | Kwf_js/EyeCandy/List/Plugins/ActiveListener/LargeContentAjax.js | Kwf_js/EyeCandy/List/Plugins/ActiveListener/LargeContentAjax.js | Kwf.EyeCandy.List.Plugins.ActiveListener.LargeContentAjax = Ext.extend(Kwf.EyeCandy.List.Plugins.Abstract, {
init: function() {
this.activeItem = null;
this.list.on('activeChanged', function(item) {
this._activate(item);
}, this);
this.largeContainer = this.list.el.child... | JavaScript | 0 | @@ -1076,16 +1076,58 @@
eText);%0A
+ Kwf.callOnContentReady();%0A
|
a4f363a8294bc1b40100e1bb2e3758ec2b335d60 | Update mcdmcm.js | mcdmcm/mcdmcm.js | mcdmcm/mcdmcm.js | document.write('<h1>Máximo común divisor (MCD) y mínimo comúm múltiplo (mcm)</h1>');
document.write('<h2>Dados dos números calcular el MCD y el mcm</h2>');
do{
var n1 = prompt("Dime el primer número (de 1 a un billón)", 9805035240);
}while(isNaN(n1) || n1> 1000000000000 || n1< 1 || n1%1!==0);
do{
var n2 = prompt("Dim... | JavaScript | 0.000001 | @@ -624,17 +624,21 @@
o += 2+%22
-%5E
+%3Csup%3E
%22+contad
@@ -637,25 +637,33 @@
%22+contador+%22
-x
+%3C/sup%3E x
%22;%0A%09%7D else i
@@ -836,9 +836,13 @@
i+%22
-%5E
+%3Csup%3E
%22+co
@@ -849,17 +849,25 @@
ntador+%22
-x
+%3C/sup%3E x
%22;%0A%09%09%7D e
|
c67b7ee0648451ee8113d45b25fb32ace9480805 | fix code style | matematica.js | matematica.js | export function soma(a, b) {
return a + b;
}
export function multiplica(a, b) {
return a * b;
}
export function elevaAoQuadrado(n) {
return multiplica(n, n);
}
var dois = 2;
export function metade(n) {
return n / dois;
}
export function ehPar(n) {
return n % dois === 0;
}
export function ehImpar(n) {
return ... | JavaScript | 0.000022 | @@ -173,16 +173,17 @@
is = 2;%0A
+%0A
export f
|
cecf2efc1c821108a5c98e84bc4d700d2853542c | Add some breathing room | app/assets/javascripts/views/business_support/areas_relator.js | app/assets/javascripts/views/business_support/areas_relator.js | $(document).ready(function() {
"use strict";
var $relatedAreasSelect = $("#edition_areas"),
bindAreasSelection = function (selector, filter) {
$(selector).change(function () {
var self = this;
$('.areas-chkbx').each(function (i,e) {
if (e !== self) $(e).prop('checked',... | JavaScript | 0 | @@ -94,16 +94,39 @@
%22),%0A
+ bindAreasSelection;%0A%0A
bindAr
@@ -174,20 +174,16 @@
) %7B%0A
-
-
$(select
@@ -213,20 +213,16 @@
%7B%0A
-
var self
@@ -236,20 +236,16 @@
;%0A
-
-
$('.area
@@ -272,28 +272,24 @@
ion (i,e) %7B%0A
-
if (
@@ -329,20 +329,16 @@
false)... |
473d60d5f3f00fd3e69f64dd3ba7e04defc175e3 | fix documentation plugin paths builder when multiple contentTypes | packages/plugins/documentation/server/utils/builders/build-api-endpoint-path.js | packages/plugins/documentation/server/utils/builders/build-api-endpoint-path.js | 'use strict';
const _ = require('lodash');
const pathToRegexp = require('path-to-regexp');
const queryParams = require('../query-params');
const buildApiRequests = require('./build-api-requests');
const buildApiResponses = require('./build-api-responses');
/**
* @description Parses a route with ':variable'
*
* @p... | JavaScript | 0 | @@ -3978,16 +3978,34 @@
ntTypes%0A
+ let paths = %7B%7D;%0A
for (c
@@ -4721,37 +4721,97 @@
-return getPaths(apiInfo);%0A %7D
+paths = %7B%0A ...paths,%0A ...getPaths(apiInfo).paths%0A %7D%0A %7D%0A%0A return %7B paths %7D;
%0A%7D;%0A
|
73ef0140319c48a48f00f46af7c50b04204d1509 | Update mark attrs handling (#2) | src/types/text-handler.js | src/types/text-handler.js | 'use strict';
var React = require('react');
var PropTypes = require('prop-types');
var omit = require('lodash.omit');
function TextHandler(props) {
// Use assigned mark handlers
return (props.node.marks || []).reduceRight(function reduceMark(child, mark) {
var normalized = normalize(mark);
var... | JavaScript | 0 | @@ -633,26 +633,18 @@
er,
-omit(mark, 'type')
+mark.attrs
, ch
|
9f94173398b1a5e02917b12a0e41df264139dcc4 | add some comments | routes/routers/register.js | routes/routers/register.js | 'use strict';
var express = require('express');
var router = express.Router();
var lang = require('../../mixin/lang-message/chinese');
var constant = require('../../mixin/constant').backConstant;
var async = require('async');
var validate = require('validate.js');
var md5 = require('js-md5');
var constraint = require(... | JavaScript | 0 | @@ -2219,16 +2219,42 @@
%E8%AE%B0%E5%BD%95%E4%B8%80%E6%9D%A1%E7%99%BB%E5%BD%95%E4%BF%A1%E6%81%AF
+ %E5%AD%98%E5%82%A8%E5%88%B0%E4%B8%80%E6%9D%A1%E8%AE%B0%E5%BD%95%E7%99%BB%E5%BD%95%E4%BF%A1%E6%81%AF%E7%9A%84%E8%A1%A8%E4%B8%AD%0A
%0A
|
be43babdb33e9e0520b218bd2c338b614b4cd3dc | update 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 TiDrawerLayout = require('com.tripvi.drawerlayout');
var win = Ti.UI.createWindow({
background... | JavaScript | 0 | @@ -2933,21 +2933,19 @@
(%7B%0A%09left
-Windo
+Vie
w: menuT
@@ -2957,21 +2957,19 @@
%0A%09center
-Windo
+Vie
w: conte
@@ -3045,16 +3045,18 @@
.FILL,%0A%09
+//
drawerLo
@@ -3182,15 +3182,11 @@
rks%0A
-
+%09
//
-
draw
@@ -3210,17 +3210,16 @@
d: false
-,
%0A%7D);%0Adra
|
ef552aeef7ea1d49f4ed8fb649594f1deb382647 | Include all intermediate relationships when including a dot-path relationship | addon/serializers/json-api-serializer.js | addon/serializers/json-api-serializer.js | import extend from '../utils/extend';
import { dasherize, pluralize, camelize } from '../utils/inflector';
import Model from 'ember-cli-mirage/orm/model';
import Collection from 'ember-cli-mirage/orm/collection';
import _assign from 'lodash/object/assign';
import _get from 'lodash/object/get';
import _trim from 'lodash... | JavaScript | 0 | @@ -246,24 +246,69 @@
ct/assign';%0A
+import _flatten from 'lodash/array/flatten';%0A
import _get
@@ -5750,56 +5750,238 @@
-return requestRelationships.split(',').map(_trim
+const relationships = requestRelationships%0A .split(',')%0A .map(_trim)%0A .map((r) =%3E r.split('.').map((_,... |
c02877f10687711976b15e87be451f46a368f47a | allow partially proxying emitters | lib/emitters/custom-event-emitter.js | lib/emitters/custom-event-emitter.js | var util = require("util")
, EventEmitter = require("events").EventEmitter
, Promise = require("promise")
, proxyEventKeys = ['success', 'error', 'sql']
, tick = (typeof setImmediate !== "undefined" ? setImmediate : process.nextTick)
var bindToProcess = function(fct) {
if (fct) {... | JavaScript | 0 | @@ -263,16 +263,57 @@
extTick)
+%0A , Utils = require('../utils')
%0A%0Avar bi
@@ -355,20 +355,12 @@
(fct
-) %7B%0A if (
+ &&
proc
@@ -369,26 +369,24 @@
s.domain) %7B%0A
-
return p
@@ -408,23 +408,16 @@
ind(fct)
-;%0A %7D
%0A %7D%0A%0A
@@ -426,17 +426,16 @@
turn fct
-;
%0A%7D;%0A%0Am... |
ff86c57864c82a30f9af6bea2b29b8b2ae68defd | Rename res to not overwrite express res. | server/routes/heroku.js | server/routes/heroku.js | var express = require('express');
var router = express.Router();
var request = require('request');
router.get('/', function(req, res) {
request({
url: 'https://status.heroku.com/api/v3/current-status',
method: 'GET'
}, function(err, res, body) {
console.log(body);
res.sendStatus(200).end();
});
}... | JavaScript | 0 | @@ -237,21 +237,28 @@
tion(err
+or
, res
+ponse
, body)
@@ -281,16 +281,87 @@
g(body);
+ // %7B%22status%22:%7B%22Production%22:%22green%22,%22Development%22:%22green%22%7D,%22issues%22:%5B%5D%7D
%0A res
|
70d7205347164ef335cbacc047f5319e796f5ada | how you use this without kiwi | lib/express/plugins/session.redis.js | lib/express/plugins/session.redis.js | var kiwi = require('kiwi'),
redis = kiwi.require('redis-client'),
express = kiwi.require('express')
var utils = require('express/utils'),
session_plugin = require('express/plugins/session')
// --- RedisStore
exports.RedisStore = session_plugin.Store.extend({
/**
* Datastore name.
*/... | JavaScript | 0.998442 | @@ -1,54 +1,25 @@
var
-kiwi = require('kiwi'),%0A redis = kiwi.
+redis =
requ
@@ -55,15 +55,17 @@
ess
-= kiwi.
+ =
requ
@@ -82,13 +82,13 @@
ss')
-%0A%0Avar
+,%0A
uti
@@ -1034,14 +1034,12 @@
if(
-messag
+valu
e ==
|
9739a3f304bc3105b7d1e337a8dd897acf598b0c | Add tests | viewer/viewer.spec.js | viewer/viewer.spec.js | 'use strict';
// FACTORY: AnnotationsService
describe('AnnotationsService', function() {
var mockAnnotationsService = null;
beforeEach(function() {
angular.mock.module('chaise.viewer');
inject(function(AnnotationsService) {
mockAnnotationsService = AnnotationsService;
});
... | JavaScript | 0.000001 | @@ -143,32 +143,85 @@
ch(function() %7B%0A
+ // Load the module that contains the service%0A
angular.
@@ -1093,117 +1093,1161 @@
-// TODO: Test the rest of the methods in the service%0A%0A // TODO: Figure out how to mock the postMessages...
+it('should define a createAnnotation() method', func... |
420a46197b8ec6ccab0551a9fc9564d776dfb03a | use hard coded regex, for now | lib/dropbox/binFromFile.js | lib/dropbox/binFromFile.js | 'use strict';
module.exports = binFromFile;
function createPanelContentsRegExp (panel) {
return new RegExp('<script id="jsbin-panel-' + panel + '" type="([\w]*)">([\s\S]*)<\/script>');
}
var htmlPanel = createPanelContentsRegExp('html');
var cssPanel = createPanelContentsRegExp('css');
var jsPanel = createPanelCont... | JavaScript | 0 | @@ -204,106 +204,346 @@
l =
-createPanelContentsRegExp('html');%0Avar cssPanel = createPanelContentsRegExp('css');%0Avar jsPanel =
+new RegExp(/%3Cscript id=%22jsbin-panel-html%22 type=%22(%5B%5Cw%5D*)%22%3E(%5B%5Cs%5CS%5D*?)%3C%5C/script%3E/)//createPanelContentsRegExp('html');%0Avar cssPanel = new RegExp(/%3Cscrip... |
6af9dc39bbf566d6bea1d2bc553d47e9312e7daa | Add styled components to EditableTableHeader | src/Components/EditableTable/EditableTableHeader/index.js | src/Components/EditableTable/EditableTableHeader/index.js | import React from 'react'
import PropTypes from 'prop-types'
const EditableTableHeader = ({columnNames}) => {
return(
<div>
{columnNames.map( columnName => {return <div key={columnName}>{columnName}</div>})}
</div>
)
}
EditableTableHeader.propTypes = {
columnNames: PropTypes.arrayOf(PropTypes.st... | JavaScript | 0 | @@ -53,16 +53,164 @@
p-types'
+%0Aimport styled from 'styled-components'%0A%0Aconst Div = styled.div%60%0A display:flex;%0A flex-direction:row;%0A%60%0A%0Aconst HeaderCell = styled.div%60%0A flex:1;%0A%60
%0A%0Aconst
@@ -268,17 +268,17 @@
n(%0A %3C
-d
+D
iv%3E%0A
@@ -320,19 +320,26 @@
return %3C
-div
+H... |
bdcc145a6f67114c6c8a6d96bdba8a86e644ba04 | add /wlclear command to clear the waitlist | src/utils/ChatCommands.js | src/utils/ChatCommands.js | const debug = require('debug')('uwave:chat-commands');
const commands = {};
export function getCommands() {
return commands;
}
export function register(name, description, { action, guard }) {
commands[name] = { description, action, guard };
}
export function canExecute(state, { guard } = {}) {
return guard ? ... | JavaScript | 0 | @@ -873,16 +873,18 @@
import %7B
+%0A
joinWai
@@ -888,17 +888,35 @@
Waitlist
-
+, modClearWaitlist%0A
%7D from '
@@ -2978,24 +2978,142 @@
t now.%60));%0A %7D%0A %7D%0A);%0A
+%0Aregister(%0A 'wlclear',%0A 'Remove everyone from the waitlist.',%0A %7B guard: isModerator, action: modClearWaitlist %7D%0A);%0A... |
6e9dcf0f4ee6e8fe7a9b6df3bf5d3b0c20ded83f | 修正了ie8下array.indexOf | demo/datalazyload.bundle.js | demo/datalazyload.bundle.js | !function(t){function o(n){if(a[n])return a[n].exports;var e=a[n]={exports:{},id:n,loaded:!1};return t[n].call(e.exports,e,e.exports,o),e.loaded=!0,e.exports}var a={};return o.m=t,o.c=a,o.p="/demo/",o(0)}([function(t,o,a){t.exports=a(4)},function(t,o,a){var n=a(6),e={on:{scroll:function(){var t=$(this._options.containe... | JavaScript | 0.000001 | @@ -1696,9 +1696,14 @@
,a)%7B
-~
+var o=
$.in
@@ -1712,16 +1712,19 @@
ray(a,t)
+;~o
&&t.spli
@@ -1730,20 +1730,9 @@
ice(
-t.indexOf(a)
+o
,1)%7D
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.