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 |
|---|---|---|---|---|---|---|---|
1a852efa4648adb33850e417946325438cd4b9b1 | Create skipSpace.js | src/acorn_plugin/skipSpace.js | src/acorn_plugin/skipSpace.js | JavaScript | 0.000002 | @@ -0,0 +1,1202 @@
+export default function skipSpace() %7B%0A // https://github.com/ternjs/acorn/blob/8de357451e72c8a67acdb8a63353b577735dc7b6/src/tokenize.js#L134-L172%0A return function ha() %7B%0A loop: while (this.pos %3C this.input.length) %7B%0A let ch = this.input.charCodeAt(this.pos)%0A switch (... | |
7b7e1474c4244672000e40c180af384c4b41b0f3 | Test suite for util module | src/test/js/core/utilTest.js | src/test/js/core/utilTest.js | JavaScript | 0 | @@ -0,0 +1,1241 @@
+%0Avar util = require('util');%0A%0Aexports.test = %7B%0A%09%0A%09testToStringWithArray : function()%7B%0A%09%09assert.deepEquals(%5B'1', '2', '3'%5D, util.toStringWithArray(%5B1, 2, 3%5D));%0A%09%09assert.equals('%7B%22s%22:2%7D', util.toStringWithArray(%7Bs : 2%7D));%0A%09%09assert.equals('2', uti... | |
1d689c4e50e4e698050f3bc7ce514ac976378b70 | Create allGrades.user.js | all-grades/allGrades.user.js | all-grades/allGrades.user.js | JavaScript | 0.000001 | @@ -0,0 +1,618 @@
+// ==UserScript==%0A// @name Canvas All Grades%0A// @namespace https://github.com/jamesjonesmath/canvancement%0A// @include /%5Ehttps://.*%5C.instructure%5C.com/?.*/users/%5B0-9%5D+$/%0A// @version 1%0A// @grant none%0A// ==/UserScript==%0Avar regex = new RegExp('/users/(%5B0-9... | |
7a759efe7d774b3f7a4556226d256250fa73e0c8 | Complete Lesson 1 Introduction.js | introduction.js | introduction.js | JavaScript | 0 | @@ -0,0 +1,22 @@
+console.log('hello');%0A
| |
995d718ece4f2b1a36f3ed0772d1ba8a9f7f0883 | create constants for actions | app/constants/actionTypes.js | app/constants/actionTypes.js | JavaScript | 0.000001 | @@ -0,0 +1,112 @@
+module.exports = %7B%0A ALL_NEWS: 'ALL_NEWS',%0A ALL_SOURCES: 'ALL_SOURCES',%0A SEARCH_SOURCES: 'SEARCH_SOURCES',%0A%7D;%0A
| |
6c9d09ce6002e174cddec3b4eeb10c9d225de212 | add jquery plugin | src/browser/plugins/jquery.js | src/browser/plugins/jquery.js | JavaScript | 0.000001 | @@ -0,0 +1,2846 @@
+/* globals jQuery */%0A/* globals __JQUERY_PLUGIN_VERSION__ */%0A%0A%0A(function(jQuery, window, document) %7B%0A%0A var rb = window.Rollbar;%0A if (!rb) %7B%0A return;%0A %7D%0A%0A var JQUERY_PLUGIN_VERSION = __JQUERY_PLUGIN_VERSION__;%0A%0A rb.configure(%7B%0A payload: %7B%0A notif... | |
5348966578541961324064d6b4d518ede44d7962 | add number spelling method | src/utils/number-spelling.js | src/utils/number-spelling.js | JavaScript | 0.044851 | @@ -0,0 +1,1433 @@
+var th = %5B'','thousand','million', 'billion','trillion'%5D;%0Avar dg = %5B'zero','one','two','three','four', 'five','six','seven','eight','nine'%5D;%0A var tn = %5B'ten','eleven','twelve','thirteen', 'fourteen','fifteen','sixteen', 'seventeen','eighteen','nineteen'%5D;%0A var tw = %5B'twenty','thi... | |
995e6ab0b80c5c5e8375e65fdd5358462f27e733 | Add loading test to the letterhead view | src/views/Letterhead.test.js | src/views/Letterhead.test.js | JavaScript | 0 | @@ -0,0 +1,625 @@
+/* eslint-env jest */%0Aimport nightmare from 'nightmare'%0A%0Aconst visit = path =%3E %7B%0A const config = %7B%0A // Try changing this to true and run the tests%0A // It is pretty cool%0A show: false,%0A // From the docs: Note that, even though goto normally waits%0A // for all the ... | |
5c84d5f7d864bc7e8211139ad9b8517433508d52 | add new component | src/common/components/Icon.js | src/common/components/Icon.js | JavaScript | 0.000001 | @@ -0,0 +1,170 @@
+import React from 'react';%0A%0Aexport default function Icon(props) %7B%0A const classes = %5B'fa', %60fa-$%7Bprops.value%7D%60%5D;%0A%0A return %3Cspan className=%7Bclasses.join(' ')%7D%3E%3C/span%3E;%0A%7D%0A
| |
4717f4dcb8cff3db961e4c6ba80e8ca7804a2493 | add a js file to highlight the concurrent item in navbar | application/static/js/nav.js | application/static/js/nav.js | JavaScript | 0 | @@ -0,0 +1,452 @@
+function setNavbarHighlight()%7B%0A item = window.location.href.split('/')%5B4%5D;%0A document.querySelector('li %3E a%5Bid='+item+'%5D').className = 'active';%0A%7D%0A%0Afunction addLoadEvent(func)%7B%0A var oldonload = window.onload;%0A if(typeof window.onload != 'function')%7B%0A ... | |
30d14a9f4d0ef2376cdab07e750b8f65bd9567ae | update 'change to division' to handle division by fractions better | src/transforms/rewrite-division.js | src/transforms/rewrite-division.js | const { Literal } = require('../ast.js');
const { mul, div, removeExtraProductParens } = require('../operations.js');
function canTransform(selections) {
if (selections.length !== 1) {
return false;
}
const selection = selections[0];
if (selection.length !== 1) {
return false;
}
... | JavaScript | 0 | @@ -588,16 +588,345 @@
arent;%0A%0A
+ const removeOnes = false;%0A%0A if (node.denominator.type === 'Fraction') %7B%0A if (removeOnes && node.numerator.type === 'Literal' && parseFloat(node.numerator.value) === 1) %7B%0A if (removeOnes && node.denominator.numerator.type === 'Literal' && parseFl... |
25756fc827874b277c0ec9f71e51ca76c7388164 | Create searchStart.js | searchStart.js | searchStart.js | JavaScript | 0.000001 | @@ -0,0 +1,477 @@
+document.getElementById('middle-page-search-bar').onkeypress = function(e)%7B%0A if (!e) e = window.event;%0A var keyCode = e.keyCode %7C%7C e.which;%0A if (keyCode == '13')%7B%0A %0A searchStart(document.getElementById('middle-page-search-bar').value);%0A %0A return fals... | |
195d52fc9a8827b7da0b7bbb9723ab7a10931a8b | Test specifying checksum via constructor. | t/coverage/checksum-constructor.t.js | t/coverage/checksum-constructor.t.js | JavaScript | 0 | @@ -0,0 +1,830 @@
+#!/usr/bin/env node%0A%0Arequire('./proof')(1, function (Strata, equal, deepEqual, say, tmp, step, ok, load, objectify) %7B%0A var fs = require('fs'), crypto = require('crypto'), strata%0A step(function () %7B%0A fs.writeFile(tmp + '/.ignore', '', 'utf8', step())%0A %7D, function () %... | |
2f6d20702a79d9db387c974e454f0c3599b7d1a0 | add stylesheet test | packages/tooltip/src/presenters/stylesheet.test.js | packages/tooltip/src/presenters/stylesheet.test.js | JavaScript | 0.00052 | @@ -0,0 +1,896 @@
+import stylesheet from %22./stylesheet%22;%0A%0Adescribe(%22stylesheet%22, () =%3E %7B%0A const styles = stylesheet(%7B%7D, %7B%7D);%0A%0A it(%22returns an oject%22, () =%3E %7B%0A expect(styles).toEqual(expect.any(Object));%0A %7D);%0A it(%22returned object contains property of content%22, ()... | |
5657dbf0734ce479ea63fc81793ed2a27988edb2 | create TrashActions | frontend/src/javascripts/actions/TrashActions.js | frontend/src/javascripts/actions/TrashActions.js | JavaScript | 0.000001 | @@ -0,0 +1,366 @@
+import NoteeDispatcher from '../dispatcher/NoteeDispatcher'%0Aimport Constants from '../constants/NoteeConstants'%0A%0Avar TrashActions = %7B%0A%0A update: function(id, model_name)%7B%0A NoteeDispatcher.dispatch(%7B%0A type: Constants.TRASH_UPDATE,%0A content_id: id,%0... | |
0bc272fc861943af422924199ca5135afa3f2609 | Fix very recent regression with down key. | static/js/navigate.js | static/js/navigate.js | var navigate = (function () {
var exports = {};
function go_to_row(msg_id) {
current_msg_list.select_id(msg_id,
{then_scroll: true,
from_scroll: true});
}
exports.up = function () {
message_viewport.last_movement_direction = -1;
var msg_id =... | JavaScript | 0 | @@ -513,33 +513,25 @@
on = 1;%0A
+%0A
-var msg_id =
+if (
current_
@@ -543,94 +543,27 @@
ist.
-next();%0A if (msg_id === undefined) %7B%0A return;%0A %7D%0A go_to_row(msg_id);%0A%0A
+is_at_end()) %7B%0A
@@ -580,24 +580,28 @@
entering) %7B%0A
+
// A
@@ -660,16 +660,20 @@... |
49e6b7c1f3dfe7fe5144336c3e47d4af2269bd40 | Set up AJAX script to update preview | assets/js/src/preview-ajax.js | assets/js/src/preview-ajax.js | JavaScript | 0 | @@ -0,0 +1,1453 @@
+/**%0A * The AJAX setup for the Markdown Preview meta box.%0A */%0A%0A(function($, d, w)%7B%0A%0A $.fn.getParsedContent = function()%7B%0A return this.each(function()%7B%0A%0A // Set refs to this container and editor content%0A var $this = $(this);%0A var $content = $('#content');... | |
4215e3d98b1b29f291e2c477550e00b2557c22ad | Convert relative urls to absolute url when merging CSS files | packages/minifiers/minifiers.js | packages/minifiers/minifiers.js | UglifyJSMinify = Npm.require('uglify-js').minify;
var cssParse = Npm.require('css-parse');
var cssStringify = Npm.require('css-stringify');
CssTools = {
parseCss: cssParse,
stringifyCss: cssStringify,
minifyCss: function (cssText) {
return CssTools.minifyCssAst(cssParse(cssText));
},
minifyCssAst: funct... | JavaScript | 0.003942 | @@ -133,16 +133,48 @@
ngify');
+%0Avar path = Npm.require('path');
%0A%0ACssToo
@@ -1933,24 +1933,61 @@
%0A %7D%0A%0A
+ CssTools.rewriteCssUrls(ast);%0A%0A
var im
@@ -2731,24 +2731,24 @@
);%0A %7D);%0A%0A
-
return n
@@ -2754,16 +2754,1452 @@
newAst;%0A
+ %7D,%0A%0A // We are looking fo... |
0316682204dd8ba05fc50c9680da3b7375022985 | Create beta_spongebob_meme.js | Solutions/beta/beta_spongebob_meme.js | Solutions/beta/beta_spongebob_meme.js | JavaScript | 0.000002 | @@ -0,0 +1,120 @@
+function spongeMeme(sentence) %7B%0A return %5B...sentence%5D.map((e,i)=%3Ei%252==0? e.toUpperCase() : e.toLowerCase()).join('')%0A%7D%0A
| |
f7932cbe1c392a1432f356022ca37e0689b96ca4 | add host view link | ui/src/hosts/containers/HostsPage.js | ui/src/hosts/containers/HostsPage.js | import React, {PropTypes} from 'react';
import FlashMessages from 'shared/components/FlashMessages';
export const HostsPage = React.createClass({
propTypes: {
dataNodes: PropTypes.arrayOf(React.PropTypes.object),
},
render() {
const {dataNodes} = this.props;
return (
<div className="hosts">
... | JavaScript | 0 | @@ -1374,16 +1374,40 @@
%3Ctd%3E
+%3Ca href=%7B%60/host/$%7Bid%7D%60%7D%3E
%7Bname%7D%3C/
td%3E%0A
@@ -1402,16 +1402,20 @@
%7Bname%7D%3C/
+a%3E%3C/
td%3E%0A
|
ac7b0f68214bb592944cccbb56ee14346026096a | Create the echo server | echo-server.js | echo-server.js | JavaScript | 0.000002 | @@ -0,0 +1,392 @@
+var http = require('http');%0A%0Ahttp.createServer(function (request, response) %7B%0A%09if (request.method === 'GET' && request.url === '/echo') %7B%0A%09%09var body = %5B%5D;%0A%09%09request.on('data', function (chunk) %7B%0A%09%09%09body.push(chunk);%0A%09%09%7D).on('end', function () %7B%0A%09%09... | |
b97c8186972d45786456b83f59d6c33461616e34 | add basic test coverage | packages/fire/src/injector/__tests__/index.test.js | packages/fire/src/injector/__tests__/index.test.js | JavaScript | 0.000002 | @@ -0,0 +1,1135 @@
+import %7B registerInjectProvider, inject %7D from '..';%0A%0Adescribe(%60Injector%60, () =%3E %7B%0A class Foo %7B%7D%0A%0A it(%60should inject Foo%60, () =%3E %7B%0A class Bar %7B%7D%0A%0A const NewBar = inject(Foo, %60foo%60)(Bar);%0A expect(NewBar.WrappedComponent).toB... | |
bfdedb9d3504f6a3018bb3fa5e6b110a99dfe468 | add user ctrl | back/controllers/user.ctrl.js | back/controllers/user.ctrl.js | JavaScript | 0 | @@ -0,0 +1,361 @@
+var gravatar = require('gravatar');%0A%0Amodule.exports = userCtrl = %7B%7D;%0A%0AuserCtrl.default = function(req, res, next) %7B%0A var user = req.params.user;%0A%0A var userEmail = user + '@gmail.com';%0A var gravatarImgUrl = gravatar.url(userEmail, %7Bs: '100', r: 'x', d: 'retro'%7D, false);%0A... | |
18d0dd6ebb111eb407207c3a5f7519794d45ceb4 | no definition of substring | WordSmushing/wordsmushing.js | WordSmushing/wordsmushing.js | JavaScript | 0.998019 | @@ -0,0 +1,298 @@
+%22use strict%22;%0Avar assert = require('assert');%0A%0Adescribe('word smushing', function() %7B%0A describe('substring', function() %7B%0A it('y is a substring of x', function() %7B%0A assert(sub('banana', 'bana'));%0A assert(sub('banana', 'banana'));%0A assert(sub('banana', 'ana... | |
a6c2250184f2e010a44ff0cb528ef0299a96c3d8 | Add client side validation for analytics options | client/components/campaigns/CreateCampaignForm.js | client/components/campaigns/CreateCampaignForm.js | import React, { PropTypes } from 'react';
import { Field, reduxForm } from 'redux-form';
import { Combobox } from 'react-widgets';
import { renderCombobox, renderField, renderTextEditor, renderRadio } from '../common/FormRenderWrappers';
// Ref redux-form http://redux-form.com/6.0.5/docs/GettingStarted.md/
// Ref rea... | JavaScript | 0 | @@ -2394,32 +2394,73 @@
iv%3E%3Clabel%3E%3CField
+ disabled=%7BtextEditorType == 'Plaintext'%7D
name=%22trackingP
@@ -2530,16 +2530,49 @@
ng pixel
+ (available for HTML emails only)
%3C/label%3E
|
12840e2bb84dd78411ea8c7b41343b9deec43b77 | Add math methods | source/math.js | source/math.js | JavaScript | 0.999949 | @@ -0,0 +1,456 @@
+import functionGenerator from './function-generator';%0A%0Aexport default functionGenerator(Math, %5B%0A 'abs',%0A 'acos',%0A 'acosh',%0A 'asin',%0A 'asinh',%0A 'atan',%0A 'atan2',%0A 'atanh',%0A 'cbrt',%0A 'ceil',%0A 'clz32',%0A 'cos',%0A 'cosh',%0A 'exp',%0A 'expm1',%0A 'floor',%0A ... | |
9aa539d8fe4fe086135ba212e6a2d1c73db3dd34 | Add missing argument | mod_admin_web/admin_web/www_files/js/main.js | mod_admin_web/admin_web/www_files/js/main.js | var BOSH_SERVICE = '/http-bind/';
var show_log = false;
Strophe.addNamespace('C2SPUBSUB', 'http://prosody.im/streams/c2s');
Strophe.addNamespace('S2SPUBSUB', 'http://prosody.im/streams/s2s');
Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
Strophe.addNamespace('CAPS', 'http://jabber.org/protocol/c... | JavaScript | 0.000025 | @@ -6006,28 +6006,33 @@
k(function (
+event
) %7B%0A
-
%09$('#s2sList
@@ -6167,32 +6167,37 @@
click(function (
+event
) %7B%0A%09$('#adhoc')
@@ -6295,32 +6295,32 @@
ult();%0A %7D);%0A%0A
-
$('#clientMe
@@ -6336,24 +6336,29 @@
k(function (
+event
) %7B%0A%09$('#adh
|
60f871ff773c95a58eedee7b9009b5acce64527f | Add auto-generated "system" service test | test/services/system/index.test.js | test/services/system/index.test.js | JavaScript | 0.000026 | @@ -0,0 +1,229 @@
+'use strict';%0A%0Aconst assert = require('assert');%0Aconst app = require('../../../src/app');%0A%0Adescribe('systemId service', function() %7B%0A it('registered the systems service', () =%3E %7B%0A assert.ok(app.service('systems'));%0A %7D);%0A%7D);%0A
| |
8652870f43fd8d2db2c1da1539a72a1cc40d5c26 | Add test | node-tests/unit/utils/rasterize-list-test.js | node-tests/unit/utils/rasterize-list-test.js | JavaScript | 0 | @@ -0,0 +1,1529 @@
+'use strict';%0A%0Aconst td = require('testdouble');%0Aconst expect = require('../../helpers/expect');%0A%0Aconst fs = require('fs');%0Aconst RSVP = require('rsvp');%0Aconst svg2png = td.replace('svg2png', (sourceBuffer, resize) =%3E %7B%0A return RSVP.re... | |
cb3a6fa7de7ad8234c7b80fc79ce4117eddef941 | Test createHits | packages/instantsearch-react/src/createHits.test.js | packages/instantsearch-react/src/createHits.test.js | JavaScript | 0.000001 | @@ -0,0 +1,1013 @@
+/* eslint-env jest, jasmine */%0A%0Aimport React from 'react';%0Aimport %7Bshallow%7D from 'enzyme';%0A%0Aimport createHits from './createHits';%0Ajest.unmock('./createHits');%0A%0Aimport connect from 'algoliasearch-helper-provider/src/connect';%0Ajest.mock('algoliasearch-helper-provider/src/connect... | |
b10d9968819fe663d23f03d8af5389187047dfa6 | clean up code | packages/rocketchat-authorization/server/startup.js | packages/rocketchat-authorization/server/startup.js | /* eslint no-multi-spaces: 0 */
Meteor.startup(function() {
// Note:
// 1.if we need to create a role that can only edit channel message, but not edit group message
// then we can define edit-<type>-message instead of edit-message
// 2. admin, moderator, and user roles should not be deleted as they are referened i... | JavaScript | 0.000003 | @@ -4339,95 +4339,8 @@
%5D;%0A%0A
-%09//permissions.forEach(o =%3E %7B o.i18nLabel = %60permission_$%7B o._id %7D_description%60 ; %7D);%0A%0A
%09for
|
f00a65e76455948bf607459572f018c644a936de | Add buffer-loader | lib/public/js/buffer-loader.js | lib/public/js/buffer-loader.js | JavaScript | 0.000029 | @@ -0,0 +1,1294 @@
+//Getting Started with Web Audio API - HTML5 Rocks%0A//http://www.html5rocks.com/ja/tutorials/webaudio/intro/%0Afunction BufferLoader(context, urlList, callback) %7B%0A this.context = context;%0A this.urlList = urlList;%0A this.onload = callback;%0A this.bufferList = new Array();%0A this.loadCo... | |
c967e820d390b53819a3e8abe3ec8459b0849d79 | add a build middleware | lib/server/build-middleware.js | lib/server/build-middleware.js | JavaScript | 0 | @@ -0,0 +1,786 @@
+var build = require('./build.js'),%0A url = require('url');%0A%0Amodule.exports = function(options) %7B%0A options = options %7C%7C %7B%7D;%0A return function(req, res, next) %7B%0A u = url.parse(req.url, %7BparseQueryString : true%7D);%0A%0A if (u.pathname === (options.mount %7C%7C '/Ka... | |
39a811b6159e848a6d05a142929559e6cc9bc769 | add CouchDB filter "is_type" | couchdb/general/_design/generic/filters/is_type.js | couchdb/general/_design/generic/filters/is_type.js | JavaScript | 0 | @@ -0,0 +1,144 @@
+function(doc, req)%0A%7B%0A if(doc._deleted)%0A %7B%0A return false;%0A %7D%0A%0A return (doc.doc_type && doc.doc_type == req.query.doc_type);%0A%7D%0A
| |
5cb7249265eca18047f67d54cc54ee6d815ba0ee | Add dribbble class object | lib/dribbble.js | lib/dribbble.js | JavaScript | 0.000001 | @@ -0,0 +1,2446 @@
+%0Avar Base = require('./base.js');%0Avar Request = require('./request.js');%0A%0Avar Dribbble = function Dribbble(options) %7B%0A Base.call(this, options);%0A%7D;%0A%0ADribbble.CONFIG = %7B%0A LENGTH: 64,%0A HOST: 'dribbble.com'%0A%7D;%0A%0ADribbble.ERROR = %7B%0A 'MISSING_ACCESS_TOKEN'... | |
ccdba3c9b68a12a777d885bd0f5874ad0036eebe | Fix batch deploy. Fix #611 | lib/plugins/console/deploy.js | lib/plugins/console/deploy.js | var async = require('async'),
fs = require('graceful-fs'),
colors = require('colors'),
_ = require('lodash');
module.exports = function(args, callback){
var config = hexo.config.deploy,
log = hexo.log,
extend = hexo.extend,
deployer = extend.deployer.list();
if (!config || !config.type){
var... | JavaScript | 0.000001 | @@ -291,24 +291,8 @@
nfig
- %7C%7C !config.type
)%7B%0A
|
0021ea8953a191f3cd5b2251a35b336c5cceda04 | Create overlay_paper.js | next/modules/overlay_paper.js | next/modules/overlay_paper.js | JavaScript | 0.000007 | @@ -0,0 +1,938 @@
+%7B%0A %22module_type%22:%22core%22,%0A %22init%22: function() %7B%0A this.handleEvent(%22window.resize%22, this.handleWindowResize);%0A //zIndex should be among the highest%0A //this is only for testing purposes%0A%0A this.zIndex = 9999;%0A%0A var self = this;%0A%0A this.paper = ... | |
c7e495ad4de5b13a37a961d9eccc46c50059366a | Add 7.2 eloquent.js | week-7/eloquent.js | week-7/eloquent.js | JavaScript | 0.99892 | @@ -0,0 +1,954 @@
+// Eloquent JavaScript%0A%0A// Run this file in your terminal using %60node my_solution.js%60. Make sure it works before moving on!%0A%0A// Program Structure%0A// Write your own variable and do something to it.%0A%0Avar test;%0Atest = 5 + 10;%0A%0A// Favorite Food%0A%0Aprompt(%22What is your favorite... | |
cdd1da3e516d20d984d743296d599b4ddf3867fa | add logger | plugin/logger.js | plugin/logger.js | JavaScript | 0.000026 | @@ -0,0 +1,686 @@
+/**%0A * Created by Nicolas on 7/8/15.%0A */%0A(function (Module) %7B%0A 'use strict';%0A%0A var winston = require('winston');%0A%0A Module.exports = new (winston.Logger)(%7B%0A transports: %5B%0A new (winston.transports.Console)(%7B%0A colorize : true,%0A ... | |
d9ee25456c5a6450b02f4cf6d64a815a588ff66c | Create setup.js | setup.js | setup.js | JavaScript | 0.000001 | @@ -0,0 +1,1061 @@
+/*jslint node:true, plusplus:true*/%0A'use strict';%0A%0A/**%0A * Create a enviromental variable%0A * @param %7Bstring%7D name enviromental variable being created%0A * @param %7Bstring%7CNumber%7D base its default%0A * @returns %7Bobject%7D prompt object used to ask the user%0A */%... | |
9595c6104e0072c5a019cd1da28b084ac12b7d36 | Add test case for SparseJoin misbehavior with getters | test/mjsunit/bugs/bug-3621.js | test/mjsunit/bugs/bug-3621.js | JavaScript | 0.000001 | @@ -0,0 +1,407 @@
+// Copyright 2014 the V8 project authors. All rights reserved.%0A// Use of this source code is governed by a BSD-style license that can be%0A// found in the LICENSE file.%0A%0Avar a = %5B%5D;%0Avar endIndex = 0xffff;%0Aa%5BendIndex%5D = 3;%0AObject.defineProperty(a, 0, %7B get: function() %7B this%5B... | |
781ca786aa3249fb63b216dc5d82d6f5ec32afd0 | Add a benchmark for loading a db | benchmarks/benchmark-load.js | benchmarks/benchmark-load.js | JavaScript | 0.000001 | @@ -0,0 +1,1397 @@
+'use strict'%0A%0Aconst IPFS = require('ipfs')%0Aconst IPFSRepo = require('ipfs-repo')%0Aconst DatastoreLevel = require('datastore-level')%0Aconst OrbitDB = require('../src/OrbitDB')%0A%0Aconsole.log(%22Starting IPFS...%22)%0A%0Aconst repoConf = %7B%0A storageBackends: %7B%0A blocks: DatastoreLe... | |
a2d3d72e1a5a0d401c92f7d02ebcd0ba4f563ae8 | Add fail test for query | test/specs/util_query_spec.js | test/specs/util_query_spec.js | JavaScript | 0.000437 | @@ -0,0 +1,1568 @@
+import '../../src/';%0Aimport Avatar from '../samples/components/avatar';%0Aimport List from '../samples/components/list';%0A%0Adescribe('query', () =%3E %7B%0A const body = document.querySelector('body');%0A%0A beforeEach(() =%3E %7B%0A body.innerHTML = %60%0A %3Cdiv id=%22t... | |
e29bb5fe786316c4d3fbc139fba4b775ae5c5f8e | Introduce health checks row scheme | src/js/stores/healthChecksRowScheme.js | src/js/stores/healthChecksRowScheme.js | JavaScript | 0 | @@ -0,0 +1,378 @@
+var HealthCheckProtocols = require(%22../constants/HealthCheckProtocols%22);%0A%0Aconst healthChecksRowScheme = %7B%0A protocol: HealthCheckProtocols.COMMAND,%0A command: null,%0A path: null,%0A portIndex: 0,%0A gracePeriodSeconds: 300,%0A intervalSeconds: 60,%0A timeoutSeconds: 20,%0A maxCon... | |
86b8ac7b720a93e4644e7850bdd2120ca26e195b | Add linux booting benchmark | tests/benchmark/linux-boot.js | tests/benchmark/linux-boot.js | JavaScript | 0.000031 | @@ -0,0 +1,2292 @@
+#!/usr/bin/env node%0A%22use strict%22;%0A%0Avar V86 = require(%22../../build/libv86.js%22).V86;%0Avar fs = require(%22fs%22);%0Aconst LOG_SERIAL = false;%0A%0Avar emulator = new V86(%7B%0A bios: %7B url: __dirname + %22/../../bios/seabios.bin%22 %7D,%0A vga_bios: %7B url: __dirname + %22/../.... | |
26ea3872ec7065a13d8e1bed7e192bf717b1cbe2 | add build.js | build/build.js | build/build.js | JavaScript | 0.000002 | @@ -0,0 +1,1455 @@
+/**%0A * Created by dsky on 2017/3/22.%0A */%0Aconst fs = require('fs'),%0A path = require('path'),%0A StyleLintPlugin = require('stylelint-webpack-plugin'),%0A webpack = require('webpack'),%0A webpackConf = require('./webpack.dev.conf'),%0A express = require('express'),%0A app = e... | |
ae7f1b38a897c22ee65a1d2407af6a9e97fd4c0d | Add line/col reporting to Function runtime errors | nodes/core/core/80-function.js | nodes/core/core/80-function.js | /**
* Copyright 2013,2015 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 ... | JavaScript | 0 | @@ -900,16 +900,18 @@
on(msg)%7B
+%5Cn
%22+this.f
@@ -2846,92 +2846,708 @@
-this.error(err.toString());%0A %7D%0A %7D);%0A %7D catch(err) %7B
+var errorMessage = err.toString();%0A var stack = err.stack.split(/%5Cr?%5Cn/);%0A if (stack.lengt... |
c6264e80407021a45baaedff4c2f44d233b716ac | Add newline when wrapping function to allow comments Fixes #122 | nodes/core/core/80-function.js | nodes/core/core/80-function.js | /**
* Copyright 2013 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 | @@ -925,16 +925,18 @@
s.func+%22
+%5Cn
%7D)(msg);
|
6860be86eb1cc508f03aacabdc1d50fce9fcc232 | Create PlaceCard | js/components/developer/create-job-screen/placeCard.js | js/components/developer/create-job-screen/placeCard.js | JavaScript | 0 | @@ -0,0 +1,1439 @@
+import React, %7B Component %7D from 'react';%0Aimport %7B%0A Grid,%0A Col,%0A Form,%0A Item,%0A Label,%0A Input,%0A Card,%0A CardItem,%0A Left,%0A Body,%0A%7D from 'native-base';%0A%0Aimport CardHeader from './cardHeader';%0A%0A// Temporary constants. These will be moved and implemented i... | |
32e11c5523ac675be8291340f8e34b0ed61b5497 | Test zugzug.useDatabase. | spec/zugzug_useDatabase.spec.js | spec/zugzug_useDatabase.spec.js | JavaScript | 0 | @@ -0,0 +1,1022 @@
+var expect = require('expect.js');%0Avar Promise = require('bluebird');%0Avar redis = require('redis');%0Avar ZugZug = require('../lib/zugzug');%0A%0Adescribe('zugzug.useDatabase(db):Promise(self)', function() %7B%0A var zz;%0A beforeEach(function() %7B%0A zz = new ZugZug();%0A %7D);%0A after... | |
b47c74cf1691c81313d0248e2b2b49c85821a3b8 | Introduce Http module | lib/core/http.js | lib/core/http.js | JavaScript | 0 | @@ -0,0 +1,837 @@
+/* See license.txt for terms of usage */%0A%0A%22use strict%22;%0A%0Aconst %7B Cu, Ci, Cc %7D = require(%22chrome%22);%0A%0A// Platform Services%0Aconst ioService = Cc%5B%22@mozilla.org/network/io-service;1%22%5D.getService(Ci.nsIIOService);%0A%0Alet Http = %7B%7D;%0A%0AHttp.getResource = function(ur... | |
c749ee787c1966133be51ddf57c53585a8acc885 | fix #1384 | src/core/math/shapes/Rectangle.js | src/core/math/shapes/Rectangle.js | var CONST = require('../../const');
/**
* the Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y) and by its width and its height.
*
* @class
* @namespace PIXI
* @param x {number} The X coordinate of the upper-left corner of the rectangle
* @param y {number} The ... | JavaScript | 0.000001 | @@ -1871,17 +1871,16 @@
x && x %3C
-=
this.x
@@ -1929,17 +1929,16 @@
y && y %3C
-=
this.y
|
76dbdcef541b558f2c91466b6d473202e760f3ff | update w9 collective comment html | migrations/20180813152200-update-w9-comment.js | migrations/20180813152200-update-w9-comment.js | JavaScript | 0 | @@ -0,0 +1,2094 @@
+'use strict';%0A%0Aimport %7B set %7D from 'lodash';%0A%0Amodule.exports = %7B%0A up: (queryInterface, sequelize) =%3E %7B%0A // Look for current w9 collective settings to update only comment%0A const botSlug = 'w9bot';%0A return queryInterface.sequelize.query(%60SELECT * FROM %22Collectiv... | |
46c86efd4bcfd76e66885b3b5eac227e32cfa0df | migrate standard math symbols from equality-explorer, https://github.com/phetsims/scenery-phet/issues/353 | js/MathSymbols.js | js/MathSymbols.js | JavaScript | 0 | @@ -0,0 +1,1177 @@
+// Copyright 2018, University of Colorado Boulder%0A%0A/**%0A * Standard math symbols used in PhET sims.%0A * Sims should use these so that they are easy to change in the future.%0A * Do NOT inline characters in string concatenations.%0A *%0A * E.g. for an expression that involves the addition of 2 ... | |
576645904d8ec81da068196452a646ce5fcfae73 | string toUpperCase | javascript/fundamental/string/string-touppercase.js | javascript/fundamental/string/string-touppercase.js | JavaScript | 1 | @@ -0,0 +1,393 @@
+'use strict';%0A%0A// ==========================================================================%0A// Array UpperCase%0A// ==========================================================================%0A%0A%09%0A%0A%09// Syntax%0A%09str.toUpperCase();%0A%0A%0A%09// Simple %0A%09console.log(%22Hello W... | |
9ceb1847b1f40eb9ea13f69ece60181cbc146cb6 | Update RenderTextureFactory.js | src/gameobjects/rendertexture/RenderTextureFactory.js | src/gameobjects/rendertexture/RenderTextureFactory.js | /**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var GameObjectFactory = require('../GameObjectFactory');
var RenderTexture = require('./RenderTexture');
/**
* Creat... | JavaScript | 0 | @@ -1223,16 +1223,168 @@
exture.%0A
+ * @property %7Bstring%7D %5Bkey%5D - The texture key to make the RenderTexture from.%0A * @property %7Bstring%7D %5Bframe%5D - the frame to make the RenderTexture from.%0A
* %0A * @
@@ -1536,16 +1536,28 @@
, height
+, key, frame
)%0A%7B%0A
@@ -1633,16 +1633,28 @@
, height... |
5b1b5328b7ed16ba2bb0238f9e9ec26aaa573a02 | Add Squasher | libs/squasher.js | libs/squasher.js | JavaScript | 0.000002 | @@ -0,0 +1,966 @@
+(function(module)%7B%0A var _ = require(%22underscore%22);%0A%0A function Squasher(input, prepend) %7B%0A this.input = input;%0A this.prepend = prepend %7C%7C '';%0A %7D%0A%0A var fn = Squasher.prototype;%0A%0A fn.squash = function() %7B%0A if (this.output) %7B%0A return this.outpu... | |
6e9b5d584cfd81026de6f183a5ab982743a61182 | Create AI.min.js | AI.min.js | AI.min.js | JavaScript | 0.000006 | @@ -0,0 +1 @@
+%0A
| |
0c6d50d22445a2527b1bbea5476bf656afc47f99 | Create scrollclass.js | scrollclass.js | scrollclass.js | JavaScript | 0.000001 | @@ -0,0 +1,1892 @@
+(function( $ ) %7B%0A $.fn.scrollClass = function(options) %7B%0A if($(this)%5B0%5D === undefined) return;%0A%0A var settings = $.extend( %7B%0A 'position': 1,%0A 'className': 'scrolled'%0A %7D, options )%0A%0A var mainObj = $(this);%0A%0A ... | |
daec4a2fcde6a9dcbd12dd835b1c09d3fc1d3132 | Put properties on prototype instead of instance. | src/filesystem/FileSystemEntry.js | src/filesystem/FileSystemEntry.js | /*
* Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the ri... | JavaScript | 0 | @@ -1584,33 +1584,35 @@
= impl;%0A
+%7D%0A
-%0A
+%0A
// Add %22
@@ -1640,20 +1640,16 @@
getters%0A
-
Obje
@@ -1672,20 +1672,37 @@
ies(
-this, %7B%0A
+FileSystemEntry.prototype, %7B%0A
@@ -1723,36 +1723,32 @@
: %7B%0A
-
-
get: function ()
@@ -1768,28 +1768,24 ... |
41d9556de233b8e297e67b81b4fc7ea683643d55 | add XML output variant for the sitemap processor | sitemap-xml.js | sitemap-xml.js | JavaScript | 0 | @@ -0,0 +1,852 @@
+var webstats = require('./lib/webstats');%0A%0Avar _urls = %7B%7D;%0Avar _domains = %7B%7D;%0A%0Awebstats.getSitemapAggregate(process.argv.slice(2), function(urls, domains) %7B%0A _urls = urls;%0A _domains = domains;%0A%7D);%0A%0Aprocess.on('exit', function(code) %7B%0A var out = '%3Curls%3E';%0A%... | |
b64c7cffcb6b06d6df5d1934f13926faf5d72964 | Add stacked bar example | examples/stacked-bar.js | examples/stacked-bar.js | JavaScript | 0.000001 | @@ -0,0 +1,597 @@
+import React, %7B Component %7D from 'react';%0Aimport blessed from 'blessed';%0Aimport %7B render %7D from 'react-blessed';%0Aimport %7B StackedBar %7D from '../src/index';%0A%0Aconst screen = blessed.screen();%0Arender(%3CStackedBar %7B...%7B label: 'Server Utilization (%25)'%0A , barWidth: 4%0A ... | |
262b95e1aa41f6f7cc66b84bf2cd1737565ef648 | Test for configured client | test/configured-client-test.js | test/configured-client-test.js | JavaScript | 0 | @@ -0,0 +1,1523 @@
+// configured-client-test.js%0A//%0A// Test the config.clients array%0A//%0A// Copyright 2013, E14N https://e14n.com/%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 ... | |
97d563e4e39b466a6cb74e8e3678a7e8240c1d8d | Add test for `createMountNode` | test/create-mount-node-test.js | test/create-mount-node-test.js | JavaScript | 0 | @@ -0,0 +1,462 @@
+import test from 'ava';%0Aimport createMountNode from '../src/create-mount-node';%0Aimport document from 'global/document';%0A%0Aglobal.document = document;%0A%0Atest('createMountNode()', (assert) =%3E %7B%0A const node = createMountNode();%0A%0A assert.is(node.tagName, 'DIV', 'should create a %60d... | |
f0be64633b32ba78e8e1492edda82f41cc70ed1b | Correct deleteCookies example (#3180) | packages/webdriverio/src/commands/browser/deleteCookies.js | packages/webdriverio/src/commands/browser/deleteCookies.js | /**
*
* Delete cookies visible to the current page. By providing a cookie name it just removes the single cookie.
*
* <example>
:deleteCookie.js
it('should delete cookies', () => {
browser.setCookie({name: 'test', value: '123'})
browser.setCookie({name: 'test2', value: '456'})
browse... | JavaScript | 0 | @@ -644,16 +644,17 @@
teCookie
+s
(%5B'test3
@@ -865,24 +865,16 @@
// %5D%0A
-
%0A
|
8b8e28e58d48c67342575a3a5567370e1bffcd9b | Add commit example | example/commit.js | example/commit.js | JavaScript | 0 | @@ -0,0 +1,767 @@
+%0A// commit - record changes to the repository%0A%0Avar gitgo = require('gitgo')%0A , join = require('path').join%0A , fs = require('fs')%0A , repo = 'git://github.com/michaelnisi/troubled-www.git'%0A , path = '/tmp/gitgo-' + Math.floor(Math.random() * (1%3C%3C24))%0A , queue = %5Binit, add, co... | |
89d93fa54c419b4c8047c341a613dc3720d5a848 | Create command.js | Leaderboard-Stats-Plugin/command.js | Leaderboard-Stats-Plugin/command.js | JavaScript | 0.000016 | @@ -0,0 +1 @@
+%0A
| |
58ecd5d0d7f80a5e38201e58b53144f835f5fef5 | Add password salt and hash function to utils | server/utils.js | server/utils.js | JavaScript | 0.000002 | @@ -0,0 +1,215 @@
+// utils.js%0A%0Avar crypto = require('crypto');%0A%0Aexports.hashPassword = function(password, salt) %7B%0A var hash = crypto.createHash('sha256');%0A hash.update(password);%0A hash.update(salt);%0A return hash.digest('hex');%0A%7D%0A
| |
9970d1c7a10645028452c6e58ff28d503625d445 | add markers action | react-ui/src/actions/markers.js | react-ui/src/actions/markers.js | JavaScript | 0 | @@ -0,0 +1,189 @@
+const handleMarkerClick = (mapObj) =%3E %7B%0A const %7B lat, lng %7D = mapObj.latLng;%0A %0A return %7B%0A type: 'HANDLE_MARKER_CLICK',%0A position: %7B%0A lat: lat(),%0A lng: lng(),%0A %7D%0A %7D%0A%7D%0A
| |
8b150dc01a3a9223bbc6a1b49a2c1ed700c93218 | add supercars.js | models/supercars.js | models/supercars.js | JavaScript | 0.000732 | @@ -0,0 +1,342 @@
+'use strict';%0A%0Aconst mongoose = require('mongoose');%0Aconst Schema = mongoose.Schema;%0A%0Avar supercarSchema = new Schema(%7B%0A make: %7B%0A type: String,%0A required: true%0A %7D,%0A model: %7B%0A type: String%0A %7D,%0A zeroToSixty: %7B%0A type: Number%0A %7D,%0A price: %7... | |
18c59c4a49f96501a4f74f3cd517e7599a1d80cb | Update static/vendors/ace-builds/src-min-noconflict/snippets/json.js | static/vendors/ace-builds/src-min-noconflict/snippets/json.js | static/vendors/ace-builds/src-min-noconflict/snippets/json.js | JavaScript | 0 | @@ -0,0 +1,131 @@
+ace.define(%22ace/snippets/json%22,%5B%22require%22,%22exports%22,%22module%22%5D,function(e,t,n)%7B%22use strict%22;t.snippetText=undefined,t.scope=%22json%22%7D)
| |
b40339066be71a80e96ae0d1482260a14058f4bf | Change format to a more human-friendly version | src/scripts/content/attask.js | src/scripts/content/attask.js | /*jslint indent: 2 */
/*global $: false, document: false, togglbutton: false*/
'use strict';
togglbutton.render('#layout-container:not(.toggl)', {observe: true}, function (elem) {
var link,
description,
project = $('.objectlink.breadcrumb-link.first-item', elem).textContent;
description = function(){
var... | JavaScript | 0.000044 | @@ -204,276 +204,75 @@
tion
-,%0A project = $('.objectlink.breadcrumb-link.first-item', elem).textContent;%0A%0A description = function()%7B%0A var delimiter = ' %3E ',%0A w_type = window.location.pathname.split('/')%5B1%5D,%0A w_id = $('#layout-content').innerHTML.split('detailObjID%22:%22')%5B1%5D.split('... |
ca3d1044613a4b5c32f921375d4c6c413be539d2 | add inheritEmitter.js - example inherit EventEmitter | inheritEmitter/inheritEmitter.js | inheritEmitter/inheritEmitter.js | JavaScript | 0 | @@ -0,0 +1,1094 @@
+var util = require('util');%0Avar eventEmitter = require('events').EventEmitter;%0A%0Avar fs = require('fs');%0A%0Afunction inputChecker (name, file) %7B%0A this.name = name;%0A this.writeStream = fs.createWriteStream('./' + file + '.txt' ,%0A %7B'flags' : 'a',%0A 'encoding' : 'utf8',%0A ... | |
5851f206c2399e99482bc57baeb5c30538bf61fc | Add possibility to create integration from channel page - fix UI issues | src/Oro/Bundle/IntegrationBundle/Resources/public/js/channel-view.js | src/Oro/Bundle/IntegrationBundle/Resources/public/js/channel-view.js | /*jslint nomen:true*/
/*global define*/
define([
'jquery',
'backbone',
'underscore',
'orotranslation/js/translator',
'oroui/js/mediator',
'oroui/js/delete-confirmation'
], function ($, Backbone, _, __, mediator, DeleteConfirmation) {
"use strict";
/**
* @export orointegration/js/c... | JavaScript | 0 | @@ -4188,791 +4188,78 @@
e('s
-howLoading');%0A $.post(url, data, function (res, status, jqXHR) %7B%0A var formContent = $(res).find($form.selector);%0A if (formContent.length) %7B%0A $form.replaceWith(formContent);%0A f... |
b8ed960d3c00ff73be7c15c7dfac701d4fb1c329 | Add gradebook file | week-8/gradebook.js | week-8/gradebook.js | JavaScript | 0.000001 | @@ -0,0 +1,1292 @@
+/*%0AGradebook from Names and Scores%0AI worked on this challenge %5Bby myself, with:%5D%0AThis challenge took me %5B#%5D hours.%0AYou will work with the following two variables. The first, students, holds the names of four students.%0AThe second, scores, holds groups of test scores. The relative ... | |
292d50133ce9a3417c482984bb8cd055545e0f24 | Add Node.js require() hook. Issue #11. | require.js | require.js | JavaScript | 0 | @@ -0,0 +1,604 @@
+// require.js%0A// Node.js only: adds a require() hook for .json5 files, just like the native%0A// hook for .json files.%0A//%0A// Usage:%0A// require('json5/require');%0A// require('./foo'); // will check foo.json5 after foo.js, foo.json, etc.%0A// require('./bar.json5');%0A%0Avar FS = require('f... | |
8bdf4b9cb6703cf838dbe9f5b95b27ce1c6a4dda | add bare Facilities collection | js/app/collections/facilities.js | js/app/collections/facilities.js | JavaScript | 0 | @@ -0,0 +1,178 @@
+var Backbone = require('backbone'),%0A Facility = require('models/facility');%0A%0Avar Facilities = Backbone.Collection.extend(%7B%0A model: Facility%0A%7D);%0A%0Amodule.exports = Facilities;%0A
| |
bd892ec43539055e6dbd5aba3d46a35062fbe43a | Create average_mode.js | math/average_mode/average_mode.js | math/average_mode/average_mode.js | JavaScript | 0.00001 | @@ -0,0 +1,792 @@
+//Wikipedia Mode Page: https://en.wikipedia.org/wiki/Mode%0A//The code iterates through the list of numbers and counts the amount each number appears;%0A//Then it gets the one or ones that appear the most and return it or them.%0Aconst averageMode = numbersList =%3E %7B%0A let objCount = %7B%7D%0A ... | |
e7be3770bd6d8f46b29fb2f87d5c087511aa8366 | Add solution for "You're a square" | youre-a-square.js | youre-a-square.js | JavaScript | 0.000676 | @@ -0,0 +1,147 @@
+// https://www.codewars.com/kata/youre-a-square%0A%0Aconst isSquare = n =%3E (%0A n %3E= 0 ?%0A Math.pow(Math.round(Math.sqrt(n)), 2) === n :%0A false%0A);%0A
| |
ccd6f8d9bd761da94483b380fe4553ecc2da2669 | Add SexChoose Component | src/screens/ProfileScreen/ProfileUpdateScreen/SexChooseScreen.js | src/screens/ProfileScreen/ProfileUpdateScreen/SexChooseScreen.js | JavaScript | 0 | @@ -0,0 +1,1840 @@
+import React, %7B Component %7D from 'react';%0Aimport %7B%0A View,%0A Text,%0A TouchableWithoutFeedback,%0A VirtualizedList,%0A%7D from 'react-native';%0Aimport %7B ListItem %7D from 'react-native-elements';%0A%0Aimport Page from '../../../components/Page';%0Aimport %7B FlatLists %7D from '../.... | |
22fcfce59347b7715e3ce9bd6fe5387f77a64525 | Add benchmark | lib/node_modules/@stdlib/math/base/utils/float32-from-word/benchmark/benchmark.js | lib/node_modules/@stdlib/math/base/utils/float32-from-word/benchmark/benchmark.js | JavaScript | 0.000003 | @@ -0,0 +1,539 @@
+'use strict';%0A%0A// MODULES //%0A%0Avar bench = require( '@stdlib/bench' );%0Avar isnan = require( '@stdlib/math/base/utils/is-nan' );%0Avar pkg = require( './../package.json' ).name;%0Avar fromWordf = require( './../lib' );%0A%0A%0A// MAIN //%0A%0Abench( pkg, function benchmark( b ) %7B%0A%09var y... | |
22cc2f5e7e5419f275a862e7af68f346014db22e | Create DataTransformations.js for mangaging the conversion of raw NYTIMES data | src/util/DataTransformations.js | src/util/DataTransformations.js | JavaScript | 0 | @@ -0,0 +1,1228 @@
+/* DataTransformations.js%0A * transform raw data from New York Times as impurt and transform it into an array of objects%0A * Dependencies: moment%0A * Author: Tiffany Tse%0A * Created: July 29, 2017%0A */%0A%0A//import dependencies%0Aimport moment from 'moment';%0A%0Aconst getMultimediaUrlByForma... | |
18bb7ee1c877179c1908fe32fce0bc803efbe485 | update "Applications" CollectiveId to be NOT NULL | migrations/20200308233148-enforce-applications-collective-id.js | migrations/20200308233148-enforce-applications-collective-id.js | JavaScript | 0.998938 | @@ -0,0 +1,649 @@
+'use strict';%0A%0Amodule.exports = %7B%0A up: async (queryInterface, Sequelize) =%3E %7B%0A await queryInterface.sequelize.query(%60%0A UPDATE ONLY %22Applications%22 a%0A SET %22CollectiveId%22 = u.%22CollectiveId%22%0A FROM %22Users%22 u%0A WHERE u.id = a.%22CreatedByUserId... | |
6fecfff37c03338b1a6c1cac902be3be4f187cd4 | add support for serverUrl param | modules/NielsenVideoCensusPlugin/mw.NielsenVideoCensusPlugin.js | modules/NielsenVideoCensusPlugin/mw.NielsenVideoCensusPlugin.js | /**
* NielsenVideoCensusPlugin implemented per document outlined here:
* https://portal.kaltura.com/product/Shared%20Documents/Solution%20Architects/_Generic%20PRDs/Nielsen/KDP%20Nielsen%20Video%20Census%20Plugin%20PRD.docx
*/
mw.NielsenVideoCensusPlugin = function( embedPlayer, callback ){
this.init( embedPlayer, c... | JavaScript | 0.000001 | @@ -2345,16 +2345,51 @@
tion()%7B%0A
+%09%09%09%09alert( ' ended ad playback ');%0A
%09%09%09%09_thi
@@ -2573,16 +2573,80 @@
ar url =
+ ( this.getConfig('serverUrl') ) ? this.getConfig('serverUrl') :
'http:/
|
7b37cc86a65a2893f3fae6f007f82a8279fdc6d6 | create electron files | Core/Elementary-Electron/node_modules/lodash/chain/wrapperToString.js | Core/Elementary-Electron/node_modules/lodash/chain/wrapperToString.js | JavaScript | 0.000001 | @@ -0,0 +1,342 @@
+/**%0A * Produces the result of coercing the unwrapped value to a string.%0A *%0A * @name toString%0A * @memberOf _%0A * @category Chain%0A * @returns %7Bstring%7D Returns the coerced string value.%0A * @example%0A *%0A * _(%5B1, 2, 3%5D).toString();%0A * // =%3E '1,2,3'%0A */%0Afunction wrapperToStr... | |
030e2f0979e73de98d136fb6598309b5694bda98 | Move CaptchaForm from Vector to React SDK | src/components/login/CaptchaForm.js | src/components/login/CaptchaForm.js | JavaScript | 0 | @@ -0,0 +1,2161 @@
+/*%0ACopyright 2015 OpenMarket Ltd%0A%0ALicensed under the Apache License, Version 2.0 (the %22License%22);%0Ayou may not use this file except in compliance with the License.%0AYou may obtain a copy of the License at%0A%0A http://www.apache.org/licenses/LICENSE-2.0%0A%0AUnless required by applica... | |
6805c3bf2cad275e669a470da2bec84999086ad4 | Update static/vendors/ace-builds/src-min-noconflict/snippets/gobstones.js | static/vendors/ace-builds/src-min-noconflict/snippets/gobstones.js | static/vendors/ace-builds/src-min-noconflict/snippets/gobstones.js | JavaScript | 0 | @@ -0,0 +1,607 @@
+ace.define(%22ace/snippets/gobstones%22,%5B%22require%22,%22exports%22,%22module%22%5D,function(e,t,n)%7B%22use strict%22;t.snippetText=%22# Procedure%5Cnsnippet proc%5Cn%09procedure $%7B1?:name%7D($%7B2:argument%7D) %7B%5Cn%09%09$%7B3:// body...%7D%5Cn%09%7D%5Cn%5Cn# Function%5Cnsnippet fun%5Cn%09fu... | |
e7842e76bafc42c9cc18df4951805e089847610e | Rename presentational into presentation folder. | kasih.in/app/assets/frontend/components/common/help/presentation/HelpForm.js | kasih.in/app/assets/frontend/components/common/help/presentation/HelpForm.js | JavaScript | 0 | @@ -0,0 +1,1184 @@
+import React, %7BPropTypes%7D from 'react';%0A%0A%0Aclass HelpForm extends React.Component%7B%0A%0A constructor(props, context) %7B%0A super(props, context);%0A%0A this.state = %7B%0A help: %7B message: %22%22 %7D%0A %7D;%0A%0A this.onMessageChange = this.onMessageChange.bind(this)... | |
b1ea14bda7566d12aa12a960634a27be993eafa6 | Add $ to apply | client/app/auction/video/video.js | client/app/auction/video/video.js | angular.module('genesis.video', ['pubnub.angular.service'])
.controller('VideoController', function($scope, $window, $location, Keys, Video, Auction) {
$scope.audience = 0;
// use ID on URL as channel
var id = $location.path().split("/")[2]; //domain.com/auctions/15
// state of video buttons
$scope.on = fal... | JavaScript | 0 | @@ -520,32 +520,33 @@
on);%0A $scope.
+$
apply();%0A %7D;%0A%0A
@@ -1183,32 +1183,33 @@
%0A $scope.
+$
apply();%0A %7D;%0A
@@ -1354,32 +1354,33 @@
%0A $scope.
+$
apply();%0A %7D;%0A
@@ -1457,16 +1457,17 @@
$scope.
+$
apply();
|
b0406e6d1432448c2e7d7f8c30e4cb26d4dcd8dc | Add biomart utils | gdbase-client/utils/biomart.js | gdbase-client/utils/biomart.js | JavaScript | 0.000001 | @@ -0,0 +1,2023 @@
+//Function to get the biomart command%0Amodule.exports.Command = function()%0A%7B%0A%09//Return the biomart command%0A%09return 'wget -O %7Boutput%7D %5C'http://%7Bassembly%7D.ensembl.org/biomart/martservice?query=%7Bxml%7D%5C'';%0A%7D;%0A%0A//Function to build the xml file%0Amodule.exports.XML = fu... | |
282052f514294530d884bf944f9e1271ce37c5ab | Add DictionaryField to handle props from dictionary | client/src/HOC/DictionaryField.js | client/src/HOC/DictionaryField.js | JavaScript | 0 | @@ -0,0 +1,477 @@
+import React, %7B Component %7D from 'react'%0Aimport PropTypes from 'prop-types'%0Aimport _isEmpty from 'lodash/isEmpty'%0A%0Aconst DictionaryField = (propsArg) =%3E (WrappedComponent) =%3E %7B%0A%09return class DictionaryField extends Component %7B%0A%09%09static propTypes = %7B%0A%09%09%09labelKey... | |
94c9035e14f13bc7809e1fbe1773b83c743fe122 | update handle_keyevents | packages/storybook-ui/src/modules/ui/configs/__tests__/handle_keyevents.js | packages/storybook-ui/src/modules/ui/configs/__tests__/handle_keyevents.js | import handleKeyEvents from '../handle_keyevents';
// import { expect } from 'chai';
// import sinon from 'sinon';
import keycode from 'keycode';
describe('manager.ui.config.handle_keyevents', () => {
test('should call the correct action', () => {
const actions = {
shortcuts: {
handleEvent: jest.fn... | JavaScript | 0.000002 | @@ -48,72 +48,8 @@
s';%0A
-// import %7B expect %7D from 'chai';%0A// import sinon from 'sinon';%0A
impo
|
a1a62a0b9c8b48fe9299c1e5bbb1d9b9abc313da | Correct comment about when base written to index in conflict | src/merge.js | src/merge.js | var objects = require("./objects");
var index = require("./index");
var files = require("./files");
var diff = require("./diff");
var refs = require("./refs");
var util = require("./util");
var merge = module.exports = {
readCommonAncestor: function(aHash, bHash) {
var sorted = [aHash, bHash].sort();
aHash =... | JavaScript | 0 | @@ -2099,16 +2099,26 @@
ed) %7B //
+ (undef if
same fi
@@ -2143,16 +2143,17 @@
content
+)
%0A
|
06bb39f4411f1c6877222cbb98d2b10c1be4f710 | add tests for AppDispatcher | js/dispatcher/__tests__/AppDispatcher-test.js | js/dispatcher/__tests__/AppDispatcher-test.js | JavaScript | 0 | @@ -0,0 +1,1513 @@
+jest.autoMockOff();%0A%0Adescribe('AppDispatcher', function() %7B%0A var AppDispatcher;%0A%0A beforeEach(function() %7B%0A AppDispatcher = require('../AppDispatcher').default;%0A %7D);%0A%0A it('sends actions to subscribers', function() %7B%0A var listener = jest.genMockFunction();%0A A... | |
0ea8e0da81f940607572d4d1cad11754f048188d | Add benchmark | lib/node_modules/@stdlib/math/stats/incr/mstdev/benchmark/benchmark.js | lib/node_modules/@stdlib/math/stats/incr/mstdev/benchmark/benchmark.js | JavaScript | 0.000003 | @@ -0,0 +1,1549 @@
+/**%0A* @license Apache-2.0%0A*%0A* Copyright (c) 2018 The Stdlib Authors.%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/lic... | |
7ae3a5d029132d7bb635f5f906a82bf907f98040 | add router | routes/router.js | routes/router.js | JavaScript | 0.000001 | @@ -0,0 +1,202 @@
+'use strict';%0A%0Avar express = require('express');%0Avar router = express.Router();%0A%0A// define the home page route%0Arouter.get('/', function(req, res) %7B%0A res.send('home page');%0A%7D);%0A%0Amodule.exports = router;
| |
14166482bd911782505f1b453f104357e103987f | Add Scatter Plot tests | benchexec/tablegenerator/react-table/src/tests/ScatterPlot.test.js | benchexec/tablegenerator/react-table/src/tests/ScatterPlot.test.js | JavaScript | 0 | @@ -0,0 +1,2562 @@
+// This file is part of BenchExec, a framework for reliable benchmarking:%0A// https://github.com/sosy-lab/benchexec%0A//%0A// SPDX-FileCopyrightText: 2019-2020 Dirk Beyer %3Chttps://www.sosy-lab.org%3E%0A//%0A// SPDX-License-Identifier: Apache-2.0%0A%0Aimport React from %22react%22;%0Aimport Scatte... | |
400d76d0610d7c4eb9e481737f9904e1109fc247 | add some equilibrium. | packages/http/httpcall_server.js | packages/http/httpcall_server.js | var path = Npm.require('path');
var request = Npm.require('request');
var url_util = Npm.require('url');
HTTPInternals = {
NpmModules: {
request: {
version: Npm.require('request/package.json').version,
module: request
}
}
};
// _call always runs asynchronously; HTTP.call, defined below,
// wra... | JavaScript | 0.000004 | @@ -657,16 +657,126 @@
%7C%7C %7B%7D;%0A%0A
+ if (_.has(options, 'beforeSend')) %7B%0A throw new Error(%22Option beforeSend not supported on server.%22);%0A %7D%0A%0A
method
|
6c03a2af0d8b2c32cccd9bbbdd338a257858c32e | Fix Ambient Sleeping Pill connector | connectors/ambientsleepingpill.js | connectors/ambientsleepingpill.js | 'use strict';
/* global Connector */
const DEFAULT_TRACK_ART = 'nocover.png';
Connector.playerSelector = '#player';
Connector.artistSelector = '#trackartist';
Connector.trackSelector = '#tracktitle';
Connector.playButtonSelector = '#play';
Connector.getTrackArt = function() {
let trackArtUrl = $('#trackimageurl... | JavaScript | 0 | @@ -36,50 +36,8 @@
*/%0A%0A
-const DEFAULT_TRACK_ART = 'nocover.png';%0A%0A
Conn
@@ -201,323 +201,4 @@
y';%0A
-%0AConnector.getTrackArt = function() %7B%0A%09let trackArtUrl = $('#trackimageurl').attr('src');%0A%09if (isDefaultTrackArt(trackArtUrl)) %7B%0A%09%09return null;%0A%09%7D%0A%0A%09return trackArtUrl;%0A%7D... |
2a3750c8717fdee4cbf2540627fe2458d7603adf | Add searchActionCreators. | src/mb/actions/search-action-creators.js | src/mb/actions/search-action-creators.js | JavaScript | 0 | @@ -0,0 +1,326 @@
+import %7B createAction %7D from 'redux-actions';%0A%0Aimport movieApi from '../../db/api/movie';%0A%0Aexport default %7B%0A loadInTheaters: createAction('LOAD_IN_THEATERS', movieApi.inTheaters),%0A setSearchValue: createAction('SET_SEARCH_VALUE', payload =%3E payload),%0A search: createAction('SE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.