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 |
|---|---|---|---|---|---|---|---|
8559c1818c07e0554125715152df17cf49641c8b | move autoresize to didUpdate | components/input/Input.js | components/input/Input.js | import React from 'react';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { INPUT } from '../identifiers.js';
import InjectedFontIcon from '../font_icon/FontIcon.js';
const factory = (FontIcon) => {
class Input extends React.Component {
static propTypes = {
children: R... | JavaScript | 0.000017 | @@ -2255,32 +2255,306 @@
%0A %7D%0A %7D%0A%0A
+ componentDidUpdate (prevProps) %7B%0A const %7B multiline, value %7D = this.props;%0A%0A // resize the textarea, if nessesary%0A if (multiline && (prevProps.value && prevProps.value.length) !== (value && value.length)) %7B%0A this.handleA... |
d87449c57f7de4587e792100ec4289a5e5478fc5 | Revert "Reset width before decription" | src/js/directive/read.js | src/js/directive/read.js | 'use strict';
var ngModule = angular.module('woDirectives');
ngModule.directive('replySelection', function() {
return function(scope, elm) {
var popover, visible;
popover = angular.element(document.querySelector('.reply-selection'));
visible = false;
elm.on('touchstart click', ap... | JavaScript | 0 | @@ -3139,35 +3139,8 @@
%7D%0A%0A
- resetWidth();%0A%0A
@@ -3564,32 +3564,59 @@
%0A %7D%0A%0A
+ resetWidth();%0A%0A
if (
|
2664b7c1a6be05fa239dfef857cedf48fd320487 | add origin as property | src/js/mixin/toggable.js | src/js/mixin/toggable.js | import $ from 'jquery';
import {Animation, extend, isString, Transition} from '../util/index';
export default function (UIkit) {
UIkit.mixin.toggable = {
props: {
cls: Boolean,
animation: Boolean,
duration: Number,
transition: String
},
def... | JavaScript | 0.000001 | @@ -221,32 +221,60 @@
ation: Boolean,%0A
+ origin: String,%0A
dura
|
fd9e00d0a1a09a60c75fcd4d83d5cdad1ab4c279 | Add `groupBy` utility function | src/js/utils/group-by.js | src/js/utils/group-by.js | JavaScript | 0.000003 | @@ -0,0 +1,887 @@
+const takeProps = (entry, props) =%3E%0A props.reduce((filteredEntry, prop) =%3E %7B%0A filteredEntry%5Bprop%5D = entry%5Bprop%5D%0A return filteredEntry%0A %7D, %7B%7D)%0A %0Aconst leaveProps = (entry, ...remove) =%3E%0A Object.keys(entry).reduce((filteredEntry, prop) =%3E %7B%0A if (re... | |
16546b2d5762665844bb3448013b8af4f13102c1 | Add list handling routines. | src/list.js | src/list.js | JavaScript | 0 | @@ -0,0 +1,2492 @@
+/******************************************************************************%0A * ~list~ *%0A * %E2%80%BE%E2%80%BE%E2%80%BE%E2%80%BE%E2%80%BE%E2%80%BE%E2%80%BE%E2%80%BE%E2%80%BE%E2%80%BE ... | |
6d53892968e95881d096edd7966445e815cadce9 | create isLeapYear.js based off Wikipedia algorihm | isLeapYear.js | isLeapYear.js | JavaScript | 0.000056 | @@ -0,0 +1,312 @@
+var isLeapYear = function isLeapYear(year) %7B%0A // https://en.wikipedia.org/wiki/Leap_year#Algorithm%0A if ((year %25 4) !== 0) %7B%0A return false;%0A %7D else if ((year %25 100) !== 0) %7B%0A return true;%0A %7D else if ((year %25 400) !== 0) %7B%0A return false;%... | |
ef8a375664ded8fdf2d39b5490fd9ee7c6a332f5 | Add modules selector | src/selectors/modules.js | src/selectors/modules.js | JavaScript | 0.000001 | @@ -0,0 +1,206 @@
+/**%0A * mSupply Mobile%0A * Sustainable Solutions (NZ) Ltd. 2020%0A */%0A%0Aexport const selectUsingSupplierCredits = (%7B modules %7D) =%3E %7B%0A const %7B usingSupplierCredits %7D = modules;%0A return usingSupplierCredits;%0A%7D;%0A
| |
a1f670e1f425ca7a260a99e3d7b581a569abb87e | add Login container example | stories/containers/login.stories.js | stories/containers/login.stories.js | JavaScript | 0.000002 | @@ -0,0 +1,424 @@
+import React from 'react'%0Aimport %7B storiesOf %7D from '@storybook/react'%0Aimport Login from 'containers/Login'%0Aimport %7B Provider %7D from '../Provider'%0Aimport %7B Window %7D from '../helpers'%0A%0AstoriesOf('Containers.Login', module)%0A .addDecorator(story =%3E %3CProvider story=%7Bstory... | |
ee42b5138b138dec2b66a572fbe6d65449ec0de7 | Add more example tests | examples/simple/imports/common.tests.js | examples/simple/imports/common.tests.js | JavaScript | 0 | @@ -0,0 +1,407 @@
+/*eslint-env mocha*/%0Aimport %7B Fake %7D from 'meteor/anti:fake';%0A%0Adescribe('Test Anything', function () %7B%0A describe('Given a very long test report', function () %7B%0A for (let i=0; i%3C50; i+=1) %7B%0A it(%60should $%7BFake.sentence().toLowerCase()%7D%60, () =%3E %7B%7D);%0A %... | |
b6245bdef7d0ee8e748fa08144f60f12fb366483 | Remove console.log from XML test spec | test/nodes/core/parsers/70-XML_spec.js | test/nodes/core/parsers/70-XML_spec.js | /**
* Copyright 2014 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wr... | JavaScript | 0.000001 | @@ -2681,50 +2681,8 @@
');%0A
- console.log(msg.payload);%0A
|
746e6de076d380225f5e157e929d96ab39d8cff8 | add polyfills for webpack | config/webpack/polyfills.js | config/webpack/polyfills.js | JavaScript | 0.000006 | @@ -0,0 +1,64 @@
+require('es6-promise').polyfill();%0Arequire('isomorphic-fetch');%0A
| |
46c417e4e8090398fe6a5073aa53e2a21a263617 | Create Slack client class | lib/client.js | lib/client.js | JavaScript | 0 | @@ -0,0 +1,745 @@
+%0A/** Class representing Slack client */%0Amodule.exports = class Slack %7B%0A%0A /**%0A * Create a Slack client%0A * @param %7Bobject%7D opts%0A * @param %7Bstring%7D opts.url - Slack Incoming Webhook url%0A * @param %7Bstring%7D opts.name - Sender name to override default%0A ... | |
8ae7a077b9d64d6c9775ae7833a1c822801b3605 | Add some common HTTP error helpers | lib/errors.js | lib/errors.js | JavaScript | 0.000001 | @@ -0,0 +1,561 @@
+function httpError ( message, code ) %7B%0A%0A var err = new Error( message );%0A err.status = code;%0A%0A return err;%0A%0A%7D%0A%0A%0Aexports.system = function ( message ) %7B%0A%0A return httpError( message, 500 );%0A%0A%7D;%0A%0A%0Aexports.auth = function ( message ) %7B%0A%0A retu... | |
ba39864beddc267148284bd21ee771ebb6440f26 | use bower registered components | app/index.js | app/index.js | 'use strict';
var yeoman = require('yeoman-generator');
var yosay = require('yosay');
var path = require('path');
// Eventually we'll generate this list dynamically from GitHub.
var frameworkComponents = [
{ name: 'Core', value: 'cf-core' },
{ name: 'Buttons', value: 'cf-buttons' },
{ name: 'Expandables', value... | JavaScript | 0 | @@ -3470,125 +3470,10 @@
one)
-,%0A components = this.components.map( function( component ) %7B%0A return 'cfpb/' + component;%0A %7D)
;
+%0A
%0A
|
a7ec8442fc51a15a3df188bf50398d900630ccaf | Create signer.service.js | backend/signer/signer.service.js | backend/signer/signer.service.js | JavaScript | 0.000001 | @@ -0,0 +1,935 @@
+var Signer = require('./signer.model');%0Avar bookshelf = require('../config/bookshelf');%0A%0Avar signerCollection = bookshelf.Collection.extend(%7B%0A model: Signer%0A%7D);%0A%0A%0Amodule.exports = %7B%0A%0A%0A save: function (req, res) %7B%0A // create array of signers%0A // %0A var s... | |
91f0f211f7ac8b42555631ca64f478ae70f991a4 | Add CharsetNormalizer processor | lib/mincer/processors/charset_normalizer.js | lib/mincer/processors/charset_normalizer.js | JavaScript | 0 | @@ -0,0 +1,1303 @@
+/**%0A * class CharsetNormalizer%0A *%0A * Some browsers have issues with stylesheets that contain multiple%0A * %60@charset%60 definitions. The %60CharsetNormalizer%60 processor strips%0A * out multiple %60@charset%60 definitions.%0A *%0A * The current implementation is naive. It picks the fir... | |
446e0a34cd30619618d0292f975b4bb775fd0f2b | Add makie configuration file | etc/.makie.js | etc/.makie.js | JavaScript | 0.000001 | @@ -0,0 +1,787 @@
+%22use strict%22;%0A%0A// MODULES //%0A%0Avar path = require( 'path' );%0A%0A%0A// VARIABLES //%0A%0Avar prefix = path.resolve( __dirname, '../tools/misc' );%0A%0A%0A// CONFIG //%0A%0Avar config = %7B%7D;%0Avar plugins = %7B%7D;%0A%0Aconfig.plugins = plugins;%0A%0A%0A// PLUGINS //%0A%0Aplugins%5B 're... | |
191894db5c4bf0f9fa8e2c9a16e8bbd878e13d54 | Add customised asciimath plugin library for webpack | sashimi-webapp/src/logic/documentPackager/markdown-it-asciimath.js | sashimi-webapp/src/logic/documentPackager/markdown-it-asciimath.js | JavaScript | 0 | @@ -0,0 +1,1907 @@
+/**%0A * Code were taken from https://github.com/quertt/markdown-it-asciimath%0A * and modified for use with webpack, since the original npm package%0A * wasn't meant for use with webpack.%0A * Credits to: quertt for the wonderful library%0A */%0A%0Aimport katex from 'katex';%0Aimport asciiMathTexIm... | |
e825cb266de704d9e9f688aecd621beb4395d089 | fix 3 | src/main.js | src/main.js | 'use strict';
require('require');
require('prototype_creep_startup_tasks');
require('prototype_creep_move');
require('prototype_roomPosition');
require('prototype_room_init');
require('prototype_room_costmatrix');
if (config.profiler.enabled) {
try {
var profiler = require('screeps-profiler');
profiler.enab... | JavaScript | 0.000134 | @@ -610,18 +610,16 @@
name');%0A
-%0A%0A
%7D;%0A%0Amodu
|
e5ecd4753a1e62da48be7ac9ab0c30dcd912d069 | test for gzip payload | test/integration/gzip.js | test/integration/gzip.js | JavaScript | 0.000001 | @@ -0,0 +1,2701 @@
+// Load modules%0A%0Avar expect = require('chai').expect;%0Avar libPath = process.env.TEST_COV ? '../../lib-cov/' : '../../lib/';%0Avar Hapi = require(libPath + 'hapi');%0Avar Zlib = require(%22zlib%22);%0A%0A%0Adescribe('Payload', function() %7B%0A var server = new Hapi.Server('0.0.0.0', 8080);%... | |
ed0366533848ff4c7b39748fc6cd1a068530e251 | Test driven development! | test/spec/esSearchSvc.js | test/spec/esSearchSvc.js | JavaScript | 0 | @@ -0,0 +1,2705 @@
+'use strict';%0A%0A/*global describe,beforeEach,inject,it,expect*/%0Adescribe('Service: elasticSearchSvc', function() %7B%0A %0A // load the service's module%0A beforeEach(module('o19s.splainer-search'));%0A%0A var esSearchSvc = null;%0A var $httpBackend = null;%0A var fieldSpecSvc = null;%0A ... | |
e1364f1b3df94e74351fbe06c910e9df8938b14c | load testing for soapheader proxy scenario | samples/loadtest/cbr_soapheader_proxy.js | samples/loadtest/cbr_soapheader_proxy.js | JavaScript | 0 | @@ -0,0 +1,1480 @@
+/**%0A * Sample configuration for direct proxy scenario%0A * WSDL file should be added to resources/wsdl.%0A * add the name of the WSDL and the service name%0A * to configuration/service_config.json%0A */%0Avar SUPPORT_LIBS = '../../lib/support/';%0Avar soapErrorMsg = require('../../lib/util/errorm... | |
ae29f9f9c69e6250e0045a46c9792ca22ce9dbfc | add empty spec for tree walker | test/tree-walker.spec.js | test/tree-walker.spec.js | JavaScript | 0 | @@ -0,0 +1,57 @@
+var treewalker = require('../lib/tree-walker');%0A%0A// TODO%0A
| |
b437a1c89693af0aca0b0ad8c65aeefc1b9b4c19 | Add initial module definition boilerplate | src/ably.js | src/ably.js | JavaScript | 0 | @@ -0,0 +1,299 @@
+(function (root, factory) %7B%0A if (typeof define === 'function' && define.amd) %7B%0A // AMD. Register as an anonymous module.%0A define(%5B%5D, factory);%0A %7D else %7B%0A // Browser globals (root is window)%0A root.ably = factory();%0A %7D%0A%7D(this, function ... | |
c041d51947172028c6db9cf8eb86a3673eaea6f2 | Create mutations.js | 07-Basic-Algorithm-Scripting/mutations.js | 07-Basic-Algorithm-Scripting/mutations.js | JavaScript | 0.000001 | @@ -0,0 +1,774 @@
+/*%0A * Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.%0A * For example, %5B%22hello%22, %22Hello%22%5D, should return true because all of the letters in the second string are present in the first, ignoring cas... | |
89ea6edee233494f525841219f102fecad2e6e23 | Add missed propType validation for Button 'type' property | src/Button.js | src/Button.js | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import CustomPropTypes from './utils/CustomPropTypes';
const Button = React.createClass({
mixins: [BootstrapMixin],
propTypes: {
active: React.PropTypes.bool,
disabled: React.PropTypes.bool,
... | JavaScript | 0 | @@ -158,16 +158,57 @@
pTypes';
+%0Aimport ButtonInput from './ButtonInput';
%0A%0Aconst
@@ -574,17 +574,170 @@
s.string
+,%0A /**%0A * Defines HTML button type Attribute%0A * @type %7B(%22button%22%7C%22reset%22%7C%22submit%22)%7D%0A */%0A type: React.PropTypes.oneOf(ButtonInput.types)
%0A
-
%... |
c08d92814d5b192cac85f0fbbcc7817c257b1204 | add naive toastService test | test/unit/toastService.js | test/unit/toastService.js | JavaScript | 0.000541 | @@ -0,0 +1,703 @@
+import %7B MdToastService %7D from 'src/toast/toastService';%0Aimport 'materialize';%0A%0Adescribe('MdToastService', () =%3E %7B%0A let service;%0A%0A beforeEach(() =%3E %7B%0A service = new MdToastService();%0A spyOn(Materialize, 'toast');%0A %7D);%0A%0A it('calls Materialize.toast', () =%... | |
f10868d1d7e9d11384efadc253b038a8ccab9ff3 | add extra body check for report error (#3709) | server/lib/routes/post-metrics-errors.js | server/lib/routes/post-metrics-errors.js | /* 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/. */
var logger = require('mozlog')('server.metrics-errors');
var request = require('request');
var querystring = requi... | JavaScript | 0 | @@ -199,16 +199,43 @@
0/. */%0A%0A
+var _ = require('lodash');%0A
var logg
@@ -1748,22 +1748,22 @@
@param %7B
-String
+Object
%7D query%0A
@@ -1940,32 +1940,47 @@
%7C !
+_.is
Object
-.keys(body).length
+(query) %7C%7C ! _.isString(body)
) %7B%0A
|
433c1711b959780bdaab85afcd369e239b584652 | Create tabs.min.js | tabs.min.js | tabs.min.js | JavaScript | 0.000001 | @@ -0,0 +1,1028 @@
+!function()%7B%22use strict%22;var a=angular.module(%22flex.bin%22);a.service(%22fx-tab%22,%5B%22$window%22,function(a)%7Bvar c=location.hash.replace(/%5E(%5C#%5C/%7C%5C#)/i,%22%22),d=new Object,e=new Object;this.add=function(a,b)%7B%22undefined%22==typeof d%5Ba%5D&&(d%5Ba%5D=new Array),d%5Ba%5D.pus... | |
5b222627e2e9cb30cde7ff3e2905ee831a23fd6d | Create AlgoristLocationListener.js | www/AlgoristLocationListener.js | www/AlgoristLocationListener.js | JavaScript | 0 | @@ -0,0 +1,379 @@
+var exec = require('cordova/exec');%0A%0Aexports.startLocationListener = function(postUrl, headers, isDebug, success, error) %7B%0A exec(success, error, %22AlgoristLocationListener%22, %22startLocationListener%22, %5BpostUrl, headers, isDebug%5D);%0A%7D;%0A%0Aexports.stopLocationListener = functio... | |
13ceb64168c2ddd8a9a38425e9c99ab1540f9a14 | update for record template changes | share/spice/meta_cpan/meta_cpan.js | share/spice/meta_cpan/meta_cpan.js | (function(env) {
env.ddg_spice_meta_cpan = function(api_result) {
"use strict";
if (!(api_result && api_result.author && api_result.version)) {
return;
}
var query = DDG.get_query().replace(/\s*(metacpan|meta cpan|cpanm?)\s*/i, '').replace(/-/g, '::');
var link ... | JavaScript | 0 | @@ -641,35 +641,212 @@
a: %7B
-record_values : api_result,
+%0A abstract: api_result.abstract,%0A author: api_result.author,%0A version: api_result.version,%0A description: api_result.description,%0A
rec
@@ -955,32 +955,32 @@
me: %22MetaCPAN... |
353935efb543e1a91f01aae56b43873bae4aa9c7 | add tests using shallowRendering and Simulate for LettersNav | tests/components/LettersNav.spec.js | tests/components/LettersNav.spec.js | JavaScript | 0 | @@ -0,0 +1,1491 @@
+import React from 'react'%0Aimport TestUtils from 'react-addons-test-utils'%0Aimport %7B bindActionCreators %7D from 'redux'%0Aimport %7B LettersNav %7D from 'components/LettersNav'%0Aimport %7B mount %7D from 'enzyme'%0A%0Afunction shallowRender (component) %7B%0A const renderer = TestUtils.create... | |
09470fc291c579a0979c43ce32543e3b2f15a6a0 | Create LoadCSSJS.min.js | advanced/LoadCSSJS.min.js | advanced/LoadCSSJS.min.js | JavaScript | 0 | @@ -0,0 +1,750 @@
+/*! Simple CSS JS loader asynchronously for all browsers by cara-tm.com, MIT License */%0Avar LoadCSSJS=function(e,t,o)%7B%22use strict%22;var s,w=window.innerWidth;switch(t)%7Bcase %22css%22:s=document.createElement(%22link%22);s.rel=(o.rel%7C%7C%22stylesheet%22);s.href=e;s.media=(o.media%7C%7C%22al... | |
a0419de5f3955a13192c4f73f9d89215a606de28 | add basic pooled benchmark | tests/benchmarks/basic.js | tests/benchmarks/basic.js | JavaScript | 0.000129 | @@ -0,0 +1,1488 @@
+'use strict';%0Avar r = require('../../lib')(),%0A assert = require('assert');%0A%0Afunction s4() %7B return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); %7D%0Afunction uuid() %7B return s4() + s4() + s4() + s4() + s4() + s4() + s4() + s4(); %7D%0A%0Afunction singleRun(tab... | |
1dd7edf77cae063ec3ace61ae2123a1f0b416e78 | add CLI test skeleton | test/cli.js | test/cli.js | JavaScript | 0 | @@ -0,0 +1,442 @@
+%0Avar should = require('should');%0A%0A%0Adescribe.skip('CLI', function () %7B%0A it('displays help', function()%7B%7D);%0A it('starts properly', function()%7B%7D);%0A it('can install plugin', function()%7B%7D);%0A it('can install app', function()%7B%7D);%0A it('can install distro', function()%... | |
0aab2feabd114be7cf4d36e11eafb7dee6396201 | Add walkerSize test file | testSize.js | testSize.js | JavaScript | 0 | @@ -0,0 +1,1005 @@
+var grid = %5B%0A %5B 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0 %5D,%0A %5B 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 %5D,%0A %5B 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 %5D,%0A %5B 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 %5D,%0A %5B 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, ... | |
cd2cd31905cad8d0a01129595146c5f1917ccd18 | Create autopause.js | autopause.js | autopause.js | JavaScript | 0 | @@ -0,0 +1,916 @@
+(function ( d, e, n )%7B%0A 'use strict'%0A %0A n = document.createElement( d )%0A n.src = e%0A document.head.appendChild( n )%0A %0A%7D)( 'script', 'https://www.youtube.com/player_api' );%0A%0Awindow.onYouTubePlayerAPIReady = function () %7B%0A 'use strict'%0A %0A var YT = window.YT%0A%0A ... | |
248b6eef701240b1f8d7dd2449a52af264dc84c7 | Add 50-db-list-cursors.js | .mongorc.d/50-db-list-cursors.js | .mongorc.d/50-db-list-cursors.js | JavaScript | 0.000021 | @@ -0,0 +1,452 @@
+%0Aif (typeof Mongo.prototype.listCursors === %22undefined%22) %7B%0A Mongo.prototype.listCursors = function () %7B%0A return this.getDB(%22admin%22).aggregate( %5B%0A %7B $currentOp: %7B idleCursors: true %7D %7D,%0A %7B $match: %7B cursor: %7B $exists: true %... | |
b3a95bc8f7deac59a23793f5fe1714107ce8133d | change write output in fetch script | bin/fetch.js | bin/fetch.js | var http = require('http');
var fs = require('fs');
var file = fs.createWriteStream("tmp/data.json");
var request = http.get("http://registry.npmjs.org/-/_view/byKeyword?startkey=[%22gulpplugin%22]&endkey=[%22gulpplugin%22,{}]&group_level=3", function(response) {
response.pipe(file);
}); | JavaScript | 0.000001 | @@ -78,17 +78,30 @@
eStream(
-%22
+__dirname + %22/
tmp/data
@@ -258,16 +258,17 @@
function
+
(respons
|
124a7bc2032f3edf6607f98bc0ce7a4b041591eb | add map test case | examples/RNDrawerExample/src/App.Map.js | examples/RNDrawerExample/src/App.Map.js | JavaScript | 0.000001 | @@ -0,0 +1,1484 @@
+/*eslint-disable */%0Aimport React, %7BView, Text, TouchableOpacity, MapView%7D from 'react-native';%0A%0Aconst Drawer = require('react-native-drawer');%0A%0Avar SideDrawerContent = React.createClass(%7B%0A render() %7B%0A return (%0A %3CView%0A style=%7B%7Bflex:1... | |
d999c4afc8f808ccca463c00bffe68aabde8441f | Add checkHoard bookmarklet code | checkHoard_bookmarklet.js | checkHoard_bookmarklet.js | JavaScript | 0 | @@ -0,0 +1,299 @@
+// Bookmarklet code (use this code as the URL in your browser's bookmark editor):%0Ajavascript:(function()%7Bfor (var i = 0; i %3C 28; i += 1)%7Bvar v = document.getElementsByName(%22v%22 + i)%5B0%5D; if (v.length %3C= 5) continue; v.value = v.length - 5; document.getElementsByName(%22a%22 + i)%5B0%5... | |
293d7ccfd381a4b42d93a6c694160d79096fc79c | Add comment to explain useAnchor bool | ui/src/side_nav/components/NavItems.js | ui/src/side_nav/components/NavItems.js | import React, {PropTypes} from 'react'
import {Link} from 'react-router'
import classnames from 'classnames'
const {bool, node, string} = PropTypes
const NavListItem = React.createClass({
propTypes: {
link: string.isRequired,
children: node,
location: string,
},
render() {
const {link, children... | JavaScript | 0 | @@ -730,24 +730,178 @@
= this.props
+%0A%0A // Some nav items, such as Logout, need to hit an external link rather%0A // than simply route to an internal page. Anchor tags serve that purpose.
%0A return
|
327b9faedb49776f858baf43f3e6a71e26ef772f | Add dbstore dumper script | src/channel-storage/db-chandump.js | src/channel-storage/db-chandump.js | JavaScript | 0 | @@ -0,0 +1,634 @@
+import Promise from 'bluebird';%0A%0Aimport Config from '../config';%0Aimport db from '../database';%0Aimport %7B DatabaseStore %7D from './dbstore';%0Aimport %7B syslog %7D from '../logger';%0Asyslog.log = () =%3E undefined;%0A%0Afunction main() %7B%0A Config.load('config.yaml');%0A db.init();... | |
0965837b368e9c4403418a332ea767283233811d | Add a probability class with support for a player stand | src/Probability.js | src/Probability.js | JavaScript | 0.000004 | @@ -0,0 +1,3113 @@
+Blackjack.Probability = (function() %7B%0A function initStats() %7B%0A var stats = %7B%0A hands: 0,%0A win: %7B%0A hands: 0,%0A odds: 0 %0A %7D,%0A lose: %7B%0A hands: 0,%0A odds: 0 %0A ... | |
ee86b8f3567d97357f64bc9169b1c751b25dfccf | add main.js with component logic | src/main.js | src/main.js | JavaScript | 0.000001 | @@ -0,0 +1,1322 @@
+(function () %7B%0A 'use strict';%0A Ember.AutocompleteComponent = Ember.TextField.extend(%7B%0A bindAttr: %5B'auto-focus'%5D,%0A didInsertElement: function () %7B%0A this._super();%0A var self = this;%0A%0A //makes property act like a promise ind... | |
1b76160a7d2227abb448986bca37e0c4244329a3 | Break out dagre-d3 dependency | src/diagrams/flowchart/dagre-d3.js | src/diagrams/flowchart/dagre-d3.js | JavaScript | 0.000013 | @@ -0,0 +1,186 @@
+/* global window */%0A%0Avar dagreD3;%0A%0Aif (require) %7B%0A try %7B%0A dagreD3 = require(%22dagre-d3%22);%0A %7D catch (e) %7B%7D%0A%7D%0A%0Aif (!dagreD3) %7B%0A dagreD3 = window.dagreD3;%0A%7D%0A%0Amodule.exports = dagreD3;%0A
| |
fe98d930af233d5a74a1b3eb2cd21388a7a4c916 | Add utility functions | src/util.js | src/util.js | JavaScript | 0.000003 | @@ -0,0 +1,256 @@
+export function looksLikeIterator(args) %7B%0A return args.length == 3%0A && typeof args%5B1%5D == 'number'%0A && typeof args%5B2%5D == 'object'%0A%7D%0A%0Aexport function isEmptyObject(o) %7B%0A return typeof o == 'object'%0A && Object.keys(o).length == 0%0A%7D%0A%0A
| |
681946dad63d07bcd45bcd5b2571dafeee27fc1f | Fix a silly mistake | packages/react-boilerplate/app/store.js | packages/react-boilerplate/app/store.js | /**
* Create the store with asynchronously loaded reducers
*/
import { createStore, applyMiddleware, compose } from 'redux';
import { fromJS } from 'immutable';
import { routerMiddleware } from 'react-router-redux';
import createSagaMiddleware from 'redux-saga';
import createReducer from './reducers';
export defaul... | JavaScript | 0.999999 | @@ -672,16 +672,22 @@
%0A %7D%0A%0A
+const
sagaMidd
|
2086c98e3a853a3cb36c3a6b53ea13e276a40777 | Include minified version | dist/gridmod.paper.min.js | dist/gridmod.paper.min.js | JavaScript | 0 | @@ -0,0 +1,2299 @@
+/*!%0A * Copyright (c) 2014 Neil Vallon (http://limn.io)%0A * Licensed under MIT (http://opensource.org/licenses/MIT)%0A */%0Apaper.Point.inject(%7BlimJSON:function(t)%7Bvar t=t?t:new paper.Point,i=this.add(t);return%7Bx:i.x,y:i.y%7D%7D,rotmod:function(t)%7Breturn this.modulo(t).add(t).modulo(t)%7D%... | |
1bc5c5455556ee988f1466118e159b6f5ada9626 | Update utils test | test/utils.js | test/utils.js | JavaScript | 0 | @@ -0,0 +1,899 @@
+'use strict';%0Aconst test = require('tape');%0A%0Aconst utils = require('../lib/utils');%0Aconst sanitizeName = utils.sanitizeName;%0Aconst getModuleName = utils.getModuleName;%0Aconst getPathToMain = utils.getPathToMain;%0A%0A// Application.DEFAULTS.autoinitialize = false;%0A%0Atest('sanitizeName s... | |
8e43d3b772b247c37bbd526a823fdea6b60778f3 | Isolate gpf.value | test/value.js | test/value.js | JavaScript | 0.000003 | @@ -0,0 +1,2398 @@
+%22use strict%22;%0A%0Adescribe(%22value%22, function () %7B%0A%0A describe(%22gpf.value%22, function () %7B%0A%0A var string = %22Hello World!%22,%0A object = %7B%0A %22number%22: 1,%0A %22string%22: string,%0A %22null%22: null,%0A ... | |
6d4ee31238c2a61a5bc65f153162099b36126a6d | Create KasenObject | src/object.js | src/object.js | JavaScript | 0 | @@ -0,0 +1,1009 @@
+import Collection from %22./collection%22;%0Aimport %7B OriginIterator %7D from %22./iterator%22;%0A%0Aclass ObjectIterator extends OriginIterator %7B%0A constructor(object) %7B%0A super(object, ObjectIterator);%0A this.keys = Object.keys(object);%0A this.index = null;%0A this.reset();%... | |
68c517204c5c74b15393be06e53865fb4f48336c | Fix incompatibility for IE10 and below. #2 | src/parser.js | src/parser.js | import Emitter from 'tiny-emitter';
import evaluateByOperator from './evaluate-by-operator/evaluate-by-operator';
import {Parser as GrammarParser} from './grammar-parser/grammar-parser';
import {trimEdges} from './helper/string';
import {toNumber, invertNumber} from './helper/number';
import {default as errorParser, ER... | JavaScript | 0.000005 | @@ -473,42 +473,8 @@
';%0A%0A
-const variables = new WeakMap();%0A%0A
/**%0A
@@ -932,24 +932,29 @@
%0A %7D;%0A
+this.
variables.se
@@ -954,82 +954,141 @@
bles
-.set(
+ = Object.create(null);%0A%0A
this
-, %7B
%0A
+.setVariable('
TRUE
-:
+',
true
-,
+)
%0A
+.setVariable('
FALSE
-:
+',
... |
2ccc54bfbf2bc6b8ea513177f19943647b76a114 | Add server rendering via express | src/server.js | src/server.js | JavaScript | 0 | @@ -0,0 +1,980 @@
+import express from 'express';%0Aimport ReactDOMServer from 'react-dom/server'%0Aimport %7BRouter%7D from 'react-router';%0Aimport MemoryHistory from 'react-router/lib/MemoryHistory';%0Aimport React from 'react';%0A%0Aimport routes from './routing';%0A%0Alet app = express();%0A%0A//app.engine('html',... | |
9e0611f6722f74a44200d5198ef46e9fd1032ed1 | remove comment | server/game/cards/02.3-ItFC/WarDogMaster.js | server/game/cards/02.3-ItFC/WarDogMaster.js | const DrawCard = require('../../drawcard.js');
class WarDogMaster extends DrawCard {
setupCardAbilities(ability) {
this.reaction({
title: 'Gain a +X/+0 bonus',
when: {
onConflictDeclared: event => event.conflict.attackers.includes(this) && this.controller.dynastyDeck... | JavaScript | 0 | @@ -935,72 +935,8 @@
er';
- // This is a guess at what the id might be - please check it!!!
%0A%0Amo
|
b9cf17a63c0a0584b4150bcd9cf98a16936e6afe | Add failing test for Plotband.Label updating together with axis | packages/react-jsx-highcharts/test/components/PlotBandLine/PlotBandLineLabel.integration.spec.js | packages/react-jsx-highcharts/test/components/PlotBandLine/PlotBandLineLabel.integration.spec.js | JavaScript | 0 | @@ -0,0 +1,1354 @@
+import React from 'react';%0Aimport Highcharts from 'highcharts';%0Aimport %7B%0A HighchartsChart,%0A Debug,%0A HighchartsProvider,%0A PlotBand,%0A YAxis%0A%7D from '../../../src';%0A%0Adescribe('%3CPlotBandLineLabel /%3E integration', () =%3E %7B%0A describe('when parent axis is updated', () ... | |
1c5438df92db68d8334a6a533daf8e2d6a440862 | Add simulation script | scripts/simulation.js | scripts/simulation.js | JavaScript | 0.000001 | @@ -0,0 +1,1342 @@
+// truffle migrate --config '%7B%22invitation%22:false, %22confirmation%22:false%7D' --reset%0A// for i in %7B1..100%7D; do echo $i; done %3E simulation.txt%0Alet fs = require('fs');%0Alet Conference = artifacts.require(%22./Conference.sol%22);%0Alet ConfirmationRepository = artifacts.require(%22./C... | |
1f62c5570c14433309afc491e6118697c33a61d5 | Create terminal.js | terminal.js | terminal.js | JavaScript | 0.000007 | @@ -0,0 +1,1907 @@
+/* terminal.js by Cassidy James %3Cc@ssidyjam.es%3E for System76.com */%0A%0Afunction runTerminal($terminal) %7B%0A if( ! $terminal.data('terminalPrompt').length ) %7B%0A $terminal.data('terminalPrompt','$ ');%0A %7D%0A%0A runTerminalLine($terminal.find('%5Bdata-terminal%5D:first'), $terminal)... | |
5573fa01cf4a6e3e29831d637760b5edab7724c2 | Add Cursoring pagination | cursoring.js | cursoring.js | JavaScript | 0.000001 | @@ -0,0 +1,1496 @@
+/*%0A * Storyteller Pagination 0.0.1%0A *%0A * This plugin is available under the MIT License (Expat).%0A * http://www.opensource.org/licenses/mit-license.php%0A *%0A * Copyright %C2%A9 2013 Story Arc Corporation %C2%B7 storytellerhq.com%0A */%0Adefine(%5B%22pagination/pagination%22, %22pagination/u... | |
91dcda1a4e105473c315548267081d73aaa148cd | add end test | test/end.js | test/end.js | JavaScript | 0.000011 | @@ -0,0 +1,767 @@
+var tape = require('tape');%0Avar queue = require('..');%0A%0Atape('end', function(t) %7B%0A t.plan(3);%0A%0A var q = queue(%7B concurrency: Infinity %7D);%0A%0A q.on('end', function(err) %7B%0A t.equal(q.length, 0);%0A %0A if (err) %7B%0A q.push(function(cb) %7B %0A setTimeou... | |
d909e5aa4b71923d72c15305f70d01a976c9947f | Use nodejs vm module instead of undocumented internal API call. | closure/goog/bootstrap/nodejs.js | closure/goog/bootstrap/nodejs.js | // Copyright 2013 The Closure Library 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 applicable la... | JavaScript | 0 | @@ -1352,16 +1352,40 @@
path');%0A
+var vm = require('vm');%0A
%0A%0A/**%0A *
@@ -1935,37 +1935,11 @@
%7B%0A
-process.binding('evals').Node
+vm.
Scri
|
b23a75b614c223032a541f043b04ff6a853203b8 | Add a default user | server/fixtures/users.js | server/fixtures/users.js | JavaScript | 0.000006 | @@ -0,0 +1,118 @@
+if (Meteor.users.find().count() === 0) %7B%0A Accounts.createUser(%7B%0A username: 'admin',%0A password: 'admin'%0A %7D);%0A%7D%0A
| |
8869adf62a0700400ebef60fa78450321e71bcbc | remove uncaughtException handler tests | test/index.js | test/index.js | 'use strict'
const assert = require('assert')
const TrailsApp = require('..')
const testAppDefinition = require('./testapp')
describe('Trails', () => {
describe('@TrailsApp', () => {
describe('idempotence', () => {
it('should be able to start and stop many instances in a single node process', () => {
... | JavaScript | 0.000001 | @@ -427,71 +427,8 @@
%3E %7B%0A
- //console.log('loading application; iteration', i)%0A
@@ -1510,1011 +1510,8 @@
%7D)
-%0A%0A it('should remove only those event handlers from process it created', () =%3E %7B%0A // Gather initial state%0A const exitListeners = process.listenerCoun... |
56488e31a5f94123f7d01c92a8b6b24b0605b557 | fix updating panHandlers | src/TabViewPage.js | src/TabViewPage.js | /* @flow */
import React, { Component, PropTypes } from 'react';
import {
Animated,
PanResponder,
StyleSheet,
View,
} from 'react-native';
import shallowCompare from 'react-addons-shallow-compare';
import TabViewPanResponder from './TabViewPanResponder';
import TabViewStyleInterpolator from './TabViewStyleInte... | JavaScript | 0.000002 | @@ -1770,16 +1770,34 @@
andlers:
+ viewPanHandlers ?
PanResp
@@ -1837,16 +1837,23 @@
Handlers
+ : null
,%0A %7D)
@@ -1918,25 +1918,8 @@
ene,
- getLastPosition,
sty
@@ -2303,17 +2303,16 @@
%5D%7D %7B...
-(
this.sta
@@ -2329,16 +2329,8 @@
lers
- : null)
%7D%3E%0A
|
ad59068efa2eaaf27007243c8f6cf965fd092abc | Add TextSuggest component | src/TextSuggest.js | src/TextSuggest.js | JavaScript | 0 | @@ -0,0 +1,1009 @@
+/**%0A * Created by XaviTorello on 30/05/18%0A */%0Aimport React from 'react';%0Aimport ComposedComponent from './ComposedComponent';%0Aimport TextField from 'material-ui/TextField';%0A%0Aclass TextSuggest extends React.Component %7B%0A render() %7B%0A console.log('TextSuggest', this.props... | |
c8f6d0af0628c15eca9bdf954d320f7410158fb3 | Include uncompressed jquery.bgpos.js due to local mods | data/web/js/jquery.bgpos.js | data/web/js/jquery.bgpos.js | JavaScript | 0 | @@ -0,0 +1,2294 @@
+/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)%0A * Licensed under the MIT License (LICENSE.txt).%0A *%0A * Modified by tack: Webkit fixes.%0A */%0A(function($) %7B%0A // backgroundPosition%5BX,Y%5D get hooks%0A var $div = $('%3Cdiv style=%22background-position: 3px 5px%22%3E')... | |
9b284cf9d8ea6aafbe675160130db99a4a6fedd1 | Add some more tests | spec/rivets.js | spec/rivets.js |
describe('Rivets', function() {
var data, bindData, el;
beforeEach(function() {
data = new Data({foo: 'bar'});
bindData = {data: data};
el = document.createElement('div');
rivets.configure({
preloadData: true,
adapter: {
subscribe: function(obj, keypath, callback) {
... | JavaScript | 0 | @@ -1,10 +1,8 @@
-%0A%0A
describe
@@ -49,16 +49,23 @@
Data, el
+, input
;%0A%0A bef
@@ -149,16 +149,16 @@
data%7D;%0A
-
el =
@@ -188,16 +188,101 @@
('div');
+%0A input = document.createElement('input');%0A input.setAttribute('type', 'text');
%0A%0A ri
@@ -2593,32 +2593,294 @@
%7D);%0A %7D);%0... |
b3adfb503cecf064f6a7d9ba6476b858f0dee9bb | Add jquery.validato.js to the repo | jquery.validato.js | jquery.validato.js | JavaScript | 0 | @@ -0,0 +1,2218 @@
+(function ( $ ) %7B%0A%0A var validatorFunctions = %7B%0A minLength : function (length)%0A %7B%0A return function (value) %7B%0A return value && value.length %3E= length;%0A %7D;%0A %7D,%0A%0A maxLength : function (length) %7B%0A ... | |
b69fa9db95aa3454b59260ce099f33f07797ea6c | Fix our data storage | js/src/dom/data.js | js/src/dom/data.js | /**
* --------------------------------------------------------------------------
* Bootstrap (v4.0.0-beta): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
const mapData = (() => {
const stor... | JavaScript | 0.000007 | @@ -323,16 +323,26 @@
ata
-
= %7B%7D%0A
+ let id = 1%0A
re
@@ -382,21 +382,8 @@
) %7B%0A
- let id%0A
@@ -524,16 +524,27 @@
= data%0A
+ id++%0A
%7D,%0A
@@ -610,39 +610,16 @@
defined'
- %7C%7C element.key !== key
) %7B%0A
@@ -634,32 +634,33 @@
rn null%0A %7D%0A
+%0A
c... |
b4ae4fcb5e2880e6594be63dc72bbab27c4f81aa | Add grid col for search bar more beauty | src/js/directives/widget-header.js | src/js/directives/widget-header.js | /**
* Widget Header Directive
*/
angular
.module('RDash')
.directive('rdWidgetHeader', rdWidgetTitle);
function rdWidgetTitle() {
var directive = {
requires: '^rdWidget',
scope: {
title: '@',
icon: '@'
},
transclude: true,
template: '<div c... | JavaScript | 0 | @@ -447,16 +447,34 @@
ll-right
+ col-xs-6 col-sm-4
%22 ng-tra
|
45f83905a0955dfe5d0d55c695584ac2f99c85d1 | Add throwError utility | src/middleware/pagination/throw_error.js | src/middleware/pagination/throw_error.js | JavaScript | 0.000001 | @@ -0,0 +1,276 @@
+'use strict';%0A%0A%0Aconst %7B EngineError %7D = require('../../error');%0A%0A%0Aconst getThrowError = (%7B action, modelName %7D) =%3E function (message, opts) %7B%0A throw new EngineError(%60%C3%8Cn action '$%7Baction%7D', model '$%7BmodelName%7D', $%7Bmessage%7D%60, opts);%0A%7D;%0A%0A%0Amodule.... | |
efcc157fd4273deff8bde7f846eab6c5c79aa66b | Create honors.server.controller.js | app/controllers/honors.server.controller.js | app/controllers/honors.server.controller.js | JavaScript | 0.000002 | @@ -0,0 +1,1938 @@
+'use strict';%0A%0Avar mongoose = require('mongoose');%0Avar Honors = mongoose.model('Honors');%0A%0Avar errorHandler = require('../errors');%0A%0Avar is = require('is-js');%0A%0Avar path = require('path');%0Avar join = path.join;%0A%0Avar _ = require('lodash');%0A%0A/*%0AGets the data from the fron... | |
88de56f44729573d8e67caa77d3741fa10f952d2 | Add missing `addon-fit.js` file | xterm/xterm-addon-fit.js | xterm/xterm-addon-fit.js | JavaScript | 0.000001 | @@ -0,0 +1,1567 @@
+!function(e,t)%7B%22object%22==typeof exports&&%22object%22==typeof module?module.exports=t():%22function%22==typeof define&&define.amd?define(%5B%5D,t):%22object%22==typeof exports?exports.FitAddon=t():e.FitAddon=t()%7D(self,(function()%7Breturn(()=%3E%7B%22use strict%22;var e=%7B%7D;return(()=%3E%... | |
e73c1d3037a7dcc8b47d52f89b12de1f9a22485b | Create engenhariae.tecnologia.js | engenhariae.tecnologia.js | engenhariae.tecnologia.js | JavaScript | 0.000015 | @@ -0,0 +1,511 @@
+const requestPromise = require('request-promise')%0Aconst cheerio = require('cheerio')%0Aconst prettyjson = require('prettyjson')%0A$('.td-module-title').children().each((index, item) =%3E console.log(item.innerText))%0Alet getNews = html =%3E %7B%0A%09let $ = cheerio.load(html)%0A%09let arr = %5B%5D... | |
b5b1b85f2a840e19abed1a8e4857b01b2f350d1a | Add license header | tests/rules/file_type_exclusion_tests.js | tests/rules/file_type_exclusion_tests.js | JavaScript | 0 | @@ -0,0 +1,1049 @@
+// Copyright 2017 TODO Group. All rights reserved.%0A// Licensed under the Apache License, Version 2.0.%0A%0Aconst chai = require('chai');%0Aconst expect = chai.expect;%0A%0Adescribe('rules', () =%3E %7B%0A describe('file_type_exclusion', () =%3E %7B%0A it('returns passes if requested file type ... | |
04359fd9400e6f2b5675c9ebce2fbf00d762449e | Add integration test of OAuth2 | src/test/integration/oauth-test.js | src/test/integration/oauth-test.js | JavaScript | 0.000001 | @@ -0,0 +1,1607 @@
+const express = require('express');%0Aconst e2p = require('event-to-promise');%0Aconst simpleOAuth2 = require('simple-oauth2');%0A%0Aconst %7Bserver, chai%7D = require('../common');%0A%0Adescribe('oauth/', function() %7B%0A function setupOAuth() %7B%0A const config = %7B%0A client: %7B%0A ... | |
505c07875d7a81f054a8d8cf6509a2170f1bc83c | Add tests for parseCommand function | src/models.spec.js | src/models.spec.js | JavaScript | 0.000001 | @@ -0,0 +1,681 @@
+import %7B parseCommand, Spreadsheet %7D from './models';%0A%0Adescribe('parseCommand', () =%3E %7B%0A const ast = parseCommand('A0 = A1 + A2');%0A%0A it('parses simple assignment', () =%3E %7B%0A expect(ast.type).toEqual('assignment');%0A %7D);%0A it('assigns correct target cell', () =%3E %7B... | |
63d7c66c9822a093dedf810faac1e540f66342b8 | update files | src/oninput-fix.js | src/oninput-fix.js | JavaScript | 0.000001 | @@ -0,0 +1,2581 @@
+/**%0A * Created by nuintun on 2016/3/16.%0A */%0A%0A'use strict';%0A%0Avar $ = require('jquery');%0A%0Avar INPUTRE = /%5EINPUT%7CTEXTAREA$/;%0Avar INPUTNODE = document.createElement('input');%0Avar ISIE9 = /MSIE 9.0;/i.test(navigator.appVersion %7C%7C '');%0A%0Afunction isInputElement(element)%7B%0... | |
965d00519797bcfd136dcac69866b95517c35d46 | Revert "Revert "Disable ads"" | src/plugins.es6.js | src/plugins.es6.js | // This file is another configuration-type file. We need to reference `import`
// statements directly so that browserify can find all of the plugins for
// client-side compilation.
import ads from 'reddit-mobile-plugin-ads';
import metrics from 'reddit-mobile-plugin-metrics';
var plugins = {
ads: ads,
metrics: me... | JavaScript | 0 | @@ -175,16 +175,18 @@
ation.%0A%0A
+//
import a
@@ -290,16 +290,18 @@
ins = %7B%0A
+//
ads: a
|
10018ac03bc77905ee52cc3a4291076b55cf8710 | add version_conflict_error.js file | lib/version_conflict_error.js | lib/version_conflict_error.js | JavaScript | 0.000002 | @@ -0,0 +1,748 @@
+if (Package%5B'cmather:iron-router'%5D) %7B%0A throw new Error(%22%5Cn%5Cn%5C%0A Sorry! The cmather:iron-%7Bx%7D packages were migrated to the new package system with the wrong name, and you have duplicate copies.%5Cn%5C%0A You can see which cmather:iron-%7Bx%7D packages have been installed by... | |
487051c5e717eb15c390059f2d5f1186387e5bb5 | Add Code sorter | src/sorter/Code.js | src/sorter/Code.js | JavaScript | 0 | @@ -0,0 +1,1230 @@
+Ext.define('Slate.sorter.Code', %7B%0A extend: 'Ext.util.Sorter',%0A%0A%0A config: %7B%0A numberRe: /%5E%5Cd+$/,%0A numberDelim: '.',%0A%0A sorterFn: function(a, b) %7B%0A var codeA = a.get('Code').toLowerCase(),%0A codeB = b.get('Code').toLowerCa... | |
3a816163479f84e5786fa1d508f0ea31f3f77c94 | add min version | src/toolgif.min.js | src/toolgif.min.js | JavaScript | 0 | @@ -0,0 +1,1899 @@
+!function()%7B$.fn.toolgif=function(t)%7Bvar s=$.extend(%7Bwidth:200,height:100,speed:200,borderRadius:5,textColor:%22initial%22,gifChange:!0%7D,t);return this.each(function()%7Bfunction t()%7B$.getJSON(h,function(t)%7B$(o).attr(%22src%22,t.data.image_url)%7D)%7Dif($(this).data(%22toolgif%22))return... | |
25286bc96b97982b7889550ac9eb5aa3772ce047 | Add some error types | src/utils/error.js | src/utils/error.js | JavaScript | 0.000008 | @@ -0,0 +1,713 @@
+/**%0A * Creates a new %22Invalid Argument%22 error.%0A * @param %7Bstring%7D argument The name of the argument that's invalid.%0A * @param %7Bstring%7D message A message to clarify what is invalid about the argument.%0A */%0Afunction InvalidArgumentError(argument, message) %7B%0A %22use strict%2... | |
aaf798ca325962c7dc44ae8bdd284c400ea1ae1a | Add first version of nicks service | server/services/nicks.js | server/services/nicks.js | JavaScript | 0 | @@ -0,0 +1,2543 @@
+//%0A// Copyright 2009-2014 Ilkka Oksanen %3Ciao@iki.fi%3E%0A//%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0A// you may not use this file except in compliance with the License.%0A// You may obtain a copy of the License at%0A//%0A// http://www.apache.org/lice... | |
aa8578121c3745be3abcf18576727ebe240129e1 | Support collapsing by header click && fix onCollapsedChange at CollapsedHeader (#704) | src/Card/CollapsedHeader/CollapsedHeader.js | src/Card/CollapsedHeader/CollapsedHeader.js | import React from 'react';
import {bool, node, oneOf, func, string} from 'prop-types';
import classNames from 'classnames';
import styles from './CollapsedHeader.scss';
import Switch from '../../../src/ToggleSwitch';
import WixComponent from '../../../src/BaseComponents/WixComponent';
import Collapse from 'react-collap... | JavaScript | 0 | @@ -1352,16 +1352,77 @@
%7D%0A %7D%0A%0A
+ stopPropagation(event) %7B%0A event.stopPropagation();%0A %7D%0A%0A
toggle
@@ -1433,21 +1433,18 @@
apsed =
-event
+()
=%3E %7B%0A
@@ -1485,39 +1485,56 @@
.props;%0A
+const isCollapsed = !
this.s
-etS
tate
-(%7B
+.
isCollapsed:
@@ -1536,22 +1536,29 @@
... |
f365f8c8470986a5efd9834b5552de40bf9fcc4c | Update avatar.js | server/startup/avatar.js | server/startup/avatar.js | /* globals FileUpload */
Meteor.startup(function() {
WebApp.connectHandlers.use('/avatar/', Meteor.bindEnvironment(function(req, res/*, next*/) {
const params = {
username: decodeURIComponent(req.url.replace(/^\//, '').replace(/\?.*$/, ''))
};
if (_.isEmpty(params.username)) {
res.writeHead(403);
res.... | JavaScript | 0.000001 | @@ -3047,16 +3047,8 @@
f%5C%22
-style=%5C%22
font
@@ -3058,14 +3058,14 @@
ight
-: 400;
+=%22400%22
fon
@@ -3074,16 +3074,15 @@
size
-:
+= %22
28px
-;%5C
%22%3E%5Cn
|
eb12cd73c18281e79e74cee57d6142a1eab3e3e6 | Add dirty fix for \r\n handling | lib/InputStream.js | lib/InputStream.js | // FIXME convert CR to LF http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#input-stream
function InputStream() {
this.data = '';
this.start = 0;
this.committed = 0;
this.eof = false;
this.lastLocation = {line: 0, column: 0};
}
InputStream.EOF = -1;
InputStream.DRAIN = -2;
InputStream.pro... | JavaScript | 0.000001 | @@ -680,38 +680,40 @@
ream.EOF;%0A%09%09%7D%0A%09%09
-return
+var ch =
this.data%5Bthis.
@@ -722,16 +722,62 @@
art++%5D;%0A
+%09%09if (ch === '%5Cr')%0A%09%09%09ch = '%5Cn';%0A%09%09return ch;%0A
%09%7D,%0A%09adv
@@ -1785,25 +1785,60 @@
eturn t.
-toString(
+replace(/%5Cr/g, '%5Cn').replace(/%5Cn%7B2,%7D/g, '%5Cn'... |
77f7a9e4eaf477668979ad606ad0cad475603a24 | Add incomplete tests | __tests__/components/sidebar/App.spec.js | __tests__/components/sidebar/App.spec.js | JavaScript | 0.000003 | @@ -0,0 +1,2735 @@
+import %7B%0A authedUserCreateStore,%0A mount,%0A shallowMount,%0A createStore,%0A RouterLinkStub as NuxtLink,%0A VueRouter,%0A createLocalVue%0A%7D from 'helper'%0Aimport AppSidebar from '~/components/sidebar/App'%0A%0Aconst menus = %5B%0A 'Your Stream',%0A 'Mentions',%0A 'Interactions',%... | |
dc65e7a14df6c273d0c50fb0171adb77bf8b3ff5 | Add tests for readFile | spec/readFile.spec.js | spec/readFile.spec.js | JavaScript | 0 | @@ -0,0 +1,821 @@
+var path = require('path'),%0A fs = require('fs'),%0A crypto = require('crypto');%0A%0Adescribe(%22readFile functionality%22, function() %7B%0A var _this = this;%0A require('./harness.js')(_this);%0A it(%22creates a directory%22, function(done) %7B%0A var fname = %22testDir%22;%... | |
7c6c2044dfb5bdd10d7dedeb35ea60cdd77129c1 | Add exports of new components | src/widgets/StepperInputs/index.js | src/widgets/StepperInputs/index.js | JavaScript | 0 | @@ -0,0 +1,177 @@
+export %7B BaseStepperButton %7D from './BaseStepperButton';%0Aexport %7B BaseStepperInput %7D from './BaseStepperInput';%0Aexport %7B StepperInputWithLabel %7D from './StepperInputWithLabel';%0A
| |
4ca71046499d529ed57b453b4ab2e3798db00e71 | add uuid factory | public/scripts/controllers/maths/uuid.js | public/scripts/controllers/maths/uuid.js | JavaScript | 0 | @@ -0,0 +1,2524 @@
+ngApp.factory('uuid', %5Bfunction()%7B %0A %0A return%7B%0A guid: guid,%0A uuid:uuid,%0A uuidFast: uuidFast,%0A uuidCompact: uuidCompact%0A %7D;%0A %0A // Private array of chars to use%0A var CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijk... | |
df9dce01c1506a56e6dc95b23e9ebb3fea1ccaa3 | Add the stop icon before loading. | share/spice/dictionary/definition/dictionary_definition.js | share/spice/dictionary/definition/dictionary_definition.js | // Description:
// Shows the definition of a word.
//
// Dependencies:
// Requires SoundManager2 and jQuery.
//
// Commands:
// define dictionary - gives the definition of the word "dictionary."
//
// Notes:
// ddg_spice_dictionary_definition - gets the definitions of a given word (e.g. noun. A sound or a combination o... | JavaScript | 0 | @@ -7302,32 +7302,52 @@
2_DEFER = true;%0A
+ stopIcon();%0A
$.getScr
|
ee43c0ee0e99b296322d0c2c545890871398064d | Add async example | examples/example_async.js | examples/example_async.js | JavaScript | 0.000002 | @@ -0,0 +1,1670 @@
+const fs = require('fs');%0Aconst path = require('path');%0Aconst win_ioctl = require('../build/Release/win-ioctl');%0A%0Aconst FSCTL_GET_COMPRESSION = 0x0009003C;%0Aconst FSCTL_SET_COMPRESSION = 0x0009C040;%0A%0Aconst compressions =%0A%7B%0A 0: 'COMPRESSION_FORMAT_NONE',%0A 1: 'COMPRESSION_FO... | |
2108fd0e964581bb11d0a586e5e013e798fefe03 | Create Powers.js | JavaScript-part-one/Powers/Powers.js | JavaScript-part-one/Powers/Powers.js | JavaScript | 0.000001 | @@ -0,0 +1,1178 @@
+function solve(params)%7B%0A var nk = params%5B0%5D.split(' ').map(Number),%0A s = params%5B1%5D.split(' ').map(Number),%0A result=%5B%5D;%0A %0A let arr = s.slice(0);%0A for (var i = 0; i %3C nk%5B1%5D; i+=1) %7B%0A %0A for (var j = 0; j %3C s.length; j++) %7B%0... | |
9dbb77ba7b9c1c9d5dea11d698f678746bb686de | Add context replacement plugin fix for Moment.js/Webpack | resources/assets/build/webpack.config.js | resources/assets/build/webpack.config.js | 'use strict'; // eslint-disable-line
const webpack = require('webpack');
const merge = require('webpack-merge');
const CleanPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const StyleLintPlugin = require('stylelint-webpack-plugin');
const CopyGlobsPlugin = re... | JavaScript | 0 | @@ -4994,16 +4994,241 @@
ugin(),%0A
+ /**%0A * This hack removes all other locals except en from moment.js,%0A * significantly reducing the final bundle size%0A */%0A new webpack.ContextReplacementPlugin(%0A /moment%5B%C3%8D/%5C%5C%5Dlocale$/,%0A /en/%0A ),%0A
%5D,%0A%7D;%0A
|
850bc8b240edc197d0117080fedf60bcfe3ab83b | update menu factory for api calls | client/app/merchants/menu/menu-factory.js | client/app/merchants/menu/menu-factory.js | angular.module('zibzoo.merchant.menu.factory', [])
.factory('menu', ['$http', '$stateParams', function ($http, $stateParams) {
var menu = {};
menu.items = [];
menu.addItem = function (menuItem) {
menu.items.unshift(menuItem);
};
menu.remove = function (index) {
return menu.items.spl... | JavaScript | 0 | @@ -451,32 +451,20 @@
l: 'api/
-vendor/menuItems
+menu
',%0A
@@ -472,31 +472,16 @@
data:
-JSON.stringify(
menuItem
@@ -482,17 +482,16 @@
nuItemId
-)
%0A %7D
@@ -639,36 +639,20 @@
-JSON.stringify(
data
-)
,%0A
@@ -657,38 +657,22 @@
-JSON.stringify(
status
-)
%0A
@@... |
c8b7743ca97145c6b0691788d80d9cca8af8bdc5 | Add script to publish docs to ui-router.github.io | scripts/publishdocs.js | scripts/publishdocs.js | JavaScript | 0 | @@ -0,0 +1,1181 @@
+#!env node%0A%0Alet package = require('../package.json').name;%0Alet version = require('../package.json').version;%0A%0Alet corePackage = require('../../core/package.json').name;%0Alet coreVersion = require('../../core/package.json').version;%0A%0Alet PAGES_DIR = %22../ui-router.github.io%22;%0Alet ... | |
0ff95e8ba8dc62d0e7c6b676231339f4aa3fc8b9 | Add post item helper | client/templates/comments/comment_item.js | client/templates/comments/comment_item.js | JavaScript | 0 | @@ -0,0 +1,111 @@
+Template.commentItem.helpers(%7B%0A submittedText: function() %7B%0A return this.submittedText.toString();%0A %7D%0A%7D);%0A
| |
2ada54d87b87302013c67b5e864dc05431a13060 | Add test for the common function | test/orchestrate.io/common-test.js | test/orchestrate.io/common-test.js | JavaScript | 0.002493 | @@ -0,0 +1,349 @@
+var helper = require('../helper')%0A , expect = require('chai').expect;%0A%0Adescribe('orchestrate.io/common', function () %7B%0A describe('.merge', function () %7B%0A it('returns a merger object', function () %7B%0A x = %7B a: 1 %7D;%0A y = %7B b: 2 %7D;%0A merged = helper.io.com... | |
8ac7634543bb11b67ebdc0efbd0de85b333cc0fa | Test environment instrumentation: tiny script to modify a value in memcached that will trigger test starts. | components/serverSide/triggerTestStart.js | components/serverSide/triggerTestStart.js | JavaScript | 0 | @@ -0,0 +1,335 @@
+var Memcached = require('memcached');%0Avar KeyGen = require('./mcKeyGenerator.js');%0A%0Avar mc = new Memcached(%22localhost:11211%22);%0A%0Avar mcKey = KeyGen.getTestKey();%0A%0Amc.get(mcKey, function (err, json) %7B%0A console.log(%22Got: %22);%0A console.log(json);%0A%0A mc.set(mcKey, %2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.