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 |
|---|---|---|---|---|---|---|---|
affcf5e4545a8483624dd8c82e9331493bd65603 | fix screenshot functions export (#4807) | tools/screenshot-test/functions/index.js | tools/screenshot-test/functions/index.js | /**
* Entry point for the Firebase functions of the Screenshot tool. Firebase functions only support
* JavaScript files and therefore the TypeScript files needs to be transpiled. Using ts-node
* seems to be more elegant for now, because Firebase requires the `node_modules` to be copied
* to the output directory and... | JavaScript | 0 | @@ -578,16 +578,40 @@
')%0A%7D);%0A%0A
+const functionExports =
require(
@@ -633,12 +633,171 @@
unctions');%0A
+%0A// Re-export every firebase function from TypeScript%0AObject.keys(functionExports).forEach(fnName =%3E %7B%0A module.exports%5BfnName%5D = functionExports%5BfnName%5D;%0A%7D);%0A
|
4b4776fceebb9ee74ea8cc4f0e91a917563ac1ee | remove random 9 | app/assets/javascripts/cart.js | app/assets/javascripts/cart.js | $(document).on('turbolinks:load',function() {
// a typeahead that adds people to the card.
// does both big and mini-cart
added_person = {};
// initialize bloodhound engine
var searchSelector = 'input#cart-typeahead';
//filters out tags that are already in the list
var filter = function(suggestions) ... | JavaScript | 0.99999 | @@ -318,9 +318,8 @@
s) %7B
-9
%0A
|
6a8c41d29226c8c14f1620b87357d96743e3dc8e | Remove external link tracking | app/assets/javascripts/core.js | app/assets/javascripts/core.js | function recordOutboundLink(e) {
_gat._getTrackerByName()._trackEvent(this.href, 'Outbound Links');
setTimeout('document.location = "' + this.href + '"', 100);
return false;
}
$(document).ready(function() {
$('.print-link a').attr('target', '_blank');
var $searchFocus = $('.js-search-focus');
$searchFocus... | JavaScript | 0 | @@ -1,187 +1,4 @@
-function recordOutboundLink(e) %7B%0A _gat._getTrackerByName()._trackEvent(this.href, 'Outbound Links');%0A setTimeout('document.location = %22' + this.href + '%22', 100);%0A return false;%0A%7D%0A%0A
$(do
|
c853600e8af44fca15d8d1ebbbe2d6b9c9c0e7b1 | add applicant ID uniqueness validation | app/assets/javascripts/form.js | app/assets/javascripts/form.js | var relationshipTemplate = _.template($('#relationship_template').html()),
dependentTemplate = _.template($('#dependent_template').html()),
formTemplate = _.template($('#form_template').html()),
resetForm = function ($form) {
$form.find('input:text, input:password, input:file, input[type="number"], select, te... | JavaScript | 0 | @@ -1,12 +1,281 @@
+var addUniquenessValidator = function(name, selector) %7B%0A $.validator.addMethod(name, function(value) %7B%0A var count = _.filter($(selector), function($el) %7B%0A return $el.value = value;%0A %7D).length;%0A return count == 1;%0A %7D, %22Applicant ID must be unique%22);%0A%7D;%0A... |
69e827957c02ab693d51bfac076efbfca389e76e | Clear the vehicle polling interval on page load | app/assets/javascripts/maps.js | app/assets/javascripts/maps.js | var vehiclesGeoJSON = function(callback) {
var url = "https://api.digitransit.fi/realtime/vehicle-positions/v1/hfp/journey/tram/";
$.getJSON(url, function(data, status, xhr) {
var geoJSON = {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": []
... | JavaScript | 0 | @@ -844,16 +844,102 @@
ion() %7B%0A
+ if (window.vehiclesIntervalID) %7B%0A window.clearInterval(vehiclesIntervalID);%0A %7D%0A%0A
if ($(
@@ -3407,16 +3407,44 @@
;%0A%0A
+ window.vehiclesIntervalID =
setInte
|
0f1f9fa24f2e0c6ab0b05da7923139918c43dd29 | have amazon use Product data model | share/spice/amazon/amazon.js | share/spice/amazon/amazon.js | (function(env) {
"use strict";
env.ddg_spice_amazon = function(api_result) {
if (!api_result || !api_result.results || !api_result.results.length || api_result.results.length == 0) {
return Spice.failed('products');
}
var items = api_result.results,
loadedRatin... | JavaScript | 0.870825 | @@ -463,32 +463,62 @@
pleCalls: true,%0A
+ model: 'Product',%0A
meta
@@ -2906,8 +2906,9 @@
(this));
+%0A
|
fb43424e46eee3ec94465cc92d24f60948410770 | Add TouchableItem and some improvements, add active state | app/components/Button/index.js | app/components/Button/index.js | import React from 'react';
import T from 'prop-types';
import { TouchableOpacity, ViewPropTypes } from 'react-native';
import { MaterialIcons } from '@expo/vector-icons';
import Text from '../Text';
import s from './styles';
const Button = (props) => {
const {
backgroundColor,
color,
containerStyle,
... | JavaScript | 0 | @@ -60,26 +60,8 @@
rt %7B
- TouchableOpacity,
Vie
@@ -70,16 +70,22 @@
ropTypes
+, View
%7D from
@@ -176,24 +176,70 @@
'../Text';%0A
+import TouchableItem from '../TouchableItem';%0A
import s fro
@@ -427,24 +427,90 @@
s.disabled,%0A
+ isActive = false,%0A activeBackgroundColor,%0A activeColor,%0A
... |
239ba6549fab9ab34cc6f5facb2b2f5467f825a7 | use window.requestAnimationFrame | app/components/LoopPlayHead.js | app/components/LoopPlayHead.js | import React from 'react';
import { now } from 'lodash';
import connect from '../utils/reduxers';
import { getLoop, getLoopBox } from '../selectors';
import styles from './LoopPlayHead.css';
// animation frame rate is 16
const SPEED = 20;
/**
* Animates a vertical line to show where the loop is playing.
*
* There... | JavaScript | 0.000001 | @@ -190,57 +190,8 @@
';%0A%0A
-// animation frame rate is 16%0Aconst SPEED = 20;%0A%0A
/**%0A
@@ -541,41 +541,93 @@
his.
-_interval = window.setInterval(()
+sched();%0A %7D%0A%0A sched() %7B%0A this._interval = window.requestAnimationFrame(timestamp
=%3E
@@ -640,16 +640,18 @@
ick(
-), SPEED
+timestamp)
);%... |
b381d1176750866f7951103c0847e5b729f3f854 | Replace prototype style of computed property with Ember.computed | app/controllers/application.js | app/controllers/application.js | import Em from 'ember';
import { task, timeout } from 'ember-concurrency';
var applicationController = Em.Controller.extend({
activeNote: null,
hideSidePanel: false,
init: function() {
Em.run.scheduleOnce('afterRender', () => {
$('body div').first().addClass('app-container');
});
},
// data
s... | JavaScript | 0.000013 | @@ -69,16 +69,42 @@
ency';%0A%0A
+const %7B computed %7D = Em;%0A%0A
var appl
@@ -350,16 +350,62 @@
edNotes:
+ computed('model.%5B%5D', 'model.@each.updatedAt',
functio
@@ -494,53 +494,8 @@
;%0A%09%7D
-.property('model.%5B%5D', 'model.@each.updatedAt'
),%0A%0A
|
12cfbc060533f5f303e17d45cf98cef2aac839da | Stop looking for demoStudentId | app/flux/studentStore.js | app/flux/studentStore.js | import Reflux from 'reflux'
import Immutable from 'immutable'
import Student from '../models/student'
import demoStudent from '../models/demoStudent.json'
import studentActions from './studentActions'
let studentStore = Reflux.createStore({
listenables: studentActions,
init() {
this.students = Immutable.Map()
... | JavaScript | 0 | @@ -1786,69 +1786,8 @@
Id')
-%0A%09%09let demoStudentId = '3AE9E7EE-DA8F-4014-B987-8D88814BB848'
%0A%0A%09%09
@@ -1839,25 +1839,8 @@
ntId
- %7C%7C demoStudentId
) %7C%7C
|
a4a1aadf75a98c817edb2ee6bcb28989a4a78ca6 | comment line | src/map-generator/lib/corridor.js | src/map-generator/lib/corridor.js | import CorridorSprite from './corridorSprite';
import {WallSize, Vertical, Horizontal, Directions, CorridorName} from './constants';
import Wall from "./wall";
const WallName = "ColissionWall";
const SpriteName = "CorridorSprite";
class Corridor extends Phaser.Group {
constructor(game, parent, x, y, width, height,... | JavaScript | 0.000001 | @@ -2294,24 +2294,47 @@
WallName);%0A
+ //wall.alpha = 0.8%0A
return w
|
256a2b252aceb12920f93c05db860cfcaaa280ef | Remove limit statements for now | backend/servers/mcpub/db/datasets.js | backend/servers/mcpub/db/datasets.js | const r = require('./../dash');
const commonQueries = require('../../lib/common-queries');
const zipFileUtils = require('../../lib/zipFileUtils');
const Promise = require('bluebird');
const fs = require('fs');
const processCommon = require('../../mcapi/db/model/process-common');
const doiUrl = process.env.MC_DOI_SERVI... | JavaScript | 0 | @@ -1999,16 +1999,20 @@
%7D)
+; //
.limit(1
@@ -2662,16 +2662,19 @@
views'))
+;//
.limit(1
|
650e5854647bf9f3c14b00da804bee62cfe2936a | return early if element wasn’t found | assets/src/components/editor-carousel/index.js | assets/src/components/editor-carousel/index.js | /**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { IconButton } from '@wordpress/components';
import { Component, Fragment } from '@wordpress/element';
import { withDispatch, withSelect } from '@wordpress/data';
import { compose } from '@wordpress/compose';
/**
* Internal dependencies
*... | JavaScript | 0 | @@ -712,16 +712,54 @@
out' );%0A
+%0A%09%09if ( ! wrapper ) %7B%0A%09%09%09return;%0A%09%09%7D%0A%0A
%09%09if ( t
|
3d8fd7513824d995baeafcb1cd2927fe31b8c085 | Refactor Navigation Provider to use useContextSelector (#4190) | assets/src/dashboard/components/navProvider.js | assets/src/dashboard/components/navProvider.js | /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | JavaScript | 0 | @@ -634,56 +634,21 @@
rt %7B
-%0A createContext,%0A useCallback,%0A useContext,%0A
+ useCallback,
use
@@ -652,18 +652,16 @@
useMemo,
-%0A
useStat
@@ -661,18 +661,17 @@
useState
-,%0A
+
%7D from '
@@ -715,16 +715,122 @@
ypes';%0A%0A
+/**%0A * Internal dependencies%0A */%0Aimport %7B createContext, useCont... |
78067113d7fcbdb3765fbe83bbece821bb03ca37 | Decrease amount of retries for download (#1651) | download/src/index.js | download/src/index.js | /* eslint-disable unicorn/no-process-exit */
// Native
import fs from 'fs'
import path from 'path'
import { spawnSync } from 'child_process'
import zlib from 'zlib'
// Packages
import onDeath from 'death'
import fetch from 'node-fetch'
import retry from 'async-retry'
import which from 'which-promise'
import readPkg f... | JavaScript | 0 | @@ -3294,10 +3294,9 @@
es:
-50
+1
0,%0A
|
653768b28ce489d53fed24afe330be4641967281 | Migrate templates on load to latest version | assets/src/dashboard/templates/getTemplates.js | assets/src/dashboard/templates/getTemplates.js | /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | JavaScript | 0 | @@ -622,16 +622,78 @@
ies%0A */%0A
+import %7B migrate %7D from '../../edit-story/migration/migrate';%0A
import %7B
@@ -720,16 +720,16 @@
utils';%0A
-
import b
@@ -1308,22 +1308,32 @@
rl) %7B%0A
-return
+const template =
%7B%0A .
@@ -1785,12 +1785,105 @@
)),%0A
-
%7D;
+%0A%0A const migratedTemplate = m... |
83542fca5b42dd8cf18dcd83697477e1ee43e320 | Add missing period | docusaurus/website/pages/en/index.js | docusaurus/website/pages/en/index.js | /**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const React = require('react');
const CompLibrary = require('../../core/CompLibrary.js');
const Container = CompLibrary.Container;
con... | JavaScript | 0.999999 | @@ -4549,16 +4549,17 @@
usands**
+.
%0A%0A%5C%60%5C%60%5C%60
|
832bdf889787447af992fdfef679e49f88b387cf | Move requestTimeoutCheckInterval in to if block | src/network/requestQueue/index.js | src/network/requestQueue/index.js | const SocketRequest = require('./socketRequest')
const events = require('../instrumentationEvents')
const PRIVATE = {
EMIT_QUEUE_SIZE_EVENT: Symbol('private:RequestQueue:emitQueueSizeEvent'),
}
module.exports = class RequestQueue {
/**
* @param {number} maxInFlightRequests
* @param {number} requestTimeout
... | JavaScript | 0.000001 | @@ -1258,24 +1258,64 @@
%7D)%0A %7D%0A%0A
+ if (this.enforceRequestTimeout) %7B%0A
const re
@@ -1380,47 +1380,8 @@
100)
-%0A%0A if (this.enforceRequestTimeout) %7B
%0A
|
44c835f1dc17fc8b0776505597215147d9f3a3f9 | Improve styling when form options have limit and help | ui/js/pages/form/FormOptionLabel.js | ui/js/pages/form/FormOptionLabel.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Markdown from 'markdown-to-jsx';
export default class FormOptionLabel extends Component {
constructor() {
super();
this._toggleHelp = this._toggleHelp.bind(this);
this.state = {};
}
componentWillUnmount() {
if ... | JavaScript | 0 | @@ -739,16 +739,22 @@
const %7B
+%0A
htmlFor
@@ -801,16 +801,21 @@
selected
+,%0A
%7D = thi
@@ -1161,33 +1161,34 @@
labels.push(
+(
%0A
-
%3Cspan ke
@@ -1274,24 +1274,24 @@
%3C/span%3E
-,
%0A
+)
);%0A %7D
@@ -1357,24 +1357,24 @@
ndefined) %7B%0A
-
help +
@@ -1378,16 +1... |
14c7ca9867b1c6604719b7bf0df36354f2c28ea5 | add rss inside the estimate sticker object | estimote-sticker/estimote-sticker.js | estimote-sticker/estimote-sticker.js | var events = require('events');
var util = require('util');
var debug = require('debug')('estimote-sticker');
var noble = require('noble');
var EstimoteSticker = function() {
noble.on('discover', this.onDiscover.bind(this));
};
var EXPECTED_MANUFACTURER_DATA_LENGTH = 22;
util.inherits(EstimoteSticker, events.Eve... | JavaScript | 0 | @@ -4108,16 +4108,34 @@
areState
+,%0A rssi: rssi
%0A %7D;%0A
|
68c160efc8acf7741074792eeb6c07b8b8bd4fb5 | Add comments to example | packages/backpack-examples/basic/src/index.js | packages/backpack-examples/basic/src/index.js | import express from 'express'
const app = express()
app.get('/', async (req, res) => {
try {
const thing = await Promise.resolve({ one: 'two' })
return res.json({...thing, hello: 'world'})
} catch (e) {
return res.json({ error: e.message })
}
})
app.listen(process.env.PORT || 3000, () => {
consol... | JavaScript | 0 | @@ -145,16 +145,32 @@
'two' %7D)
+ // async/await!
%0A ret
@@ -209,16 +209,39 @@
world'%7D)
+ // object-rest-spread!
%0A %7D cat
@@ -302,20 +302,21 @@
%0A%7D)%0A
-%0Aapp.listen(
+const port =
proc
@@ -339,17 +339,154 @@
3000
-, () =%3E %7B
+%0A%0Aapp.listen(port, (err) =%3E %7B%0A if (err) %7B%0A consol... |
23c0753c78fa5e6d38481edd940f520a68123df9 | handle JS-throwed Errors in admin shell | etherpad/src/etherpad/admin/shell.js | etherpad/src/etherpad/admin/shell.js | /**
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | JavaScript | 0 | @@ -1555,16 +1555,137 @@
// %7D%0A
+ if (!(e.javaException %7C%7C e.rhinoException %7C%7C e.printStackTrace)) %7B%0A result = e.toString();%0A %7D else %7B%0A
if
@@ -1707,24 +1707,26 @@
.devMode) %7B%0A
+
(e.j
@@ -1785,26 +1785,30 @@
ce();%0A
-%7D%0A
+ %7D%0A
r... |
c040df7d9068fdc60b78ece7588ace0b190b3759 | Add MinMax solution | Arrays/MinMax/minmax.js | Arrays/MinMax/minmax.js | JavaScript | 0 | @@ -0,0 +1,84 @@
+function minMax(arr)%7B%0A return %5BMath.max.apply(num,arr),Math.max.apply(null,arr)%5D;%0A%7D
| |
a50843711a5120522d890e523dcbee5522a622b9 | remove .config for lightbox | app/photography/photography.js | app/photography/photography.js | 'use strict';
angular.module('portfolio.photography', ['ngRoute'])
.config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
$routeProvider.otherwise({redirectTo: '/projects'});
}])
.config(['$routeProvider', function($routeProvider) {
$rout... | JavaScript | 0.000001 | @@ -64,198 +64,8 @@
e'%5D)
-%0A.config(%5B'$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) %7B%0A $locationProvider.hashPrefix('!');%0A%0A%09$routeProvider.otherwise(%7BredirectTo: '/projects'%7D);%0A%7D%5D)
%0A%0A.c
|
f849dd852b5872008ea81338ab8a09c2263cf4b0 | Make the volume control finer grained. | src/static/player.js | src/static/player.js | $(document).ready(function() {
var sendingVol = false;
var volChange = false;
function send_slider_volume() {
if (sendingVol || !volChange) return;
var curVol = $("#mastervolslider").slider( "option", "value");
sendingVol = true; volChange = false;
$('#mastervolval').text(Math.round(curVol * 100)... | JavaScript | 0.000001 | @@ -677,17 +677,17 @@
ep : 0.0
-5
+1
,%0A s
|
e483f2f64908c504fac064c8fa709c0c7c2c983e | Remove 2960hashKeys being saved in localStorage | src/store-service.js | src/store-service.js | (function() {
'use strict';
const KEY_NAME = 'windows',
defaultStocks = ['AAPL', 'MSFT', 'TITN', 'SNDK', 'TSLA'],
defaultIndicators = ['rsi', 'movingAverage'],
closedCacheSize = 5;
var storage;
/**
* Class for editing the contents of local storage.
*/
class Store... | JavaScript | 0 | @@ -567,22 +567,22 @@
ME,
-JSON.stringify
+angular.toJson
(sto
|
45fc288e475b92aa981597b34f0a2f170b145ecd | Fix post url | models/Post.js | models/Post.js | var keystone = require('keystone'),
textSearch = require('mongoose-text-search'),
decode = require('ent/decode'),
commonlib = require('./lib/common');
var Types = keystone.Field.Types,
Post = new keystone.List('Post', {
defaultSort: '-publishedDate',
map: { name: 'slug' },
... | JavaScript | 0 | @@ -2771,16 +2771,37 @@
var
+that = this,%0A
url = '/
@@ -2962,27 +2962,17 @@
gory
- && category
.name
+
==
+
'Sof
@@ -2997,22 +2997,21 @@
-return
+url =
'/sylva
@@ -3031,26 +3031,26 @@
tware/' + th
-is
+at
.slug;%0A
|
cbfaf00c725c9188106eecd2a538ca5c7288704a | make end dx/dy equal 0 | src/InteractEvent.js | src/InteractEvent.js | const extend = require('./utils/extend');
const getOriginXY = require('./utils/getOriginXY');
const defaults = require('./defaultOptions');
const signals = require('./utils/Signals').new();
class InteractEvent {
constructor (interaction, event, action, phase, element, related) {
const target = i... | JavaScript | 0.000018 | @@ -4091,24 +4091,16 @@
raction,
- ending,
startin
@@ -4125,494 +4125,69 @@
%7B%0A
-if (starting) %7B%0A iEvent.dx = 0;%0A iEvent.dy = 0;%0A %7D%0A // end event dx, dy is difference between start and end points%0A else if (ending) %7B%0A if (deltaSource === 'client') %7B%0A iEvent.dx = iEvent.cli... |
3afa941658d95c329694e041a9268f36e3629339 | Add PropTypes for PartyLevel | app/src/components/PartyLevel.js | app/src/components/PartyLevel.js | import React from 'react'
import check from '../images/check.svg'
import pencil from '../images/pencil.svg'
import lock from '../images/lock.svg'
const PartyLevel = (props) => {
const {
status,
percentChange,
departments,
title,
image,
index,
completeSections,
} = props
const isCompl... | JavaScript | 0 | @@ -19,16 +19,52 @@
'react'%0A
+import PropTypes from 'prop-types';%0A
import c
@@ -1980,8 +1980,292 @@
tyLevel%0A
+%0APartyLevel.propTypes = %7B%0A status: PropTypes.string,%0A percentChange: PropTypes.string,%0A departments: PropTypes.arrayOf(PropTypes.number),%0A title: PropTypes.string.isRequired,%0A image:... |
fd4baec3e316c9f8d5a12b148a6f7d90d759e5a1 | update isAdmin default value | models/user.js | models/user.js | var Sequelize = require('sequelize');
var db = require('../libs/sequelize');
var sha1 = require('sha1');
var User = db.define('user', {
username: {
type: Sequelize.STRING,
allowNull: false,
},
password: {
type: Sequelize.STRING,
allowNull: false,
},
email: {
type: Sequelize.STRING,
al... | JavaScript | 0.00058 | @@ -415,19 +415,20 @@
tValue:
-tru
+fals
e,%0A %7D,%0A
|
a8b4a55a7695ff9acb11605a4f92ddb96398dd83 | remove debug message | src/service/spawn.js | src/service/spawn.js | let mod = {};
module.exports = mod;
mod.loop = function(room) {
//Try all the spawn
let spawns = room.spawns;
let usedEnergyAmount = 0;
for(let spawn of spawns) {
if(room.queue.urgent.length > 0) {
const usedEnergy = spawnWithSetup(spawn, usedEnergyAmount, true, Setup[room.queue.urg... | JavaScript | 0.000003 | @@ -3267,32 +3267,34 @@
Cost) %7B%0A
+//
Logger.debug(%60%5B$
|
8958836262bf9f4fabdd9d91f28f1e9d8ab9ba5b | Add same comment. | src/service/theme.js | src/service/theme.js | console.log( "=== simpread theme load ===" )
import 'github';
import 'newsprint';
import 'gothic';
const flag = "sr-rd-theme-",
themes = {},
color = [
"251, 251, 251, 1",
"243, 242, 238, 1",
"252, 252, 252, 1"
],
names = [ "github", "newsprint", "goth... | JavaScript | 0 | @@ -414,106 +414,387 @@
-get colors() %7B%0D%0A return color;%0D%0A %7D%0D%0A%0D%0A get names() %7B%0D%0A return names;%0D%0A %7D%0D%0A
+/**%0D%0A * Theme colors%5Bread%5D%0D%0A * %0D%0A * @return %7Barray%7D theme colors%0D%0A */%0D%0A get colors() %7B%0D%0A retu... |
6f0b2e0c050eec130ccd744892ebd04df175fe15 | Update ingestion.js | src/tap/ingestion.js | src/tap/ingestion.js | /**
* ingestion.js
*/
var fs = require('fs');
if (process.argv.length <= 2) {
console.log("Usage: " + __filename + ".");
process.exit(-1);
}
var path = process.argv[2];
fs.readdir(path, function(err, items) {
console.log(items);
for (var i=0; i<items.length; i++) {
consol... | JavaScript | 0.000001 | @@ -20,16 +20,60 @@
s%0D%0A */%0D%0A
+ // %0D%0A%0D%0A%0D%0A%0D%0A%0D%0A //---- example file reader%0D%0A
var fs =
|
0a3e6b9babe16018bc79e5dc3387445d7fc086c4 | Fix the extrace error | app/templates/_webpack.config.js | app/templates/_webpack.config.js | var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWepackPlugin = require('html-webpack-plugin');
// basic configurations
module.exports = {
entry: {
app: './src/main.js'
},
output: {
path: './dist',
publicPath: '/'
},
resolve: {
extensio... | JavaScript | 0.998452 | @@ -807,206 +807,8 @@
%7B%0A
- test: /%5C.css$/,%0A loader: ExtractTextPlugin.extract('style!css')%0A %7D,%0A %7B%0A test: /%5C.less$/,%0A loader: ExtractTextPlugin.extract('style!css!less')%0A %7D,%0A %7B%0A
@@ -842,32 +842,32 @@
%7Csvg)(%5C?.*)?$/,%0A
+
... |
09a9e7642e42d5225c17254876b3c7f7c86634b9 | tweak build.js | build.js | build.js | const fs = require('fs');
const glob = require("glob");
const babel = require("babel-core");
const uglifyJS = require("uglify-js");
const ncp = require("ncp");
const chokidar = require("chokidar");
const stylus = require("stylus");
const stylus_autoprefixer = require("autoprefixer-stylus");
const eslint = new (requir... | JavaScript | 0.000002 | @@ -5086,43 +5086,8 @@
()%7B%0A
- process.stdout.write('%5C033c');%0A
@@ -5149,24 +5149,63 @@
(devMode) %7B%0A
+ process.stdout.write('%5C033c');%0A
setu
|
7de67fc874124e9bbc92d9064ccf88d6adaedc1a | add preliminary video support to lightboxes (bug 759557) | media/js/mkt/lightbox.js | media/js/mkt/lightbox.js | (function () {
var $lightbox = $('#lightbox');
var $section = $lightbox.find('section');
var $content = $lightbox.find('.content');
var currentApp;
var previews;
var slider;
// prevent mouse cursors from dragging these images.
$lightbox.on('dragstart', function(e) {
e.preventDef... | JavaScript | 0 | @@ -1794,16 +1794,22 @@
ch image
+/video
with a
@@ -1829,16 +1829,27 @@
ceholder
+%0A //
and cap
@@ -2156,16 +2156,448 @@
t load.%0A
+ // videos on the other hand will always be injected.%0A if (p.type == 'video/webm') %7B%0A // we can check for %60HTMLMediaElement.NE... |
522e0af7990d6bcf5ccc25880f3f3e186f935a5a | Optimize sending data from worker | examples/js/loaders/ctm/CTMWorker.js | examples/js/loaders/ctm/CTMWorker.js | importScripts( "lzma.js", "ctm.js" );
self.onmessage = function( event ) {
var files = [];
for ( var i = 0; i < event.data.offsets.length; i ++ ) {
var stream = new CTM.Stream( event.data.data );
stream.offset = event.data.offsets[ i ];
files[ i ] = new CTM.File( stream );
}
self.postMessage( files );
... | JavaScript | 0 | @@ -276,16 +276,42 @@
( stream
+, %5Bevent.data.data.buffer%5D
);%0A%0A%09%7D%0A
|
d3e5a67a915c6ef5ff2f826de2e4666bdce67147 | add log | slackbot/ib_bot__new_idea.js | slackbot/ib_bot__new_idea.js | /*
token=5PPpA4hTr28sXblgZFNJ03Xp
team_id=T0001
team_domain=example
channel_id=C2147483705
channel_name=test
timestamp=1355517523.000005
user_id=U2147483697
user_name=Steve
text=googlebot: What is the air-speed velocity of an unladen swallow?
trigger_word=googlebot:
*/
var Firebase = require("firebase");
var keys = re... | JavaScript | 0.000002 | @@ -1419,24 +1419,92 @@
snap.key();%0A
+ console.log(%22get_user_profile_by_email%22, %22uid%22, share.uid);%0A
crea
@@ -3710,16 +3710,69 @@
TAKEN%22:%0A
+ console.log(%22user existed%22);%0A
@@ -4192,16 +4192,85 @@
ata.uid%0A
+ console.log(%22create us... |
100c9654dd1a49aab48f1bced3fc4ab716ace63d | remove unused `require('fs')` | message/html/markdown.js | message/html/markdown.js | const renderer = require('ssb-markdown')
const fs = require('fs')
const h = require('mutant/h')
const ref = require('ssb-ref')
const nest = require('depnest')
exports.needs = nest({
'blob.sync.url': 'first',
'emoji.sync.url': 'first'
})
exports.gives = nest('message.html.markdown')
exports.create = function (api... | JavaScript | 0.000001 | @@ -38,33 +38,8 @@
n')%0A
-const fs = require('fs')%0A
cons
|
e58a38171a73b9aa7b826c66e66812e37d0a92c6 | fix non-debug mode for react-native | src/reducers/crossSliceReducer.js | src/reducers/crossSliceReducer.js | /* eslint-disable guard-for-in, no-restricted-syntax, no-param-reassign */
import produce from 'immer';
import { values, groupBy, merge, set, get } from 'lodash';
import { actionTypes } from '../constants';
export default function crossSliceReducer(state = {}, action) {
return produce(state, draft => {
switch (... | JavaScript | 0.002111 | @@ -139,16 +139,22 @@
set, get
+, keys
%7D from
@@ -775,37 +775,39 @@
-for (const storeAs in groups)
+keys(groups).forEach(storeAs =%3E
%7B%0A
@@ -849,45 +849,39 @@
-for (const item of groups%5BstoreAs%5D) %7B
+groups%5BstoreAs%5D.forEach(item =%3E
%0A
@@ -926,17 +926,17 @@
a', %7B%7D))
-;
+,
%... |
2ec6ce7259c82ac8623a54e12639cb9addbaf139 | Set updatedAt field when updating post | src/server/graphql/data/schema.js | src/server/graphql/data/schema.js | const co = require('co');
const { makeExecutableSchema } = require('graphql-tools');
const jwt = require('jsonwebtoken');
const { checkIsAdmin, errorObj } = require('./../auth');
const { saltHashPassword, confirmPassword } = require('./../../utils/password');
const Post = require('./post');
const PostModel = require('.... | JavaScript | 0 | @@ -2147,24 +2147,94 @@
%7D);%0A
+ // Updated updatedAt%0A post.updatedAt = Date.now();%0A
re
|
0c0c564664e2afe5b28a9326b2ab1a93bccaf659 | set salt var | helpers/users.js | helpers/users.js | var config = require('../config');
var crypto = require('crypto');
var util = require('util');
var i18n = require('../helpers').i18n();
var models = require('../models');
var S = require('string');
var marked = require( 'marked' );
var moment = require('moment');
moment.lang(config.lang);
var chars = '0123456789ABCDE... | JavaScript | 0.000017 | @@ -693,35 +693,19 @@
config.s
-ecure.password.hash
+alt
).diges
@@ -2808,27 +2808,11 @@
ig.s
-ecure.password.hash
+alt
).d
|
9062a948bfd410f62afef09a1195b5a9ff320bb7 | Fix copy-paste error in he function to tackle the unicode problem when saving a document. | src/source/github.js | src/source/github.js | module.exports.save = save;
module.exports.load = load;
module.exports.loadRaw = loadRaw;
var config = require('../config.js')(location.hostname);
var githubBase = config.GithubAPI ? config.GithubAPI + '/api/v3': 'https://api.github.com';
function save(context, callback) {
var source = context.data.get('source'),... | JavaScript | 0 | @@ -1546,16 +1546,20 @@
' + p1);
+ %7D))
%0A
|
68746958ef36e14ee880e5a0b51bdac8d9d44fc3 | fix not oldValue issue | src/subscribables/subscribable.js | src/subscribables/subscribable.js |
ko.subscription = function (target, callback, disposeCallback) {
this._target = target;
this.callback = callback;
this.disposeCallback = disposeCallback;
this.isDisposed = false;
ko.exportProperty(this, 'dispose', this.dispose);
};
ko.subscription.prototype.dispose = function () {
this.isDispos... | JavaScript | 0.000241 | @@ -1674,24 +1674,353 @@
on;%0A %7D,%0A%0A
+ beforeSubscribe: function (callback, callbackTarget) %7B%0A var _oldValue = null;%0A%0A this.subscribe(function(oldValue)%7B%0A _oldValue = oldValue;%0A %7D, null, 'beforeChange');%0A%0A this.subscribe(function(newValue)%7B%0A ... |
dd56ab27a6cdb21d53d37841b8aeef75cb25ce5d | increase font size | src/templates/template-default.js | src/templates/template-default.js | import React from 'react';
import PageSection from '~/components/page-section';
import Typography from '~/components/typography';
import Heading from '~/components/heading';
import { Box, Flex } from 'rebass';
import { Navigation, NavigationItem, NavigationLink } from '~/components/navigation';
import styled from 'sty... | JavaScript | 0.00004 | @@ -1430,17 +1430,16 @@
;%0A %7D%0A
-%0A
%60;%0A%0Acons
@@ -1679,16 +1679,37 @@
center;%0A
+ font-size:1.3em;%0A
%60%0A%0Aconst
|
1faa5b172572fd92a2282fac2f79b233f61de769 | change the method of KM.toQueryString. the object's member typed of object and array will be abandoned | neuron/lang.js | neuron/lang.js | /**
* @module lang
* - language enhancement for javascript
* - adapter for mootools
*/
;(function(K){
// bind the this pointer of a function
function bind_method(fn, bind){
return function(){
return fn.apply(bind, arguments);
}
};
/**
* transform functions that have the signature fn(key, value)
* to
... | JavaScript | 0 | @@ -1147,16 +1147,23 @@
var key,
+ value,
ret = %5B
@@ -1167,32 +1167,116 @@
= %5B%5D
-;%0A%09%0A%09for(key in obj)%7B%0A%09%09
+, encode = encodeURIComponent;%0A%09%0A%09for(key in obj)%7B%0A%09%09!K.isObject(value = obj%5Bkey%5D;) && !K.isArray(value) &&
ret.
@@ -1292,24 +1292,29 @@
+ '=' +
-obj%5Bkey%5D
+enc... |
db55c7b6f30af9b79fedf32a4e70eba29e2ee951 | Simplify implementation. Closes #24. | array-pair-sum/array-pair-sum.js | array-pair-sum/array-pair-sum.js | // This is just a modification of the integer difference problem presented elsewhere
var arrayPairSum = function (k, array) {
var hash = {},
pairs = [];
// Loop through the array once, storing the results in an object for a
// time complexity of O(n) - the naive solution consists of two for loops
// whi... | JavaScript | 0 | @@ -410,17 +410,16 @@
0; i %3C
-(
hash%5Bk -
@@ -430,14 +430,8 @@
ber%5D
- %7C%7C 0)
; i+
|
2e17c92059e8a71efaf61a683ff6c48aa9429cc1 | Add strict mode and disable runtime image opt in Next config | next.config.js | next.config.js | module.exports = {
env: {
homeTeam: "Rockies",
homeStadium: "Coors Field - Denver",
websiteDescription: "Is there a fucking Rockies game today?",
// TODO: Use These
googleAnalytics: "UA-32746833-1",
websiteKeywords:
"rockies, colorado rockies, rockies game, schedule, mlb, baseball, majo... | JavaScript | 0 | @@ -12,16 +12,211 @@
rts = %7B%0A
+ reactStrictMode: true,%0A // Since the site is exposted statically, the fancy Next.js image opts need%0A // to be turned off.%0A experimental: %7B%0A images: %7B%0A unoptimized: true,%0A %7D,%0A %7D,%0A
env: %7B
|
1c1d2d3fd716cb194b6c2a47083194fc2c89991e | upgrade nwjs default version in config | ninjaConfig.js | ninjaConfig.js | /*
this config file is used to configure the nw-ninja envelope, not the app itself
*/
var rc = require('rc')
module.exports = rc('nw-ninja', {
appDir: './nwapp',
files: './nwapp/**/**', // use the glob format
platforms: ['osx64', 'win32', 'win64', 'linux32', 'linux64'],
buildDir: './dist',
buildType: 'versioned'... | JavaScript | 0.000001 | @@ -332,12 +332,12 @@
'0.
-12.3
+26.6
',%0A%09
|
692bbd92582d8750c6f5ebe3afd7583511499819 | use apostrophes to make the url and filename a single value on the cli | child.js | child.js | var child = require('child_process');
exports.child = function(url, filename, options){
var key,
stdin = ['phantomjs'];
stdin.push(options.args);
stdin.push(__dirname+'/render.js');
stdin.push(url);
stdin.push(filename);
stdin.push(options.width);
stdin.push(options.height);
return child.exec(stdin.join(' ... | JavaScript | 0 | @@ -194,19 +194,27 @@
in.push(
-url
+%22'%22+url+%22'%22
);%0A%09stdi
@@ -220,24 +220,28 @@
in.push(
+%22'%22+
filename
);%0A%09stdi
@@ -232,16 +232,20 @@
filename
++%22'%22
);%0A%09stdi
|
a5c9c476c445db9b01df14152453617ef8d4ebf4 | improve test coverage for Array.prototype.filter (#1615) | polyfills/Array/prototype/filter/tests.js | polyfills/Array/prototype/filter/tests.js | /* eslint-env mocha, browser */
/* global proclaim */
var stringsOnly = function(val) {
return (typeof val === 'string');
};
it('is a function', function() {
proclaim.isInstanceOf(Array.prototype.filter, Function);
});
it('takes 1 argument', function() {
proclaim.equal(Array.prototype.filter.length, 1);
});
it('... | JavaScript | 0 | @@ -52,25 +52,27 @@
*/%0A%0A
-var stringsOnly =
+it('is a function',
fun
@@ -80,72 +80,172 @@
tion
+
(
-val
) %7B%0A%09
-return (typeof val === 'string'
+proclaim.isFunction(Array.prototype.filter
);%0A%7D
+)
;%0A%0Ait('
-is a function
+has correct arity', function () %7B%0A%09proclaim.arity(Array.prototype.fi... |
adb02b2b27d4b743be11fd8f72d6111e1e400d78 | Throw if GameObject#add called w/ bad obj | src/vectr.gameobj.js | src/vectr.gameobj.js | /*jslint sloppy: true, plusplus: true, browser: true */
/*globals Vectr */
var Vectr = window.Vectr || {};
Vectr.GameObject = function (x, y) {
this.position = {
'x': x || 0,
'y': y || 0
};
this.active = true;
this.scale = 1;
this.rotation = 0;
this.glow = 0;
this.colors =... | JavaScript | 0.000002 | @@ -667,28 +667,24 @@
%0A %7D%0A%0A
-if (
offsetX ===
@@ -680,39 +680,16 @@
ffsetX =
-== undefined) %7B%0A
offsetX
@@ -689,25 +689,26 @@
offsetX
-=
+%7C%7C
0;%0A
%7D%0A%0A i
@@ -703,51 +703,17 @@
-%7D%0A%0A if (offsetY === undefined) %7B%0A
+offsetY =
off
@@ -721,18 +72... |
e68791ee4225f2b0a35c3af6e376eaaecd8288cd | Update svg.js | html1/svg/svg.js | html1/svg/svg.js | document.getElementById("id_logic_version").innerHTML = "Logic = 2019.12.02.1";
window.addEventListener("deviceorientation", on_gyro_data_uab);
window.addEventListener("devicemotion", on_acc_data_uab);
function deseneaza(unghi_x, unghi_y)
{
// obtinem context grafic
var circle = document.getElementById("i... | JavaScript | 0.000001 | @@ -380,16 +380,18 @@
%0A%0D%0A%09var
+r
= circle
@@ -932,8 +932,10 @@
.PI;%09%0D%0A%7D
+%0D%0A
|
498e222362059c3d0a5df2dba8318400341b467a | update to latest pwa-install version | nuxt.config.js | nuxt.config.js | // Info about configuration https://nuxtjs.org/guide/configuration/
const env = require(`./environments/${process.env.NODE_ENV}`);
// Webpack plugin for Monaco
const MonacoEditorPlugin = require('monaco-editor-webpack-plugin');
console.log(`Environment: ${process.env.NODE_ENV}`);
module.exports = {
env: env,
hea... | JavaScript | 0 | @@ -4151,17 +4151,18 @@
all@1.2.
-9
+10
',%0A
|
cde5b2d1e98300796161af7576b565f4d69fdfdf | Add fallback to getting Preferences and Notifications URLs | modules/ext.echo.init.js | modules/ext.echo.init.js | ( function ( mw, $ ) {
'use strict';
// Remove ?markasread=XYZ from the URL
var uri = new mw.Uri();
if ( uri.query.markasread !== undefined ) {
delete uri.query.markasread;
window.history.replaceState( null, document.title, uri );
}
mw.echo = mw.echo || {};
mw.echo.config = mw.echo.config || {};
// Set de... | JavaScript | 0.000002 | @@ -1120,16 +1120,61 @@
( 'href'
+ ) %7C%7C mw.util.getUrl( 'Special:Notifications'
),%0A%09%09%09%09
@@ -1185,16 +1185,18 @@
erences:
+ (
$( '#pt
@@ -1232,10 +1232,60 @@
' )
-+
+%7C%7C mw.util.getUrl( 'Special:Preferences' ) ) +%0A%09%09%09%09%09
'#mw
|
d70f28f15359297103548f6feb42fdb3f7bc3a9b | add new models | modules/monitoring/db.js | modules/monitoring/db.js | 'use strict';
const mongoose = require('mongoose');
require('./models').load();
exports.MonitoringModuleModel = mongoose.model('MonitoringModule');
exports.MetricModel = mongoose.model('Metric');
exports.CPUHistoryModel = mongoose.model('CPUHistory');
exports.CPUEventModel = mongoose.model('CPUEvent'); | JavaScript | 0 | @@ -188,24 +188,25 @@
('Metric');%0A
+%0A
exports.CPUH
@@ -300,8 +300,237 @@
Event');
+%0A%0Aexports.RAMHistoryModel = mongoose.model('RAMHistory');%0Aexports.RAMEventModel = mongoose.model('RAMEvent');%0A%0Aexports.NodeDetailsModel = mongoose.model('NodeDetails');%0A%0Aexports.NotificationModel = mongoose.model('No... |
1e74cb60b14d05f7f4a2dd44026f96782edc858e | remove log statement from mcpu view.js | backend/servers/mcpub/db/view.js | backend/servers/mcpub/db/view.js | const r = require('./../dash');
const parse = require('co-body');
const get_ip = require('ipware')().get_ip;
const model = require('./model/model');
module.exports.addView = function*(next) {
let params = yield parse(this);
if (!params.user_id) {
let ip_info = get_ip(this.request);
let values =... | JavaScript | 0 | @@ -979,57 +979,8 @@
));%0A
- console.log(%22add view: %22, inserted);%0A
|
fba051054a620955435c0d4e7cf7ad1d53a77e53 | Move script tag below content | pages/index.js | pages/index.js | import React, { Fragment } from 'react';
import Head from 'next/head';
import { Header, RaffleContainer } from '../components';
export default () => (
<Fragment>
<Head>
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
... | JavaScript | 0 | @@ -410,50 +410,8 @@
/%3E%0A
- %3Cscript src=%22/static/lib.min.js%22 /%3E%0A
@@ -518,16 +518,56 @@
%3C/main%3E%0A
+ %3Cscript src=%22/static/lib.min.js%22 /%3E%0A
%3C/Frag
|
b53f1ea8a67fd50b02b016f4ff205c12c87f98aa | update android index | index.android.js | index.android.js | import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import { StackNavigator } from 'react-navigation';
import GameStart from './containers/GameStart';
import LaunchScreen from './containers/LaunchScreen';
import GameplayScreen from './containers/GameplayScreen';
const Nav = StackNavig... | JavaScript | 0.000001 | @@ -289,16 +289,72 @@
Screen';
+%0Aimport ResultsScreen from './containers/ResultsScreen';
%0A%0Aconst
@@ -393,16 +393,17 @@
creen: %7B
+
screen:
@@ -432,16 +432,17 @@
Start: %7B
+
screen:
@@ -558,16 +558,93 @@
ayScreen
+ %7D,%0A ResultsScreen: %7B%0A path: 'games/:game_id',%0A screen: ResultsScreen ... |
df057e89e67d309f310d3ac2a594365bbf3f6c25 | work around bug about how ! is escaped by charwise | indexes/links.js | indexes/links.js | var ref = require('ssb-ref')
var path = require('path')
var pull = require('pull-stream')
var ltgt = require('ltgt')
var ssbKeys = require('ssb-keys')
var paramap = require('pull-paramap')
var ViewLevel = require('flumeview-level')
//53 bit integer
var MAX_INT = 0x1fffffffffffff
var u = requi... | JavaScript | 0.003471 | @@ -3233,17 +3233,16 @@
value, %22
-!
%22, u.lo)
@@ -5086,12 +5086,14 @@
ndex%0A %7D%0A%7D%0A%0A
+%0A%0A
|
c527dc5b0667f3fee6c6a4bd8cbb185b0abd98dd | Remove obsolete object | input/boolean.js | input/boolean.js | 'use strict';
var isCopy = require('es5-ext/lib/Array/prototype/is-copy')
, d = require('es5-ext/lib/Object/descriptor')
, makeEl = require('dom-ext/lib/Document/prototype/make-element')
, dispatchEvt = require('dom-ext/lib/HTMLElement/prototype/dispatch-event-2')
, Db = require('d... | JavaScript | 0.999906 | @@ -2019,30 +2019,8 @@
t);%0A
-%09%09this.controls = %7B%7D;%0A
%09%09th
|
f347dddfe2cb0e4ddcd7535e871afe08ac9d60ca | remove verbose log | tasks/grunt-handlebars-layouts.js | tasks/grunt-handlebars-layouts.js | /*
* Grunt Handlebars-HTML
* https://github.com/thierryc/grunt-handlebars-layouts
*
* Copyright (c) 2014 Thierry Charbonnel
* Licensed under the MIT license.
*/
module.exports = function(grunt) {
'use strict';
var path = require('path');
var fs = require('fs');
var _ = require('lodash');
var async = r... | JavaScript | 0.002912 | @@ -7018,51 +7018,8 @@
ne);
- %0A %0A grunt.log.writeln('Done'.green);
%0A %7D
|
167e62419dfdef03c6622e756e98a8729987000c | Fix #37: Add stack traces for sauce | tasks/lib/mocha-sauce-reporter.js | tasks/lib/mocha-sauce-reporter.js | var BaseReporter = require('mocha').reporters.Base;
var color = BaseReporter.color;
module.exports = function (browser) {
var SauceReporter = function(runner) {
BaseReporter.call(this, runner);
var self = this;
var stats = this.stats;
var numberTests = 0;
var passes = 0;
var failures = 0;
... | JavaScript | 0 | @@ -639,62 +639,28 @@
ush(
-e.title + (e.err.message ? (': ' + e.err.message) : ''
+formatErrorMessage(e
));%0A
@@ -1447,8 +1447,237 @@
ter;%0A%7D;%0A
+%0Avar formatErrorMessage = function (e) %7B%0A var msg = e.title;%0A if (e.err) %7B%0A if (e.err.message) %7B%0A msg += (': ' + e.err.message + ' ');%0A ... |
8503a743f73014ee7be2f122fbeb219de3aedb07 | test for restore not mapping to prototypes when no-conflict active | test/environments/sugar/global.js | test/environments/sugar/global.js | (function() {
// Sugar.extend functionality
package('String', function () {
Sugar.extend(String, {
foo: function() {
return 'bar';
}
});
equal(run('s', 'foo'), 'bar', 'extend | basic functionality');
equal('foo' in Sugar.String, true, 'extend | ensure method was added to globa... | JavaScript | 0.000002 | @@ -1009,24 +1009,218 @@
d methods');
+%0A if(Sugar.noConflict) %7B%0A equal((3).chr(), 'F', %22Ensure that restore doesn't accidentally map methods to prototypes when no-conflict is active%22);%0A delete Number.prototype.chr;%0A %7D
%0A%0A %7D);%0A%0A p
|
1df89c53c0491acfcbd438ddd86a88977a7d2a18 | add tolerance of 1e-6 to pixel comparison tests | test/image/compare_pixels_test.js | test/image/compare_pixels_test.js | var fs = require('fs');
var path = require('path');
var constants = require('../../tasks/util/constants');
var getOptions = require('../../tasks/util/get_image_request_options');
// packages inside the image server docker
var request = require('request');
var test = require('tape');
var gm = require('gm');
var touch... | JavaScript | 0 | @@ -2864,11 +2864,12 @@
ce:
-0.0
+1e-6
%0A
@@ -2873,24 +2873,718 @@
%7D;%0A%0A
+ /*%0A * N.B. The non-zero tolerance was added in%0A * https://github.com/plotly/plotly.js/pull/243%0A * where some legend mocks started generating different png outputs%0A * on %60npm r... |
f4ec35573e2f0c9fd58ee0bb032c5eaa55d4f3e5 | improve flakey random walk discovery test (#574) | test/peer-discovery/index.node.js | test/peer-discovery/index.node.js | 'use strict'
/* eslint-env mocha */
const chai = require('chai')
chai.use(require('dirty-chai'))
const defer = require('p-defer')
const mergeOptions = require('merge-options')
const Bootstrap = require('libp2p-bootstrap')
const crypto = require('libp2p-crypto')
const KadDht = require('libp2p-kad-dht')
const Multicas... | JavaScript | 0.000001 | @@ -3772,35 +3772,36 @@
enabled:
-tru
+fals
e,%0A d
@@ -3895,17 +3895,17 @@
imeout:
-1
+5
000%0A
@@ -3955,32 +3955,175 @@
%7D%0A %7D)%0A%0A
+ const localConfig = getConfig(peerInfo)%0A // Only run random walk on our local node%0A localConfig.config.dht.randomWalk.enabled =... |
9bc76142b203bf53f08db62ebce91e8ea47b9d50 | Fix function name | popup.js | popup.js | function onload() {
document.getelementbyid("optionslink").setattribute("href", chrome.extension.geturl("options.html"));
chrome.tabs.getSelected(null, function(tab) {
// The common use case is to disable Vimium at the domain level.
// This regexp will match "http://www.example.com/" from "http://www.exampl... | JavaScript | 0.999896 | @@ -4,17 +4,17 @@
ction on
-l
+L
oad() %7B%0A
@@ -31,18 +31,18 @@
.get
-e
+E
lement
-byi
+ByI
d(%22o
@@ -47,17 +47,17 @@
%22options
-l
+L
ink%22).se
@@ -57,17 +57,17 @@
nk%22).set
-a
+A
ttribute
@@ -95,19 +95,19 @@
sion.get
-url
+URL
(%22option
|
b3122ca59cef75447df5de3aeefc85f95dfc4073 | Split copy part to a function | popup.js | popup.js | window.addEventListener('load', function(){
'use strict';
// Get elements
var title = document.getElementById('page_title');
var url = document.getElementById('page_url');
var copyTitle = document.getElementById('copy_title');
var copyUrl = document.getElementById('copy_url');
// Get tab info
chrome.t... | JavaScript | 0 | @@ -1,8 +1,267 @@
+function copyToClipboard(str)%7B%0A 'use strict';%0A%0A var textArea = document.createElement('textarea');%0A document.body.appendChild(textArea);%0A textArea.value = str;%0A textArea.select();%0A document.execCommand('copy');%0A document.body.removeChild(textArea);%0A%7D%0A%0A
window.a
@@ -8... |
398d784b8b430627441ec9d04e405a2ef0c0aa83 | Update sketch.js | pong/sketch.js | pong/sketch.js | var BY, BX, T, BDY, BDX;
var Pb, Bot;
var PtsA = 0,
PtsB = 0;
function setup() {
background(0);
createCanvas(1080, 720);
BY = height / 2;
BX = width / 2;
BDY = random(-7, 7);
BDX = 2;
T = random(1, 10);
Pb = height / 2 - 15;
slider = createSlider(0, 20, 3, 0, 3, 6, 10,15,20);
}
function draw() {
... | JavaScript | 0.000001 | @@ -1257,16 +1257,44 @@
a/abajo%0A
+ if (slider.value() %3E 0) %7B%0A
BY =
@@ -1304,16 +1304,22 @@
- BDY;%0A
+ %7D%0A
%0A //cho
|
a7bbae19add3083c558a5363c75c85b53e758606 | reset PoolPinger.out_req as request finishes to free memory | pool_pinger.js | pool_pinger.js | // Copyright 2013 Voxer IP LLC. All rights reserved.
var GO;
function PoolPinger(pool_endpoint) {
this.pool_endpoint = pool_endpoint;
this.running = false;
this.attempts = 0;
this.ping_timeout = pool_endpoint.ping_timeout;
this.out_req = null;
this.req_timer = null;
}
PoolPinger.prototype.sta... | JavaScript | 0 | @@ -1422,24 +1422,53 @@
ion (res) %7B%0A
+ self.out_req = null;%0A
self
@@ -1529,32 +1529,61 @@
, function () %7B%0A
+ self.out_req = null;%0A
self.att
@@ -1990,24 +1990,49 @@
eq.abort();%0A
+ this.out_req = null;%0A
// calli
|
debaac0c22dc22698afe91239499bcd507595e22 | Set request size limit to 1mb to fix error on large responses | proxy.js | proxy.js | var AWS = require('aws-sdk');
var http = require('http');
var express = require('express');
var bodyParser = require('body-parser');
function run(config) {
// Setup AWS credentials
var creds;
var chain = new AWS.CredentialProviderChain();
chain.resolve(function (err, resolved) {
if (err) {
consol... | JavaScript | 0 | @@ -741,16 +741,30 @@
e: '*/*'
+, limit: '1mb'
%7D));%0A a
|
f1d9bb6de06a201c0fee83d1c536fffbe2070016 | Fix bug introduced in merge | app/js/instances/init.js | app/js/instances/init.js | /*
* Copyright 2015 Caleb Brose, Chris Fogerty, Rob Sheehy, Zach Taylor, Nick Miller
*
* 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... | JavaScript | 0 | @@ -868,66 +868,8 @@
'),%0A
- instanceController = require('./instanceController'),%0A
@@ -1297,72 +1297,8 @@
r);%0A
-instances.controller('instanceController', instanceController);%0A
inst
|
70050d1863cf40e5a1740dcee6207f74326d071e | Fix starring discussion | packages/custom/icapi/server/services/star.js | packages/custom/icapi/server/services/star.js | 'use strict'
var _ = require('lodash');
var UserModel = require('../models/user.js');
var TaskModel = require('../models/task.js');
var ProjectModel = require('../models/project.js');
var DiscussionModel = require('../models/discussion.js');
var UpdateModel = require('../models/update.js');
var capitalize = function... | JavaScript | 0 | @@ -463,16 +463,17 @@
scussion
+s
': Discu
@@ -493,16 +493,17 @@
'update
+s
': Updat
|
86bb1cc0c1cd24b3be1851b31842a26a63d3f061 | Remove "top-level content surrounded by one empty line" rule | packages/kolibri-tools/lib/htmlhint_custom.js | packages/kolibri-tools/lib/htmlhint_custom.js | /*
Custom rules for the HTML linter.
Custom rule IDs are prefixed with a double dash ('--')
*/
var HTMLHint = require('htmlhint').HTMLHint;
/* helper to convert alternate-style newlines to unix-style */
function clean(val) {
return val.replace(/\r\n?/g, '\n');
}
/*
Vue whitespace conventions.
Based on the e... | JavaScript | 0 | @@ -907,1874 +907,388 @@
-parser.addListener('text', function(event) %7B%0A var eventData = clean(event.raw);%0A var last = event.lastEvent;%0A if (last.type === 'tagstart') %7B%0A if (stack.length === 1 && last.tagName === 'template') %7B%0A var match = eventData.match(/%5E(%5Cn*)(... |
7d88dec0afcbdbf15262e06a3bb8f59980e51251 | Update locale to use object notation | app/libs/locale/index.js | app/libs/locale/index.js | 'use strict';
// Load our requirements
const i18n = require('i18n'),
path = require('path'),
logger = require('../log');
// Variables
let localeDir = path.resolve(__base + '../locales');
// Configure the localization engine
i18n.configure({
locales: require('./available-locales')(localeDir),
defaultL... | JavaScript | 0 | @@ -116,19 +116,30 @@
require(
-'..
+__base + 'libs
/log');%0A
@@ -337,16 +337,40 @@
: 'en',%0A
+ objectNotation: true,%0A
direct
|
f4e1e827ccd602a01e5c888a01176986bd1d6fc0 | Update get_info() error handling | demos/dlgr/demos/bartlett1932/static/scripts/experiment.js | demos/dlgr/demos/bartlett1932/static/scripts/experiment.js | var my_node_id;
// Consent to the experiment.
$(document).ready(function() {
// do not allow user to close or reload
dallinger.preventExit = true;
// Print the consent form.
$("#print-consent").click(function() {
window.print();
});
// Consent to the experiment.
$("#consent").click(function() {
... | JavaScript | 0 | @@ -2468,19 +2468,25 @@
nction (
-err
+rejection
) %7B%0A
@@ -2509,60 +2509,8 @@
r);%0A
- var errorResponse = JSON.parse(err.response);%0A
@@ -2530,21 +2530,17 @@
tml(
-errorResponse
+rejection
.htm
|
8909cb4dec6b92c0f8770ca00003b5b9ec67eee1 | add semicolon | app/scripts/services/things.js | app/scripts/services/things.js | angular.module('mushin').factory('things', function ($rootScope, hoodie, $q, Thing) {
var debug = new window.$debug('mushin:services/thing');
$rootScope.contexts = {}; // context name -> obj with things, active, ...
$rootScope.projects = {};
$rootScope.importance = {}; // importance level -> obj with things, a... | JavaScript | 0.999999 | @@ -1901,16 +1901,18 @@
.defer()
+;%0A
%0A p
|
6dce6d054d832f725006536595b8866e04e0cc82 | Fix About link. | src/Components/Header.js | src/Components/Header.js | import React, { Component } from 'react'
import { Link } from 'react-router'
import { pageScrollTopAnimate } from 'Helpers/browser.js'
import { checkCurrentLanguage } from 'Helpers/language.js'
import 'styles/pages/article.scss'
export default class Header extends Component {
constructor() {
super()
this._o... | JavaScript | 0 | @@ -1600,16 +1600,211 @@
S)%0A %7D%0A%0A
+ _onNavToAbout() %7B%0A setTimeout(() =%3E %7B%0A const about = document.querySelector('#about-us')%0A const timeInMS = 500%0A pageScrollTopAnimate(about.offsetTop, timeInMS)%0A %7D, 0)%0A %7D%0A%0A
render
@@ -2768,17 +2768,32 @@
%3C
-a
+Link... |
74d57eb7613cef4fe6c998cf5c9ea7f86f22bf72 | Rename to XHR to avoid clashes, added extra check for Titanium object first | src/OAuth/Request.js | src/OAuth/Request.js | /**
* Factory object for XMLHttpRequest
*/
function Request(debug) {
var XMLHttpRequest;
switch (true)
{
case typeof global.Titanium.Network.createHTTPClient != 'undefined':
XMLHttpRequest = global.Titanium.Network.createHTTPClient();
break;
// CommonJS require
case typeof require != 'un... | JavaScript | 0 | @@ -75,29 +75,18 @@
%0A%09%09var X
-MLHttpRequest
+HR
;%0A%0A%0A%09%09sw
@@ -100,32 +100,73 @@
rue)%0A%09%09%7B%0A%09%09%09case
+ typeof global.Titanium != 'undefined' &&
typeof global.T
@@ -219,29 +219,18 @@
':%0A%09%09%09%09X
-MLHttpRequest
+HR
= globa
@@ -343,37 +343,26 @@
ined':%0A%09%09%09%09X
-MLHttpRequ... |
b57c4b41991408ca9cd3e983b88c41d70f7ca60c | Add buffer type for file model | editor/models/file.js | editor/models/file.js | define([
"hr/hr",
"hr/utils",
"core/rpc",
"core/commands"
], function(hr, _, rpc, commands) {
var File = hr.Model.extend({
defaults: {
path: null,
name: null,
directory: false,
size: 0,
mtime: 0,
atime: 0
},
... | JavaScript | 0.000001 | @@ -31,16 +31,34 @@
utils%22,%0A
+ %22hr/promise%22,%0A
%22cor
@@ -103,16 +103,19 @@
n(hr, _,
+ Q,
rpc, co
@@ -318,16 +318,42 @@
atime: 0
+,%0A buffer: null
%0A
@@ -668,32 +668,171 @@
%22);%0A %7D,%0A%0A
+ // Check if a file is a buffer or exists%0A isBuffer: functi... |
ddb8825852a61f5d59a2d52fa2269b8bbfc61426 | Fix delete button in records table. #91 | app/static/custom/js/custom.js | app/static/custom/js/custom.js | function applyChanges(data, url, showResult, refreshPage) {
var success = false;
$.ajax({
type : "POST",
url : url,
data : JSON.stringify(data),// now data come in this function
contentType : "application/json; charset=utf-8",
crossDomain : true,
dataType : "json",
success : function(data, stat... | JavaScript | 0.000001 | @@ -1997,36 +1997,38 @@
n-danger button_
-edit
+delete
%5C%22 id=%5C%22%22 + reco
|
f509d4b7820c86f328489cbc8dca49c0a7f447ed | correct onError helper handler | app/templates/gulp/_helpers.js | app/templates/gulp/_helpers.js | 'use strict'
module.exports = {
errorHandler : function (error) {
console.log(error.toString());
this.emit('end');
}
}
| JavaScript | 0.000043 | @@ -32,21 +32,15 @@
%7B%0A
-e
+onE
rror
-Handler
: fu
@@ -113,14 +113,34 @@
'end');%0A
+ this.destroy();%0A
%7D%0A%7D%0A
|
3e11b8e24d0c3a07f3be4af031d18d5ff425db42 | remove the deprecated GetOffsets method | js/foundation.util.box.js | js/foundation.util.box.js | 'use strict';
import { rtl as Rtl } from "./foundation.core.utils";
var Box = {
ImNotTouchingYou: ImNotTouchingYou,
OverlapArea: OverlapArea,
GetDimensions: GetDimensions,
GetOffsets: GetOffsets,
GetExplicitOffsets: GetExplicitOffsets
}
/**
* Compares the dimensions of an element to a container and deter... | JavaScript | 0.000003 | @@ -178,34 +178,8 @@
ns,%0A
- GetOffsets: GetOffsets,%0A
Ge
|
08148cfc867266281b7960e5c37bcfbe79dc9cce | make all commands slash commands | app/plugins/_registry.js | app/plugins/_registry.js | import { commands as blank_page_commands, default as BlankPagePlugin } from './blank-page'
import { commands as barrel_roll_commands, default as BarrelRollPlugin } from './barrel-roll'
import { commands as pesticide_commands, default as PesticidePlugin } from './pesticide'
import { commands as construct_commands, defau... | JavaScript | 0.999905 | @@ -596,23 +596,29 @@
ands, %7B%5B
+%60/$%7B
command
+%7D%60
%5D:plugin
@@ -996,8 +996,204 @@
n),%0A%7D))%0A
+%0Aexport const PluginHints = %5B%0A blank_page_commands%5B0%5D,%0A barrel_roll_commands%5B0%5D,%0A pesticide_commands%5B0%5D,%0A construct_commands%5B0%5D,%0A construct_debug_commands%5B0%5D,%0A%5D.ma... |
2d957682bc769f3a038cd91f63e95e2754dfd10c | enable buttons if no attribute specified | features/pagination/js/pagination.js | features/pagination/js/pagination.js | (function() {
'use strict';
window.Ractive.controller('pagination', function(component, data, el, config, done) {
var pagination = null,
refs = {
totalPages: 'total-pages',
pageSelected: 'page-selected',
displayPagesCount: 'display-pages-count',
displayFirstButt... | JavaScript | 0.000001 | @@ -1799,32 +1799,102 @@
ion(newValue) %7B%0A
+ newValue = typeof newValue == 'undefined' ? true : newValue;%0A%0A
paginati
|
51066ff18f6f367adecb2166aede2a18e09cf025 | fix options in step-definitions | features/step_definitions/options.js | features/step_definitions/options.js | var assert = require('assert');
var fs = require('fs');
module.exports = function () {
this.When(/^I run "osrm\-routed\s?(.*?)"$/, { timeout: this.TIMEOUT }, (options, callback) => {
this.runBin('osrm-routed', options, () => {
callback();
});
});
this.When(/^I run "osrm\-extrac... | JavaScript | 0.000218 | @@ -2043,22 +2043,22 @@
lit(
-%22%5Cn%22
+'%5Cn'
).join(
-%22,%22
+','
);%0A
|
10e42db1870c3248703adc5a680d2507cfc1d8c8 | Fix sd_step step_definitions | features/step_definitions/sd-step.js | features/step_definitions/sd-step.js | 'use strict';
/* eslint-disable no-unused-vars */
const Assert = require('chai').assert;
const request = require('../support/request');
const sdapi = require('../support/sdapi');
const { defineSupportCode } = require('cucumber');
const TIMEOUT = 240 * 1000;
defineSupportCode(({ Before, Given, When, Then }) => {
... | JavaScript | 0.000046 | @@ -4359,24 +4359,31 @@
) %7B%0A
+return
this.waitFor
|
ef6b9a827c9f5af6018e08d69cc1cf4491d52386 | Remove Rx as a direct dependency | frontend/src/app.js | frontend/src/app.js | import Rx from 'rx';
import Cycle from '@cycle/core';
import CycleDOM from '@cycle/dom';
function main() {
return {
DOM: Rx.Observable.interval(1000)
.map(i => CycleDOM.h(
'h1', '' + i + ' seconds elapsed'
))
};
}
let drivers = {
DOM: CycleDOM.makeDOMDriver('#app')
};
Cycle.run(main, dr... | JavaScript | 0.000001 | @@ -1,25 +1,4 @@
-import Rx from 'rx';%0A
impo
@@ -33,24 +33,34 @@
%0Aimport
-CycleDOM
+%7BmakeDOMDriver, h%7D
from '@
@@ -86,16 +86,23 @@
on main(
+drivers
) %7B%0A re
@@ -121,35 +121,50 @@
OM:
-Rx.Observable.interval(1000
+drivers.DOM.select('input').events('click'
)%0A
@@ -176,74 +176,213 @@
map(
-i
+e... |
4e9486d557ee992daca9ae92f235fa608f89f548 | update js version. | testcube/static/require-config.js | testcube/static/require-config.js | let version = '1.1';
function jsVersion(id, url) {
return url.includes('libs/') ? '' : '?v' + version;
}
requirejs.config({
baseUrl: '/static/',
urlArgs: jsVersion,
shim: {
'bootstrap': {
deps: ['jquery', 'bootstrap_fix'],
exports: '$.fn.popover'
},
boots... | JavaScript | 0 | @@ -10,17 +10,17 @@
on = '1.
-1
+2
';%0A%0Afunc
|
3fc4f79e1f1f12ea8ab163452e91db651e472041 | Fix DateRange query issue | app/sensors/DateRange.js | app/sensors/DateRange.js | import React, { Component } from "react";
import { DateRangePicker } from "react-dates";
import classNames from "classnames";
import * as TYPES from "../middleware/constants";
const moment = require("moment");
const momentPropTypes = require("react-moment-proptypes");
const helper = require("../middleware/helper");
e... | JavaScript | 0.000001 | @@ -2772,16 +2772,121 @@
l%0A%09%09%7D);%0A
+%09%09if(inputVal.startDate && inputVal.endDate) %7B%0A%09%09%09this.setValue(inputVal);%0A%09%09%7D%0A%09%7D%0A%0A%09setValue(inputVal) %7B%0A
%09%09const
|
f8e119c2a1a04c6e2bb66aa5c635bca401dc0ab0 | update saga due to service modification. | app/store/sagas/login.js | app/store/sagas/login.js | // redux-saga
import { put, call, take } from 'redux-saga/effects';
// navigation
import { NavigationActions } from 'react-navigation';
// actions
import { retrieveAccessToken, logout } from '../actions/login';
import { retrieveAthleteDetails } from '../actions/athlete';
// constants
import { LOGOUT } from '../const... | JavaScript | 0 | @@ -237,16 +237,33 @@
eDetails
+, getAthleteClubs
%7D from
@@ -733,24 +733,27 @@
const
+c
re
-sponse
+dentials
= yield
@@ -836,29 +836,27 @@
token =
+c
re
-sponse.data
+dentials
.access_
@@ -960,21 +960,19 @@
s =
+c
re
-sponse.data
+dentials
.ath
@@ -1022,24 +1022,59 @@
details));%0A%0A
+ yield p... |
983777214a6c7492bcd5e8142f7fa8f0375ff04d | Fix nits | queue.js | queue.js | "use strict";
// Queue is a circular buffer with good locality of reference and doesn't
// allocate new memory unless there are more than [InitialCapacity] parallel
// tasks in which case it will resize itself generously to x8 more
// capacity. The use case of asap should require no or few
// amount of resizes during ... | JavaScript | 0.001123 | @@ -10,17 +10,16 @@
ct%22;%0A%0A//
-
Queue is
@@ -83,17 +83,16 @@
esn't%0A//
-
allocate
@@ -159,17 +159,16 @@
allel%0A//
-
tasks in
@@ -225,17 +225,16 @@
more%0A//
-
capacity
@@ -283,17 +283,16 @@
r few%0A//
-
amount o
@@ -320,17 +320,16 @@
ime.%0A%0A//
-
Calling
@@ -380,17 +380,16 @@
lling%0A//
- ... |
7d67c7c25d61a182becdb0ed833563c276990b88 | Call for getAllOrders even if there the orders collection already exists | app/stores/orderStore.js | app/stores/orderStore.js | var marty = require('marty');
var orderConstants = require('../constants/orderConstants');
var orderApi = require('../sources/orderApi');
var orderStore = marty.createStore({
handlers: {
receiveOrders: orderConstants.RECEIVE_ORDERS,
createOrder: orderConstants.CREATE_ORDER
},
getInitialState: function... | JavaScript | 0 | @@ -520,16 +520,21 @@
this);%0A
+ %0A
this
@@ -546,16 +546,18 @@
hanged()
+;%0A
%0A %7D,%0A%0A
@@ -858,47 +858,8 @@
) %7B%0A
- console.log('getting all orders');%0A
@@ -935,16 +935,71 @@
on() %7B %0A
+ if(this.hasAlreadyFetched('GET_ALL_ORDERS'))%0A
|
b01ec56315bb93d4b1fd147eef39e312ddbd281a | Add the appropriate accept header to JSON requests | script/wee.data.js | script/wee.data.js | /* global JSON */
(function(W) {
'use strict';
W.fn.make('data', {
/**
* Make Ajax request based on specified options
*
* @param {object} options
* @param {string} options.url - endpoint to request
* @param {(Array|function|string)} [options.send] - executed before Ajax call
* @param {(Array|fun... | JavaScript | 0.000001 | @@ -2445,16 +2445,17 @@
N header
+s
%0A%09%09%09if (
@@ -2520,16 +2520,95 @@
/json';%0A
+%09%09%09%09headers%5B'Accept'%5D =%0A%09%09%09%09%09'application/json, text/javascript, */*; q=0.01';%0A
%09%09%09%7D%0A%0A%09%09
|
77437c97597bc7c2774022df3b5abe7b6ad32dc5 | fix rootUrl for demo page | tests/dummy/config/environment.js | tests/dummy/config/environment.js | /* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
rootURL: '/',
locationType: 'hash',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-contr... | JavaScript | 0 | @@ -1132,16 +1132,55 @@
ion') %7B%0A
+ ENV.rootURL = '/ember-swagger-ui/';
%0A %7D%0A%0A
|
3eed5751ab2594d231f56e28e647f09d38baef59 | fix gh-pages base path | tests/dummy/config/environment.js | tests/dummy/config/environment.js | /* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-contr... | JavaScript | 0.00001 | @@ -1071,16 +1071,17 @@
ber-grid
+/
'%0A %7D%0A%0A
|
b66515d5d84aeb9a694b0ea3a09749089e4650a7 | Update XMLHttpSource.js | src/XMLHttpSource.js | src/XMLHttpSource.js | 'use strict';
var falcor = require('falcor');
var request = require('./request');
var buildQueryObject = require('./buildQueryObject');
var isArray = Array.isArray;
function simpleExtend(obj, obj2) {
var prop;
for (prop in obj2) {
obj[prop] = obj2[prop];
}
return obj;
}
function XMLHttpSource(jsongUrl, c... | JavaScript | 0 | @@ -1416,32 +1416,111 @@
this._config);%0A
+ config.headers%5B%22Content-Type%22%5D = %22application/x-www-form-urlencoded%22;%0A %0A
// pass cont
@@ -2394,32 +2394,111 @@
this._config);%0A
+ config.headers%5B%22Content-Type%22%5D = %22application/x-www-form-urlencoded%22;%0A %0A
// pass cont
|
4ed386da8269875aeb4cb8aa023fbc36ca1fb60b | correct error handling | modules/background/api/configHelper.js | modules/background/api/configHelper.js | import Promise from 'bluebird';
import path from 'path';
let fs = Promise.promisifyAll(require('fs'));
const configHelper = () => {
let config = 'config/app_configuration.min.JSON'
let innerRepresentation;
const getData = () => {
if(!innerRepresentation || innerRepresentation.changed) {
return fs.re... | JavaScript | 0.000003 | @@ -2478,28 +2478,36 @@
catch(err =%3E
+ %7Bthrow
err
+%7D
);%0A%0A const
|
80f3a2ed5b94b6e7ccc5b656b78834a683f8331f | fix shebang, add shebangless wrapping | external/amber-dev/lib/helpers.js | external/amber-dev/lib/helpers.js | exports.libPath = __dirname;
exports.nodeWrap = function (id) {
var wrapSource = JSON.stringify('_wrap_' + id),
idSource = JSON.stringify(id);
return {
start: "#!/usr/bin/env/node\n" +
"(function(define){\n" +
"define(" + wrapSource + ", function (require) {\n",
end: "re... | JavaScript | 0 | @@ -39,12 +39,237 @@
node
-Wrap
+Shebang = %22#!/usr/bin/env node%22;%0A%0Aexports.nodeWrap = function (id) %7B%0A var wrap = exports.nodeWrapWithoutShebang(id);%0A wrap.start = exports.nodeShebang + %22%5Cn%22 + wrap.start;%0A return wrap;%0A%7D;%0A%0Aexports.nodeWrapWithoutShebang
= f
@@ -387,16 +387,16 @... |
2e3032bd18a0d9b1a35e108feda78a2f0da0113a | add types to Schedule | modules/gob-object-student/schedule.js | modules/gob-object-student/schedule.js | import isString from 'lodash/isString'
import uuid from 'uuid/v4'
import {randomChar} from '@gob/lib'
export function Schedule(data = {}) {
const baseSchedule = {
id: uuid(),
active: false,
index: 1,
title: `Schedule ${randomChar().toUpperCase()}`,
clbids: [],
year: 0,
semester: 0,
metadata: {},
}... | JavaScript | 0 | @@ -100,43 +100,429 @@
b'%0A%0A
-export function Schedule(data = %7B%7D)
+type ScheduleType = %7B%0A%09id: string,%0A%09active: boolean,%0A%09index: number,%0A%09title: string,%0A%09clbids: Array%3Cstring%3E,%0A%09year: number,%0A%09semester: number,%0A%09metadata: Object,%0A%7D%0A%0Atype InputSchedule = %7B%0A%09id: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.