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 |
|---|---|---|---|---|---|---|---|
70ab2782beb1065d4845604a7e2507895680fb7b | fix algo | src/objects/Room.js | src/objects/Room.js | import { SpriteWidth, SpriteHeight, SpriteRatioX, SpriteRatioY } from "../Constants.js";
import { Wall } from "../SpriteConstants";
class Room extends Phaser.Group {
constructor(game, parent, name) {
super(game, parent, name, false, false, Phaser.Physics.ARCADE);
let sprite = this.create(100, 30, Wall);
... | JavaScript | 0.998381 | @@ -269,105 +269,8 @@
E);%0A
- let sprite = this.create(100, 30, Wall);%0A sprite.scale.setTo(SpriteRatioX, SpriteRatioY);%0A
%7D%0A
@@ -468,94 +468,41 @@
p =
-Math.trunc((x2-x1) / SpriteWidth);%0A const yStep = Math.trunc((y2-y1) / SpriteHeight
+(x2-x1);%0A const yStep = (y2-y1
);%0A%0A
@@ -516,32 +... |
e6ec50e8841f259ae08b2c3a1a415a95f9e4f504 | add space between terms for readability | static-text/research-static-text.js | static-text/research-static-text.js | module.exports = {
"research.brazilian_data_set_link": "Dataset on Brazilian Participatory Budgeting: 1989 to 2012",
"research.data_repository.header": "Data Repository",
"research.data_repository.p1": "A great deal of research on democratic innovations is not publicly available. This includes large datasets, gra... | JavaScript | 0.041028 | @@ -112,16 +112,17 @@
2012%22,%0A
+%0A
%22resea
@@ -165,24 +165,25 @@
epository%22,%0A
+%0A
%22research.
@@ -467,24 +467,25 @@
pository.%22,%0A
+%0A
%22research.
@@ -505,16 +505,17 @@
earch%22,%0A
+%0A
%22resea
@@ -554,16 +554,17 @@
ology%22,%0A
+%0A
%22resea
@@ -823,24 +823,25 @@
n source.%22,%0A... |
5ba3d8eaefcc2281c8a400b1113413301917b526 | Remove unnecessary watch on less task. | build/configs/watch.js | build/configs/watch.js | module.exports = function (grunt) {
var src = 'src/{*,**/*}.{js,less}';
var test = 'test/{*,**/*}.{js,less}';
return {
dist: {
files: [src],
tasks: ['less:dist', 'shell:dist', 'uglify:dist']
},
test: {
files: [src, test],
tasks: ['shell:test']
}
};
};
| JavaScript | 0 | @@ -169,21 +169,8 @@
s: %5B
-'less:dist',
'she
|
2cd537015cf112ab3b206e24dd8d30176075ae2a | use platform variable in the app name | bin/package.js | bin/package.js | #!/usr/bin/env node
var path = require('path');
var packager = require('electron-packager');
var rimraf = require('rimraf');
var shell = require('shelljs');
var packageJson = require('./../package.json');
var productName = packageJson.productName;
var appVersion = packageJson.version;
var electronVersion = packageJso... | JavaScript | 0.000001 | @@ -2168,22 +2168,28 @@
ion + '-
-win32'
+' + platform
;%0A var
|
3ad9b386b872413462be1bcc04a7031a098b9a3f | Update Premium page to point to the buttons | src/Interface/Premium/LoginPanel.js | src/Interface/Premium/LoginPanel.js | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { CSSTransitionGroup } from 'react-transition-group';
import Textfit from 'react-textfit';
import PatreonIcon from 'Interface/Icons/PatreonTiny';
import GitHubMarkIcon from 'Interface/Icons/GitHubMarkLarge';
im... | JavaScript | 0 | @@ -5129,16 +5129,40 @@
account
+ using the buttons below
.%0A
|
470f06de4c42fad23b9a30084095f6cc98a1eafe | Change order of middlewares. #154 | src/redux/create.js | src/redux/create.js | import { createStore, combineReducers, applyMiddleware, compose } from 'redux'
import createMiddleware from './clientMiddleware'
import thunk from 'redux-thunk'
export default function createApiClientStore(client, initialState) {
const middleware = createMiddleware(client)
let finalCreateStore
if (__DEVELOPMENT_... | JavaScript | 0.000001 | @@ -463,34 +463,29 @@
yMiddleware(
-middleware
+thunk
),%0A app
@@ -489,37 +489,42 @@
applyMiddleware(
-thunk
+middleware
),%0A devTool
@@ -687,34 +687,29 @@
yMiddleware(
-middleware
+thunk
),%0A app
@@ -721,21 +721,26 @@
dleware(
-thunk
+middleware
)%0A )(
|
b1e5d1145c23a44404221a70111698478466ac56 | add "documentation" instead of empty comments | app/assets/javascripts/fae/mobilemenu.js | app/assets/javascripts/fae/mobilemenu.js | var MobileMenu = {
mobile_container: "#main_nav",
trigger_selector: "#main_nav-menu_button",
header_selector: ".main_nav-header",
sub_header_selector: ".main_nav-sub-header-mobile",
sub_header_section_selector: ".main_nav-sub-nav",
toggle_class: "js-menu-active",
toggle_level_class: "js-menu-level-active"... | JavaScript | 0.000001 | @@ -1798,16 +1798,35 @@
//
+Add JS toggle class
%0A
@@ -1866,24 +1866,102 @@
el_class);%0A%0A
+ // If the element does not have sublinks, then go to the desired page%0A
if (
|
0b36c6109e9a96403d6c779c56c1b1482df0a48f | Add reaction while fetching logs | app/assets/javascripts/vue/fluent_log.js | app/assets/javascripts/vue/fluent_log.js | (function(){
"use strict";
$(function(){
if($('#fluent-log').length === 0) return;
new Vue({
el: "#fluent-log",
paramAttributes: ["logUrl"],
data: {
"autoFetch": false,
"logs": [],
"limit": 30
},
created: function(){
this.fetchLogs();
... | JavaScript | 0.000001 | @@ -241,16 +241,45 @@
mit%22: 30
+,%0A %22processing%22: false
%0A %7D
@@ -794,24 +794,96 @@
unction() %7B%0A
+ if(this.processing) return;%0A this.processing = true;%0A
va
@@ -1094,16 +1094,152 @@
= logs;%0A
+ setTimeout(function()%7B%0A self.process... |
e3f1002f908b94e55650580a9577408f879d4b8e | fix linting | bin/webpack.js | bin/webpack.js | #!/usr/bin/env node
let webpackCliInstalled = false;
try {
require.resolve("webpack-cli");
webpackCliInstalled = true;
} catch(e) {
webpackCliInstalled = false;
}
if(webpackCliInstalled) {
require("webpack-cli"); // eslint-disable-line node/no-unpublished-require
} else {
console.error("The CLI moved into a sepa... | JavaScript | 0.000003 | @@ -211,17 +211,17 @@
k-cli%22);
-
+%09
// eslin
@@ -234,16 +234,69 @@
ble-line
+ node/no-missing-require, node/no-extraneous-require,
node/no
|
fb6fa0c6312d8aeb9cc00f7dde8fb7c372f25a5f | Reorder properties for readability [skip ci] | app/components/keyboard-select-picker.js | app/components/keyboard-select-picker.js | import Ember from 'ember';
import SelectPicker from './select-picker';
import KeyboardShortcutsMixin from 'ember-keyboard-shortcuts/mixins/component';
var KeyboardSelectPickerComponent = SelectPicker.extend(
KeyboardShortcutsMixin, {
layoutName: 'components/select-picker',
nativeMobile: true,
activeCursor: ... | JavaScript | 0 | @@ -380,16 +380,386 @@
ker'%5D,%0A%0A
+ groupedContentList: Ember.computed(%0A 'groupedContentListWithoutActive', 'activeIndex',%0A function() %7B%0A var activeIndex = this.get('activeIndex');%0A var result = Ember.A(this.get('groupedContentListWithoutActive'));%0A result.forEach(function(item, i... |
c779d856751813c185f4cde518d90d4423828c86 | use username when no display name available | app/controllers/userController.client.js | app/controllers/userController.client.js | 'use strict';
(function () {
var profileId = document.querySelector('#profile-id') || null;
var profileUsername = document.querySelector('#profile-username') || null;
var profileRepos = document.querySelector('#profile-repos') || null;
var displayName = document.querySelector('#display-name');
var apiU... | JavaScript | 0.000002 | @@ -574,24 +574,72 @@
rse(data);%0A%0A
+ if (userObject.displayName !== null) %7B%0A
update
@@ -690,16 +690,104 @@
yName');
+%0A %7D else %7B%0A updateHtmlElement(userObject, displayName, 'username');%0A %7D
%0A%0A
|
ba28ecb2247a0af16afe7aae8be94c0fb257ad9c | remove logs | src/schema/index.js | src/schema/index.js | import Joi from 'joi'
const contactSchema = Joi.object().keys({
name: Joi.string(),
email: Joi.string().email()
})
const alarmSchema = Joi.object().keys({
action: Joi.string().regex(/audio|display|email/).required(),
trigger: Joi.array().required(),
description: Joi.string(),
duration: Joi.array(),
repe... | JavaScript | 0.000001 | @@ -1191,56 +1191,8 @@
ma)%0A
- // console.log(error)%0A // console.log(value)%0A
re
|
aa36194eb06daf5a2e62108993ed90fb836de4b3 | Fix broken test | packages/ember-runtime/tests/suites/array/lastIndexOf.js | packages/ember-runtime/tests/suites/array/lastIndexOf.js | import { SuiteModuleBuilder } from '../suite';
const suite = SuiteModuleBuilder.create();
suite.module('lastIndexOf');
suite.test('should return index of object\'s last occurrence', function() {
let expected = this.newFixture(3);
let obj = this.newObject(expected);
let len = 3;
for (let idx = 0; i... | JavaScript | 0 | @@ -1,8 +1,43 @@
+import %7B get %7D from 'ember-metal';%0A
import %7B
@@ -1667,26 +1667,34 @@
Of(foo,
-obj.
+get(obj, '
length
+')
), -1, '
@@ -1952,18 +1952,26 @@
oo,
-obj.
+get(obj, '
length
+')
+ 1
|
4144d94c5ea9197c9221106c4a0377d4c37a548a | Add papix | src/scripts/dark.js | src/scripts/dark.js | // Description:
// misc
//
// Commands:
// hubot poem - オサレポエム
// hubot 炎上 <text> <text> - ババーン
// なんだと・・・
// hubot goma - やればわかる
// hubot isao - やればわかる
//
"use strict"
const uuid = require("node-uuid");
const json = require('../../settings/poems.json')
const Levenshtein = require("levenshtein");
const g... | JavaScript | 0.999478 | @@ -2118,10 +2118,339 @@
%7D)%0A%0A
+ robot.respond(/PAPIX$/i, (res) =%3E %7B%0A const req = robot.http(%22https://ngineerxiv-dark.appspot.com/api/v1/kusokora%22).get();%0A req((err, response, body) =%3E %7B%0A err && hubot.logger.error(err);%0A const json = JSON.parse(body);... |
ef23b046942b23c0a580cd82ea890e32df8cc756 | Refresh challenges on answer. | static/js/controllers/challenges.js | static/js/controllers/challenges.js | /**
* Copyright 2014 David Tomaschik <david@systemoverlord.com>
*
* 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... | JavaScript | 0 | @@ -1996,16 +1996,314 @@
ors();%0A%0A
+ var refresh = function(cid) %7B%0A categoryService.get(%7Bcid: cid%7D,%0A function(cat) %7B%0A $scope.category = cat;%0A $scope.category.answers = %7B%7D;%0A $scope.challenges = cat.challenges;%0A loading... |
1ffe4052e64d3f9db498e7a00b6ae2c93c714d25 | update files | static/js/terminal/lib/blankLine.js | static/js/terminal/lib/blankLine.js | /**
* Created by nuintun on 2015/11/24.
*/
'use strict';
module.exports = function (Terminal){
Terminal.prototype.blankLine = function (cur){
var attr = cur ? this.curAttr : this.defAttr;
var ch = [attr, ' '];
var line = [];
var i = 0;
for (; i < this.cols; i++) {
line[i] = ch;
}
... | JavaScript | 0.000001 | @@ -212,17 +212,16 @@
%5Battr, '
-
'%5D;%0A
|
fb38cc629f041bd2db5b6a6118e84c7c8c39ab6f | Empty fields should say N/A | src/app/views/map/building_layer.js | src/app/views/map/building_layer.js | define([
'jquery',
'underscore',
'backbone',
'collections/city_buildings',
'models/building_color_bucket_calculator',
'text!templates/map/building_info.html'
], function($, _, Backbone, CityBuildings, BuildingColorBucketCalculator, BuildingInfoTemplate){
var baseCartoCSS = [
'{marker-fill: #CCC;' +
... | JavaScript | 0.997976 | @@ -1864,16 +1864,25 @@
d.field)
+ %7C%7C 'N/A'
%0A %7D
|
e6c71bd5d41b51ac60b31a25d968e230018bb67b | add category | vanilla-react/image-generator/index.js | vanilla-react/image-generator/index.js | let state = {
category: '',
filter: '',
size: {w: 640, h: 480}
};
onPageLoad();
function setState(newState) {
Object.assign(state, newState);
render(state);
}
function render(state) {
document.querySelector('#root').innerHTML = App(state);
}
function onPageLoad() {
setState({category: 'people'});
}
f... | JavaScript | 0.001148 | @@ -446,103 +446,136 @@
ion
-App(state) %7B%0A let url = %60https://placeimg.com/$%7Bstate.size.w%7D/$%7Bstate.size.h%7D/$%7Bs
+onCategoryChange(event) %7B%0A let select = event.target;%0A let option = select.options%5Bselect.selectedIndex%5D;%0A setS
tate
-.
+(%7B
category
%7D$%7Bs
@@ -574,48 +574,50 @@
gory... |
60cca3e2ad78b88866a7f512a4609c34558622a4 | Improve label | view/components/incomplete-form-nav.js | view/components/incomplete-form-nav.js | // Draw list of not completed sections and their missing fields.
'use strict';
var db = require('mano').db
, _ = require('mano').i18n.bind('Incomplete Sections Navigation')
, headersMap = require('../utils/headers-map');
var getPropertyLabel = function (formSection, propertyName) {
return JSON.... | JavaScript | 0.093239 | @@ -1700,16 +1700,20 @@
bel %7D%5C%22_
+ sub
section
|
6891d2cde7c30d4c739c5bcf08c7892511e1c121 | Update shadow.class.js | src/shadow.class.js | src/shadow.class.js | (function(global) {
'use strict';
var fabric = global.fabric || (global.fabric = { }),
toFixed = fabric.util.toFixed;
if (fabric.Shadow) {
fabric.warn('fabric.Shadow is already defined.');
return;
}
/**
* Shadow class
* @class fabric.Shadow
* @see {@link http://fabricjs.com/shadows/... | JavaScript | 0.000001 | @@ -3490,24 +3490,139 @@
OX;%0A %7D%0A
+ if (object.flipX) %7B%0A offset.x *= -1;%0A %7D%0A if (object.flipY) %7B%0A offset.y *= -1;%0A %7D
%0A retur
|
15f193fca7bb00f113c8eb21210f2163a656d513 | Remove unused variable. | commands/branches.js | commands/branches.js | var ch = require('../src/CmdHelper');
var _ = require('lodash');
module.exports = {
name: 'branches',
description: 'Checks git local branch name across all services',
usage: '[-r <repoPattern>]',
};
function cmd(bosco) {
bosco.log('Running \'git rev-parse --abbrev-ref HEAD\' across all matching repos ...');
... | JavaScript | 0.000001 | @@ -34,35 +34,8 @@
r');
-%0Avar _ = require('lodash');
%0A%0Amo
|
a0d31ad0341180695456fa4574eccd15f8e40f1d | make the branch name cyan | commands/branches.js | commands/branches.js | var ch = require('../src/CmdHelper');
var _ = require('lodash');
module.exports = {
name: 'branches',
description: 'Checks git branch list across all services',
usage: '[-r <repoPattern>]',
};
function cmd(bosco) {
bosco.log('Running \'git branch --list\' across all matching repos ...');
var options = ch.c... | JavaScript | 0.999996 | @@ -903,16 +903,21 @@
veBranch
+.cyan
+ '%5C'')
|
54b9597c9a01ed7904d0b9ed12cb46cbe211e7b8 | Add a note about keeping unused component for later reference | packages/@sanity/desk-tool/src/components/Diff.js | packages/@sanity/desk-tool/src/components/Diff.js | import PropTypes from 'prop-types'
import React from 'react'
import {diffJson} from 'diff'
import styles from './styles/Diff.css'
function getDiffStatKey(part) {
if (part.added) {
return 'added'
}
if (part.removed) {
return 'removed'
}
return 'neutral'
}
export default class Diff extends React.PureC... | JavaScript | 0 | @@ -1,12 +1,124 @@
+/**%0A *%0A *%0A *%0A *%0A *%0A *%0A *%0A * HEADSUP: This is not in use, but keep for later reference%0A *%0A *%0A *%0A *%0A *%0A *%0A *%0A */%0A
import PropT
|
be03ae2dcf2e691abab5ef8f472f48718cadc8a2 | use chai-enzyme to make tests more robust | packages/beaut-ui-range-slider/test/label-test.js | packages/beaut-ui-range-slider/test/label-test.js | import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import Label from '../src/components/label';
describe('<Label />', () => {
it('renders an SVG text node', () => {
const wrapper = shallow(<Label anchor="start" position={{ x: 5 }} value={25} />);
expect(wrapper.find(... | JavaScript | 0 | @@ -26,16 +26,22 @@
;%0Aimport
+ chai,
%7B expec
@@ -90,16 +90,79 @@
enzyme';
+%0Aimport chaiEnzyme from 'chai-enzyme';%0A%0Achai.use(chaiEnzyme());
%0A%0Aimport
@@ -338,16 +338,22 @@
=%7B%7B x: 5
+, y: 0
%7D%7D valu
@@ -511,32 +511,39 @@
apper = shallow(
+%0A
%3CLabel anchor=%22s
@@ -557,32 +557,38 @@
... |
ce5ea11e8d3f88a819d779c14a07746135d5d471 | Fix matching style file of containg `modules` | build/utils.js | build/utils.js | var path = require('path')
var fs = require('fs')
var config = require('../config')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
exports.assetsPath = function (_path) {
var assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDir... | JavaScript | 0 | @@ -2165,10 +2165,14 @@
xp('
-%5B
%5E
+(?!.*
%5C%5C.m
@@ -2177,17 +2177,19 @@
.modules
-%5D
+).*
%5C%5C.' + e
|
fa47fd5c3fdc974656206dcad3b9dd11b4583d6d | allow passing down className to Button | packages/button/src/presenters/ButtonPresenter.js | packages/button/src/presenters/ButtonPresenter.js | import React, { Component } from "react";
import PropTypes from "prop-types";
import { css } from "emotion";
import { ThemeContext } from "@hig/theme-context";
import stylesheet from "./stylesheet";
import {
availableTargets,
availableTypes,
availableWidths
} from "../constants";
export default class ButtonPre... | JavaScript | 0.000012 | @@ -79,16 +79,20 @@
import %7B
+ cx,
css %7D f
@@ -1311,16 +1311,55 @@
props;%0A%0A
+ const %7B className %7D = otherProps;%0A%0A
cons
@@ -1386,16 +1386,16 @@
efined;%0A
-
cons
@@ -1822,16 +1822,46 @@
Wrapper%0A
+ %7B...otherProps%7D%0A
@@ -1869,32 +1869,35 @@
className=%... |
0426de4f14008656939711c7a4574f9836fbae7f | Update training.js | commands/training.js | commands/training.js | const Discord = require('discord.js');
exports.run = (client, message) => {
const modlog = client.channels.find('name', 'pie-log');
const anno2 = client.channels.find('name', 'trainings');
let say = message.content.split(" ").join(" ").slice(6)
if (say.length < 1) return message.reply('Please specify on what I have... | JavaScript | 0 | @@ -1096,16 +1096,23 @@
iases: %5B
+%22tanno%22
%5D,%0ApermL
|
7056349a0780382b7ef5b8b221466f1ffdb3ced4 | Refactor render function slightly | src/styleManager.js | src/styleManager.js | import jssVendorPrefixer from 'jss-vendor-prefixer';
import { find, findIndex } from './utils';
const prefixRule = jssVendorPrefixer();
/**
* styleManager module. Used to create styleManager objects.
*
* @module styleManager
*/
/**
* Creates a new styleManager
*
* @param {Object} config -... | JavaScript | 0 | @@ -1342,26 +1342,31 @@
-let mapping
+const index
= find
+Index
(she
@@ -1365,32 +1365,38 @@
ndex(sheetMap, %7B
+ name:
styleSheet %7D);%0A
@@ -1382,32 +1382,37 @@
name: styleSheet
+.name
%7D);%0A%0A if (!m
@@ -1413,270 +1413,678 @@
if (
-!mapping) %7B%0A const %7B name, createRules, options %7D... |
72c5b7255489c8b1aad0137fa44ebfb7344e9cbd | Remove stale FIXME | details.js | details.js | import {black, white} from './colors.js'
import {revive} from './reviver.js'
import {assert, zip} from './util.js'
function setColors({style}, color, background) {
if (color && style.color != color) {
style.color = color
}
if (background && style.background != background) {
style.background = background
... | JavaScript | 0.000004 | @@ -3006,65 +3006,4 @@
%7D%0A%7D%0A
-%0A// FIXME: Display grid, repeat 4, ID metrics, right aligned%0A
|
63768665f0a37037f5c66ab9e68e06c42ebc1191 | Fix linter errors | lib/assets/core/javascripts/cartodb3/data/widget-definitions-collection.js | lib/assets/core/javascripts/cartodb3/data/widget-definitions-collection.js | var Backbone = require('backbone');
var _ = require('underscore');
var WidgetDefinitionModel = require('./widget-definition-model');
var checkAndBuildOpts = require('../helpers/required-opts');
var REQUIRED_OPTS = [
'configModel',
'mapId',
'layerDefinitionsCollection',
'analysisDefinitionNodesCollection'
];
/... | JavaScript | 0.000021 | @@ -3809,24 +3809,26 @@
ies':%0A
+
return %5B'bin
|
377eb70099db321b36d7c5de67688c797e7e7867 | Fix linter errors | lib/assets/core/test/spec/cartodb3/helpers/fetch-all-query-objects.spec.js | lib/assets/core/test/spec/cartodb3/helpers/fetch-all-query-objects.spec.js | var Backbone = require('Backbone');
var fetchAllQueryObjectsIfNecessary = require('../../../../javascripts/cartodb3/helpers/fetch-all-query-objects');
describe('helpers/fetch-all-query-objects', function () {
describe('repeated errors', function () {
beforeEach(function () {
jasmine.Ajax.install();
j... | JavaScript | 0.000021 | @@ -370,16 +370,18 @@
)%0A
+
.andRetu
|
d23d04158aecbf7227bc3a6dfb599719f068c420 | edit feature: editormodel | lib/assets/javascripts/cartodb3/editor/layers/edit-feature-content-view.js | lib/assets/javascripts/cartodb3/editor/layers/edit-feature-content-view.js | var _ = require('underscore');
var $ = require('jquery');
var CoreView = require('backbone/core-view');
var template = require('./edit-feature-content.tpl');
var EditFeatureActionView = require('./edit-feature-content-views/edit-feature-action-view');
var EditFeatureControlView = require('./edit-feature-content-views/e... | JavaScript | 0.000003 | @@ -1596,16 +1596,74 @@
= '';%0A%0A
+ this._editorModel.set(%7B%0A edition: false%0A %7D);%0A%0A
this
|
e32e675b1e217a5771b975ff85c1e4f17daa9571 | Update benchmark | lib/node_modules/@stdlib/strided/base/unary/benchmark/benchmark.ndarray.js | lib/node_modules/@stdlib/strided/base/unary/benchmark/benchmark.ndarray.js | /**
* @license Apache-2.0
*
* Copyright (c) 2020 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.000001 | @@ -685,21 +685,31 @@
);%0Avar
-randu
+discreteUniform
= requi
@@ -737,16 +737,35 @@
ase/
-randu' )
+discrete-uniform' ).factory
;%0Ava
@@ -878,66 +878,8 @@
);%0A
-var round = require( '@stdlib/math/base/special/round' );%0A
var
@@ -934,24 +934,24 @@
dentity' );%0A
-
var filledar
@@ -987,24 +987,82 @@
/fi... |
054242dd06e4676cdb6a3def31cb5e2c42f7bdc9 | fix gulp init src path | buildsys/tasks/init.js | buildsys/tasks/init.js | /**
* ./buildsys/tasks/init.js
* @author Keenan Staffieri
* ------------------------------------
* TASK: Init
* 'gulp init'
*/
/* $ gulp init */
gulp.task('init', function () {
// return gulp.src('./node_modules/holly-craft/templates/src/**/*')
return gulp.src('./templates/src/**/*')
.pipe(gulp.dest(conf... | JavaScript | 0.000001 | @@ -182,11 +182,8 @@
%7B%0A
- //
ret
@@ -248,50 +248,8 @@
*')%0A
- return gulp.src('./templates/src/**/*')%0A
|
1f22875259343aebc04c9fe2bb8dc5d201d3e97d | simplify plugin components registration | components/plugin.js | components/plugin.js | export default function (components) {
let map = Object.values(components).reduce( (result, component) => {
return Object.assign(result, { [component.name]: component })
}, {})
return {
install: (vm) => {
for (let key in map) {
vm.component(key, map[key])
}
},
components: ma... | JavaScript | 0.000013 | @@ -37,253 +37,165 @@
%7B %0A
-%0A
-let map = Object.values(components).reduce( (result, component) =%3E %7B%0A return Object.assign(result, %7B %5Bcomponent.name%5D: component %7D)%0A %7D, %7B%7D)%0A%0A return %7B%0A install: (vm) =%3E %7B%0A for (let key in map) %7B%0A vm.component(key, map%... |
220a50f22452fc4128d98c91722e4506b60e5673 | fix bug in login analytics tracking | src/ui/LoginPage.js | src/ui/LoginPage.js | /** @jsx React.DOM */
var Button = require('react-bootstrap').Button;
var Link = require('react-router').Link;
var React = require('react');
var LoginPage = React.createClass({
getInitialState: function() {
return {
message: "",
messageType: ""
}
},
handleFBLogin: function() {
this.setS... | JavaScript | 0 | @@ -503,35 +503,24 @@
nSuccess', %7B
-error:error
%7D);%0A
|
47f7a6935639d99ad86bf30a10f47d753535eacf | Improve filtering method | App/Components/LatestRepos.js | App/Components/LatestRepos.js | 'use strict';
var React = require('react-native');
var _ = require('underscore');
var Api = require('../Utils/Api');
var AuthStore = require('../Stores/Auth');
var Loading = require('./Loading');
var RepoItem = require('./RepoItem');
var {
StyleSheet,
View,
ListView,
SegmentedControlIOS
} = React;
var Lates... | JavaScript | 0.000064 | @@ -1464,42 +1464,8 @@
) %7B%0A
- console.log(res.repos);%0A
@@ -1820,32 +1820,27 @@
%7D,%0A%0A
-_onSegmentChange
+filterRepos
: functi
@@ -1843,29 +1843,29 @@
nction (
-value
+isPro
) %7B%0A
switch(v
@@ -1860,61 +1860,85 @@
-switch(value) %7B%0A case 'Open Source':%0A
+var fi... |
bd81f986485521a439ebaf566c06530e30b8470c | Format with prettier | src/utils/logger.js | src/utils/logger.js | const chalk = require('chalk');
const emoji = require('node-emoji')
const clear = () => {
process.stdout.write('\u001B[2J\u001B[0;0f');
};
const printLogo = (enchance = chalk.blue) => {
console.log(enchance(
' _ _\n'
+ '| |__ __ _ _ _| |\n'
+ '| \'_ \\ / _\` | | | | |\n'
+ '|... | JavaScript | 0.000001 | @@ -19,15 +19,15 @@
ire(
-'
+%22
chalk
-'
+%22
);%0Ac
@@ -47,17 +47,17 @@
require(
-'
+%22
node-emo
@@ -58,18 +58,19 @@
de-emoji
-')
+%22);
%0A%0Aconst
@@ -108,17 +108,17 @@
t.write(
-'
+%22
%5Cu001B%5B2
@@ -129,17 +129,17 @@
01B%5B0;0f
-'
+%22
);%0A%7D;%0A%0Ac
@@ -198,16 +198,21 @@
ole.log(
+%0A
ench... |
d0d5d7ebc9c17c50f682b06dd1319c855e4e5944 | Fix timestamps and durations. | src/utils/timing.js | src/utils/timing.js | /* @flow */
import type { TimingItemType } from '../types';
const timingMap: { [string]: number } = {};
const log: TimingItemType[] = [];
const now = (): number =>
typeof performance !== 'undefined' ? performance.now() : Date.now() / 1000;
const add = (item: TimingItemType) => {
log.push(item);
};
const start =... | JavaScript | 0.000179 | @@ -137,113 +137,8 @@
%5D;%0A%0A
-const now = (): number =%3E%0A typeof performance !== 'undefined' ? performance.now() : Date.now() / 1000;%0A%0A
cons
@@ -173,16 +173,16 @@
e) =%3E %7B%0A
+
log.pu
@@ -247,16 +247,21 @@
%5Bkey%5D =
+Date.
now();%0A%7D
@@ -374,16 +374,16 @@
p%5Bkey%5D,%0A
-
en
@@ -385,... |
30b64d736fc1b44e4d2bdaad78112551bff375ce | Remove group timers. | src/utils/timing.js | src/utils/timing.js | /* @flow */
import type { TimingItemType } from '../types';
const timingMap: { [string]: number } = {};
const countMap: { [string]: number } = {};
const log: TimingItemType[] = [];
const now = (): number =>
typeof performance !== 'undefined' ? performance.now() : Date.now() / 1000;
const add = (item: TimingItemTyp... | JavaScript | 0.000003 | @@ -102,51 +102,8 @@
%7B%7D;%0A
-const countMap: %7B %5Bstring%5D: number %7D = %7B%7D;%0A
cons
@@ -367,158 +367,8 @@
%7D;%0A%0A
-const startGroup = (key: string) =%3E %7B%0A timingMap%5Bkey%5D = now();%0A if (countMap%5Bkey%5D) %7B%0A countMap%5Bkey%5D++;%0A %7D else %7B%0A countMap%5Bkey%5D = 1;%0A %7D%0... |
20f770efee1906c7f33d1093b60f492f2120663c | implement gestureHandling | Kwc/Advanced/GoogleMapView/Component.defer.js | Kwc/Advanced/GoogleMapView/Component.defer.js | var $ = require('jQuery');
var onReady = require('kwf/on-ready');
var gmapLoader = require('kwf/google-map/loader');
var gmapMap = require('kwf/google-map/map');
var renderMap = function(el) {
var cfg = el.find(".options", true);
if (!cfg.length) return;
cfg = $.parseJSON(cfg.val());
var text = el.fi... | JavaScript | 0 | @@ -187,17 +187,16 @@
n(el) %7B%0A
-%0A
var
@@ -1817,12 +1817,414 @@
%7D);%0A%7D);%0A
+%0AonReady.onResize('.kwcClass', function (el) %7B%0A if (el.hasClass('optimizedMobileUI')) %7B%0A var map = el.data('gmapObject');%0A if (map && map.gmap) %7B // gmap will be set once it's rendered%0A ... |
1c74353b8c666fc9d50dced8b8ef1ee37818581f | update user profile data after linking account | examples/client/controllers/profile.js | examples/client/controllers/profile.js | angular.module('MyApp')
.controller('ProfileCtrl', function($scope, $auth, $alert, Account) {
/**
* Get user's profile information.
*/
$scope.getProfile = function() {
Account.getProfile()
.success(function(data) {
$scope.user = data;
})
.error(function() {
... | JavaScript | 0 | @@ -1291,32 +1291,101 @@
%7D);%0A %7D)%0A
+ .then(function() %7B%0A $scope.getProfile();%0A %7D)%0A
.catch(f
|
a7aca81f8e578b703c813aeaf7658a6546fb66b8 | Fix broken solution for iterator_for_of. | exercises/iterator_for_of/solution/solution.js | exercises/iterator_for_of/solution/solution.js | const max = process.argv[2];
let FizzBuzz = {
[Symbol.iterator]() {
let num = 1;
return {
next() {
let value = num;
if (value % 15 === 0) {
value = 'FizzBuzz';
} else if (value % 3 === 0) {
value = 'Fizz';
} else if (value % 5 === 0) {
value ... | JavaScript | 0 | @@ -5,16 +5,17 @@
t max =
++
process.
@@ -105,24 +105,92 @@
next() %7B%0A
+ if (num %3E max) %7B%0A return %7B done: true %7D;%0A %7D%0A
let
@@ -414,23 +414,21 @@
-if (num %3C= max)
+num++;%0A
re
@@ -467,54 +467,8 @@
%7D;%0A
- num++;%0A return %7B d... |
9e625f42488260f19d7a1af768b0312bfdc17e6c | fix weight accumulation. | examples/js/postprocessing/MSAAPass.js | examples/js/postprocessing/MSAAPass.js | /**
* @author bhouston / http://clara.io/ *
*/
THREE.MSAAPass = function ( scene, camera, params ) {
this.scene = scene;
this.camera = camera;
this.sampleLevel = 4; // specified as n, where the number of samples is 2^n, so sampleLevel = 4, is 2^4 samples, 16.
this.params = params || { minFilter: THREE.Nea... | JavaScript | 0.000001 | @@ -2918,14 +2918,21 @@
ght
-*
=
-0.5
+1.0 / (i+1)
;%0A%0A
|
166840f8be41671fdbcb53e1c68604d25e7c17e6 | use npmRequestOptions | examples/localmarket/lib/activities.js | examples/localmarket/lib/activities.js | Activities = new Mongo.Collection('activities');
Activities.allow({
insert: function(userId, doc) {
return doc.userId === userId;
}
});
Activities.latest = function() {
return Activities.find({}, {sort: {date: -1}, limit: 1});
}
Meteor.methods({
createActivity: function(activity, tweet, loc) {
check(... | JavaScript | 0.000001 | @@ -979,368 +979,24 @@
%7B%0A
-// Uses the Npm request module directly as provided by the http package%0A%0A if (! HTTPInternals.NpmModules.request.version.match(/%5E2%5C.(%5Cd+)/)) %7B%0A // maybe it doesn't have the same API any more?%0A throw Error(%22http upgraded request to a new major version%22);%0A %... |
9221616ed65400e83269c85aff6f3cc80eb6cf78 | Fix reference to tickCount | packages/vega-schema/src/legend.js | packages/vega-schema/src/legend.js | import {layoutAlign} from './layout';
import {
numberValue, stringValue, colorValue,
alignValue, baselineValue, fontWeightValue,
numberOrSignal, stringOrSignal, arrayOrSignal,
anyOf, allOf, def, enums, object, pattern, required, ref, type,
numberType, stringType
} from './util';
// types defined elsewhere
c... | JavaScript | 0 | @@ -466,19 +466,16 @@
ickCount
-Ref
');%0A%0Acon
|
ff1e852ff55a995de0f546f979fe582aa5555c83 | Update index.js | express-yourself/myapp/routes/index.js | express-yourself/myapp/routes/index.js | var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express yourself' });
});
router.get('/', function(req, res, next) {
res.render('index', {title: 'hi' });
});
module.exports = router;
| JavaScript | 0.000002 | @@ -187,32 +187,37 @@
;%0A%0Arouter.get('/
+nadia
', function(req,
|
bce2bfca6d33ad10c77e815db8265f1ed9286881 | Support globalSetup and globalTeardown Jest options (#5218) | packages/react-scripts/scripts/utils/createJestConfig.js | packages/react-scripts/scripts/utils/createJestConfig.js | // @remove-file-on-eject
/**
* Copyright (c) 2015-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.
*/
'use strict';
const fs = require('fs');
const chalk = require('chalk');
const paths = require('../../config/pat... | JavaScript | 0 | @@ -2442,16 +2442,57 @@
shold',%0A
+ 'globalSetup',%0A 'globalTeardown',%0A
'res
|
b1400107f760f61f88780ae690ba2016a29153ca | fix object type checking fix scenario when input is null | packages/ringcentral-integration/lib/di/utils/is_type.js | packages/ringcentral-integration/lib/di/utils/is_type.js | export function isEmpty(param) {
return !param || param.length === 0;
}
export function isArray(x) {
return Array.isArray
? Array.isArray(x)
: Object.prototype.toString.call(x).slice(8, -1) === 'Array';
}
export function isObject(x) {
return typeof x === 'object' && !isArray(x);
}
export function isFun... | JavaScript | 0.000045 | @@ -255,44 +255,77 @@
urn
-typeof x === 'object' && !isArray(x)
+Object.prototype.toString.call(x).toLowerCase() === '%5Bobject object%5D'
;%0A%7D%0A
|
90403995d86f280ea85d86f62459ac8fcb799024 | fix tests | test/solidity/localsTests/helper.js | test/solidity/localsTests/helper.js | 'use strict'
var localDecoder = require('../../../babelify-src/solidity/localDecoder')
/*
Decode local variable
*/
function decodeLocal (st, index, traceManager, callTree, verifier) {
try {
traceManager.waterfall([
traceManager.getStackAt,
traceManager.getMemoryAt],
index,
function (err... | JavaScript | 0.000001 | @@ -449,16 +449,35 @@
1%5D.value
+, %7B%7D, %7Bstart: 5000%7D
)%0A
|
dc3f7555044dabbeba54e844f2f5bcfc98fadceb | Remove some cruft | test/spec/directives/snap-toggle.js | test/spec/directives/snap-toggle.js | /*global describe, beforeEach, module, jasmine, inject, angular, it, expect, spyOn */
/*jshint node:true, camelcase:false */
'use strict';
describe('Directive: snapToggle', function() {
beforeEach(module('snap'));
var button = '<button snap-toggle>foo</button>'
, rightButton = '<button snap-toggle="right" sn... | JavaScript | 0 | @@ -677,39 +677,32 @@
the left snap',
-inject(
function($compil
@@ -694,24 +694,16 @@
unction(
-$compile
) %7B%0A
@@ -956,25 +956,24 @@
ed();%0A %7D)
-)
;%0A%0A it('s
@@ -1025,23 +1025,16 @@
snap',
-inject(
function
@@ -1034,36 +1034,16 @@
unction(
-$rootScope, $compile
) %7B%0A
@@ -1310,17 +... |
2803b3fecda0be55a7e69a4e0b814ddf66704b2a | Add format info to transfers | test/unit/aggregationFiltersSpec.js | test/unit/aggregationFiltersSpec.js | 'use strict';
describe('AggregationFilters', function() {
var puid_data;
var find_files;
var find_transfers;
var tag_count;
var fmt_91_records = [{
'id': '054a0f2c-79bb-4051-b82b-4b0f14564811',
'title': 'lion.svg',
'type': 'file',
'puid': 'fmt/91',
'size': 5,
'bulk_extractor_reports'... | JavaScript | 0 | @@ -224,24 +224,70 @@
'lion.svg',%0A
+ 'format': 'Scalable Vector Graphics 1.0',%0A
'type':
@@ -286,32 +286,32 @@
'type': 'file',%0A
-
'puid': 'fmt
@@ -476,24 +476,70 @@
uartz.svg',%0A
+ 'format': 'Scalable Vector Graphics 1.0',%0A
'type':
@@ -753,24 +753,49 @@
pearl.png',%0A
+ 'format': '... |
6e604ee5ee1ee855d8bd3c2deaa260bf573218d2 | fixes a typo in "applyAnswers" unit test | test/unit/init/applyAnswers-test.js | test/unit/init/applyAnswers-test.js | const { assert } = require('chai');
const sinon = require('sinon');
const { _applyAnswers: applyAnswers } = require('../../../lib/init');
function createConfig() {
return { _: [], custom: {} };
}
describe('init._applyAnswers()', () => {
const ci = {
appveyor: sinon.spy(),
circleci: sinon.spy(),
tra... | JavaScript | 0.998099 | @@ -1205,32 +1205,210 @@
python');%0A %7D);%0A
+ it('sets the language when not prompted', () =%3E %7B%0A const config = applyAnswers(createConfig(%7B language: 'python' %7D), %7B%7D);%0A assert.equal(config.language, 'python');%0A %7D);%0A
it('sets no re
|
f267bbc9e34282354997720f86f323b76ab47b1d | Update location of bridgedb index file. | test/manual-tests/get-data-sources.js | test/manual-tests/get-data-sources.js | var BridgeDb = require('../index.js');
var bridgeDb1 = BridgeDb({
apiUrlStub: 'http://pointer.ucsf.edu/d3/r/data-sources/bridgedb.php',
dataSourcesUrl:
'http://pointer.ucsf.edu/d3/r/data-sources/bridgedb-datasources.php'
});
//*
bridgeDb1.dataSource.getAll()
.each(function(dataSource) {
console.log('Databas... | JavaScript | 0 | @@ -20,16 +20,19 @@
ire('../
+../
index.js
|
cac0454bbb793e813081520d86d239b8c0906ed9 | use port exposed by docker for browser-sync proxy | app/templates/gulp/tasks/browser-sync.js | app/templates/gulp/tasks/browser-sync.js | const gulp = require('gulp');
//*------------------------------------*\
// BROWSER-SYNC
//*------------------------------------*/
const browserSync = gulp.task('browser-sync', done => {
global.browserSync.init({
proxy: process.env.APACHE_HOSTNAME,
injectchanges: true,
open: true,
notify: false,
... | JavaScript | 0 | @@ -227,35 +227,24 @@
xy:
-process.env.APACHE_HOSTNAME
+'localhost:8080'
,%0A
|
0b260b87bef52e3cc6ce6295fa282ca88b40e2a2 | Update worley-noise.js | src/worley-noise.js | src/worley-noise.js | function WorleyNoise(numPoints) {
this._numPoints = numPoints || 0;
this._init();
}
WorleyNoise.prototype.addPoint = function (x, y) {
this._points[this._numPoints++] = {
x: x,
y: y
};
};
WorleyNoise.prototype.getEuclidean = function (x, y, k) {
return Math.sqrt(this._calculateValu... | JavaScript | 0 | @@ -23,16 +23,22 @@
umPoints
+, seed
) %7B%0A
@@ -71,16 +71,48 @@
s %7C%7C 0;%0A
+ this._seed = seed %7C%7C 10000;%0A
this
@@ -1716,32 +1716,124 @@
mPoints; ++i) %7B%0A
+ var x = Math.sin(i + 1) * this._seed,%0A y = Math.cos(i + 1) * this._seed;%0A
this._po
|
56b6aa03943bf1423b8b305e56bf2215b87e26de | Fix Space spec | test/integration/space-test.js | test/integration/space-test.js | 'use strict';
buster.testCase('Space', {
prepare: function() {
this.timeout = 30e3;
var that = this;
return client.createSpace({
name: 'Space Integration Test'
}, 'contentful').then(function(space) {
that.space = space;
});
},
conclude: function() {
return client.deleteSpace... | JavaScript | 0.000001 | @@ -658,9 +658,9 @@
on,
-1
+2
);%0A
|
aa28c1cd5dd17cf06310001e8f4e216c4ca2317b | fix test | test/integration/test-basic.js | test/integration/test-basic.js | var http = require('http');
var assert = require('assert');
var express = require('express');
var bodyParser = require('body-parser');
var request = require('superagent');
var createSlackEventAdapter = require('../../dist').createSlackEventAdapter;
var errorCodes = require('../../dist').errorCodes;
var helpers = requi... | JavaScript | 0.000002 | @@ -5145,37 +5145,162 @@
r);%0A
+self.adapter.start(self.port)%0A .then(function () %7B%0A done();%0A %7D)%0A .catch(
done
-(
);%0A %7D);
|
a59e872feed4816a9d38e12e0dbdc7f1c8ea8751 | fix jshint | test/spec/services/individuService.js | test/spec/services/individuService.js | 'use strict';
describe('IndividuService', function() {
var service;
beforeEach(function() {
module('ddsApp');
inject(function(IndividuService) {
service = IndividuService;
});
});
describe('function label()', function() {
it('Should return "Vous" if individ... | JavaScript | 0.000002 | @@ -8,16 +8,32 @@
rict';%0A%0A
+/* global _ */%0A%0A
describe
@@ -2882,16 +2882,18 @@
: role %7D
+;
%7D);%0A%0A
|
d4504732f3ddc069e841985e712b6ef8350f498b | Fix test expectations for individuService | test/spec/services/individuService.js | test/spec/services/individuService.js | 'use strict';
describe('IndividuService', function() {
var service;
beforeEach(function() {
module('ddsApp');
inject(function(IndividuService) {
service = IndividuService;
});
});
describe('function label()', function() {
it('Should return "Vous" if individ... | JavaScript | 0.000005 | @@ -1857,24 +1857,26 @@
Be('Retrait%C3%A9
+%C2%B7e
');%0A
@@ -2183,16 +2183,18 @@
%C3%89tudiant
+%C2%B7e
, retrai
@@ -2195,16 +2195,18 @@
retrait%C3%A9
+%C2%B7e
');%0A
|
a088c6e6e780fd1dcc9ada9c9f2c07b4dcdef53e | Migrate RadioButtonIcon to emotion (#26068) | packages/material-ui/src/Radio/RadioButtonIcon.js | packages/material-ui/src/Radio/RadioButtonIcon.js | import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import RadioButtonUncheckedIcon from '../internal/svg-icons/RadioButtonUnchecked';
import RadioButtonCheckedIcon from '../internal/svg-icons/RadioButtonChecked';
import withStyles from '../styles/withStyles';
export const styl... | JavaScript | 0 | @@ -65,33 +65,8 @@
s';%0A
-import clsx from 'clsx';%0A
impo
@@ -230,26 +230,34 @@
%0Aimport
-with
+experimental
Style
-s
+d
from '.
@@ -269,70 +269,87 @@
les/
-with
+experimental
Style
-s
+d
';%0A%0A
-export const styles = (theme) =%3E (%7B%0A root: %7B%0A
+const RadioButtonIconRoot = experimentalStyled('s... |
dc3063df1e4f75a1037c452b6707009854132da5 | Fix dot misalignment in IE11 (#15952) | packages/material-ui/src/Radio/RadioButtonIcon.js | packages/material-ui/src/Radio/RadioButtonIcon.js | import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import RadioButtonUncheckedIcon from '../internal/svg-icons/RadioButtonUnchecked';
import RadioButtonCheckedIcon from '../internal/svg-icons/RadioButtonChecked';
import withStyles from '../styles/withStyles';
export const styles = ... | JavaScript | 0 | @@ -629,24 +629,37 @@
%0A layer: %7B%0A
+ left: 0,%0A
position
|
9332d6c3ee3abc09047b7af6f1a37ef24e95dafa | Fix virtual hosts | packages/navy/src/middleware/add-virtual-hosts.js | packages/navy/src/middleware/add-virtual-hosts.js | /* @flow */
import {mapValues, find} from 'lodash'
import {Navy} from '../navy'
import {getHostForService} from '../util/xipio'
const getServiceHTTPProxyConfig = (serviceName, navyFile) => {
if (navyFile && navyFile.httpProxy && navyFile.httpProxy[serviceName]) {
return navyFile.httpProxy[serviceName]
}
re... | JavaScript | 0.000001 | @@ -18,19 +18,8 @@
rt %7B
-mapValues,
find
@@ -558,53 +558,82 @@
e()%0A
-%0A
-return %7B%0A ...config,%0A
+const services = %7B%7D%0A%0A await Promise.all(Object.keys(config.
services
: ma
@@ -632,47 +632,75 @@
ices
-: mapValues(config.services, (
+).map(async serviceName =%3E %7B%0A con... |
abae4e384dd7fb7e52e5f8a713a0ef74342e21e8 | test msgpack with date | test/unit/serializers/msgpack.spec.js | test/unit/serializers/msgpack.spec.js | const MsgPackSerializer = require("../../../src/serializers/msgpack");
const { cloneDeep } = require("lodash");
const P = require("../../../src/packets");
describe("Test MsgPackSerializer constructor", () => {
it("should create an empty options", () => {
let serializer = new MsgPackSerializer();
expect(serializer... | JavaScript | 0 | @@ -592,16 +592,42 @@
() =%3E %7B%0A
+%09%09const now = new Date();%0A
%09%09const
@@ -634,16 +634,16 @@
obj = %7B%0A
-
%09%09%09ver:
@@ -728,16 +728,28 @@
: %22Test%22
+,%0A%09%09%09%09c: now
%0A%09%09%09%7D,%0A%09
@@ -865,10 +865,10 @@
oBe(
-6
7
+9
);%0A%0A
|
ae8164caadff311dcf288affad3b733483cf57cc | Fix to get Travis-CI passing (hopefully) | test/responsive_images_test.js | test/responsive_images_test.js | /**
* grunt-responsive-images
* https://github.com/andismith/grunt-responsive-images
*
* Copyright (c) 2013 andismith
* Licensed under the MIT license.
*
* Test suite for Grunt Responsive Images
*
* @author Andi Smith (http://twitter.com/andismith)
* @version 1.0
*/
/*
======== A Handy Little Nodeunit Re... | JavaScript | 0 | @@ -2522,32 +2522,34 @@
tualProp.quality
+ +
%0A
@@ -2725,16 +2725,18 @@
.quality
+ +
%0A
|
f37fd62eb52cfac8d462954aa91869b58cd3dbf7 | Fix failing test after async.js special case added | test/unit/server/test_grunt_config.js | test/unit/server/test_grunt_config.js |
'use strict';
var expect = require('chai').expect;
var sinon = require('sinon');
var GruntConfig = require('../../../src/server/grunt_config');
describe('GruntConfig', function() {
var grunt, fs, config;
beforeEach(function() {
grunt = {
loadTasks: sinon.stub()
};
config = new GruntConfig(gru... | JavaScript | 0.000002 | @@ -669,16 +669,20 @@
s/async/
+lib/
async.js
|
bb131557519b6974c5baab06df8f158cb8d46e0c | Fix return type | lib/node_modules/@stdlib/streams/utils/inspect-sink/lib/object_mode.js | lib/node_modules/@stdlib/streams/utils/inspect-sink/lib/object_mode.js | /**
* @license Apache-2.0
*
* Copyright (c) 2018 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.000007 | @@ -1549,16 +1549,20 @@
InspectS
+inkS
tream%7D i
|
be30f2db872909a4f2cf9c82adbd417f8bb4e6ea | Simplify the radioRenderDelegate so that we're not duplicating a bunch of the core sproutcore code. | apps/my_system/render_delegates/radio.js | apps/my_system/render_delegates/radio.js | // ==========================================================================
// Project: SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
// Portions ©2008-2011 Apple Inc. All rights reserved.
// License: Licensed under MIT license (see license.js)
// ... | JavaScript | 0 | @@ -962,768 +962,42 @@
-this.addSizeClassName(dataSource, context);%0A%0A var theme = dataSource.get('theme');%0A %0A var isSelected = dataSource.get('isSelected'),%0A width = dataSource.get('width'),%0A color = dataSource.get('color'),%0A labelId = SC.guidFor(dataSource) + '-label';... |
4b752e2e17028fb005fde0189c872d3848e73197 | remove unused dependencies | spec/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown_spec.js | spec/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown_spec.js | import Vue from 'vue';
import GkeMachineTypeDropdown from '~/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue';
import {
SET_PROJECT,
SET_ZONE,
SET_ZONES,
SET_MACHINE_TYPES,
} from '~/projects/gke_cluster_dropdowns/stores/mutation_types';
import mountComponent from 'spec/helpers/vue_mount... | JavaScript | 0.000003 | @@ -168,21 +168,8 @@
NE,%0A
- SET_ZONES,%0A
SE
@@ -445,33 +445,8 @@
ck,%0A
- gapiZonesResponseMock,%0A
ga
|
90b8d45b2ac5187010b168f72c1681e25e165016 | Add passing test for pull-request from jhurliman | test/transports/loggly-test.js | test/transports/loggly-test.js | /*
* loggly-test.js: Tests for instances of the Loggly transport
*
* (C) 2010 Charlie Robbins
* MIT LICENSE
*
*/
var path = require('path'),
vows = require('vows'),
assert = require('assert'),
winston = require('../../lib/winston'),
helpers = require('../helpers');
var config = helpers.loadConfi... | JavaScript | 0 | @@ -1141,24 +1141,301 @@
d);%0A %7D)
+,%0A %22the log() method with no metadata%22: %7B%0A topic: function () %7B%0A tokenTransport.log('info', 'test-message', null, this.callback.bind(null, null));%0A %7D,%0A %22should respond immediately%22: function () %7B%0A assert.is... |
4bcf47eafe51bc94f37b28b9ce91cb54688633e8 | Generalize test naming | test/unit/actions/indexSpec.js | test/unit/actions/indexSpec.js | import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { expect } from 'chai';
import { storeEntityIfNew, fetchEntities } from '../../../src/actions/index';
import * as types from '../../../src/actions/types';
describe('actions', function () {
function createStore(services, initialE... | JavaScript | 0.001117 | @@ -732,34 +732,46 @@
tch
-ADD_ENTITY wi
+an action containing
th
+e
a
-n
+dded
entity
when
@@ -766,20 +766,18 @@
entity
-when
+if
success
@@ -1419,31 +1419,36 @@
ispatch
-ADD_ENTITY with
+an action containing
a warni
@@ -2154,23 +2154,28 @@
tch
-ADD_ENTITY with
+an action containing
an
@@ -2172... |
9956f54a1e34d66f1d2af3a89d245b36681b4d8f | Change default port to 3333 | packages/@sanity/util/src/getConfig.js | packages/@sanity/util/src/getConfig.js | import path from 'path'
import get from 'lodash/get'
import merge from 'lodash/merge'
import {loadJsonSync} from './safeJson'
const defaults = {
server: {
staticPath: './static',
port: 3910,
hostname: 'localhost'
}
}
const configContainer = values => ({
get: (dotPath, defaultValue) =>
get(values... | JavaScript | 0.000001 | @@ -194,11 +194,11 @@
t: 3
-910
+333
,%0A
|
14033520a6dc9e78ae53c9b4776a7d0d114226f5 | fix equality test | purelyjs/js/purely.js | purelyjs/js/purely.js | var purely = {
throwAssertionError: function(msg) {
// throws TypeError as there isn't a built-in assertion error type
throw TypeError('AssertionError: ' + msg);
/*
// Safer alternative?
throw {
name: 'TypeError',
message: 'AssertionEr... | JavaScript | 0.00011 | @@ -2753,16 +2753,17 @@
.name ==
+=
'TypeEr
|
33757b6bd467c8a73ca7bf5389720a319681c292 | " missed | static/js/client.js | static/js/client.js | (function($) {
//user
PopupLogin = Backbone.View.extend({
initialize: function(){
},
el: '#login',
events: {
'click button': 'login'
},
login: function(){
askLogin();
}
});
Login = Backbone.View.extend({
initialize: function(){
... | JavaScript | 0.999763 | @@ -2725,16 +2725,17 @@
ze:12px;
+%22
%3E'+reply
|
9533757972b16d259bc29f6d36aeefe55c83018b | increase donation timeout | static/js/donate.js | static/js/donate.js |
function isMSIE() {
return (navigator.userAgent.indexOf('MSIE') != -1);
}
function showDonateRibbon() {
var ribbon = $("#donate");
ribbon.children('.amounts').show();
ribbon.children('.types').hide();
ribbon.attr('style', 'display: none;');
$("#video").hide();
if (!isMSIE()) {
ribbon.... | JavaScript | 0 | @@ -2006,17 +2006,17 @@
rl;%0A%09%7D,
-1
+5
000);%0A%09r
|
c519b4779adf09a693b8b27661df10e52bd9148f | Update script.js | static/js/script.js | static/js/script.js | /**
* 页面ready方法
*/
$(document).ready(function() {
console.log("你不乖哦,彼此之间留点神秘感不好吗?");
backToTop();
search();
});
/**
* 回到顶部
*/
function backToTop() {
$("[data-toggle='tooltip']").tooltip();
var st = $(".page-scrollTop");
var $window = $(window);
var topOffset;
//滚页面才显示返回顶部
$win... | JavaScript | 0.000002 | @@ -67,25 +67,17 @@
og(%22
-%E4%BD%A0%E4%B8%8D%E4%B9%96%E5%93%A6%EF%BC%8C%E5%BD%BC%E6%AD%A4%E4%B9%8B%E9%97%B4%E7%95%99%E7%82%B9%E7%A5%9E%E7%A7%98%E6%84%9F%E4%B8%8D%E5%A5%BD%E5%90%97
+%E8%BF%99%E4%B9%88%E7%8C%B4%E6%80%A5%EF%BC%8C%E6%89%92%E6%88%91%E8%A1%A3%E6%9C%8D
%EF%BC%9F%22);
|
85641e0db06224488dab96f69eed31f0b2a0d4ba | Use a more recent Android for integration tests | tests/integration/config-ci.js | tests/integration/config-ci.js | // this file is for use in CircleCI continuous integration environment
var browserName = ['chrome', 'firefox', 'internet explorer', 'android'][process.env.CIRCLE_NODE_INDEX];
module.exports = {
seleniumServerURL: {
hostname: 'ondemand.saucelabs.com',
port: 80
},
driverCapabilities: {
'tunnel-identif... | JavaScript | 0 | @@ -69,16 +69,36 @@
nt%0A%0Avar
+capabilities = %5B%0A %7B
browserN
@@ -104,20 +104,18 @@
Name
+:
-= %5B
'chrome'
, 'f
@@ -114,51 +114,226 @@
ome'
-, 'firefox', 'internet explorer', 'android'
+%7D,%0A %7BbrowserName: 'firefox'%7D,%0A %7BbrowserName: 'internet explorer'%7D,%0A %7B%0A deviceName: 'Samsun... |
2ab41ec1f71f405f7e718db2f11acbc010862b0d | Break loop as soon as change detected. | packages/babel/src/transformation/transformers/internal/block-hoist.js | packages/babel/src/transformation/transformers/internal/block-hoist.js | import sortBy from "lodash/collection/sortBy";
export var metadata = {
group: "builtin-trailing"
};
/**
* [Please add a description.]
*
* Priority:
*
* - 0 We want this to be at the **very** bottom
* - 1 Default node position
* - 2 Priority over normal nodes
* - 3 We want this to be at the **very** top
... | JavaScript | 0 | @@ -586,16 +586,28 @@
!= null)
+ %7B%0A
hasChan
@@ -617,16 +617,43 @@
= true;%0A
+ break;%0A %7D%0A
%7D%0A
|
f703a87e95a4df41fd4ff7e49b1285e88907400a | fix negative bar width | extra/nc_web_viewer/GroupedBarChart.js | extra/nc_web_viewer/GroupedBarChart.js | /*global d3 */
function GroupedBarChart(name,logaxis){
var id = "#"+name.replace(/\./g,'\\.');
var margin = {top: 20, right: 20, bottom: 30, left: 40};
//Add CSS to the div
d3.select(id).style({
"overflow-y":"auto",
"overflow-x":"hidden"
});
var widget = this;
//Make dragg... | JavaScript | 0.000007 | @@ -2310,17 +2310,17 @@
tr('x',
-1
+0
)%0A
|
c6e496c7cd5bed0ca23ae32f805cfbd70f832bc9 | Improve saved Filter View Items hover effects | src/components/Filters/ViewsMenu.js | src/components/Filters/ViewsMenu.js | import * as cloneDeep from 'lodash/cloneDeep'
import * as React from 'react'
import styled from 'styled-components'
import { Box } from '../Grid'
import Text from '../Text'
import * as FaTrash from 'react-icons/lib/fa/trash'
import * as FaPieChart from 'react-icons/lib/fa/pie-chart'
import DropDownButton from '../DropD... | JavaScript | 0 | @@ -1263,56 +1263,175 @@
;%0A
-%7D%0A &:hover $%7BPreview%7D %7B%0A display: block;%0A %7D
+ opacity: 0.7;%0A %7D%0A %3E button:hover %7B%0A opacity: 1;%0A %7D%0A &:hover $%7BPreview%7D %7B%0A display: block;%0A %7D%0A%60%0A%0Aconst ViewListItemLabel = styled(Text)%60%0A cursor: pointer;
%0A%60%0A... |
7d75bfaa274eae503e318bacfcfbd65ab613a6b1 | improve example | docs/data/interscript.js | docs/data/interscript.js | const {
// Interactive content
details, summary,
// Scripting
script, canvas
} = htmlmodule
const { a, body, h1, h2, article, section, p } = htmlmodule
const evilscript = script(`(${(() => {
alert('Error!\n' +
'\nThe application is broken by user.' +
' Do not report an issue, pleas... | JavaScript | 0.000031 | @@ -122,16 +122,21 @@
ody,
+ del,
h1, h2,
art
@@ -131,16 +131,21 @@
h1, h2,
+ ins,
article
@@ -1322,25 +1322,59 @@
ery
-stupid script ' +
+',%0A del('evil'), ' ', ins('stupid'),
%0A
@@ -1387,16 +1387,24 @@
'
+ script
to the d
|
bdcad9920dfac2a021773d5a469d9610ff3347a6 | Switch from DOS newlines to Unix newlines | filer/static/filer/js/addons/popup_handling.js | filer/static/filer/js/addons/popup_handling.js | 'use strict';
/* global django */
(function ($) {
window.dismissPopupAndReload = function (win) {
document.location.reload();
win.close();
};
window.dismissRelatedImageLookupPopup = function (win, chosenId, chosenThumbnailUrl, chosenDescriptionTxt) {
var name = window.windo... | JavaScript | 0.000001 | @@ -6,17 +6,16 @@
strict';
-%0D
%0A/* glob
@@ -26,19 +26,17 @@
jango */
-%0D%0A%0D
+%0A
%0A(functi
@@ -43,17 +43,16 @@
on ($) %7B
-%0D
%0A win
@@ -95,17 +95,16 @@
(win) %7B
-%0D
%0A
@@ -131,17 +131,16 @@
eload();
-%0D
%0A
@@ -148,33 +148,31 @@
win.close();
-%0D
%0A %7D;
-%0D
%0A win... |
274a98e5cc1f044ebe925aa3c89463a69414209a | Remove unnessary definition of jquery module (now specified in webpack.config.js. | Basiljs/src/Controls/index.js | Basiljs/src/Controls/index.js | // Copyright 2018 Robert Adams
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Unless required by applicable law or agreed to in writing, software
// distribute... | JavaScript | 0 | @@ -678,36 +678,8 @@
g';%0A
-import * as $ from 'jquery';
%0Aimp
@@ -784,16 +784,17 @@
nting';%0A
+%0A
// Class
|
04c0a8a64a1d60a720935e1798c596c90a0d3f75 | add all Icons to register | web-app/src/components/SignUp/index.js | web-app/src/components/SignUp/index.js | /* global window */
import React, { Component } from 'react';
import GuestMode from '../GuestMode';
import Title from '../Title';
import { Input, Form, Button } from '../Form';
import api from '../../utils/api';
import './SignUp.css';
class SignUp extends Component {
constructor(...props) {
super(...props);
... | JavaScript | 0 | @@ -1190,32 +1190,46 @@
=%22SignUp__Input%22
+ icon=%22person%22
/%3E%0A %3CI
@@ -1313,32 +1313,45 @@
=%22SignUp__Input%22
+ icon=%22email%22
/%3E%0A %3CI
@@ -1468,20 +1468,33 @@
__Input%22
+ icon=%22lock%22
/%3E%0A
+%0A
@@ -1598,16 +1598,16 @@
s long.%0A
+
@@ -1615,17 +1... |
86c5d65e12a494e2208dd13791d32453e32a27f3 | Update homeController.js | partners/js/home/homeController.js | partners/js/home/homeController.js | (function(){
'use strict';
angular
.module('partner')
.controller('HomeController', HomeController);
function HomeController($scope, $rootScope, $firebaseAuth, userService, $state){
var vm = this;
var ref = new Firebase($rootScope.fbUrl);
vm.authObj = $firebaseAuth(... | JavaScript | 0.000001 | @@ -620,8 +620,329 @@
%0A%7D)();
+%0A%0A(function () %7B%0A var app = angular.module('myApp', %5B%5D);%0A%0A app.controller('TabController', function () %7B%0A this.tab = 1;%0A%0A this.setTab = function (tabId) %7B%0A this.tab = tabId;%0A %7D;%0A%0A this.isSet = function ... |
3d17da3c1403d5e8cee9ac38e58e044f75df8893 | Add missing displayName to Keyboard | src/components/Keyboard/Keyboard.js | src/components/Keyboard/Keyboard.js | import React, { PropTypes } from 'react';
import ReactDOM from 'react-dom';
import isFunction from 'lodash/lang/isFunction';
import { createPureComponent } from 'utils/createPureComponent';
export const keyCodes = Object.freeze({
37: 'left',
38: 'up',
39: 'right',
40: 'down'
});
const eventToProp = Object.f... | JavaScript | 0.000056 | @@ -433,16 +433,44 @@
nent(%7B%0A%0A
+ displayName: 'Keyboard',%0A%0A
propTy
|
fb30195308d6c0921ea57a852397faa7ccec4dbb | Handle null indicators on ndc country accordion selectors | app/javascript/app/components/ndcs/ndcs-country-accordion/ndcs-country-accordion-selectors.js | app/javascript/app/components/ndcs/ndcs-country-accordion/ndcs-country-accordion-selectors.js | import { createSelector } from 'reselect';
import { deburrUpper } from 'app/utils';
import uniq from 'lodash/uniq';
import sortBy from 'lodash/sortBy';
import snakeCase from 'lodash/snakeCase';
const getCountries = state => state.countries;
const getAllIndicators = state => (state.data ? state.data.indicators : {});
c... | JavaScript | 0 | @@ -4201,32 +4201,66 @@
s) return null;%0A
+ if (!indicators) return null;%0A
const ndcs =
|
e43219015cf1f8dff6c785d91a2fa675a752de86 | fix broken year tests | tests/test-for-current-year.js | tests/test-for-current-year.js | const test = require("ava")
const fs = require("fs-extra")
const globby = require("globby")
const year = (new Date()).getFullYear()
const yearRegex = new RegExp(`Copyright \\(c\\) ${year} GitHub Inc\\.`)
test(`LICENSE files have the current year ${year}`, t => {
return globby(["**/LICENSE", "!**/node_modules/**/LIC... | JavaScript | 0.000003 | @@ -18,13 +18,13 @@
ire(
-%22ava%22
+'ava'
)%0Aco
@@ -44,17 +44,17 @@
ire(
-%22
+'
fs-extra
%22)%0Ac
@@ -49,17 +49,17 @@
fs-extra
-%22
+'
)%0Aconst
@@ -79,18 +79,93 @@
ire(
-%22
+'
globby
-%22
+'
)%0A
+const %7Bjoin%7D = require('path')%0A%0Aconst %7Bpackages%7D = require('../lerna.json')
%0Acon
@@ -347,59 ... |
e0c6d5c9a99ddf8888dd4785eda5a6710c327b0c | secure cloudinary urls, fixing #1224 | packages/nova-cloudinary/lib/server/cloudinary.js | packages/nova-cloudinary/lib/server/cloudinary.js | import Telescope from 'meteor/nova:lib';
import cloudinary from "cloudinary";
import Posts from "meteor/nova:posts";
import Users from 'meteor/nova:users';
const Cloudinary = cloudinary.v2;
const uploadSync = Meteor.wrapAsync(Cloudinary.uploader.upload);
Cloudinary.config({
cloud_name: Telescope.settings.get("cloud... | JavaScript | 0 | @@ -445,16 +445,33 @@
Secret%22)
+,%0A secure: true,
%0A%7D);%0A%0Aco
|
047e521a8779daae1fe6f68df8f9406f6988de94 | Fix style error. | test/view/sequence/testTextBuilder.js | test/view/sequence/testTextBuilder.js | var chai = require('chai');
var assert = chai.assert;
TextBuilder = require('../../../view/sequence/TextBuilder.js');
describe('Test sequence TextBuilder', function(){
it('it should build expected JSON object with Text data', function(){
let textBuilder = new TextBuilder();
var expected = ... | JavaScript | 0 | @@ -308,32 +308,8 @@
ed =
-
%7B%0A
|
29bdb0a226c76279193033bf2d0e777381d2a870 | Fix circleci test config file | tests/test.config.circle-ci.js | tests/test.config.circle-ci.js | module.exports = {
store_url: 'http://localhost:8080',
account_user: 'test',
account_password: 'testing',
account_name: 'tester',
container_name: 'test_container',
object_name: 'test_object',
segment_container_name: 'segment_test_container',
segment_object_name: 'segment_test_object',
... | JavaScript | 0.000001 | @@ -75,16 +75,23 @@
r: 'test
+:tester
',%0A a
@@ -137,22 +137,25 @@
_name: '
+AUTH_
test
-er
',%0A c
|
b4f95c85fb96ed26fb8ed3ab577427238f231f5f | Fix test | test/xd-mvc-examples/xdGalleryTest.js | test/xd-mvc-examples/xdGalleryTest.js | "use strict";
/**
* @type {Chai.Assert}
*/
var assert = require('chai').assert
var xdTesting = require('../../lib/index')
var templates = xdTesting.templates
/**
* @type {Q}
*/
var q = require('q')
describe('XD-MVC Gallery @large', function () {
var test = this
// Set test timeout
test.timeout(180 *... | JavaScript | 0.000004 | @@ -5330,16 +5330,56 @@
up name%0A
+ let options = setup.devices%0A
@@ -5410,28 +5410,22 @@
ct.keys(
-setup.device
+option
s).map(k
@@ -5430,28 +5430,22 @@
(key =%3E
-setup.device
+option
s%5Bkey%5D.n
|
05f47c950053b79341e0ede6c5a85ff6f3fbde43 | check podcasts before render | src/components/person-page/index.js | src/components/person-page/index.js | import React from 'react'
import st from './style.module.css'
import Link, {navigateTo} from 'gatsby-link'
import BackButton from '../back-button'
import TelegramIcon from '-!svg-react-loader?name=Icon!../../../static/telegram.svg'
import VkIcon from '-!svg-react-loader?name=Icon!../../../static/vk.svg'
import SlackIco... | JavaScript | 0 | @@ -2222,16 +2222,28 @@
podcasts
+ && podcasts
.map((%7Bt
|
94558f5dcf5ce15b7b1964dd36e1a7fa26c730fd | Add fs & path as external | packages/purgecss-webpack-plugin/rollup.config.js | packages/purgecss-webpack-plugin/rollup.config.js | import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'
import resolve from 'rollup-plugin-node-resolve'
export default {
entry: './src/index.js',
targets: [
{
dest: './lib/purgecss-webpack-plugin.es.js',
format: 'es'
},
{
... | JavaScript | 0 | @@ -491,12 +491,26 @@
sources'
+, 'fs', 'path'
%5D%0A%7D%0A
|
f84b483b331b41bef91da01bef7ebd0e22e6b148 | Remove an unnecessary call to a scroll top on load | src/containers/ViewportContainer.js | src/containers/ViewportContainer.js | import React, { Component, PropTypes } from 'react'
import shallowCompare from 'react-addons-shallow-compare'
import { connect } from 'react-redux'
import { scrollToTop, scrollToOffsetTop } from '../vendor/scrollTop'
import { setNavbarState, setViewportSizeAttributes } from '../actions/gui'
import { addScrollObject, re... | JavaScript | 0 | @@ -145,77 +145,8 @@
ux'%0A
-import %7B scrollToTop, scrollToOffsetTop %7D from '../vendor/scrollTop'%0A
impo
@@ -1055,50 +1055,8 @@
) %7B%0A
- const %7B isOffsetLayout %7D = this.props%0A
@@ -1107,72 +1107,8 @@
is)%0A
- return isOffsetLayout ? scrollToOffsetTop() : scrollToTop()%0A
%7D%0A
|
2343d77cd75492c4b1bda09b4c87d406a8e3a87d | Send authorization tokens in `fetch` | frontend/app/routes/visualize/graph.js | frontend/app/routes/visualize/graph.js | import { inject as service } from '@ember/service';
import fetch from 'fetch';
import Route from '@ember/routing/route';
import ResetScrollPositionMixin from 'frontend/mixins/reset-scroll-position';
export default Route.extend(ResetScrollPositionMixin, {
intl: service(),
session: service(),
queryParams: {
... | JavaScript | 0 | @@ -553,12 +553,75 @@
-if (
+let headers = %7B%7D;%0A if (this.get('session.isAuthenticated') &&
para
@@ -716,16 +716,111 @@
oUser);%0A
+ headers%5B'Authorization'%5D = %60Bearer $%7Bthis.get('session.data.authenticated.idToken')%7D%60;%0A
%7D%0A
@@ -842,16 +842,36 @@
etch(url
+, %7Bheaders... |
8ef3e7cde825f4fe661ddd16e40aee32653046d2 | Use waitUntilVisible in editing tests. | frontend_tests/casper_tests/08-edit.js | frontend_tests/casper_tests/08-edit.js | var common = require('../casper_lib/common.js').common;
common.start_and_log_in();
function then_edit_last_message() {
casper.then(function () {
casper.evaluate(function () {
var msg = $('#zhome .message_row:last');
msg.find('.info').click();
$('.popover_edit_message').... | JavaScript | 0 | @@ -357,23 +357,58 @@
per.
-waitForSelector
+then(function () %7B%0A casper.waitUntilVisible
(%22.m
@@ -430,16 +430,24 @@
tent%22);%0A
+ %7D);%0A
%7D%0A%0A// Se
|
5506aa130a6880e2910f4318a85bee7e7c083a28 | add meta to System.config | packages/app-decorators/jspm.config.js | packages/app-decorators/jspm.config.js | System.config({
"transpiler": false,
"packageConfigPaths": [
"npm:@*/*.json",
"npm:*.json",
"github:*/*.json"
],
"paths": {
"github": "jspm_packages/github/",
"npm:": "jspm_packages/npm/",
"src/": "lib/",
"test/": "test/",
"app-decorators/"... | JavaScript | 0.000001 | @@ -677,24 +677,110 @@
age%22%0A %7D,%0A
+ %22meta%22: %7B%0A %22app-decorators%22: %7B%0A %22build%22: false%0A %7D%0A %7D,%0A
%22package
|
43d9083e78c1b32bc6079565172c1af7e2de5687 | change settings styles | assets/js/MainPageSliderFunctionality.js | assets/js/MainPageSliderFunctionality.js | var sliderPages = document.getElementById('circles').getElementsByTagName('div'),
sliderPreviousButton = document.getElementById('previous'),
sliderNextButton = document.getElementById('next'),
currentIndex = 0,
i,
len;
sliderPages[0].addEventListener('click', function (event) {
changeSliderIm... | JavaScript | 0.000001 | @@ -1510,24 +1510,208 @@
%0A %7D%0A%0A
+$('#slider').fadeOut(200, function () %7B%0A $('#slider').css(%22background-image%22, 'url(assets/img/slider-image-' + index + '.png)');%0A $('#slider').fadeIn(200);%0A %7D);%0A //
document.get
|
931697e45c3e56814518d6b68d1a41a8df2f9352 | fix indent | tests/dummy/app/routes/application.js | tests/dummy/app/routes/application.js | import Route from '@ember/routing/route';
export default Route.extend({
async beforeModel() {
try {
await this.get('state').restore();
} catch(err) {
if(err.reason === 'needs_setup') {
this.transitionTo('setup');
} else {
throw err;
}
}
}
});
| JavaScript | 0.00006 | @@ -106,16 +106,17 @@
%7B%0A
+
await th
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.