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 |
|---|---|---|---|---|---|---|---|
36bfc9628d7a0d30f270c8a1437cfc4f9b06568c | Remove localstorage | js/apporder.js | js/apporder.js | $(function () {
var app_menu = $('#apps ul');
if (!app_menu.length)
return;
app_menu.hide();
// restore existing order
$.get(OC.filePath('apporder', 'ajax', 'order.php'), {requesttoken: oc_requesttoken}, function (data) {
var json = data.order;
var order = []
try {
var order = JSON.parse(json).revers... | JavaScript | 0.000001 | @@ -976,57 +976,8 @@
s);%0A
-%09%09%09localStorage.setItem(%22apporder-order%22, json);%0A
%09%09%09$
|
34f749fe47421a6c515bdf3498972bdd75121a4f | Remove unused ref. | packages/react-atlas-core/src/TextArea/TextArea.js | packages/react-atlas-core/src/TextArea/TextArea.js | import React from "react";
import PropTypes from "prop-types";
import { InputCore } from "../Input";
import cx from "classnames";
import messages from "../utils/messages";
class TextArea extends React.PureComponent {
constructor(props) {
super(props);
let isValid, errorText;
if(typeof props.isValid === ... | JavaScript | 0 | @@ -540,20 +540,16 @@
;%0A %7D%0A
-
%0A //
@@ -2843,95 +2843,8 @@
ue%7D%0A
- ref=%7Bnode =%3E (this.inputRef = node)%7D // eslint-disable-line no-return-assign%0A
|
2d2cdd2d6fb8510ca0f53919853c13cb95c893a2 | Remove ref to dead npactConstants.graphSpecDefaults | npactweb/npactweb/static/js/graphs/graph.js | npactweb/npactweb/static/js/graphs/graph.js | angular.module('npact')
.controller('npactGraphContainerCtrl', function($scope, $element, $window, $log, $timeout,
npactConstants, Utils, GraphConfig, Evt,
GraphingCalculator) {
'use strict';
var getWidth = function() {
... | JavaScript | 0 | @@ -935,31 +935,16 @@
eOpts =
-angular.extend(
%7B width:
@@ -959,144 +959,39 @@
h(),
-%0A onPan: onPan, onZoom: onZoom %7D,%0A npactConstants.graphSpecDefaults)
+ onPan: onPan, onZoom: onZoom %7D
;%0A
|
4deb89f9921db87f425938e4739c98f41e90d17e | Remove console.dir(). | website/app/application/core/projects/project/processes/link-files-to-sample.js | website/app/application/core/projects/project/processes/link-files-to-sample.js | (function (module) {
module.controller("LinkFilesToSampleController", LinkFilesToSampleController);
LinkFilesToSampleController.$inject = ["$modalInstance", "project", "files", "sample", "mcmodal"];
function LinkFilesToSampleController($modalInstance, project, files, sample, mcmodal) {
var ctrl = t... | JavaScript | 0.000001 | @@ -696,65 +696,8 @@
le;%0A
- console.dir(files);%0A
|
7152b573c4cd7d66fc895ba900338e4eff8479fe | add persistence to theme choice | app/client.js | app/client.js | import { AppContainer } from 'react-hot-loader';
import React from 'react';
import { render } from 'react-dom';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import 'bootstrap/dist/css/bootstrap.css';
import 'dc/dc.css';
import { ThemeSwitcher } from 'react-bootstrap-theme-switch... | JavaScript | 0 | @@ -455,16 +455,38 @@
erulean%22
+ storeThemeKey=%22theme%22
%3E%0A
|
ad6067b328c5f1349812b45f3f9b445118b536d4 | make hovering div be above other things | activity.js | activity.js | function ActivityPlot(target, team_id, problem_id, update, clickable) {
var self = this;
self.update = typeof update !== 'undefined' ? update : true;
self.clickable = typeof clickable !== 'undefined' ? clickable : true;
self.target = target;
self.team_id = team_id;
self.problem_id = problem_id... | JavaScript | 0.000001 | @@ -2854,24 +2854,56 @@
r': '#efe',%0A
+ 'z-index': 100,%0A
|
ebdfec8a18bf60cc8116d0f63331c0bbfa91f418 | update link: register account URL | inc/gui/login-dialog/login-dialog.js | inc/gui/login-dialog/login-dialog.js | /* Copyright (C) 2013-2016 Felix Hammer, Florian Thauer, Lothar May */
myLoginDialog = new Object();
/**
* class LoginDialogImpl
* @constructor
*/
function LoginDialogImpl()
{
var self = this;
this.showLogin = function()
{
var show = function() {
myGui.currentVisibleMessageBoxId = "loginDialog";
var pa... | JavaScript | 0.000001 | @@ -1843,16 +1843,17 @@
ef=%22http
+s
://www.p
@@ -1860,33 +1860,54 @@
oker
--heroes.com/register.html
+th.net/component/pthranking/?view=registration
%22%3ECr
|
96cffd89d7f87a69c745ad0d4120458ebf0926a6 | remove useless log | test/tests/controllers/dialogs/answers/rgiFinalChoiceDialogCtrl.js | test/tests/controllers/dialogs/answers/rgiFinalChoiceDialogCtrl.js | 'use strict';
describe('rgiFinalChoiceDialogCtrl', function () {
beforeEach(module('app'));
var $scope, $location, $routeParams, ngDialog,
rgiNotifier, rgiAnswerSrvc, rgiAnswerMethodSrvc, rgiIdentitySrvc, rgiQuestionSetSrvc, rgiUrlGuideSrvc,
$parent, currenUserBackup, currentUer = {role: 'user... | JavaScript | 0.000001 | @@ -6385,62 +6385,8 @@
();%0A
- console.log('restore mocks');%0A
|
ca2b39bdbcc142e05df63f5000829f65e2586f77 | Fix "Replacable" typo in docs header | docs/App/Header.js | docs/App/Header.js | // @flow
import fetch from 'unfetch';
import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import Select from '../../src';
import type { RouterProps } from '../types';
import GitHubButton from './GitHubButton';
import TwitterButton from './TwitterButton';
const smallDevice = '@med... | JavaScript | 0.000004 | @@ -638,16 +638,17 @@
'Replac
+e
able com
|
f78caa29ca7334a5cfb83469db78863fc9d48256 | rename HomeCtrl to HomeController | app/js/app.js | app/js/app.js | 'use strict';
var app = angular.module('app', ['ngRoute']);
app.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'partials/home.html',
controller: 'HomeCtrl'
});
}]);
app.controller('HomeCtrl', ['$scope', function($scope) {
$scope.value = "foo";
}]);
| JavaScript | 0.000357 | @@ -202,19 +202,25 @@
: 'HomeC
-trl
+ontroller
'%0A %7D);%0A
@@ -250,11 +250,17 @@
omeC
-trl
+ontroller
', %5B
|
c38d0f425bac4c9c16b822ff84849907205bc8e3 | Add playSE | app/js/app.js | app/js/app.js | /* global enchant, Event */
function main() {
var DISPLAY_WIDTH = 360;
var DISPLAY_HEIGHT = 360;
// 表示領域をデバイスの中央に設定します
(function () {
var doc = document.documentElement;
var width = doc.clientWidth;
var height = doc.clientHeight;
var canvasAspect = DISPLAY_WI... | JavaScript | 0.000001 | @@ -747,24 +747,189 @@
%7D)();%0D%0A%0D%0A
+ var getAudioAssetName = function (name) %7B%0D%0A var ext = (enchant.ENV.BROWSER === %22ie%22) ? %22.mp3%22 : %22.ogg%22;%0D%0A return %22sound/%22 + name + ext;%0D%0A %7D;%0D%0A%0D%0A
enchant(
@@ -928,24 +928,24 @@
enchant();%0D%0A
-
var c... |
f1ce5bb995bd24760df8e293f29e91628d41095f | Update default value. | src/moonstone-samples/lib/IntegerPickerSample.js | src/moonstone-samples/lib/IntegerPickerSample.js | var
kind = require('enyo/kind');
var
FittableRows = require('layout/FittableRows'),
BodyText = require('moonstone/BodyText'),
Divider = require('moonstone/Divider'),
FormCheckbox = require('moonstone/FormCheckbox'),
IntegerPicker = require('moonstone/IntegerPicker'),
Scroller = require('moonstone/Scroller');
m... | JavaScript | 0 | @@ -605,9 +605,9 @@
201
-3
+6
, mi
|
a75ba0567bd50ea7c499be2d2dbfb5ea0e88a23b | Add test for su-dropdown | tags/dropdown/su-dropdown.search.spec.js | tags/dropdown/su-dropdown.search.spec.js | describe('su-dropdown-search', function () {
let tag, select
let spyOnOpen = sinon.spy()
let spyOnClose = sinon.spy()
let spyOnSearch = sinon.spy()
let items = [
{
label: 'State',
value: null,
default: true
},
{ value: 'AL', label: 'Alabama' },
{ value: 'AK', label: 'Alaska'... | JavaScript | 0 | @@ -5328,38 +5328,58 @@
0)%0A%0A
-$('su-dropdown').blur(
+fireKeyEvent(dropdown, 'keyup', keys.enter
)%0A %7D)%0A%7D
|
684f8a04a140ba00e0fd00f0d11269a58e8dc038 | fix prod script to allow specifying deploy dir | talamer/packages/scripts/scripts/prod.js | talamer/packages/scripts/scripts/prod.js | const fs = require('fs');
const path = require('path');
const {execSync} = require('child_process');
const argv = process.argv.slice(2);
const appDirectory = fs.realpathSync(process.cwd());
execSync(
`${path.resolve(__dirname, '../node_modules/.bin/http-server')} ${path.resolve(
appDirectory,
argv && argv.le... | JavaScript | 0.000002 | @@ -319,16 +319,17 @@
length %3E
+=
2 ? arg
|
2c08d24511c49804830153cdbd11e0b1112f016b | 修复当前tab页面不是配置的首页时,热刷新后tabBar消失的问题 question/101612 | src/platforms/app-plus/service/framework/page.js | src/platforms/app-plus/service/framework/page.js | import {
initWebview,
createWebview
} from './webview'
import {
navigateFinish
} from './navigator'
import tabBar from '../framework/tab-bar'
import {
createPage
} from '../../page-factory'
import {
loadPage
} from './load-sub-package'
const pages = []
export function getCurrentPage... | JavaScript | 0.000001 | @@ -3135,30 +3135,8 @@
bBar
- && webview.id !== '1'
) %7B%0D
@@ -5224,9 +5224,10 @@
bview%0D%0A%7D
+%0D
%0A
|
5317560d7fbc19367c453c918092c1819331d530 | update bulid docs script to reference new templates package | docs/build_docs.js | docs/build_docs.js | var scrawl = require('../deps/scrawl'),
Showdown = require('../deps/showdown'),
async = require('../deps/async'),
utils = require('../lib/utils'),
templates = require('../packages/kanso.templates/build/templates'),
dust = require('../deps/dustjs/lib/dust'),
path = require('path'),
fs = requi... | JavaScript | 0 | @@ -194,17 +194,17 @@
es/kanso
-.
+-
template
|
248fdbaddfa37f638017a4fddbc3ef6426f476d7 | Change copy for finish cert message (#1590) | src/providers/sh/util/certs/finish-cert-order.js | src/providers/sh/util/certs/finish-cert-order.js | // @flow
import chalk from 'chalk'
import psl from 'psl'
import { Now } from '../types'
import * as Errors from '../errors'
import wait from '../../../../util/output/wait'
import type { Certificate } from '../types'
export default async function startCertOrder(now: Now, cns: string[], context: string) {
const cancel... | JavaScript | 0 | @@ -330,18 +330,18 @@
it(%60
-Finish
+Issu
ing
+a
cert
@@ -352,17 +352,8 @@
ate
-issuance
for
|
8880c09076e4727768ace26a74766cbe6f64021c | Rename `Keyboard.remove{Event =>}Listener` | Libraries/Components/Keyboard/Keyboard.js | Libraries/Components/Keyboard/Keyboard.js | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
*/
import NativeEventEmitter from '../../EventEmitter/NativeEventEmitter';
import LayoutAnimation... | JavaScript | 0.000295 | @@ -4397,21 +4397,16 @@
rom %60add
-Event
Listener
@@ -4422,21 +4422,16 @@
remove
-Event
Listener
|
0ed14e78499f08f7744de993bee89903386f3ec1 | fix missing 'afterEach' import | blueprints/initializer-test/mocha-files/tests/unit/initializers/__name__-test.js | blueprints/initializer-test/mocha-files/tests/unit/initializers/__name__-test.js | import { expect } from 'chai';
import { describe, it, beforeEach } from 'mocha';
import Ember from 'ember';
import { initialize } from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>';
import destroyApp from '../../helpers/destroy-app';
describe('<%= friendlyTestName %>', function() {
let app... | JavaScript | 0.99927 | @@ -57,16 +57,27 @@
foreEach
+, afterEach
%7D from
|
a205caefe68d4c9279aaa86470c30974da226874 | Update eBay highlight script to work with new classes | Miscellaneous/ebay.highlight-bids.user.js | Miscellaneous/ebay.highlight-bids.user.js | // ==UserScript==
// @name eBay - Hilight Items With Bids
// @namespace http://mathemaniac.org
// @include http://*.ebay.*/*
// @grant none
// @version 2.3.1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @description Hilights items that have bids ... | JavaScript | 0 | @@ -179,17 +179,17 @@
2.3.
-1
+2
%0A// @req
@@ -408,43 +408,25 @@
ipts
--mirror.org/scripts/show/66089.html
+.org/users/126140
v.2
@@ -510,17 +510,26 @@
$(%22.
-bids span
+lvprices .lvformat
%22).e
@@ -621,16 +621,53 @@
tch(/%5Cb0
+ bids/) %7C%7C !$(this).text().match(/%5Cd+
bids/))
|
5de7c3e859a9aa501482e8016e8b52387406ad1e | set highlight mode to ruby in custom.js | static/custom/custom.js | static/custom/custom.js | /* Placeholder for custom JS */
$(function() {
console.log("IRuby profile loaded")
// load CodeMirror mode for Ruby
$.getScript('/static/components/codemirror/mode/ruby/ruby.js');
});
| JavaScript | 0.000001 | @@ -180,12 +180,78 @@
y.js');%0A
+ IPython.CodeCell.options_default%5B%22cm_config%22%5D%5B%22mode%22%5D = %22ruby%22;%0A
%7D);%0A
|
45f7c21f494289e4ac79e0a29482109d8ba66d40 | Update get_census.js | static/js/get_census.js | static/js/get_census.js | $.get(
"https://raw.githubusercontent.com/Cutwell/Hacktoberfest-Census/master/README.md",
function(file) {
var census_md = file.split("### Census")[1].split("\n");
census_md.map((user) => {
if(user == ""){
return;
}
var name = user.substring(us... | JavaScript | 0.000001 | @@ -43,15 +43,20 @@
com/
-Cutwell
+AllenCompSci
/Hac
@@ -69,15 +69,8 @@
fest
--Census
/mas
|
1162c95ee01cef8aea8b333dcc3d6ca4dddf5ac6 | Update Less to 1.7.0 | frame/js/frame.js | frame/js/frame.js | (function() {
'use strict';
// nothing to see here
if (parent === self) {
window.location = '//' + location.hostname.replace(/^frame\./, '');
return;
}
requirejs.config({
paths: {
jquery: '//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min',
underscore: '//cdnjs.cloudflare.com/... | JavaScript | 0 | @@ -731,11 +731,11 @@
s/1.
-6.3
+7.0
/les
|
53a576de8bc1d5cdfc74e8bec042bf7064017405 | add additional unit tests | test/dictionary.spec.js | test/dictionary.spec.js | /* globals describe it beforeEach afterEach */
require('should');
var Dictionary = require('../');
describe('Dictionary Unit Tests', function() {
var dict;
beforeEach(function () {
dict = new Dictionary();
});
afterEach(function () {
dict = null;
});
it('should have a workin... | JavaScript | 0 | @@ -1782,13 +1782,1631 @@
%0A %7D);
+%0A%0A it('should return all the keys in the dictionary', function () %7B%0A dict.set('dict', 'data structure');%0A dict.set('set', 'another data structure');%0A dict.set('linked-list', 'a very good data structure');%0A var keys = dict.keys();%0A ... |
52cc8a53b0f34038ef23cf425adcfaee6872a66b | Update scripts.js | library/js/scripts.js | library/js/scripts.js | /*
* Bones Scripts File
* Author: Eddie Machado
*
* This file should contain any js scripts you want to add to the site.
* Instead of calling it in the header or throwing it inside wp_head()
* this file will be called automatically in the footer so as not to
* slow the page load.
*
* There are a lot of example... | JavaScript | 0 | @@ -4387,17 +4387,22 @@
%7B%0A
-$
+jQuery
(this).a
|
f08fcf785f6fb4300c841023abc047d6fe97571d | initialize icon only if model has attribute | attricon.js | attricon.js | /**
* An miniscule Backbone view that binds an icon className to a model attribute.
* @param {[options]}
* model The model to bind to.
* attribute The attribute of the model to map to an icon.
* iconMap An object that maps the attribute value to an icon.
*/
define(function(require){
var... | JavaScript | 0.000001 | @@ -348,40 +348,8 @@
ne')
-%0A , _ = require('underscore')
;%0A%0A
@@ -781,16 +781,63 @@
%7D);%0A%0A
+ if(this.model.has(options.attribute))%7B%0A
th
@@ -883,16 +883,24 @@
bute));%0A
+ %7D%0A
%7D,%0A%0A
|
be0c6f26036575f46a120edd02a3192a1615f853 | extend timeout | test/e2e.travis.conf.js | test/e2e.travis.conf.js | /* global exports */
// An example configuration file.
exports.config = {
specs: ['e2e/**/*Spec.js'],
baseUrl: 'http://localhost:8000',
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,
multiCapabilities: [{
browserName: 'chrome',
'tunnel-identifier': process.env.TRAVIS_J... | JavaScript | 0.000078 | @@ -606,12 +606,36 @@
BER%0A %7D%5D
+,%0A getPageTimeout: 2000
%0A%7D;%0A
|
635fcab339eae759331775b57fceff53d3e4cf74 | Add friendly unknown filesize | app/public.js | app/public.js | (function() {
const OVERLAY_CLASS = 'ncc-image-checker-overlay';
const URL_CLASS = 'ncc-image-checker-url';
const BACKGROUND_IMAGE_URL_REGEX = /url\((.*)\)/i;
function showImagesInfo(images) {
images = images || document.getElementsByTagName('*');
images = nodeListToArray(images);
let body = docume... | JavaScript | 0 | @@ -1550,32 +1550,50 @@
if (image.size
+ && image.size %3E 0
) %7B%0A in
@@ -2681,16 +2681,33 @@
erHTML =
+ image.size %3E 0 ?
%60File S
@@ -2722,32 +2722,58 @@
image.size %7D KB%60
+ : %60File size unavailable%60
;%0A div.appe
|
ad86d9a51bca001a52969d6cae65957023e30e9c | Update dropdown.js | js/dropdown.js | js/dropdown.js | /* ========================================================================
* Bootstrap: dropdown.js v3.0.2
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (... | JavaScript | 0.000001 | @@ -1535,19 +1535,16 @@
bile we
-we
use a ba
|
d04ee811d53a29bd8cd22553e33d1ffecd8a9c7b | Format comments for generating docs using dox | selection-counter.js | selection-counter.js |
/* global chrome:false, safari:false, $:false, pluralize:false, PeripheryLabel:false, SelectionListener:false */
(function (window, document, undefined) {
/*
* Watches the current selection and displays a count of a noun in a label.
*
* If multiple SelectionCounter instances exist, they will be grouped t... | JavaScript | 0 | @@ -152,24 +152,25 @@
ned) %7B%0A%0A /*
+*
%0A * Watche
@@ -435,16 +435,21 @@
ssages:%0A
+ *%0A
* - C
@@ -455,16 +455,17 @@
Chrome:
+%60
message.
@@ -470,16 +470,17 @@
e.toggle
+%60
will to
@@ -491,16 +491,17 @@
state,
+%60
message.
@@ -506,16 +506,17 @@
e.active
+%60
(boolea
@@ -548,16 +548,17... |
15ac6d8b4d4ac25bf5c5f7245178a0f6c0fde4ee | Add missing methods to dummy pubsub publisher | app/pubsub.js | app/pubsub.js | import { dbAdapter } from './models'
import { serializeUser } from './serializers/v2/user'
export class DummyPublisher {
userUpdated() {}
postCreated() {}
postDestroyed() {}
postUpdated() {}
commentCreated() {}
commentDestroyed() {}
commentUpdated() {}
likeAdded() {}
likeRemoved() {}
postHidden() ... | JavaScript | 0.000001 | @@ -411,16 +411,52 @@
ed() %7B%7D%0A
+ postSaved() %7B%7D%0A postUnsaved() %7B%7D%0A
%7D%0A%0Aexpor
|
8d6f042b0e4b422cd03eae99125bd4b2b955cb92 | update to allow wrapping templates from real app partial used in build. | cuke-browser-watcher.js | cuke-browser-watcher.js | #!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var map = require('map-stream');
var tmpl = require('lodash.template');
var watch = require('node-watch');
var child_process = require('child_process');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var browserify = require('brows... | JavaScript | 0 | @@ -934,21 +934,16 @@
ll,
-tmpl(
filedata
, %7By
@@ -942,25 +942,44 @@
data
-, %7Byield:
+.replace(/%5B%5E%5D%3C%25= yield %25%3E/i,
content
-%7D
));%0A
@@ -1976,19 +1976,16 @@
).s;%0A
- //
templat
@@ -2303,19 +2303,16 @@
%7D);%0A
- //
%7D);%0A %7D
|
64b4740e8f35e583170b0e7096ed6a0d1a9d9cde | Remove unused route (#564) | app/router.js | app/router.js | import Ember from 'ember';
import config from './config/environment';
import Location from 'travis/utils/location';
var Router = Ember.Router.extend({
location: function() {
if (Ember.testing) {
return 'none';
} else {
// this is needed, because in the location
// we need to decide if repos... | JavaScript | 0.000001 | @@ -2519,93 +2519,8 @@
%7D);%0A
- if (config.endpoints.sshKey) %7B%0A this.resource('ssh_key');%0A %7D%0A
|
9cafc78f2af175123361480e3dda10abe4470add | Update routes to match common | app/router.js | app/router.js | import { inject as service } from '@ember/service';
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
const Router = EmberRouter.extend({
iliosMetrics: service(),
location: config.locationType,
rootURL: config.rootURL,
didTransition() {
this._super(...arguments)... | JavaScript | 0 | @@ -730,33 +730,34 @@
ute('publication
-C
+_c
heck', %7B path: '
@@ -1014,33 +1014,34 @@
ute('publication
-C
+_c
heck', %7Bpath: '/
@@ -1120,17 +1120,18 @@
e('print
-C
+_c
ourse',
|
73d7187728e0bf4d91c6cb4ddde7c5c1bef546c9 | debug live | app/routes.js | app/routes.js | /**
* the-wall-of-quotes-api
*
* @license
* Copyright (c) 2016 by andreasonny83. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at
* https://raw.githubusercontent.com/Azurasky1/DragonArena/develop/LICENSE
*/
'use strict';
const rout... | JavaScript | 0.000001 | @@ -1407,16 +1407,195 @@
uotes');
+%0A%0A console.log('start debug');%0A console.log(databaseURL);%0A console.log(process.env.PROJECT_ID);%0A console.log(process.env.CLIENT_EMAIL);%0A console.log(process.env.PRIVATE_KEY);
%0A%7D%0A%0A// P
@@ -2017,16 +2017,63 @@
l%0A %7D;%0A%0A
+ console.log(captcha);%0A con... |
1faedc397c3799a13b1fdf50973621336ccd3729 | return promise to wait for finish and capture errors | test/configCases/output/charset/index.js | test/configCases/output/charset/index.js | __webpack_public_path__ = "https://example.com/public/path/";
const doImport = () => import(/* webpackChunkName: "chunk1" */ "./chunk1");
it("should not add charset attribute", () => {
const promise = doImport();
expect(document.head._children).toHaveLength(1);
const script = document.head._children[0];
__non_web... | JavaScript | 0 | @@ -529,12 +529,29 @@
ined();%0A
+%09return promise;%0A
%7D);%0A
|
eef45518f3b99c34e50f8e1b0294745b11a10bab | Document Geographic Details add-on now uses custom Extras client-side namespace | web/extras/components/document-details/document-geographic-info.js | web/extras/components/document-details/document-geographic-info.js | /**
* Document geographic info component.
*
* @namespace Alfresco
* @class Alfresco.DocumentGeographicInfo
*/
(function()
{
/**
* YUI Library aliases
*/
var Dom = YAHOO.util.Dom;
/**
* Alfresco Slingshot aliases
*/
var $html = Alfresco.util.encodeHTML;
/**
* DocumentGeog... | JavaScript | 0 | @@ -1,12 +1,200 @@
+/**%0A * Copyright (C) 2010-2011 Share Extras contributors.%0A */%0A%0A/**%0A* Extras root namespace.%0A* %0A* @namespace Extras%0A*/%0Aif (typeof Extras == %22undefined%22 %7C%7C !Extras)%0A%7B%0A var Extras = %7B%7D;%0A%7D%0A%0A
/**%0A * Docum
@@ -242,24 +242,22 @@
mespace
-Alfresco
+Extras
... |
24a06b49c213765d5cb02226dee9328c7cf67e64 | Add some line-to handling to geometry file | js/geometry.js | js/geometry.js | Class.makeClass(null, function Point(x, y) {
this.x = x || 0;
this.y = y || 0;
})
Point.prototype.normalize = function() {
var length = this.length();
return new Point(this.x/length, this.y/length);
}
Point.prototype.length = function() {
return Math.sqrt(this.lenSqrd());
}
Point.prototype.lenSqrd = function() ... | JavaScript | 0.000001 | @@ -741,24 +741,145 @@
* mult);%0A%7D%0A%0A
+Point.prototype.projectTo = function(other, length) %7B%0A%09return other.minus(this).normalize().times(length).plus(this);%0A%7D%0A%0A
Point.protot
@@ -1084,16 +1084,145 @@
ht);%0A%7D%0A%0A
+// for passing as an array into things like Context2D methods%0APoint.prototype.... |
70ec70ea0d16b32248f2897f770089f3107a11b4 | implement changes to reflect changed server events | frontend/js/reducers.js | frontend/js/reducers.js | import _ from 'lodash'
import { combineReducers }
from 'redux'
const initialMixerState = {
channels : {},
master : {},
host : {},
sound : false
}
function channelState(channels, chan, state) {
return {
...channels,
[chan]: Object.assign({}, channels[chan], state)
}
}
function shouldP... | JavaScript | 0 | @@ -6,65 +6,228 @@
t _
-from 'lodash'%0A%0Aimport %7B combineReducers %7D %0A from 'redux'
+ from 'lodash'%0Aimport getQueryVariable from './url-params'%0A%0Aimport %7B combineReducers %7D %0A from 'redux'%0A%0Aconst userId = getQueryVariable('user_id') %0Aconst isHost = 'true' == getQueryVari... |
218969787c359c827e87aed39ecd00fa9241a68e | fix test | test/externalTests/exampleBlockFinder.js | test/externalTests/exampleBlockFinder.js | const assert = require('assert')
module.exports = () => (bot, done) => {
bot.test.runExample('examples/blockfinder.js', (name, cb) => {
assert.strictEqual(name, 'finder')
const finderTest = [
cb => {
bot.test.tellAndListen(name, 'find dirt', (message) => {
const matches = /I found ([0... | JavaScript | 0.000002 | @@ -301,16 +301,30 @@
tches =
+message.match(
/I found
@@ -362,22 +362,8 @@
ms/
-.match(message
)%0A
|
6cd9396c2ea71a507f4fac5dc949e521926fd1fe | update baseUrl | frontend/nuxt.config.js | frontend/nuxt.config.js | module.exports = {
env: {
baseUrl: process.env.NODE_ENV !== 'production' ? 'http://test.com' : 'https://chulung.com'
},
/*
** Headers of the page
*/
head: {
titleTemplate: '%s - 初龙的博客',
meta: [
{charset: 'utf-8'},
{name: 'viewport', content: 'width=device-width, initial-scale=1'},
... | JavaScript | 0.000219 | @@ -59,23 +59,24 @@
ENV
-!
+=
== '
-production
+development
' ?
|
4e7c6d62c332bb14606c1a7d9029de13d7ad861b | Remove comments | app/routes.js | app/routes.js | // app/routes.js
module.exports = function(app, passport) {
app.get('/', function(req, res) {
res.render('index.ejs'); // load the index.ejs file
});
// show the login form
app.get('/login', function(req, res) {
// render the page and pass in any flash data if it exists
res.re... | JavaScript | 0 | @@ -1,21 +1,4 @@
-// app/routes.js%0A
modu
|
643b15f8430e95bad556ff150f64e717afd8ad92 | Fix send to tab in controls from error view (#298) | components/general-controls.js | components/general-controls.js | const React = require('react');
const cn = require('classnames');
const sendToAddon = require('../client-lib/send-to-addon');
const sendMetricsEvent = require('../client-lib/send-metrics-event');
module.exports = React.createClass({
getView: function() {
return this.props.loaded ? 'player_view' : 'loading_view';... | JavaScript | 0 | @@ -243,32 +243,79 @@
w: function() %7B%0A
+ if (this.props.error) return 'error_view';%0A
return this.
|
c7a0f20ab84b49cc517e946c0bef1b950547a4cc | Fix plane UVs | shapes/plane.js | shapes/plane.js | import { Entity } from '../core';
import { Render } from '../components';
import { Transform } from '../components';
const vertices = [
-1, 0, 1,
1, 0, 1,
1, 0, -1,
-1, 0, -1
];
const indices = [
0, 1, 3,
3, 1, 2
];
const normals = [
0, 1, 0,
0, 1, 0,
0, 1, 0,
0, 1, 0
];
const uvs... | JavaScript | 0 | @@ -327,14 +327,14 @@
0,
-0
+1
,%0A
-1
+0
, 0,
|
b270d6f43d73613466e32a1dddbdc10d57633911 | Fix issue #24 | components/keybindings/init.js | components/keybindings/init.js | /*
* Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
* as-is and without warranty under the MIT License. See
* [root]/license.txt for more. This information must remain intact.
*/
//////////////////////////////////////////////////////////////////////
// CTRL Key Bind
///////////////////////////////... | JavaScript | 0 | @@ -497,34 +497,25 @@
i
-f(e.ctrlKey) isCtrl = true
+sCtrl = e.ctrlKey
;%0A
|
bf8e7f60aadb768c8cae9fcd83580258abfad035 | update star variables | App_Files/Engine/SkyBox/Stars/Stars.js | App_Files/Engine/SkyBox/Stars/Stars.js | module.exports = function(){
var _azimuth = 0.5,
_sunPosition = new THREE.Vector3(),
_Shader = null,
_geo = new THREE.SphereBufferGeometry( 450000, 32, 15),
_skyMesh = {},
_logged = false,
_starMesh = new THREE.Mesh(
new THREE.SphereBufferGeometry( 0, 0, 0 ),
new THREE.... | JavaScript | 0.000001 | @@ -2192,24 +2192,183 @@
jectRules(%5B%0A
+%0A %22uniform float iGlobalTime;%22,%0A %22uniform vec2 iResolution;%22,%0A%0A %22varying vec2 fragCoord;%22,%0A%0A %22varying vec2 vUv;%22,%0A%0A
|
9aca25d1cdd4ace251519d88c9fbe7fc32681fe5 | Improve the validation mechanism | app/server.js | app/server.js | "use strict";
var http = require('http');
var url = require('url');
var request = require('request');
var querystring = require('querystring');
var podXML = require('./podcast-xml.js');
var config;
try {
config = JSON.parse(require('fs').readFileSync(__dirname + "/config.json"))
} catch (e) {
throw e;
}
var serve... | JavaScript | 0.000076 | @@ -2606,24 +2606,98 @@
nd();%0A%09%09%09%09%7D%0A
+%09%09%09%7D else %7B%0A%09%09%09%09res.write(JSON.stringify(%7Bvalid: false%7D));%0A%09%09%09%09res.end();%0A
%09%09%09%7D%0A%09%09%7D);%0A%09
|
f76836c296b39736798f502a155493353737ea55 | Save multiple occasions of player property in a CONST | app/server.js | app/server.js | const http = require('http');
const path = require('path');
const express = require('express');
const WebSocket = require('ws');
const bodyParser = require('body-parser');
const Twitter = require('twitter');
require('dotenv').config();
const port = process.env.PORT || 3000;
const client = new Twitter({
consumer_ke... | JavaScript | 0 | @@ -4252,32 +4252,81 @@
game.playing) %7B%0A
+ const player = game.players%5Bmessage.id%5D;%0A
console.
@@ -4352,32 +4352,14 @@
-game.
player
-s%5Bmessage.id%5D
.sco
@@ -4367,32 +4367,14 @@
e =
-game.
player
-s%5Bmessage.id%5D
.sco
@@ -4536,32 +4536,14 @@
if (
-game.
player
-s%5Bmessage.i... |
09bc819cde03814ef622fbbb9be104c51e24f6b8 | fix permissions actions | jsapp/js/actions/permissions.es6 | jsapp/js/actions/permissions.es6 | /**
* permissions related actions
*/
import Reflux from 'reflux';
import {dataInterface} from 'js/dataInterface';
import {
t,
notify
} from 'js/utils';
const permissionsActions = Reflux.createActions({
getConfig: {children: ['completed', 'failed']},
getAssetPermissions: {children: ['completed', 'failed']},
... | JavaScript | 0.000001 | @@ -62,16 +62,111 @@
eflux';%0A
+import RefluxPromise from 'js/libs/reflux-promise';%0AReflux.use(RefluxPromise(window.Promise));%0A
import %7B
|
25c456c0c29934d6678681f8afb763e681fec349 | set proper content-type and charset on /auth/calback response | app/server.js | app/server.js | import dotenv from 'dotenv';
import express from 'express';
import compression from 'compression';
import session from 'express-session';
import passport from 'passport';
import { Strategy } from 'passport-github';
import sessionFileStore from 'session-file-store';
import sapper from 'sapper';
import serve from 'serve-... | JavaScript | 0 | @@ -1930,16 +1930,75 @@
.user;%0A%0A
+%09%09res.set(%7B 'Content-Type': 'text/html; charset=utf-8' %7D);%0A
%09%09res.en
|
42b61fddb0f5a7cf6441a7aba5c214709811e1a5 | fix bem impot | jsapp/js/router/accessDenied.es6 | jsapp/js/router/accessDenied.es6 | import React from 'react';
import {bem, makeBem} from 'js/bem';
import {redirectToLogin} from 'js/router/routerUtils';
import {stores} from 'js/stores';
import envStore from 'js/envStore';
import './accessDenied.scss';
bem.AccessDenied = makeBem(null, 'access-denied');
bem.AccessDenied__body = makeBem(bem.AccessDenied... | JavaScript | 0.000003 | @@ -31,14 +31,14 @@
ort
-%7B
bem,
+%7B
make
|
f7a486095a84f5b8278e9f92033c721fa43f96ea | remove exclude of foundation.css from wiredep for other than sass | app/src/ui.js | app/src/ui.js | 'use strict';
module.exports = function(GulpAngularGenerator) {
/**
* Change the ui framework module name for bootstrap
* The Bower package to use is different if sass or another css preprocessor
*/
GulpAngularGenerator.prototype.handleBootstrapVersion = function handleBootstrapVersion() {
if(this.pr... | JavaScript | 0 | @@ -3465,37 +3465,43 @@
reprocessor.
-key !== 'none
+extension === 'scss
') %7B%0A
|
911866e811b6c2098cb1a5df477b4e81767cb795 | fix right-arrow keyboard shortcut | _js/main.js | _js/main.js | (function () {
'use strict';
var num = getNum() || -1;
function getNum () {
var num = window.location.pathname.replace(/[^\d]/g, '');
try {
num = parseInt(num, 10);
} catch (e) {
return;
}
return num;
}
function setNum (increment) {
var num = getNum();
num += increme... | JavaScript | 0.000185 | @@ -5294,25 +5294,25 @@
rowRight': 3
-7
+9
,%0A 's': 8
|
90c60c37c927df97be86616e72c31118098c7ab4 | change require test | test/parseObjectTest.js | test/parseObjectTest.js | "use strict";
var assert = require('chai').assert;
var should = require('chai').should;
var querystring = require("querystring");
var parser = require("../dist/parseobject");
var object = {};
var partialObject = {};
var incorrectObject = {};
var postObject = {};
var putObject = {};
var delObject = {};
describe('Pars... | JavaScript | 0.000002 | @@ -159,17 +159,17 @@
st/parse
-o
+O
bject%22);
|
1b251d689b8862b63fd1e3aa33c0a3dac7c59363 | Add test cases for `else if` | test/rules/space-in-control-statement.js | test/rules/space-in-control-statement.js | import { RuleTester } from 'eslint'
import rule from '../../lib/rules/space-in-control-statement'
import test from 'ava'
const expectedError = ( loc, type ) => ({
message: `There must be a space ${loc} this paren.`,
type: `${type}Statement`,
})
new RuleTester().run('space-in-control-statement', rule, {
valid: [... | JavaScript | 0.000002 | @@ -1359,32 +1359,1321 @@
code:%0A %60%0A
+ if (true) %7B%0A // Do something...%0A %7D%0A %60,%0A errors: %5B%0A expectedError('after', 'If'),%0A expectedError('before', 'If')%0A %5D%0A %7D,%0A %7B%0A code:%0A %60%0A if (true ) %7B%0... |
0ad93f5dec4bdfbfd15be7c6af0248ac084d9363 | change dbURI on 'dronecafe' | app_api/db.js | app_api/db.js | let mongoose = require('mongoose');
let shutdownMongoose;
let dbURI = 'mongodb://localhost/DroneCafe';
if (process.env.NODE_ENV === 'production') {
dbURI = process.env.MONGOLAB_URI;
}
mongoose.connect(dbURI);
// события соединения
mongoose.connection.on('connected', function() {
console.log('Mongoose connecte... | JavaScript | 0 | @@ -88,14 +88,14 @@
ost/
-D
+d
rone
-C
+c
afe'
|
2c0ac6830c794d9923f9558d3a1c732fecae1d51 | Remove useless trace | server/lib/mailer.js | server/lib/mailer.js | //
// Copyright 2009-2015 Ilkka Oksanen <iao@iki.fi>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required b... | JavaScript | 0.000017 | @@ -1801,79 +1801,8 @@
%60);%0A
- %7D else %7B%0A log.info(%60Email sent: $%7Binfo.response%7D%60);%0A
|
7c6919234f521bc019d3df4e69e92771935f5dfe | add test for #613 | test/unit/authMatchPolicyResourceTest.js | test/unit/authMatchPolicyResourceTest.js | /* global describe context it */
const chai = require('chai');
const dirtyChai = require('dirty-chai');
const authMatchPolicyResource = require('../../src/authMatchPolicyResource');
const expect = chai.expect;
chai.use(dirtyChai);
describe('authMatchPolicyResource', () => {
context('when resource has no wildcards',... | JavaScript | 0 | @@ -4776,16 +4776,870 @@
%7D);%0A
+ context('when the resource has single character wildcards', () =%3E %7B%0A const wildcardResource = 'arn:aws:execute-api:eu-west-1:random-account-id:random-api-id/development/GET/d?nosaurs';%0A context('and it matches', () =%3E %7B%0A const resource = 'arn:aw... |
0ec9491d217d858d23980be056374e336b3bc40c | Fix test: Add stub for profiling | test/unit/cartodb/lzmaMiddleware.test.js | test/unit/cartodb/lzmaMiddleware.test.js | var assert = require('assert');
var testHelper = require('../../support/test_helper');
var lzmaMiddleware = require('../../../lib/cartodb/middleware/lzma');
describe('lzma-middleware', function() {
it('it should extend params with decoded lzma', function(done) {
var qo = {
config: {
... | JavaScript | 0.000003 | @@ -693,16 +693,104 @@
a: data%0A
+ %7D,%0A profiler: %7B%0A done: function () %7B%7D%0A
|
fa8478e91cdb4cc3e78646528a519fc06e4aa35d | Exit though process exit handler | bin/jade.js | bin/jade.js | #!/usr/bin/env node
/**
* Module dependencies.
*/
var fs = require('fs')
, program = require('commander')
, path = require('path')
, basename = path.basename
, dirname = path.dirname
, resolve = path.resolve
, exists = fs.existsSync || path.existsSync
, join = path.join
, mkdirp = require('mkdirp')
... | JavaScript | 0 | @@ -3354,16 +3354,85 @@
%7D);%0A
+ process.on('SIGINT', function() %7B%0A process.exit(1);%0A %7D);%0A
%7D else
|
cb222353ad48aed6d081a5b8d977f78066c8329d | add test for keyboard behaviour | test/quick-exit-spec.js | test/quick-exit-spec.js | /*global casper */
var url = 'http://localhost:9999/test/test.html';
casper.test.begin( 'quick exit', 4, function suite( test ) {
casper.start()
.thenOpen( url )
.then(function() {
test.assertExists( 'a#quick-exit', 'Quick exit link is present' );
this.click( 'a#quick-exit' );
test.assertElementCount( '*'... | JavaScript | 0 | @@ -94,16 +94,24 @@
ick exit
+ (click)
', 4, fu
@@ -674,12 +674,701 @@
);%0A%09%7D);%0A%7D);%0A
+%0A%0Acasper.test.begin( 'quick exit (keyboard)', 5, function suite( test ) %7B%0A%0A%09casper.start()%0A%0A%09.thenOpen( url )%0A%09.then(function() %7B%0A%09%09test.assertExists( 'a#quick-exit', 'Quick exit link is pre... |
7562ad88d1a73a00bb4dc4848d937dc90c743ed7 | Read maps, markers, infowins and icons | server/operations.js | server/operations.js | // dependencies
var Api = require ("../apis/api");
/**
* This function validates the post data and
* returns true if data is valid
*
*/
function validateFormData (operation, data, link) {
// operation validators
var validators = {
// template names
_validTypes: ["map", "marker", "infowi... | JavaScript | 0 | @@ -3967,24 +3967,44 @@
te a new map
+/marker/infowin/icon
%0A *%0A */%0Aexpo
@@ -4417,16 +4417,39 @@
ead maps
+/markers/infowins/icons
%0A *%0A */%0A
@@ -4662,12 +4662,19 @@
Api
-.map
+%5Bdata.type%5D
.rea
|
2f2a17f599a3d3de05b61664c6d321494c01e552 | Set long time caching for js/css builds. | server/production.js | server/production.js | /* eslint strict: 0 */
'use strict';
// Load environment variables
require('dotenv-safe').load();
// Load assets
const assets = require('./assets');
const express = require('express');
const compression = require('compression');
const cookieParser = require('cookie-parser');
const server = express();
// Set up the r... | JavaScript | 0 | @@ -415,16 +415,38 @@
('build'
+, %7B%0A%09maxage: '365d',%0A%7D
));%0Aserv
|
3964a3d1132380dc0a05391e62b253a156543ebb | allow space to work. | js/keyboard.js | js/keyboard.js | // Generic Keyboard (compatible)
var Keyboard = {
type: 0x30cf7406,
revision: 1,
manufacturer: 0x904b3115,
CLEAR_BUFFER: 0,
GET_KEY: 1,
SCAN_KEYBOARD: 2,
SET_INT: 3,
BS: 0x10,
ENTER: 0x11,
INSERT: 0x12,
DELETE: 0x13,
UP: 0x80,
DOWN: 0x81,
LEFT: 0x82,
RIGHT: 0x83,
SHIFT: 0x90,
CONTRO... | JavaScript | 0.000003 | @@ -389,16 +389,31 @@
OL: 17,%0A
+ SPACE: 32,%0A
LEFT
@@ -459,16 +459,18 @@
WN: 40,%0A
+//
INSE
@@ -478,16 +478,18 @@
T: 45,%0A
+//
DELET
@@ -1499,16 +1499,41 @@
JS.RIGHT
+ %7C%7C code == this.JS.SPACE
) %7B%0A
|
6f38a2da6b75dd8c1804401948b4ff33171f71a5 | 修改如果有QQ信息,直接返回 | js/postInfo.js | js/postInfo.js | <%
$include["js/answer.js"];
$include["js/questions.js"];
var data = request.post;
var validators = {};
var username = data.name || '';
$include["js/userInfo.js"];
$include["js/validator.js"];
%>
(function(E){
var username = document.getElementById('username');
<%
var path = require('path');
var fs = requir... | JavaScript | 0 | @@ -656,37 +656,38 @@
)');%0A%09%09%09choice.f
-ilter
+orEach
(function(que)%7B%0A
@@ -803,39 +803,24 @@
ult-wrong';%0A
-%09%09%09%09return ok;%0A
%09%09%09%7D);%0A%09%09%7Del
|
1f8a0210228908c00445952812ff5bbb3d240005 | Test that no identifier exists after (method) get() | acorn-v4.js | acorn-v4.js | var asyncExit = /^async[\t ]+(return|throw)/ ;
var atomOrPropertyOrLabel = /^\s*[):;]/ ;
var removeComments = /([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g ;
function hasLineTerminatorBeforeNext(st, since) {
return st.lineStart >= since;
}
function test(regex,st,noComment) {
var src = st.input.slice(st.start) ;... | JavaScript | 0 | @@ -5018,32 +5018,55 @@
;%0A %7D%0A
+ var next ;%0A
if (
@@ -5094,16 +5094,84 @@
s.value%5D
+ && (next = this.input.slice(this.end).match(/%5Cs*(%5Cw*)/)) && next%5B1%5D
)%0A
|
c300204816ad57a33fea88176f13a036838b297b | reset database | back/app.js | back/app.js | const os = require('os');
const path = require('path');
const express = require('express');
const cookieParser = require('cookie-parser');
const session = require('express-session');
const SequelizeStore = require('connect-session-sequelize')(session.Store);
const logger = require('morgan');
const favicon = require('se... | JavaScript | 0.000002 | @@ -3423,16 +3423,19 @@
port);%0A%0A
+//
models.s
@@ -3450,19 +3450,16 @@
.sync()%0A
-//
models.s
|
add6f1d0ff2b982e2d434db4a4a32e53c3d1e6b1 | add secure check for list when creating contest | controllers/contests.js | controllers/contests.js | const Contest = require('../models/Contest')
const Ids = require('../models/ID')
const { extractPagination, isUndefined } = require('../utils')
/** 返回比赛列表 */
async function queryList (ctx, next) {
const filter = {} // 用于 mongoose 的筛选
if (ctx.query.field) {
// https://docs.mongodb.com/manual/reference/operator... | JavaScript | 0 | @@ -38,16 +38,61 @@
ntest')%0A
+const Problem = require('../models/Problem')%0A
const Id
@@ -2155,16 +2155,266 @@
st.body%0A
+%0A // %E6%A3%80%E6%9F%A5%E5%88%97%E8%A1%A8%E9%87%8C%E7%9A%84%E9%A2%98%E6%98%AF%E5%90%A6%E9%83%BD%E5%AD%98%E5%9C%A8%0A const ps = await Promise.all(%0A list.map((pid) =%3E Problem.findOn... |
2682962c44e67a30d48e47181cffe653d22633bd | add logic for internal v external page links and manually add hash back to link | book/nio.js | book/nio.js | require(["gitbook"], function(gitbook) {
gitbook.events.bind("page.change", function(event) {
function resetToc() {
$('.js-toolbar-action > .fa').removeClass('fa-chevron-down--rotate180');
$('.book-header').removeClass('toc-open');
};
function setBodyScroll() {
const scro... | JavaScript | 0 | @@ -653,138 +653,535 @@
-$('a%5Bhref*=%22#%22%5D').click(function(e) %7B%0A $('html, body').animate(%7B scrollTop: $(e.currentTarget.hash).offset().top%7D, 1000);
+// for any link that includes a '#', but not only a '#'%0A $('a%5Bhref*=%22#%22%5D').click(function(e) %7B%0A // if an intern... |
1671f2dd121799eba8e28aa6b2db0282ec678dfe | Remove unused unsubscribes in example app. | Example/app/containers/DeviceDetail.js | Example/app/containers/DeviceDetail.js | import React, { PropTypes } from 'react';
import { Text, View, StyleSheet, ActivityIndicator, TouchableOpacity } from 'react-native';
import { connect } from 'react-redux';
import TopBar from '../components/TopBar';
import ServiceList from '../components/ServiceList';
import Bluetooth from 'react-native-bluetooth';
im... | JavaScript | 0 | @@ -1343,85 +1343,8 @@
%7D,%0A%0A
- componentWillUnmount() %7B%0A this.unsubscribe && this.unsubscribe();%0A %7D,%0A%0A
di
@@ -1529,82 +1529,8 @@
s;%0A%0A
- this.unsubscribe && this.unsubscribe();%0A this.unsubscribe = null;%0A%0A
@@ -1896,17 +1896,16 @@
;%0A %7D%0A
-%0A
%7D,%0A%0A
|
3b0fc2e20ac7091ee0d29b90631be098e09a6beb | Remove global addDecorator | react/.storybook/config.js | react/.storybook/config.js | import React from 'react';
import { configure, addDecorator, addParameters } from '@storybook/react';
import '../../html/_spark.scss';
import { withA11y } from '@storybook/addon-a11y';
import sparkTheme from "../../storybook-theming/storybook-spark-theme";
import { withTests } from '@storybook/addon-jest';
import resul... | JavaScript | 0 | @@ -566,74 +566,8 @@
));%0A
-addDecorator(story =%3E %3Cdiv className=%22sprk-o-Box%22%3E%7Bstory()%7D%3C/div%3E)
%0A//
|
7b29adfacd00d6ed3d1751044e58ab13b7374bc2 | Factor out 'projector' string, see https://github.com/phetsims/scenery-phet/issues/515 | js/ProjectorModeCheckbox.js | js/ProjectorModeCheckbox.js | // Copyright 2018-2021, University of Colorado Boulder
/**
* ProjectorModeCheckbox is a checkbox used to switch between 'default' and 'projector' color profiles.
* It is most commonly used in the Options dialog, accessed from the PhET menu in some sims. It wires up to the
* singleton instance of SCENERY/colorProfil... | JavaScript | 0.999987 | @@ -2559,27 +2559,61 @@
ame ===
-'projector'
+SceneryConstants.PROJECTOR_COLOR_PROFILE_NAME
);%0A
|
a9411ef17cca6badc45ea72c73e5b87abf2ef4b7 | Remove dead code | skeletons/app/bundles/frontend/public/js/global.js | skeletons/app/bundles/frontend/public/js/global.js | graoJS = angular.module('graoJS', ['ngResource', 'ui.bootstrap', 'ui.select2']);
graoJS.constant("config", {
baseUrl: window.location.protocol+"//"+
window.location.hostname+":"+
window.location.port+"\:"+
window.location.port
});
function clearObject(obj){
for (var o in obj) {
if (isNaN(parseInt(o... | JavaScript | 0.001497 | @@ -77,172 +77,8 @@
'%5D);
-%0AgraoJS.constant(%22config%22, %7B%0A baseUrl: window.location.protocol+%22//%22+%0A window.location.hostname+%22:%22+%0A window.location.port+%22%5C:%22+%0A window.location.port%0A%7D);
%0A%0Afu
@@ -3726,12 +3726,13 @@
: 1 %7D;%0A %7D%0A%7D
+%0A
|
6bc7fb4541bf5e590aaba8a8fa156f2711d3d141 | Add constructor annotation as part of phetsims/joist#189 review | js/SpinningIndicatorNode.js | js/SpinningIndicatorNode.js | // Copyright 2002-2015, University of Colorado Boulder
/**
* A spinnable busy indicator, to indicate something behind the scenes is in progress (but with no indication of how
* far along it is).
*
* The actual rectangles/circles/etc. (called elements in the documentation) stay in fixed positions, but their fill is... | JavaScript | 0 | @@ -732,16 +732,76 @@
or' );%0A%0A
+%0A /**%0A * @param %7Bobject%7D options%0A * @constructor%0A */%0A
functi
|
afbc662dcdf7f6846c9a4dd8466c56effc155455 | fix gettings user roles from cache (#2034) | src/Auth.js | src/Auth.js | var deepcopy = require('deepcopy');
var Parse = require('parse/node').Parse;
var RestQuery = require('./RestQuery');
// An Auth object tells you who is requesting something and whether
// the master key was used.
// userObject is a Parse.User and can be null if there's no user.
function Auth({ config, isMaster = false... | JavaScript | 0 | @@ -3221,24 +3221,60 @@
les = true;%0A
+ this.userRoles = cachedRoles;%0A
return
|
86ac19830490ce57fa859752833ecddd40ba9977 | fix merge | controllers/earnings.js | controllers/earnings.js | var config = require(__dirname + '/../config/config'),
logger = require(__dirname + '/../lib/logger'),
util = require(__dirname + '/../helpers/util'),
qs = require('querystring'),
http = require('http'),
mysql = require(__dirname + '/../lib/mysql')(config.db_earnings);
//get each earnings from the databa... | JavaScript | 0.000001 | @@ -1686,16 +1686,29 @@
%09%09%09mysql
+.open().query
('INSERT
@@ -1877,16 +1877,33 @@
%09%09%09%09%7D);%0A
+%09%09%09%09%09mysql.end();
%0A%09%09%09%09%7D%0A%09
|
b1f18cd8aeb4cbad35dd4c5fb79182dbff18a1fc | Fix test | packages/core/src/transitions/index.spec.js | packages/core/src/transitions/index.spec.js | import * as module from './';
describe('core root', () => {
it('should pass', () => {
expect(module).to.have.keys('expand', 'fadeout', 'move', 'reveal');
});
});
| JavaScript | 0.000004 | @@ -119,16 +119,38 @@
ys('
-e
+circleE
xpand',
+ 'circleShrink',
'fa
@@ -173,16 +173,26 @@
'reveal'
+, 'custom'
);%0A %7D);
|
8771600d142cd774e50532d31d3cb362eab958b6 | fix callData usage | Sources/Rendering/Core/PointPicker/example/PickerInteractorStyle.js | Sources/Rendering/Core/PointPicker/example/PickerInteractorStyle.js | import macro from 'vtk.js/Sources/macro';
import vtkInteractorStyleTrackballCamera from 'vtk.js/Sources/Interaction/Style/InteractorStyleTrackballCamera';
import vtkSphereSource from 'vtk.js/Sources/Filters/Sources/SphereSource';
import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor';
import vtkMapper from 'vtk.js/... | JavaScript | 0 | @@ -824,16 +824,24 @@
ress = (
+callData
) =%3E %7B%0A
@@ -859,235 +859,63 @@
s =
-model.interactor.getEventPosition(%0A model.interactor.getPointerIndex()%0A );%0A publicAPI.findPokedRenderer(pos.x, pos.y);%0A if (model.currentRenderer === null) %7B%0A return;%0A %7D%0A%0A const renderer ... |
7c2620d6de71108237e62c3979d23ff96e7397be | Allow to override router's handleURL | packages/ember-routing/lib/system/router.js | packages/ember-routing/lib/system/router.js | /**
@module ember
@submodule ember-routing
*/
var Router = requireModule("router");
var get = Ember.get, set = Ember.set, classify = Ember.String.classify;
var DefaultView = Ember.View.extend(Ember._Metamorph);
require("ember-routing/system/dsl");
function setupLocation(router) {
var location = get(router, 'locat... | JavaScript | 0 | @@ -1165,30 +1165,28 @@
nd());%0A%0A
-router
+this
.handleURL(l
@@ -1251,22 +1251,20 @@
%7B%0A
-router
+self
.handleU
|
08d4a3489c356f84df4f0aa0aacb896ea57f148e | fix handlebars require 2 | app/assets/javascripts/farma_keyboard_rails_main.js | app/assets/javascripts/farma_keyboard_rails_main.js | //= require_tree .
| JavaScript | 0.000024 | @@ -1,8 +1,31 @@
+//= require handlebars%0A
//= requ
|
2e3520bf61b08bf4a1c386b2c90ba6a8707c42b2 | use 400 messages | controllers/messages.js | controllers/messages.js | var async = require('async'),
config = require('../config'),
faye = require('faye'),
models = require('../models'),
services = require('../services');
exports.index = function(req, res) {
// TODO: add paging, querying
var filter = {};
var start = 0;
var limit = 200;
var sort = { timestam... | JavaScript | 0 | @@ -287,9 +287,9 @@
t =
-2
+4
00;%0A
|
7c830fa7320fdcbe29ce425efd3748e75005902a | Rename Chart in Base to cleanup build | src/Base.js | src/Base.js | import d3 from 'd3';
import {
difference,
extend,
inherits,
isString,
objectEach
} from './utils';
import {
property,
bindAllDi,
dimensions
} from './helpers';
var Chart = d3.chart();
// TEMP Clear namespace from mixins
/**
@namespace
*/
/**
Shared functionality between all charts and components.
... | JavaScript | 0 | @@ -173,16 +173,18 @@
s';%0Avar
+d3
Chart =
@@ -195,16 +195,16 @@
hart();%0A
-
%0A// TEMP
@@ -983,16 +983,18 @@
s(Base,
+d3
Chart);%0A
@@ -1726,24 +1726,26 @@
pe%0A layer:
+d3
Chart.protot
@@ -1762,24 +1762,26 @@
%0A unlayer:
+d3
Chart.protot
@@ -1803,16 +1803,18 @@
attach:
+d3
Chart.pr
@@ -1835,16 ... |
69ba5a4616081d4c0808130b972df9e550084ecb | Revert event publish | app/assets/javascripts/modules/show-hide-content.js | app/assets/javascripts/modules/show-hide-content.js | ;
(function(global) {
'use strict'
var $ = global.jQuery
var GOVUK = global.GOVUK || {}
function ShowHideContent() {
var self = this
// Radio and Checkbox selectors
var selectors = {
namespace: 'ShowHideContent',
radio: '[data-target] > input[type="radio"]',
checkbox: '[data-tar... | JavaScript | 0 | @@ -1699,70 +1699,8 @@
%7D%0A
- $.publish('/multiple-choice/content/show/', $content)%0A
@@ -2181,70 +2181,8 @@
%7D%0A
- $.publish('/multiple-choice/content/hide/', $content)%0A
|
aa073df76997ebd6a956f65746c08f2002b52dde | Fix cache drop | techs/y-i18n-lang-js.js | techs/y-i18n-lang-js.js | /**
* y-i18n-lang-js
* ==============
*
* Собирает `?.lang.<язык>.js`-файлы на основе `i18n`-файлов.
*
* Используется для локализации в JS с помощью compact-tl + y-i18n-layer.
*
* **Опции**
*
* * *String* **target** — Результирующий таргет. По умолчанию — `?.lang.{lang}.js`.
* * *String* **lang** — Язык, для... | JavaScript | 0.000001 | @@ -4452,16 +4452,25 @@
reCache(
+require,
keysetFi
|
c203f24d9af2fa2c5e9a46ffc61e5969f9989df2 | use 10meter fog | js/components/render_engine.js | js/components/render_engine.js | /**
* Create new RenderEngine.
*
* @param debug
* @param vr
* @constructor
*/
function RenderEngine(debug, vr) {
var self = this;
this.controls = [];
this.createScene();
this.createCamera();
this.createRenderer();
this.addFloor();
if(vr && !debug) {
this.addFog();
}
if(debug) {
this.... | JavaScript | 0.000003 | @@ -2610,36 +2610,12 @@
0,
-RenderEngine.SENSOR_DISTANCE
+1000
);%0A%7D
|
b1c0949f8cfe898f9f8f8128e83b7d5afebc0497 | Convert tabs to spaces to be consistent with project | packages/nexrender-provider-s3/src/index.js | packages/nexrender-provider-s3/src/index.js | const fs = require('fs')
const uri = require('amazon-s3-uri')
const AWS = require('aws-sdk/global')
const S3 = require('aws-sdk/clients/s3')
let regions = {}
let endpoints = {}
/* return a credentials object if possible, otherwise return false */
const getCredentials = params => {
if (params.profile) {
/... | JavaScript | 0.000097 | @@ -1233,25 +1233,32 @@
: region %7D%0A%0A
-%09
+
if (credenti
@@ -1551,17 +1551,24 @@
oint %7D%0A%0A
-%09
+
if (cred
@@ -2448,17 +2448,24 @@
%7D%0A%0A
-%09
+
const cr
@@ -4536,9 +4536,16 @@
a;%0A%0A
-%09
+
cons
|
ac9e006577f7f3318a37e5294a46e758a6c371ef | add loading bar | js/controllers/NewEmailCtrl.js | js/controllers/NewEmailCtrl.js | newsletterjs.controller('NewEmailCtrl', function($scope, database, $location, cfpLoadingBar){
var emaillists;
$scope.getEmailLists = function(){
database.getEmailLists().then(function (data) {
emaillists = data;
var i = 0;
for (i=0; i<emaillists.length; i++){
var emails = [];
emails = emaillists[i... | JavaScript | 0.000001 | @@ -2272,15 +2272,85 @@
,%22)
-+ %22, %22;
+;%0A%09%09%09%09if (i!=$scope.listsToSelect.length - 1)%7B%0A%09%09%09%09%09recipients += %22, %22;%0A%09%09%09%09%7D
%0A%09%09%09
|
f4d79cf2e7924ef1dd294e8c37ce54bfc2a73d02 | Add pagination logic, cleanup re-org code | js/controllers/catalog-ctrl.js | js/controllers/catalog-ctrl.js | catalogApp.controller('CatalogCtrl', ['$scope', 'assetService', function($scope, assetService) {
$scope.assets = [];
$scope.totalHits = 0;
$scope.getAssets = function(data) {
var promise = assetService.getAssets({
data: data
});
promise.then(function(response) {
var originalAssets = resp... | JavaScript | 0.000001 | @@ -113,16 +113,118 @@
s = %5B%5D;%0A
+ $scope.currentPage = 0;%0A $scope.totalPages = 1;%0A $scope.pageNumbers = %5B%5D;%0A $scope.pageSize = 20;%0A
$scope
@@ -239,17 +239,16 @@
ts = 0;%0A
-%0A
$scope
@@ -248,25 +248,53 @@
$scope.
-getAssets
+pageOffset = 0;%0A%0A var initPagination
= funct
@@ -297,20... |
c50233099ab5d5c5e8f79e3318af6e03e4ee65d7 | add display:none to getStringWidth svg | packages/vx-text/src/util/getStringWidth.js | packages/vx-text/src/util/getStringWidth.js | import memoize from 'lodash/memoize';
const MEASUREMENT_ELEMENT_ID = '__react_svg_text_measurement_id';
function getStringWidth(str, style) {
try {
// Calculate length of each word to be used to determine number of words per line
let textEl = document.getElementById(MEASUREMENT_ELEMENT_ID);
if (!textEl)... | JavaScript | 0 | @@ -448,24 +448,58 @@
height = 0;%0A
+ svg.style.display = 'none';%0A
textEl
|
a68c16a334762b1084ed21bfbcc1d2ad48424e08 | Save the time with tweets | claptrap.js | claptrap.js | const fs = require('fs');
const util = require('util');
const toml = require('toml');
const backoff = require('backoff');
const Twitter = require('twitter');
const sqlite3 = require('sqlite3');
const streamBackoff = backoff.exponential({
maxDelay: 60 * 1000
});
var dbCon = null;
streamBackoff.failAfter(15);
functio... | JavaScript | 0.000119 | @@ -1180,24 +1180,71 @@
vent.text);%0A
+ var date = new Date(event.created_at);%0A
db.r
@@ -1282,16 +1282,27 @@
d, user,
+ timestamp,
body) V
@@ -1313,16 +1313,19 @@
S (?, ?,
+ ?,
?)', %5B%0A
@@ -1373,16 +1373,46 @@
en_name,
+ date.toISOString(),%0A
JSON.st
@@ -2039,16 +2039,35 @@
VA... |
d1f625f70e81c3b94fc023fd29bdb400bb140570 | Update copy files Fix the copy of the images | generators/app/index.js | generators/app/index.js | /**
* @license
* Copyright (c) 2016 The IBM Research Emergent Solutions authors. All rights reserved.
* This code may only be used under the MIT style license found at https://ibmresearch.github.io/LICENSE.txt
* The complete set of authors may be found at https://ibmresearch.github.io/AUTHORS.txt
* The complete se... | JavaScript | 0.000101 | @@ -1299,62 +1299,396 @@
th('
-_gitignore'),%0A this.destinationPath('.gitignore')
+gulp-tasks/'),%0A this.destinationPath('gulp-tasks/')%0A );%0A%0A this.fs.copy(%0A this.templatePath('images/'),%0A this.destinationPath('images/')%0A );%0A%0A this.fs.copyTpl(%0A this.templatePath(... |
2674f4874452d2fb50b5e0f898fd4706c3bdd9db | remove old props | packages/vx-tooltip/src/tooltips/Tooltip.js | packages/vx-tooltip/src/tooltips/Tooltip.js | import React from 'react';
import cx from 'classnames';
export default function Tooltip(props) {
const { className, ...restProps } = props;
return (
<div
className={cx('vx-tooltip-portal', className)}
style={{
position: 'absolute',
top: props.top,
left: props.left,
b... | JavaScript | 0.000001 | @@ -258,58 +258,8 @@
e',%0A
- top: props.top,%0A left: props.left,%0A
|
4db3cf771fe4adb39e049ca2b75fe00b6be74e6c | Clean up | js/timeline.js | js/timeline.js | function buildTimeline() {
var binWidth = 12;
var binNum = 1200 / binWidth;
var binnedData = _.toArray(_.groupBy(data.maps, function(v, k) {
var year = +v.date;
var mod = year % binWidth;
return year - mod;
}));
console.log(binnedData);
// sortedData //This needs to be an array of arrays with th... | JavaScript | 0.000002 | @@ -228,132 +228,8 @@
%7D));
-%0A console.log(binnedData);%0A // sortedData //This needs to be an array of arrays with the mapnumber somehow embedded in it%0A
%0A
@@ -1127,24 +1127,8 @@
d) %7B
- console.log(d);
ret
|
048e306a70cac09b3a320c5b786774a32d560b15 | Add first tweet | bot/main.js | bot/main.js | const client = require('./api/twitter-api');
const logger = require('./utils/logger');
// Verify Authentication
client.get('account/verify_credentials',{})
.then(() => {
logger.info('Successfully Authenticated.');
}, err => {
logger.error('Authentication failed: Invalid credentials.', {error: e... | JavaScript | 0.999999 | @@ -351,8 +351,273 @@
%0A %7D);
+%0A%0Avar tweet = 'Hello world %5CuD83C%5CuDF0F %5CnThis is posted via the twitter API.';%0Aclient.post('statuses/update', %7Bstatus: tweet%7D)%0A .then(() =%3E %7B%0A logger.info('Added a new tweet');%0A %7D, err =%3E %7B%0A logger.error('Error Tweeting', %7Berr... |
87fc7d7b53c8527d78448694ec147670acc89e22 | Add and improve defaults for project name variants in the prompts | generators/app/index.js | generators/app/index.js | /* eslint capitalized-comments: ["off"],
comma-dangle: ["off"] */
/**
* @fileOverview The main code for this generator.
*
* @author Andy Culbertson
*
* @requires NPM:yeoman-generator
* @requires NPM:chalk
* @requires NPM:yosay
* @requires NPM:mkdirp
*/
'use strict';
const Generator = require('yeoma... | JavaScript | 0 | @@ -740,39 +740,205 @@
project name?',%0A
+ // Title case the appname. Based on https://stackoverflow.com/a/196991.%0A default: this.appname.replace(/%5Cb%5Cw/g, function(txt)%7Breturn txt.toUpperCase();%7D),%0A
%7D,%0A
-
%7B%0A type
@@ -1046,16 +1046,35 @@
.appname
+.replace(/ /g, '-')
,%0A... |
fbc1155d7676818975362af86e8982b911bcb46f | Add evt.js | js/rolling_spider_helper.js | js/rolling_spider_helper.js | function RollingSpiderHelper() {
this._manager = navigator.mozBluetooth;
this.connected = false;
this._characteristics = {};
this._counter = 1;
}
RollingSpiderHelper.prototype = {
startScan: function StartScan(){
if(!this._adapter){
this._adapter = this._manager.defaultAdapter;
}
this._adap... | JavaScript | 0.000019 | @@ -180,16 +180,20 @@
otype =
+evt(
%7B%0A star
@@ -4070,11 +4070,12 @@
);%0A %7D%0A%7D
+)
;%0A%0A
|
6621e6a28e44a456da9e478fe244f14950087cd0 | add a check for repo before trying to use it | generators/git/index.js | generators/git/index.js | 'use strict';
var generators = require('yeoman-generator');
var originUrl = require('git-remote-origin-url');
module.exports = generators.Base.extend({
constructor: function () {
generators.Base.apply(this, arguments);
this.option('generateInto', {
type: String,
required: false,
defaults: ... | JavaScript | 0 | @@ -1865,16 +1865,39 @@
pository
+ && this.pkg.repository
.indexOf
|
08cd96f076de56d96b8d6e1174a8d16c684747f3 | revise QA credits, https://github.com/phetsims/graphing-quadratics/issues/155 | js/graphing-quadratics-main.js | js/graphing-quadratics-main.js | // Copyright 2014-2021, University of Colorado Boulder
/**
* Main entry point for the 'Graphing Quadratics' sim.
*
* @author Andrea Lin
* @author Chris Malley (PixelZoom, Inc.)
*/
import Sim from '../../joist/js/Sim.js';
import simLauncher from '../../joist/js/simLauncher.js';
import Tandem from '../../tandem/js... | JavaScript | 0 | @@ -1342,33 +1342,91 @@
on,
-Laura Rea, Jacob Romero,
+Brooklyn Lash, Emily Miller, Laura Rea, Jacob Romero, ' +%0A '
Nanc
|
7348e71f194b46cc0d89f3f067f4a635a7cc899f | Add optional context argument | smoothscroll.js | smoothscroll.js | (function (root, smoothScroll) {
'use strict';
// Support RequireJS and CommonJS/NodeJS module formats.
// Attach smoothScroll to the `window` when executed as a <script>.
// RequireJS
if (typeof define === 'function' && define.amd) {
define(smoothScroll);
// CommonJS
} else if (typeof exports === ... | JavaScript | 0.999981 | @@ -2214,16 +2214,83 @@
inished%0A
+// if context is set then scroll that element, else scroll window %0A
var smoo
@@ -2331,16 +2331,25 @@
callback
+, context
)%7B%0A d
@@ -2375,16 +2375,49 @@
%7C%7C 500;%0A
+ context = context %7C%7C window;%0A
var
@@ -2854,24 +2854,153 @@
ck;%0A
+if (context... |
5dc4cd4da92fb9ed683cb10c70bacc2054e4dba0 | Use of $.extend was creating a new copy of $.mobile and that's a no-no | js/jquery.mobile.transition.js | js/jquery.mobile.transition.js |
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Animated page change core logic and sequence handlers
//>>label: Transition Core
//>>group: Transitions
//>>css.structure: ../css/structure/jquery.mobile.transition.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css
define( [... | JavaScript | 0.000023 | @@ -4008,16 +4008,110 @@
false )
+,%0A%09defaultGetMaxScrollForTransition = function() %7B%0A%09%09return $.mobile.getScreenHeight() * 3;%0A%09%7D
;%0A%0A// Ma
@@ -4819,136 +4819,201 @@
%7D;%0A%0A
-$.mobile = $.extend( %7B%7D, %7B%0A%09getMaxScrollForTransition: function() %7B%0A%09%09return $.mobile.getScreenHeig... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.