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 |
|---|---|---|---|---|---|---|---|
2e18f733eecaaf3211869eca47da735afeef4fc6 | fix incorrect response message | lib/emojinary.js | lib/emojinary.js | import Promise from 'bluebird';
import superagent from 'superagent';
import avatar from './avatar';
import Emojinary from '../models/emojinary';
const noEmojinaryPhrase = 'There seems to be no current Emojinary to solve :disappointed:';
const lastSolvedPhrase = (model) => {
return `${noEmojinaryPhrase}
The last ... | JavaScript | 0.999999 | @@ -932,130 +932,39 @@
r) %7B
-%0A rej(err);%0A
+ rej(); %7D%0A
-%7D
else %7B
-%0A res('Great job! You solved it! :tada: :trumpet: :confetti_ball:');%0A
+ res();
%7D%0A
@@ -3946,32 +3946,194 @@
_url'), message)
+%0A .then(() =%3E Promise.resolve('Emojinary set! :sm... |
05ba3eed9212c8d0121d1f612d35ee9e1fe41711 | pagination widget | js/pagination.js | js/pagination.js | var Component = new Brick.Component();
Component.requires = {
mod: [
{name: 'sys', files: ['editor.js']}
]
};
Component.entryPoint = function(NS){
var Y = Brick.YUI,
COMPONENT = this,
SYS = Brick.mod.sys;
NS.PaginationWidget = Y.Base.create('paginationWidget', SYS.AppWidget,... | JavaScript | 0.999578 | @@ -1474,22 +1474,24 @@
-parent
+callback
: ''%0A
@@ -1669,16 +1669,64 @@
('type')
+,%0A%09 %09%09callback = this.get('callback')
;%0A
@@ -2050,33 +2050,36 @@
%09%0A
-%09
+
%09thi
@@ -2079,40 +2079,92 @@
%09
-this.get('parent').reloadList();
+if(callb... |
93c1214d1b3572cc021365a0401cab4e99a58353 | fix delete token, subscription etc | js/qbMessages.js | js/qbMessages.js | /*
* QuickBlox JavaScript SDK
*
* Messages Module
*
*/
// broserify export and dependencies
// Browserify exports and dependencies
module.exports = MessagesProxy;
var config = require('./qbConfig');
var Proxy = require('./qbProxy');
var jQuery = require('../lib/jquery-1.10.2');
// Url variables
var tokenUrl = c... | JavaScript | 0 | @@ -1657,32 +1657,195 @@
'DELETE'%7D,
-callback
+%0A function (err, res) %7B%0A if (err) %7Bcallback(err, null);%7D%0A else %7Bcallback(null, true);%7D%0A %7D
);%0A%7D;%0A%0A// Su
@@ -2615,32 +2615,193 @@
'DELETE'%7D,
-callback
+%0... |
a83b2d075c257c58f2f1813a392b57b952665da7 | Remove unnecessary context variable | src/components/CRCMaker.js | src/components/CRCMaker.js | import autobind from 'autobind-decorator';
import React from 'react';
import Card from './Card';
import Dialog from './Dialog';
import NewCardForm from './NewCardForm';
/**
* The "entry point" of the app.
* This class maintains the main state, including the cards themselves.
*/
@autobind
class CRCMaker extends Rea... | JavaScript | 0.002191 | @@ -4565,37 +4565,8 @@
) %7B%0A
- var context = this;%0A%0A
@@ -6500,21 +6500,17 @@
ds.map((
-editC
+c
ard, i)
@@ -6616,21 +6616,17 @@
d data=%7B
-editC
+c
ard%7D /%3E%0A
@@ -6725,23 +6725,20 @@
nClick=%7B
-context
+this
.editCar
@@ -6740,31 +6740,28 @@
itCard.bind(
-context
+this
, i)%7D%3EEdit ... |
d2d8ad2432cbc20243d891a715bd55557d1ccd21 | Use logError and don't retry when we can't retrive file | lib/helpers/upload.js | lib/helpers/upload.js | 'use strict';
var retrieve = require('./retrieve.js');
var config = require('../../config/configuration.js');
var crypto = require('crypto');
var path = require('path');
var generateTitle = require('anyfetch-provider').util.generateTitle;
var uploadFile = function(identifier, metadata, dropboxTokens, anyfetchClient, c... | JavaScript | 0 | @@ -231,16 +231,75 @@
teTitle;
+%0Avar logError = require('anyfetch-provider').util.logError;
%0A%0Avar up
@@ -1529,16 +1529,164 @@
%7D%0A %7D%0A%0A
+ document.actions.show = %22http://dropbox.com/home%22 + path.dirname(metadata.path) + %22?select=%22 + encodeURIComponent(path.basename(metadata.path));%0A%0A
r... |
787ccb18538f23dce84462525478948f97621989 | test passing for low power use colour coordination | js/thermostat.js | js/thermostat.js | var Thermostat = function() {
this.temperature = 20
this.maxTemp = 32
this.minTemp = 10
this.energyColour = "green"
};
Thermostat.prototype.increaseTemp = function(changeTempBy) {
if(this.temperature + changeTempBy > this.maxTemp) {
this.temperature = this.maxTemp
}
else {
this.temperature += cha... | JavaScript | 0 | @@ -805,11 +805,81 @@
ed%22%0A %7D%0A
+ else if(this.temperature %3C 19) %7B%0A this.energyColour = %22blue%22%0A %7D%0A
%7D;%0A
|
4b5a1c0300b1ba90d8c457b1e1581df1d47c5b6a | Remove debug info | src/ng/components/head/head.core.js | src/ng/components/head/head.core.js | import Directive from '../directive';
import {VIEW_CORE_NAME, HEAD_CORE_NAME} from '../../../definition';
class HeadCore extends Directive(HEAD_CORE_NAME, {view: `^^${VIEW_CORE_NAME}`}) {
constructor() {
super();
}
onInit() {
}
}
HeadCore.$inject = [];
export default {
restrict: 'A',
bindToController: tru... | JavaScript | 0.000001 | @@ -229,18 +229,16 @@
() %7B%0A%09%7D%0A
-%0A%0A
%7D%0A%0AHeadC
|
ed8ffe645240fa52278495a6d50042a6cb814de0 | Fix for mixed setTimeout/clearTimeout methods | lib/timer-hook.js | lib/timer-hook.js | /*
Shims global timers to behave like node,
returning values with ref() and unref().
This is on by default; you can disable with
--no-node-timers or --no-nt
*/
var timers = require('timers');
module.exports = function timerHook () {
global.setTimeout = wrapWithActivateUvLoop(timers.setTimeout);
global.se... | JavaScript | 0 | @@ -369,16 +369,108 @@
erval);%0A
+ global.clearTimeout = timers.clearTimeout;%0A global.clearInterval = timers.clearInterval;%0A
%7D;%0A%0Afunc
|
75b49161c07608ecbf81df62e0b39c94b71643fa | fix bug in ticketdraw | js/ticketdraw.js | js/ticketdraw.js | var nowProgram = -1;
var ticketTable = {};
var priceTable = [];
var priceDiscountTable = [];
var editTicketTable = {};
var priceSelected = 0;
var showTable = {'0': true, '1': false, '2': false, '3': false, '5': false};
function programChange(e){
$('#requesting').html("正在讀取座位圖資訊......");
$('#requesting').show()... | JavaScript | 0 | @@ -622,85 +622,8 @@
0;%0A
- showTable = %7B'0': true, '1': false, '2': false, '3': false, '5': false%7D;%0A
|
2dcfcfe0b0eb47656b09933c4b5d5498aaedd6e2 | Revert whitespace changes | lib/treatments.js | lib/treatments.js | 'use strict';
var _ = require('lodash');
var find_options = require('./query');
function storage (env, ctx) {
var ObjectID = require('mongodb').ObjectID;
function create (objOrArray, fn) {
function done (err, result) {
ctx.bus.emit('data-received');
fn(err, result);
}
if (_.isArray(objO... | JavaScript | 0.000001 | @@ -2014,24 +2014,25 @@
%5D);%0A %7D%0A
+%0A
%7D);%0A %7D%0A
@@ -3762,17 +3762,16 @@
me;%0A %7D%0A
-%0A
obj.cr
|
00cf06270d886e4b81002ae9c55e4e882d211fe9 | Update the help text | react-converter/src/components/Converter/UnitCompleter.js | react-converter/src/components/Converter/UnitCompleter.js | import React from 'react'
import PropTypes from 'prop-types'
import Downshift from 'downshift'
import { withStyles } from '@material-ui/core/styles'
import TextField from '@material-ui/core/TextField'
import Paper from '@material-ui/core/Paper'
import MenuItem from '@material-ui/core/MenuItem'
import UnitConverter, ... | JavaScript | 0.999945 | @@ -3070,32 +3070,18 @@
rch
-a country (start with a)
+for a unit
',%0A
|
043dbd8777ba0bd6a85cc44c6339db4216f5ab53 | Ensure ccnum is a string to be valid | lib/fullccnum.js | lib/fullccnum.js | /*global module, require */
var _ = require('underscore');
var Fullccnum = function() {};
Fullccnum.scrubNonDigits = function (raw) {
var scrubbed = raw;
if (typeof scrubbed === 'number') {
scrubbed = scrubbed.toString();
}
if (typeof scrubbed === 'string') {
scrubbed = scrubbed.replace(/[^\d]/g, ''... | JavaScript | 0.999999 | @@ -400,16 +400,49 @@
cnum &&%0A
+ typeof ccnum === 'string' &&%0A
!!cc
|
674d5e2d2d09bbc4e7d1eb01739af0cd3787888a | throw up for invalid endianness | lib/types/tiff.js | lib/types/tiff.js | // based on http://www.compix.com/fileformattif.htm
// TODO: support big-endian as well
var fs = require('fs');
// Abstract reading multi-byte unsigned integers
function readUInt(bits, offset, isBigEndian) {
offset = offset || 0;
var endian = !!isBigEndian ? 'BE' : 'LE';
var method = this['readUInt' + bits + en... | JavaScript | 0 | @@ -1765,12 +1765,8 @@
lse
-%7B //
if (
@@ -1804,16 +1804,97 @@
n 'BE';%0A
+ %7D else %7B%0A throw new TypeError('Invalid TIFF, can%5C't determine endianness');%0A
%7D%0A%7D%0A%0Af
|
02cbd7a4229172f7673fb5b64f60b397e9659e23 | Fix exported list to send | src/components/Settings.js | src/components/Settings.js | 'use strict';
import React, {
Component,
TouchableOpacity,
StyleSheet,
Text,
View,
Alert
} from 'react-native';
// import css variables
import design from '../design';
import * as ideaActions from '../actions/ideaActions';
import {bindActionCreators} from 'redux';
import { connect } from 'react-redux';
... | JavaScript | 0 | @@ -578,44 +578,17 @@
urn
-state.ideas.length - parseInt(index)
+index + 1
+ '
@@ -615,18 +615,8 @@
%7D).
-reverse().
join
|
d6a423c90e25dd9e40dc7db09009962b4cd21e50 | make sure old version of node won't fail | packages/vue-inbrowser-compiler-demi/postinstall.js | packages/vue-inbrowser-compiler-demi/postinstall.js | const path = require('path')
const fs = require('fs')
function getVuePackageVersion() {
try {
const pkg = require('vue')
return pkg.version
} catch {
return 'unknown'
}
}
function updateIndexForVue3() {
// commonjs
const indexPath = path.join(__dirname, './index.cjs.js')
const indexContent = `
const Vue... | JavaScript | 0 | @@ -147,16 +147,24 @@
%09%7D catch
+ (error)
%7B%0A%09%09ret
|
85d94bdcbb2bef9079f2f90c50e1a1f08eb61461 | Update post route to request quotes. | server/controllers/quotes.js | server/controllers/quotes.js | // Login Controller
// ================
// Handles routing for logging into the pp
'use strict';
let express = require('express'),
QuotesController = express.Router(),
q = require('q-client');
QuotesController.route('/?')
// GET /quotes/
// -----------
// Render quoting page
... | JavaScript | 0 | @@ -186,46 +186,201 @@
-q = require('q-client'
+QClient = require('q-client'),%0A quotes = new QClient(process.env.QClientID, process.env.QClientSecret);%0A%0A console.log(process.env.QClientID, process.env.QClientSecret
);%0A%0A
@@ -640,38 +640,189 @@
-res.json(%... |
f835a9f93c6ac8c86e969ffde30c5a1e5b35d918 | Add and document default nick | server/lib/userIntroducer.js | server/lib/userIntroducer.js | //
// Copyright 2014 Ilkka Oksanen <iao@iki.fi>
//
// 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 app... | JavaScript | 0 | @@ -1396,16 +1396,22 @@
s given,
+ force
broadca
@@ -2068,35 +2068,33 @@
-entry.nick%5Bnetwork%5D
+const currentNick
= await
@@ -2137,16 +2137,544 @@
etwork);
+%0A%0A // Fallback to default nick. This solves the situation where the user joins%0A // a new IRC network... |
33d6c4d5ffb4daa7094937ced22e104104fb56e6 | fix - typos | server/models/SpeechModel.js | server/models/SpeechModel.js | var db = require('../config/db.js');
var User = require('./UserModel.js');
var Session = require('./SessionModel.js');
var Practice = require('./PracticeModel.js');
db.knex.schema.hasTable('speeches').then(function(exists){
if(!exists) {
db.knex.schema.createTable('speech', function(speech) {
speech.increm... | JavaScript | 0.000002 | @@ -272,16 +272,18 @@
('speech
+es
', funct
@@ -748,16 +748,18 @@
'speech
+es
',%0A has
|
dab400e873d1a866fa66ba053821d608cde42309 | remove D3 test data | git-dev-score/packages/custom/gitstats/public/controllers/gitstats.js | git-dev-score/packages/custom/gitstats/public/controllers/gitstats.js | 'use strict';
angular.module('mean.gitstats').controller('GitstatsController', ['$scope', 'Global', 'Gitstats', 'GitDev',
function($scope, Global, Gitstats, GitDev) {
$scope.global = Global;
$scope.package = {
name: 'gitstats'
};
$scope.message = 'No Message Yet...';
$scope.git_dev_username... | JavaScript | 0.000054 | @@ -388,164 +388,8 @@
();%0A
- $scope.d3Data = %5B%0A %7Bname: 'Greg', score: 98%7D,%0A %7Bname: 'Ari', score: 96%7D,%0A %7Bname: 'Q', score: 75%7D,%0A %7Bname: 'Loser', score: 48%7D%0A %5D;
%0A
|
4b4c0ab67a7035401118abb17a7f964ce78b09a8 | Fix generator is not exported | lib/generator.js | lib/generator.js | var pagination = require('hexo-pagination');
function indexGenerator(locals){
var config = this.config;
var posts = locals.posts.sort('-date');
return pagination('', posts, {
perPage: config.index_generator.per_page || config.per_page,
layout: ['index', 'archive']
});
} | JavaScript | 0 | @@ -281,8 +281,42 @@
%0A %7D);%0A%7D
+%0A%0Amodule.exports = indexGenerator;
|
4c18136e92852f5bd6e6c046993d5c98431943ed | Enable profile image clicking to bring up a larger picture | pchat/public/js/chat.page.js | pchat/public/js/chat.page.js | var lastTimestamp = 0;
var pollRate = 1000;
var alertTimeoutId = null;
var focused = true;
var title = document.title;
window.onfocus = function () {
if (alertTimeoutId != null) {
clearInterval(alertTimeoutId);
alertTimeoutId = null;
}
document.title = title;
focused = true;
}
window.... | JavaScript | 0 | @@ -986,32 +986,158 @@
ed);%0A %7D);%0A%7D%0A%0A
+function showProfileImage(image) %7B%0A bootbox.alert(%22%3Cimg src='%22 + image + %22' style='width: 100%25'%3E%22, function() %7B%0A %7D);%0A%7D%0A%0A
function addToCh
@@ -1962,32 +1962,99 @@
ng%22;%0A %7D%0A%0A
+ var id = msg.conversationId ... |
e04e6a547717d9249178eefb5b99df959e33f6ac | Connect lodash to pull_request handlers | handlers/pull_request.js | handlers/pull_request.js | var fs = require('fs');
var http = require('https');
var utils = require('../utils');
var rmdirSync = require('../utils/rmdir');
var multiloaderPromise = require('../utils/multiLoader');
var constants = require('../constants');
var pull_request_handler = function (request) {
var result = {};
const data = reque... | JavaScript | 0 | @@ -42,24 +42,51 @@
e('https');%0A
+var _ = require('lodash');%0A
var utils =
|
184292d7899b19e50155217b370d45e15195470e | fix the issue about missing template properties in plan | src/components/iqc_plan.js | src/components/iqc_plan.js | var EasyAssess = require('../easyassess.application');
EasyAssess.app.IQCPlanController = function ($scope, esRequestService, $state, ngDialog) {
this.initialize.apply(this, arguments);
};
EasyAssess.app.IQCPlanController.prototype = EasyAssess.extend({
_initialize: function ($scope, esRequestService, $state, ... | JavaScript | 0.000037 | @@ -2278,32 +2278,161 @@
);%0A %7D);%0A%0A
+ $scope.$on('$templateLookup_selected', function(e, model)%7B%0A $scope.activeModel.template = model;%0A %7D);%0A%0A
$scope.c
|
0bc853083137dbd32707ea54a296c159920f1655 | Fix import of libbuild | app-build.js | app-build.js | #!/usr/bin/env node
var express = require('express');
var cors = require('cors');
const path = require('path');
var app = express();
app.use(express.static(path.join(__dirname, 'quick-bench-front-end', 'build-bench', 'build')));
var bodyParser = require('body-parser');
var multer = require('multer');
const libbuild = ... | JavaScript | 0 | @@ -322,16 +322,18 @@
equire('
+./
src/libb
|
bd8082df93cdd902860b9aa72c81bc3383018598 | Fix missing semicolor | lib/utils/vent.js | lib/utils/vent.js | var State = require('ampersand-state');
var vent = null
function reset () {
vent = new (State.extend())();
}
module.exports = {
reset: reset,
get: function () {
if (!vent) reset();
return vent;
}
};
| JavaScript | 0.999969 | @@ -48,16 +48,17 @@
t = null
+;
%0A%0Afuncti
|
3debb1cbcbbfc7d3fb954d53d26f10dda0d16195 | Refactor more comment logic into functions | hook.js | hook.js | 'use strict';
var doiuse = require('doiuse');
var github = require('octonode');
var path = require('path');
var postcss = require('postcss');
var sendRequest = require('request');
var diff = require('./diffParse');
var logger = require('./logger');
var parseSource = require('./sourceParse');
var token = 'token ' + pr... | JavaScript | 0.000001 | @@ -745,26 +745,17 @@
var p
-ullRequest
+r
Number =
@@ -991,23 +991,16 @@
etConfig
-uration
(originR
@@ -1033,32 +1033,33 @@
n(config) %7B%0A
+%0A
var prClient
@@ -1050,102 +1050,48 @@
-var prClient = githubClient.pr(destinationRepo, pullRequestNumber);%0A%0A prClient.commits(
+getPRComm... |
c918ab5c244aec3ac4dfa0cb98fdd21665b8355d | remove "static" | hawk/modules/archiver.js | hawk/modules/archiver.js | let Project = require('../models/project');
let Events = require('../models/events');
let mongo = require('./database');
class Archiver {
/**
* Max number of events in one project's tag
*
* @returns {int}
*/
get eventsLimit() {
return 100000;
}
/**
* Remove old events in all projects
*
... | JavaScript | 0.005846 | @@ -2443,15 +2443,8 @@
/%0A
-static
asyn
@@ -2701,16 +2701,20 @@
/** Set
+_id:
-1 to ge
|
f79c5cc992fe93cae2c25d6dd7303d043e8e9891 | Fix overwriting data | lib/homepanel.js | lib/homepanel.js | /*
* Created by Martin Giger
* Licensed under MPL 2.0
*/
const { panels } = require("resource://gre/modules/Home.jsm"),
HomeStorage = require("resource://gre/modules/HomeProvider.jsm");
const { Class } = require("sdk/core/heritage"),
{ EventTarget } = require("sdk/event/target"),... | JavaScript | 0.000274 | @@ -1919,25 +1919,58 @@
e(data,
-overwrite
+%7B%0A replace: overwrite%0A %7D
);%0A %7D
|
6b7a6668b65c90fe58b55ff82707d38be901237a | add tests for calling mocks.module() with object notation multiple times | test/pongular-mocksSpec.js | test/pongular-mocksSpec.js | 'use strict';
var inject = require('../lib/pongular-mocks').inject;
var module = require('../lib/pongular-mocks').module;
describe('pongular mocks', function() {
describe('jasmine module and inject', function(){
var log;
beforeEach(function(){
log = '';
});
describe('module', function() {
... | JavaScript | 0 | @@ -1365,26 +1365,16 @@
%7D%0A
-
%0A
@@ -1380,53 +1380,8 @@
-// TODO: test not passing... why?%0A x
it('
@@ -1582,19 +1582,9 @@
%7D);%0A
-
%0A
+
@@ -1643,32 +1643,32 @@
', function() %7B%0A
-
expe
@@ -1722,32 +1722,630 @@
%7D);%0A %7D);
+... |
9ce527d93bfbfd7f89b11536962d0029075c49f4 | fix reduceByKey test | test/randomSVMData/r030.js | test/randomSVMData/r030.js | #!/usr/local/bin/node --harmony
// Test randomSVMData -> reduceByKey -> reduce
var co = require('co');
var ugrid = require('../../lib/ugrid-context.js')();
var test = require('../ugrid-test.js');
co(function *() {
yield ugrid.init();
function sum(a, b) {
a += b;
return a;
}
// Cumulative sum of key and val... | JavaScript | 0.000002 | @@ -258,18 +258,8 @@
) %7B%0A
-%09%09a += b;%0A
%09%09re
@@ -260,24 +260,28 @@
%7B%0A%09%09return a
+ + b
;%0A%09%7D%0A%0A%09// Cu
@@ -356,265 +356,32 @@
;%0A%09%09
-for (var i = 0; i %3C b.length; i++)%0A%09%09%09a%5B1%5D += b%5Bi%5D;%0A%09%09return a;%0A%09%7D%0A%0A%09function vsum(a, b) %7B%0A%09%09a%5B0%5D += ... |
10c609177c9092040b9897ab124b45dd5c9c3f3b | Configure cloudfoundry version of scripted to work with a composed fs that provides all the required stuff to function properly. | server/start-cloudfoundry.js | server/start-cloudfoundry.js | /*******************************************************************************
* @license
* Copyright (c) 2013 VMware, Inc. All Rights Reserved.
* THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
* ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
* CONSTITUTES RECIPIENTS ACCEP... | JavaScript | 0 | @@ -801,337 +801,656 @@
');%0A
-%0Avar sandbox = mappedFs.withBaseDir(path.resolve(__dirname, '../sandbox'));%0A//var amoeba = mappedFs.withPrefix('/amo/eba', sandbox);%0A%0Avar filesystem = scriptedFs.configure(sandbox, %7B%0A%09userHome: '/amo/eba/user.home',%0A%09scriptedHome: '/scripted.home'%0A%7D);%0A%0A//var fi... |
31a2bb209028a7d258a7d538959285e08bc9bd53 | Update JS dependency requires to use NPM plugin ids | i18n.js | i18n.js | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var exec = cordova.require('cordova/exec');
var runtime = require('org.chromium.runtime.runtime');
exports.getAcceptLanguages = function(callback) {
... | JavaScript | 0 | @@ -234,21 +234,35 @@
re('
+c
or
-g.chromium.
+dova-plugin-chrome-apps-
runt
|
c5c604faaedc55ae4178f543cd92bc050feed74a | Correct boolean error when checking for port on server_host info. | src/plugins/TiddlySpaceBackstage.js | src/plugins/TiddlySpaceBackstage.js | /***
|''Requires''|TiddlySpaceConfig|
***/
//{{{
(function($) {
config.options.chkBackstage = true;
config.backstageTasks = [];
config.tasks.login = {
text: "login",
tooltip: "TiddlySpace login",
content: "<<tiddler BackstageLogin>>"
};
config.backstageTasks.push("login");
config.tasks.user = {
text: "user: ",
t... | JavaScript | 0 | @@ -2960,13 +2960,9 @@
t &&
-%0A%09%09%09(
+
serv
@@ -2986,10 +2986,10 @@
80'
-%7C%7C
+&&
%0A%09%09%09
@@ -3015,17 +3015,16 @@
= '443')
-)
%7B%0A%09%09%09tsH
|
294383e5063bd21e7c2169c57841b03770bd05f5 | make pseudo color tiles bearably fast (#10) | lib/isochrone-tile.js | lib/isochrone-tile.js | /**
* Fill ImageData object to be used on Canvas.
* colorScheme is a function that takes a number of minutes and returns an rgba array of the color for that pixel
*/
import Color from 'color'
export default function isochroneTile (imageData, {height, scaleFactor, surface, width, xoffset, yoffset, colorScheme}) {
... | JavaScript | 0 | @@ -190,16 +190,620 @@
color'%0A%0A
+let colorTable = new Uint8Array(255 * 4)%0A%0Afor (let i = 0; i %3C 254; i++) %7B%0A let val = Math.min(i, 120)%0A%0A // 15 minutes of travel time represents 45 degrees on the color wheel%0A let color = Color().hsl(0, 1, 70)%0A color.rotate(45 * (val / 15 %7C 0))%0A%0A // satu... |
410f619af631c492c38edad95f7201bed72ce596 | Reorder includes (#168) | test/require/folder/all.js | test/require/folder/all.js | /*eslint strict: [2, "function"]*/
gpf.require({
amd: "../amd.js",
data: "../data.json",
gpf: "../gpf.js",
commonjs: "../common.js"
}, function (require) {
"use strict";
return Object.assign({
type: "all"
}, require);
});
| JavaScript | 0 | @@ -60,24 +60,54 @@
../amd.js%22,%0A
+ commonjs: %22../common.js%22,%0A
data: %22.
@@ -144,38 +144,8 @@
.js%22
-,%0A commonjs: %22../common.js%22
%0A%0A%7D,
|
052171748d8657fe6022cf328b5c35d2c386d5a2 | Allow a default extension | app/index.js | app/index.js | 'use strict'
var path = require('path')
, npm = require('npm')
, npmName = require('npm-name')
, yeoman = require('yeoman-generator')
, getUsername = require('username')
, getFullname = require('fullname')
, _ = require('lodash')
, mkdirp = require('mkdirp')
, cwd = process.cwd()
module.exports = yeom... | JavaScript | 0.000004 | @@ -3095,24 +3095,117 @@
false%0A %7D%0A
+ , %7B%0A name: 'extension'%0A , message: 'Default extension?'%0A , default: '.js'%0A
%7D%5D%0A%0A
@@ -3852,16 +3852,168 @@
olean)%0A%0A
+ props.extension = props.extension.trim()%0A if (props.extension.indexOf('.') !== 0) %7B%0A ... |
d3b2ca5fdcf938576700aac51a453bd463abf750 | fix rollup.unit.config.js | test/rollup.unit.config.js | test/rollup.unit.config.js | try {
require( 'qunit' );
} catch {
console.log( '\x1b[31mError! You not installed dependencies. Please run `npm i --prefix test`\x1b[37m' );
process.exit( 1 );
}
function glsl() {
return {
transform( code, id ) {
if ( /\.glsl$/.test( id ) === false ) return;
var transformedCode = 'export default ... | JavaScript | 0.000002 | @@ -601,32 +601,37 @@
nf%0A%09%7B%0A%09%09input: '
+test/
unit/three.edito
@@ -634,32 +634,32 @@
ditor.unit.js',%0A
-
%09%09plugins: %5B%0A%09%09%09
@@ -750,32 +750,37 @@
EE',%0A%09%09%09%09file: '
+test/
unit/build/three
@@ -920,32 +920,37 @@
nf%0A%09%7B%0A%09%09input: '
+test/
unit/three.examp
@@ -1070,32 +10... |
df28015088f0ec62800eb7bc3a6378e4bbfa2188 | change academy to http | src/constants/pageLinks.js | src/constants/pageLinks.js | const LINKS = {
APP: 'https://app.sendgrid.com/',
ACADEMY: 'https://learn.sendgrid.com/',
FOR_DEVELOPERS: '/for-developers/',
GLOSSARY: '/glossary/',
LOGOUT: 'https://app.sendgrid.com/logout/',
PRICING: 'https://sendgrid.com/pricing/',
RELEASE_NOTES: '/release-notes/',
SENDGRID: 'https://sendgrid.com/',... | JavaScript | 0 | @@ -61,17 +61,16 @@
Y: 'http
-s
://learn
|
ea897c919dc9aa5164b612c5d861cc2c67b846fd | debug build | lib/webbot-cmd.js | lib/webbot-cmd.js | 'use strict';
var pkg = require('../package')
, util = require('util')
, path = require('path')
, yargs = require('yargs')
, envArgs, argv, log, opt;
envArgs = process.env.WEBBOT_ARGS ? JSON.parse(process.env.WEBBOT_ARGS) : {};
argv = yargs
.usage(util.format('Usage: %s --env [env] --scenario [scenario] --... | JavaScript | 0.000001 | @@ -1537,11 +1537,23 @@
ple(
-'$0
+util.format('%25s
-e
@@ -1697,16 +1697,27 @@
l trace'
+, pkg.name)
)%0A .arg
|
afe3d24fb9406bf154698c753d3019b39026d6d1 | Kill off more popovers | home/dotjs/github.com.js | home/dotjs/github.com.js | var css = '\
.pr-toolbar {\
position: static !important;\
}\
'
var style = document.createElement('style')
style.appendChild(document.createTextNode(css))
document.getElementsByTagName('head')[0].appendChild(style)
$(document).scroll(function() {
$('.is-stuck').removeClass('is-stuck');
})
$(function() {
$... | JavaScript | 0 | @@ -214,16 +214,51 @@
style)%0A%0A
+$('.Popover.js-notice').remove();%0A%0A
$(docume
|
eaafb47901b6201a06a11e0314af3085e77e3095 | fix broken link in code comment (#949) | lib/js/calcite-web.js | lib/js/calcite-web.js | // ┌────────┐
// │ Bundle │
// └────────┘
// This file imports all the named ES6 exports
// and attaches them to the same object (calcite).
// For more information about using the bundle vs. using individual
// ES6 modules, see esri.github.io/documentation/javascript/#importing
import {
version,
click,
addEvent,
... | JavaScript | 0 | @@ -236,16 +236,28 @@
thub.io/
+calcite-web/
document
|
d5366f55626ba7e4713912f39a783b9c3d2bef7a | Use embed object instead of parameter string | src/js/events/MarathonActions.js | src/js/events/MarathonActions.js | import {
REQUEST_MARATHON_GROUPS_SUCCESS,
REQUEST_MARATHON_GROUPS_ERROR,
REQUEST_MARATHON_GROUPS_ONGOING
} from '../constants/ActionTypes';
var AppDispatcher = require('./AppDispatcher');
var Config = require('../config/Config');
var RequestUtil = require('../utils/RequestUtil');
module.exports = {
fetchGroup... | JavaScript | 0 | @@ -452,42 +452,162 @@
nst
-embed = 'embed=group.groups&embed=
+url = %60$%7BConfig.rootUrl%7D/marathon/v2/groups%60;%0A const embed = %5B%0A %7Bname: 'embed', value: 'group.groups'%7D,%0A %7Bname: 'embed', value: '
grou
@@ -616,12 +616,11 @@
apps
-&' +
+'%7D,
%0A
@@ -630,44 +630,92 @@
... |
07a72a1ed591a21c6638cf28a10ff4410d8e9803 | Update pathwatcher fork to fix Windows build errors. | scripts/dev-bundle-tool-package.js | scripts/dev-bundle-tool-package.js | // This file contains a package.json for the dependencies of the command-line
// tool.
// We put this in a JS file so that it can contain comments. It is processed
// into a package.json file by generate-dev-bundle.sh.
var packageJson = {
name: "meteor-dev-bundle-tool",
private: true,
dependencies: {
// Exp... | JavaScript | 0 | @@ -2660,48 +2660,48 @@
all/
-3623544bddb4cd290d890a0e625164fc557fc461
+9c889dfef62a5738ac1e94634c32887922fa1cfa
%22,%0A
|
73e2da3c82169db67ecde1d42eebde8f64716bd6 | Create custom model loader so models can be mocked when testing | app/index.js | app/index.js | /**
* Incident Theatres
* An example movie cinema guide API written in NodeJS
* @copyright 2013 Jeremy Worboys
*/
var orm = require('orm');
var express = require('express');
var appConfig = require('./config/application');
var dbConfig = require('./config/database');
var cinemas = require('./controllers/cinemas');... | JavaScript | 0 | @@ -439,54 +439,71 @@
els%0A
-var defineModels = function(db, models
+app.models = %7B%7D;%0Aorm.connect(dbConfig, function(err, db
) %7B%0A
mode
@@ -498,16 +498,20 @@
) %7B%0A
+app.
models.c
@@ -555,93 +555,157 @@
);%0A%7D
-;%0A%0A// Define middleware stack%0Aapp.use(orm.express(dbConfig, %7B define: def... |
deb810722821466e32aa5d0adf60e5e335e2d724 | delete book by id | model/book/book-router.js | model/book/book-router.js | const router = require('express').Router();
const controller = require('./book-controller');
const authUtils = require('../../auth/authUtils');
router.route('/getall')
.get((...args) => controller.find(...args));
router.route('/deleteall', authUtils.ensureAuthenticated)
.delete((...args) => controller.deleteMany(... | JavaScript | 0 | @@ -583,32 +583,94 @@
ndById(...args))
+%0A .delete((...args) =%3E controller.findByIdAndRemove(...args))
;%0A%0Arouter.route(
|
d2648eeef02c807acc712888d86601cd2d1e1a2a | add uuid to widgets root container | src/core/componentTools.js | src/core/componentTools.js | /**
* 组件公共方法
* @author Brian Li
* @email lbxxlht@163.com
* @version 0.0.2.1
*/
define(function (require) {
var _ = require('underscore');
var util = require('./util');
var MERGE_FROM_PROPS_TO_STYLE = [
'width',
'minWidth',
'maxWidth',
'height',
'minHeight',
... | JavaScript | 0 | @@ -3651,32 +3651,153 @@
.appSkin) : '';%0A
+ // uuid%0A if (me.props.uuid) %7B%0A result%5B'data-uuid'%5D = me.props.uuid;%0A %7D;%0A
// s
|
761448e5767ca31aa98114469f20803cc9d4c85f | Fix indent | app/js/helpers/popover.js | app/js/helpers/popover.js | define([
'jquery',
'underscore',
'backbone',
'collections/topic',
'helpers/conf',
'helpers/nav'
], function($, _, Backbone, TopicCollection, ConfHelper, NavHelper) {
return {
parseYoutubeUrl: function (url) {
// FIXME: 80+
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\... | JavaScript | 0.000854 | @@ -3196,33 +3196,32 @@
-
$(ev.currentTarg
@@ -3298,17 +3298,16 @@
-
data.con
@@ -3313,17 +3313,16 @@
ntent +%0A
-
@@ -3390,33 +3390,32 @@
-
$(ev.currentTarg
@@ -3445,25 +3445,24 @@
, 'true');%0A%0A
-
|
9ec3d42d2a736975665f30934be174dcb2c8aa8a | Add the `publish` option (#82) | app/index.js | app/index.js | 'use strict';
const Generator = require('yeoman-generator');
const licenses = [
{ name: 'Apache 2.0', value: 'Apache-2.0' },
{ name: 'MIT', value: 'MIT' },
{ name: 'Mozilla Public License 2.0', value: 'MPL-2.0' },
{ name: 'BSD 2-Clause (FreeBSD) License', value: 'BSD-2-Clause-FreeBSD' },
{ name: 'BSD 3-Claus... | JavaScript | 0 | @@ -1998,32 +1998,148 @@
LICENSE'%0A %7D);
+%0A%0A this.option('publish', %7B%0A type: Boolean,%0A desc: 'Publish the package',%0A required: false%0A %7D);
%0A %7D%0A%0A initiali
@@ -4180,147 +4180,139 @@
-// We don't want users to publish their module to NPM if they copyrighted%0A ... |
31561c2021c7837662e004f78e29dc5134e92df0 | use a singleton client that works better with Flux | app/index.js | app/index.js | import $ from 'jquery';
import { createClient } from 'sprintly-data';
import router from './router'
// Enable React dev tools
var React = require('react');
window.React = React;
$(function() {
window.manifold = router(createClient({ token: window.__token }));
});
| JavaScript | 0 | @@ -28,31 +28,27 @@
ort
-%7B createC
+c
lient
- %7D
from '
+./lib/
spri
@@ -56,12 +56,14 @@
tly-
-data
+client
';%0Ai
@@ -218,48 +218,17 @@
er(c
-reateClient(%7B token: window.__token %7D));
+lient);%0A%0A
%0A%7D);
|
ab560e82e6a052f3b8f3f99860233997fd92b567 | update credentials | app/models/credentials.js | app/models/credentials.js | var Credentials = Class.create({
initialize: function() {
this.email = this.emailCookie().get() || "yafrapp"
this.password = this.passwordCookie().get() || "Password1!"
},
save: function() {
this.emailCookie().put(this.email)
this.passwordCookie().put(this.password)
},
emailCookie: function(... | JavaScript | 0.000001 | @@ -98,21 +98,8 @@
et()
- %7C%7C %22yafrapp%22
%0A
@@ -146,24 +146,8 @@
et()
- %7C%7C %22Password1!%22
%0A %7D
|
5e3960c139f0fc288cb88b8a36b4bc72cd917238 | use random port for testing | test/test.eventsManager.js | test/test.eventsManager.js | var path = require('path'),
util = require('util'),
mongoose = require('mongoose');
var ioClient = require('socket.io-client');
//var ioServer = require('socket.io-client');
var basedir = path.join(__dirname, '..');
var libdir = path.join(basedir, 'lib');
//var server = require(path.join(basedir, 'server.js')... | JavaScript | 0 | @@ -363,16 +363,24 @@
'config.
+example.
js'));%0Av
@@ -427,24 +427,26 @@
rver.host);%0A
+//
var port = (
@@ -486,16 +486,62 @@
.port);%0A
+var port = Math.floor(Math.random() * 10000);%0A
var sock
@@ -666,48 +666,8 @@
%7D;%0A%0A
-console.log(%22socketUrl : %22, socketUrl);%0A
var
@@ -760,461 +760,165 @@
t);%... |
b051a8fe6540c1227c852cb20f0536470ec4bb94 | Remove test checking script tag existence (tag is now removed) | test/test.keen.tracking.js | test/test.keen.tracking.js | //var expect = chai.expect;
describe("Keen Tracking", function() {
describe("#addEvent", function() {
describe("via XHR/CORS (if supported)", function(){
beforeEach(function() {
var self = this;
self.keen = new Keen({
projectId: keenHelper.projectId,
writeKey: keenHel... | JavaScript | 0 | @@ -2434,32 +2434,35 @@
%7D);%0A%0A
+ //
it(%22should add
@@ -2533,22 +2533,33 @@
tion()%7B%0A
+ //
%0A
+ //
this.
@@ -2620,24 +2620,27 @@
ties);%0A
+ //
var tag =
@@ -2677,34 +2677,37 @@
-jsonp%22);%0A
+//
+
expect(tag).to.e
@@ -2713,24 +2713,27 @@
exist;%0A
... |
947776fcc5f0f88c9b1bced247364c59835a7e61 | Update export default. | app/index.js | app/index.js | /**
* Created by sbardian on 5/16/17.
*/
import { React } from 'react';
class openTrivia extends React.Component {
constructor (props) {
super(props);
this.state = {
test: 'test',
}
}
componentWillReceiveProps (newProps) {
// When component gets props
}
componentWillUnmount () {
... | JavaScript | 0 | @@ -69,16 +69,31 @@
eact';%0A%0A
+export default
class op
@@ -353,17 +353,16 @@
nt mount
-s
%0A %7D%0A%0A
@@ -700,32 +700,4 @@
,%0A%7D;
-%0A%0Aexport default openTrivia;
|
c3b83b93c5f2230909a395382701a7ad8eb92fa9 | check for error | app/persistence/drinks.js | app/persistence/drinks.js | 'use strict';
exports.getAllDrinks = function(client, callback) {
var results = [];
var query = client.query("SELECT name, barcode, fullprice, discountprice, quantity, empties FROM drinks ORDER BY name ASC");
query.on('row', function(row) {
results.push(row);
});
query.on('end', function() {
callback... | JavaScript | 0.000001 | @@ -2186,24 +2186,55 @@
rink... %22);%0A
+%0A if(err) callback(err);%0A%0A
callba
|
a81b118ddc8c0628d949ad7e1a0d04c53b0849b3 | fix rank | app/scripts/views/Rank.js | app/scripts/views/Rank.js | define([
'underscore',
'backbone',
'handlebars',
'collections/Answers',
'text!templates/rank.handlebars'
], function(_, Backbone, Handlebars, AnswersCollection, tpl) {
'use strict';
var RankView = Backbone.View.extend({
el: '#rankView',
template: Handlebars.compile(tpl),
initialize: funct... | JavaScript | 0.000006 | @@ -787,35 +787,36 @@
s =
-_.pluck(data, '
+data%5B0%5D.questions%5B0%5D.
answers
-')%5B0%5D
;%0A%0A
@@ -872,24 +872,37 @@
on: data%5B0%5D.
+questions%5B0%5D.
answers%5B0%5D.t
|
36f84a1998f6fbaaadfd60cdde3d2baf01fcbf4d | Rename environment middleware function. | lib/middleware/env.js | lib/middleware/env.js | var conflict = require('../conflict');
var cli = require('cli-define');
var Option = cli.Option;
/**
* Imports program-specific environment variables
* into the program.
*/
module.exports = function() {
return function environ(req, next) {
var env = this.env(), z, receiver = this.getReceiver();
var conf... | JavaScript | 0 | @@ -223,20 +223,16 @@
tion env
-iron
(req, ne
@@ -248,16 +248,20 @@
var env
+iron
= this.
@@ -349,16 +349,20 @@
if(!env
+iron
&& conf
@@ -604,16 +604,20 @@
env
+iron
= requi
@@ -659,16 +659,20 @@
.env(env
+iron
);%0A
@@ -765,16 +765,20 @@
z in env
+iron
) %7B%0A
@@ -896,32 +896,105 @@
))... |
2ccb32f236e76f4aeb82323d70751d38f1d023fc | remove import | src/d3binding/transform.js | src/d3binding/transform.js | define(
'd3binding/transform',
[],
function(sb, o) {
function transform() {
var that = sb.observable("");
var translate = {
binding : null,
observable : sb.observable("")
};
var scale = {
binding : null,
observable : sb.observable("")
};
var rotate = {
binding : null,
o... | JavaScript | 0.000002 | @@ -44,16 +44,55 @@
ion(
-sb, o) %7B
+) %7B%0A%09%09var o = sb.base.observable.isObservable;
%0A%09%09f
|
8d42909eabfaa0346ccc0c7563983b5d2f214bdc | Change argument order to be more consistent | lib/cartodb/models/mapconfig/adapter/aggregation-mapconfig-adapter.js | lib/cartodb/models/mapconfig/adapter/aggregation-mapconfig-adapter.js | const AggregationProxy = require('../../aggregation/aggregation-proxy');
const { MapConfig } = require('windshaft').model;
const queryUtils = require('../../../utils/query-utils');
const MISSING_AGGREGATION_COLUMNS = 'Missing columns in the aggregation. The map-config defines cartocss expressions,'+
' interactivity fi... | JavaScript | 0.000919 | @@ -4842,32 +4842,46 @@
data(connection,
+ layer, index,
isVectorOnlyMap
@@ -4887,30 +4887,16 @@
pConfig,
- layer, index,
(err, s
@@ -5746,16 +5746,30 @@
nection,
+ layer, index,
isVecto
@@ -5783,30 +5783,16 @@
pConfig,
- layer, index,
callbac
|
5241b4174ebc0770b28913bad76c2e0e25b67314 | Add test to compare cloning of item with a GradientColor. | test/tests/Item_Cloning.js | test/tests/Item_Cloning.js | test('Path#clone()', function() {
var proj = paper.project;
var path = new Path([10, 20], [30, 40]);
path.closed = true;
path.name = 'test';
path.style = {
strokeCap: 'round',
strokeJoin: 'round',
dashOffset: 10,
dashArray: [10, 2, 10],
fillColor: new RGBColor(0, 0, 1),
strokeColor: new RGBColor(0, 0, ... | JavaScript | 0 | @@ -526,24 +526,361 @@
path);%0A%7D);%0A%0A
+test('Path#clone() with GradientColor', function() %7B%0A%09var colors = %5B'red', 'green', 'black'%5D;%0A%09var gradient = new Gradient(colors, 'radial');%0A%09var color = new GradientColor(gradient, %5B0, 0%5D, %5B20, 20%5D, %5B10, 10%5D);%0A%09%0A%09var proj = paper.proj... |
f37991450bd5eea768dd641dbbb0f7cd32a84fc8 | Test content type for empty options. | test/tinify-client-test.js | test/tinify-client-test.js | "use strict"
var tinify = require("../lib/tinify")
var assert = require("chai").assert
var nock = require("nock")
describe("Client", function() {
beforeEach(function() {
this.subject = new tinify.Client("key")
})
describe("request", function() {
describe("when valid", function() {
it("should issu... | JavaScript | 0 | @@ -736,32 +736,329 @@
, %7B%7D)%0A %7D)%0A%0A
+ it(%22should issue request without content type when options are empty%22, function() %7B%0A var request = nock(%22https://api.tinify.com%22, %7B%0A badheaders: %5B%22content-type%22%5D%0A %7D).get(%22/%22, %22%22)%0A .reply(200... |
ce73b832287267abcc071f7807fc01ddb853bab5 | Update proxy to support simple pass. | app/proxy.js | app/proxy.js | var Client = require("ringo/httpclient").Client;
var {Request} = require("ringo/webapp/request");
var {MemoryStream} = require("io");
var {merge} = require("ringo/utils/objects");
var responseForStatus = require("./util").responseForStatus;
var app = function(env) {
var resp;
var request = new Request(env);
... | JavaScript | 0 | @@ -50,17 +50,15 @@
var
-%7B
Request
-%7D
= r
@@ -87,23 +87,30 @@
equest%22)
+.Request
;%0Avar
-%7B
MemorySt
@@ -113,17 +113,16 @@
ryStream
-%7D
= requi
@@ -133,21 +133,32 @@
io%22)
+.MemoryStream
;%0Avar
-%7B
merge
-%7D
= r
@@ -186,16 +186,22 @@
bjects%22)
+.merge
;%0Avar re
@@ -255,21 +255,79 @@
... |
552d7a28bcc7339035e05d7ba1e582901fd1a9a3 | Edit my languages and tools | imports/client/components/About/AboutBand.js | imports/client/components/About/AboutBand.js | import React from 'react';
import Scroll from 'react-scroll';
const ScrollElement = Scroll.Element;
class AboutBand extends React.Component {
shouldComponentUpdate() {
return false;
}
render() {
const languages = ['HTML', 'CSS', 'JavaScript', 'SQL', 'PHP', 'C#'];
const tools = ['Meteor', 'React', '... | JavaScript | 0 | @@ -254,19 +254,18 @@
ript', '
-SQL
+C#
', 'PHP'
@@ -267,18 +267,19 @@
'PHP', '
-C#
+SQL
'%5D;%0A
@@ -319,16 +319,27 @@
'Sass',
+ 'ASP.NET',
'Mongo'
@@ -351,15 +351,8 @@
SQL'
-, 'NPM'
%5D;%0A%0A
|
e35f2aa744f38a8004574d09d41d1791dcfc7e8e | Spelling Whatsapp | imports/ui/components/ContactUs/ContactUs.js | imports/ui/components/ContactUs/ContactUs.js | import React from 'react';
import { Grid, Panel, Row, Col } from 'react-bootstrap';
import './ContactUs.scss';
const ContactUs = () => (
<Panel className="ContactUs">
<h3>Contact Us</h3>
<Grid>
<Row>
<Col xs={12} sm={6}>
<address>
<h4> Address </h4>
59 Kurin... | JavaScript | 0.999095 | @@ -798,17 +798,16 @@
%3Ch4%3EWhat
-'
s App %3C/
|
3fb7fd988b48363899885c3dd216956518eac352 | Fixing a spelling issue | client/messages.js | client/messages.js | var faye = require('faye');
var client;
var subscribers = [];
module.exports = {
init: function() {
client = new faye.Client(location.origin + 'faye');
client.subscribe('/events', function(data) {
subscribers.forEach(function(func) {
func(data);
});
});
},
subscribe: function(ac... | JavaScript | 0.999967 | @@ -145,16 +145,17 @@
igin + '
+/
faye');%0A
|
e7963081aa854e8441b6a5eb8fa08a4616482834 | carousels need force_no_fold | share/spice/amazon/amazon.js | share/spice/amazon/amazon.js | function ddg_spice_amazon(api_response) {
api_response = api_response.ItemSearchResponse.Items;
console.log(api_response);
var items = api_response.Item;
var query = DDG.get_query().replace(/\s+amazon\s*$|^\s*amazon\s+/i, '');
Spice.render({
header1 : query + " (Amazon)"... | JavaScript | 0.999603 | @@ -705,16 +705,57 @@
items,%0A
+ force_no_fold : true,%0A
%7D);%0A
|
864b9fce0121817e3ddba5587f54eb98f44d12f0 | Update moves.js | mods/trademarked/moves.js | mods/trademarked/moves.js | 'use strict';
exports.BattleMovedex = {
"copycat": {
num: 383,
accuracy: true,
basePower: 0,
category: "Status",
desc: "The user uses the last move used by any Pokemon, including itself. Fails if no move has been used, or if the la... | JavaScript | 0.000001 | @@ -5680,16 +5680,17 @@
side.id=
+=
'p1')opp
@@ -5738,16 +5738,17 @@
side.id=
+=
'p2')opp
|
2dd2300c8725d09dedeb1bcdc708952beb185253 | Revert "Make non-stubbed log calls a failure" | mixin/test/js/runner.js | mixin/test/js/runner.js | /*global Loader, LocalCache, lumbarLoadPrefix, chai, mocha, mochaPhantomJS */
mocha.setup({
ui: 'bdd',
ignoreLeaks: true
});
window.expect = chai.expect;
chai.Assertion.includeStack = true;
sinon.config = {
injectIntoThis: true,
injectInto: null,
properties: ['spy', 'stub', 'mock', 'clock', 'sandbox', 'ser... | JavaScript | 0 | @@ -725,268 +725,8 @@
; %7D;
-%0A%0A if (!console._log) %7B%0A _.each(%5B'log', 'warn', 'error'%5D, function(name) %7B%0A console%5B'_' + name%5D = console%5Bname%5D;%0A console%5Bname%5D = function() %7B%0A throw new Error('console.' + name + ': ' + _.toArray(arguments).join(' '));%0A %7D%0A... |
8b8ab9b5b89641903e1972a854ac110897823d85 | Fix mistype | warp/static/js/create/index.js | warp/static/js/create/index.js | /* global window, $, marked, vex, ace, Watcher, UsageButton, document, location, $markdownDiv */
$(() => {
window.$markdownDiv = $('#id_markdown');
const editor = ace.edit('id_markdown');
const md2html = () => {
const markdownContent = editor.getValue();
const markdownSlides = markdownContent.split(/={5,... | JavaScript | 0.000775 | @@ -1489,17 +1489,15 @@
md2html
-()
);%0A%7D);%0A
|
f5eb3adfe6a0523e7a94be3db4611dc92aef15b0 | fix type-is check | fittings/swagger_params_parser.js | fittings/swagger_params_parser.js | 'use strict';
var debug = require('debug')('swagger:swagger_params_parser');
var debugContent = require('debug')('swagger:content');
var path = require('path');
var helpers = require('../lib/helpers');
var bodyParser = require('body-parser');
var async = require('async');
var _ = require('lodash');
module.exports = ... | JavaScript | 0.000051 | @@ -793,32 +793,59 @@
if (err) %7B
+ /* istanbul ignore next */
return next(err
@@ -2257,16 +2257,43 @@
(err) %7B
+ /* istanbul ignore next */
return
@@ -3832,16 +3832,19 @@
ype-is')
+.is
;%0Afuncti
@@ -3885,10 +3885,8 @@
urn
-!(
type
@@ -3901,16 +3901,17 @@
ns.type
+!
== 'func
@@ -3916,19 +3916,2... |
ecc418dfd4dfa84a8a2abfcc03890d181599793c | Tidy window loop. | consumer.js | consumer.js | var cadence = require('cadence')
var Signal = require('signal')
var Scheduler = require('happenstance').Scheduler
var Procession = require('procession')
var coalesce = require('extant')
var Monotonic = require('monotonic').asString
var abend = require('abend')
function Consumer (turnstile, qualifier, read, write, opti... | JavaScript | 0 | @@ -3244,17 +3244,17 @@
_window
-=
+!
= window
@@ -3259,32 +3259,56 @@
ow.count) %7B%0A
+ break%0A %7D%0A
sequence
@@ -3321,36 +3321,32 @@
dow.end%0A
-
-
this._windows.po
@@ -3357,47 +3357,38 @@
+%7D%0A
- continue%0A %7D%0A if (
+if (sequence == ... |
9aa078f2d0f93097afe3bbe407dbe1c615455020 | fix resizing errors this closes #17 | lib/node-repl-view.js | lib/node-repl-view.js | 'use babel';
import repl from 'repl';
import { dirname } from 'path';
import { readdirSync } from 'fs';
import NodeReplReadStream from './node-repl-read-stream';
import NodeReplWriteStream from './node-repl-write-stream';
const WELCOME_MESSAGE = 'Welcome to Node.js ' + process.version;
export default class NodeReplV... | JavaScript | 0 | @@ -345,30 +345,25 @@
-// Create root e
+this.mainE
lement
+;
%0A
@@ -395,32 +395,218 @@
.outputElement;%0A
+%0A this.resize = this.resize.bind(this);%0A this.resizeStart = this.resizeStart.bind(this);%0A this.resizeStop = this.resizeStop.bind(this);%0A this.clear = this.clear.bind(this);%0A%0A
... |
36ab583688079015750b894322c98a37aec94a22 | name it all | modules/@amperka/motor.js | modules/@amperka/motor.js | var Motor = function(opts) {
this._pinPWM = opts.pwm;
this._pinPWM.mode('output');
this._pinPhase = opts.phase;
this._pinPhase.mode('output');
};
Motor.prototype.write = function(u) {
u < 0 ? this._pinPhase.write(1) : this._pinPhase.write(0);
var self = this;
analogWrite(self._pinPWM, E.clip(Math.abs(u),... | JavaScript | 0.999538 | @@ -31,21 +31,21 @@
this._p
-inPWM
+wmPin
= opts.
@@ -47,16 +47,19 @@
opts.pwm
+Pin
;%0A this
@@ -61,21 +61,21 @@
this._p
-inPWM
+wmPin
.mode('o
@@ -92,23 +92,23 @@
this._p
-inP
hase
+Pin
= opts.
@@ -112,16 +112,19 @@
ts.phase
+Pin
;%0A this
@@ -126,23 +126,23 @@
this._p
-inP
hase
+Pin
.mode('o
@@... |
267dda5baa05f27f45ecb5ef01d1ed943668d8b0 | support xsocks, xproxy | lib/Pac.js | lib/Pac.js | 'use strict';
var pac = require('./pac-resolver');
var parseUrl = require('url').parse;
var loadScript = require('./loadScript');
var CACHE_TIME = 1000 * 15;
var DIRECT = function(url, host, cb) {cb(null, 'DIRECT;');};
var PROXY_RE = /(PROXY|SOCKS)\s+([^;\s]+)/i;
function Pac(options, dnsResolve) {
if (!(this instan... | JavaScript | 0 | @@ -2598,16 +2598,98 @@
Exp.$2;%0A
+ var rule = RegExp%5B'$&'%5D;%0A var index = res.indexOf(rule) + rule.length;%0A
va
@@ -2739,33 +2739,13 @@
t',
-res.
index
-Of(RegExp%5B'$&'%5D)
) !=
|
f735ed0b8021b2cd8fc0b9fe1504318937176d9f | change the endpoint for the authenticator | addon/authenticators/osf-cookie.js | addon/authenticators/osf-cookie.js | import Ember from 'ember';
import Base from 'ember-simple-auth/authenticators/base';
import config from 'ember-get-config';
import { authenticatedAJAX } from 'ember-osf/utils/ajax-helpers';
/**
* @module ember-osf
* @submodule authenticators
*/
/**
* Ember-simple-auth compatible authenticator based on session c... | JavaScript | 0.000075 | @@ -811,17 +811,8 @@
ce%7D/
-users/me/
%60,%0A
@@ -1272,16 +1272,40 @@
copy(res
+%5B'meta'%5D%5B'current_user'%5D
, true))
|
9596e3e3c251c074d4cd24f8c2120042644e08d2 | remove instance.mediaType override, make mediaType method public and overridable | plugins/contentNegotiator.js | plugins/contentNegotiator.js |
var Plugin = require('nokomis/plugin')
var Negotiator = require('negotiator')
var ContentNegotiator = module.exports = Plugin.extend({
run: function(instance, callback) {
instance._neg = new Negotiator(instance.req)
instance.mediaType = this._mediaType
delete instance._mediaType
callback()
},
... | JavaScript | 0 | @@ -222,80 +222,8 @@
eq)%0A
- instance.mediaType = this._mediaType%0A delete instance._mediaType%0A
@@ -893,17 +893,16 @@
%7D,%0A%0A
-_
mediaTyp
@@ -1031,8 +1031,9 @@
%0A %7D%0A%0A%7D)
+%0A
|
01788bf5ab72124afad324e54af20ff54c3a97ff | add deviceToken | server/graphql/resolvers/Authen.js | server/graphql/resolvers/Authen.js | module.exports = (models) => {
models.AuthenTC.addRelation(
'user',
() => ({
resolver: models.UserTC.getResolver('findOne'),
args: {
filter: (source) => ({ userId: source.userId }),
skip: null,
sort: null,
},
projection: { userId: true },
})
)
models.Au... | JavaScript | 0.000003 | @@ -1743,32 +1743,61 @@
eName: 'String',
+%0A deviceToken: 'String',
%0A%0A email: '
|
4c948ca3fb765cd6db085f7f3f76dd81918c8665 | Copy RN's internal logging for unhandled rejections | packages/plugin-react-native-unhandled-rejection/rejection-handler.js | packages/plugin-react-native-unhandled-rejection/rejection-handler.js | /*
* Automatically notifies Bugsnag when an unhandled promise rejection happens in React Native
*/
/* global __DEV__ */
const rnPromise = require('promise/setimmediate/rejection-tracking')
module.exports = {
load: (client) => {
if (!client._config.autoDetectErrors || !client._config.enabledErrorTypes.unhandled... | JavaScript | 0 | @@ -748,34 +748,34 @@
ult
-log message doesn't happen
+handler doesn't get called
, so
@@ -850,24 +850,37 @@
_DEV__)
-logError
+rnInternalOnUnhandled
(id, err
@@ -949,110 +949,188 @@
%0A//
-t
+T
his
-function is copied in from the promise module, since it's not exported and we can't reference it:
+is a direct... |
7354ff33b2a24ceebdd9cccf447738b7815ec07b | Fix Portal | Libraries/Portal/Portal.js | Libraries/Portal/Portal.js | /**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... | JavaScript | 0.000001 | @@ -1134,16 +1134,32 @@
Class(%7B%0A
+ _modals: %7B%7D,%0A%0A
static
@@ -2977,26 +2977,39 @@
-return %7B
+this._
modals
-:
+ =
%7B%7D
+;%0A return %7B
%7D;%0A
@@ -3303,179 +3303,19 @@
%7D%0A
- // This way state is chained through multiple calls to%0A // _showModal, _closeModal correctly.%0A ... |
aba3fb693b3581d2ed1f915fbf72dc3c307208d0 | Fix testing for existence in user cache | core/irc.js | core/irc.js |
var events = require("events");
var irc = require("irc");
var Promise = require("promise");
var util = require("util");
var ignores = require("./ignores");
var User = require("./user");
var Connection = function(config) {
var copy = Object.create(config);
copy.autoConnect = false;
this.config = config;
this... | JavaScript | 0.000003 | @@ -4793,24 +4793,12 @@
) -
-this.users%5Bnick%5D
+info
.tim
|
6a18c09a6ea5e3ca9bbd343978fdea8d8f92a112 | Translate tag cloud keys | js/components/PeriodTypeTagCloudComponent.js | js/components/PeriodTypeTagCloudComponent.js | angular.module('chronontology.components')
.component('periodTypeTagCloud',{
templateUrl: '../../partials/period/type-tag-cloud.html',
controller: function ($http) {
this.normalizeWeight = function(count) {
return Math.log10(count);
}
this.tags =... | JavaScript | 0.998696 | @@ -175,16 +175,25 @@
n ($http
+, $filter
) %7B%0A%0A
@@ -646,16 +646,35 @@
text:
+$filter('transl8')(
bucket.k
@@ -675,16 +675,17 @@
cket.key
+)
,%0A
|
16301499277e52573fb46a63dd623a19cfe56c1d | Add the city reducer | frontend/src/reducers/Reducers.js | frontend/src/reducers/Reducers.js | import {combineReducers} from 'redux';
import {FILTER_OFFER, INVALIDATE_OFFERS, REQUEST_OFFERS, RECEIVE_OFFERS} from 'actions/OffersActions';
import _ from 'lodash';
import offers from './OffersReducer.js';
const travelApp = combineReducers({
offers
});
export default travelApp;
| JavaScript | 0.99867 | @@ -35,111 +35,8 @@
ux';
-%0Aimport %7BFILTER_OFFER, INVALIDATE_OFFERS, REQUEST_OFFERS, RECEIVE_OFFERS%7D from 'actions/OffersActions';
%0A%0Aim
@@ -98,16 +98,57 @@
cer.js';
+%0Aimport cities from './CitiesReducer.js';
%0A%0Aconst
@@ -181,16 +181,16 @@
s(%7B%0A
-
offers
%0A%7D);
@@ -185,16 +185,26 @@
offer... |
fa0617a230439ead20aa0a880a8010479bc1467e | Fix global var | src/fauxton/app/helpers.js | src/fauxton/app/helpers.js | // 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
// distributed un... | JavaScript | 0.000038 | @@ -3270,16 +3270,20 @@
p)%7B%0A
+var
format =
|
9192c64b2f2c98b2e67fd09139110c0795a11d79 | Add forceBackFallback | src/apps/SocketsRegistry/DetailsView/SocketDetailsView.js | src/apps/SocketsRegistry/DetailsView/SocketDetailsView.js | import React from 'react';
import Reflux from 'reflux';
import _ from 'lodash';
import Helmet from 'react-helmet';
import { withRouter } from 'react-router';
import SocketsRegistryStore from '../SocketsRegistryStore';
import SocketsRegistryActions from '../SocketsRegistryActions';
import { Loading, RegistryEmptyView,... | JavaScript | 0.000002 | @@ -4381,16 +4381,51 @@
=%7Btrue%7D%0A
+ forceBackFallback=%7Btrue%7D%0A
|
d38c217b22bd9e99132f0f38b338e2e56cebcd73 | Remove unnecessary interpolation | web/static/js/reducers/game.js | web/static/js/reducers/game.js | import { combineReducers } from 'redux';
import * as constants from '../constants';
const round = (state = 1, action) => {
switch (action.type) {
case constants.NEXT_ROUND:
return state + 1;
default:
return state;
}
};
const difficulty = (state = '', action) => {
switch (action.type) {
... | JavaScript | 0.000772 | @@ -821,11 +821,8 @@
nt:
-$%7B%60
$%7Bhi
@@ -855,10 +855,8 @@
d%7D)%60
-%7D%60
;%0A%0A
|
cdb1e02eb168364666131e3c9128f4622a6d136d | Fix image url issue | server/rendering/renderTemplate.js | server/rendering/renderTemplate.js | var mu = require('mu2'); // notice the '2' which matches the npm repo, sorry..
var fs = require('fs');
var utils = require('../utils');
var environment = require('../environment');
var globals = require('../globals');
mu.root = __dirname + '/templates';
module.exports = (links, filename, filepath, title) => {
retur... | JavaScript | 0.000068 | @@ -591,20 +591,20 @@
on: file
-path
+name
.slice(0
|
563b0518285e263e91f126a25bf643249fcc53e2 | move $populate parameter to params | lib/populate/index.js | lib/populate/index.js | 'use strict'
module.exports.compatibility = function(options) {
return function(hook) {
// move query to params
if (hook && hook.params && hook.params.query && hook.params.query.$populate) {
hook.params.$populate = hook.params.query.$populate;
delete hook.params.query.$populate;
}
return h... | JavaScript | 0.000001 | @@ -9,328 +9,8 @@
ict'
-%0Amodule.exports.compatibility = function(options) %7B%0A return function(hook) %7B%0A // move query to params%0A if (hook && hook.params && hook.params.query && hook.params.query.$populate) %7B%0A hook.params.$populate = hook.params.query.$populate;%0A delete hook.params.quer... |
d0aab11372e21985f1266e704255043370284c05 | Use matchall shim | plugins/no-undefined-vars.js | plugins/no-undefined-vars.js | const stylelint = require('stylelint')
const ruleName = 'primer/no-undefined-vars'
const messages = stylelint.utils.ruleMessages(ruleName, {
rejected: varName => `${varName} is not defined`
})
// TODO: Get this list from @primer/primitives
const vars = ['--color-text-primary']
module.exports = stylelint.createPlug... | JavaScript | 0 | @@ -31,16 +31,70 @@
lelint')
+%0Aconst matchAll = require('string.prototype.matchall')
%0A%0Aconst
@@ -726,16 +726,25 @@
ame%5D of
+matchAll(
decl.val
@@ -749,18 +749,10 @@
alue
-.matchAll(
+,
varR
|
b05925cc0e3221a32935722bc9b78854582e89ee | move percentage capacitty to variable | awx/ui/client/src/instance-groups/capacity-bar/capacity-bar.directive.js | awx/ui/client/src/instance-groups/capacity-bar/capacity-bar.directive.js | export default ['templateUrl', 'ComponentsStrings',
function (templateUrl, strings) {
return {
scope: {
capacity: '=',
totalCapacity: '='
},
templateUrl: templateUrl('instance-groups/capacity-bar/capacity-bar'),
restrict: 'E',
... | JavaScript | 0.000009 | @@ -926,39 +926,45 @@
-scope.CapacityStyle = %7B
+var percentageCapacity = Math
%0A
@@ -984,29 +984,23 @@
-'flex-grow':
+.round(
scope.ca
@@ -1029,16 +1029,143 @@
pacity *
+ 10) / 10 * 100;%0A%0A scope.CapacityStyle = %7B%0A 'flex-grow': p... |
d2501204385cd8ad02a25c2816337a71c245814e | Fix issue #4 | lib/npmalerts.js | lib/npmalerts.js | var _ = require('lodash');
var semver = require('semver');
var github = require('./github');
var npm = require('./npm');
var db = require('./db');
var email = require('./email');
var cache = {};
db.getUpdate(function(error, oldTimestamp) {
if (error) {
return console.error(error);
}
npm.getLat... | JavaScript | 0 | @@ -1769,16 +1769,51 @@
if(
+(cached.version && versionRange &&
semver.l
@@ -1858,16 +1858,17 @@
nRange))
+)
%7C%7C%0A%09%09%09%09
|
3de1a83a4782968bbd7b0ce6ff4fcd6c73c1dffd | Use the minified versions in production | lib/api.js | lib/api.js | var bodyParser = require('body-parser')
var exec = require('child_process').exec
var express = require('express')
var read = require('fs').readFileSync
var handlebars = require('handlebars')
var config = require('./config')
var log = require('./log')
var stormpath = require('./stormpath')
var app = module.exports = e... | JavaScript | 0.000001 | @@ -2604,13 +2604,46 @@
ed:
-false
+process.env.NODE_ENV !== 'development'
,%0A
|
60a927dd375618a62452c7d54b180be2d8c40ad0 | disable remove on properties | lib/property/index.js | lib/property/index.js | 'use strict'
var Observable = require('vigour-js/lib/observable')
var renderLoop = require('../element/loop')
var _parseValue = Observable.prototype.parseValue
module.exports = new Observable({
inject: [
require('../util/context'),
require('./animate'),
require('../cases/inject'),
require('../element... | JavaScript | 0.000001 | @@ -569,16 +569,29 @@
nt.stamp
+, this._input
)%0A
@@ -1784,24 +1784,46 @@
tamp%0A %7D,%0A
+ emitRemove () %7B%7D,%0A
patch (e
|
4f1ecd0ee64dff08e8fbfb4f4a1dff2df8996fc6 | Apply extension function to position the emitter | lib/pixi-dust.js | lib/pixi-dust.js | /*
* pixi-dust
* https://github.com/mstyles/pixi-dust
*
* Creates a fairly generic particle emitter for use with [PIXI](http://www.pixijs.com/)
* with extension points allowing for some awesome particle goodness
*
* Copyright (c) 2013 Matt Styles
* Licensed under the MIT license.
*/
// Common module wrapper -... | JavaScript | 0 | @@ -1210,17 +1210,16 @@
%7D%0A%0A
-%0A
@@ -1515,16 +1515,277 @@
s point%0A
+ // Uses the supplied extension function for positioning if available or%0A // falls back to basic assignment%0A if ( typeof extend.setEmitterPosition === 'function' ) %7B%0A extend.setEmitterPos... |
f8e20e09a9c9534ae81780299695180b2ac09c7b | Tweak answer render | lib/questions/base.js | lib/questions/base.js | var _ = require('../utils')
var co = require('co')
/**
* Question basic constructor.
*
* @param {Object} config Configure of the question.
*/
function Base(prompt, config) {
_.extend(this, config)
this.prompt = prompt
}
/**
* Render question output message.
* Different type question will cover this method t... | JavaScript | 0.000001 | @@ -1949,14 +1949,8 @@
yan(
-'(' +
answ
@@ -1955,17 +1955,16 @@
swer + '
-)
%5Cn'))%0A%7D%0A
|
f0ad2afca1e848479183ab7bafd6c410d54c851e | add test for clean, and structure tests for main() | test/Cosign.unit.js | test/Cosign.unit.js | var assert = require('assert');
var should = require('should');
var sinon = require('sinon');
var Cosign = require('../bin/Cosign').class();
describe('Cosign', function(){
describe('#Cosign', function(){
it('should create a new cosign with no error', function() {
var cosign = new Cosign(["","","dump"]);
... | JavaScript | 0 | @@ -389,16 +389,17 @@
scribe('
+#
main', f
@@ -406,24 +406,169 @@
unction() %7B%0A
+ describe('clean', function() %7B%0A it('should clean the database file', function() %7B%0A %7D);%0A %7D);%0A describe('init', function() %7B%0A
it('shou
@@ -610,24 +610,26 @@
n() %7B%0A
+
var fs =... |
808bd5f35a264d52236fff06ccff04fa4e2d22de | Fix pre display style toggle to match that in the CSS | lib/reporters/html.js | lib/reporters/html.js |
/**
* Module dependencies.
*/
var Base = require('./base')
, utils = require('../utils')
, Progress = require('../browser/progress')
, escape = utils.escape;
/**
* Save timer references to avoid Sinon interfering (see GH-237).
*/
var Date = global.Date
, setTimeout = global.setTimeout
, setInterval = ... | JavaScript | 0 | @@ -4028,16 +4028,23 @@
? '
+inline-
block'%0A
@@ -5164,12 +5164,13 @@
, fn);%0A %7D%0A%7D
+%0A
|
550523c7b9d8d5d7d30608ff3d3d0856067524e1 | Fix specs after variable renaming | test/Select.spec.js | test/Select.spec.js | import React from 'react';
import { shallow, mount } from 'enzyme';
import Select from '../src/Select';
import mocker from './helper/new-mocker';
describe('<Select />', () => {
let wrapper;
test('handles layout classes', () => {
wrapper = shallow(<Select s={4} m={6} />);
expect(wrapper.hasClass('input-fi... | JavaScript | 0.000006 | @@ -1285,20 +1285,21 @@
handles
-inpu
+selec
tClassNa
@@ -1350,20 +1350,21 @@
alidate
-inpu
+selec
tClassNa
|
eae6fc74cf147b68ff30a0f30e6fd1ab053ce657 | Add isPrime helper function (tests :white_check_mark:) | src/helpers/find-primes.js | src/helpers/find-primes.js | import numbers from './number-iterator.js';
function findPrimes(total) {
const primes = [ ...numbers(total) ].map((number) => {
// Logic for finding next prime goes here
return number * 2;
});
return primes;
}
export default findPrimes;
| JavaScript | 0.000025 | @@ -212,16 +212,643 @@
mes;%0A%7D%0A%0A
+export function isPrime(number) %7B%0A%09if (number %3C 2) %7B%0A%09%09return false;%0A%09%7D%0A%09// Quick check for even numbers%0A%09if (number !== 2 && number %25 2 === 0) %7B%0A%09%09return false;%0A%09%7D%0A%09// We start checking at 3, factor can be maximum 1/3 the numbe... |
2e0f0d65fe42e530fcbc3324a954e1c86315c7cb | Update archiveTest.js | test/archiveTest.js | test/archiveTest.js | var dwcareader = require("../index.js");
var dr = new dwcareader();
var path = '';
/*
Must set a path that works for your local machine. This is different for Windows and Mac!
var path = C:\\xampp\\dwca-no.zip;
var path = /Users/username/Documents/temp;
*/
path = '/Users/jamesbrown/Documents/Xentity/temp';
dr.... | JavaScript | 0 | @@ -277,19 +277,8 @@
ers/
-jamesbrown/
Docu
@@ -287,16 +287,8 @@
nts/
-Xentity/
temp
@@ -317,63 +317,32 @@
p://
-images.cyberfloralouisiana.com/archives/dwca-no/dwca-no
+%7Bpath_to_archive%7D/%7Bname%7D
.zip
@@ -382,24 +382,25 @@
msg) %7B%0A if
+
(error) %7B%0A
@@ -419,17 +419,18 @@
g(msg);%0A
-%09
+
%... |
e3a0910605e2ade5bf16ba4d84b1300c1240b145 | Remove parseInt from sortVotes (#1025) (#1069) | src/helpers/sortHelpers.js | src/helpers/sortHelpers.js | export const sortComments = (comments, sortType = 'BEST') => {
const sortedComments = [...comments];
const netNegative = a => a.net_rshares < 0;
const totalPayout = a =>
parseFloat(a.pending_payout_value) + parseFloat(a.total_payout_value)
+ parseFloat(a.curator_payout_value);
const netRshares = a =>... | JavaScript | 0 | @@ -1071,126 +1071,30 @@
=%3E
-%7B%0A const aShares = parseInt(a.rshares, 10);%0A const bShares = parseInt(b.rshares, 10);%0A return bShares - aS
+b.rshares - a.rs
hares;
-%0A%7D;
%0A%0Aex
|
0c946100f0edb2079e28b89de041ad25824b5768 | Update record routes | lib/routes/records.js | lib/routes/records.js | /*
** Module dependencies
*/
var records = require('../controllers/records');
module.exports = function(app) {
// Params
app.param('datasetId', records.record);
// Routes
app.route('/services/:serviceId/datasets/:datasetId')
.get(records.show);
app.route('/services/:serviceId/datasets')
... | JavaScript | 0 | @@ -115,16 +115,19 @@
/
-/
+*
Params
+ */
%0A
@@ -142,105 +142,497 @@
am('
-datasetId', records.record);%0A%0A // Routes%0A app.route('/services/:serviceId/datasets/:dataset
+recordId', records.record);%0A%0A /* Routes */%0A app.route('/services/:serviceId/records/:recordId')%0A .get(recor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.