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
a487939efae93507dfd5d95d7effa99acd952a9f
Fix field name
mac/resources/open_CNTL.js
mac/resources/open_CNTL.js
define(['mac/roman'], function(macintoshRoman) { 'use strict'; return function(resource) { var dv = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byteLength); resource.dataObject = { rectangle: { top: dv.getInt16(0, false), left: dv.getInt16(2, false), ...
JavaScript
0.000003
@@ -491,16 +491,12 @@ -closeBox +fill : !!
c2c721a971a04cc308a3c68432c259486f1cd6d0
modify variable name
mock/getData.js
mock/getData.js
import * as homeList from './home/list' import * as cityData from './city/city' const setpromise = data => { return new Promise((resolve, reject) => { resolve(data) }) } var homeListData = ()=>setpromise(homeList.data) var cityData = () => setpromise(cityData.searchdata) export {homeListData,cityData}
JavaScript
0.000037
@@ -50,20 +50,16 @@ as city -Data from '. @@ -250,20 +250,16 @@ ise(city -Data .searchd
e55405e2864cf63073ce1d96274a60702047ffef
Change Florence bar
src/main/web/js/main.js
src/main/web/js/main.js
( function($) { var intIntervalTime = 100; var newpage; var pageurl = window.location.href; setupFlorence(); renderPage(); var checkLocation = function() { if (pageurl != window.location.href) { pageurl = window.location.href; $(window.location).trigger("change", { newpage: getPageData() }); ...
JavaScript
0
@@ -2988,16 +2988,45 @@ e_bar =%0A +%09%09%09'%3Cdiv class=%22florence%22%3E'%0A%09 %09%09%09'%3Cdiv @@ -3134,23 +3134,27 @@ '%3Cli +%3E%3Ca href=%22 +# %22%3EEdit%3C/ li%3E' @@ -3149,16 +3149,20 @@ %22%3EEdit%3C/ +a%3E%3C/ li%3E' +%0A%09 @@ -3189,16 +3189,28 @@ %09%09%09'%3Cli%3E +%3Ca href=%22#%22%3E Save ...
734bfc1fb7ef9202294bba5058ea7102dd103e74
Fix case: tostring to toString
mac/resources/open_VWSC.js
mac/resources/open_VWSC.js
define(function() { 'use strict'; return function(item) { return item.getBytes().then(function(bytes) { var dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); if (dv.getUint32(0, false) !== bytes.length) { return Promise.reject('length does not match data'); } ...
JavaScript
0.999999
@@ -908,17 +908,17 @@ ' + v.to -s +S tring(16
8d0ddf5e8940b5946f06a1f301cfad7103232afe
fix variable resource: add query parameter handlng
lib/api-client/resources/variable.js
lib/api-client/resources/variable.js
'use strict'; var AbstractClientResource = require('./../abstract-client-resource'); /** * Variable Resource * @class * @memberof CamSDK.client.resource * @augments CamSDK.client.AbstractClientResource */ var Variable = AbstractClientResource.extend(); /** * Path used by the resource to perform HTTP queries ...
JavaScript
0.000001
@@ -8552,21 +8552,280 @@ ion( -data, done) %7B +params, done) %7B%0A%0A var body = %7B%7D;%0A var query = %7B%7D;%0A var queryParams = %5B'firstResult', 'maxResults', 'deserializeValues'%5D;%0A%0A for (var p in params) %7B%0A if (queryParams.indexOf(p) %3E -1) %7B%0A query%5Bp%5D = params%5Bp%5D;%0A %7D...
adccf6fef394bece02436cb0b786684125d1efc9
Fix spelling
lib/coffeeBreak.js
lib/coffeeBreak.js
var ProjectScanner = require('./projectScanner'), pkg = require('../package.json'); module.exports = function() { // "use strict"; var CoffeeBreak = function() { }; CoffeeBreak.prototype.runTests = function() { var projectScanner = new ProjectScanner(); projectScanner.scan(process.cwd(), function() { ...
JavaScript
0.999999
@@ -517,24 +517,29 @@ __ __ + _ @@ -544,27 +544,24 @@ _ - %5Cn';%0A%09%09b @@ -616,16 +616,21 @@ / _%7C/ _%7C + ___ ___%7C %7C_ @@ -652,19 +652,16 @@ _%7C %7C __ - %5Cn';%0A%09%09b @@ -721,16 +721,22 @@ %7C %7C_ / _ + %5C%5C/ _ %5C%5C %5C'_ @@ -760,19 +760,16 @...
6483177be47b8e39add53823bc53f48541eecb80
add option to emit to all to socket
lib/bundles/socket/helpers/socket.js
lib/bundles/socket/helpers/socket.js
/** * Created by Awesome on 3/13/2016. */ // use strict 'use strict'; // require dependencies var helper = require ('helper'); // require local dependencies var config = require ('app/config'); /** * build socket helper class */ class socket extends helper { /** * construct socket hel...
JavaScript
0
@@ -675,16 +675,17 @@ %7BString%7D + name%0D%0A @@ -698,32 +698,33 @@ @param %7BString%7D + type%0D%0A * @p @@ -724,32 +724,33 @@ * @param %7B*%7D + data%0D%0A @@ -737,32 +737,62 @@ %7B*%7D data%0D%0A + * @param %7BBoolean%7D all%0D%0A */%0D%0A roo @@ -802,32 +802,37 ...
0ba3891e4a92f69d6ef7a2d2a8617d859b5075b1
Set default value for channel.is_private to false
lib/collections/ChannelCollection.js
lib/collections/ChannelCollection.js
"use strict"; const Constants = require("../Constants"); const Events = Constants.Events; const ChannelTypes = Constants.ChannelTypes; const Utils = require("../core/Utils"); const BaseCollection = require("./BaseCollection"); const Channel = require("../models/Channel"); const PermissionOverwrite = require("../model...
JavaScript
0.001731
@@ -1279,16 +1279,25 @@ _private + %7C%7C false ,%0A pe
140cf9e6c556fb9351960ae2afad30186858a6b3
Fix error message
lib/core/filter/util/moduleLoader.js
lib/core/filter/util/moduleLoader.js
const glob = require('glob'); const path = require('path'); const DEEP_EXT_JS = "/**/*.js"; class ModuleLoader { constructor(folder) { const files = glob.sync(path.resolve(path.join(folder, DEEP_EXT_JS))); this.modules = files.map(file => require(path.resolve(file))); } getModuleByName(name) { const findedMo...
JavaScript
0.000012
@@ -461,17 +461,16 @@ ling of - %22 + name
96a65a57d041490772af9c1615356cffd0b640b1
Use global constants
common/models/recall.js
common/models/recall.js
var request = require('request'); var log4js = require('log4js'); log4js.configure('server/log4js_configuration.json', {}); var logger = log4js.getLogger('recall'); module.exports = function(Recall) { //Implementation of Rest End Point for '/recalls' path, return Response with "response" JSON object with matadata and...
JavaScript
0.000003
@@ -374,20 +374,17 @@ ic drug -name + %0ARecall. @@ -463,35 +463,32 @@ L = -'https://api.fda.gov/drug/e +Recall.app.get('fdaDrugE nfor @@ -497,62 +497,61 @@ ment -.json?api_key=yiv5ZoikJg3kSSZ5edvsiqnJa9yvHoxrm6EWT8yi +Api') + 'api_key=' + Recall.app.get('fdaApiKey') + ' &sea
dfc2e001d39d228f3ae1f286e3b6c73480fcd5a1
fix middleware error message
src/middleware/error.js
src/middleware/error.js
const errorUtil = require('../../util/error'); class Error { handle(err, req, res, next) { this.logger.error(req.url + ' ' + err.message + '"', null, errorUtil.stack(err)); return res.render('core/middleware/error'); } } module.exports = Error;
JavaScript
0.000013
@@ -147,14 +147,8 @@ sage - + '%22' , nu
f76a8fe82f62848e79bbeb5fdbf2e17f018ae59f
Fix System.getFirebugVersion
lib/core/system.js
lib/core/system.js
/* See license.txt for terms of usage */ "use strict"; const { Cu, Ci } = require("chrome"); const { getMostRecentBrowserWindow } = require("sdk/window/utils"); const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); const { Services } = Cu.import("resource://gre/modules/Services.jsm", {});...
JavaScript
0
@@ -2961,67 +2961,146 @@ ;%0A -return bootstrappedAddons%5B%22firebug@software.joehewitt.com%22%5D +let addons = JSON.parse(bootstrappedAddons);%0A let firebug = addons%5B%22firebug@software.joehewitt.com%22%5D;%0A if (firebug) %7B%0A return firebug .ver @@ -3105,16 +3105,20 @@ ersion;%0A + %7D%0A %7D%0A%0A...
e705353443991aa012c7fbd03dc229fcd3849f9b
Fix syntax error in 'requiresSecure' middleware.
src/middleware/index.js
src/middleware/index.js
function requiresLogin(req, res, next) { if (!req.session.account) { return res.redirect('/'); } next(); } function requiresLogout(req, res, next) { if (req.session.account) { return res.redirect('/maker'); } next(); } function requiresSecure(req, res, next) { if (req.headers.x-forwarded-proto...
JavaScript
0
@@ -295,17 +295,18 @@ .headers -. +%5B' x-forwar @@ -314,16 +314,18 @@ ed-proto +'%5D != 'htt
b9f908e3152711a5be0616814c584c92251edcac
Allow refresh tokens to retrieve download links
lib/credentials.js
lib/credentials.js
"use strict"; var querystring = require("querystring"); var WebHelper = require("./webhelper.js"); const _accessToken = new WeakMap(); const _apiKey = new WeakMap(); const _apiSecret = new WeakMap(); const _username = new WeakMap(); const _password = new WeakMap(); const _refreshToken = new WeakMap(); const _hostName...
JavaScript
0
@@ -4496,18 +4496,8 @@ %7D%0A - %0A%0A %0A
9e51340926cf4d97e9a35bd600bf4ae4e8d66bd8
Fix thunk signature having anonymous functions
src/middleware/thunk.js
src/middleware/thunk.js
import isObservable from '../util/isObservable' import isPromise from '../util/isPromise' export function createThunkMiddleware(...extraArgs) { return dispatcher => agenda => agenda.map(thunkish => { if (typeof thunkish === 'function') { const res = thunkish( x => dispatcher.next(x), x => d...
JavaScript
0.000003
@@ -265,37 +265,32 @@ hunkish(%0A - x =%3E dispatcher.next @@ -289,18 +289,32 @@ her.next -(x +.bind(dispatcher ),%0A @@ -319,13 +319,8 @@ - x =%3E dis @@ -337,10 +337,24 @@ duce -(x +.bind(dispatcher ),%0A @@ -372,23 +372,16 @@ xtraArgs -%0A )%0A%0A
057c04cf2d4e5b03fb7bed7761ab62b1c2361fd8
Make Sequelize use settings from config file.
models/index.js
models/index.js
var Sequelize = require('sequelize'); var fs = require('fs'); var path = require('path'); var sequelize = new Sequelize('cacophony_metadata', 'test', 'pass', { host: '192.168.33.10', port: '5432', dialect: 'postgres' }); var models = {}; models.sequelize = sequelize; var modelFiles = fs.readdirSync(__dirname);...
JavaScript
0
@@ -87,141 +87,208 @@ ');%0A -%0Avar sequelize = new Sequelize('cacophony_metadata', 'test', 'pass', %7B%0A host: '192.168.33.10',%0A port: '5432',%0A dialect: 'postgres' +var config = require('../config');%0A%0Avar sequelize = new Sequelize(config.db.name, config.db.username, config.db.password, %7B%0A host: conf...
ec059db257403eef4810d9fbe5e5b9f73c0fd568
remove useless extension to Sequelize, semicolons
models/index.js
models/index.js
'use strict'; var Sequelize = require('sequelize'), path = require('path'), fs = require('fs'); var assert = require('assert'), debug = require('debug')('bshed:models'); // Sequelize extensions~ Sequelize.prototype.Model.prototype.findStrict = function findStrict () { var args = arguments; return new Promi...
JavaScript
0.000001
@@ -5,17 +5,16 @@ strict' -; %0A%0Avar Se @@ -91,17 +91,16 @@ re('fs') -; %0A%0Avar as @@ -171,428 +171,8 @@ ls') -;%0A%0A// Sequelize extensions~%0ASequelize.prototype.Model.prototype.findStrict = function findStrict () %7B%0A var args = arguments;%0A return new Promise(function findStrictPromise (resolve, rej...
1894a929007dd9bec9b35f6efc8352954ad5de75
apply webpack 2.2.0 config to karma config
test/karma.config.js
test/karma.config.js
var webpackConfig = require('../webpack/dev/webpack.config'); var isTravis = !!process.env.TRAVIS var webpack = require('webpack') delete webpackConfig.entry module.exports = function (config) { config.set({ browsers: ['PhantomJS'], singleRun: isTravis, frameworks: ['mocha', 'chai', 'sinon'], report...
JavaScript
0.000001
@@ -999,22 +999,20 @@ -loader +rule s: %5B%0A @@ -1173,16 +1173,23 @@ : 'babel +-loader ',%0A
1c8266dc34b64c101bd807ea35bf2cd235138a07
Update the login model unit test.
test/models/login.js
test/models/login.js
/* global describe, it */ import 'should'; import model from '../utils/model'; const session = { login: { provider: 'models', user: 'tester', }, }; describe('model login', () => { it('should pass validation when user match', () => model('login').validate({ provider: 'models', user: 'tes...
JavaScript
0
@@ -599,27 +599,87 @@ ies( -%5B'code', 'message'%5D +%7B%0A statusCode: 401,%0A message: 'Unanthorized, please login in.',%0A %7D )));
118472c1bfc0df76a1f0aef457bcf71d4abce29e
Check author before reading config:
src/modules/banwords.js
src/modules/banwords.js
const Confax = require('../bot.js') const fs = require('fs') const bot = Confax.bot const warnedUserIds = Confax.warnedUserIds bot.on('message', (message) => { if (message.guild === null) { return message } const config = Confax.getConfig(message.guild.id) const bannedWords = config.bannedWords if (mess...
JavaScript
0
@@ -172,48 +172,27 @@ age. -guild === null) %7B%0A return message%0A %7D +author.bot) return%0A %0A c @@ -286,41 +286,8 @@ ds%0A%0A - if (message.author.bot) return%0A co
e2da4f7803a0ac6cea71c0bea19de92ae9cb43c6
add timeout debounce
component/CopyButton.js
component/CopyButton.js
import React, { Component, PropTypes } from 'react'; import { findDOMNode } from 'react-dom'; import ZeroClipboard from 'zeroclipboard'; import classNames from 'classnames'; export default class CopyButton extends Component { constructor(props) { super(props); this.state = { copied: false }; } componen...
JavaScript
0.000001
@@ -262,16 +262,40 @@ rops);%0A%0A + this.timer = null;%0A%0A this @@ -487,21 +487,129 @@ rue %7D);%0A +%0A + if (this.timer) %7B%0A clearTimeout(this.timer);%0A this.timer = null;%0A %7D%0A%0A this.timer = setTime
51dbeaa2ef3f3b06d703de1e2cebbacf1ee0c65e
Test for property parsing.
test/spec/mmg_csv.js
test/spec/mmg_csv.js
describe('mmg csv', function() { it('can parse a simple csv file', function() { var csv = 'lat,lon\n10,15'; expect(mmg_csv(csv)[0].geometry.coordinates).toEqual([15, 10]); }); });
JavaScript
0
@@ -192,13 +192,202 @@ %0A %7D); +%0A%0A it('can parse the properties of a csv file csv file', function() %7B%0A var csv = 'lat,lon,name%5Cn10,15,Tom';%0A expect(mmg_csv(csv)%5B0%5D.properties.name).toEqual('Tom');%0A %7D); %0A%7D);%0A
01a37c4c4759818ac7a54527ffddee40391774d6
Handle only left click
modules/main.js
modules/main.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ load('lib/WindowManager'); Components.utils.import('resource://gre/modules/Services.jsm'); var bundle = ...
JavaScript
0
@@ -490,24 +490,71 @@ (aEvent) %7B%0D%0A + if (aEvent.button != 0)%0D%0A return true;%0D%0A%0D%0A var target
bf8326a312a82e8015c4c8171cafbeff543d9197
fix eslint error.
test/src/04-media.js
test/src/04-media.js
const chai = require('chai'); const Vast = require('../../src/main.js'); const expect = chai.expect; let vast; let url; describe('Mediafile', () => { beforeEach(() => { vast = new Vast(document.getElementById('target')); url = '../data/simple.xml'; }); it('mp4 w/ dedfault parameters', (done) => { v...
JavaScript
0.000001
@@ -1150,15 +1150,19 @@ .to. -be. +equal( null +) ;%0A
68aaf0c82bac88ab7d447e6012ba08e1bf2be583
fix url
modules/menu.js
modules/menu.js
var reserveUrl = encodeURIComponent('http://115.159.119.199:8080/meeting/src/html/app.html#search') module.exports = { "button": [{ "type": "view", "name": "预定", "url": 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx65cfe45c2c6fad4a&redirect_uri=http://115.159.119.199:8080/mee...
JavaScript
0.86565
@@ -1,18 +1,16 @@ var -reserveUrl +jumpPage = e @@ -291,61 +291,22 @@ p:// -115.159.119.199:8080/meeting/src/html/app.html#search +roscoe.cn/info &res @@ -353,15 +353,24 @@ ate= -reserve +' + jumpPage + ' #wec
524a70e5d525c7dac765f4250c2b89e27afa2dad
fix path for latest browserify
test/test-adapter.js
test/test-adapter.js
/*global RSVP*/ var assert = require('assert'); var g = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : this; var RSVP = g.RSVP || require('./rsvp.js'); var defer = RSVP.defer; var resolve = RSVP.resolve; var reject = RSVP.reject; module.exports = g.adapter = { reso...
JavaScript
0.000001
@@ -189,16 +189,10 @@ e('. +. / -rsvp.js ');%0A
e5924fcea2dfbcfbb2fde4c6d5370d475c84a3a5
add bidi tests
mobile/tests/doh/module.js
mobile/tests/doh/module.js
define([ "doh/runner", "dojo/sniff", "require", "./accordion/module", "./badge/module", "./button/module", "./checkbox/module", "./combobox/module", "./contentpane/module", "./edgetoedgecategory/module", "./edgetoedgedatalist/module", "./edgetoedgelist/module"...
JavaScript
0
@@ -1214,16 +1214,38 @@ /module%22 +,%0A %22./bidi/module%22 %0A%5D, func
f867fcfeb78a182f772b600e8046fe2e6d0481c7
remove script node, after "onload" event
lib/flow.client.js
lib/flow.client.js
var Flow = require('./flow/flow'); var server = require('./socket'); // init flow with core module var flow = Flow({ // load module bundles and return the entry-point exports // USED IN flow.js module: function (name, callback) { // crate script dom element var node = document.createEleme...
JavaScript
0.000001
@@ -360,24 +360,51 @@ nction () %7B%0A + node.remove();%0A @@ -599,39 +599,16 @@ (node);%0A - node.remove();%0A %7D,%0A%0A
61a360217759f2c19381fae906a6978ec9bc891b
Allow for a little more clock skew
lib/flow/oauth2.js
lib/flow/oauth2.js
var crypto = require('crypto') var qs = require('qs') var request = require('../client') exports.authorize = async ({provider, input}) => { var url = provider.authorize_url var params = { client_id: provider.key, response_type: 'code', redirect_uri: provider.redirect_uri, scope: provider.scope, ...
JavaScript
0
@@ -3484,16 +3484,22 @@ / 1000) + - 120 ,%0A @@ -3534,16 +3534,22 @@ / 1000) + - 120 %0A %7D
e1a460fe867d7072c2dcfbfe213d36d697ba9ab2
Add type check to response.body
src/nylas-connection.js
src/nylas-connection.js
import clone from 'lodash/clone'; import request from 'request'; import RestfulModel from './models/restful-model'; import RestfulModelCollection from './models/restful-model-collection'; import RestfulModelInstance from './models/restful-model-instance'; import Account from './models/account'; import ManagementAccoun...
JavaScript
0
@@ -5331,16 +5331,53 @@ essage') + && typeof response.body === 'string' ) %7B%0A
0dd448c9636ffe6c973a61b544e48f49ed537c7f
Handle errors getting the body
lib/generic-app.js
lib/generic-app.js
'use strict'; const querystring = require('querystring'); class GenericApp { constructor(options, emit) { this.options = options; this.emit = emit; } handle_404(req, res) { if (res.finished) { return; } res.writeHead(404); res.end(); } handle_405(req, res, methods) { res....
JavaScript
0
@@ -1600,32 +1600,84 @@ err, body) =%3E %7B%0A + if (err) %7B%0A return next(err);%0A %7D%0A%0A switch ((r @@ -2139,24 +2139,76 @@ body) =%3E %7B%0A + if (err) %7B%0A return next(err);%0A %7D%0A%0A switch
9d9f2d3aaf899e7094e3e1871b86da46802b1c70
buzzer beep
modules/@amperka/buzzer.js
modules/@amperka/buzzer.js
var Buzzer = function(pin) { this._pin = pin; this._on = false; this._frequency = 2000; this._pin.mode('output'); }; Buzzer.prototype.toggle = function() { if (arguments.length === 0) { return this.toggle(!this._on); } this._on = !!arguments[0]; this._update(); return this; }; Buzzer.prototy...
JavaScript
0.999999
@@ -89,16 +89,96 @@ 2000;%0A%0A + this._beepTimeoutID = null;%0A this._beepOnTime = 0;%0A this._beepOffTime = 0;%0A%0A this._ @@ -197,16 +197,16 @@ tput');%0A - %7D;%0A%0ABuzz @@ -308,24 +308,45 @@ ._on);%0A %7D%0A%0A + this._clearBeep();%0A this._on = @@ -573,32 +573,32 @@ = function() %7B%0A - re...
a1b64a4af2c4ccf23d1d29c73bf2675824905b36
Comment in english
lib/google-plus.js
lib/google-plus.js
var fs = require('fs'), ejs = require('ejs'), jsdom = require('jsdom') var htmlToText = function(html) { // Add line breaks for block elements ['br', 'div', 'p'].forEach(function(tag) { var elements = html.getElementsByTagName(tag) for (var i = 0; i < elements.length; i++) { ...
JavaScript
0
@@ -474,55 +474,42 @@ ove -%22* va compartir originalment aquesta publicaci%C3%B3 +the %22* originally shared this post :%22 e
3edee260fdc95ae1140e467811f7623fb8d9d38e
add strict checks
lib/groups/help.js
lib/groups/help.js
const chalk = require('chalk'); class HelpGroup { b() { const b = chalk.blue; } l() { const c = chalk.cyan; } outputHelp(command=null) { if (command != null) { const commands = require('../utils/commands').info; const options = commands.find(cmd => (...
JavaScript
0.000437
@@ -190,16 +190,17 @@ mmand != += null) %7B @@ -325,16 +325,17 @@ .name == += command @@ -350,16 +350,17 @@ alias == += command
a91c95ac46a2f0f0c6a42dfce2822624c2410edd
add a hacky and direct workaround to fix #525
lib/http-server.js
lib/http-server.js
'use strict'; var fs = require('fs'), union = require('union'), ecstatic = require('ecstatic'), auth = require('basic-auth'), httpProxy = require('http-proxy'), corser = require('corser'), secureCompare = require('secure-compare'); // // Remark: backwards compatibility for previous // case con...
JavaScript
0
@@ -199,24 +199,52 @@ ('corser'),%0A + path = require('path'),%0A secureCo @@ -279,16 +279,577 @@ are');%0A%0A +// a hacky and direct workaround to fix https://github.com/http-party/http-server/issues/525%0Afunction getCaller() %7B%0A try %7B%0A var stack = new Error().stack;%0A var stackLines = stack....
620d5285a7c0d9aed306460d2e58baf633fb692e
Replace mode should only replace first encountered instance
nestableview.js
nestableview.js
/*! * Backbone.CWM.NestableView v0.1.0 * * (c) 2014 Michael Spencer * Released under the MIT license */ ;(function(exports, BaseView) { var NestableView = BaseView.extend({ template: _.template('[NestableView:{data:<%- JSON.stringify(data) %>}]'), views: function() { return []; }, constructor: fun...
JavaScript
0
@@ -2714,32 +2714,81 @@ torEl.length) %7B%0A + $selectorEl = $selectorEl.first();%0A if
466c13b3fc9a62ef0a6fe87619f6c9c3beda298a
Fix support of fill option.
lib/image-proxy.js
lib/image-proxy.js
// @see https://devcenter.heroku.com/articles/nodejs#write-your-app var express = require('express') , fs = require('fs') // node , gm = require('gm') , http = require('http') // node , https = require('https') // node , mime = require('mime') , url = require('url') // node // @see ...
JavaScript
0
@@ -3653,32 +3653,33 @@ width, height, ' +%5E %3E');%0A @@ -3718,22 +3718,16 @@ e(width, - null, '%3E');%0A @@ -3833,16 +3833,17 @@ eight, ' +%5E %3E');%0A
31f26b2adfede0b2abeea349458514ab43912384
change port
SevernStatus.Server/server.js
SevernStatus.Server/server.js
var http = require('http'); var requestImport = require('request'); var url = require('url'); var xpath = require('xpath') var dom = require('xmldom').DOMParser const PORT=5001; //We need a function which handles requests and send response function handleRequest(request, response){ if( request.url.indexOf('fa...
JavaScript
0.000001
@@ -170,17 +170,17 @@ PORT=500 -1 +0 ; %0A%0A%0A%0A//
9c14912c6826d0631669692dabe1df4947c16693
Work around for buggy oninput in IE9.
src/pat/edit-tinymce.js
src/pat/edit-tinymce.js
define([ "jquery", "../core/parser", "../core/logger", "../registry", "../utils", "jquery.textchange", "tinymce" ], function($, Parser, logger, registry, utils) { var log = logger.getLogger("pat.editTinyMCE"), parser = new Parser("edit-tinymce"); parser.add_argument("tinymce...
JavaScript
0
@@ -2443,28 +2443,16 @@ t_css);%0A - %0A @@ -3251,16 +3251,82 @@ n window + %7C%7C%0A ($.browser.msie && $.browser.version %3C 10) ) %7B%0A @@ -3699,27 +3699,8 @@ on(%22 -change.pat-tinymce text
c0b8247358cafd13a107428a66e9691a19d6df54
Fix regression in buildModuleUrl.
Source/Core/buildModuleUrl.js
Source/Core/buildModuleUrl.js
/*global define*/ define([ 'require', './defined', './DeveloperError', '../ThirdParty/Uri' ], function( require, defined, DeveloperError, Uri) { "use strict"; /*global CESIUM_BASE_URL*/ var cesiumScriptRegex = /((?:.*\/)|^)cesium[\w-]*\.js...
JavaScript
0
@@ -1083,32 +1083,38 @@ !defined(baseUrl +String )) %7B%0A
240d90b1bbde53a32e55dc49075ab6adf76e0018
update tests to acommodate new api structure
tests/search.spec.js
tests/search.spec.js
var chai = require('chai'), chaiHttp = require('chai-http'), server = require('../server/app'), should = chai.should(); chai.use(chaiHttp); describe('Search', function(){ it('should return a 200 status code', function(done){ chai.request(server) .get('/search') .end(function(err, res){ res.should.h...
JavaScript
0
@@ -95,16 +95,40 @@ /app'),%0A +%09expect%09%09= chai.expect,%0A %09should @@ -491,28 +491,8 @@ h')%0A -%09%09.query(%7Blimit:n%7D)%0A %09%09.q @@ -509,36 +509,32 @@ : 'artist', -genre: 'rap' +limit: n %7D)%0A%09%09.end(fu @@ -550,34 +550,38 @@ r, res)%7B%0A%09%09%09 -res.should +expect(res).to .have.length @...
40ec777c8a53da1eca2a3ec87bf4a7a2fb7ddaf0
fix lint
lib/merge-files.js
lib/merge-files.js
'use strict'; // We need the yui name to be available in all modules (as a global variable). // This only happens if we remove the 'var' keyword or add it to the "global" // variable. global.YUI = require('yui').YUI; var path = require('path'); var child_process = require('child_process'); var UglifyJS = require('ugli...
JavaScript
0.000013
@@ -1565,17 +1565,17 @@ code += -%22 +' %5Cn//@ so @@ -1589,17 +1589,17 @@ pingURL= -%22 +' + sourc
245c9e7ad3b9ce038881ab97346d7eee1dc01d24
fix bug with sciebo public shares
controllers/download.js
controllers/download.js
/* * (C) Copyright 2016 o2r project * * 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...
JavaScript
0
@@ -1210,24 +1210,87 @@ eturn;%0A %7D%0A%0A + //TODO here: write function for webdav and zenodo + cleanup%0A%0A // check f @@ -1359,12 +1359,17 @@ !== -null +undefined )%7B%0A
d95aa512bedfb87f5e52af99e3827ad377226576
minus 1
controllers/homeCtrl.js
controllers/homeCtrl.js
var express = require('express'); var router = express.Router(); var jsonfile = require('jsonfile') var MongoClient = require('mongodb').MongoClient var url = 'mongodb://localhost:27017/Measurements'; exports.index = (req, res) => { getBuilding(res, getPies); }; function getPies(res, buildings){ MongoClien...
JavaScript
0.999994
@@ -2069,9 +2069,8 @@ At%22: -- 1%7D). @@ -2258,32 +2258,49 @@ d the number is +from getReadings ********' + resu
1e22bd5d47d74153f498c04c06ae1878e0725293
fix compilation of named route functions
lib/namedroutes.js
lib/namedroutes.js
var _ = require('underscore'); var assert = require('assert'); var path = require('path'); //expand source and target then merge, //if source and target are both have route recurse //XXX if one or the the have route replace target with source //otherwise merge source keys into target, if source key has f...
JavaScript
0.000001
@@ -2114,17 +2114,17 @@ GEX: /(? -: += %5B%5E%5C%5C%5D%7C%5E) @@ -2988,16 +2988,22 @@ on(param +, name ) %7B%0A @@ -3023,21 +3023,20 @@ urn obj%5B -par +n am +e %5D;%0A @@ -3680,20 +3680,19 @@ nction(p -aram +, n ) %7B retu @@ -3698,21 +3698,17 @@ urn obj%5B -param +n %5D;%7D);%7D'%0A
e60cddd798827804c24370321be8d5146d4a22e9
check ngrok binary file existence
lib/ngrok/index.js
lib/ngrok/index.js
/** * Ngrok wrapper script * http://www.ngrok.com * * it will generate random subdomain if you don't provide subdomain name in -subdomain svh option * * Created by Equan Pr. on 10/12/13. */ var spawn = require('child_process').spawn , message = require('../middleware/message') , generator = require('../...
JavaScript
0
@@ -331,24 +331,49 @@ /randname')%0A + , fs = require('fs')%0A , arg_lo @@ -488,25 +488,261 @@ (options) %7B%0A -%0A + if (fs.exists(options.ngrokpath, function (exist) %7B%0A exist ? startngrok(options) : message.output('ngrok not found...%5Cn please download from https://ngrok.com/download');%0A ...
d0632143b36edb56d0306793216b8026b351091a
Fix typo
lib/parser/name.js
lib/parser/name.js
/*! * Snakeskin * https://github.com/SnakeskinTpl/Snakeskin * * Released under the MIT license * https://github.com/SnakeskinTpl/Snakeskin/blob/master/LICENSE */ import { $C } from '../deps/collection'; import { Parser } from './constructor'; import { ALIASES } from '../consts/cache'; import { applyDefEscape } f...
JavaScript
0.999999
@@ -1389,16 +1389,20 @@ without +the %22file%22 o @@ -1529,16 +1529,18 @@ tion in +a browser'
43e7c853b834dc7ced0f81ee5f4b130444d85e95
Fix ws reconnect piling up previd param.
modules/xmpp/ResumeTask.js
modules/xmpp/ResumeTask.js
import { getLogger } from 'jitsi-meet-logger'; import { default as NetworkInfo, NETWORK_INFO_EVENT } from '../connectivity/NetworkInfo'; import { getJitterDelay } from '../util/Retry'; const logger = getLogger(__filename); /** * The class contains the logic for triggering connection resume via XEP-0198 stre...
JavaScript
0
@@ -3772,16 +3772,113 @@ = url;%0A%0A + // adds previd param only if missing%0A if (search.indexOf('previd=') === -1) %7B%0A @@ -3968,16 +3968,26 @@ Token%7D%60; +%0A %7D %0A%0A
250240abf4b4c63f9d31c1569e895506f89d2208
convert galleries[i].media.src from array to string
lib/sort-static.js
lib/sort-static.js
var config = require('../config.json'); var parse = require('./parse'); var staticAssets = parse(config.staticAssetMap); var exports = {}; exports.sections = function getSections() { var sections = []; for (var i in staticAssets) { var section = {}; if (!(staticAssets[i].galleries.length > 1)) { se...
JavaScript
0.999827
@@ -1360,16 +1360,19 @@ ticMedia +%5B0%5D ;%0A
a56006b6d5ec075813112d94a5d9ab7205864b50
fix getKickoffTime method
lib/srs-widgets.js
lib/srs-widgets.js
'use strict'; /** * Created by chregi on 2/28/15. * v0.2 - 17.9.2015 * - new: season id needed for schedule * - new: next game endpoint changed * - fixed: removed ".json" from all API calls * v0.1 - 13.4.2015 * - fixed: Kickoff time daylight saving independent * - new: put Day in schedule table */ // parse a...
JavaScript
0.000004
@@ -368,16 +368,80 @@ nput) %7B%0A + if (input instanceof Date) %7B%0A return input;%0A %7D else %7B%0A var pa @@ -469,16 +469,20 @@ d+)/g);%0A + // new @@ -547,16 +547,20 @@ s%5D%5D%5D%5D%5D)%0A + return @@ -644,16 +644,20 @@ 0-based%0A + %7D%0A %7D%0A%0Afunct @@ -693,19 +693,19 @@ ret...
dd2a21fcd2b9790993a38ba06e4e06a764c95d7f
Fix default plugins initializing Fixe #852, close #853
lib/svgo/config.js
lib/svgo/config.js
'use strict'; var FS = require('fs'); var yaml = require('js-yaml'); /** * Read and/or extend/replace default config file, * prepare and optimize plugins array. * * @param {Object} [config] input config * @return {Object} output config */ module.exports = function(config) { var defaults; config = typeo...
JavaScript
0
@@ -884,32 +884,38 @@ defaults.plugins + %7C%7C %5B%5D );%0A defau
734f0d82edfa98cdbc3ed649e618e14b7f0f60f1
Fix addons build with valid path for require-tools
core/cb.addons/addon.js
core/cb.addons/addon.js
var _ = require('lodash'); var fs = require('fs'); var path = require('path'); var wrench = require('wrench'); var child_process = require('child_process'); var Q = require("q"); var requirejs = require("requirejs"); var exec = function(command, options) { var deferred = Q.defer(); var childProcess; v...
JavaScript
0
@@ -3400,34 +3400,8 @@ e, %22 -../../client/build/static/ requ
8dea3ff7de61a19bff31a91ca87f057b4c92899d
Remove error constrctors from stack traces
lib/utils/error.js
lib/utils/error.js
'use strict'; var format = require('util').format; function error(){ return new Error(format.apply(null, arguments)); } function syntaxError(){ return new SyntaxError(format.apply(null, arguments)); } module.exports = error; module.exports.syntax = syntaxError;
JavaScript
0.000001
@@ -63,30 +63,33 @@ error()%7B%0A -return +var err = new Error(f @@ -119,16 +119,69 @@ ents));%0A + Error.captureStackTrace(err, error);%0A return err;%0A %7D%0A%0Afunct @@ -201,22 +201,25 @@ or()%7B%0A -return +var err = new Syn @@ -259,16 +259,75 @@ ents));%0A + Error.captureStackTrace(err, syntaxErr...
24a2519bc22a72e7d88a6b94f09d58204b91b63a
add fixme about agent:false
lib/utils/fetch.js
lib/utils/fetch.js
/** * Fetch an HTTP url to a local file. **/ var http = require("http") , https = require("https") , url = require("url") , sys = require("./sys") , fs = require("./graceful-fs") , get = require("./get") , set = require("./set") , log = require("./log") , npm = require("../../npm") , consts , pat...
JavaScript
0.000065
@@ -1543,16 +1543,43 @@ https:%22%0A + //FIXME: this sucks.%0A ,
66dfbd9e2a2e8afa6088e57a9940ceb69eef0787
Fix _flush: the _flushed callback must be called *after* the GridFS file is really written (ie after _store.close()
lib/writestream.js
lib/writestream.js
/** * Module dependencies */ var util = require('util'); //var Writable = require('stream').Writable; // This is a workaround to implement a _flush method for Writable (like for Transform) to emit the 'finish' event only after all data has been flushed to the underlying system (GridFS). See https://www.npmjs.com/...
JavaScript
0.000001
@@ -4143,21 +4143,8 @@ ) %7B%0A - flushed();%0A th @@ -4149,24 +4149,31 @@ this._close( +flushed );%0A%7D%0A%0A/**%0A * @@ -4681,16 +4681,18 @@ _close ( +cb ) %7B%0A if @@ -4899,16 +4899,35 @@ , file); +%0A%0A if (cb) cb(); %0A %7D);%0A%7D
12311016c04f72eb1363ea567c98643fa391e05a
fix bug
ChartGenerator/Repositories/DataRepository.js
ChartGenerator/Repositories/DataRepository.js
let Promise = require('bluebird') let mapify = require('es6-mapify') let projectRepository = require('./ProjectRepository') let model = require('../connect') let calPayOutDistribution = function (tableIndex, projectId, request) { let table = ['overall', 'basegame', 'freegame'] let size = request.size ...
JavaScript
0.000001
@@ -2317,11 +2317,12 @@ w('( -avg +(sum (%60ne @@ -2330,13 +2330,19 @@ Win%60 +) + ?) + / ?) as @@ -2397,16 +2397,29 @@ .betCost + * step, step , step%5D)
c9bb4f3dfc803430cb94d554279e54f2cee6ce8c
add searchString function
MusicFinder/www/js/controllers.js
MusicFinder/www/js/controllers.js
angular.module('starter.controllers', []) .controller('SearchCtrl', [ '$scope', '$ionicGesture', '$state' ,function($scope, $ionicGesture, $state) { $scope.hideHeader = function() { console.log("Hide"); $( ".tabs" ).slideUp( 200, function() { $( ".bar" ).slideUp(200); }); ...
JavaScript
0.000003
@@ -669,32 +669,128 @@ r%22);%0A %7D%0A %0A + $scope.searchString = function(searchString)%7B%0A console.log(searchString);%0A %7D%0A %0A %7D%5D)%0A%0A.controller
5bebe165a1a9d743acf3e2272f0bf6a970370225
Parse json
libs/cloudflare.js
libs/cloudflare.js
(function(module){ var http = require('https'); var _ = require("underscore"); function Cloudflare(zoneId, authEmail, authKey) { this.zoneId = zoneId; this.authEmail = authEmail; this.authKey = authKey; } var fn = Cloudflare.prototype; fn.fetch = function() { http.get({ hostname: 'a...
JavaScript
0.999252
@@ -533,13 +533,8 @@ nt=1 -00000 &sta @@ -779,13 +779,25 @@ nfo( +JSON.parse( body) +) ;%0A
9429c38c1caf5906449ea0380bca2c0851025d4e
add solution
Algorithms/JS/arrays/shortestWordDifferenceTwo.js
Algorithms/JS/arrays/shortestWordDifferenceTwo.js
// This is a follow up of Shortest Word Distance. // The only difference is now you are given the list of words // and your method will be called repeatedly many times with different parameters. How would you optimize it? // Design a class which receives a list of words in the constructor, // and implements a method t...
JavaScript
0.000003
@@ -721,20 +721,869 @@ e both in the list.%0A +%0A%0A/**%0A * @constructor%0A * @param %7Bstring%5B%5D%7D words%0A */%0Avar WordDistance = function(words) %7B%0A this.lib = %7B%7D;%0A for( var i=0; i%3Cwords.length; i++ )%7B%0A if( this.lib%5Bwords%5Bi%5D%5D )%7B%0A this.lib%5Bwords%5Bi%5D%5D.p...
0c1db18cb13e1e333f0af5dd1b2e44bdd7a4fc78
make button stick to corner
lib/OpenLayers/Control/Popout.js
lib/OpenLayers/Control/Popout.js
/** * @requires OpenLayers/Control.js */ OpenLayers.Control.Popout = OpenLayers.Class( OpenLayers.Control, { initialize: function(options) { OpenLayers.Control.prototype.initialize.apply(this,[options]); }, draw: function () { var imgLocation, wrapper, img; OpenLayers.Co...
JavaScript
0.000001
@@ -1314,27 +1314,25 @@ e%5B%22right%22%5D=%22 -5px +0 %22;%0A i @@ -1347,27 +1347,25 @@ %5B%22bottom%22%5D=%22 -5px +0 %22;%0A w
4da0ffc55d7ca1bf4276ca2cc96515ee523e9e54
Fix Talk sidebar in public share pages without header actions
src/mainPublicShareSidebar.js
src/mainPublicShareSidebar.js
/** * @copyright Copyright (c) 2020 Daniel Calviño Sánchez <danxuliu@gmail.com> * * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundatio...
JavaScript
0
@@ -2954,16 +2954,358 @@ pen%0A%09%7D)%0A +%0A%09// The %22.header-right%22 element may not exist in the public share page if%0A%09// there are no header actions.%0A%09if (!document.querySelector('.header-right')) %7B%0A%09%09const headerRightElement = document.createElement('div')%0A%09%09headerRightElement.setAttrib...
25f95e71ee7844af7fc7eb31c8eafb8cb225a403
Comment out unused NPM publication tasks.
Jakefile.js
Jakefile.js
/* * Jakefile for toast.js (https://github.com/srackham/toast.js). */ 'use strict'; var pkg = require('./package.json'); var shelljs = require('shelljs'); var child_process = require('child_process'); /* Inputs and outputs */ var TOAST_JS = 'toast.js'; var TOAST_TS = 'toast.ts'; var TOAST_MIN_JS = 'toast.min.js';...
JavaScript
0
@@ -3756,24 +3756,27 @@ lete);%0A%7D);%0A%0A +/*%0A desc('push, @@ -3828,24 +3828,27 @@ lish-npm'%5D); +%0A*/ %0A%0Adesc('Push
973bc1ddc88fa16102c2ba78ce02f8a5f41ce07c
Make sure to always return array (#1851)
packages/gatsby/src/internal-plugins/query-runner/page-query-runner.js
packages/gatsby/src/internal-plugins/query-runner/page-query-runner.js
/** * Jobs of this module * - Ensure on bootstrap that all invalid page queries are run and report * when this is done * - Watch for when a page's query is invalidated and re-run it. */ const _ = require(`lodash`) const Promise = require(`bluebird`) const { store, emitter } = require(`../../redux`) const query...
JavaScript
0.000003
@@ -2594,16 +2594,25 @@ return + dirtyIds %0A %7D%0A%0A
1b980864bac64c4e4f067a13e61f8e5d37dc74f9
Fix a bug
tarsier.js
tarsier.js
; /*! * Tarsier JavaScript Library v1.0.1 * http://moky.github.com/Tarsier/ * * Includes jquery.js * http://jquery.com/ * * Copyright 2013 moKy at slanissue.com * Released under the MIT license * http://jquery.org/license * * Date: 2013-12-11 T10:43Z */ if (typeof(window.tarsier) != "object") { window.tar...
JavaScript
0.000192
@@ -2681,16 +2681,18 @@ ndences%0A +// %09tarsier @@ -2741,32 +2741,34 @@ uery.min.js%22%7D);%0A +// %09tarsier.importJ @@ -2843,12 +2843,8 @@ %7D);%0A -%09%0A// %09tar @@ -2886,25 +2886,27 @@ /jquery. +min. js%22%7D);%0A -// %09tarsier @@ -2949,16 +2949,20 @@ ry.tmpl. +min. js%22%7D);%0A%09
12a5fd5211e69d469ac28c6c17a75c46ae281d6e
Update UserIdTransaction.post.js
lib/routes/UserIdTransaction.post.js
lib/routes/UserIdTransaction.post.js
var util = require('util'); var seq = require('seq'); var Route = require('../routing/Route'); var errors = require('../errors'); var Result = require('../result/Result'); var MountPoint = require('../routing/MountPoint'); var configuration = require('../configuration'); function TransactionCreate (persistence, mqtt...
JavaScript
0
@@ -1282,24 +1282,33 @@ s below the +negative transaction @@ -1308,18 +1308,18 @@ action m -in +ax imum of @@ -3106,8 +3106,9 @@ nCreate; +%0A
9bc0bbc4a5431d9806151a64908680c16e972e55
Fix typo (#908)
quickstarts/uppercase-firestore/functions/index.js
quickstarts/uppercase-firestore/functions/index.js
/** * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the 'License'); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
JavaScript
0.00158
@@ -732,16 +732,17 @@ and set + up trigg
518e029356259b63432ff9f4f5f7547ba291c980
Update note
lib/blog_comment_form_helpers.js
lib/blog_comment_form_helpers.js
/****************************************************************************** www.averylawfirm.com Copyright (c) 2014 Jeffrey Carpenter <i8degrees@gmail.com> ALL RIGHTS RESERVED Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions a...
JavaScript
0
@@ -4997,28 +4997,77 @@ +//%0A // We let Google create the post -. + title -= 'TODO'; +for us automatically. %0A%0A
85d9c226ab076ef65fb5b269a74932a75e5c6471
add created at to file sanitisation function
lib/bundles/media/models/file.js
lib/bundles/media/models/file.js
/** * Created by Awesome on 2/23/2016. */ // use strict 'use strict'; // require dependencies var fs = require ('fs'); var path = require ('path'); var model = require ('model'); // require local dependencies var config = require ('app/config'); /** * create file model */ class file ext...
JavaScript
0
@@ -3396,16 +3396,19 @@ 'id' + : thi @@ -3474,16 +3474,19 @@ 'file' + : this. @@ -3531,16 +3531,19 @@ 'name' + : this. @@ -3561,32 +3561,35 @@ ),%0D%0A 'path' + : this._path () @@ -3603,16 +3603,19 @@ 'size' + : this. @@ -3626,16 +3626,60 @@ ('size') +,%0D%0A 'create...
b28e198e5d9a79098d66938f266ea00267d26dbf
change mode on login model
lib/bundles/user/models/login.js
lib/bundles/user/models/login.js
/** * Created by Awesome on 2/28/2016. */ // require local dependencies const model = require ('model'); /** * create login model */ class login extends model { /** * construct login model * * @param attrs * @param options */ constructor (attrs, options) { // run super ...
JavaScript
0.000001
a0a4e6d4fc68297913c1726356c9a3c40bbe03de
fix lint
modules/contacts/server/routes/contact.routes.js
modules/contacts/server/routes/contact.routes.js
'use strict'; // ========================================================================= // // Routes for contacts // // ========================================================================= var policy = require ('../policies/contact.policy'); var Contact = require ('../controllers/contact.controller'); var hel...
JavaScript
0.000013
@@ -3122,16 +3122,17 @@ ;%0A%09%7D);%0A%7D +; %0A%0Amodule
f0d8466a3534ed196f7d90e1ab86126a0c6c7e79
fix error
test/db.js
test/db.js
/* ======================================================================== * DBH-PG: test * ======================================================================== * Copyright 2014 Sapienlab * Licensed under MIT (https://github.com/sapienlab/dbh-pg/blob/master/LICENSE) * =========================================...
JavaScript
0.000002
@@ -6639,33 +6639,37 @@ assert. -e +deepE qual(person, per @@ -6948,33 +6948,37 @@ assert. -e +deepE qual(person, per @@ -7251,33 +7251,37 @@ assert. -e +deepE qual(person, per @@ -7529,33 +7529,37 @@ assert. -e +deepE qual(person, per @@ -7830,25 +7830,29 @@ assert. -e...
4c8f1526e4c22032b63cab546f1966a004429199
test fileExistSync
test/fs.js
test/fs.js
'use strict'; var expect = require('chai').expect; var fs = require('fs'); describe('method qfs.fileExists', function() { beforeEach(function() { }); it('file exist tmp', function() { var promise = fs.existsSync('/tmp'); console.log(promise); }); });
JavaScript
0.000001
@@ -74,40 +74,633 @@ ');%0A -%0Adescribe('method qfs.fileE +var path = require(%22path%22);%0A%0A/**%0A * https://gist.github.com/tkihira/2367067%0A */%0Avar rmdir = function(dir) %7B%0A var list = fs.readdirSync(dir);%0A for(var i = 0; i %3C list.length; i++) %7B%0A var filename = path.join(dir, list%5Bi...
49afbd2c70aa7af98bc5dd0911c1301aae5e7a88
Use a dummy form submission instead of logging out via xhr.
src/redux/navigation.js
src/redux/navigation.js
const keyMirror = require('keymirror'); const defaults = require('lodash.defaults'); const api = require('../lib/api'); const log = require('../lib/log.js'); const sessionActions = require('./session.js'); const Types = keyMirror({ SET_SEARCH_TERM: null, SET_ACCOUNT_NAV_OPEN: null, TOGGLE_ACCOUNT_NAV_OPEN...
JavaScript
0
@@ -110,24 +110,59 @@ /lib/api');%0A +const jar = require('../lib/jar');%0A const log = @@ -4415,32 +4415,26 @@ ut = () =%3E ( -dispatch +() =%3E %7B%0A ap @@ -4435,122 +4435,234 @@ -api(%7B%0A host: '',%0A method: 'post',%0A uri: '/accounts/logout/',%0A useCsrf: true%0A %7...
b8acab6bcc1f207c77b3f825e12f2fe9d41d924b
Tweak d3.geo.eisenlohr.invert.
geo/projection/eisenlohr.js
geo/projection/eisenlohr.js
// @import august function eisenlohr(λ, φ) { var s0 = Math.sin(λ /= 2), c0 = Math.cos(λ), k = Math.sqrt(Math.cos(φ)), c1 = Math.cos(φ /= 2), t = Math.sin(φ) / (c1 + Math.SQRT2 * c0 * k), c = Math.sqrt(2 / (1 + t * t)), v = Math.sqrt((Math.SQRT2 * c1 + (c0 + s0) * k) / (Math.SQRT2 ...
JavaScript
0
@@ -540,19 +540,33 @@ invert(x -, y + / 1.2, y * 1.065 );%0A if @@ -629,86 +629,10 @@ i = -50,%0A sqrt2 = Math.SQRT2;%0A if (Math.abs(%CF%86) %3E 89 * radians) %CE%BB = sgn(%CE%BB) * %CF%80 +20 ;%0A @@ -897,28 +897,33 @@ s1 / (c1 + -sqrt +Math.SQRT 2 * c0 * k), @@ -1320,36 +1320,41 @@ k) / (2 * (c1 ...
ea4ed864c87ddb6c92351298fd1fcfbc082887f9
Fix content-length bug for api.js Well, it finally happened. I made an assumption about text and it bit me in the butt. Protip: not everything is 1 byte per character!
api.js
api.js
/* The MIT License (MIT) Copyright (c) 2013 Calvin Montgomery 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, mer...
JavaScript
0
@@ -3417,16 +3417,77 @@ ull, 4); +%0A var len = unescape(encodeURIComponent(response)).length; %0A%0A re @@ -3575,23 +3575,11 @@ h%22, -response.length +len );%0A
19e1866dbd2ae7ef23cf8a5667e45c8f7e4551d7
add comments
src/routes/Zen/index.js
src/routes/Zen/index.js
import { injectReducer } from '../../store/reducers' export default (store) => ({ path: 'zen', /* Async getComponent is only invoked when route matches */ getComponent (nextState, cb) { require.ensure([], (require) => { const Zen = require('./containers/ZenContainer').default const reducer = r...
JavaScript
0
@@ -189,16 +189,147 @@ , cb) %7B%0A + /* Webpack - use 'require.ensure' to create a split point%0A and embed an async module loader (jsonp) when bundling */%0A requ
82bfaaa4de3c1b2118e7c365a05e6e6c32f84dde
Use debug log level instead of info.
lib/middleware/authentication.js
lib/middleware/authentication.js
/** * Copyright 2012 Tomaz Muraus * * 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 ag...
JavaScript
0
@@ -1403,36 +1403,37 @@ %3C 1) %7B%0A log. -info +debug ('Token already @@ -1501,20 +1501,21 @@ %0A%0A log. -info +debug ('Cachin @@ -1578,17 +1578,16 @@ ires%7D);%0A -%0A multi. @@ -3372,12 +3372,13 @@ log. -info +debug ('To @@ -3497,24 +3497,104 @@ n;%0A %7D%0A%0A + log.debug('Token not in ...
879652d45f41efefb56f41f49ef7ad5973bdae5c
fix redirect after registration
resources/assets/app/view-models/users/register.js
resources/assets/app/view-models/users/register.js
import {inject} from 'aurelia-framework'; import {Router} from 'aurelia-router'; import {Validation} from 'aurelia-validation'; import {UserService} from 'services/users/user-service'; import {Notification} from 'services/notification'; @inject(Router, Validation, UserService, Notification) export class Register { ...
JavaScript
0.001422
@@ -2355,21 +2355,20 @@ igate('/ -users +auth /signin'
001d0e252c3c3e1427d0e2e39af519f0fbec164c
Clear token before trying to log in.
lib/passport-userapp/strategy.js
lib/passport-userapp/strategy.js
/** * Module dependencies. */ var passport = require('passport'), UserApp = require('userapp'), util = require('util'); /** * `Strategy` constructor. * * The local authentication strategy authenticates requests based on the * credentials submitted through an HTML-based login form, or using a * session t...
JavaScript
0
@@ -5748,32 +5748,64 @@ );%0A %7D else %7B%0A + UserApp.setToken(null);%0A UserApp. @@ -6238,8 +6238,9 @@ trategy; +%0A
ffadc5ded81c6e8a42a4ac03673341f73f65e65b
remove strayed console.log
src/showdown-youtube.js
src/showdown-youtube.js
/** * Youtube Extension. * Uses image syntax to embed videos * Usage: * ![youtube video][http://youtu.be/dQw4w9WgXcQ] * * or * * ![youtube video][1] * [1]: http://youtu.be/dQw4w9WgXcQ */ (function (extension) { 'use strict'; if (showdown) { // global (browser or nodejs global) extension(showdown)...
JavaScript
0.000001
@@ -3440,41 +3440,8 @@ ) %7B%0A - console.log(m%5B1%5D);%0A
b1046970650c12651bf62c7db403a49c90beebe0
call it a day
app.js
app.js
// Import the discord.js module const Discord = require('discord.js'); const fs = require('fs') var schedule = require('node-schedule'); var tools = require('./tools') const CHAN_ID_DKC_GENERAL = "349976478538268674"; const CHAN_ID_DKC_FLAAMLOGS = "350728940501073924"; const CHAN_ID_QGS_FLAAMCHAN = "33042056097274265...
JavaScript
0.000014
@@ -916,20 +916,22 @@ at.birth -date +timeMs )%0A%09%09%09fil @@ -982,20 +982,45 @@ t('%25 -m/%25d/%25Y +Y/%25m/%25d ');%0A%0A +%09%09%09console.log(filetime)%0A %09%09%09t
4dfdb2eaea2a16b7775ef8723fe3ac08696d3b7f
Fix example
app.js
app.js
#!/usr/bin/env node /* * SQL API loader * =============== * * node app [environment] * * environments: [development, test, production] * */ var fs = require('fs'); var path = require('path'); var argv = require('yargs') .usage('Usage: $0 <environment> [options]') .help('h') .example( '$0 productio...
JavaScript
0.998536
@@ -319,33 +319,31 @@ ion -c /etc/ -windshaft +sql-api /config.js', @@ -405,17 +405,15 @@ etc/ -windshaft +sql-api /con @@ -424,31 +424,24 @@ js as config -uration file'%0A )
90b2b9938b48bfbf25671d1e0418939b8b79e24e
remove extra console.log
app.js
app.js
/* * REQUIRES */ var express = require('express'); var session = require('express-session'); var http = require('http'); var path = require('path'); var fs = require('fs'); var _ = require('underscore'); var bodyParser = require('body-parser'); var PATH_SEP = path.sep; var protectStaticPath = require(path.join(__di...
JavaScript
0.000002
@@ -2024,37 +2024,8 @@ ) %7B%0A - console.log(req.session);%0A%0A //
53f247d1a590623306ac697ac275fb09413ed587
Revert FB service
lib/services/facebook.service.js
lib/services/facebook.service.js
var serviceName = "facebook"; var request = require("request"); var serviceConfig = require("./../config/services.config.json"); function facebook (cb) { var result = { service: serviceName, status: false }; request({ url: serviceConfig[serviceName], ...
JavaScript
0
@@ -154,37 +154,8 @@ );%0A%0A -function facebook (cb) %7B%0A var @@ -169,20 +169,16 @@ = %7B%0A - - service: @@ -191,20 +191,16 @@ ceName,%0A - stat @@ -213,14 +213,35 @@ lse%0A - %7D; +%7D%0A%0Afunction facebook (cb) %7B %0A%0A
4a3d3d9f844ff4eab0df2419dc62c2b5de55d87e
Store cookies for 200 hours
app.js
app.js
var config = require('./config'); var logger = require('./lib/logger'); var http = require('http'); var path = require('path'); var HttpError = require('error').HttpError; // ExpressJS & modules var express = require('express'); var expressSessions = require('express-session'); var MongoStore = require('connect-mongo')...
JavaScript
0
@@ -1746,16 +1746,17 @@ xAge: 20 +0 *3600000 @@ -1761,16 +1761,17 @@ 00 // 20 +0 *hour%0A
46427bc82d3c0c9b030844a802263608036112eb
fix #546
app.js
app.js
/*! * nodeclub - app.js */ /** * Module dependencies. */ var config = require('./config'); if (!config.debug) { require('newrelic'); } require('colors'); var path = require('path'); var Loader = require('loader'); var express = require('express'); var session = require('express-session'); var passport = requi...
JavaScript
0
@@ -2845,16 +2845,39 @@ req.path + === '/api' %7C%7C req.path .indexOf
d4b6bcd3eaae128360ffaec528991f94df6d4a2e
fix folder
app.js
app.js
"use strict"; (function(){ Vue.config.devtools = true; new Vue({ el: '#app', data: { loading: 0, downloading: false, downloadedFiles: 0, tree: null, filetypes: [{ id: 'pdf', name: 'PDF', number: 0, checked: true, }, { id: 'doc', name: 'Document', number: 0, checked: true, }, { ...
JavaScript
0.000002
@@ -2391,16 +2391,26 @@ id: +%60folder-$%7B match%5B1%5D ,%0A%09%09 @@ -2405,16 +2405,18 @@ match%5B1%5D +%7D%60 ,%0A%09%09%09%09%09c
3eaec4797a699727f97c5e7f82a5884cfe4c4762
save errors as strings
app.js
app.js
'use strict' const signatures = require('sodium-signatures') const identity = require('./lib/identity') const replicate = require('./lib/gce/index') const getClaims = require('./lib/getClaims') const replicationRequest = require('./lib/replicationRequest') const uuid = require('uuid') const https = require('https') c...
JavaScript
0.000001
@@ -1944,24 +1944,35 @@ st.body, err +.toString() )%0A %7D)%0A
3f91a352c4bdfc537eabd12591461b48b35ca0a2
fix email logging
app.js
app.js
var express = require('express') , http = require('http') , app = express() , connect = require('express/node_modules/connect') , fs = require('fs') , winston = require('winston'); if(!app.settings.env || app.settings.env == ''){ throw new Error('The environment variable NODE_ENV is not configured.'); } ...
JavaScript
0.00009
@@ -2432,25 +2432,33 @@ ENV_CONFIG. -E +Logging.e mail.recipie @@ -2496,25 +2496,33 @@ ENV_CONFIG. -E +Logging.e mail.sender, @@ -2557,25 +2557,33 @@ ENV_CONFIG. -E +Logging.e mail.host,%0D%0A @@ -2616,25 +2616,33 @@ ENV_CONFIG. -E +Logging.e mail.port,%0D%0A @@ -2675,25 +2675,33 @@ ENV_CONFIG. -E +Loggin...
8d5a5830bf4724c792b14ac355f68baa9a358117
Handle speech selection
app.js
app.js
simply.setText({title: 'Loading...'}, true); function secsToMMSS(secs) { var minutes = 0; while (secs >= 60) { secs -= 60; minutes += 1; } if (minutes < 10) minutes = '0' + minutes; if (secs < 10) secs = '0' + secs; return minutes + ':' + secs; } function displaySection(sectionData) { va...
JavaScript
0.000001
@@ -1,28 +1,123 @@ +var speeches;%0Avar currSpeech = 0;%0Avar currentMode = 'loading'; // 'speechSelect', 'speechRun'%0A%0A simply.setText(%7Btitle: 'Load @@ -1446,137 +1446,240 @@ %0A%7D%0A%0A -%0AloadSpeeches('http://www.whatever.com/', function(speeches) %7B%0A var currSpeech = 0;%0A simply.on('singleClick', fun...
8b1c55d9c181ef6459855e4077549bf2f55e00e0
comment added in app.js
app.js
app.js
//////////////////////////////////////////////////////////////////////// // Modules // //////////////////////////////////////////////////////////////////////// var express = require('express'); var logger = require('morgan'); var cookieParser =...
JavaScript
0
@@ -828,16 +828,33 @@ pp init%0A +//added a comment %0A///////
df73378d4e93ec8381f629cc39177527d9d4b514
remove process set env
app.js
app.js
process.env.NODE_ENV = 'development'; /*---------- Module exports ----------*/ module.exports = require('./builder/querybuilder');
JavaScript
0.000002
@@ -1,43 +1,4 @@ -process.env.NODE_ENV = 'development';%0A%0A /*-- @@ -87,8 +87,9 @@ ilder'); +%0A
4ab09f278695ab8757e16d9d568a5189526ab242
fix and remove useless and old apis
app.js
app.js
/** * Module dependencies */ var express = require('express'), api = require('./routes/api'), http = require('http'), path = require('path'), hostName = "http://sandbox.evernote.com", passport = require('passport'), routes = require('./routes'), Evernote = require('evernote'); var app = module.exports = expr...
JavaScript
0
@@ -2036,16 +2036,19 @@ SON API%0A +// app.get(
b68f7f38405c3e74e9b7a9450ae09cd8b9e3b874
add 111111
app.js
app.js
const express = require('express') const app = express() app.get('/', function (req, res) { res.send('Hello World!') }) app.listen(3000, function () { console.log('Example app listening on port 3000!') })
JavaScript
0.999999
@@ -110,16 +110,21 @@ o World! +11111 ')%0A%7D)%0A%0Aa
911865c60bf4073ed78731326784802843029505
add debug prints
app.js
app.js
var fs = require('fs'); var proc = require('child_process'); var express = require('express'); var bodyParser = require('body-parser'); var path = require('path'); var app = express(); var base_dir = __dirname; var hosts = require('./config') app.use(bodyParser.json()); // for parsing application/json app.use(bodyPars...
JavaScript
0.000001
@@ -1617,18 +1617,16 @@ k';%0A -// console. @@ -1639,16 +1639,16 @@ mmand);%0A + proc @@ -1759,32 +1759,78 @@ %7D else %7B%0A + console.log(error,stdout,stderr);%0A call @@ -2074,16 +2074,24 @@ hanges = + (typeof req.bod @@ -2109,16 +2109,93 @@ ges -%7C%7C false +!== 'un...
004003928d16b76b2662b3800a64e180c873149e
Switch to hello jenkins
app.js
app.js
var express = require('express'); var app = express(); app.get('/', function (req, res) { res.send('hello world'); }); app.listen(process.env.PORT || 5000); module.exports = app;
JavaScript
0.000273
@@ -109,13 +109,15 @@ llo -world +jenkins ');%0A
6fab2755af140d039045ed6c56cb122be60e2e40
Fix module, remove old code
app.js
app.js
const slackClient = require('./client/slackClient.js'); const googleClient = require('./client/googleClient.js'); const CLIENT_EVENTS = require('@slack/client').CLIENT_EVENTS; const RTM_EVENTS = require('@slack/client').RTM_EVENTS; const bunyan = require('bunyan'); const log = bunyan.createLogger({name: 'SlackToGcal'}...
JavaScript
0.000001
@@ -1,12 +1,41 @@ +const _ = require('lodash');%0A const slackC @@ -1009,91 +1009,8 @@ %0A%7D%0A%0A -if (!GOOGLE_PATH_TO_KEY %7C%7C !SLACK_API_TOKEN %7C%7C !CALENDAR_ID %7C%7C !SLACK_BOT_ID) %7B%0A%7D%0A%0A cons
efba420d79805396183ff5c190b79e3931cf3eec
Set leds to lila-blass-blau.
app.js
app.js
'use strict'; var Blinkt = require('node-blinkt'), leds = new Blinkt(); var NUM_LEDS = 8; var brightness = 0.1; leds.setup(); leds.clearAll(); var lightsOff = function () { leds.setAllPixels(0, 0, 0, 0.1); leds.sendUpdate(); leds.sendUpdate(); } var signals = { 'SIGINT': 2, 'SIGTERM': 15 }; function shu...
JavaScript
0
@@ -396,36 +396,24 @@ ;%0A -process.nextTick(function () +setTimeout(() =%3E %7B p @@ -429,16 +429,22 @@ it(0); %7D +, 1000 );%0A%7D%0A%0AOb @@ -706,16 +706,19 @@ +) %7B%0A + // %5Bred, g @@ -780,16 +780,19 @@ 56);%0A + // leds.se @@ -831,16 +831,55 @@ htness)%0A + leds.setPixel(i, 100, 50, 200, ...
4bac8624b91e3db4366db3af1c37bfeef5dbaffc
add restful routes for tracks
app.js
app.js
var express = require('express'); var partials = require('express-partials'); var bodyParser = require('body-parser'); var session = require('express-session'); var util = require('./server/lib/utility'); var mongoose = require('mongoose'); var db = require('./server/config'); //User model var User = require('./serve...
JavaScript
0
@@ -718,16 +718,71 @@ song')); +%0Aapp.use('/api/tracks', require('./server/api/track')); %0A%0A//serv
a65b5d8cc453738cd669beab00aba340571e4af3
fix cannot post
app.js
app.js
/** * Module dependencies. */ var express = require('express'); var http = require('http'); var path = require('path'); var handlebars = require('express3-handlebars'); var add = require('./routes/add.js'); var index = require('./routes/index'); var home = require('./routes/home'); var createNewTask = require('./ro...
JavaScript
0
@@ -1418,26 +1418,88 @@ view2);%0Aapp. -ge +post('/home2', home.view2);%0Aapp.get('/home', home.view);%0Aapp.pos t('/home', h @@ -1778,16 +1778,17 @@ view);%0A%0A +%0A %0A%0A// Exa