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 |
|---|---|---|---|---|---|---|---|
cb2806d887bed096eee6ac3e73fa07d3e6a77bed | Revert "Delete webpack.config.js" | webpack.config.js | webpack.config.js | JavaScript | 0 | @@ -0,0 +1,100 @@
+// Look in ./config folder for webpack.dev.js%0Amodule.exports = require('./config/webpack.prod.js');%0A
| |
b9fd6df3c57ac7962eb7d5e4e298e8e7545ef40e | Fix webutil.findIssuer. | src/js/client/webutil.js | src/js/client/webutil.js | exports.removeClassPrefix = function (el, group)
{
var $el = $(el);
var classes = $el.attr("class");
if (!classes || !classes.length) return;
classes = classes.split(" ").map(function(item) {
return item.indexOf(group) === 0 ? "" : item;
});
$el.attr("class", classes.join(" "));
};
/**
* Error handl... | JavaScript | 0 | @@ -1315,21 +1315,23 @@
imit=0;%0A
+%0A
for
+
(var n i
@@ -1338,18 +1338,16 @@
n lines)
-%0A
%7B%0A i
@@ -1343,24 +1343,25 @@
es) %7B%0A if
+
(lines.hasOw
@@ -1373,20 +1373,16 @@
erty(n))
-%0A
%7B%0A
@@ -1376,32 +1376,33 @@
y(n)) %7B%0A if
+
(lines%5Bn%5D.curren
@@ -1403,18 +1403,2... |
c919c77c4faa44ad07434d3c97a6d58bd09e71e8 | Add blur unit tests. | tests/unit/dom/blur-test.js | tests/unit/dom/blur-test.js | JavaScript | 0 | @@ -0,0 +1,2139 @@
+import %7B module, test %7D from 'qunit';%0Aimport %7B focus, blur, setContext, unsetContext %7D from '@ember/test-helpers';%0Aimport %7B buildInstrumentedElement %7D from '../../helpers/events';%0A%0Amodule('DOM Helper: blur', function(hooks) %7B%0A let element;%0A%0A hooks.beforeEach(async funct... | |
a79dd613fb12841df94c4645740f11e4256ebdaf | Add helper for adding classes/styles to elements | src/js/framework/styler.js | src/js/framework/styler.js | JavaScript | 0 | @@ -0,0 +1,409 @@
+let CLASSES = %7B%0A hidden: %22hidden%22,%0A%7D;%0A%0Aclass Styler %7B%0A addClass(elem, klass) %7B%0A elem.classList.add(klass);%0A %7D%0A%0A get classes() %7B%0A return CLASSES;%0A %7D;%0A%0A hide(elem) %7B%0A this.addClass(elem, CLASSES.hidden);%0A %7D%0A%0A removeClass(elem, kla... | |
7d0078c1d445492e0bc1167869d6059bd25c2e9a | Create CDVOrientationProxy.js | src/windows/CDVOrientationProxy.js | src/windows/CDVOrientationProxy.js | JavaScript | 0 | @@ -0,0 +1,2173 @@
+/*%0A *%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements. See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership. The ASF licenses this file%0A * to you under the Apache License, V... | |
d8169ddecf330ef83497657d300902c972e77fc2 | Use actual user ID as `session.userId` | server/rpc/user.js | server/rpc/user.js | var config = require('../config.js')
exports.actions = function(req, res, ss) {
req.use('session')
return {
authenticate: function(username, password){
config.authenticateUser(username, password, function(err, authenticated){
if (err){
return res(err)
}
if (aut... | JavaScript | 0.000001 | @@ -227,29 +227,20 @@
on(err,
-authenticated
+user
)%7B%0A
@@ -301,29 +301,20 @@
if (
-authenticated
+user
)%7B%0A%0A
@@ -344,9 +344,15 @@
d =
-1
+user.id
//s
|
979714f3ec81206c31c046513ca9d7bf15c35654 | move MM_openBrWindow to header | common/javascript/misc.js | common/javascript/misc.js | JavaScript | 0.000002 | @@ -0,0 +1,95 @@
+%0A%0A%0Afunction MM_openBrWindow(theURL,winName,features) %7B%0A%09window.open(theURL,winName,features);%0A%7D
| |
7c13366e4a0461a3915ed76c6d00e1fc4cba2150 | Add creation unit test | test/test-creation.js | test/test-creation.js | JavaScript | 0 | @@ -0,0 +1,797 @@
+'use strict';%0A%0Avar path = require('path');%0Avar helpers = require('yeoman-generator').test;%0A%0Adescribe('sass library generator', function () %7B%0A beforeEach(function (done) %7B%0A helpers.run(path.join( __dirname, '../app'))%0A .inDir(path.join( __dirname, './tmp')) // Clear the d... | |
46f2152ffe20110b7dc290fd897aaa9a70063641 | Create mPushNotification.js | www/mPushNotification.js | www/mPushNotification.js | JavaScript | 0 | @@ -0,0 +1,130 @@
+window.mpushnotification = function(task,args,success,error) %7B%0A%09cordova.exec(success, error, %22mPushNotification%22, task, args);%0A%7D;%0A
| |
593f24f976150a88fd58b4c7d7d3727a558a9382 | Add tests for restoring | test/tests/restore.js | test/tests/restore.js | JavaScript | 0 | @@ -0,0 +1,999 @@
+describe('after clearing and appending a run and showing', () =%3E %7B%0A const run = %7Binput: 'i1', output: 'o1', status: 's1'%7D;%0A let callbackErr;%0A let callbackRun;%0A%0A beforeEach(done =%3E %7B%0A callbackErr = undefined;%0A callbackRun = undefined;%0A%0A pl... | |
40dc7555f35b32a36bf83ec3f95986142ba4914f | add dev task | tasks/dev.js | tasks/dev.js | JavaScript | 0.000007 | @@ -0,0 +1,282 @@
+%0Amodule.exports = function(grunt) %7B%0A%09grunt.registerTask('dev', 'package all jenscript plugins in one file without minified version, usage $ grunt dev', function(featuresArgs) %7B%0A%09%09 grunt.log.writeln('jenscript@'+grunt.config('pkg').version);%0A%09%09 grunt.task.run(%5B%22package%22%5... | |
facb2b836ffcde00e2f386b664ad9187354ed0b9 | add db structure for mongodb | app/db.js | app/db.js | JavaScript | 0.000001 | @@ -0,0 +1,1083 @@
+var mongoose = require( 'mongoose' );%0Avar Schema = mongoose.Schema;%0A%0Avar Block = new Schema(%0A%7B%0A %22number%22: Number,%0A %22hash%22: String,%0A %22parentHash%22: String,%0A %22nonce%22: String,%0A %22sha3Uncles%22: String,%0A %22logsBloom%22: String,%0A %22transact... | |
44f6c17a1982d052431ab932379097abe013d033 | Test Selection Sort: Initialized | test/algorithms/sorting/testSelectionSort.js | test/algorithms/sorting/testSelectionSort.js | JavaScript | 0.000001 | @@ -0,0 +1,2236 @@
+/* eslint-env mocha */%0Aconst SelectionSort = require('../../../src').Algorithms.Sorting.SelectionSort;%0Aconst assert = require('assert');%0A%0Adescribe('SelectionSort', () =%3E %7B%0A it('should have no data when empty initialization', () =%3E %7B%0A const inst = new SelectionSort();%0A as... | |
7198703ce5437ba73ffddc69146e68eddd19881e | Add basic rollup plugin | rollup.js | rollup.js | JavaScript | 0 | @@ -0,0 +1,696 @@
+ %0Avar imbac = require('./dist/compiler.js');%0Avar extname = require('path').extname;%0A%0Aexports.default = function imba(options) %7B%0A options = Object.assign(%7B%0A sourceMap: %7B%7D,%0A bare: true,%0A extensions: %5B'.imba', '.imba2'%5D,%0A ENV_ROLLUP: true%0A %7D, options %7C%... | |
db28492e6bd99aa138e0c7d4a1ce15fe4661f13b | Tweak the description of id-map | packages/id-map/package.js | packages/id-map/package.js | Package.describe({
summary: "Dictionary data structure: a wrapper for a raw object",
internal: true
});
Package.on_use(function (api) {
api.export('IdMap');
api.use(['underscore', 'json', 'ejson']);
api.add_files([ 'id-map.js' ]);
});
| JavaScript | 0.001368 | @@ -53,36 +53,33 @@
ture
-:
a
- wrapper for a raw object
+llowing non-string keys
%22,%0A
|
e3aa1511ff7a4fc66270d1e8dbbfa0d5f4042694 | add the Passport Strategy as a utils file | utils/Authentication.js | utils/Authentication.js | JavaScript | 0 | @@ -0,0 +1,1019 @@
+/**%0A * Authentication Library%0A *%0A * Uses Passport and the TxSSC Passport Strategy%0A * to manage OAuth authentication with the TxSSC SSO.%0A */%0A%0Avar passport = require('passport'),%0A txsscStrategy = require('passport-txssc').Strategy;%0A%0Amodule.exports = function(options) %7B%0A var... | |
df7e654d9768edc331455e0a08a9b672c6b2ab90 | Create script.js | script.js | script.js | JavaScript | 0.000005 | @@ -0,0 +1,886 @@
+%0A%0Afunction getParameterByName(name, url) %7B%0A if (!url) url = window.location.href;%0A name = name.replace(/%5B%5C%5B%5C%5D%5D/g, %22%5C%5C$&%22);%0A var regex = new RegExp(%22%5B?&%5D%22 + name + %22(=(%5B%5E&#%5D*)%7C&%7C#%7C$)%22),%0A results = regex.exec(url);%0A if (!res... | |
083b48457d9e3faea1aaff12fbd766028548a3b5 | Create script.js | script.js | script.js | JavaScript | 0.000001 | @@ -0,0 +1,556 @@
+var number = 99,%0A subtract = 1,%0A drink = %22drink%22,%0A body = document.body;%0Ado%7B%0A createDiv(number + %22 bottles of %22 + drink + %22 on the wall!%22);%0A document.title = number + %22 Bottles of %22 + drink.toProperCase() + %22 on the Wall%22;%0A createDiv(number + %22 bottle... | |
3aa23197d43472168b625dae83ab68b0a36bdfb1 | Create server.js | server.js | server.js | JavaScript | 0.000002 | @@ -0,0 +1,824 @@
+var Hapi = require('hapi');%0Avar Ws = require('ws');%0A%0Avar webSockets = %5B%5D;%0Avar server = new Hapi.Server(8000);%0A%0Aserver.start(function () %7B%0A%0A var ws = new Ws.Server(%7B server: server.listener %7D);%0A ws.on('connection', function (socket) %7B%0A%0A socket.send('Welco... | |
f2912ffe4d2e659ea1042b9d8699c0d44d9de918 | Move loadScript into separate file | static/js/load_script.js | static/js/load_script.js | JavaScript | 0.000001 | @@ -0,0 +1,632 @@
+// Load a javascript file from the given url, and call the given callback when%0A// it's done loading.%0Afunction loadScript(url, callback)%7B%0A var script = document.createElement(%22script%22)%0A script.type = %22text/javascript%22;%0A%0A if (script.readyState)%7B //IE%0A script.onreadystat... | |
6bfea2d3a03c72ae11738bce6ff75df74b002509 | Create initial server file | server.js | server.js | JavaScript | 0.000001 | @@ -0,0 +1,176 @@
+var express = require('express');%0A%0Avar app = express();%0A%0Arequire('./server/utils/middleware.js')(app, express);%0Arequire('./server/routes')(app, express);%0Amodule.exports = app;%0A
| |
66c9681b8a3e6e3697c8b4174477dee4b02d07dc | Create server | server.js | server.js | JavaScript | 0.000001 | @@ -0,0 +1,648 @@
+import path from 'path';%0Aimport webpack from 'webpack';%0Aimport express from 'express';%0Aimport webpackDevMiddleware from 'webpack-dev-middleware';%0Aimport webpackHotMiddleware from 'webpack-hot-middleware';%0A%0Aimport config from './webpack.config';%0A%0Aconst compiler = webpack(config);%0A%0A... | |
aea32a49b51aea522fe9ae9c5a128f990013c450 | Create basic test server | server.js | server.js | JavaScript | 0.000001 | @@ -0,0 +1,621 @@
+var dgram = require('dgram'),%0A LogPacket = require('./logpacket.js');%0A%0Avar server = dgram.createSocket('udp4');%0A%0Avar secret = %22%22;%0A%0Afunction getAddress(address) %7B%0A%09return address.address + ':' + address.port;%0A%7D%0A%0Aserver.on('listening', function() %7B%0A%09console.log(... | |
29305d11a9254ce42e1e786e89931027a36aefd5 | Add basic server.js as per hapi.js tutorial | server.js | server.js | JavaScript | 0 | @@ -0,0 +1,888 @@
+var Hapi = require('hapi');%0Avar Good = require('good');%0A%0Avar server = new Hapi.Server();%0Aserver.connection(%7B port: 3000 %7D);%0A%0Aserver.route(%7B%0A method: 'GET',%0A path: '/',%0A handler: function (request, reply) %7B%0A reply('Hello, world!');%0A %7D%0A%7D);%0A%0Aser... | |
0226ba8f4ea5deca12026e1dfea3348afb414ad8 | add server | server.js | server.js | JavaScript | 0.000001 | @@ -0,0 +1,355 @@
+var io = require('socket.io')();%0Avar ss = require('socket.io-stream');%0Avar fs = require('fs');%0A%0Avar port = 8080;%0A%0Aio.on('connection', function (socket) %7B%0A ss(socket).on('stream-audio', function(stream) %7B%0A console.log('stream-audio');%0A stream.pipe(fs.createWriteS... | |
c3b42c959539a11067ae65e82d915ba07d336120 | Create ExcelColumnNo.js | ExcelColumnNo.js | ExcelColumnNo.js | JavaScript | 0.000002 | @@ -0,0 +1,998 @@
+/**%0A * @param %7Bstring%7D columnTitle%0A * @return %7Bnumber%7D%0A */%0Avar titleToNumber = function(columnTitle) %7B%0A // if two letters first letter val *26 + second letter val%0A // AB%0A // A = 1 * 26 + 2%0A let map = %7B%0A A: 1,%0A B: 2,%0A C: 3,%0A D... | |
c2aaf644d32990b9873e79976b2aa54de9052c7b | Add a with database higher order component | src/components/hocs.js | src/components/hocs.js | JavaScript | 0.000003 | @@ -0,0 +1,459 @@
+import %7B lifecycle %7D from 'recompose'%0A%0Aimport database from '../database'%0A%0Aexport const withDatabaseSubscribe = (trigger, getRefPath, getOnTrigger) =%3E (%0A lifecycle(%7B%0A componentWillMount() %7B%0A this.databaseRef = database.ref(getRefPath(this.props))%0A this.onTrigge... | |
62fc66d3b2231c584b26b7b3c7c270653e13b2ec | Add jade tasks | gulp/tasks/jade.js | gulp/tasks/jade.js | JavaScript | 0.004755 | @@ -0,0 +1,390 @@
+'use strict';%0A%0A// Necessary Plugins%0Avar gulp = require('gulp')%0A ,paths = require('../paths')%0A ,jade = require('gulp-jade');%0A%0A// Call Jade to compile Templates%0Amodule.exports = gulp.task('jade', function () %7B%0A return gulp.src(paths.source.jade)%0A .pipe(jade(%7Bp... | |
178053d5f1fff8e24c0178417cf76f729736faf7 | Create EnemyQuadrapus.js | game/js/gameentities/EnemyQuadrapus.js | game/js/gameentities/EnemyQuadrapus.js | JavaScript | 0.000001 | @@ -0,0 +1,1677 @@
+%22use strict%22;%0A%0Avar QuadrapusEnemy = function(world, options) %7B%0A%09this.world = world;%0A%09%0A%09this.spriteName = options.spriteName %7C%7C null;%0A%09this.color = %22#00FFFF%22;%0A%09%0A%09this.side = options.side;%0A%09this.type = %22enemy%22;%0A%09this.active = true;%0A%09this.width ... | |
9d1b664c9c56047b6ef14f0f9b320ce3d1e05f4a | Create separate file for js that should be initialized on page load | nyan/assets/js/application.js | nyan/assets/js/application.js | JavaScript | 0 | @@ -0,0 +1,62 @@
+$(document).ready(function() %7B%0A $(document).foundation();%0A%7D);
| |
50fa181b3b3a4275e8b9bf91adfcc9e7b14d93b2 | Add example keys.js file | src/server/keys.example.js | src/server/keys.example.js | JavaScript | 0.000001 | @@ -0,0 +1,260 @@
+// Populate this object with your own API Keys.%0Amodule.exports = %7B%0A googleMaps: 'YOUR_GOOGLE_MAPS_API_KEY',%0A yelp: 'YOUR_YELP_API_KEY',%0A yelpSecret: 'YOUR_YELP_CONSUMER_SECRET',%0A yelpToken: 'YOUR_YELP_TOKEN',%0A yelpTokenSecret: 'YOUR_YELP_TOKEN_SECRET',%0A%7D;
| |
c59ca91bc1136f001cbe3d87c9cab10c1e3c1769 | Create globals.jsm | chrome/utils/globals.jsm | chrome/utils/globals.jsm | JavaScript | 0.000001 | @@ -0,0 +1,570 @@
+let EXPORTED_SYMBOLS = %5B'UC'%5D;%0A%0Alet %7B%0A classes: Cc,%0A interfaces: Ci,%0A utils: Cu%0A%7D = Components;%0A%0Afunction globals () %7B%0A Cc%5B'@mozilla.org/observer-service;1'%5D.getService(Ci.nsIObserverService).addObserver(this, 'domwindowopened', false);%0A%7D;%0A%0A// to store flag... | |
59bf16b1b513f3370cea514975b807e16009dd44 | 解密-凯撒加密右移1位:decode1(s) | L04/task04-06.js | L04/task04-06.js | JavaScript | 0.000001 | @@ -0,0 +1,1345 @@
+// %E4%BD%9C%E4%B8%9A 6%0A// %E5%AE%9E%E7%8E%B0 decode1 %E5%87%BD%E6%95%B0, %E6%8A%8A%E4%BD%9C%E4%B8%9A 5 %E5%8A%A0%E5%AF%86%E7%9A%84%E5%AF%86%E7%A0%81%E8%A7%A3%E5%AF%86%E4%B8%BA%E6%98%8E%E6%96%87%E5%B9%B6%E8%BF%94%E5%9B%9E%0A//%0A// %E6%B3%A8%E6%84%8F:%0A// s %E6%98%AF%E4%B8%80%E4%B8%AA%E5%8F%A... | |
501855d07a5ff5a0be5367b6b58ee6bd255e1fe8 | Create content.js | content.js | content.js | JavaScript | 0.000001 | @@ -0,0 +1,67 @@
+function c0() %7B%0A return '%3Cdiv class=%22js js-inner inner%22%3E%3C/div%3E'%0A%7D%0A
| |
954f9662cf7295a2529b7e0f3168d8ae0dd9efbf | add quote id to admin table | static/js/admin_table.js | static/js/admin_table.js | var FormButton = React.createClass({
render: function() {
return (
<a {...this.props}
href="javascript:;"
role="button"
className={(this.props.className || '') + ' btn'} />
);
}
});
var AdminMain = React.createClass({
getInitialState: function() {
return {
quoteText: '',
quotes: [],
inde... | JavaScript | 0 | @@ -1141,24 +1141,49 @@
id%7D /%3E%3C/td%3E%0A
+%09%09%09%09%09%3Ctd%3E%7Bquote.id%7D%3C/td%3E%0A
%09%09%09%09%09%3Ctd%3E%7Bqu
@@ -3829,24 +3829,45 @@
ll%7D /%3E%3C/th%3E%0A
+%09%09%09%3Cth%3EQuote Id%3C/th%3E%0A
%09%09%09%3Cth%3EQuote
|
6a22eb335cc6ac638c1473a0b9fa73f7514d6bcd | teste de listagem de contas | public/modules/payables/tests/payables.client.controller.test.js | public/modules/payables/tests/payables.client.controller.test.js | JavaScript | 0 | @@ -0,0 +1,2522 @@
+'use strict';%0A%0A(function() %7B%0A // Payables Controller Spec%0A describe('Payables Controller Tests', function() %7B%0A // Initialize global variables%0A var PayablesController,%0A scope,%0A $httpBackend,%0A $stateParams,%0A $location;%0A%0A // The $resource servi... | |
a0b7c62f4dbfc029334b18488c5bcabbc0a13eaa | Create bundle.js | bundle.js | bundle.js | JavaScript | 0.000003 | @@ -0,0 +1,2538 @@
+/******/ (function(modules) %7B // webpackBootstrap%0A/******/ %09// The module cache%0A/******/ %09var installedModules = %7B%7D;%0A%0A/******/ %09// The require function%0A/******/ %09function __webpack_require__(moduleId) %7B%0A%0A/******/ %09%09// Check if module is in cache%0A/******/ %09%09if(... | |
42f3bf03711b050ca62a802f06748754d2d2b0f8 | add contact data | canvas.js | canvas.js | JavaScript | 0 | @@ -0,0 +1,1143 @@
+let canvas = document.querySelector('#animation')%0A%0Acanvas.width = window.innerWidth%0Acanvas.height = window.innerHeight%0A%0Avar context = canvas.getContext('2d')%0A%0A// context.fillRect(200, 200, 100, 100)%0A%0Afor (let i = 0; i %3C (Math.random() * 1000); i++) %7B%0A%7D%0Acounter = 0%0Afunct... | |
39ff2a694b0167cbb573e55dda77acdbe1a1b59f | Create Rovarspraket2.js | Rovarspraket2.js | Rovarspraket2.js | JavaScript | 0 | @@ -0,0 +1 @@
+%0A
| |
73f423351936b490d4e7d21063ee9b94db364035 | Implement Westeros Bleeds (#2898) | server/game/cards/16-TTWDFL/WesterosBleeds.js | server/game/cards/16-TTWDFL/WesterosBleeds.js | JavaScript | 0 | @@ -0,0 +1,808 @@
+const DrawCard = require('../../drawcard');%0Aconst GameActions = require('../../GameActions');%0A%0Aclass WesterosBleeds extends DrawCard %7B%0A setupCardAbilities() %7B%0A this.action(%7B%0A title: 'Discard characters',%0A phase: 'dominance',%0A message: %... | |
77759cb56c963057e22992ccf092f8a188a14ca7 | Add Diamond component | desktop/reactified/client/src/Task/Diamond.js | desktop/reactified/client/src/Task/Diamond.js | JavaScript | 0 | @@ -0,0 +1,219 @@
+import React, %7B Component %7D from 'react';%0A%0Aclass Diamond extends Component %7B%0A render() %7B%0A return (%0A %3Cp className=%22Diamond%22 style=%7B%7B color: this.props.color %7D%7D%3E◆%3C/p%3E%0A );%0A %7D%0A%7D%0A%0Aexport default Diamond;%0A
| |
825fea63a39aa586b07ba9ffc62252a90435c8ad | remove array destructuring until we can fix babel config | app/assets/javascripts/diff.js.es6 | app/assets/javascripts/diff.js.es6 | /* eslint-disable */
((global) => {
const UNFOLD_COUNT = 20;
class Diff {
constructor() {
$('.files .diff-file').singleFileDiff();
$('.files .diff-file').filesCommentButton();
if (this.diffViewType() === 'parallel') {
$('.content-wrapper .container-fluid').removeClass('container-lim... | JavaScript | 0 | @@ -673,81 +673,300 @@
-const %5BoldLineNumber, newLineNumber%5D = this.lineNumbers($target.parent())
+// current babel config relies on iterators implementation, so we cannot simply do:%0A // const %5BoldLineNumber, newLineNumber%5D = this.lineNumbers($target.parent());%0A const ref = this.lineNumbers(... |
3de4f0eded91b6d71c6b5b5f84e644844764a7e2 | Copy backend unit test to new tree structure | server/test.js | server/test.js | JavaScript | 0 | @@ -0,0 +1,838 @@
+var request = require('request')%0Avar expect = require('chai').expect%0A%0Adescribe('Warehouseman', function() %7B%0A%09it('should get food', function(done) %7B%0A%09%09// GIVEN%0A%09%09var food = 'mozza'%0A%09%09var host = 'http://localhost:4000'%0A%0A%09%09// WHEN%0A%09%09request.get(host + '/get-... | |
089daef38052207dd54addeb7b870dfc72d5c108 | Create bootstrap.js | server/bootstrap.js | server/bootstrap.js | JavaScript | 0.000001 | @@ -0,0 +1,1309 @@
+// if the database is empty on server start, create some sample data.%0AMeteor.startup(function () %7B%0A if (Lists.find().count() === 0) %7B%0A var data = %5B%0A %7Bname: %22Meteor Principles%22,%0A items: %5B%22Data on the Wire%22,%0A %22One Language%22,%0A %22Databa... | |
811290af15fdd662f3a2a7df7932e711ff50c239 | update fiveringsdb api url | server/fetchdata.js | server/fetchdata.js | /*eslint no-console:0 */
const request = require('request');
const mongoskin = require('mongoskin');
const config = require('config');
const db = mongoskin.db(config.dbPath);
const fs = require('fs');
const mkdirp = require('mkdirp');
const path = require('path');
var apiUrl = 'https://fiveringsdb.com/';
function fet... | JavaScript | 0 | @@ -273,32 +273,36 @@
iUrl = 'https://
+api.
fiveringsdb.com/
|
77e4a3c2d7ed2a97cdb46f2999b5eba7fc5e6a2f | fix props bug with vue (#1009) | packages/node_modules/cerebral/src/views/vue/connect.js | packages/node_modules/cerebral/src/views/vue/connect.js | import View from '../View'
export default function connect(dependencies, component) {
component.inject = component.inject
? component.inject.concat(['cerebral_controller'])
: ['cerebral_controller']
component.methods = Object.assign(component.methods || {}, {
_cererebral_onUpdate: function(stateChange... | JavaScript | 0 | @@ -1003,16 +1003,22 @@
s.$props
+ %7C%7C %7B%7D
).forEac
|
8e3ab48908e403b9d0b7d38aab05898f68d5bae2 | add getDomain tst (#4356) | src/utils/sources-tree/tests/treeOrder.spec.js | src/utils/sources-tree/tests/treeOrder.spec.js | JavaScript | 0 | @@ -0,0 +1,526 @@
+import %7B getDomain %7D from %22../treeOrder%22;%0A%0Adescribe(%22getDomain%22, () =%3E %7B%0A it(%22parses a url and returns the host name%22, () =%3E %7B%0A expect(getDomain(%22http://www.mozilla.com%22)).toBe(%22mozilla.com%22);%0A %7D);%0A%0A it(%22returns null for an undefined string%22, ... | |
c681cecc3797e1709aa8fbcc06c7e358dc17dd8e | Add api load test for transactions without filters | api_performance/transactionsWithoutFilters.js | api_performance/transactionsWithoutFilters.js | JavaScript | 0 | @@ -0,0 +1,736 @@
+import http from 'k6/http'%0Aimport %7B check %7D from 'k6'%0Aconst auth = require('./auth.js')%0A%0Aconst BASE_URL = __ENV.BASE_URL %7C%7C 'https://127.0.0.1:8080'%0A%0Aexport const options = %7B%0A vus: 10,%0A duration: '2m',%0A thresholds: %7B%0A http_req_duration: %5B'p(95)%3C600'%5D%0A %7... | |
1291eca27e4315adccbef2eae85b5d58af924614 | add minified version | simpleJsCopy.min.js | simpleJsCopy.min.js | JavaScript | 0 | @@ -0,0 +1,727 @@
+(function()%7Bvar copyBtn=document.querySelector(%22.js-copy-btn%22);copyBtn.addEventListener(%22click%22,function(event)%7Bvar copyItem=document.querySelector(%22.text-to-copy%22);var range=document.createRange();range.selectNode(copyItem);window.getSelection().addRange(range);try%7Bvar successful=d... | |
5086f3417e6ed977b7fadf9d3b3448d35cf30a81 | Add SocialAccountsBuilder module | app/helpers/builders/SocialAccountsBuilder.js | app/helpers/builders/SocialAccountsBuilder.js | JavaScript | 0 | @@ -0,0 +1,545 @@
+'use strict';%0A%0Avar ConfigBuilder = require('../builders/ConfigBuilder');%0Avar SocialAccounts = require('../modules/SocialAccounts');%0Avar SocialAccountsValidator = require('../validators/SocialAccountsValidator');%0A%0Aclass SocialAccountsBuilder %7B%0A%0A constructor(config, validator) %7B%... | |
5491b2b00f1e2fd161d646355ac03fb06d6aed47 | Add test to mobilizations store | app/scripts/tests/stores/MobilizationsTest.js | app/scripts/tests/stores/MobilizationsTest.js | JavaScript | 0 | @@ -0,0 +1,1059 @@
+import mobilizations from './../../stores/mobilizations'%0Aimport %7B EDIT_COLUMN_CONTENT %7D from './../../constants/ActionTypes';%0A%0Adescribe('mobilizations', function()%7B%0A describe('#editColumnContent', function()%7B%0A it('should change the column text', function()%7B%0A const mobi... | |
37903ca85659e352fb9afa15c4242aa773c9b062 | test the mixin + model function availability | test/Model/mixin.js | test/Model/mixin.js | JavaScript | 0 | @@ -0,0 +1,511 @@
+var assert = require(%22assert%22)%0A , Model = require(%22./../../lib/sequelize/model%22)%0A%0Amodule.exports = %7B%0A 'mixin should be correctly added to the model': function() %7B%0A assert.isDefined(Model.hasOne)%0A assert.isDefined(Model.hasMany)%0A assert.isDefined(Model.belongsTo)%... | |
5161b8e2b361e4629e72158a1510bee2db382344 | Add index.js file | js/index.js | js/index.js | JavaScript | 0.000002 | @@ -0,0 +1,1080 @@
+const cells = document.querySelectorAll(%22.cell%22);%0Avar newGame;%0A%0Afunction startGame() %7B%0A%09document.getElementById(%22text%22)%0A%09%09.innerText = %22%22;%0A%09addEventListener();%0A%09newGame = new Game(%22X%22); //eslint-disable-line%0A%7D%0A%0Afunction addEventListener() %7B%0A%09fo... | |
8308bbd18d9b3a02788d7855f4939570bdf1d3e6 | Create timer.js | js/timer.js | js/timer.js | JavaScript | 0.000002 | @@ -0,0 +1,178 @@
+// Sets up the timer%0Afunction Timer()%0Athis.timerstopped = false;%0A%0A%7D%0A%0A// Makes the timer stop at 3:15%0Aif var this.timer = 3m15s;%0Athis.timerstopped = true;%0Athis.over = true;%0A%0A%7B%0A%7D%0A
| |
becc0405fd64ad8bc57408bcb414032d79280f17 | Update and rename js to js/timer.js | js/timer.js | js/timer.js | JavaScript | 0.000003 | @@ -0,0 +1,747 @@
+var sec = 00; // set the seconds%0Avar min = 00; // set the minutes%0A%0Afunction countDown() %7B%0A sec++;%0A if (sec == 60) %7B%0A sec = 0;%0A min = min + 1;%0A %7D else %7B%0A min = min;%0A %7D%0Aif (sec%3C=9) %7B sec = %220%22 + sec; %7D%0A time =(min%3C=9 ? %220%22 + min : min) ... | |
e0df40a0f5bb79cf8e3a061c96790902b0fe782d | Add surfingkeys config | surfingkeys.js | surfingkeys.js | JavaScript | 0.000001 | @@ -0,0 +1,1672 @@
+// Vimium/cVim%0Amap('u', 'e');%0Amapkey('p', %22Open the clipboard's URL in the current tab%22, function() %7B%0A Front.getContentFromClipboard(function(response) %7B%0A window.location.href = response.data;%0A %7D);%0A%7D);%0Amap('P', 'cc');%0Amap('gi', 'i');%0Amap('F', 'C');%0Amap('g... | |
5a44f04b15c476cd1b63fad9c3afd53876ca6b43 | Create index.js | js/index.js | js/index.js | JavaScript | 0.000002 | @@ -0,0 +1,629 @@
+var dns = %7B%7D%0Adns.google = new Array(%228.8.8.8%22, %228.8.4.4%22, %22Google Public DNS Server%22);%0Adns.opendns = new Array(%22208.67.222.222%22, %22208.67.220.220%22, %22OpenDNS%22);%0Adns.nortondns = new Array(%22198.153.192.50%22, %22198.153.194.50%22, %22Norton DNS Server%22);%0Adns.advant... | |
67fe84f08d7ef03767d90e3f283799984cd26b5b | Introduce transport settings - fixed flush of selected value | src/Oro/Bundle/EmailBundle/Resources/public/js/email/template/view.js | src/Oro/Bundle/EmailBundle/Resources/public/js/email/template/view.js | /*global define*/
define(['jquery', 'underscore', 'backbone'
], function ($, _, Backbone) {
'use strict';
/**
* @export oroemail/js/email/template/view
* @class oroemail.email.template.View
* @extends Backbone.View
*/
return Backbone.View.extend({
events: {
'c... | JavaScript | 0 | @@ -690,16 +690,61 @@
ender);%0A
+ if (!$(this.target).val()) %7B%0A
@@ -768,24 +768,38 @@
nChanged();%0A
+ %7D%0A
%7D,%0A%0A
|
857a718ee69e100189f5db0164822edb05e7a11e | Add missing file | js/renderPseudocode.js | js/renderPseudocode.js | JavaScript | 0.000006 | @@ -0,0 +1,252 @@
+$(%22.render-pseudocode%22).each(function (i,o) %7B%0A var code = o.textContent;%0A var parentEl = o.parentNode;%0A var options = %7B lineNumber: true %7D;%0A%0A console.log(code);%0A console.log(parentEl);%0A pseudocode.render(code, parentEl, options);%0A%7D);%0A
| |
48bd6948500e688f0d1e5f4f6d6e2a333bbbf519 | Add deps for 'conditional-comments' elem on test level | test.blocks/page/page.deps.js | test.blocks/page/page.deps.js | JavaScript | 0.000002 | @@ -0,0 +1,56 @@
+(%7B%0A shouldDeps : %7B elem : 'conditional-comment' %7D%0A%7D)%0A
| |
785ce39cca2a862836c25b675ec9ba573a7a219c | add nextjs example | examples/nextjs/server.js | examples/nextjs/server.js | JavaScript | 0 | @@ -0,0 +1,1203 @@
+const express = require('express');%0Aconst next = require('next');%0A%0Aconst port = parseInt(process.env.PORT, 10) %7C%7C 3000;%0Aconst dev = process.env.NODE_ENV !== 'production';%0Aconst app = next(%7B dev %7D);%0Aconst handle = app.getRequestHandler();%0Aconst createRouteMiddleware = require('@... | |
87db305b1f75cab08d1617e519adf2b4e7a96f3d | Add prefixed Touch Events Extensions properties | externs/browser/iphone.js | externs/browser/iphone.js | /*
* Copyright 2009 The Closure Compiler 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 ... | JavaScript | 0.000001 | @@ -803,16 +803,188 @@
)%0A */%0A%0A%0A
+/**%0A * @type %7Bnumber%7D%0A */%0ATouch.prototype.webkitForce;%0A%0A/**%0A * @type %7Bnumber%7D%0A */%0ATouch.prototype.webkitRadiusX;%0A%0A/**%0A * @type %7Bnumber%7D%0A */%0ATouch.prototype.webkitRadiusY;%0A%0A
/**%0A * T
|
6d4e1157157ea7ded119e035fcc9295f07bffed1 | add listener to event click | js/script.js | js/script.js | JavaScript | 0 | @@ -0,0 +1,733 @@
+var cur = 0,%0A%09slide = document.getElementsByClassName('slide'),%0A%09controls = document.getElementsByClassName('controls'),%0A%09prevBtn = document.getElementsByClassName('controls-btn_prev'),%0A%09nextBtn = document.getElementsByClassName('controls-btn_next'),%0A%09len = slide.length;%0A%0A%09c... | |
7029462bc259ed3987ebaf3e79f58decd0cacf28 | add attributes tools | attr.js | attr.js | JavaScript | 0.000001 | @@ -0,0 +1,321 @@
+function getAttr(ele, attr) %7B%0A var result = (ele.getAttribute && ele.getAttribute(attr)) %7C%7C null;%0A if (!result) %7B%0A var attrs = ele.attributes,%0A len = attrs.length;%0A%0A for (var i=0; i%3Clen; i++) %7B%0A if (attrs%5Bi%5D.nodeName === attr) %7B%0A result = att... | |
341269db9076621480f43d43de87116959175ca1 | Fix deselected row in grid after insert in bound form | src/overrides/DataModel.js | src/overrides/DataModel.js | JavaScript | 0 | @@ -0,0 +1,463 @@
+Ext4.define('Densa.overrides.DataModel', %7B%0A override: 'Ext.data.Model',%0A%0A //when creating record with uuid idGenerator we can set the internalId to the id%0A //which it will get after saving%0A //fixes de-selected row in grid after insert in bound form%0A constructor: function(... | |
e395049c9f8a5f067f27579afb5567549a267106 | remove max size for good logger | server.js | server.js | var Hapi = require('hapi');
var config = require('./config');
var manifest = {
pack: {
app: {
config: config
}
},
servers: [{
host: '127.0.0.1',
port: config.ports.bot,
options: {
labels: 'bot'
}
}, {
host: '127.0.0.1',
port: config.ports.api,
options: {
l... | JavaScript | 0.000002 | @@ -683,51 +683,8 @@
: %7B%0A
- maxLogSize: 1 * 1024 * 1024, // 1 MB%0A
|
d963c6a26fdc2bc8214120ae9430f8adf8befbb9 | Clean up publishToWeb method | core/src/main/web/plugin/cellmenu/sharing.js | core/src/main/web/plugin/cellmenu/sharing.js | /*
* Copyright 2014 TWO SIGMA OPEN SOURCE, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... | JavaScript | 0 | @@ -820,21 +820,8 @@
%0A
- var future =
bkH
@@ -871,45 +871,17 @@
ub%22,
-%0A
+ %7B%0A
-%7B
type
@@ -893,16 +893,22 @@
tebook%22,
+%0A
json: a
@@ -942,23 +942,24 @@
eData())
-%7D)
%0A
+%7D)%0A
.suc
@@ -987,20 +987,16 @@
%7B%0A
-
-
window.o
@@ -... |
b6c52f7e260ac1dc04b621c622ac7b8ae0687173 | Create splash.js | js/splash.js | js/splash.js | JavaScript | 0.000001 | @@ -0,0 +1,198 @@
+splasha.innerHTML = %22Prossimo incontro: 31 maggio - prof. Frolli%22%0Asplashb.innerHTML = %22Prossimo incontro: 31 maggio - prof. Frolli%22%0Asplashc.innerHTML = %22Prossimo incontro: 31 maggio - prof. Frolli%22%0A
| |
05a1fc2a6eb46abf9970521ddc062cfe094d0024 | Add empty tests | tests/IfInterface-test.js | tests/IfInterface-test.js | JavaScript | 0.000059 | @@ -0,0 +1,80 @@
+import IfInterface from '../IfInterface'; // eslint-disable-line no-unused-vars%0A
| |
8beaafa32580dc99675e105ac5f0ac8114dbb2a6 | Create modal.js | js/modal.js | js/modal.js | JavaScript | 0.000001 | @@ -0,0 +1,673 @@
+// Get the modal%0Avar modal = document.getElementById('myModal');%0A%0A// Get the button that opens the modal%0Avar btn = document.getElementById(%22myBtn%22);%0A%0A// Get the %3Cspan%3E element that closes the modal%0Avar span = document.getElementsByClassName(%22close%22)%5B0%5D;%0A%0A// When the ... | |
3439c6576202c4d3a4fbada3b8b71baadc63846c | Fix sample for youtube search (#1128) | samples/youtube/search.js | samples/youtube/search.js | // Copyright 2016, Google, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... | JavaScript | 0 | @@ -912,16 +912,22 @@
st res =
+ await
youtube
|
367165bd00917b93834790ad52b934bf606becfa | Implement Pyromancers (#558) | server/game/cards/characters/04/pyromancers.js | server/game/cards/characters/04/pyromancers.js | JavaScript | 0 | @@ -0,0 +1,1154 @@
+const DrawCard = require('../../../drawcard.js');%0A%0Aclass Pyromancers extends DrawCard %7B%0A setupCardAbilities(ability) %7B%0A this.action(%7B%0A title: 'Kneel Pyromancers to discard location',%0A phase: 'dominance',%0A cost: %5B%0A abil... | |
2c908a0d4f3ccc353eb86c474d437fc2bcd79270 | Add validation script | validate.js | validate.js | JavaScript | 0.000001 | @@ -0,0 +1,2078 @@
+var fs = require(%22fs%22);%0A%0Avar prompt = require(%22sync-prompt%22).prompt;%0Avar shelljs = require(%22shelljs%22);%0A%0Afunction levenshteinDistance (s, t) %7B%0A if (s.length === 0) return t.length;%0A if (t.length === 0) return s.length;%0A%0A return Math.min(%0A ... | |
2439ef79b4e667efd4c548dffef0a8fcca17248c | Validate that gatsby-source-filesystem paths exist fixes #2806 (#2813) | packages/gatsby-source-filesystem/src/gatsby-node.js | packages/gatsby-source-filesystem/src/gatsby-node.js | const chokidar = require(`chokidar`)
const { createId, createFileNode } = require(`./create-file-node`)
exports.sourceNodes = (
{ boundActionCreators, getNode, hasNodeChanged, reporter },
pluginOptions
) => {
const { createNode, deleteNode } = boundActionCreators
let ready = false
const watcher = chokidar... | JavaScript | 0 | @@ -29,16 +29,41 @@
okidar%60)
+%0Aconst fs = require(%60fs%60)
%0A%0Aconst
@@ -312,16 +312,297 @@
false%0A%0A
+ // Validate that the path exists.%0A if (!fs.existsSync(pluginOptions.path)) %7B%0A console.log(%60%0AThe path passed to gatsby-source-filesystem does not exist on your file system:%0A%0A$%7Bplugin... |
d588bf603f3a55476c7f4aff6386eaeb646da803 | Create gleaderboard.js | commands/Economy/gleaderboard.js | commands/Economy/gleaderboard.js | JavaScript | 0.000002 | @@ -0,0 +1,1706 @@
+exports.run = async (client, message, %5Btype%5D) =%3E %7B%0A const sqlite3 = require(%22sqlite3%22).verbose();%0A let db = new sqlite3.Database(%22./bwd/data/score.sqlite%22);%0A%0A const types = %7B%0A credits: %22Credits%22,%0A rep: %22Rep%22%0A %7D%0A%0A const Leader... | |
e29e2bb50e5df929abfe595572de27d84ddebca3 | Add test cases for GOFManager class | test/testGOFManager.js | test/testGOFManager.js | JavaScript | 0 | @@ -0,0 +1,1275 @@
+/**%0A * @author adoankim %3Cadoankim@alumnos.uvigo.es%3E%0A * @copyright 2014 adoankim%0A * @license %7B@link https://github.com/adoankim/PhaserGoF/blob/master/LICENSE%7CMIT License%7D%0A * %0A * testCell.js%0A */%0A%0Avar chai = require('chai');%0Avar assert = chai.assert,%0A expe... | |
731d6e1678155ae9e018793506801e3ac6418879 | Disable delete self onClick in Chronograf UsersTable | ui/src/shared/components/DeleteConfirmButtons.js | ui/src/shared/components/DeleteConfirmButtons.js | import React, {PropTypes, Component} from 'react'
import classnames from 'classnames'
import OnClickOutside from 'shared/components/OnClickOutside'
import ConfirmButtons from 'shared/components/ConfirmButtons'
const DeleteButton = ({onClickDelete, buttonSize, text, disabled}) =>
<button
className={classnames('b... | JavaScript | 0 | @@ -1289,16 +1289,38 @@
Delete=%7B
+disabled ? () =%3E %7B%7D :
this.han
|
ec209ecf95236c9c347a41b19cb507fa16e1f055 | Update backbone-model-file-upload.js | backbone-model-file-upload.js | backbone-model-file-upload.js | // Backbone.Model File Upload v0.1
// by Joe Vu - joe.vu@homeslicesolutions.com
// For all details and documentation:
// https://github.com/homeslicesolutions/backbone-model-file-upload
!function(_, Backbone){
// Clone the original Backbone.Model.prototype
var backboneModelClone = _.clone( Backbon... | JavaScript | 0.000169 | @@ -1362,22 +1362,17 @@
ck for %22
-allowF
+f
ormData%22
@@ -1381,16 +1381,26 @@
lag and
+check for
if file
@@ -1408,50 +1408,61 @@
xist
- and if so, convert to FormData%0A if (
+.%0A if ( options.formData === true %0A %7C%7C
opt
@@ -1470,14 +1470,9 @@
ons.
-allowF
+f
ormD
@@ -1484,17 +1... |
5f60c60e4e843fcfed296cb325e6246ee3e59527 | fix callback for piwik | packages/rocketchat-piwik/client/trackEvents.js | packages/rocketchat-piwik/client/trackEvents.js | //Trigger the trackPageView manually as the page views don't seem to be tracked
FlowRouter.triggers.enter([(route) => {
if (window._paq) {
const http = location.protocol;
const slashes = http.concat('//');
const host = slashes.concat(window.location.hostname);
window._paq.push(['setCustomUrl', host + route.pa... | JavaScript | 0 | @@ -2199,37 +2199,44 @@
UM, 'piwik-room-
-topic
+announcement
-changed');%0A%0ARoc
|
deff93f95e4dd5eacf05192cc3ccf7baf1ec3bf1 | Simplify debug node message processing. | nodes/core/core/58-debug.js | nodes/core/core/58-debug.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 | @@ -1357,118 +1357,8 @@
%7D%0A
- if (msg.payload instanceof Buffer) %7B msg.payload = %22(Buffer) %22+msg.payload.toString('hex'); %7D%0A
@@ -1380,32 +1380,32 @@
(this.active) %7B%0A
+
@@ -2074,206 +2074,8 @@
%7D%0A
- if (typeof msg.payload == %22undefined%22... |
f81dacc5575fee708ca49949a5333a1567370631 | Create cmds.js | money/casino/cmds.js | money/casino/cmds.js | JavaScript | 0.000001 | @@ -0,0 +1,15 @@
+//to add later%0A
| |
68037d58a71ece4cab9d388f928be74f28eded7f | Add solution to question 215 | Medium/215_Kth_Largest_Element_in_an_Array.js | Medium/215_Kth_Largest_Element_in_an_Array.js | JavaScript | 0.997895 | @@ -0,0 +1,219 @@
+/**%0A * @param %7Bnumber%5B%5D%7D nums%0A * @param %7Bnumber%7D k%0A * @return %7Bnumber%7D%0A */%0Avar findKthLargest = function(nums, k) %7B%0A var sorted = nums.sort(function(a, b) %7B return a - b; %7D);%0A return sorted%5Bsorted.length - k%5D;%0A%7D;%0A
| |
c68e8ad3fcdddf0b345b018afdb9624836369525 | Create ValueDesc_ConvBlockType.js | CNN/Unpacker/ValueDesc/ValueDesc_ConvBlockType.js | CNN/Unpacker/ValueDesc/ValueDesc_ConvBlockType.js | JavaScript | 0.000001 | @@ -0,0 +1,1814 @@
+export %7B ConvBlockType %7D;%0A%0Aimport %7B Int %7D from %22./ValueDesc_Base.js%22;%0A%0A/** Describe id, range, name of ConvBlockType.%0A *%0A * Convert number value into integer between %5B -6, ( 10 * 1024 ) %5D representing operation:%0A * - 0: MOBILE_NET_V1_HEAD_BODY_TAIL (Gene... | |
5a971558183057b3cd4d742504172a3e78b5a5e7 | Add simple selenium.js to repo. | selenium.js | selenium.js | JavaScript | 0 | @@ -0,0 +1,922 @@
+module.exports = function(options) %7B%0A var webdriver = options.webdriver;%0A var chrome = options.chrome;%0A var By = webdriver.By;%0A var until = webdriver.until;%0A%0A var chromeOptions = new chrome.Options();%0A chromeOptions.addArguments(%5B'--incognito'%5D);%0A%0A var driver = new webd... | |
572b517dc47204ef4f63356bd121e729ff53779e | Add solution for stream-adventure: "Lines" | stream-adventure/lines.js | stream-adventure/lines.js | JavaScript | 0.000153 | @@ -0,0 +1,431 @@
+var os = require('os');%0Avar tmap = require('through2-map');%0Avar split = require('split');%0A%0A// Convert even-numbered lines to uppercase, odd-numbered lines to lowercase.%0A// Line number starts from 1.%0Avar lineNum = 1;%0Aprocess.stdin%0A .pipe(split())%0A .pipe(tmap(%7B wantStrings: true %... | |
48cad24bc75bb10e0fad31b4124614550aadb0cd | add migration (#832) | src/migrations/20210504101429-deprecate-strategies.js | src/migrations/20210504101429-deprecate-strategies.js | JavaScript | 0 | @@ -0,0 +1,542 @@
+exports.up = function(db, cb) %7B%0A db.runSql(%0A %60%0A UPDATE strategies%0A SET deprecated = true, built_in = 0%0A WHERE name = 'gradualRolloutSessionId' OR name = 'gradualRolloutUserId'%0A OR name = 'gradualRolloutRandom'%0A %60,%0A cb,%0A );%0A%7D;%0A%0... | |
f4336e932b6f8952451a902d76090d25519c4707 | add recipe component | client/components/recipe.js | client/components/recipe.js | JavaScript | 0.000008 | @@ -0,0 +1,571 @@
+import React, %7B PropTypes, Component %7D from 'react';%0Aimport %7B connect %7D from 'react-redux';%0Aimport actions from '../actions/index.js';%0A%0A%0Aclass Recipe extends Component %7B%0A render() %7B%0A return (%0A %3Cdiv contentEditable=%22false%22%3E%0A %3Ch5%3E*Recipe Compone... | |
ceb3cdf76a9995b36eea478601e94bae175d971a | Implement html5 notifications | client/app/notification.js | client/app/notification.js | JavaScript | 0.005741 | @@ -0,0 +1,738 @@
+import Vue from 'vue';%0Aimport store from './store';%0A%0Alet notification = new Vue(%7B%0A store,%0A%0A vuex: %7B%0A getters: %7B%0A currentTrack: (%7Bplayer%7D) =%3E player.currentTrack,%0A apiUrl: (%7Bplayer%7D) =%3E player.apiUrl%0A %7D%0A %7D,%0A%0A methods: %7B%0A songPl... | |
07ec40c63c2931936e8b2e7e42af37f05ea21e58 | Add Dan's background-size polyfill | js/polyfills/jquery.background-size.js | js/polyfills/jquery.background-size.js | JavaScript | 0 | @@ -0,0 +1,1232 @@
+/**%0A * jQuery plugin to add support for CSS3 background-size property in older browsers%0A */%0A%0A/*global jQuery */%0A(function ($) %7B%0A 'use strict';%0A%0A var nativelySupported = typeof $('%3Cdiv%3E').css('background-size') !== 'undefined';%0A%0A $.fn.backgroundSize = nativelySuppor... | |
88b14abcdd56309ea1c3f5daa82a09c5dd937ea0 | Replace skip with skipAll in tests | test/app.js | test/app.js | var path = require('path'),
assert = require('yeoman-generator').assert,
helpers = require('yeoman-generator').test,
os = require('os');
describe('sails-rest-api:app', function () {
before(function (done) {
helpers.run(path.join(__dirname, '../app'))
.inDir(path.join(os.tmpdir(), '.... | JavaScript | 0.000056 | @@ -357,131 +357,21 @@
ns(%7B
-%0A skipHello: true,%0A skipInstall: true,%0A skipGeneratorUpdate: true%0A
+skipAll: true
%7D)%0A
|
17470f9b05b5a89e90791797d14a1aad901c9a11 | test case for js_search | support/anvil/configSet/Resources/suites/js_search.js | support/anvil/configSet/Resources/suites/js_search.js | JavaScript | 0.000003 | @@ -0,0 +1,1098 @@
+/*%0A * Appcelerator Titanium Mobile%0A * Copyright (c) 2011-2012 by Appcelerator, Inc. All Rights Reserved.%0A * Licensed under the terms of the Apache Public License%0A * Please see the LICENSE included with this distribution for details.%0A */%0A %0Amodule.exports = new function() %7B%0A%09var fi... | |
9fe21a03c4007420a55cffd7613f69a953b2d03b | Add test for parseSpokenWikipedia | test/lib/parseProperty/parse-spoken-wikipedia-test.js | test/lib/parseProperty/parse-spoken-wikipedia-test.js | JavaScript | 0.000001 | @@ -0,0 +1,676 @@
+'use strict';%0A%0Aconst fs = require('fs');%0Aconst domino = require('domino');%0Aconst assert = require('../../utils/assert.js');%0Aconst parseProp = require('../../../lib/parseProperty');%0Aconst html = fs.readFileSync(%60$%7B__dirname%7D/../bill-clinton.html%60, 'utf-8');%0A%0Adescribe('lib:parse... | |
13aa7c6c7f6dc5a26b6718c396f395829b14264f | check in migration | migrations/20160308174635_rename-comment-text.js | migrations/20160308174635_rename-comment-text.js | JavaScript | 0 | @@ -0,0 +1,272 @@
+'use strict';%0A%0Aexports.up = function(knex, Promise) %7B%0A return knex.schema.table('comment', t =%3E t.renameColumn('comment_text', 'text')) %0A%7D;%0A%0Aexports.down = function(knex, Promise) %7B%0A return knex.schema.table('comment', t =%3E t.renameColumn('text', 'comment_text')) %0A%7D;%0... | |
ecaa6445fe32bcf606121631e79b02a634eb4bcd | Add first test theme to widget app | application/widgets/source/class/widgets/Theme.js | application/widgets/source/class/widgets/Theme.js | JavaScript | 0 | @@ -0,0 +1,460 @@
+qx.Class.define(%22widgets.Theme%22, %7B%0A extend: unify.ui.widget.styling.Theme,%0A %0A construct : function() %7B%0A var styles = %7B%0A test : %7B%0A backgroundColor: %22yellow%22,%0A borderColor: %22green green green green%22,%0A children : %7B%0A test1 ... | |
3e888128240a5e5b37293149eba044a4739dcf56 | Fix boolean type in model options | src/model/options/index.js | src/model/options/index.js | /**
* Exports object that contains names of options as a key and their configuration objects as a value
*
* @example
* export default {
* optionName: {
* desc: 'Description for the option',
* alias: 'Short name for the option',
* type: Boolean || String || Number,
* defaults: 'Default value',... | JavaScript | 0.000187 | @@ -448,17 +448,15 @@
pe:
-'
Boolean
-'
,%0A
|
733de75270864987805cec324560784bc0355dcc | Make the schema available to store user records in the database. | server/migrations/20170802145339-create-user.js | server/migrations/20170802145339-create-user.js | JavaScript | 0 | @@ -0,0 +1,1002 @@
+module.exports = %7B%0A up: (queryInterface, Sequelize) =%3E %7B%0A queryInterface.createTable('Users', %7B%0A id: %7B%0A allowNull: false,%0A autoIncrement: true,%0A primaryKey: true,%0A type: Sequelize.INTEGER,%0A %7D,%0A username: %7B%0A type:... | |
c0b18c62736a56987c288ec1273dd9c5ef4809d4 | Create jquery.ui.touch-punch.min.js | jQueryUI/jquery.ui.touch-punch.min.js | jQueryUI/jquery.ui.touch-punch.min.js | JavaScript | 0.000012 | @@ -0,0 +1,1290 @@
+/*!%0A * jQuery UI Touch Punch 0.2.3%0A *%0A * Copyright 2011%E2%80%932014, Dave Furfero%0A * Dual licensed under the MIT or GPL Version 2 licenses.%0A *%0A * Depends:%0A * jquery.ui.widget.js%0A * jquery.ui.mouse.js%0A */%0A!function(a)%7Bfunction f(a,b)%7Bif(!(a.originalEvent.touches.length%3E1)... | |
c0bf6939a015adcd11a5985e8ef10be66d641769 | Bump meteor tool to 1.1 prerelease | packages/meteor-tool/package.js | packages/meteor-tool/package.js | Package.describe({
summary: "The Meteor command-line tool",
version: '1.0.38-winr.30'
});
Package.includeTool();
| JavaScript | 0 | @@ -73,19 +73,17 @@
'1.
-0.38
+1.0
-winr.
-3
0'%0A%7D
|
20fe7ea7abc28b87527e15c0bab117d68145c497 | fix exit code in main test runner | test/test.js | test/test.js | var spawn = require('child_process').spawn,
join = require('path').join;
var files = require('fs').readdirSync(__dirname).filter(function(f) {
return (f.substr(0, 5) === 'test-');
}).map(function(f) {
return join(__dirname, f);
}),
f = -1;
function next() {
if (++f < files.length) {
... | JavaScript | 0.000058 | @@ -465,16 +465,59 @@
(next);%0A
+ else%0A process.exit(code);%0A
%7D)
|
952c8d15408ab24b6c3a056834abef5a763cf9e8 | Add story for QuoteBanner component | stories/components/quoteBanner/index.js | stories/components/quoteBanner/index.js | JavaScript | 0 | @@ -0,0 +1,330 @@
+import React from 'react';%0Aimport %7B storiesOf %7D from '@storybook/react';%0A%0Aimport QuoteBanner from 'shared/components/quoteBanner/quoteBanner';%0A%0AstoriesOf('shared/components/quoteBanner', module)%0A .add('Default', () =%3E (%0A %3CQuoteBanner%0A author=%22James bond%22%0A q... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.