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 |
|---|---|---|---|---|---|---|---|
d54a0ab97ee7c4cbe5952d4a0d4edd9cd5464a72 | Add "new" constructor wrapper to Polynomial. | panthrMath/polynomial.js | panthrMath/polynomial.js | (function(define) {'use strict';
define(function(require) {
// creates a polynomial function from the array of coefficients
// for example, if the function is ax^3 + bx^2 + cx + d
// the array is [a, b, c, d], that is, the array indexing is
// the reverse of the usual coefficient indexing
function Polyn... | JavaScript | 0 | @@ -417,16 +417,97 @@
;%0A %7D%0A%0A
+ Polynomial.new = function(coefs) %7B%0A return new Polynomial(coefs);%0A %7D;%0A%0A
Polyn
|
0609556fa362261eb85b4f99ac3529e02cba2d62 | Use endsWith for checking if using goimports | lib/formatter.js | lib/formatter.js | 'use babel'
import {CompositeDisposable} from 'atom'
import path from 'path'
class Formatter {
constructor (goconfigFunc, gogetFunc) {
this.goget = gogetFunc
this.goconfig = goconfigFunc
this.subscriptions = new CompositeDisposable()
this.saveSubscriptions = new CompositeDisposable()
this.setToo... | JavaScript | 0 | @@ -7118,13 +7118,11 @@
Cmd.
-start
+end
sWit
|
86e91313b99b1372c932226a7b81dc694c09ff91 | Add small comment block on EventDispatcher | src/shared/EventDispatcher.js | src/shared/EventDispatcher.js | import Vue from "vue";
window.EventDispatcher = new class {
constructor() {
this.vueInstance = new Vue();
}
fire(event, data = null) {
this.vueInstance.$emit(event, data);
}
listen(event, callback) {
this.vueInstance.$on(event, callback);
}
};
| JavaScript | 0 | @@ -17,16 +17,191 @@
%22vue%22;%0A%0A
+/**%0A * EventDispatcher class%0A * %0A * This class will create a global Vue instance%0A * that allows the application to fire and listen %0A * on events from different components%0A */%0A
window.E
|
390e7a7e6a6b43aea32c94093ca1f317071a3a0b | update based on feedback | src/shared/component/Model.js | src/shared/component/Model.js | import React, { Component, PropTypes } from 'react';
import classNames from 'classnames';
import _ from 'lodash';
import './Model.scss';
/**
* Returns a string that displays a Swagger Schema object.
*
* @param {Object} schema
* @param {String} name
* @param {Array} requiredFields
* @return {String}
*/
functi... | JavaScript | 0 | @@ -936,18 +936,20 @@
.items,
-''
+null
, schema
|
0ab3cc32180be1044431bd1a480d101b9560d3c6 | remove console logs except word to guess | lib/game-time.js | lib/game-time.js | var $ = require('jquery');
require('./dom-interaction');
function HangMan(){
this.wordArray = this.getWordArray();
this.phArray = [];
this.wordToGuess = null;
}
HangMan.prototype.getRandomIndex = function(){
return parseInt(Math.random() * this.wordArray.length);
};
HangMan.prototype.getWordArray = function(... | JavaScript | 0.000002 | @@ -1709,37 +1709,8 @@
r);%0A
- console.log(stringLetter);%0A
%7D);%0A
@@ -3485,34 +3485,8 @@
');%0A
- console.log(splitWord);%0A
va
@@ -3950,37 +3950,8 @@
) %7B%0A
- console.log(%22you win!%22);%0A
@@ -4107,53 +4107,8 @@
();%0A
- %7D else %7B%0A console.log(%22keep guessing%22);%0A
%7D%0A
@@ ... |
c80869e137faa08fb301f263e7484005df2be4e1 | add Korea, Japan currency symbol. | polyfill.number.toLocaleString.js | polyfill.number.toLocaleString.js | // polyfill.number.toLocaleDateString
/*jshint sub:true*/
(function() {
'use strict';
// Got this from MDN:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString#Example:_Checking_for_support_for_locales_and_options_arguments
function toLocaleStringS... | JavaScript | 0.000943 | @@ -2698,33 +2698,32 @@
dotThousCommaDec
-,
%0A %7D;%0A%0A
@@ -3149,16 +3149,18 @@
+
%22ron%22: %22
@@ -3163,16 +3163,58 @@
%22: %22RON%22
+,%0A%09 %22krw%22: %22%E2%82%A9%22,%0A%09 %22jpy%22: %22%EF%BF%A5%22
%0A
@@ -3207,32 +3207,33 @@
%22: %22%EF%BF%A5%22%0A %7D... |
b424e0dd69696f9db8b920d2b503320da01b5f98 | fix matching of existing value | lib/key-value.js | lib/key-value.js | var Struct = require('../struct')
var isObservable = require('../is-observable')
module.exports = function MutantKeyValue (key, value) {
var result = Struct({key: key, value: value})
result._type = 'MutantLookupKeyValue'
result.isBound = isObservable(key) || isObservable(value)
return result
}
| JavaScript | 0.000004 | @@ -207,14 +207,8 @@
tant
-Lookup
KeyV
|
038f537643f454e873773ed4c4735cb8cb518d3a | remove lruWalk() and lru; replay lruWalk() improvements inside trim() | lib/lru-cache.js | lib/lru-cache.js | ;(function () { // closure for web browsers
if (module) {
module.exports = LRUCache
} else {
// just set the global for non-node platforms.
this.LRUCache = LRUCache
}
function hOP (obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key)
}
function naiveLength () { return 1 }
function LRUCache (opt... | JavaScript | 0 | @@ -942,45 +942,8 @@
ncy%0A
- , lru = 0 // least recently used%0A
@@ -2608,20 +2608,8 @@
%7B%7D%0A
- lru = 0%0A
@@ -3736,42 +3736,8 @@
lu%5D%0A
- if (hit.lu === lru) lruWalk()%0A
@@ -3986,42 +3986,8 @@
lu%5D%0A
- if (hit.lu === lru) lruWalk()%0A
@@ -4040,23 +4040,20 @@
unction ... |
c247b0959ca11f99f32733ef8618f0100787fc88 | fix #70 Port ml Binarizer example | lib/ml/module.js | lib/ml/module.js | /*
* Copyright 2016 IBM Corp.
*
* 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 | @@ -736,24 +736,78 @@
)(kernelP),%0A
+ feature: require('./feature/module.js')(kernelP),%0A
param: r
|
8e7e326a1e77fff0e21f152b2b45b9a783288b5c | remove undefined set of Mei | lib/model/mei.js | lib/model/mei.js | 'use strict';
/*
* Module dependencies
*/
var _ = require('underscore');
var Backbone = require('backbone');
var flatten = require('flat').flatten;
/* Define native types to recognize them in schemas */
var natives = [String, Number, Boolean, Object, Array];
/*
* Mei.Model
*/
var Model = exports.Model = Bac... | JavaScript | 0.999165 | @@ -605,45 +605,8 @@
) %7B%0A
- if (_.isUndefined(val)) return;%0A%0A
@@ -1957,101 +1957,8 @@
if
-(_.isUndefined(val)) %7B%0A Backbone.Model.prototype.set.apply(this, %5Bobj, val%5D);%0A %7D else if
(_.i
@@ -2461,47 +2461,8 @@
) %7B%0A
- if (_.isUndefined(model)) return;%0A%0A
|
897ce066a9c02f4e4a3f564f7ab12859d0ded055 | fix chart | participant/componets/Judging.js | participant/componets/Judging.js | import React, { Component } from 'react'
import { connect } from 'react-redux'
import {Card, CardActions, CardHeader, CardMedia, CardTitle, CardText} from 'material-ui/Card'
import RaisedButton from 'material-ui/RaisedButton';
import { getRoleName } from '../../util/index'
import {
submitAlloTemp,
finishAllocati... | JavaScript | 0.000001 | @@ -1192,16 +1192,27 @@
inf_redo
+, allo_temp
%7D = thi
@@ -1347,17 +1347,25 @@
value:
-0
+allo_temp
,%0A
|
302889ebe5b7f139126c96d94afbf7a6f2762b74 | make unit test compliant with jshint (I truly hate this operator at end of line rule) | test/unit/deferred/whenever.js | test/unit/deferred/whenever.js | module( "deferred/whenever", { teardown: moduleTeardown } );
test( "single value" , function() {
expect( 44 );
// Some other objects
jQuery.each( {
"an empty string": "",
"a non-empty string": "some string",
"zero": 0,
"a number other than zero": 1,
"true": true,
"false": false,
"null": null,
"un... | JavaScript | 0 | @@ -2406,17 +2406,16 @@
pected =
-
%0A%09%09%09%09%09(
@@ -2454,25 +2454,25 @@
id1 %5D )
+ &&
%0A%09%09%09%09%09
-&&
( willSu
@@ -2509,17 +2509,17 @@
%5D )
+ &&
%0A%09%09%09%09%09
-&&
jQue
@@ -2710,17 +2710,22 @@
Notify =
-
+%0A%09%09%09%09%09
( willNo
@@ -2761,17 +2761,22 @@
2 %5D ) &&
-
+%0A%09%09%... |
0c7893607b9e4185781b3dd9fe4b118082377dc1 | stop checking progress every 5 seconds if kraken encounters an error | src/Kraken/wwwroot/js/views/releasebatches/details.js | src/Kraken/wwwroot/js/views/releasebatches/details.js | define(['knockout', 'bootstrap', 'select2', 'koselect2', 'moment', 'underscore', 'utils/koAsyncExtender', 'shell', 'bus', 'services/releaseBatches', 'services/environments', 'services/projects', 'services/users', 'context'], function (ko, bs, select2, koselect2, moment, _, koAsyncExtender, shell, bus, releaseBatchesSe... | JavaScript | 0 | @@ -8150,16 +8150,38 @@
this.c
+heckProgressIntervalId
= setIn
@@ -8274,8 +8274,9 @@
%7D;%0A%7D);
+%0A
|
5d4f90de47391964a5464b01ca43f8ee5d10638a | make `in` able to track multiple rooms | lib/namespace.js | lib/namespace.js |
/**
* Module dependencies.
*/
var Socket = require('./socket')
, Emitter = require('events').EventEmitter
, parser = require('socket.io-parser')
, debug = require('debug')('socket.io:namespace');
/**
* Module exports.
*/
module.exports = exports = Namespace;
/**
* Blacklisted events.
*/
exports.events... | JavaScript | 0.000002 | @@ -1938,36 +1938,101 @@
s a room
-.%0A *%0A * @api private
+ when emitting.%0A *%0A * @param %7BString%7D name%0A * @return %7BNamespace%7D self%0A * @api public
%0A */%0A%0ANa
@@ -2084,30 +2084,97 @@
= function(
-f
n
+ame
)%7B%0A
+ this.rooms = this.rooms %7C%7C %5B%5D;%0A if (!~this.rooms.indexOf(name))
th... |
14be3fef8628f48143109a4f6c9179dc7c3584c0 | Add jsdoc returns to service | uw-frame-components/portal/timeout/services.js | uw-frame-components/portal/timeout/services.js | 'use strict';
define(['angular', 'jquery'], function(angular, $) {
return angular.module('portal.timeout.services', [])
/**
Shibboleth Service
Public Methods
* getSession() - Gets the shib session from SERVICE_LOC.shibbolethSessionURL
* getTimeout() - Gets the shib session, but returns just t... | JavaScript | 0 | @@ -1420,17 +1420,16 @@
@return
-s
%7B*%7CFunc
@@ -1446,16 +1446,16 @@
romise%7D%0A
+
@@ -1753,17 +1753,16 @@
@return
-s
%7B*%7D%0A
@@ -1978,17 +1978,16 @@
@return
-s
%7Bboolea
@@ -2217,22 +2217,12 @@
turn
-s %5Battributes%5D
+ %7B*%7D
An
|
00e8a00a65085186c1a51863ae90765d47ec2832 | add NockWith.currentMode | lib/nock_with.js | lib/nock_with.js | 'use strict';
var nock = require('./scope');
var recorder = require('./recorder');
var fs = require('fs');
var format = require('util').format;
var mkdirp = require('mkdirp');
var path = require('path');
var expect = require('chai').expect;
var Modes = {
wild: wild, //all requests go out to the internet, dont ... | JavaScript | 0 | @@ -813,16 +813,47 @@
ode%5D();%0A
+ NockWith.currentMode = mode;%0A
%7D;%0A%0A%0A%0A%0AN
@@ -933,16 +933,45 @@
wild');%0A
+NockWith.currentMode = null;%0A
%0A%0A%0A%0A/**%0A
|
359d0d49a7f1f977f3c6cad1341d5481976f8e08 | Fix test | test/zuul/WSRpcBackend-Test.js | test/zuul/WSRpcBackend-Test.js | console.log('WSRpcBackend test');
var WS_PORT = 3001;
var assert = require('assert');
var after = require('after');
var backend = require('../../dist/WSRpcBackend');
var frontend = require('../../dist/WSRpcFrontend');
var bus = require('../../dist/EventBus');
var reg = require('../../dist/Registry');
var jrpc = requ... | JavaScript | 0.000004 | @@ -1168,18 +1168,26 @@
t.equal(
-1,
+true, 1 %3C=
json);%0A
|
9a7dd909b158903d47ca60b4d2193548b4ba3009 | fix for building <=0.9.2 | lib/platforms.js | lib/platforms.js | module.exports = {
win: {
needsZip: true,
runable: 'nw.exe',
files: { // First file must be the executable
'<=0.9.2': ['nw.exe', 'ffmpegsumo.dll', 'icudt.dll', 'libEGL.dll', 'libGLESv2.dll', 'nw.pak', 'locales'],
'>0.9.2': ['nw.exe', 'ffmpegsumo.dll', 'icudtl.dat', 'l... | JavaScript | 0 | @@ -232,27 +232,16 @@
'nw.pak'
-, 'locales'
%5D,%0A
|
78790d5ff7a89f946f4c80c0c357720da13c180b | update to match build guidelines | lib/sandboxer.js | lib/sandboxer.js | 'use strict';
var fs = require('fs');
var path = require('path');
var srvConfig = require('./config');
var Game = require('./game');
var Sandbox = require('sandboxer');
var shims = require('./shims');
var log = require('./logger')(__filename);
var gamesDir = srvConfig.get('games_directory');
var games = {};
module... | JavaScript | 0 | @@ -537,16 +537,22 @@
ory() &&
+%0A
fs.exis
@@ -584,17 +584,17 @@
, file,
-%22
+'
game.jso
@@ -598,9 +598,9 @@
json
-%22
+'
));%0A
|
147cedfa1fc5986f57556084e3bc99d3665d7cdd | Document the saveData api. | lib/save_data.js | lib/save_data.js | "use strict";
var platform = require("./platform");
function cookieGet(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length === 2) {
return parts.pop().split(";").shift();
} else {
throw "cookie " + name + " was not found";
}
}
function cookieSet(name, val... | JavaScript | 0 | @@ -6,16 +6,53 @@
strict%22;
+%0A/**%0A * @namespace Splat.saveData%0A */
%0A%0Avar pl
@@ -1562,246 +1562,1281 @@
%7D;%0A%0A
-function chromeStorageGet(keys, callback) %7B%0A%09window.chrome.storage.sync.get(keys, function(data) %7B%0A%09%09if (window.chrome.runtime.lastError) %7B%0A%09%09%09callback(window.chrome.r... |
1b473e478d8d5888af9b9a405620bf60918f36e5 | Fix with-polyfills example for Next 5 (#3740) | examples/with-polyfills/next.config.js | examples/with-polyfills/next.config.js | module.exports = {
webpack: function (cfg) {
const originalEntry = cfg.entry
cfg.entry = async () => {
const entries = await originalEntry()
entries['main.js'].unshift('./client/polyfills.js')
return entries
}
return cfg
}
}
| JavaScript | 0 | @@ -150,16 +150,51 @@
Entry()%0A
+%0A if (entries%5B'main.js'%5D) %7B%0A
en
@@ -243,16 +243,25 @@
ls.js')%0A
+ %7D%0A%0A
re
|
1f407f08170d554242045470043d1dee68b09761 | Fix lootable behavior not hydrating dropped items | bundles/ranvier-combat/behaviors/npc/lootable.js | bundles/ranvier-combat/behaviors/npc/lootable.js | 'use strict';
const LootTable = require('../../lib/LootTable');
module.exports = srcPath => {
const B = require(srcPath + 'Broadcast');
const Player = require(srcPath + 'Player');
const Item = require(srcPath + 'Item');
const Logger = require(srcPath + 'Logger');
return {
listeners: {
killed: sta... | JavaScript | 0.000004 | @@ -1232,16 +1232,59 @@
(item =%3E
+ %7B%0A item.hydrate(state);%0A
corpse.
@@ -1296,16 +1296,26 @@
em(item)
+%0A %7D
);%0A
|
f1b0a5c53a9f065fd7470486f25e8a22a526cb1f | fix crash while creating publisher on opentok sdk v2.14.2 (#31) | src/OTPublisher.js | src/OTPublisher.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import once from 'lodash/once';
import uuid from 'uuid';
export default class OTPublisher extends Component {
constructor(props) {
super(props);
this.state = {
publisher: null,
lastStreamId: '',
};
}
component... | JavaScript | 0 | @@ -103,16 +103,59 @@
/once';%0A
+import %7B omitBy, isNil %7D from 'lodash/fp';%0A
import u
@@ -4072,44 +4072,90 @@
-publisher.on(this.props.eventHandler
+const handles = omitBy(isNil)(this.props.eventHandlers);%0A publisher.on(handle
s);%0A
|
730f83d019e0a8108dfb3a3e3490395a4dafcacd | update Popup | src/Popup/Popup.js | src/Popup/Popup.js | /**
* @file Popup component
* @author liangxiaojun(liangxiaojun@derbysoft.com)
*/
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Popover from '../Popover';
import Theme from '../Theme';
import Position from '../_statics/Position';
import Eve... | JavaScript | 0.000001 | @@ -599,52 +599,305 @@
his.
-mouseDownHandler = ::this.mouseDownHandler;%0A
+closeTimeout = null;%0A%0A this.clearCloseTimeout = ::this.clearCloseTimeout;%0A this.mouseDownHandler = ::this.mouseDownHandler;%0A%0A %7D%0A%0A clearCloseTimeout() %7B%0A if (this.closeTimeout) %7B%0A c... |
25d7bb2f389cd9aac3fd7d1b522f29d2f03b2cd4 | update Popup | src/Popup/Popup.js | src/Popup/Popup.js | /**
* @file Popup component
* @author liangxiaojun(liangxiaojun@derbysoft.com)
*/
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import TriggerPop from '../_TriggerPop';
import Theme from '../Theme';
import Position from '../_statics/Position';
im... | JavaScript | 0.000001 | @@ -5299,9 +5299,9 @@
th:
-6
+3
,%0A%0A
|
b972f40e37f67707a0e0c094a1bfe742a75d9b10 | Rename the combineStats function to combine and the initStats function to init | src/Probability.js | src/Probability.js | Blackjack.Probability = (function() {
function initStats() {
var stats = {
hands: 0,
win: {
hands: 0,
odds: 0
},
lose: {
hands: 0,
odds: 0
},
push: {
hand... | JavaScript | 0.002682 | @@ -52,18 +52,13 @@
init
-Stats
() %7B%0A
+
@@ -414,21 +414,16 @@
combine
-Stats
(current
@@ -1090,37 +1090,32 @@
var stats = init
-Stats
();%0A%0A for
@@ -2800,37 +2800,32 @@
stats = combine
-Stats
(stats, newStats
@@ -3486,21 +3486,16 @@
s = init
-Stats
();%0A%0A
@@ -5250,37 +5250,32 @@
... |
9e681eb4459370fe2bfcb1892f6d28cf3ed4dc48 | Update soft kill documentation | lib/soft_kill.js | lib/soft_kill.js | /*
* Copyright 2014 Per Eckerdal
*
* 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... | JavaScript | 0 | @@ -668,22 +668,28 @@
Sends a
-SIGINT
+faked sigint
to a pr
@@ -732,16 +732,19 @@
a short
+%0A *
while,
@@ -745,19 +745,16 @@
hile, it
-%0A *
sends S
|
781764aeaff2d76d35017f40732dbf5f42f1e506 | fix example | examples/wdio/mocha/mocha.test.js | examples/wdio/mocha/mocha.test.js | describe('webdriver.io page', () => {
it('should be a pending test')
it('should have the right title', () => {
browser.url("https://ozon.ru");
for (let i = 0; i < 50; i++) {
let el = $('[data-test-id="header-search-input"]');
el.click();
el.setValue('Рыба');
... | JavaScript | 0.0001 | @@ -137,17 +137,17 @@
url(
-%22
+'
https://
ozon
@@ -146,381 +146,141 @@
s://
-ozon.ru%22);%0A for (let i = 0; i %3C 50; i++) %7B%0A let el = $('%5Bdata-test-id=%22header-search-input%22%5D');%0A el.click();%0A el.setValue('%D0%A0%D1%8B%D0%B1%D0%B0');%0A $('%5Bdata... |
2435a6d0575790d50f9c2ee3ff4615c87e89b238 | Put facebox in the main document ready | public/javascripts/application.js | public/javascripts/application.js | jQuery(document).ready(function($){
$('#equalize').equalHeights();
$(document).pngFix();
$("select[name=news_item_type]").change(refreshSortOrder);
renderUserHeader();
if (jQuery("#category_select option:selected").val() == 'Sub-network') {
id = jQuery("#network_select option:selected").val();
load_c... | JavaScript | 0 | @@ -328,24 +328,57 @@
es(id);%0A %7D%0A
+ $('a%5Brel*=facebox%5D').facebox()%0A
%7D);%0A%0AjQuery(
@@ -2129,78 +2129,4 @@
%0A%7D%0A%0A
-jQuery(document).ready(function($) %7B%0A $('a%5Brel*=facebox%5D').facebox()%0A%7D);%0A
|
bd944805f7200534f473bac116ee948ea6053e5f | Update requestHandlers.js | Node.js/requestHandlers.js | Node.js/requestHandlers.js | querystring = require('querystring');
function start(res, postData) {
console.log("Request handler 'start' was called.");
var body = '<html>'+
'<head>'+
'<meta http-equiv="Content-Type" content="text/html; '+
'charset=UTF-8" />'+
'</head>'+
'<body>'+
'<form action="/upload" method="post">'+
'<textarea name... | JavaScript | 0.000001 | @@ -1,16 +1,20 @@
+var
querystring = re
@@ -33,16 +33,74 @@
string')
+,%0A%09fs = require('fs'),%0A%09formidable = require('formidable')
;%0A%0Afunct
@@ -116,24 +116,13 @@
(res
-, postData
) %7B%0A
-
+%09
cons
@@ -174,10 +174,9 @@
);%0A%0A
-
+%09
var
@@ -192,16 +192,17 @@
html%3E'+%0A
+%09
%09'%3Chead%3... |
7d7f5d285b249e35d1239bdb4af9b734b025ed3a | fix a bug in guesstimating sequence type | public/js/sequenceserver.blast.js | public/js/sequenceserver.blast.js | /*
SequenceServer's BLAST module/method
Adds `blast` method to `SS`.
blast():
not implemented
`blast` defines the following methods:
init():
initialize `blast` object
This module defines the following events:
sequence_type_changed:
When the type (n... | JavaScript | 0.000008 | @@ -1079,16 +1079,17 @@
/%5B%5EA-Z%5D/
+g
i, '') /
@@ -1154,16 +1154,17 @@
e(/%5BNX%5D/
+g
i, '')
|
421982c44f0c6d619aed07b6b81b2088998c6049 | Fix incorrect parameters passed to 'heading' method | src/Table/Table.js | src/Table/Table.js | import React, {PropTypes} from 'react';
import _ from 'underscore';
var sortData = (data, sortBy, customSort) => {
if (_.isFunction(customSort) && _.isFunction(customSort(sortBy.prop))) {
// Use custom sort method if specified.
data = _.sortBy(data, customSort(sortBy.prop));
} else {
// Otherwise, use ... | JavaScript | 0.000242 | @@ -1147,20 +1147,21 @@
.sortBy.
-prop
+order
,%0A
@@ -1600,38 +1600,31 @@
r =
-headingAttributes%5B'aria-sort'%5D
+this.state.sortBy.order
;%0A
@@ -3539,20 +3539,16 @@
%7D);%0A
-
%0A if
|
5cb17231ac489b349e41c4e31868b8f1aa33d8b2 | Remove unused policy from config.policies | generators/app/templates/config/policies.js | generators/app/templates/config/policies.js | /**
* Policy Mappings
*
* Policies are simple functions which run before your controllers.
* You can apply one or more policies to a given controller, or protect
* its actions individually.
*
* Any policy file (e.g. `api/policies/authenticated.js`) can be accessed
* below by its filename, minus the extension, (... | JavaScript | 0.000002 | @@ -378,22 +378,8 @@
'*':
- %5B'isAllowed',
'is
@@ -396,9 +396,8 @@
ted'
-%5D
,%0A%0A
@@ -424,27 +424,20 @@
'*':
-'isAllowed'
+true
%0A %7D,%0A%0A
@@ -467,34 +467,8 @@
'*':
- 'isAllowed',%0A 'index':
tru
|
912a100a35dfdba9f9c2f7b6faffe189f57ef5f9 | Handle jpegs with corrupt EXIF blocks | lib/types/jpg.js | lib/types/jpg.js | 'use strict';
var readUInt = require('../readUInt');
// NOTE: we only support baseline and progressive JPGs here
// due to the structure of the loader class, we only get a buffer
// with a maximum size of 4096 bytes. so if the SOF marker is outside
// if this range we can't detect the file size correctly.
function i... | JavaScript | 0 | @@ -2251,16 +2251,108 @@
BYTES;%0A%0A
+ // Skip on corrupt EXIF blocks%0A if (start %3E exifBlock.length) %7B%0A return;%0A %7D%0A%0A
var
|
52c466286c0eee9377bc9717880d56314de088ee | Add react to vendor webpack | webpack.config.vendor.js | webpack.config.vendor.js | const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const merge = require('webpack-merge');
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const extractCSS = new ExtractTextPlugin('vendor.css');
const ASSET_PATH = process.env.A... | JavaScript | 0.000001 | @@ -1901,24 +1901,76 @@
ath/round',%0A
+%09%09%09'react',%0A%09%09%09'react-dom',%0A%09%09%09'react-fontawesome',%0A
%09%09%09'./fronte
|
2b5fc17515f6a1d9d4647ccfdbff24d501d45d2d | Add production and dev IP addresses | client/reactComponents/WelcomePage.js | client/reactComponents/WelcomePage.js | import React from 'react';
import BattleScene from './BattleScene';
import JoinGameScene from './JoinGameScene';
import WallMixin from './WallMixin';
import Projectile from './Projectile';
const io = require('socket.io-client/socket.io');
const server = 'http://localhost:80'; // change for production
class WelcomePag... | JavaScript | 0 | @@ -233,16 +233,77 @@
t.io');%0A
+// const server = 'http://159.203.221.124:80'; // production%0A
const se
@@ -333,35 +333,27 @@
t:80
+80
'; //
-change for production
+development
%0A%0Acl
|
6d15ba4c753ed32ab37a6f24143075e7d0e7a70b | Update the documentation of the Node utils | lib/util/Node.js | lib/util/Node.js | /**
* Utils for Node library
*/
var Node = {};
/**
* Generator version of the module 'fs'
*/
var fs = require('fs');
Node.fs = {};
/**
* Check if a path exists
*/
Node.fs.exists = function(filePath)
{
return function(done)
{
fs.stat(filePath, function(error, result)
{
done(nul... | JavaScript | 0 | @@ -129,16 +129,17 @@
s = %7B%7D;%0A
+%0A
/**%0A * C
@@ -160,16 +160,155 @@
exists%0A
+ *%0A * @param %7Bstring%7D filePath The file path to check%0A * @return %7Bboolean%7D true if the file exists, false otherwise%0A
*/%0ANode
@@ -333,32 +333,58 @@
ion(filePath)%0A%7B%0A
+ // Generator... |
b51782f687e45449841d310c5727481dab31853e | Add code for jquery test | src/about/about.js | src/about/about.js | // about.js
"use strict";
import { welcome } from "../welcome/welcome";
if (NODE_ENV == DEV_ENV) {
welcome("about");
console.log(NODE_ENV);
}
export { welcome };
| JavaScript | 0 | @@ -143,16 +143,291 @@
NV);%0A%7D%0A%0A
+$.when( $.ready ).then(function() %7B%0A let $jqButton = $(%22#testJQuery%22);%0A%0A function testJQueryHandler(e) %7B%0A e.preventDefault();%0A%0A let $listItems = $(%22ul %3E li%22);%0A%0A alert($listItems);%0A%0A console.log($listItems);%0A %7D%0A%0A $jqButto... |
c0f2e1dec8d5d5211766b939928fbbbbea2835b7 | Check for custom static assets folder and serves static from there or use default public folder | lib/viperfish.js | lib/viperfish.js | /*
* viperfish
* https://github.com/mattstyles/viperfish
*
* Copyright (c) 2013 Matt Styles
* Licensed under the MIT license.
*/
/**
* Requires
*/
var express = require('express'),
cons = require('consolidate'),
http = require('http'),
path = require('path'),
fs ... | JavaScript | 0 | @@ -2905,43 +2905,8 @@
) %7B%0A
- vpf.configure(function() %7B%0A
@@ -2987,24 +2987,55 @@
plates' );%0A%0A
+ vpf.configure(function() %7B%0A
// C
@@ -4062,112 +4062,267 @@
v
-pf.configure( function() %7B%0A vpf.use(express.static(path.join(process.cwd(), '/public')
+ar cwd = path.j... |
9c58b07d31afdd04d80fd48f9dbbd078c90e4f20 | fix email check | lib/vk_server.js | lib/vk_server.js | VK = {};
Oauth.registerService('vk', 2, null, function(query) {
var response = getTokenResponse(query);
var accessToken = response.accessToken;
var identity = getIdentity(accessToken);
var serviceData = {
accessToken: accessToken,
expiresAt: (+new Date) + (1000 * response.expire... | JavaScript | 0.000005 | @@ -549,17 +549,44 @@
ields);%0A
-%0A
+ if (response.email)%0A
serv
|
13145deb1aa4ee912a22c5563ef17d3fc4d417f5 | fix merge issues with gulp minify css | gulp/tasks/styles.js | gulp/tasks/styles.js | // === STYLES
// ============================================================================
// Note: Sourcemaps are not working at the moment when used with auto prefixer.
// If you comment in sourcemaps and comment out autoprefixer. maps work fine.
// I think autoprefixer wins over sourcemaps, so it's being used by... | JavaScript | 0.000001 | @@ -2097,14 +2097,13 @@
ins.
-minify
+clean
Css(
|
57f5c1eae7f64bee531d6f057fd7407f158cd61d | Add progress window | linking_words.js | linking_words.js | // <copyright file="linking_words.js">
// Copyright (c) Michał Katański 2015. All Right Reserved
// </copyright>
//
// <author>Michał Katański</author>
// <date>2015-04-28</date>
// <summary>InDesign CC 2014 script. Moves characters from the end of the line to next line</summary>
var config = {
allowedApplication... | JavaScript | 0.000001 | @@ -4691,24 +4691,234 @@
turn%0A %7D%0A%0A
+ var progressWindow = new Window(%22palette%22, %22Linking Words%22, undefined, %7BcloseButton: false%7D);%0A progressWindow.add(%22statictext%22, undefined, %22Processing text... please wait.%22);%0A progressWindow.show();%0A%0A
config.s
@@ -5721,32 +5721,6... |
9fffd96063efad871f2953450cfb23781b7042c9 | Fix proxy rejection. | pogo-nocscan/scanner.js | pogo-nocscan/scanner.js | var POGOProtos = require('node-pogo-protos');
var bluebird = require('bluebird');
var Long = require('long');
var _ = require('lodash');
var request = require('request');
var s2 = require('s2-geometry').S2;
var winston = require('winston');
var core = require("./cor... | JavaScript | 0 | @@ -5180,41 +5180,8 @@
.%22);
-%0A logger.error(e);
%0A%0A
|
ce6c8b69b2cf8f64713031d3e9cb0b6069c1b943 | fix style issue | feature-detects/xdomainrequest.js | feature-detects/xdomainrequest.js | /*!
{
"name": "XDomainRequest",
"property": "xdomainrequest",
"tags": ["cors", "xdomainrequest", "ie9", "ie8"],
"authors": ["Ivan Pan (@hypotenuse)"],
"notes": [
{
"name": "MDN documentation",
"href": "https://developer.mozilla.org/en-US/docs/Web/API/XDomainRequest"
},
{
"name": "MSDN docume... | JavaScript | 0 | @@ -489,17 +489,16 @@
function
-
(Moderni
|
d2770b64828741f5cb6234e838238cd1fa8cc7d4 | Fix all string throw statements | extensions/php/build/update-grammar.js | extensions/php/build/update-grammar.js | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | JavaScript | 0.999985 | @@ -954,16 +954,26 @@
%09%09throw
+new Error(
%22Can not
@@ -992,16 +992,17 @@
jection%22
+)
;%0A%09%7D%0A%09de
|
801f00141ccd1f1a2314566a6778ce45fc2cf83f | Remove object from local storage hook | src/stores/GeoObjectsStore.js | src/stores/GeoObjectsStore.js | 'use strict';
var AbstractStore = require('stores/AbstractStore');
var assign = require('object-assign');
var GeoAppDispatcher = require('../dispatcher/GeoAppDispatcher');
var GeoAppActionsConstants = require('constants/GeoAppActions');
var LocalStoreDataProvider = require('stores/LocalStorageDataProvider');
var GeoO... | JavaScript | 0 | @@ -908,16 +908,253 @@
break;%0A
+ case GeoAppActionsConstants.GEO_OBJECTS_DELETE:%0A LocalStoreDataProvider.deleteCollectionItem(GeoAppActionsConstants.GEO_OBJECTS_COLLECTION, action.rawData);%0A GeoObjectsStore.emitChange();%0A break;%0A
|
d184fe8a0dfb2f5265687f13c2de541e91ff57a7 | add colspan attribute on tfoot | list/table/list.js | list/table/list.js | var builder = require('focus').component.builder;
var React = require('react');
var type = require('focus').component.types;
var infiniteScrollMixin = require('../mixin/infinite-scroll').mixin;
var translationMixin = require('../../common/i18n').mixin;
var referenceMixin = require('../../common/mixin/reference-property... | JavaScript | 0 | @@ -3786,36 +3786,36 @@
%3Ct
-body
+foot
className=%22tabl
@@ -3882,16 +3882,65 @@
%3Ctd
+ colSpan=%7BObject.keys(this.props.columns).length%7D
%3E%0A
@@ -4239,36 +4239,36 @@
%3C/t
-body
+foot
%3E%0A );
|
fb645f0f848c68b0ba29cc29e401f223085428e7 | use arrow function instead of bind | src/textlint-rule-rousseau.js | src/textlint-rule-rousseau.js | // LICENSE : MIT
"use strict";
const {RuleHelper} = require("textlint-rule-helper");
const StringSource = require("textlint-util-to-string").default;
const rousseau = require("rousseau");
const filter = require('unist-util-filter');
const defaultOptions = {
// "suggestion", "warning", "error"
showLevels: ["sugg... | JavaScript | 0.000011 | @@ -2952,44 +2952,79 @@
r =
-reportError.bind(null, node, source)
+(ruleError) =%3E %7B%0A report(node, ruleError);%0A %7D
;%0A
|
ac1fd1944d8b2fc61479822b1a4d923a288ba32b | remove console.log | flask_admin/static/admin/js/filters.js | flask_admin/static/admin/js/filters.js | var AdminFilters = function(element, filtersElement, filterGroups, activeFilters) {
var $root = $(element);
var $container = $('.filters', $root);
var lastCount = 0;
function getCount(name) {
var idx = name.indexOf('_');
if (idx === -1) {
return 0;
}
return... | JavaScript | 0.000006 | @@ -5357,37 +5357,8 @@
e);%0A
- console.log($field);%0A
|
06a51f166e3886523e639e193f5136794ef19729 | fix sticky warning. | IPython/html/static/base/js/notificationwidget.js | IPython/html/static/base/js/notificationwidget.js | // Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
define([
'base/js/namespace',
'jquery',
], function(IPython, $) {
"use strict";
/**
* Construct a NotificationWidget object.
*
* @constructor
* @param {string} selector - a jQuery... | JavaScript | 0 | @@ -3384,16 +3384,13 @@
//
-bind the
+if no
cli
@@ -3405,21 +3405,51 @@
ack
-if i
+assume we will jus
t
+d
is
- give
+miss the notificatio
n%0A
@@ -3473,17 +3473,17 @@
allback
-!
+=
== undef
@@ -3486,32 +3486,187 @@
ndefined) %7B%0A
+ click_callback = function()%7Breturn true%7D;%0A %... |
4bf6f9c1df9d9be7b66226e7cda829e18c0bb1ba | translate the word "buffer" | src/data/examples/zh-Hans/05_Image/04_Create_Image.js | src/data/examples/zh-Hans/05_Image/04_Create_Image.js | /*
* @name 创建图像
* @description createImage() 函数能让我们巧妙地操控一堆像素。 此范例创建了一个渐变图像。
*/
let img; // 声明变量'img'
function setup() {
createCanvas(720, 400);
// 设置图像大小 230x230 像素
img = createImage(230, 230);
// 将显示窗口的像素资料加载到 pixels[] 数组里
// 这函数必须在读写 pixels[] 之前被调用
img.loadPixels();
for (let x = 0; x < img.width; x... | JavaScript | 0.999996 | @@ -56,11 +56,14 @@
%E5%9C%B0%E6%93%8D%E6%8E%A7%E4%B8%80
-%E5%A0%86
+%E4%B8%AA
%E5%83%8F%E7%B4%A0
+%E7%BC%93%E5%86%B2%E5%8C%BA
%E3%80%82 %E6%AD%A4%E8%8C%83
@@ -94,16 +94,17 @@
// %E5%A3%B0%E6%98%8E%E5%8F%98%E9%87%8F
+
'img'%0A%0Af
|
30d25be771c186c66f3080eefac19c6fbbbd74fa | Make router honor debug environment variable | router.js | router.js | require('./constants');
var debug = false;
/** function which will simply route records to the provided delivery stream */
function defaultRouting(defaultDeliveryStreamName, records, callback) {
var routingMap = {};
routingMap[defaultDeliveryStreamName] = records;
callback(null, routingMap);
}
exports.def... | JavaScript | 0.000001 | @@ -33,16 +33,37 @@
ug =
+ process.env.DEBUG %7C%7C
false;%0A
%0A/**
@@ -58,16 +58,16 @@
false;%0A
-
%0A/** fun
@@ -429,25 +429,24 @@
f records%0A *
-
%0A * @param d
@@ -869,17 +869,16 @@
rrays%0A *
-
%0A * @par
@@ -1238,19 +1238,18 @@
pported%0A
+
*
-
%0A * @par
@@ -3489,12 +3489,13 @@
buteMapping;
... |
74ea5c4200e3fd8fde5a8ccb310f526a08591baf | Add API endpoint for Yelp queries | routes.js | routes.js | var Backbone = require('backbone');
var $ = require('jquey');
Backbone.$ = $;
module.exports = function(app) {
// app.get('/', function(req, res) {
// res.send('Hello, world!');
// });
};
| JavaScript | 0.000003 | @@ -1,82 +1,308 @@
-var Backbone = require('backbone');%0Avar $ = require('jquey');%0ABackbone.$ = $;%0A
+'use strict';%0A%0Avar YelpAPI = require('./lib/yelp-api');%0Avar yelpAPI = new YelpAPI(%7B%0A%09// To do: un-hard-code keys for Heroku%0A%09consumerKey: 'LF09pfePJ5IAB7MYcnRkaQ',%0A%09consumerSecret: '8QABPQRA-VZp... |
67d9615df113ff87a2c5524379ae5aaf54388e80 | Put routes.js back to original code | routes.js | routes.js | var blogger = require('./models/blogger').Blogger;
var authentication = require('./authentication');
var ensureAuthenticated = authentication.ensureAuthenticated;
module.exports = function(app) {
authentication.serveOAuthRoutes(app);
app.get('/', function(req, res) {
res.render('index', {title: 'Index / CS ... | JavaScript | 0.000001 | @@ -915,18 +915,16 @@
%0A %7D);%0A%0A
-//
app.ro
@@ -940,18 +940,16 @@
ister')%0A
-//
.g
@@ -985,34 +985,32 @@
ion(req, res) %7B%0A
-//
res.rend
@@ -1021,26 +1021,24 @@
register');%0A
-//
%7D)%0A//
@@ -1034,18 +1034,16 @@
%7D)%0A
-//
.p
@@ -1084,26 +1084,24 @@
req, res) %7B... |
85f60133b7d203310fb94452ffdd4ad00fa29805 | Update rproxy.js | rproxy.js | rproxy.js | /*
* Copyright (c) 2013-2014
*
* Woonsan Ko
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, me... | JavaScript | 0 | @@ -4514,16 +4514,280 @@
or);%0A%7D);
+%0AproxyServer.on('proxyReq', function(proxyReq, req, res, options) %7B%0A if (req.proxyMapping && req.proxyMapping.reqHeaders) %7B%0A var headers = req.proxyMapping.reqHeaders;%0A for (var name in headers) %7B%0A proxyReq.setHeader(name, headers%5Bname%5D);%0A %7D... |
b1caa9015cd2f00099ff72c79225e5331ec25767 | work around ace sizing bug in Chrome/webkit | web/app/assets/javascripts/aceify-textareas.js | web/app/assets/javascripts/aceify-textareas.js | /** converts all textareas to ACE Editors in place. Sets some default
* options on the editor. Expects Prototype, ACE and mode-latex to be
* loaded beforehand. */
if(line_offset_number == null)
var line_offset_number = 0;
// Does some not-so-nice hot swapping so we can offset the line numbers.
// This is used to ... | JavaScript | 0 | @@ -1473,16 +1473,299 @@
ion() %7B%0A
+ if($.browser.webkit) %7B%0A // fix strange sizing issue with ace that only happens in Webkit%0A // for some reason. See https://github.com/ajaxorg/ace/issues/1202%0A $(%22head%22).append(%22%3Cstyle%3Ebody %3E div %7B padding: 0; %7D %3C/style%3E%22);%0A $(%22body %... |
9ae9d08827825b2dbf6cebaf174515125d12b214 | Update messages for 2018 | src/application.js | src/application.js | import moment from "moment";
import danceGif from "./images/dance.gif";
import { pluralize, formatDateDiff } from "./utils";
import registerServiceWorker from "./register";
/*!
* Copyright (c) 2015 Rob Bettis
* @license MIT
*/
(function() {
"use strict";
registerServiceWorker();
const THIS_EVENT_YEAR = "201... | JavaScript | 0 | @@ -1095,269 +1095,294 @@
%22
-Downtown Chattanooga now leads the nation in truck-nuts per capita.%22%0A %7D,%0A %7B%0A message:%0A %22Did you know? Riverbend is home to the 8th Wonder of The World. That's right, the Porta-Joh
+If you weren't able to make it to the Riverbend Run this morning, don'... |
a41952344fcee10052e917e0164434ee6ad7efe2 | fix test | tests/plugin_jsmockito_test.js | tests/plugin_jsmockito_test.js | var expect = require("chai").expect;
var Studio = require('../src/studio');
var jsMockito = require('jsmockito').JsMockito;
Studio = Studio.module('plugin_jsmockito');
describe("JSMockito plugin",function(){
Studio.use(Studio.plugin.JsMockito(jsMockito));
Studio(function basic(a,b){
return a+b;
});
... | JavaScript | 0.000002 | @@ -1753,16 +1753,18 @@
.once())
+()
;%0A
|
5e7fdc3a3b3c71c8be37e95ae561311642a409f8 | Trim value only if it's string (#2546) | src/base/reader.js | src/base/reader.js | import * as utils from "base/utils";
import Class from "base/class";
/**
* Initializes the reader.
* @param {Object} reader_info Information about the reader
*/
const Reader = Class.extend({
QUERY_FROM_CONCEPTS: "concepts",
QUERY_FROM_DATAPOINTS: "datapoints",
QUERY_FROM_ENTITIES: "entities",
CONDITION_CA... | JavaScript | 0.000001 | @@ -4131,24 +4131,51 @@
onst value =
+ utils.isString(row%5Bkey%5D) ?
row%5Bkey%5D.tr
@@ -4178,16 +4178,27 @@
%5D.trim()
+ : row%5Bkey%5D
;%0A
|
fc9ed36e5d625a1015844c8213875957bdcdd64c | use correct resource type for batch resource | ui/admin/client/scripts/pages/authorizations.js | ui/admin/client/scripts/pages/authorizations.js | /* global define: false */
'use strict';
var fs = require('fs');
var template = fs.readFileSync(__dirname + '/authorizations.html', 'utf8');
var confirmTemplate = fs.readFileSync(__dirname + '/confirm-delete-authorization.html', 'utf8');
module.exports = [ '$routeProvider', function($routeProvider) {
$routePr... | JavaScript | 0 | @@ -1167,17 +1167,17 @@
1
-1
+3
: 'Batch
@@ -2124,17 +2124,17 @@
1
-1
+3
: %5B 'REA
@@ -2128,32 +2128,42 @@
13: %5B 'READ',
+ 'UPDATE',
'CREATE', 'DELE
|
954e16e19cdd135dda2d2d6c1b604bb9a862ac7b | Mark jQuery as an external | webpack.mix.js | webpack.mix.js | let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applica... | JavaScript | 0 | @@ -28,16 +28,81 @@
mix');%0A%0A
+mix.webpackConfig(%7B%0A externals: %7B%0A jquery: %22jQuery%22%0A %7D%0A%7D);%0A%0A
/*%0A %7C---
|
0cc1f93997d3d0789f52671cc161318badf11040 | Use sha1 module from core in generator package | javascript/generator/test/summarizer.js | javascript/generator/test/summarizer.js | (function () {
'use strict';
var assert = require('assert');
var _ = require('underscore');
var summarizer = require('../src/summarizer');
var sha1 = require('../src/sha1');
var utils = require('./utils_typedarrays');
function assertThatSetOfArrayEquals(arr1, arr2) {
assert.equal(arr1.lenght, arr2.l... | JavaScript | 0 | @@ -159,26 +159,32 @@
= require('
-..
+mathsync
/src/sha1');
|
34473936c2124979a41aef46f38e677bb179bfd0 | Update hosts of shr77.com | src/sites/link/shr77.com.js | src/sites/link/shr77.com.js | $.register({
rule: 'http://shr77.com/*',
ready: function () {
'use strict';
// Interstitial and iframed pages
var l = document.head.innerHTML.match(/\$\('a#loading'\)\.attr\('href',"([^"]+)"\);/);
if (typeof l[1] != 'undefined') {
$.openLink(l[1]);
}
},
});
// ex: ts=2 sts=2 sw=2 et
/... | JavaScript | 0 | @@ -18,28 +18,71 @@
le:
-'http://shr77.com/*'
+%7B%0A %09host: /%5Eshr(44%7C55%7C77)%5C.com%7Ccpv%5C.(bz%7Cli)%7Ccpv%5C.acb%5C.im$/%0A %7D
,%0A
@@ -497,9 +497,8 @@
width 2;
-%0A
|
16e721d7793a873e883d65997409ec1003f4dd28 | Fix broken node rewrite | src/som/interpreter/Node.js | src/som/interpreter/Node.js | /*
* Copyright (c) 2014 Stefan Marr, mail@stefan-marr.de
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify,... | JavaScript | 0.000001 | @@ -1613,16 +1613,61 @@
false;%0A%0A
+ // eslint-disable-next-line guard-for-in%0A
for
@@ -1693,28 +1693,40 @@
nt) %7B%0A
-if (
+const isChild =
prop.indexOf
@@ -1744,24 +1744,35 @@
%3E= 0
-) %7B
+;
%0A
- if (
+const isChildren =
prop
@@ -1797,16 +1797,75 @@
_') %3E= 0
+;%0A if (isCh... |
534cc654848f5e705cb48e910efe835cb70b2dbe | fix (statement: repeat) iterate between start and end | src/statements/10.repeat.js | src/statements/10.repeat.js | (function(){
custom_Statements['repeat'] = {
render: function(node, model, ctx, container, ctr, children){
var run = expression_eval,
str = node.expression,
repeat = str.split('..'),
index = + run(repeat[0] || '', model, ctx, ctr),
length = + run(repeat[1] || '', model, ctx, ctr);
if (index !=... | JavaScript | 0.000313 | @@ -194,21 +194,21 @@
'),%0A%09%09%09%09
-index
+start
= + run
@@ -247,22 +247,19 @@
r),%0A%09%09%09%09
-l
en
-gth
+d
= + run
@@ -306,44 +306,38 @@
if (
-index !== index
+start !== start
%7C%7C
-l
en
-gth
+d
!==
-l
en
-gth
+d
) %7B%0A
@@ -471,9 +471,16 @@
i =
--
+start -
1;%0A%09
@@ -498,14 +498,11... |
389d96bc46047bf2791b2fc6bf8200d68f7673ed | Use optimistic removedTagsAccountData state in TagOrderStore | src/stores/TagOrderStore.js | src/stores/TagOrderStore.js | /*
Copyright 2017 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
... | JavaScript | 0 | @@ -3456,24 +3456,97 @@
quest.tags,%0A
+ removedTagsAccountData: payload.request.removedTags,%0A
|
4394271393f11c2dfba7bd4e54873b9a3862b522 | use classed name for directive controllers | templates/app/directive.js | templates/app/directive.js | /**
* @ngdoc directive
* @name <%= scriptAppName %>.directive:<%= cameledName %><%= nameSuffix %>
* @description
* # <%= cameledName %><%= nameSuffix %>
*/
(function() {
'use strict';
angular
.module('<%= scriptAppName %>')
.directive('<%= cameledName %><%= nameSuffix %>', <%= cameledName... | JavaScript | 0 | @@ -554,28 +554,28 @@
oller: %3C%25= c
-amel
+lass
edName %25%3E%3C%25=
@@ -824,36 +824,36 @@
function %3C%25= c
-amel
+lass
edName %25%3E%3C%25= nam
|
9ae8b3ef08a102a2ea75e5cbee7a6d8ddca005a8 | Handle promise rejection in before hook | test/cluster/shard-move.js | test/cluster/shard-move.js | /* global describe, it, before, after */
"use strict";
const InstanceManager = require("../../InstanceManager.js");
const expect = require("chai").expect;
const arangojs = require("arangojs");
const rp = require("request-promise");
const _ = require("lodash");
describe("Move shards", function() {
let instanceManager... | JavaScript | 0 | @@ -1016,16 +1016,148 @@
ervers;%0A
+ %7D)%0A .catch(e =%3E %7B%0A // handle a failed before hook like a failed test%0A aTestFailed = true;%0A throw e;%0A
%7D)
|
4ee7e3f720c5270f7e9834a04a4804e422a9c558 | Fix inputting custom diets | frontend/src/components/SignUp.js | frontend/src/components/SignUp.js | // Copyright 2020 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// https://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writin... | JavaScript | 0.000626 | @@ -1520,20 +1520,94 @@
(this);%0A
+ this.handleCustomDietChange = this.handleCustomDietChange.bind(this);%0A
%7D%0A
-
%0A rende
@@ -3225,16 +3225,96 @@
=%7Bitem%7D%0A
+ onChange=%7Bevent =%3E this.handleCustomDietChange(event, index)%7D%0A
@@ -4745,16 +4745,16 @@
;%0A %7D%0A
-
... |
b6f3bd8153d044a62c854ee4191d39876b0955e4 | use OpenStreetMap by default in wms-demo because Google base layers not accessible ATM | wms-demo/src/main/webapp/js/base-layers-3857.js | wms-demo/src/main/webapp/js/base-layers-3857.js | var map;
function init() {
///////////////////////////////////////////
// setup the base map with google layers
///////////////////////////////////////////
map = new OpenLayers.Map('map', {
projection: 'EPSG:3857',
layers: [
new OpenLayers.Layer.Google(
... | JavaScript | 0.000002 | @@ -257,16 +257,72 @@
yers: %5B%0A
+ new OpenLayers.Layer.OSM( %22OpenStreetMap%22),%0A
@@ -929,64 +929,8 @@
)
-,%0A new OpenLayers.Layer.OSM( %22OpenStreetMap%22)
%0A
|
86b0648130ddd41689709081ce81af99bae09737 | Add comment how prompting is working | generators/app/steps/prompting.js | generators/app/steps/prompting.js | /**
* Step 2
* Where you prompt users for options (where you'd call this.prompt())
*/
var chalk = require('chalk'),
assign = require('../util').assign,
questions = require('../questions');
module.exports = {
/**
* Ask database questions
*/
askDatabaseQuestions: function () {
var d... | JavaScript | 0 | @@ -77,16 +77,173 @@
rompt())
+.%0A *%0A * Questions is required from ../questions folder.%0A * Each of answers is mixin to this.answers attribute and available in templates as answers variable.
%0A */%0A%0Ava
|
944ea06f1ef713567c2ea70726e6bb3c618f4055 | Update server.js | app/config/server.js | app/config/server.js | 'use strict';
import dbg from 'debug';
import app from './../../app';
import http from 'http';
const debug = dbg('nerd-stack:server');
const port = normalizePort(process.env.PORT || '3000');
app.set('port', port);
let server = http.createServer(app);
server.listen(port);
server.on('error', onError);
server.on('li... | JavaScript | 0.000001 | @@ -90,17 +90,16 @@
http';%0A%0A
-%0A
const de
|
a7a80e004ac00c783e392519a69f39fe54f6cf05 | remove the extra lines | frontend/src/components/Utils/utils.js | frontend/src/components/Utils/utils.js | /**
* Format a timestamp (in milliseconds) into a pretty string with just the time.
*
* @param {int} msTimestamp
* @param {string} timezone
* @returns {string} Time formatted into a string like '10:19 AM'.
*/
export function timestampToTimeFormatted(msTimestamp, timezone = 'America/New_York') {
const date = n... | JavaScript | 0.999999 | @@ -1085,10 +1085,8 @@
ons);%0A%7D%0A
-%0A%0A
|
a3f988dc8abc383ec1d410f7b2892efdcc6bbb43 | Fix "Copy Class" popup scrollbar issue | public/javascripts/manage_classes.js | public/javascripts/manage_classes.js | /**
* @author Suhas B. Sanmukh
*/
function showCopyClassPopup(copy_clazz_id, clazz_name, class_word, class_description)
{
teacher_clazz_name = decodeURIComponent(clazz_name);
class_word = decodeURIComponent(class_word);
class_description = decodeURIComponent(class_description);
var oInnerHtml = ... | JavaScript | 0 | @@ -1930,17 +1930,17 @@
eight: 2
-5
+7
0%7D).setC
|
399eb5e3bfbd4a78e204e7378847ed017a0f6bab | Add sponsor link in navbar | docs/.vuepress/config.js | docs/.vuepress/config.js | const path = require('path');
const postcssPresetEnv = require('postcss-preset-env');
const tailwindcss = require('tailwindcss');
module.exports = {
title: 'V-Calendar',
description: 'An elegant calendar and datepicker plugin for Vuejs.',
plugins: [
// Google analytics
['@vuepress/google-analytics', { ga... | JavaScript | 0 | @@ -620,24 +620,123 @@
',%0A %7D,%0A
+ %7B%0A text: 'Sponsor',%0A link: 'https://github.com/sponsors/nathanreyes',%0A %7D,%0A
%5D,%0A s
|
54bc8ccb16e3f9578ccbbf937d2b6097504bd7ca | Make sure that we normalize paths. | src/web/helpers/serveBuild.js | src/web/helpers/serveBuild.js | const path = require('path');
const mime = require('mime');
function serveBuild(registry) {
return async function(req, res, next) {
const username = req.user && req.user.username;
const branchId = await registry.models.user.getBranch(username);
const {bucketId, overlays} = await registry.models.branch.ge... | JavaScript | 0 | @@ -436,16 +436,109 @@
lit('/')
+.reduce((valid, seg) =%3E %7B%0A return seg.length %3E 0 ? valid.concat(seg) : valid;%0A %7D, %5B%5D)
;%0A%0A l
@@ -604,16 +604,34 @@
filePath
+Segments.join('/')
;%0A%0A i
|
60758057ddffc61b4cf215581f7cbb94ff1bba77 | Undo changes to /discover page. | client/js/controllers/photo-stream-controller.js | client/js/controllers/photo-stream-controller.js | "use strict";
var PhotoStreamController = function($scope, $http, $log, $timeout, analytics, resourceCache) {
$http({method: "GET", url: "/api/v1/hikes?fields=distance,locality,name,photo_facts,photo_preview,string_id", cache: resourceCache}).
success(function(data, status, headers, config) {
var hikes = jQuery.... | JavaScript | 0 | @@ -298,222 +298,145 @@
%0A%09%09%09
-var hikes = jQuery.grep(data, function(hike)%7B%0A%09%09%09%09// Quick and dirty way of checking whether the entry is good enough to show on the /discover page,%0A%09%09%09%09// Maybe want them to go through a curation process some day.
+// Only show the hikes that have photo prev... |
ebdf6d65be70d9d59939031a97532f2167625a79 | allow making tournaments 3 months in advance | public/javascripts/tournamentForm.js | public/javascripts/tournamentForm.js | $(function() {
var $variant = $('#form3-variant');
var $position = $('.form3 .position');
function showPosition() {
$position.toggleNone($variant.val() == 1);
};
$variant.on('change', showPosition);
showPosition();
$('form .conditions a.show').on('click', function() {
$(this).remove();
$('fo... | JavaScript | 0 | @@ -476,16 +476,20 @@
24 * 31
+ * 3
),%0A d
|
39401cc46b6e190c856c256e69db1de45d2d4748 | Change return values for classes | client/views/home/residents/resident/resident.js | client/views/home/residents/resident/resident.js | Template.homeResident.created = function () {
// Get reference to template instance
var instance = this;
// Get resident ID as instance variable, for clarity
instance.residentId = instance.data._id;
// Create resident activity count reactive variable
instance.residentActivityCount = new ReactiveVar();
... | JavaScript | 0.000001 | @@ -984,22 +984,16 @@
return '
-label-
success'
@@ -1067,22 +1067,16 @@
return '
-label-
warning'
@@ -1135,14 +1135,8 @@
rn '
-label-
dang
@@ -2046,12 +2046,244 @@
nt;%0A %7D%0A%7D);%0A
+%0ATemplate.homeResident.events(%7B%0A 'click .resident': function () %7B%0A // Get ID of clicked resident%0A var resi... |
90691c9b9b8874d9257fd0db70d7d2326552e78f | Add support for progress button colors | script.js | script.js | angular.module('progressButtonDemo', [])
.controller('ProgressButtonsCtrl', function($scope) {
})
.directive('progressButton', function() {
return {
scope: true,
link: function(scope, element, attrs) {
element.attr('data-type', attrs.progressButtonType)
element.attr('data-loading', attrs.progressBut... | JavaScript | 0 | @@ -431,16 +431,95 @@
tton')%0A%0A
+%09%09%09%09if(attrs.progressButtonColor) element.addClass(attrs.progressButtonColor)%0A%0A
%09%09%09%09scop
|
35b073c7475a8d7a1a3d797af616ad00109c3a0f | Fix logging of fields | examples/webhooks-docker/routes/inbound-parse.js | examples/webhooks-docker/routes/inbound-parse.js | const express = require('express')
const router = express.Router()
const formidable = require('express-formidable')
router.use(formidable())
router.post('/', (req, res) => {
console.log('---------- START RECEIVED WEBHOOK DATA ----------')
// Email data comes in as a form. Using express-formidable to
// ... | JavaScript | 0.000005 | @@ -811,74 +811,8 @@
%0A
- // TODO: The server is sending a non JS compliant key name%0A //
con
@@ -817,35 +817,32 @@
onsole.log()%0A
- //
console.log('CO
@@ -866,17 +866,18 @@
q.fields
-.
+%5B%22
content-
@@ -879,16 +879,18 @@
tent-ids
+%22%5D
)%0A co
@@ -1440,74 +1440,8 @@
%0A
- // TODO: The... |
d757b38073c8b3ba2d58029dc1c693e81f736b18 | use const for hostname | script.js | script.js | var Preview = {
// delay after keystroke before updating
delay: 125,
// filled in by Init below
preview: null,
// filled in by Init below
buffer: null,
// store setTimout id
timeout: null,
// true when MathJax is processing
jaxRunning: false,
// used to check if an update i... | JavaScript | 0.000002 | @@ -1,12 +1,61 @@
+var API_HOST = 'http://svgtopng.herokuapp.com';%0A%0A
var Preview
@@ -3556,38 +3556,20 @@
ign(
-'http://svgtopng.herokuapp.com
+API_HOST + '
/i/'
@@ -3615,39 +3615,16 @@
T',
-'http://svgtopng.herokuapp.com'
+API_HOST
);%0A%09
|
0b48f6cb54ea712a8e786973304d4012c9741404 | clear drawing and textbox on message save | script.js | script.js | // This example displays a marker at the center of Australia.
// When the user clicks the marker, an info window opens.
var map, myPos, myMarker, myInfoWindow;
var myFirebaseRef = new Firebase("https://googlemapmessages.firebaseio.com/");
var mode = "text";
var id = 0;
function initMap() {
var center = {lat: -0, lng... | JavaScript | 0 | @@ -3035,16 +3035,26 @@
%7D);%0A %7D%0A
+ text();%0A
myInfo
|
ec26565f793fc4eef1cc13ae8b9751712c44391b | Work on stabilization | script.js | script.js | /*
* Websensor video stabilization project
* https://github.com/jessenie-intel/websensor-video
*
* Copyright (c) 2017 Jesse Nieminen
*
* 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
*... | JavaScript | 0.00001 | @@ -3587,16 +3587,59 @@
ebm%22%7D);%0A
+ console.log(blob);%0A
%09%09
|
bc2b17c1d7a5553fa5aa42c7edd564d2ac51a0db | Save the timesheet each time the user navigates between cells. | script.js | script.js | // ==UserScript==
// @name Harvest Timesheets UI Improvements
// @namespace adamalton.co.uk
// @version 0.1
// @description Make the Harvest timesheet interface less painful
// @match https://*.harvestapp.com/time/week*
// @copyright 2014+, Adam Alton
// ==/UserScript==
;(function(){
//**********... | JavaScript | 0 | @@ -3885,16 +3885,48 @@
ion(e)%7B%0A
+ var isNavEvent = false;%0A
@@ -3966,16 +3966,16 @@
!= -1)%7B%0A
-
@@ -4312,35 +4312,40 @@
-return fals
+isNavEvent = tru
e;%0A %7D
@@ -4463,35 +4463,40 @@
-return fals
+isNavEvent = tru
e;%0A %7D
@@ -4520,24 ... |
f9b83e63363e2d2baa1a6d42a551ad90e77dc42d | Make button work | sencha.js | sencha.js | new Ext.Application({
launch: function() {
//alert ("Hello");
var handleNavigation = function(btn) {
var currentPanel = myPanel.down("#cardPanel").getActiveItem();
var indexOfCurrentPanel = myPanel.down("#cardPanel").items.items.indexOf(currentPanel);
var newInde... | JavaScript | 0.000004 | @@ -363,36 +363,32 @@
-var
newIndex = index
@@ -551,36 +551,32 @@
-var
newIndex = index
@@ -724,16 +724,18 @@
+//
alert(%22H
@@ -742,10 +742,13 @@
ello
-%22.
+ %22 +
newI
|
91a0f92b9314d74b9a143a6ead8ff912794374f6 | split messages to server-side canvas | server.js | server.js | /**
* @file: server-side entry point.
*/
var log = require('debug')('ab:server');
var domain = require('domain');
var http = require('http');
var server = http.createServer();
var graft = require('graft')();
var ws = require('graft/ws');
var subscribe = require('./subscribe');
graft.where... | JavaScript | 0.000001 | @@ -188,16 +188,70 @@
ver();%0A%0A
+var canvas = new (require('canvas'))(1920, 1080);%0A%0A
var graf
@@ -274,18 +274,16 @@
'graft')
-()
;%0Avar ws
@@ -357,14 +357,101 @@
');%0A
-%0Agraft
+var invoke = require('./invoke');%0A%0Avar main = graft();%0Avar merge = graft();%0A%0Amain
.whe
@@ -486,16 +48... |
ea7b549db2f08c0ed2e665d52a0bb09245c532d4 | test ambient regex | server.js | server.js | 'use strict'
// comment
const express = require('express')
const Slapp = require('slapp')
const ConvoStore = require('slapp-convo-beepboop')
const Context = require('slapp-context-beepboop')
// use `PORT` env var on Beep Boop - default to 3000 locally
var port = process.env.PORT || 3000
var slapp = Slapp({
// Bee... | JavaScript | 0.000001 | @@ -458,17 +458,16 @@
t()%0A%7D)%0A%0A
-%0A
var HELP
@@ -808,16 +808,17 @@
e.%0A%60%0A%0A//
+
********
@@ -898,16 +898,17 @@
sages%0A//
+
********
@@ -2435,18 +2435,16 @@
%60%5C%60%5C%60%60)%0A
-
// At
@@ -2942,16 +2942,15 @@
ge(/
-%5E(
px-
-123
+(%5Cd+
)/i,
@@ -3139,140 +3139,190 @@
s%0A
-msg.say(... |
4fdb6d73873d6e41b55780a51932f63906413b01 | Update copyright notice | server.js | server.js | var _ = require('lodash');
var AsyncCache = require('async-cache');
var Cache = require('./lib/cache');
var Config = require('./lib/config');
var Fs = require('fs');
var Handlers = require('./lib/handlers');
var Http = require('http');
var Https = require('https');
var Lactate = require('lactate');
var Log = require('l... | JavaScript | 0 | @@ -1,12 +1,78 @@
+/**%0A * Copyright (c) ActiveState 2013 - ALL RIGHTS RESERVED.%0A */%0A%0A
var _ = requ
|
a0a726e2a232a1b01e62ebd886ba8d9fd3211c57 | change around socket.io references to have a better understanding of Azure hosting env | server.js | server.js | var url = require('url');
var express = require('express');
var app = express();
var server = require('http').createServer(app);
var port = process.env.PORT || 3000;
var io = require('socket.io').listen(server);
const uuidv4 = require('uuid/v4');
app.get('/', function (req, res) {
res.sendfile('index.html');
});
s... | JavaScript | 0 | @@ -82,57 +82,8 @@
var
-server = require('http').createServer(app); %0Avar
port
@@ -109,16 +109,47 @@
%7C%7C 3000
+;%0Avar server = app.listen(port)
;%0Avar io
@@ -298,30 +298,8 @@
);%0A%0A
-server.listen(port);%0A%0A
io.o
|
262efe61199cdd4fc57cacf1d01119351d1a9883 | Add doc/no-cache folder | server.js | server.js | /* jshint node: true, browser: false */
'use strict';
// LOG UNHANDLED EXCEPTION AND EXIT
process.on('uncaughtException', function (err) {
console.error((new Date()).toUTCString() + ' uncaughtException:', err.message);
console.error(err.stack);
process.exit(1);
});
///////////////////////////////////////////////... | JavaScript | 0.000001 | @@ -517,20 +517,58 @@
//%0A%0Avar
-http
+path = require('path');%0Avar http
= requi
@@ -577,19 +577,21 @@
('http')
-,%0A
+;%0Avar
express
@@ -591,16 +591,18 @@
express
+
= requir
@@ -613,19 +613,21 @@
xpress')
-,%0A
+;%0Avar
httpPro
@@ -651,24 +651,25 @@
p-proxy');%0A%0A
+%0A
// Create se
@... |
3972deaecbf9993243d6c9d2883ddf98d4ebfdf3 | support for favicon | server.js | server.js | // server.js
//
// main function for activity pump application
//
// Copyright 2011, StatusNet 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/license... | JavaScript | 0 | @@ -1775,24 +1775,55 @@
typump%22)%7D),%0A
+ connect.favicon(),%0A
|
5af0ad905a33c43ebcc00aead5186680ecc98216 | Add meetup api | server.js | server.js | var express = require('express');
var app = express();
app.get('/', function(req, res) {
res.end('Analyse Meetup Atteendees')
});
app.listen(9000); | JavaScript | 0.00002 | @@ -118,16 +118,111 @@
Atte
-e
ndees')
+%0A%7D);%0A%0Aapp.get('/api/analyse-meetup', function(req, res) %7B%0A res.json(%7B%0A 'attendees': %5B%5D%0A %7D);
%0A%7D);
|
7a0c3211aafc8c1650e37df4f9abd5075ee5a858 | Fix start | server.js | server.js | var Hapi = require('hapi');
var Jill = require('jill');
var Leblanc = require('leblanc');
var server = new Hapi.Server();
server.connection({ port: 15031 });
server.plugins.register(Jill, function (err) {
if (err) {
console.error(err);
}
});
server.plugins.register(Leblanc, { apiUrl: 'http://jshoed... | JavaScript | 0.000005 | @@ -157,32 +157,24 @@
%7D);%0A%0Aserver.
-plugins.
register(Jil
@@ -229,32 +229,59 @@
ole.error(err);%0A
+ process.exit(err);%0A
%7D%0A%7D);%0A%0Aserve
@@ -286,24 +286,27 @@
ver.
-plugins.
+register(%7B
register
(Leb
@@ -305,17 +305,18 @@
ster
-(
+:
Leblanc,
%7B a
@@ -311,16 +311,25 @@
Leblanc,... |
f94ade3ed79f9c8e51e916c13f0cd374deff5e6f | Make server.js executable | server.js | server.js | var deploy = require('./index');
var config = require ('./config');
var http = require('http');
var url = require('url');
var listenPort = (config.server && config.server['listenPort']) || 8187;
var listenAddress = (config.server && config.server['listenAddress']) || '0.0.0.0';
http.createServer(function (req, res) ... | JavaScript | 0 | |
b30969dcd18e70425cd55136556f28c7de5117d4 | update img location | server.js | server.js | (function () {
'use strict';
var MongoClient = require('mongodb').MongoClient, restify = require('restify'), assert = require('assert'), ObjectId = require('mongodb').ObjectID;
//Needs to impliment aggregate stuff (https://docs.mongodb.com/manual/reference/operator/aggregation/)
//Need to impliment ma... | JavaScript | 0.000001 | @@ -6783,21 +6783,16 @@
y: %22
-./server_imgs
+/var/www
%22%0A
|
75d2b89d79b76dc69c700eed0974918192ca038a | Handle if req.prerender is not set | server.js | server.js | "use strict";
const http = require("http");
const util = require("./lib/util");
const server = require("prerender/lib/server");
const express = require("express");
const app = express();
const bodyParser = require("body-parser");
const compression = require("compression");
const morgan = require("morgan");
server.ini... | JavaScript | 0.000001 | @@ -599,32 +599,57 @@
ion(req, res) %7B%0A
+ if (req.prerender) %7B%0A
return req.pre
@@ -694,16 +694,34 @@
_MISS%22;%0A
+ %7D%0A return %22-%22;%0A
%7D);%0A%0Amor
@@ -768,32 +768,50 @@
res) %7B%0A return
+ (req.prerender &&
req.prerender.u
@@ -812,16 +812,24 @@
nder.url
+) %7C%7C %22-%22
;%0A%7D);%0A... |
0cfe59d8d621e8d78c69b791270474b02094e09f | Use MONGODB_URI | server.js | server.js | const express = require('express')
const subdomain = require('express-subdomain')
const bodyParser = require('body-parser')
const morgan = require('morgan')
const mongoose = require('mongoose')
const autoIncrement = require('mongoose-auto-increment')
const port = process.env.PORT || 3000
const databaseURL = process.en... | JavaScript | 0.000082 | @@ -319,20 +319,19 @@
env.
-DATABASE_URL
+MONGODB_URI
%7C%7C
|
68d92e3b7b5861e8fc995ff58376a05dc390e63f | update 6 | server.js | server.js | var express = require('express'),
app = express(),
http = require('http'),
server = http.createServer(app),
request_lib = require('request'),
cheerio = require('cheerio'),
io = require('socket.io')(server);
io.configure(function () {
io.set("transports", ["xhr-polling"]);
io.set("polling ... | JavaScript | 0 | @@ -225,16 +225,19 @@
rver);%0A%0A
+//
io.confi
@@ -256,16 +256,19 @@
n () %7B %0A
+//
io.set
@@ -301,16 +301,19 @@
ng%22%5D); %0A
+//
io.set
@@ -339,16 +339,19 @@
, 10); %0A
+//
%7D);%0A%0Aio.
@@ -386,19 +386,16 @@
cket)%7B%0A
- //
io.set(
@@ -427,19 +427,16 @@
ng%22%5D);%0A
- //
io.set(
|
dcdb5f514651b07b9217d990020814a74192cedb | fix PUT/OPTIONS | server.js | server.js | var express = require('express'),
bodyParser = require('body-parser'),
path = require('path'),
mongoose = require('mongoose'),
app = express(),
port = process.env.PORT || 5000;
// Routes
//var facebookAuth = require('./routes/facebookAuth'),
var boards = requir... | JavaScript | 0.000026 | @@ -466,33 +466,33 @@
%7B%0A res.header(
-%22
+'
Access-Control-A
@@ -506,14 +506,91 @@
igin
-%22, %22*%22
+', '*');%0A res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'
);%0A
@@ -601,17 +601,17 @@
.header(
-%22
+'
Access-C
@@ -634,12 +634,12 @@
ders
-%22, %22
+', '
Orig
@@ -684,11 +6... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.