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 |
|---|---|---|---|---|---|---|---|
2dc291ed7d2da656d17adc59f56f8b996334d0e5 | Fix proptype errors | src/containers/entitysetdetail/IntegrationDetailsModal.js | src/containers/entitysetdetail/IntegrationDetailsModal.js | import React, { PropTypes } from 'react';
import { Modal, Button, Table } from 'react-bootstrap';
import styles from './entitysetdetail.module.css';
const IntegrationDetailsModal = ({ isOpen, onClose, entitySet }) => {
const getKeyListItems = () => {
const keys = entitySet.entityType.key;
const properties = ... | JavaScript | 0.000098 | @@ -612,16 +612,26 @@
urn (%3Cli
+ key=%7Bkey%7D
%3E%7Bnamesp
@@ -1317,24 +1317,42 @@
(%0A %3Cli
+ key=%7Bproperty.id%7D
%3E%3Cb%3E%7Bpropert
@@ -2125,27 +2125,16 @@
s.object
-.isRequired
%0A%7D;%0A%0Aexp
|
4d7344f5fdcef6e9c081f6077c1d6b604ecbd323 | improve save task | lib/saveTask/index.js | lib/saveTask/index.js | 'use babel'
import call from '../helpers/call'
import prompt from '../helpers/prompt'
import getConfig from '../helpers/getConfig'
import _ from 'underscore'
/* global atom */
export default async function () {
const projectId = getConfig().projectId
if (!projectId) {
return atom.notifications.addError('Error... | JavaScript | 0.000013 | @@ -410,17 +410,16 @@
getTasks
-
($projec
@@ -441,17 +441,16 @@
tasks
-
(project
@@ -455,32 +455,83 @@
ctId: $projectId
+, sortBy: %22completedAt%22, sortType: DESC, limit: 100
) %7B%0A item
|
7f31a9852e585a9a6610e210b640aaf72e8a2b5f | Fix typo | lib/cli.js | lib/cli.js | // Load modules
var Bossy = require('bossy');
var Hoek = require('hoek');
var Commander = require('./commander');
var Serial = require('./serial');
// Declare internals
var internals = {};
exports.run = function (options, callback) {
if (typeof options === 'function') {
callback = options;
op... | JavaScript | 0.999999 | @@ -1644,37 +1644,36 @@
commander.
-createReading
+updateSensor
(data.radioI
|
1a54f89daf8751f682867b0c9dad32452b678db0 | Remove console.log wrapper | lib/sequelize.js | lib/sequelize.js | var Utils = require("./utils")
, DAOFactory = require("./dao-factory")
, DataTypes = require('./data-types')
, DAOFactoryManager = require("./dao-factory-manager")
, Migrator = require("./migrator")
, QueryInterface = require("./query-interface")
if(parseFloat(process.version.replace(... | JavaScript | 0.000002 | @@ -959,178 +959,8 @@
%7D%0A%0A
- if(this.options.logging == console.log) %7B%0A // using just console.log will break in node %3C 0.6%0A this.options.logging = function(s) %7B console.log(s) %7D%0A %7D%0A%0A
|
1631acedb657e41b5092cf22f922420997a1e9ce | Fix responseParse bug | src/http-layers/default.js | src/http-layers/default.js | import HttpMethods from '../http-methods';
import FetchStates from '../fetch-states';
/**
* Create a browser http layer. A request will return a function that can be used to abort the request. An argument can be passed
* to the function. It will be dispatched to the store. If action is a function, then the argument ... | JavaScript | 0.000001 | @@ -1242,24 +1242,61 @@
99)%0A %7D;
+%0A let responseOk = response.ok;
%0A%0A let
@@ -1496,18 +1496,17 @@
response
-.o
+O
k)%0A
|
b2b75c33a9ef34cfe1cfd557c0711d905781e353 | Update equals=>equal | test/butter.unit.js | test/butter.unit.js | $(document).ready(function(){
var video = document.getElementById('video');
var popcorn = new Popcorn('#video');
var pluginResults;
var pluginOptions;
var manifest = {
about: {name: 'test', version: '0.1', author: 'Bobby Richter', website: 'http://robothaus.org'},
options: {
start : {elem:'input', type:'text',... | JavaScript | 0 | @@ -1,8 +1,13 @@
+equal
$(docume
@@ -556,17 +556,16 @@
etup';%7D,
-
%0A start
@@ -606,17 +606,16 @@
start'%7D,
-
%0A end:f
|
61e2435b3b9274f6890293175822b1bf28a90b80 | Add last test for case1.js | test/case1/case1.js | test/case1/case1.js | ;(_ => {
'use strict';
var tagContent = 'router2-content';
var tagView = 'router2-view';
var div = document.querySelector('div#case1');
test(_ => {
assert_true(window.location.hash === '' || window.location.hash === '');
}, 'The location starts with no hash');
var async1 = async_test('hash changed f... | JavaScript | 0.000002 | @@ -644,16 +644,89 @@
route');
+%0A var async6 = async_test('reset to the window.location.hash=%22%22 state');
%0A%0A asyn
@@ -3986,37 +3986,20 @@
-document.body.removeChild(div
+async6.next(
);%0A
@@ -4033,16 +4033,16 @@
_error;%0A
-
docu
@@ -4108,24 +4108,332 @@
'));%0A %7D);%0A%0A
+ async6.next ... |
c274a76ac7466a205cc0d85b2b82dd65903a6bd4 | Use cameCase in debug types | test/client.test.js | test/client.test.js | var fakeIndexedDB = require('fake-indexeddb')
var MemoryStore = require('logux-core').MemoryStore
var ClientSync = require('logux-sync').ClientSync
var TestPair = require('logux-sync').TestPair
var Client = require('../client')
var originError = console.error
var originIndexedDB = global.indexedDB
afterEach(function ... | JavaScript | 0 | @@ -5700,24 +5700,12 @@
', '
-definitely_
not
-_e
+E
rror
|
5ac1666485dbadb6eb547354c6ee44388c57119b | add header comments and show time elapsed | makezip.js | makezip.js | var fs=require('fs');
var argv=process.argv;
var app=argv;
app.shift();app.shift();
var date =new Date().toISOString().substring(0,10);
var appname=(app[0]||'ksanapc');
var zipname='%zip%/'+appname +'-'+process.platform+'-'+date+'.zip';
var shellscript={
'win32':'.cmd',
'darwin':'.command',
'linux':'.sh'
}
var shell... | JavaScript | 0 | @@ -1,12 +1,78 @@
+/*%0A%09create stand-alone deployable zip, without any dependency.%0A*/%0A
var fs=requi
@@ -518,16 +518,41 @@
iter();%0A
+var starttime=new Date();
%0Avar wal
@@ -1639,29 +1639,28 @@
pc%0A%0Avar adds
-cript
+hell
script=funct
@@ -2465,21 +2465,20 @@
c') adds
-cript
+hell
script()
@@ -2594,15 +... |
889b1ca6436f3f3a44632ba8524c1c703255044a | use ENV on test | test/config.conf.js | test/config.conf.js | module.exports = {
key: 'AIzaSyB1OOSpTREs85WUMvIgJvLTZKye4BVsoFU',
id: 'IkmHStAWXis',
query: 'nodejs song',
playlistId: 'PLpOqH6AE0tNhInmRTSNf9f6OQsdaSJS8F'
};
| JavaScript | 0 | @@ -23,49 +23,31 @@
ey:
-'AIzaSyB1OOSpTREs85WUMvIgJvLTZKye4BVsoFU'
+process.env.YOUTUBE_API
,%0A
|
fab58b9aec741a82437061e7f7ec59878fcadd80 | Fix anonymous function declaration coding style in deep-freeze.js tests | test/deep-freeze.js | test/deep-freeze.js | var assert = require('assert');
var freeze = require('../lib/deep-freeze');
describe('deep-freeze', function () {
describe('init', function () {
var person = {};
var expectedPerson = {};
beforeEach(function() {
person = {
name: 'John',
surname: '... | JavaScript | 0.000093 | @@ -221,32 +221,33 @@
oreEach(function
+
() %7B%0A
|
3fc7d860ec385055091fb0c8a397b3de86a5ac11 | check for missing docuement in pen selection | src/js/actions/tool/pen.js | src/js/actions/tool/pen.js | /*
* Copyright (c) 2015 Adobe Systems Incorporated. All rights reserved.
*
* 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 ri... | JavaScript | 0 | @@ -3952,84 +3952,352 @@
-selectVectorMask = descriptor.playObject(vectorMaskLib.dropPathSelection());
+var applicationStore = this.flux.store(%22application%22),%0A currentDocument = applicationStore.getCurrentDocument();%0A if (currentDocument) %7B%0A selectVectorMask = ... |
b5ae3611bf8b9bdd38309924fe2ce112ff34eba7 | Fix the timing of calculating width of floats | src/js/option/alignment.js | src/js/option/alignment.js | /**
*
* Alignment Classes (JS)
*
* @author Takuto Yanagida @ Space-Time Inc.
* @version 2019-02-15
*
*/
window.ST = window['ST'] || {};
ST.addInitializer(1, function () {
const TARGET_SELECTOR = '.stile';
const WIDTH_MIN = 240; // px
const PERMITTED_CLASSES = ['alignleft', 'aligncenter', 'alignright', ... | JavaScript | 0.000124 | @@ -96,12 +96,12 @@
19-0
-2-15
+5-08
%0A *%0A
@@ -787,16 +787,37 @@
eturn;%0A%0A
+%09setTimeout(() =%3E %7B%0A%09
%09modifyA
@@ -849,16 +849,17 @@
left');%0A
+%09
%09modifyA
@@ -892,16 +892,34 @@
ight');%0A
+%09%7D, 0); // Delay%0A
%0A%0A%09// --
|
be8f2007d3cdcd0c9d36617a789d6500d49eb357 | remove newlines from partials | lib/condensation/template-helpers/partial.js | lib/condensation/template-helpers/partial.js | var File = require('vinyl');
var _ = require('lodash');
var fs = require('fs');
var matter = require('gray-matter');
var helper = function(cModule,pPath,hArgs,hOpts,cOpts) {
var engine = cOpts.handlebars;
var particle = cOpts.particleLoader.loadParticle('partial',cModule,pPath,{parentFile: hOpts.data._file});
v... | JavaScript | 0.000024 | @@ -425,16 +425,59 @@
tf8'%7D));
+%0A m.content = m.content.replace(/%5Cn$/,'');
%0A%0A if (
|
be4a44639034249c9d3afd990d4884b19b10c160 | Remove uneccecarry semicolon. | model/document.js | model/document.js | // Document abstraction
'use strict';
var memoize = require('memoizee/plain')
, validDb = require('dbjs/valid-dbjs')
, defineStringLine = require('dbjs-ext/string/string-line')
, defineFile = require('./file')
, defineStatusLog = require('./status-log')
, defineDate = require(... | JavaScript | 0.000625 | @@ -409,17 +409,16 @@
ments');
-;
%0A%0Amodule
|
4b04c6c217b8f194db80a3261d7735f095dfddca | add archived state to traveler model | model/traveler.js | model/traveler.js | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = Schema.Types.ObjectId;
/******
access := 0 // for read or
| 1 // for write
******/
var sharedWithUser = new Schema({
_id: String,
username: String,
access: Number
});
var form = new Schema({
html: String
});
/*******
s... | JavaScript | 0.000001 | @@ -434,16 +434,40 @@
frozen%0A
+ %7C 4 // archived%0A
*******/
|
b060b6fa8a38997d3db73a524945efa9f1c040ae | Add description and example | src/layouts/PanelLayout.js | src/layouts/PanelLayout.js | /**
* Layout that expands to cover the entire area of its parent, with optional scrolling and padding.
*
* @class
* @extends OO.ui.Layout
*
* @constructor
* @param {Object} [config] Configuration options
* @cfg {boolean} [scrollable=false] Allow vertical scrolling
* @cfg {boolean} [padded=false] Pad the conten... | JavaScript | 0.000001 | @@ -4,27 +4,27 @@
%0A *
+Panel
Layout
- that
+s
expand
-s
to
@@ -52,56 +52,468 @@
of
-its parent, with optional scrolling and padding.
+their parent. They can be configured with scrolling, padding,%0A * and a frame, and are often used together with %7B@link OO.ui.StackLayout StackLayouts%7D.%0A *%0A * @e... |
b2d4417b204bb1f2aa3c394a22e1651ca4bc9106 | Fix Safari map panning | src/layouts/partial-map.js | src/layouts/partial-map.js | import hass from '../util/home-assistant-js-instance';
import Polymer from '../polymer';
import nuclearObserver from '../util/bound-nuclear-behavior';
require('../components/entity/ha-entity-marker');
const {
configGetters,
entityGetters,
} = hass;
window.L.Icon.Default.imagePath = '/static/images/leaflet';
ex... | JavaScript | 0.000001 | @@ -1284,16 +1284,24 @@
// On
+ Safari,
iPhone
@@ -1446,16 +1446,43 @@
leWebkit
+ %7C%7C window.L.Browser.webkit
) %7B%0A
|
63363f3bc826f8c6b3c896164d21fdd8b7855a6f | Incorrect email address | models/Enquiry.js | models/Enquiry.js | var Email = require('keystone-email');
var emailDefaults = require('../src/defaults/email').emailDefaults;
var keystone = require('keystone'),
Types = keystone.Field.Types;
/**
* Enquiry Model
* =============
*/
var Enquiry = new keystone.List('Enquiry', {
nocreate: true,
noedit: true
});
Enquiry.add({
name: ... | JavaScript | 0.998744 | @@ -1170,17 +1170,17 @@
pt.org.n
-s
+z
',%0A%09%09fro
|
c2b780fcde4f033513c893497c179e8e85558e29 | Add in draft field to DBPull function | models/db_pull.js | models/db_pull.js | var utils = require('../lib/utils'),
getLogin = require('../lib/get-user-login'),
db = require('../lib/db');
// Builds an object representation of a row in the DB `pulls` table
// from the data returned by GitHub's API.
function DBPull(pull) {
var pullData = pull.data;
this.data = {
repo: pullData.... | JavaScript | 0 | @@ -435,16 +435,45 @@
a.body,%0A
+ draft: pullData.draft,%0A
da
|
17f2f713a21c26b15133978c4132b31db5300a4a | Edit widget by cliking on the view | lib/assets/javascripts/builder/editor/widgets/widget-view.js | lib/assets/javascripts/builder/editor/widgets/widget-view.js | var CoreView = require('backbone/core-view');
var template = require('./widget-view.tpl');
var ContextMenuFactory = require('builder/components/context-menu-factory-view');
var InlineEditorView = require('builder/components/inline-editor/inline-editor-view');
var templateInlineEditor = require('./inline-editor.tpl');
v... | JavaScript | 0 | @@ -927,16 +927,63 @@
Item',%0A%0A
+ events: %7B%0A 'click': '_onEditWidget'%0A %7D,%0A%0A
initia
@@ -3938,35 +3938,78 @@
dget: function (
-) %7B
+event) %7B%0A event && event.stopPropagation();
%0A WidgetsServ
|
0e4792381870bbaf23233d9cddeba4b2a3fcafd1 | handle unknown WebContents events forwarding to renderer | lib/renderer/web-view/guest-view-internal.js | lib/renderer/web-view/guest-view-internal.js | 'use strict'
const ipcRenderer = require('ipc_utils')
const EventEmitter = require('event_emitter').EventEmitter
var WEB_VIEW_EVENTS = {
'tab-replaced-at': ['tabId', 'index', 'webContents'],
'load-start': ['url', 'isMainFrame', 'isErrorPage'],
'will-detach': [],
'did-attach': ['tabId'],
'tab-detached-at': [... | JavaScript | 0 | @@ -1931,16 +1931,90 @@
ntName%5D%0A
+ if (!ref1) %7B%0A console.error('unknown event', eventName)%0A %7D else %7B%0A
for (i
@@ -2058,24 +2058,26 @@
i = ++j) %7B%0A
+
f = ref1
@@ -2084,16 +2084,18 @@
%5Bi%5D%0A
+
domEvent
@@ -2108,16 +2108,24 @@
args%5Bi%5D%0A
+ %7D %0A
%7D%0A do
|
f28c6ceeadb5982a0d479d741cdb3d25b12e106e | Replace 'console.log' with 'alert'. | jquery-maven-artifact.js | jquery-maven-artifact.js | /**
* jQuery Maven Artifact Plugin
*
* Version: 1.0.1
* Author: Jake Wharton
* License: Apache 2.0
*/
(function($) {
function downloadUrl(groupId, artifactId, version, type) {
var groupPath = groupId.replace(/\./g, '/');
return 'http://repo1.maven.org/maven2/' + groupPath + '/' + artifactId + '/' + vers... | JavaScript | 0.999923 | @@ -509,35 +509,29 @@
g') %7B%0A
-console.log
+alert
('Error: gro
@@ -633,35 +633,29 @@
d') %7B%0A
-console.log
+alert
('Error: cal
@@ -1292,35 +1292,29 @@
g') %7B%0A
-console.log
+alert
('Error: gro
@@ -1424,19 +1424,13 @@
-console.log
+alert
('Er
|
fe06006e495bd56f143ed4e732337956f54fee12 | Change to space separated list of attributes to remove from disabled UIs | js/DisableUiComponent.js | js/DisableUiComponent.js | 'use strict';
var $ = require('jquery');
function DisableUiComponent(html) {
this.$html = html;
}
function preventDefaultAndStopPropagation(e) {
e.preventDefault();
e.stopPropagation();
}
DisableUiComponent.prototype.init = function () {
var component = this;
component.disable(component.$html.f... | JavaScript | 0 | @@ -1716,17 +1716,16 @@
sable-ui
-,
aria-di
|
3c2294a474397da4e97538359933e0bb5a76d33f | update copyright dates from daily grunt work | js/StopwatchNodeTests.js | js/StopwatchNodeTests.js | // Copyright 2018-2020, University of Colorado Boulder
/**
* QUnit tests for StopwatchNode
*
* @author Sam Reid (PhET Interactive Simulations)
*/
import StopwatchNode from './StopwatchNode.js';
QUnit.module( 'StopwatchNode' );
QUnit.test( 'Decimal Formatting', assert => {
assert.equal( StopwatchNode.getDecima... | JavaScript | 0 | @@ -10,13 +10,8 @@
ght
-2018-
2020
|
c6c21f16e6208ff304cb0598d0cb1fa9a8b260e5 | Refresh scroll of sidebar-content when adding/removing sidebar-module | js/components/sidebar.js | js/components/sidebar.js | (function(app) {
'use strict';
var IScroll = require('iscroll');
var helper = app.helper || require('../helper.js');
var dom = app.dom || require('../dom.js');
var Component = app.Component || require('./component.js');
var SidebarModule = app.SidebarModule || require('./sidebar-module.js');
var Sidebar... | JavaScript | 0 | @@ -1589,24 +1589,46 @@
Element());%0A
+ this.markDirty();%0A
%7D;%0A%0A Side
@@ -1766,32 +1766,232 @@
ules(%5B%5D);%0A %7D;%0A%0A
+ SidebarContent.prototype.redraw = function() %7B%0A // XXX: zero timeout to wait for the repaint of iScroll%0A setTimeout(function() %7B%0A this.scrollable().refresh... |
665e87dd5beb166611933edcaca2ceae54d0a8c8 | make sure an undefined prop stays undefined | js/jquery.mobile.core.js | js/jquery.mobile.core.js | /*!
* jQuery Mobile v@VERSION
* http://jquerymobile.com/
*
* Copyright 2010, jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function( $, window, undefined ) {
//jQuery.mobile configurable options
$.extend( $.mobile, {
//namespace used framework-wide... | JavaScript | 0.00006 | @@ -3505,26 +3505,25 @@
.data( prop
-&&
+?
$.mobile.ns
@@ -3516,32 +3516,39 @@
? $.mobile.ns +
+ prop :
prop, value );%0A
|
d72f2882e826afda137e975d28850e579b82feba | Fix tests for arrayed keys. | test/designate.t.js | test/designate.t.js | require('proof')(3, async okay => {
const advance = require('advance')
const designate = require('..')
const items = [{
key: { version: 3, value: 'a' }
}, {
key: { version: 2, value: 'a' }
}, {
key: { version: 1, value: 'a' }
}, {
key: { version: 1, value: 'd' }
... | JavaScript | 0 | @@ -143,302 +143,206 @@
ey:
-%7B version: 3, value: 'a' %7D%0A %7D, %7B%0A key: %7B version: 2, value: 'a' %7D%0A %7D, %7B%0A key: %7B version: 1, value: 'a' %7D%0A %7D, %7B%0A key: %7B version: 1, value: 'd' %7D%0A %7D%5D%0A%0A const expected = %5B%7B%0A key: %7B version: 3... |
ea0ef3dab87fc9aaeae526b097adf2eed62f6011 | Add hilarious easter egg | modules/bucket.js | modules/bucket.js | // inspired by xkcd's bucket :)
var inventory = [];
var inventoryLimit = 20;
var write = require( 'fs' ).writeFile;
try {
inventory = require( __rootdir + '/data/inventory.json' ) || [];
} catch ( e ) {
//
}
function saveInventory() {
write( __rootdir + '/data/inventory.json', JSON.stringify( inventory ) );
}
fun... | JavaScript | 0.000001 | @@ -1944,24 +1944,91 @@
( item ) %7B%0A
+%09%09%09%09%09if ( item === 'apple' ) %7B%0A%09%09%09%09%09%09return 'Core dumped.';%0A%09%09%09%09%09%7D%0A
%09%09%09%09%09return
|
12d56926e51a86819dfb2c514fb034b9f643dfd4 | fix distributor tests - mock executor must be emitter now | test/distributor.js | test/distributor.js | 'use strict';
var Distributor = require('../lib/distributor').Distributor,
Node = require('../lib/node').Node,
expect = require('expect.js');
describe('Distributor', function() {
var distributor,
project1 = {name: 'project1'};
var createNodeMock = function(executorRun) {
return function(params) {
var nod... | JavaScript | 0 | @@ -136,16 +136,64 @@
ect.js')
+,%0A%09EventEmitter = require('events').EventEmitter
;%0A%0A%0Adesc
@@ -430,20 +430,61 @@
%09%09%09%09
-return %7Brun:
+var executor = new EventEmitter();%0A%09%09%09%09executor.run =
exe
@@ -491,17 +491,37 @@
cutorRun
-%7D
+;%0A%09%09%09%09return executor
;%0A%09%09%09%7D;%0A
|
83e15c3d790d22f4792b8abb32fa37cff05b1325 | make panes destroyable | lib/util/pane-item.js | lib/util/pane-item.js | 'use babel'
import { CompositeDisposable, TextEditor, Emitter } from 'atom'
let subs = new CompositeDisposable
let panes = new Set
function ensurePaneVisible(pane) {
if (!pane) return
if (pane.getFlexScale && pane.getFlexScale() < 0.2) {
pane.parent.adjustFlexScale()
pane.setFlexScale(0.6)
}
ensurePa... | JavaScript | 0.000001 | @@ -125,16 +125,36 @@
new Set
+%0Alet registered = %7B%7D
%0A%0Afuncti
@@ -2122,66 +2122,8 @@
ane%0A
- if (this.registered == null) %7B this.registered = %7B%7D %7D%0A
@@ -2129,29 +2129,24 @@
if (pane =
-this.
registered%5Bi
@@ -2195,21 +2195,16 @@
pane =
-this.
register
@@ -2425,24 +2425,92 @@
s.... |
2c80b091225340ebb080490fa94293a3f1186bb9 | Remove blank line. | tests/test-scale-linear.js | tests/test-scale-linear.js | require("./../lib/env-js/envjs/node");
require("./../d3");
var f = d3.format(" .3f");
var x = d3.scale.linear();
console.log("domain([0, 1]).range([0, 1]):");
console.log(" -0.5 -> ", f(x(-0.5)));
console.log(" 0.0 -> ", f(x(0.0)));
console.log(" 0.5 -> ", f(x(0.5)));
console.log(" ... | JavaScript | 0.000791 | @@ -4130,29 +4130,28 @@
%22, x(11));%0Aconsole.log(%22%22);%0A
-%0A
|
b2e0e0fef6185fe095f49820635f44938f050ba5 | add 200 handling | bin/hekto.js | bin/hekto.js | #!/usr/bin/env node
const koa = require('koa');
const app = koa();
const path = require('path');
const fs = require('fs');
const argument = require('argument.js');
const join = require('array-path-join');
/*
set argument options
*/
argument.option('port', 'The port your content should be served on.', '3000');
argu... | JavaScript | 0.000001 | @@ -3662,24 +3662,410 @@
%7D else %7B%0A
+ if (fs.existsSync(_200) && fs.lstatSync(_200).isFile() && _200 !== false) %7B%0A if (this.request.url.slice(-1) !== '/') %7B%0A this.status = 307;%0A this.redirect(this.request.url + '/' + query);%0A %7D else %7B%0A this.status... |
1c2cc8eb86d437e8fde995029c307f70c3d7a121 | Test selectors and events together. | test/events.spec.js | test/events.spec.js | describe('Events', function () {
var component, called;
var TestUtils = React.addons.TestUtils;
before(function () {
called = false;
component = TestUtils.renderIntoDocument(React.createElement('a', {
onClick: function () {
called = true;
}
}));
this.$r = $R(component);
});... | JavaScript | 0 | @@ -43,22 +43,21 @@
ponent,
-called
+stubs
;%0A%0A var
@@ -94,24 +94,93 @@
Utils;%0A%0A
+ function stub (name) %7B%0A return stubs%5Bname%5D = sinon.stub();%0A %7D%0A%0A
before
(functio
@@ -163,32 +163,36 @@
);%0A %7D%0A%0A before
+Each
(function () %7B%0A
@@ -198,23 +198,20 @@
-called = false;... |
4cfe7dde91b5d93383e06e7aee4282fc59e3a8ef | Upgrade Kafka image version | generators/generator-constants.js | generators/generator-constants.js | 'use strict';
// version of docker images
const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v2.5.8';
const DOCKER_JAVA_JRE = 'openjdk:8-jre-alpine';
const DOCKER_MYSQL = 'mysql:5.7.13'; // mysql.5.7.14+ doesn't work well with zoned date time, see https://github.com/jhipster/generator-jhipster/pull/4038
cons... | JavaScript | 0 | @@ -684,17 +684,17 @@
ka:0.10.
-0
+1
.1';%0Acon
|
f2144a370bc278e78918045a21456d2025a0ba59 | comment custom questions | examples/example.js | examples/example.js | var Vue = require('vue');
var View = require('../src/index.js');
Vue.config.debug = true;
var view = new View({
skin: 'bar',
// rating: 4,
// showNumbers: true,
serviceName: 'ACME',
colors: {
primary: '#1565C0'
},
translation: {
// REASONS: ['A', 'B', 'C'],
// DETAILS: 'Please tell us more',... | JavaScript | 0 | @@ -317,16 +317,19 @@
re',%0A
+ //
QUESTIO
@@ -335,26 +335,29 @@
ONS: %5B%7B%0A
+//
+
label: 'Inst
@@ -383,24 +383,27 @@
to use',%0A
+ //
name: 'NP
@@ -423,24 +423,27 @@
fficult'%0A
+ //
%7D, %7B%0A
@@ -431,32 +431,35 @@
%0A // %7D, %7B%0A
+ //
label: 'Insta
@@ -496,24 +4... |
93856c2aa7e4907e1e234a36d3f376df9bcc926f | allow caching get requests with cache: true option in json api | vendor/assets/javascripts/onion/json_api.js | vendor/assets/javascripts/onion/json_api.js | if(typeof define!=='function'){var define=require('amdefine')(module);}
define([
'jquery',
'onion/type',
'onion/event_emitter',
'onion/utils/extend'
], function($, Type, eventEmitter, extend){
return Type.sub('JsonApi')
.proto(eventEmitter)
.proto({
init: function (options) {
if (!op... | JavaScript | 0.000006 | @@ -150,16 +150,50 @@
/extend'
+,%0A 'onion/utils/object_signature'
%0A%5D, func
@@ -226,16 +226,33 @@
, extend
+, objectSignature
)%7B%0A%0A re
@@ -545,24 +545,52 @@
arams %7C%7C %7B%7D%0A
+ this.__cache__ = %7B%7D%0A
%7D,%0A%0A
@@ -597,11 +597,15 @@
+__
get
+__
: fu
@@ -722,24 +722,368 ... |
bfd4365ca64abab3bd6a9670af4e94ac2f9cb2bc | make it bbetter | assets/js/hihi_chatbot.js | assets/js/hihi_chatbot.js | $(document).ready(function() {
// Append chat into page
var chatHtml = '<div class="chatbox-wrapper">';
chatHtml += '<div class="title">';
chatHtml += '<i class="fa fa-user-o" aria-hidden="true"></i>';
chatHtml += '<span> Não cá</span>';
chatHtml += '<span class="toggle-chat" role="button">Open</span>';
c... | JavaScript | 0.000157 | @@ -229,14 +229,14 @@
an%3E
-N%C3%A3o c%C3%A1
+MaxXam
%3C/sp
|
7d004be47070dd2d54ba83e091744d8f2d90a5f7 | Remove loadCSS from critical.js. | assets/js/src/critical.js | assets/js/src/critical.js | function loadCSS( href, before, media ){
"use strict";
var ss = window.document.createElement( "link" );
var ref = before || window.document.getElementsByTagName( "script" )[ 0 ];
var sheets = window.document.styleSheets;
ss.rel = "stylesheet";
ss.href = href;
ss.media = "only x";
ref.parentNode.insertB... | JavaScript | 0 | @@ -1,685 +1,4 @@
-function loadCSS( href, before, media )%7B%0A %22use strict%22;%0A var ss = window.document.createElement( %22link%22 );%0A var ref = before %7C%7C window.document.getElementsByTagName( %22script%22 )%5B 0 %5D;%0A var sheets = window.document.styleSheets;%0A ss.rel = %22stylesheet%22;%0A ss.hre... |
6bb037de22a4a5d1566fc31d3af67f6c7cfed5d9 | Simplify test DB dropping and drop it after every test | test/mochaHelper.js | test/mochaHelper.js | 'use strict';
/* global before, after */
var app = require('../server')
, mongoose = require('mongoose')
;
before(function (done) {
if (app.get('env') === 'test') {
done();
} else {
done(new Error('Not using test env! Bailing out.'));
}
});
after(function (done) {
var connection = mongoose.connect... | JavaScript | 0.000001 | @@ -34,12 +34,16 @@
fter
+Each
*/%0A
-
var
@@ -263,16 +263,20 @@
;%0A%0Aafter
+Each
(functio
@@ -291,25 +291,8 @@
%7B%0A
- var connection =
mon
@@ -311,303 +311,29 @@
tion
-;%0A if (!connection.name.match(/test/i)) %7B%0A done(new Error('Database name didn%5C't contain test. Not dropping it.'));%0A ... |
c1e4f338937d79e680306c044cff4338dc0de452 | Change the check for the SourceForge links. | source/_static/js/plugins.js | source/_static/js/plugins.js | /* jshint quotmark:true, browser:true, jquery:true, strict:false */
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupColl... | JavaScript | 0 | @@ -876,17 +876,64 @@
nd('
-.external
+a%5Bhref%5E=%22http://sourceforge.net/projects/mpc-hc/files/%22%5D
').e
|
2eedf424815573162a8142e8eb1253aea53f4c7b | Implement global.$$html$$ convention | lib/sm_server.js | lib/sm_server.js | /*
* BSD 3-Clause License
*
* Copyright (c) 2015, Nicolas Riesco and others as credited in the AUTHORS file
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of sourc... | JavaScript | 0 | @@ -3188,16 +3188,279 @@
mime$$;%0A
+ %7D else if (global.$$html$$) %7B%0A response = %7B%0A mime: %7B%0A %22text/html%22: global.$$html$$,%0A %7D,%0A %7D;%0A delete global.$... |
7cfbba2bdcd7be0af18e30ec1b3dbb7486569935 | Fix flow errors due to new version | src/components/style.js | src/components/style.js | /* @flow */
import camelCasePropsToDashCase from '../camel-case-props-to-dash-case';
import createMarkupForStyles from '../create-markup-for-styles';
import {getPrefixedStyle} from '../prefixer';
import React from 'react';
const buildCssString = function(
selector: string,
rules: Object,
userAgent: ?string,
):... | JavaScript | 0.000003 | @@ -2163,22 +2163,22 @@
tring%5D:
-Object
+string
%7D %7B%0A
|
5bff3217107a5837f47f8f2fc6eaffe0ac74ea85 | Fix problems introduced by changing to mongodb from promised-mongo | mongodb-output.js | mongodb-output.js | 'use strict';
//
// Output plugin that stores logs in MongoDB database.
//
var assert = require('chai').assert;
var MongoClient = require('mongodb').MongoClient;
module.exports = function (conf) {
console.log('Loading to database: ' + conf.get('db'));
console.log('Logs to: ' + conf.get('logsCollection'));
... | JavaScript | 0.000002 | @@ -441,15 +441,53 @@
hen(
-db =%3E %7B
+client =%3E %7B%0A%09 var db = client.db('logs');%0A
%0A
@@ -806,31 +806,62 @@
on (logs) %7B%0A
+%0A%09%09
-
+if (logs && logs.length %3E 0) %7B%0A
@@ -857,24 +857,32 @@
+ %09
logsCollecti
@@ -875,32 +875,37 @@
%09logsCollec... |
5b221e61f68dc4a7d2ece550e332bd01121c4a47 | Update log.js #102 | lib/steps/log.js | lib/steps/log.js | module.exports = {
spec : function() {
return {
name : 'log',
desc : '',
fields : [
{type:'string',name:'log',description:'',required:true}
]
}
}
,
process : function(ctx, step, checkNext) {
console.log(step.log);
ctx.mainWin.webContents.send('wfevt', {action:'log',item:{log:step.log}});
p... | JavaScript | 0.000001 | @@ -72,16 +72,29 @@
desc : '
+to do logging
',%0A%09%09%09fi
@@ -145,16 +145,31 @@
iption:'
+logging message
',requir
@@ -373,8 +373,9 @@
t);%0A%09%7D%0A%7D
+n
|
156ec0535abe2ec7eed209816867055b69a3bfd8 | Simplify code | bin/index.js | bin/index.js | #!/usr/bin/env node
const { processParameters, getLighthouseMetrics } = require('../lib/lighthouse-badges');
const { parser } = require('../lib/argparser');
const handleUserInput = async () => {
try {
const args = await parser.parseArgs();
process.stdout.write('Running lighthouse tests... (this might take a... | JavaScript | 0.041259 | @@ -488,98 +488,9 @@
%7D;%0A%0A
-// Self-invoke if not imported but called directly as executable%0A(() =%3E !module.parent &&
+(
hand
@@ -500,18 +500,16 @@
serInput
-()
)();%0A%0Amo
|
a8c2bfc85895775659c0c13bbb727a6aa5b3cb63 | Update maskeradeDirective.js | js/maskeradeDirective.js | js/maskeradeDirective.js | (function(){
'use strict';
angular.module('app')
.directive('wipMaskeradeDirective', ['$filter', WipMaskeradeDirective]);
function WipMaskeradeDirective($filter) {
return {
restrict: 'EA',
replace: true,
scope: {
wipNgMask: '@?', // used ... | JavaScript | 0 | @@ -2053,41 +2053,8 @@
%7B%0D%0A
- %09console.log(date);%0D%0A
|
ef7a93e364727b9b1ce1d62e66312394c4df8cba | Add tests for routes | test/routes.test.js | test/routes.test.js | var
express = require( 'express' ),
chai = require( 'chai' ),
should = chai.should(),
expect = chai.expect;
describe( 'Routes', function () {
it( 'should pass in the locals for the view', function ( done ) {
var
app = express.createServer(),
swag = require( '../lib/swag-blog' )( app );
... | JavaScript | 0.000001 | @@ -112,16 +112,68 @@
i.expect
+,%0A routes = require( '../lib/swag-blog/routes' )()
;%0A%0Adescr
@@ -219,39 +219,47 @@
uld
-pass in the locals for the view
+make the correct auto routes by default
', f
@@ -581,44 +581,117 @@
+
app.
-_
lo
-cals.postCount.should.equal(3
+okup.get('/post/:post')%5B0%5D.c... |
835781c083949a0975806089c3c40b583a1f39ca | add a breaking test -- fix it | tests/types/SelectField.js | tests/types/SelectField.js | import $ from 'jquery';
import SelectField from '../../source/types/SelectField';
var sender$,
receiver$;
function assertValueChange(assert, newValue) {
sender$.val(newValue);
assert.equal( receiver$.val(), newValue, 'receiver value was not properly set');
}
QUnit.module( 'SelectField', {
beforeEach:... | JavaScript | 0.000003 | @@ -456,16 +456,23 @@
lue=%221%22%3E
+option
1%3C/optio
@@ -478,53 +478,8 @@
on%3E%0A
- %3Coption value=%222%22%3E2%3C/option%3E%0A
@@ -981,16 +981,16 @@
rt, 1);%0A
-
@@ -1020,16 +1020,582 @@
t, %22%22);%0A %7D%0A);
+%0A%0AQUnit.test(%0A 'should adjust the receiver field by op... |
7aedcd6ab760b555e8af64096302108748d93f97 | Tidy up | data/app.js | data/app.js | const showCustomPage = customNewTabUrl => {
console.debug( '[showCustomPage] init', { customNewTabUrl } );
// no tab URL set, do nothing
if ( !customNewTabUrl || !customNewTabUrl.length ) {
console.debug( '[showCustomPage] no tab url set' );
return false;
}
document.querySelector( 'html' ).classList.add( 'cn... | JavaScript | 0.000033 | @@ -159,17 +159,16 @@
bUrl %7C%7C
-!
customNe
@@ -182,16 +182,22 @@
.length
+=== 0
) %7B%0A%09%09co
@@ -258,14 +258,8 @@
turn
- false
;%0A%09%7D
@@ -857,23 +857,8 @@
e );
-%0A%0A%09return true;
%0A%7D;%0A
|
0f548d2ec1b726e52fd2a787986fc612f76f3433 | change unsafe chars | lib/types/jpg.js | lib/types/jpg.js | // NOTE: we only support baseline and progressive JPGs here
// due to the structure of the loader class, we only get a buffer
// with a maximum size of 4096 bytes. so if the SOF marker is outside
// if this range we can't detect the file size correctly.
// TODO: handle the following as well
// ffe2 — Canon EOS-1D JPEG... | JavaScript | 0.000001 | @@ -294,17 +294,17 @@
// ffe2
-%E2%80%94
+-
Canon E
@@ -326,9 +326,9 @@
fe3
-%E2%80%94
+-
Sam
|
600bba5690daa40c0d59fce59c2e11325ae8ba0d | Fix bug in specifying out file for minify command. | commands/minify.js | commands/minify.js | var fs = require('fs');
var pathLib = require('path');
var utils = require('../lib/utils');
var parser = require('uglify-js').parser;
var uglify = require('uglify-js').uglify;
var cssmin = require('../lib/cssmin');
var exec = require('child_process').exec;
var allowedExtensions = {
'js': undefined,
'css': undefine... | JavaScript | 0 | @@ -4177,32 +4177,49 @@
%7D/,%0A
+pathLib.basename(
fileNameSansExte
@@ -4216,32 +4216,33 @@
meSansExtension)
+)
;%0A toFi
|
68fbec5d3d543d24f29ae59ddc2067582708c724 | Improve remote command | commands/remote.js | commands/remote.js | var async = require('async');
var _ = require('lodash');
var path = require('path');
var traverse = require('traverse');
var semver = require('semver');
module.exports = {
name: 'remote',
description: 'Checks your projects for any references to non local environments or versions of dependencies that dont work offl... | JavaScript | 0.000086 | @@ -542,16 +542,29 @@
al.json'
+, 'test.json'
%5D,%0A
@@ -588,12 +588,20 @@
: '(
-host
+%5B%5Ev%5Dhost%7Curl
)',%0A
@@ -602,25 +602,28 @@
rl)',%0A
-l
+notL
ocalConnecti
@@ -638,37 +638,32 @@
: '(
-local%7C127%5C.0%5C.0%5C.1%7C0%5C.0%5C.0%5C.0
+development%7Cstaging%7Clive
)',%0A
@@ -1787,17 +1787,16 ... |
8492c7b8793403da2db161672e8d1a63e4aab0b2 | update syntax | test/server-test.js | test/server-test.js | var symbol = require('../src/js/weatherSymbolComponent')
, React = require('react');
describe('weather symbol', function () {
describe('component', function () {
it('should render a simple symbol as <svg> markup', function () {
React.renderComponentToStaticMarkup(symbol()({
type: 'svg',
id: '01d'
}))... | JavaScript | 0.000001 | @@ -237,33 +237,24 @@
React.render
-Component
ToStaticMark
@@ -259,32 +259,32 @@
rkup(symbol()(%7B%0A
+
%09%09%09%09type: 'svg',
@@ -554,33 +554,24 @@
React.render
-Component
ToStaticMark
@@ -1315,33 +1315,24 @@
React.render
-Component
ToStaticMark
@@ -1522,33 +1522,24 @@
React.render
-Component
ToStaticMark
... |
c9d4c69da125a51408f8809b536484ae99981178 | Remove console.log | jujugui/static/gui/src/app/components/post-deployment/post-deployment.js | jujugui/static/gui/src/app/components/post-deployment/post-deployment.js | /* Copyright (C) 2017 Canonical Ltd. */
'use strict';
const React = require('react');
const Panel = require('../panel/panel');
const SvgIcon = require('../svg-icon/svg-icon');
/**
Displays information for usage and quickstart.
Shown when a charm or bundle is added to the canvas, and on deploy.
*/
class PostDepl... | JavaScript | 0.000004 | @@ -2580,35 +2580,8 @@
%3E %7B%0A
- console.log('hi');%0A
|
f99402abc45a16e9b4f15f99459b99db44fd1a36 | Update report.js | commands/report.js | commands/report.js | const Discord = require('discord.js');
exports.run = (client, message) => {
const modlog = client.channels.find('name', 'pie-log');
const anno2 = client.channels.find('name', 'reports');
const mainuser = message.guild.member(message.author);
const say = message.content.split(" ").join(" ").slice(8).join(' ');
if ... | JavaScript | 0.000001 | @@ -302,18 +302,8 @@
e(8)
-.join(' ')
;%0Aif
|
c9dcd0a2d2cd5b3daf55098e02ce97163c25bece | fix comment | examples/03-context/server.js | examples/03-context/server.js | // Init ES6 environments for .require()
require('babel/register')();
var express = require('express');
var isocall = require('iso-call');
var browserify = require('browserify-middleware');
var app = express();
// Setup rpc
require('./rpclist');
// Mount yql iso-call middleware to the express
isocall.setupMiddleware(... | JavaScript | 0 | @@ -254,12 +254,8 @@
unt
-yql
iso-
|
3f7478a0fa359619626001e82e8dadf8421e16b8 | Change Playlist.id to text | db-setup.js | db-setup.js | // Sets up DB tables
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('db.sqlite3');
db.serialize(function() {
console.log('- Creating Song');
db.run('CREATE TABLE IF NOT EXISTS Song (' +
'id TEXT PRIMARY KEY NOT NULL,' +
'type TEXT NOT NULL,' +
'url TEXT NOT NULL,' +
'ar... | JavaScript | 0 | @@ -1641,39 +1641,36 @@
st (' +%0A 'id
-INTEGER
+TEXT
PRIMARY KEY AUT
@@ -1661,38 +1661,24 @@
PRIMARY KEY
- AUTOINCREMENT
, ' +%0A 'u
|
cc8a881686f43ea6f0d2425ec391ba55dc481067 | Add event tracking to New and Noteworthy module. | website/static/js/newAndNoteworthyPlugin.js | website/static/js/newAndNoteworthyPlugin.js | /**
* New and Noteworthy Projects
*/
var $ = require('jquery');
var m = require('mithril');
var $osf = require('js/osfHelpers');
// CSS
require('css/quick-project-search-plugin.css');
// XHR config for apiserver connection
var xhrconfig = function(xhr) {
xhr.withCredentials = true;
};
var NewAndNoteworthy = ... | JavaScript | 0 | @@ -3285,24 +3285,121 @@
de.data.id;%0A
+ $osf.trackClick('newAndNoteworthy', 'navigate', 'navigate-to-specific-project');%0A
@@ -4601,16 +4601,149 @@
/search'
+, onclick: function() %7B%0A $osf.trackClick('newAndNoteworthy', 'navigate', 'navigate-to-advanced-search');%0A ... |
01735d026e5316013a62a34e9493f9a97828e530 | remove baddy bad conditional err | packages/coinstac-ui/app/common/utils/log-unhandled-error.js | packages/coinstac-ui/app/common/utils/log-unhandled-error.js | const { get } = require('lodash');
const app = require('ampersand-app');
const mkdirpSync = require('mkdirp').sync;
const fs = require('fs');
const path = require('path');
const os = require('os');
const unfinishedBootLog = {
error(content) { console.error(content); }, // eslint-disable-line no-console
};
const logL... | JavaScript | 0.999998 | @@ -891,95 +891,281 @@
;%0A
-try %7B%0A if (process.env === 'development') throw new Error('disable
+const consoleLogger = (data) =%3E %7B%0A return console.error(%60$%7Bnew Date()%7D ERROR: $%7Bdata%7D%60); // eslint-disable-line no-console%0A %7D;%0A%0A if (process.env === 'development') %7B%0A console.... |
26d9e3e9896aa6f3b3121559f4e4ef607c8a1fbf | Fix webpack config tests. | packages/kolibri-tools/test/test_webpack.config.base.spec.js | packages/kolibri-tools/test/test_webpack.config.base.spec.js | const path = require('path');
const _ = require('lodash');
const webpackConfigBase = require('../lib/webpack.config.base');
jest.mock('../lib/apiSpecExportTools', () => ({
coreAliases: () => ({}),
coreExternals: () => ({}),
}));
jest.mock('../lib/logging', () => ({
error: () => {},
getLogger: () => {
retu... | JavaScript | 0 | @@ -425,35 +425,8 @@
n',%0A
- src_file: 'src/file.js',%0A
st
@@ -446,24 +446,24 @@
tput.json',%0A
+
static_url
@@ -613,16 +613,87 @@
lugin',%0A
+ config: %7B%0A entry: %7B%0A test_plugin: 'src/file.js',%0A %7D,%0A %7D,%0A
%7D;%0A%0Adesc
@@ -900,32 +900,32 @@
', function() %7B%0A
+
expect... |
e119e97e88d4ea868d9bf2766781022c388a0fd1 | test was not passing since we added a span in the message dialog for YUI 2.8 | src/resources/apps/xforms-sandbox/samples/test-message.js | src/resources/apps/xforms-sandbox/samples/test-message.js | (function() {
var Assert = YAHOO.util.Assert;
var Test = ORBEON.util.Test;
var OD = ORBEON.util.Dom;
var YD = YAHOO.util.Dom;
YAHOO.tool.TestRunner.add(new YAHOO.tool.TestCase({
name: "Message action",
/**
* Checks the specified message is display, and close the message ... | JavaScript | 0 | @@ -649,16 +649,75 @@
og)%5B0%5D;%0A
+ var span = OD.getChildElementByIndex(body, 0);%0A
@@ -760,20 +760,20 @@
ngValue(
-body
+span
), %22unex
|
414498b666ad7918dff0524042f9fd52e285f605 | fix fetch to decide when to show share banner | pkg/interface/src/views/apps/chat/components/ShareProfile.js | pkg/interface/src/views/apps/chat/components/ShareProfile.js | import React, {
useState,
useEffect
} from 'react';
import { Box, Row, Text, BaseImage } from '@tlon/indigo-react';
import { uxToHex } from '~/logic/lib/util';
import { Sigil } from '~/logic/lib/sigil';
const pathAsResource = (path) => {
if (!path) {
return false;
}
const pathArr = path.split('/');
if ... | JavaScript | 0 | @@ -1533,36 +1533,45 @@
-res.entity,%0A res.name
+%60~$%7Bwindow.ship%7D%60,%0A 'personal'
,%0A
@@ -1596,20 +1596,19 @@
-fals
+tru
e%0A
|
6689777fc09a5186856cb742e373eabc6b0f33c9 | add the invalid input case | scissors_paper_rock.js | scissors_paper_rock.js | var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
if (computerChoice < 0.34) {
computerChoice = "rock";
} else if(computerChoice <= 0.67) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
} console.log("Computer: " + computerChoice);
compare(userCh... | JavaScript | 0.999999 | @@ -1,12 +1,13 @@
+%0A
var userChoi
@@ -61,16 +61,199 @@
ors?%22);%0A
+%0Awhile ( !(userChoice === %22rock%22 %7C%7C userChoice === %22paper%22 %7C%7C userChoice === %22scissors%22)) %7B%0A userChoice = prompt(%22The choice was not valid, enter a valid choice please: %22); %0A%7D%0A%0A
var comp
|
7349d31dbeddcb75904a59aa196a7fa34b74441a | Fix errors with AboutMutability.js | koans/AboutMutability.js | koans/AboutMutability.js | describe("About Mutability", function() {
it("should expect object properties to be public and mutable", function () {
var aPerson = {firstname: "John", lastname: "Smith" };
aPerson.firstname = "Alan";
expect(aPerson.firstname).toBe(FILL_ME_IN);
});
it("should understand that constructed proper... | JavaScript | 0.000004 | @@ -242,34 +242,30 @@
tname).toBe(
-FILL_ME_IN
+'Alan'
);%0A %7D);%0A%0A
@@ -588,34 +588,30 @@
tname).toBe(
-FILL_ME_IN
+'Alan'
);%0A %7D);%0A%0A
@@ -1004,34 +1004,36 @@
ame()).toBe(
-FILL_ME_IN
+'John Smith'
);%0A %0A
@@ -1167,34 +1167,37 @@
ame()).toBe(
-FILL_ME_IN
+'Smith, John'
);%0A %7D);%0A%... |
397d24beb7303d1a331eea24f8b59fdd9867c531 | Read input as UTF8. | bin/texts.js | bin/texts.js | #!/usr/bin/env node
var nopt = require('nopt');
var options = {
'help': Boolean,
'from' : [ 'textjson', 'text' ],
'to' : [ 'textjson', 'xelatex', 'html5' ],
'standalone' : Boolean,
};
var shorthands = {
'h' : '--help',
'f' : '--from',
't' : '--to',
's' : '--standalone',
};
var parsed = nopt(options, ... | JavaScript | 0.998911 | @@ -1152,16 +1152,24 @@
nputFile
+, 'utf8'
);%0A v
|
7200ba84331a630da83dd8d91e1de2f41a75f697 | Simplify default object (parameters - extra cred) | spec-final/05_parameters.spec.js | spec-final/05_parameters.spec.js | jest.autoMockOff();
describe('Default Values', () => {
it('can be triggered when the incoming argument is undefined', () => {
function test(name = "Mercury") {
return name;
}
//expect(test("Aaron")) .toBe(/*ENTER YOUR GUESS HERE*/);
//expect(test()) .toBe(/*ENTER YOUR GUESS HERE*/)... | JavaScript | 0 | @@ -3612,52 +3612,8 @@
%22%7D=%7B
-name: %22Aaron%22, age: 35, favoriteBand:'Queen'
%7D)%7B%0A
@@ -3948,12 +3948,13 @@
);%0A %7D)%0A%0A%7D);
+%0A
|
97b3bc35e48f5225998dc780ddd0b67a1a50c2a3 | remove Android Emulator from CRON | wct.conf.js | wct.conf.js | var envIndex = process.argv.indexOf('--env') + 1;
var env = envIndex ? process.argv[envIndex] : undefined;
module.exports = {
testTimeout: 180 * 1000,
verbose: false,
plugins: {
local: {
browserOptions: {
chrome: [
'headless',
'disable-gpu',
'no-sandbox'
]
... | JavaScript | 0.000038 | @@ -1184,170 +1184,8 @@
= %5B%0A
- %7B%0A deviceName: 'Android GoogleAPI Emulator',%0A platformName: 'Android',%0A platformVersion: '8.1',%0A browserName: 'chrome'%0A %7D,%0A
|
b9ed9e6d5599ae93f233a70fb8cd7c672bd7e807 | FIX warning of loading prop not being a string (#7080) | lib/ui/src/components/sidebar/SidebarItem.js | lib/ui/src/components/sidebar/SidebarItem.js | import React from 'react';
import PropTypes from 'prop-types';
import { styled } from '@storybook/theming';
import { opacify, transparentize } from 'polished';
import { Icons } from '@storybook/components';
const Expander = styled.span(
({ theme }) => ({
display: 'block',
width: 0,
height: 0,
margin... | JavaScript | 0.000002 | @@ -1193,12 +1193,108 @@
yled
-.div
+((%7B className, children, id %7D) =%3E (%0A %3Cdiv className=%7BclassName%7D id=%7Bid%7D%3E%0A %7Bchildren%7D%0A %3C/div%3E%0A))
(%0A
|
55e1c79142a36643a4daf97089d039e247e19726 | Fix bikeshed viewer bug where it's only work with the first line | client/components/BikeshedViewer/BikeshedViewer.js | client/components/BikeshedViewer/BikeshedViewer.js | /**
* BikeshedViewer
* @flow
*/
// import { Card, CardActions, CardBody } from '../Card'
// import { Icon, ICONS } from '@components/Icon'
// import { Button } from '@components/Button'
import { Page, PageSubhead } from '@components/Page'
import React, { Component, PropTypes } from 'react'
import { Motion, spring } ... | JavaScript | 0 | @@ -1242,16 +1242,32 @@
.length,
+ result.length +
items.l
|
25cb4e71d5839bc21c53dc51dc56ef291335d898 | Improve the Moment.js localization | locale/config.js | locale/config.js | // Custom Dutch Moment.js Locale File
// Based on https://github.com/moment/moment/blob/develop/locale/nl.js
moment.locale('nl', {
months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
monthsShort : 'jan._feb._mar._apr._mei_jun._jul._aug._sep._okt._nov._dec.... | JavaScript | 0.000096 | @@ -600,12 +600,12 @@
'DD
-/MM/
+-MM-
YYYY
@@ -1003,18 +1003,18 @@
m : '
-ee
+%C3%A9%C3%A9
n minuut
@@ -1048,18 +1048,18 @@
h : '
-ee
+%C3%A9%C3%A9
n uur',%0A
@@ -1086,18 +1086,18 @@
d : '
-ee
+%C3%A9%C3%A9
n dag',%0A
@@ -1126,18 +1126,18 @@
M : '
-ee
+%C3%A9%C3%A9
n maand'
@@ -1170,18 +1170,18 @... |
4dfc102903b19333a92d1180d58596179d0104ff | Use Device.js to determine mobile editor use | utils/codemirror-mobile.js | utils/codemirror-mobile.js | /*global CodeMirror*/
import mobileUtils from 'ghost/utils/mobile-utils';
import createTouchEditor from 'ghost/assets/lib/touch-editor';
var setupMobileCodeMirror,
TouchEditor,
init;
setupMobileCodeMirror = function setupMobileCodeMirror() {
var noop = function () {},
key;
for (key in CodeMir... | JavaScript | 0 | @@ -12,16 +12,24 @@
deMirror
+, device
*/%0Aimpor
@@ -611,39 +611,144 @@
-if (mobileUtils.hasTouchScreen(
+//Codemirror does not function on mobile devices,%0A // nor on any iDevice.%0A if (device.mobile() %7C%7C (device.tablet() && device.ios()
)) %7B
|
f55f2ce8416f5d6692e6087616522dfd970b7f4e | switch older way of getting profile pictures. | src/modules/facebook/facebook.js | src/modules/facebook/facebook.js | /* @flow */
/*
resources:
https://developers.facebook.com/tools/explorer/
*/
import EnhancedError from '../../lib/EnhancedError';
import route from 'koa-route';
import { bus, config, Constants } from '../../core-server';
import winston from 'winston';
import request from 'request';
import fs from 'fs';
import path ... | JavaScript | 0 | @@ -3206,29 +3206,86 @@
te %60
+https://graph.facebook.com/$%7B
user.
+id%7D/
picture
-.data.url
+?type=square&height=192&width=192
%60%0A%09%09
|
e66e967b09fe57e8e275eb1dc03de4170968e2b8 | Fix bug when re-visiting user profile | scripts/UserManager.js | scripts/UserManager.js |
var UserManager = {
currentUser: null,
init: function(userJSON) {
if (userJSON === null) {
/* No logged in user */
$('#top .profile').hide();
return;
}
UserManager.currentUser = new User(userJSON);
/* Set click events */
... | JavaScript | 0.000001 | @@ -3358,32 +3358,82 @@
%7D%0A %7D%0A%0A
+ $('#right .profile .playlists').html('');%0A
$.each(u
|
8410a51bd9ab7cc0cc93bb772f65b764286bbd27 | add test for apply property copying #4 | test/test_prefix.js | test/test_prefix.js | require(__dirname+'/test_helper.js');
var now = null;
var Foo = function(){
new EventEmitter().apply(this, '__event_');
now = this.created_at = new Date();
};
exports['simple'] = function(test){
var created_at = null;
var foo = new Foo();
foo.__event_on('bar', function(){
created_at = foo.created_at;
... | JavaScript | 0 | @@ -150,32 +150,490 @@
new Date();%0A%7D;%0A%0A
+exports%5B'check applied properties'%5D = function(test)%7B%0A var foo = new Foo();%0A var props = %5B%22__event___events%22, %22__event_on%22, %22__event_once%22, %22__event_emit%22, %22__event_removeListener%22%5D;%0A for(var i = 0; i %3C props.length; i++)%7B%0A ... |
e850d9a3ed13e133e08f84b572fd5269a5618f7f | Change input selector for search term | public/javascripts/search.js | public/javascripts/search.js | $(document).ready(function() {
// this is for custom formating of results
$.extend( $.ui.autocomplete.prototype, {
_renderItem: function( ul, item) {
var list = "<li></li>";
if (item['class']) {
list = "<li class=\""+item['class']+"\"></li>";
}
// temp until the service actually r... | JavaScript | 0 | @@ -1610,32 +1610,37 @@
al = $(%22
-#site-search-tex
+.ui-autocomplete-inpu
t%22).attr
|
81e35c8f7cb1c9ed36671df3ccbeb17ce2c80793 | Put italian before english in sms sponsorship | sms_sponsorship/webapp/src/components/LangDialog.js | sms_sponsorship/webapp/src/components/LangDialog.js | import React from 'react';
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogTitle from '@material-ui/core/DialogTitle';
import SelectForm fr... | JavaScript | 0.000014 | @@ -669,18 +669,18 @@
value: '
-en
+it
', text:
@@ -690,10 +690,10 @@
lang
-En
+It
')%7D,
@@ -706,34 +706,34 @@
%7Bvalue: '
-it
+en
', text:t('langI
@@ -723,34 +723,34 @@
n', text:t('lang
-It
+En
')%7D,%0A %5D;%0A
|
fa14c45f2a515fe26719e45dae7d97277cabba8b | move the 'new-tab' handler down within the 'loaded' scope | helper/preload/webview-preload.js | helper/preload/webview-preload.js | /* eslint-disable no-underscore-dangle */
const { ipcRenderer, remote, webFrame } = require('electron');
const { runInThisContext } = require('vm');
const { LocalStorage } = require('node-localstorage');
webFrame.registerURLSchemeAsPrivileged('lulumi-extension');
let guestInstanceId = -1;
const guestInstanceIndex = ... | JavaScript | 0.000002 | @@ -3504,32 +3504,8 @@
e;%0A%0A
-// about:newtab handler%0A
proc
@@ -3535,24 +3535,167 @@
t', () =%3E %7B%0A
+ %0A%7D);%0A%0Aprocess.once('loaded', () =%3E %7B%0A if (process.env.TEST_ENV === 'e2e') %7B%0A global.require = requireTmp;%0A %7D%0A%0A // about:newtab handler%0A
if (docume
@@ -3875,123 +3875,18... |
7ac1fc712f9d0cc419678894f74d3394bf337836 | Add default user settings | src/node_modules/config/index.js | src/node_modules/config/index.js | /**
* @license Apache-2.0
*
* Copyright (c) 2019 The Stdlib Authors.
*
* 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 a... | JavaScript | 0.000002 | @@ -2087,16 +2087,236 @@
puting.'
+,%0A%0A%09// Documentation theme:%0A%09'theme': 'light',%0A%0A%09// Documentation %22mode%22:%0A%09'mode': 'nested',%0A%0A%09// Example code syntax:%0A%09'exampleSyntax': 'es5',%0A%0A%09// Previous/next package navigation:%0A%09'prevNextNavigation': 'alphabetical'
%0A%7D;%0A%0A%0A//... |
5bb1fd464b6b309e9823aef05c53e8505d865171 | format volume model | troposphere/static/js/models/volume.js | troposphere/static/js/models/volume.js | define(
[
'underscore',
'models/base',
'models/instance'
],
function (_, Base, Instance) {
var Volume = Base.extend({
defaults: { 'model_name': 'volume' },
parse: function (response) {
var attributes = _.pick(response, ['name', 'identity', 'status', 'size']);
attribu... | JavaScript | 0.000001 | @@ -151,16 +151,24 @@
aults: %7B
+%0A
'model_
@@ -182,20 +182,27 @@
'volume'
+%0A
%7D,%0A
+%0A
pa
@@ -856,32 +856,33 @@
butes;%0A %7D,%0A
+%0A
getCreds:
@@ -1029,24 +1029,25 @@
%7D;%0A %7D,%0A
+%0A
comput
@@ -1308,24 +1308,25 @@
%7D%0A %7D,%0A
+%0A
getAt... |
12f7f03241d0354ade5741f8ba5db7daea1c2d71 | fix audit description (#3843) | lighthouse-core/audits/image-aspect-ratio.js | lighthouse-core/audits/image-aspect-ratio.js | /**
* @license 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 applicable law or a... | JavaScript | 0 | @@ -1115,14 +1115,18 @@
n: '
-Uses I
+Displays i
mage
@@ -1128,35 +1128,31 @@
images with
-appropriate
+correct
aspect rati
@@ -1187,43 +1187,37 @@
: 'D
-oes not use Images with appropriate
+isplays images with incorrect
asp
@@ -1262,15 +1262,18 @@
play
-ed size
+ dimension
s sh
@@ -1283,22 +1283,16 @@
d ma... |
f1dba653ae676feaeb4385d34626542b9f694649 | support multi-line comments in Go | languages/patterns/go.js | languages/patterns/go.js | module.exports = {
name: 'Go',
nameMatchers: ['.go'],
singleLineComment: require('./common/c-style.js').singleLine()
}
| JavaScript | 0 | @@ -115,11 +115,75 @@
leLine()
+,%0A multiLineComment: require('./common/c-style.js').multiLine()
%0A%7D%0A
|
5773320aa3d7596f15ae8bb6057151cb816a6d4d | Test showing shorter clone syntax | test/tests/clone.js | test/tests/clone.js | var path = require("path");
var assert = require("assert");
var promisify = require("promisify-node");
var fse = promisify(require("fs-extra"));
var local = path.join.bind(path, __dirname);
describe("Clone", function() {
var Repository = require(local("../../lib/repository"));
var Clone = require(local("../../lib/... | JavaScript | 0.000001 | @@ -192,16 +192,21 @@
describe
+.only
(%22Clone%22
@@ -220,16 +220,16 @@
ion() %7B%0A
-
var Re
@@ -285,17 +285,17 @@
;%0A var
-C
+c
lone = r
@@ -861,38 +861,32 @@
t%22;%0A%0A return
-Clone.
clone(url, clone
@@ -1249,38 +1249,32 @@
%7D;%0A%0A return
-Clone.
clone(url, clone
@@ -1752,38 +1752,32 @@... |
ca3508bbcb99f12661eb22373b35cd5b3357c71f | Add callback usage in CustomerInvoicePage | src/pages/CustomerInvoicePage.js | src/pages/CustomerInvoicePage.js | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
import React, { useCallback } from 'react';
import PropTypes from 'prop-types';
import { View } from 'react-native';
import { MODAL_KEYS } from '../utilities';
import { useRecordListener, usePageReducer } from '../hooks';
import { getItemLayout } from ... | JavaScript | 0 | @@ -2977,16 +2977,343 @@
odal());
+%0A const onCheck = (rowKey, columnKey) =%3E dispatch(PageActions.selectRow(rowKey, columnKey));%0A const onUncheck = (rowKey, columnKey) =%3E dispatch(PageActions.deselectRow(rowKey, columnKey));%0A const onEditTotalQuantity = (newValue, rowKey, columnKey) =%3E%0A dispatch(Pag... |
3d59c70abe7cea7954ab0190c5a6e9c1a6bd3972 | fix rest test | test/tests/stats.js | test/tests/stats.js | var fs = require('fs')
var path = require('path')
var request = require('request').defaults({json: true})
var parallel = require('run-parallel')
var concat = require('concat-stream')
var ldj = require('ldjson-stream')
module.exports.rest = function(test, common) {
test('collects rest stats', function(t) {
if (co... | JavaScript | 0.000001 | @@ -3575,33 +3575,36 @@
s.level.
-read
+written
%3E 10
-0
, '
-read
+write
some')%0A
@@ -3625,28 +3625,31 @@
otals.level.
-read
+written
%3C 10000, 'n
@@ -3639,35 +3639,37 @@
itten %3C 10000, '
-not
+write
too much')%0A
|
662b407c34a4c23cab32f7f09f6472bfd6083463 | Fix scheduling a wakeup event immediately. Addresses #82 | src/js/wakeup/wakeup.js | src/js/wakeup/wakeup.js | var util2 = require('util2');
var Settings = require('settings');
var simply = require('ui/simply');
var Wakeup = module.exports;
var cleanupGracePeriod = 60 * 5;
Wakeup.init = function() {
this._setRequests = [];
this._launchCallbacks = [];
this._loadData();
this._cleanup();
};
Wakeup._loadData = function(... | JavaScript | 0 | @@ -1677,16 +1677,47 @@
,%0A %7D);%0A
+ Wakeup.launch(function() %7B%0A
simply
@@ -1767,24 +1767,30 @@
yIfMissed);%0A
+ %7D);%0A
%7D;%0A%0AWakeup.c
|
92624d6bb597876aad04f03321ca14012137e7c5 | Test fix | test/unit/events.js | test/unit/events.js | /**
* .reel Unit Tests
*/
(function($){
module('Events', reel_test_module_routine);
asyncTest( '(Deprecated) Internal data setting triggers "store" event and passes name and value to the handler', function(){
expect(3);
var
$reel= $('#image').reel({ frame: 1, speed: 1 }),
compare= false
... | JavaScript | 0.000001 | @@ -7013,16 +7013,21 @@
d('error
+.test
', funct
|
8f9577d2e4949f808d5f22ede91e81c37965e876 | remove unsupported end test | test/unsupported.js | test/unsupported.js | var Lab = require('lab');
var describe = Lab.experiment;
var it = Lab.test;
var expect = Lab.expect;
var beforeEach = Lab.beforeEach;
var mw = require('dat-middleware');
var createAppWithMiddleware = require('./fixtures/createAppWithMiddlewares');
var ExpressRequest = require('../index');
describe('unsupported functi... | JavaScript | 0.000006 | @@ -1514,564 +1514,12 @@
;%0A
- describe('end', function() %7B%0A beforeEach(function (done) %7B%0A app = createAppWithMiddleware(%0A mw.res.end('hello')%0A );%0A done();%0A %7D);%0A it('should error', function (done) %7B%0A var request = new ExpressRequest(app);%... |
9fe438ba6800c25184cb07b9a5e2621eef1516ad | add comma | mapboxGL.js | mapboxGL.js | 'use strict';
var NativeMethodsMixin = require('NativeMethodsMixin');
var Platform = require('Platform');
var React = require('React');
var ReactIOSViewAttributes = require('ReactIOSViewAttributes');
var View = require('View');
var createReactIOSNativeComponentClass = require('createReactIOSNativeComponentClass');
va... | JavaScript | 0.999953 | @@ -711,16 +711,17 @@
pes.bool
+,
%0A sty
|
14127dde30fc7cab9d7bce13dbde296a195da46b | subtract tool removes veg fixes #23 | scripts/remove-tool.js | scripts/remove-tool.js | 'use strict'
const { Tool } = require('./tool')
const { Editor } = require('./editor')
class RemoveTool extends Tool {
activate () {
super.activate()
this.tempMask = this.editor.mask.clone({ insert: false })
this.editor.mask.visible = false
this.tempMask.selected = true
this.editor.baseLayer.a... | JavaScript | 0 | @@ -600,16 +600,157 @@
ewPond%0A%0A
+ const newVeg = this.editor.veg%5B0%5D.subtract(this.editor.mask)%0A this.editor.veg%5B0%5D.replaceWith(newVeg)%0A this.editor.veg%5B0%5D = newVeg%0A%0A
this
|
49e076a65113054cc89c884760b247193eb87ac4 | Add check for data-src and data-srcset attributes | src/lazyload-vanilla.js | src/lazyload-vanilla.js | (() => {
const lazyImages = () => {
// Test if image is in the viewport
const isImageInViewport = (img) => {
let rect = img.getBoundingClientRect();
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
... | JavaScript | 0 | @@ -1160,24 +1160,96 @@
rray%5Bi%5D)) %7B%0A
+ if (lazyImagesArray%5Bi%5D.getAttribute('data-src') !== null) %7B%0A
la
@@ -1334,32 +1334,34 @@
'));%0A%0A
+
lazyImagesArray%5B
@@ -1388,25 +1388,112 @@
data-src');%0A
-%0A
+ %7D%0A%0A if (lazyImagesArray%5Bi%5D.getAt... |
7591e739eb54a2c924673a4f2f2c655468f2e1b2 | update wrapReducers - add tryResolveWaitList() to dispatch handler | src/lib/wrapReducers.js | src/lib/wrapReducers.js | import data from './data'
let dispatch
const waitList = []
const tryResolveWaitList = () => {
if (!dispatch && data.store) {
dispatch = data.store.dispatch
waitList.forEach((action) => action(dispatch))
}
}
(function resolveDispatch () {
tryResolveWaitList()
if (!dispatch) {
setTimeout(() => {... | JavaScript | 0 | @@ -1122,24 +1122,55 @@
dispatch) %7B%0A
+ tryResolveWaitList()%0A
me
|
2e43b40b0724f515d5f8ad2f00de6fce46de7bed | Update master-detail example | examples/master-detail/app.js | examples/master-detail/app.js | /** @jsx React.DOM */
var React = require('react');
var Router = require('react-router');
var ContactStore = require('./ContactStore');
var {
Route,
DefaultRoute,
Link,
NotFoundRoute,
ActiveRouteHandler,
Navigation,
ActiveState
} = Router;
var App = React.createClass({
getInitialState: function () {
... | JavaScript | 0 | @@ -164,16 +164,8 @@
te,%0A
- Link,%0A
No
@@ -179,22 +179,16 @@
oute,%0A
-Active
RouteHan
@@ -199,33 +199,12 @@
,%0A
-Navigation,%0A ActiveState
+Link
%0A%7D =
@@ -1306,22 +1306,16 @@
%3C
-Active
RouteHan
@@ -1511,16 +1511,23 @@
xins: %5B
+Router.
Navigati
@@ -1530,22 +1530,23 @@
gation,
-Ac... |
1871234f5e739700c638a54066623d19055ef302 | add docblock for factory function | src/linear-converter.js | src/linear-converter.js | /*jshint node:true */
'use strict';
var arbitraryPrecision = require('linear-arbitrary-precision');
var rescaleFactory = require('rescale');
module.exports = function factory(adapter) {
var Decimal = arbitraryPrecision(adapter);
var rescale = rescaleFactory(adapter);
var api = {};
api.rescale = rescale;
... | JavaScript | 0.000001 | @@ -137,16 +137,186 @@
ale');%0A%0A
+/**%0A * Returns the linear converter api based on the given adapter%0A *%0A * @param %7BObject%7D adapter Linear converter adapter%0A *%0A * @return %7BObject%7D Linear converter API%0A */%0A
module.e
@@ -459,34 +459,8 @@
%7D;%0A%0A
- api.rescale = rescale;%0A%0A
/*
@@ -528,... |
a6b4ca4e1b5b948bb5bcf0bf9f42de0b1b871467 | Update server.js | azure/JS-sample/server.js | azure/JS-sample/server.js | var clientFromConnectionString = require('azure-iot-device-http').clientFromConnectionString;
var Message = require('azure-iot-device').Message;
var app = require('http').createServer(handler);
var io = require('socket.io').listen(app);
var fs = require('fs');
var events = require('events');
var port = 8080;
var event... | JavaScript | 0.000001 | @@ -1186,16 +1186,18 @@
ata;%0A%09%09%09
+//
data = d
|
d57d900261769ada57252158e7a36f70264476f9 | Remove unused property | core/background/objects/song.js | core/background/objects/song.js | 'use strict';
/**
* Song object
*/
define(['vendor/md5', 'wrappers/can'], (MD5, can) => {
/**
* Create unique song ID based on data parsed by connector.
* @param {Object} parsedData Current state received from connector
* @return {String} Unique ID
*/
function makeUniqueId(parsedData) {
let inputStr = ''... | JavaScript | 0.000001 | @@ -1724,62 +1724,8 @@
on,%0A
-%09%09%09uniqueId: parsed.uniqueID %7C%7C makeUniqueId(parsed),%0A
%09%09%7D;
|
530e36a2641351c2f590d667f3723758aaf6f152 | Remove text crop | html/components/toggle.stories.js | html/components/toggle.stories.js | import { useEffect } from '@storybook/client-api';
import { toggle } from './toggle';
import '../utilities/polyfills/classListSVG';
import { markdownDocumentationLinkBuilder } from '../../storybook-utilities/markdownDocumentationLinkBuilder';
export default {
title: 'Components/Toggle',
decorators: [
story => ... | JavaScript | 0.000004 | @@ -676,24 +676,66 @@
class=%22
+%0A sprk-b-TypeBodyThree%0A
sprk-u-BareB
@@ -739,17 +739,16 @@
reButton
-%22
%0A
@@ -740,32 +740,74 @@
eButton%0A
+ sprk-u-TextCrop--none%0A %22%0A
data-sprk-toggle
@@ -837,137 +837,17 @@
=%22#%22
-%0A %3E%0A %3Cd... |
120aeeaf3f31b0735280c41bc40dba71bcb96128 | Update long-press-event.js (#9) | src/long-press-event.js | src/long-press-event.js | /*!
* long-press-event.js
* Pure JavaScript long-press-event
* https://github.com/john-doherty/long-press-event
* @author John Doherty <www.johndoherty.info>
* @license MIT
*/
(function (window, document) {
'use strict';
var timer = null;
// check if we're using a touch screen
var isTouch = (('... | JavaScript | 0 | @@ -880,122 +880,58 @@
ome)
- - resolved once initCustomEvent no longer exists%0A if ('initCustomEvent' in document.createEvent('CustomEvent')
+%0A if (typeof window.CustomEvent !== %22function%22
) %7B%0A
|
b8a2807a8bbfd998cf897c4817ef5eeb98708c50 | Update currency.js | currency.js | currency.js | 'use strict';
define(['app'], function (app) {
app.register.directive('currency', function () {
function isEmpty(value) {
return angular.isUndefined(value) || value === '' || value === null || value !== value;
}
var p = function (viewValue) {
var numbs = viewValue.... | JavaScript | 0 | @@ -3210,12 +3210,8 @@
%5E%5Cd.
-%5C','
%5D/g)
|
70f37531d03e0741d167bafff88f9fdb98f15f29 | increase viewsCount | server/core/article.js | server/core/article.js | const Joi = require('joi');
const mongoose = require("mongoose");
const ReqRouter = require('./decorator-router');
const models = require('../models');
const config = require('../config');
const util = require('util');
const pageSchema = {
limit: Joi.number().integer().min(1).max(100).default(10),
page: Joi.nu... | JavaScript | 0 | @@ -1699,32 +1699,32 @@
-return res.json(
+const article =
await mo
@@ -1748,13 +1748,73 @@
ById
-(_id,
+AndUpdate(_id, %7B $inc: %7B viewsCount: 1 %7D %7D, %7B%0A select:
fds
@@ -1821,16 +1821,26 @@
.article
+%0A %7D
).popula
@@ -1867,16 +1867,49 @@
ategory)
+;%0A return res.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.