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 |
|---|---|---|---|---|---|---|---|
900365a69f818f634d99538f2ffcc783f5d9e0a1 | add file piedras.js | piedras.js | piedras.js | JavaScript | 0.000001 | @@ -0,0 +1,40 @@
+console.log('Hello World!! Q pasa!???');
| |
b9dd0e6cf42899ce1e93bb47067607c7f2679e68 | add min | p5.geolocation.min.js | p5.geolocation.min.js | JavaScript | 0 | @@ -0,0 +1,2486 @@
+console.log(%22%25c p5.geolocation Loaded %22,%22color:pink; background:black; %22),p5.prototype.geoCheck=function()%7Breturn navigator.geolocation?!0:!1%7D,p5.prototype.getCurrentPosition=function(a,b)%7Bfunction d(a)%7Bconsole.log(a.message),c.error=a.message,%22function%22==typeof b&&b(a.message)... | |
6f72f2b75239d80946345472d928acd89e5c8dff | Add polling testing utility | polling.js | polling.js | JavaScript | 0 | @@ -0,0 +1,644 @@
+var watch = require('fs').watchFile;%0Avar spawn = require('child_process').spawn;%0A%0Avar opts = %7B interval: 50 %7D;%0A%0Awatch('./test.js', opts, run);%0Awatch('./index.js', opts, run);%0A%0Aconsole.log('Watching test.js, index.js...');%0A%0Avar child = null;%0A%0Afunction run(curr, prev) %7B%0A... | |
951ef07b09d1c33b473b1fed0accb46de4266926 | Add joke hook for https://xkcd.com/37/ | plugins/ass.js | plugins/ass.js | JavaScript | 0 | @@ -0,0 +1,485 @@
+var sprintf = require('sprintf').sprintf%0A%0A%0A/*%0A * Ass plugin%0A * - ass hook: https://xkcd.com/37%0A */%0Avar Ass = function() %7B%0A this.hooks = %5B'ass'%5D;%0A%7D;%0A%0A%0Avar ASS_REGEX = /(%5Cw+)-ass (%5Cw+)/i;%0A%0A/*%0A * Ass hook%0A */%0AAss.prototype.ass = function(bot, to, from, ms... | |
86c930663ccc3d3c759fd90616bb189d2b9ef8b0 | Change Set to use HashTable as underlying structure | data_structures/set.js | data_structures/set.js | /**
* Copyright (C) 2014 Andre Oliveira
*
* 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
* rights to use, copy, modify, merge, pub... | JavaScript | 0 | @@ -1128,16 +1128,58 @@
rict';%0A%0A
+var HashTable = require(%22./hash_table%22);%0A%0A
/**%0A * T
@@ -1352,44 +1352,41 @@
s =
-%5B%5D;%0A%0A var toAdd = arguments %7C%7C %5B%5D;
+new HashTable(arguments.length);%0A
%0A
@@ -1404,21 +1404,25 @@
0; i %3C
-toAdd
+arguments
.length;
@@ -1448,13 +1448,17 @@
... |
d13749e85b58d8c6cf20debe8161fd1551a99068 | add flyweight pattern | patterns/flyweight.js | patterns/flyweight.js | JavaScript | 0.999587 | @@ -0,0 +1,2226 @@
+'use strict';%0A%0Aconst XES = require('../xes');%0A%0A%0A/* ------------------------------- Classes ----------------------------------- */%0A%0A/**%0A * @name Tag%0A * @type %7BXES.Class%7D%0A * @memberOf XES%0A */%0AXES.decl('Tag', %7B%0A instance: (self) =%3E (%7B%0A constructor: (name)... | |
da45c60a9653711f068cb3b79862d16bc94f3176 | Create Subsets.js | Backtracking/Subsets.js | Backtracking/Subsets.js | JavaScript | 0 | @@ -0,0 +1,518 @@
+/**%0A * @param %7Bnumber%5B%5D%7D nums%0A * @return %7Bnumber%5B%5D%5B%5D%7D%0A */%0Avar subsets = function(nums) %7B%0A %0A var result = %5B%5D;%0A var len = nums.length;%0A %0A nums.sort(function(a, b)%7B%0A return a - b;%0A %7D);%0A %0A helper(nums, 0, len-1, %5B%5D... | |
f6037825d1370ffa445b7f834558d199fa324921 | Test file | src/js/background.js | src/js/background.js | JavaScript | 0.000001 | @@ -0,0 +1,43 @@
+(function()%7B%0A%0A%09var bgSettings = null;%0A%7D)();
| |
071eb4bc233d3890141e70cd10d899d4f36cf719 | add directive to make sticky bars | src/Umbraco.Web.UI.Client/src/common/directives/components/umbstickybar.directive.js | src/Umbraco.Web.UI.Client/src/common/directives/components/umbstickybar.directive.js | JavaScript | 0.000001 | @@ -0,0 +1,2810 @@
+(function() %7B%0A 'use strict';%0A%0A function StickyBarDirective($rootScope) %7B%0A%0A function link(scope, el, attr, ctrl) %7B%0A%0A var bar = $(el);%0A var scrollableContainer = null;%0A var scrollBody = $(attr.scrollBody);%0A var clonedBar = null;%0A ... | |
1fddf535cb725843a58dec7ff51df6deef1391ee | add container for Demos component | src/containers/Demos.js | src/containers/Demos.js | JavaScript | 0.000001 | @@ -0,0 +1,417 @@
+import %7B connect %7D from 'react-redux';%0Aimport getDemos from 'Actions/getDemos';%0Aimport Demos from 'Components/Demos.jsx';%0A%0Aconst mapStateToProps = state =%3E (%7B%0A ...state.demos,%0A%7D);%0A%0Aconst mapDispatchToProps = dispatch =%3E (%7B%0A getDemos: () =%3E %7B%0A dispatch(getDem... | |
928ff10529aa1ca2d24da17f8c8ba22cf2c686ea | Fix token.js to work with new config | src/commands/token.js | src/commands/token.js | // npm modules
import moment from 'moment';
// our modules
import {Config} from '../utils';
const config = new Config();
export const tokenCmd = (newToken) => {
config.token = newToken;
config.tokenAge = moment().add(28, 'd');
config.save();
console.log('Token saved.');
process.exit(0);
};
| JavaScript | 0.000001 | @@ -60,17 +60,17 @@
import %7B
-C
+c
onfig%7D f
@@ -90,38 +90,8 @@
';%0A%0A
-const config = new Config();%0A%0A
expo
|
9b36c24bbf2a20d6430a9e67278b5a5255e0e96f | add buildfile | build.js | build.js | JavaScript | 0.000002 | @@ -0,0 +1,174 @@
+const gulp = require('gulp');%0Aconst rev = require('gulp-rev');%0A %0Agulp.task('default', () =%3E%0A gulp.src('src/*.css')%0A .pipe(rev())%0A .pipe(gulp.dest('dist'))%0A);
| |
2758cc89d110d94b36ab71c5875473faed984ffb | Create samples.js | samples.js | samples.js | JavaScript | 0.000001 | @@ -0,0 +1,245 @@
+// YouTube Player API%E3%82%92%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%82%80%0Avar tag = document.createElement('script');%0Atag.src = %22https://www.youtube.com/iframe_api%22;%0Avar firstScriptTag = document.getElementsByTagName('script')%5B0%5D;%0AfirstScriptTag.parentNode.insertBefore(tag, firstScriptTag);%... | |
926328a1e7031c6926254a46a86150c2131c28e3 | Handle empty response from google | public/js/view_handlers/search_form.js | public/js/view_handlers/search_form.js | (function($, WIMR){
WIMR.dialog.registerTemplateCallback('search_form', function($el) {
var $form = $el.find('form');
$form.submit(function(e){
e.preventDefault();
WIMR.dialog.loading();
$("#addressField").removeClass('has-error');
$("#status").wimrStatus("");
... | JavaScript | 0.000037 | @@ -2338,17 +2338,25 @@
esses =
-r
+filteredR
esponse
@@ -2409,17 +2409,25 @@
ssage =
-r
+filteredR
esponse.
|
dd13c6b8cdcfd2294a45b9c8300884aa76f91626 | test async invoke | examples/g_asyncInvoke.js | examples/g_asyncInvoke.js | JavaScript | 0.000001 | @@ -0,0 +1,368 @@
+var nodehun = require('./../build/Release/nodehun');%0Avar fs = require('fs');%0A%0Avar affbuf = fs.readFileSync(__dirname+'/dictionaries/en_US/en_US.aff');%0Avar dictbuf = fs.readFileSync(__dirname+'/dictionaries/en_US/en_US.dic');%0A%0Anodehun.createNewNodehun(affbuf,dictbuf,function(dict)%7B%0A ... | |
dd3cf535dca2c6e7468bccf4f31339f405aa6ac9 | Add folder script | scripts/prepare-folders.js | scripts/prepare-folders.js | JavaScript | 0.000002 | @@ -0,0 +1,600 @@
+#! /usr/bin/env node%0A%0A/**%0A * Clean up any residual files and create the build folders%0A */%0Aconst config = require('server/config')%0Aconst sh = require('shelljs')%0A%0Aconst bshedConfig = config.get('bshed')%0Ash.set('-e')%0A%0A// Delete the build folder if it exists%0A// This lets us start ... | |
67ad599f951b2de7396514d0f52b1d62e3390200 | add a simple javascript example. | test/arv-camera-test.js | test/arv-camera-test.js | JavaScript | 0 | @@ -0,0 +1,1355 @@
+#!/usr/bin/env gjs%0A%0A/* Aravis - Digital camera library%0A *%0A * Copyright %C2%A9 2009-2010 Emmanuel Pacaud%0A *%0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Found... | |
9d5358d6a1242f30b25ecc2b3523b9127132d9db | Create example.js | example/example.js | example/example.js | JavaScript | 0.000001 | @@ -0,0 +1,1586 @@
+var testing = Shmup(%22demo%22);%0Atesting.configs(%7B%0A position: function() %7B%0A return %5B100, 100%5D;%0A %7D,%0A target: function() %7B%0A return %5B100, 200%5D;%0A %7D,%0A angleType: %22degree%22,%0A shot: %7B%0A orb: %7B%0A type: %22bullet%22,%0A draw: function(temp... | |
584476368757dc17f0476200aa303e907eedf07b | Add inherit.js example | example/inherit.js | example/inherit.js | JavaScript | 0.000001 | @@ -0,0 +1,968 @@
+var ImmutableObject = require(%22../%22);%0A%0A// Define a type that inherits from ImmutableObject%0Avar Task = ImmutableObject.define(%7B%0A // ImmutableObject will call the %60init%60 method when constructing an instance.%0A init: function(text) %7B%0A return this.set(%7B text: text, isDone: f... | |
4a3932d62fdca5f2eb59364e7d59b0227cbbddb3 | add rgb led example | example/rgb-led.js | example/rgb-led.js | JavaScript | 0.000001 | @@ -0,0 +1,1555 @@
+//%0A// Cylon.robot(%7B%0A// connections: %7B%0A// edison: %7B adaptor: 'intel-iot' %7D%0A// %7D,%0A//%0A// devices: %7B%0A// leds: %7B driver: 'rgb-led', redPin: 3, greenPin: 5, bluePin: 6 %7D,%0A// %7D,%0A//%0A// work: function(my) %7B%0A// var color;%0A// every((1).secon... | |
28ef662b459dfb3038319dfc4dce489d909f38c8 | Remove unused showOnMap field | migrations/1563186995509-remove-show-on-map.js | migrations/1563186995509-remove-show-on-map.js | JavaScript | 0 | @@ -0,0 +1,308 @@
+const handler = require('../db/migration-handler')%0A%0Amodule.exports.up = handler(function(db) %7B%0A const modifications = db.collection('modifications')%0A return modifications.updateMany(%0A %7BshowOnMap: %7B$exists: true%7D%7D,%0A %7B$unset: %7BshowOnMap: ''%7D%7D%0A )%0A%7D)%0A%0Amodu... | |
a415fbe6b0a7202c7f03d91d8d14e8a25f4fb22d | add project config file | example/config.js | example/config.js | JavaScript | 0.000001 | @@ -0,0 +1,949 @@
+var webpack = require('webpack');%0Avar ExtractTextPlugin = require('extract-text-webpack-plugin');%0Amodule.exports = %7B%0A name: 'Example',%0A tasks: %7B%0A webpack:%7B%0A entry: %7B%0A app: './js/app',%0A %7D,%0A output:%7B%0A ... | |
11191d565ede94ade9475ba0155052a55f31b268 | Fix leaderboard add code | www/app/features/leaderBoard/leaderBoard.js | www/app/features/leaderBoard/leaderBoard.js | 'use strict';
/**
* @ngdoc function
* @name gapFront.controller:LeaderBoardCtrl
* @description A simple controller to update leader board.
* # LeaderBoardCtrl
* Controller of the gapFront
*/
angular.module('gapFront')
.controller('LeaderBoardCtrl', function ($scope, APIService, IntegrationService) {
Integ... | JavaScript | 0.000017 | @@ -715,18 +715,16 @@
;%0A%0A%0A
-//
$scope.a
@@ -756,18 +756,16 @@
r)%7B%0A
-//
var po
@@ -864,90 +864,8 @@
%7D%7D;%0A
- //%7D;%0A%0A%0A%0A $scope.addLeader = function(name)%7B%0A var post = %7Bname: name%7D;%0A
|
efe0a68e7732ce034d52488c2ae064bf7fe54345 | normalize location rotation axis, add orientation helper | site/source/javascripts/omega/location.js | site/source/javascripts/omega/location.js | /* Omega Location JS Representation
*
* Copyright (C) 2013 Mohammed Morsi <mo@morsi.org>
* Licensed under the AGPLv3+ http://www.gnu.org/licenses/agpl.txt
*/
Omega.Location = function(parameters){
$.extend(this, parameters);
// XXX currently no js obj for movement strategy
if(this.movement_strategy && this... | JavaScript | 0.000001 | @@ -964,16 +964,123 @@
;%0A %7D,%0A%0A
+ orientation : function()%7B%0A return %5Bthis.orientation_x, this.orientation_y, this.orientation_z%5D;%0A %7D,%0A%0A
clone
@@ -2682,32 +2682,91 @@
orientation_z);%0A
+ var axis = Omega.Math.nrml(axis%5B0%5D, axis%5B1%5D, axis%5B2%5D);%0A
var angle =
|
714a93d49ef9a3a38ca562e1ad9b866c304b9ab0 | Add TAP formatter | core/formatters/tap.js | core/formatters/tap.js | JavaScript | 0 | @@ -0,0 +1,1220 @@
+/**%0A * Results formatter for --format=tap%0A *%0A * @see http://podwiki.hexten.net/TAP/TAP.html?page=TAP%0A * @see https://github.com/isaacs/node-tap%0A */%0Amodule.exports = function(results) %7B%0A%09// public API%0A%09return %7B%0A%09%09render: function() %7B%0A%09%09%09var res = %5B%5D,%0A%09%... | |
4daa3aec6882da0b6d6db423d3f1dc5c2da0f98e | add DragDropOrder controller that allows reordering rows | Kwf_js/Ext4/Controller/Grid/DragDropOrder.js | Kwf_js/Ext4/Controller/Grid/DragDropOrder.js | JavaScript | 0 | @@ -0,0 +1,1566 @@
+// @require Kwf.Ext4.Controller.Grid%0AExt4.define('Kwf.Ext4.Controller.Grid.DragDropOrder', %7B%0A mixins: %7B%0A observable: 'Ext.util.Observable'%0A %7D,%0A autoSync: true,%0A constructor: function(config) %7B%0A this.mixins.observable.constructor.call(this, config);%0A ... | |
2a7feafb7f4256ef4adc18c2f3c36e571691f343 | Build dist dll script. | packages/rekit-studio/scripts/buildDistDll.js | packages/rekit-studio/scripts/buildDistDll.js | JavaScript | 0 | @@ -0,0 +1,1059 @@
+process.env.NODE_ENV = 'production';%0A%0Aconst webpack = require('webpack');%0Aconst paths = require('../config/paths');%0A%0Afunction buildDll() %7B%0A const dllName = 'rsdll';%0A const dllManifestPath = paths.resolveApp('build/static/rsdll-manifest.json');%0A%0A console.log('Building dll...');... | |
5576126d7607af6de27eba2ce14bd876fc3afc05 | add grunt util, which prepares gruntfile instance and provides `run` method to launch Grunt tasks | utils/grunt.js | utils/grunt.js | JavaScript | 0 | @@ -0,0 +1,638 @@
+import gt from 'grunt'%0Aimport gruntfile from '../gruntfile.coffee'%0A%0Aconst grunt = gruntfile(gt)%0Aconst %7B util: %7B spawn %7D %7D = grunt%0A%0A/**%0A * Run Grunt instance with specified tasks as args%0A * @param %7Bstring%5B%5D%7D %5Bargs%5D Arrays of arguments to be called with Grunt instan... | |
8dbbcc75915557da01910b25ae4d81d645f89ad9 | Create fsr.js-toolkit.js | fsr.js-toolkit.js | fsr.js-toolkit.js | JavaScript | 0.000002 | @@ -0,0 +1,27 @@
+//FSR - Javascript toolkit%0A
| |
ff6d18bcef873852e230e1c2f3dc8f6fa360b464 | add /lib/model.js | lib/model.js | lib/model.js | JavaScript | 0.000003 | @@ -0,0 +1,48 @@
+%0Afunction Model() %7B%0A%0A%7D%0A%0Amodule.exports = Model;%0A
| |
b3a8196d426001dda408447376ab875ab39af4dc | Make Show and Hide visible | src/static/js/modules/loan-comparison/components/loan-output-table-row.js | src/static/js/modules/loan-comparison/components/loan-output-table-row.js | var React = require('react');
var LoanOutputCell = require('./loan-output-table-cell');
var EducationalNote = require('./educational-note');
var common = require('../common');
var Tooltip = require('./tooltip');
var LoanOutputRow = React.createClass({
displayClassNames: function(type) {
var typeClass = 're... | JavaScript | 0 | @@ -3533,38 +3533,8 @@
span
- className=%22u-visually-hidden%22
%3ESho
@@ -3740,38 +3740,8 @@
span
- className=%22u-visually-hidden%22
%3EHid
|
8f4ac8a925eafbe910f795c1018dbe42cecc9825 | add index.js for module | index.js | index.js | JavaScript | 0.000001 | @@ -0,0 +1,66 @@
+module.exports = %7B%0A app: require.resolve('./generators/app'),%0A%7D;%0A
| |
28eaca426b364b9550ce8a5833f083685ef00224 | Create index.js | index.js | index.js | JavaScript | 0.000002 | @@ -0,0 +1 @@
+%0A
| |
7fe2ee5e4c796bbb4f54d755c45cbcc29f32f35d | add main file | index.js | index.js | JavaScript | 0.000001 | @@ -0,0 +1,35 @@
+#!/usr/bin/env node%0A%22use strict%22;%0A%0A
| |
5fcc9a132d547f35726d04d4aefb6e87447ae277 | Create jsdid.js | jsdid.js | jsdid.js | JavaScript | 0 | @@ -0,0 +1,552 @@
+(function(d, logAllIds)%7B%0A%09var allIds = d.querySelectorAll(%22*%5Bid%5D%22), %0A%09%09domHasDuplicateIds = false;%0A%09for( var i = 0, l = allIds.length; i %3C l; i++)%7B%0A%09%09var currentId = allIds%5Bi%5D.id,%0A%09%09%09idCounter = d.querySelectorAll('#'+currentId).length;%0A%09%09if(1 !== i... | |
44f3abba75a456f89f57bbd6cdb9645aea583d68 | create object utility module | lib/utils/object.js | lib/utils/object.js | JavaScript | 0.000001 | @@ -0,0 +1,2053 @@
+%0Aexports.clone = clone;%0Aexports.flat = flat;%0Aexports.deep = deep;%0Aexports.path = path;%0A%0A// clone objects%0Afunction clone (object) %7B%0A%0A // create an empty function%0A function ClonedObject() %7B%7D%0A%0A // set prototype to given object%0A ClonedObject.prototype = object... | |
aaf89722894478e2d27aec6f2b81511c69ad754c | Add Testcase for Showing Logs JSON | test/monitorModelTest.js | test/monitorModelTest.js | JavaScript | 0 | @@ -0,0 +1,1484 @@
+'use strict'%0Avar request = require('request')%0Avar fs = require('fs')%0Avar os = require('os')%0Avar should = require('should')%0Avar utility = require('../public/utility')%0Alet path = require('path')%0Avar api%0Avar url%0A%0Adescribe('Server: Web', function () %7B%0A%0A before(function (done) ... | |
3e028e4308ec518fdaf5fae02a4f78a5fa8f9fcd | Add test for N^2 behavior. | particles/Multiplexer/multiplexer-test.js | particles/Multiplexer/multiplexer-test.js | JavaScript | 0.000002 | @@ -0,0 +1,2233 @@
+/**%0A * @license%0A * Copyright (c) 2017 Google Inc. All rights reserved.%0A * This code may only be used under the BSD style license found at%0A * http://polymer.github.io/LICENSE.txt%0A * Code distributed by Google as part of this project is also%0A * subject to an additional IP rights grant foun... | |
fe4c96ab4fb013acd2b1bcd6c40bf109fa698d98 | Add fixture for #5 | spec/fixtures/issue5.js | spec/fixtures/issue5.js | JavaScript | 0 | @@ -0,0 +1,280 @@
+var cache, fibonacci, index, _i;%0D%0A%0D%0Acache = %5B0, 1%5D;%0D%0A%0D%0Afibonacci = function(n) %7B%0D%0A if (cache%5Bn%5D != null) return cache%5Bn%5D;%0D%0A return cache%5Bn%5D = fibonacci(n - 1) + fibonacci(n - 2);%0D%0A%7D;%0D%0A%0D%0Afor (index = _i = 0; _i %3C= 10; index = ++_i) %7B%0D%0A ... | |
dc116676fb16d1a986bc262f5c6e09898529053c | Include missing file. | edwin/client/static/js/utils/Cacher.js | edwin/client/static/js/utils/Cacher.js | JavaScript | 0 | @@ -0,0 +1,772 @@
+import Immutable from 'immutable';%0Aimport localForage from 'localforage';%0Aimport _ from 'lodash';%0Aimport Dispatcher from '../dispatcher.js';%0A%0Alet Cacher = %7B%0A recallAction(actionType) %7B%0A let key = actionType.toString();%0A return localForage.getItem(key)%0A .then(action =%3... | |
d561ae57780fe319c635aba16735eb4b82261bd9 | Add test of setTimeout | spec/setTimeout.spec.js | spec/setTimeout.spec.js | JavaScript | 0.000002 | @@ -0,0 +1,366 @@
+describe('setTimeout', () =%3E %7B%0A%0A it('respects call order if delay time is equal', done =%3E %7B%0A const count = 500;%0A let k = 0;%0A for (let i = 0; i %3C count; i += 1) %7B%0A (j =%3E %7B%0A setTimeout(() =%3E %7B%0A expect(j).toBe(k);%0A k += 1;%0A ... | |
b98cdddbcec3613709d66c324bdff32022421c94 | create some basic tests to validate the correct behavior | test/Campaign.test.js | test/Campaign.test.js | JavaScript | 0.000001 | @@ -0,0 +1,1616 @@
+const expect = require(%22chai%22).expect;%0Aconst nock = require(%22nock%22);%0Aconst Config = require(%22../lib/utils/Config%22);%0Aconst Request = require(%22../lib/utils/Request%22);%0Aconst Campaign = require(%22../lib/Campaign%22);%0Aconst fixture = require(%22./fixtures/campaign%22);%0Aconst ... | |
880be428988f655476b270ec6da9cab671f3fbcf | add Question spec | test/Question.spec.js | test/Question.spec.js | JavaScript | 0 | @@ -0,0 +1,654 @@
+/* global describe, it, expect */%0A%0Aimport Question from '../src/app/classes/Question'%0A%0Adescribe('Question', function () %7B%0A it('should determine if a answer is correct or not', function () %7B%0A const question = new Question('1 + 1', %5B'0', 'null', '2'%5D)%0A%0A expect(question.is... | |
d0bcec8fc54e24b166397d6cfe12a1f21af8535e | add tests for forall | test/runner/forall.js | test/runner/forall.js | JavaScript | 0 | @@ -0,0 +1,2070 @@
+%22use strict%22;%0D%0Aconst assert = require('assert');%0D%0Aconst jsc = require('jsverify');%0D%0A%0D%0Aconst %7Bforall%7D = require('../../src/runner/forall');%0D%0A%0D%0Aconst DEFAULT_WARMUP = async (seed) =%3E new Object(%7Bstate: %7B%7D, model: %7B%7D%7D);%0D%0Aconst DEFAULT_TEARDOWN = async (... | |
673f565f3fe7458eaff813f0fd4bd9e906f1c8f1 | Add pkg-sync task | gulp/tasks/pkg-sync.js | gulp/tasks/pkg-sync.js | JavaScript | 0.000195 | @@ -0,0 +1,1031 @@
+import fs from 'fs';%0Aimport path from 'path';%0Aimport gulp from 'gulp';%0Aimport babel from 'gulp-babel';%0Aimport pkg from '../../package.json';%0A%0Aexport default (options) =%3E %7B%0A gulp.task('pkg-sync', (callback) =%3E %7B%0A // Copy necessary properties from 'package.json' to 's... | |
552230a6d93c98c51b15b2bc6abbe4aaff0c2a63 | add test to ensure a binary primus client can connect to a binary primus instance (fails) | test/primus.parsers.test.js | test/primus.parsers.test.js | JavaScript | 0 | @@ -0,0 +1,621 @@
+describe('Primus parsers', function () %7B%0A 'use strict';%0A%0A var common = require('./common')%0A , Primus = common.Primus%0A , http = require('http')%0A , expect = common.expect%0A , fs = require('fs')%0A , server%0A , primus;%0A%0A beforeEach(function beforeEach(done) %7B%0... | |
0dce51e0829691b1d1aa9dfd8bb62f97cae1f773 | Add tests for copyFile | test/specs/copyFile.spec.js | test/specs/copyFile.spec.js | JavaScript | 0 | @@ -0,0 +1,1351 @@
+%22use strict%22;%0A%0Aconst path = require(%22path%22);%0Aconst fileExists = require(%22exists-file%22).sync;%0Aconst directoryExists = require(%22directory-exists%22).sync;%0A%0Adescribe(%22copyFile%22, function() %7B%0A beforeEach(function() %7B%0A this.client = createWebDAVClient(%0A ... | |
4c16b96e43a70782907c0b3bc9fe092f54ed61c9 | fix get checkout URL test | test/unit/offsiteGateway.js | test/unit/offsiteGateway.js | var init = require('./testInit');
var should = require('should');
var dwolla = require('../../lib/dwolla')(init.fakeKeys.appKey, init.fakeKeys.appSecret);
describe('Offsite Gateway', function() {
describe('set gateway mode', function() {
it('Should return the correct boolean', function(done) {
dwolla.set... | JavaScript | 0 | @@ -517,26 +517,39 @@
on('
-D
+http://d
ummy
- R
+r
edirect
- URI
+.com/return
').s
@@ -825,17 +825,17 @@
d.equal(
-%7B
+%5B
%7B'Name':
@@ -904,17 +904,17 @@
ity': 2%7D
-%7D
+%5D
);%0A%0A%09
@@ -1047,16 +1047,120 @@
one) %7B%0A%0A
+%09%09%09// clear any old gateway sessions%0A%09%09%09dwolla.startGatewaySes... |
39000e6c8cd8912f902ca3630e7c630e8e75159d | Add success page | dinosaurs/js/views/gotIt.js | dinosaurs/js/views/gotIt.js | JavaScript | 0 | @@ -0,0 +1,980 @@
+var m = require('mithril');%0Avar userData = require('../models/index.js');%0A%0Avar header = function() %7B%0A return m('.row', %5B%0A m('br'),%0A m('.col-md-offset-1.col-md-10', %5B%0A m('.jumbotron%5Bstyle=%22text-align:center%22%5D', %5B%0A m('h1', %5B%0... | |
e0fdeeb547dee535971351e586cd6484993b6b3c | add semicolon to gulpfile | lighthouse-extension/gulpfile.js | lighthouse-extension/gulpfile.js | // generated on 2016-03-19 using generator-chrome-extension 0.5.4
'use strict';
const fs = require('fs');
const path = require('path');
const del = require('del');
const gutil = require('gulp-util');
const runSequence = require('run-sequence');
const gulp = require('gulp');
const browserify = require('browserify');
co... | JavaScript | 0 | @@ -4398,32 +4398,51 @@
, %7Bdebug: true%7D)
+; // for sourcemaps
%0A bundle =
|
2006786d780c94d982cee71c5191c78c83a9ef5e | fix stream-list list-item npm docs | src/pivotal-ui-react/stream-list/stream-list.js | src/pivotal-ui-react/stream-list/stream-list.js | import React from 'react/addons';
import {UIButton} from 'pui-react-buttons';
import {GroupList} from 'pui-react-lists';
import AnimationMixin from 'pui-react-animation';
/**
* @component StreamList
* @description A dynamically growing list
*
* @property singularNewItemText {string} Text to be displayed when there... | JavaScript | 0 | @@ -4541,31 +4541,24 @@
('pui-react-
-stream-
list').ListI
|
aed98b57bf1b61faa93fdf258136c105381e9e78 | Create jquery.labelTabs.js | js/jquery.labelTabs.js | js/jquery.labelTabs.js | JavaScript | 0.000001 | @@ -0,0 +1,1815 @@
+(function ($) %7B%0A $.fn.labelTabs = function () %7B%0A this.each(function () %7B%0A var $thislabel = $(this);%0A var lblForAttr = $thislabel.attr('for');%0A var $field = $('#' + lblForAttr);%0A if ($field.length === 0) %7B return; %7D%0A ... | |
8d4f5470e2a2bcbb6f8eda6ec7d24a82d9feb3b0 | Add boilerplate to simplify starting challenges | bp/bp.js | bp/bp.js | JavaScript | 0.000001 | @@ -0,0 +1,213 @@
+// Node 11.2.0%0A%0Afs = require('fs');%0A%0A%0Aconst input = fs.readFileSync('input.txt', 'utf-8').trim().split('%5Cn');%0A%0Aconst start = process.hrtime.bigint();%0A%0A%0A// Code here%0A%0A%0Aconsole.log(process.hrtime.bigint() - start);%0A
| |
8909615686eb09ec5243899e9122a72e34613a7b | Add testem config to the repo. | testem.js | testem.js | JavaScript | 0 | @@ -0,0 +1,327 @@
+/* eslint-env node */%0A%0Amodule.exports = %7B%0A test_page: 'tests/index.html?hidepassed',%0A disable_watching: true,%0A launch_in_ci: %5B%0A 'Chrome'%0A %5D,%0A launch_in_dev: %5B %5D,%0A browser_args: %7B%0A Chrome: %5B%0A '--disable-gpu',%0A '--headless',%0A '--remote-... | |
b8824333fed60477dcf41878ba877a733952a6b5 | Add jscs configuration file | .jscs.js | .jscs.js | JavaScript | 0.000001 | @@ -0,0 +1,2003 @@
+module.exports = %7B%0A excludeFiles: %5B%0A 'coverage',%0A 'node_modules',%0A '.*',%0A 'test',%0A 'lib'%0A %5D,%0A requireSpaceAfterKeywords: %5B'if', 'else', 'for', 'while', 'do', 'switch', 'return', 'try', 'catch'%5D,%0A requireSpaceBeforeBlockStatem... | |
aa96387c116aed018888cf6090802f58029ea2e7 | Add first set of actions | src/actions/drawing.js | src/actions/drawing.js | JavaScript | 0.000209 | @@ -0,0 +1,65 @@
+export function addPoint() %7B%0A%0A%7D%0A%0Aexport function movePoint() %7B%0A%0A%7D
| |
f38e91b094fe37e3b3891898528ed80eb01235f4 | Create code.js | events/load-events/code.js | events/load-events/code.js | JavaScript | 0.000006 | @@ -0,0 +1,2065 @@
+$(document).on(%22pagebeforechange pagecontainerbeforetransition pagebeforecreate pagecreate%22, function(e) %7B%0A /* timestamp */%0A console.log(e.type + %22 %22 + Date(e.timeStamp));%0A%7D).on('pagecreate', %22#demo%22, function() %7B%0A /* change page btn */%0A $(%22#foo%22).on(%22cl... | |
32457aab09dd029dc88322c505d9ae0f133f833d | Create qlab.js | qlab.js | qlab.js | JavaScript | 0 | @@ -0,0 +1,282 @@
+module.exports = function(RED) %7B%0A function QlabNode(config) %7B%0A RED.nodes.createNode(this,config);%0A var node = this;%0A %0A node.on('input', function(msg) %7B%0A %0A %0A %7D);%0A %0A %7D%0A RED.nodes.registerType(%22qlab%22... | |
583c8228323550817e9270f3138d6f26390ccdc9 | Create jsTemp.js | jsTemp.js | jsTemp.js | JavaScript | 0.000001 | @@ -0,0 +1,123 @@
+var c=document.getElementById('myCanvas');%0Avar ctx=c.getContext('2d');%0Actx.fillStyle='#FF0000';%0Actx.fillRect(0,0,80,100);%0A%0A
| |
594db7f3bc591a2e896334e3f194dc31043d62fd | add example | tcpchat/example.js | tcpchat/example.js | JavaScript | 0.000002 | @@ -0,0 +1,1258 @@
+var net = require(%22net%22);%0Avar participant = %5B%5D; // array of participanticpants%0Avar current = -1;%0Avar total_participants = 0;%0Avar server = net.createServer(function(socket)%7B%0A participant.push(socket);%0A total_participants++;%0A for(var i=0;i%3Cparticipant.length;i++)%7B%... | |
27a63ee7a45fb54a4db292ccbb2ac6fd1d60f7bb | Add a skeleton create_admin_values module. | lib/create_admin_values.js | lib/create_admin_values.js | JavaScript | 0 | @@ -0,0 +1,214 @@
+/**%0A * @file Inferences admin values for an OpenAddresses CSV file given its%0A * basename.%0A */%0A%0A'use strict';%0A%0Afunction createAdminValues( basename )%7B%0A return %7B%0A country: 'us'%0A %7D;%0A%7D%0A%0Amodule.exports = basename;%0A
| |
0f24a63d04bb9abae40a589dc4818ced6cc49c71 | verify setting of DEBUG environment variable | test/test-debug.js | test/test-debug.js | JavaScript | 0.000001 | @@ -0,0 +1,160 @@
+process.env.DEBUG = true;%0A%0Avar b = require('bonescript');%0Aconsole.log('Name: ' + b.getPlatform().name);%0Aconsole.log('Version: ' + b.getPlatform().bonescript);%0A%0A
| |
28326a8fa10c1670f3bb3e2926561ee8441d5122 | add skeleton of test | test/test.basic.js | test/test.basic.js | JavaScript | 0.000022 | @@ -0,0 +1,795 @@
+/*global require, module*/%0A/*jslint vars:true*/%0A(function () %7B'use strict';%0A%0Avar dj = require('../DJ'),%0A testCase = require('nodeunit').testCase;%0A%0Avar json = %7B%0A %22store%22: %7B%0A %22book%22: %7B %22category%22: %22reference%22,%0A %22author%22: %22Nigel R... | |
b7194056cb7ccc5e4987f48d9f56e4d116ddb0c3 | Set up controller for createNewRecipe to submit form when we get endpoint. | src/js/new-recipe.js | src/js/new-recipe.js | JavaScript | 0 | @@ -0,0 +1,378 @@
+;(function()%7B//IFEE%0A%0Aangular.module('brewKeeper')%0A .controller('createNewRecipe', function($scope, $http)%7B%0A $scope.recipe = %7B %7D//Might need to prepopulate this with empty strings for each key... Maybe...%0A $scope.submit=function()%7B%0A $http.post('urlendpoint', $... | |
633e64d4e94e7e872f9f399ad23740da8d14cd4d | takes stem, returns isStemed | src/helpers/make-is-prop.js | src/helpers/make-is-prop.js | JavaScript | 0.99897 | @@ -0,0 +1,302 @@
+export default stem =%3E %7B%0A let _stem = stem.toLowerCase();%0A let len = stem.length;%0A%0A if (_stem.slice(len - 2) === 'ed') %7B%0A _stem = _stem.slice(0, len - 2);%0A %7D%0A%0A if (_stem.slice(0, 2) === 'is') %7B%0A _stem = _stem.slice(2);%0A %7D%0A%0A return 'is' + _stem%5B0%5D.t... | |
236b552270c8468c4e2babef03fe92ce8d9a222d | add missing additionalFields html referece for rolling push | app/scripts/modules/deploymentStrategy/strategies/rollingPush/rollingPush.strategy.module.js | app/scripts/modules/deploymentStrategy/strategies/rollingPush/rollingPush.strategy.module.js | 'use strict';
let angular = require('angular');
module.exports = angular.module('spinnaker.deploymentStrategy.rollingPush', [])
.config(function(deploymentStrategyConfigProvider) {
deploymentStrategyConfigProvider.registerStrategy({
label: 'Rolling Push (deprecated)',
description: 'Updates the launc... | JavaScript | 0 | @@ -43,16 +43,53 @@
lar');%0A%0A
+require('./additionalFields.html');%0A%0A
module.e
|
da63a32dc4fc59d3fdcd49b1a0c38dbd2008db8c | Add super simple benchmark | benchmarks/add-remove.js | benchmarks/add-remove.js | JavaScript | 0.000001 | @@ -0,0 +1,1374 @@
+var set = require('../sets')(require('level-sublevel')(require('level-test')()('benchmark')))%0A , COUNT = 5000%0A , input = (function () %7B%0A var keys = %5B%5D%0A , i = COUNT%0A%0A while(i %3E 0) %7B%0A keys.push((new Date(i)).toJSON())%0A i = i - 1%0A %7D%0A... | |
5169af5c8e58089576eb9fe90130697c2a9d18ae | test OOG vmIOandFlowOperationsTest #46 | test/common/VMTests/vmIOandFlowOperations.js | test/common/VMTests/vmIOandFlowOperations.js | var vmIOandFlowOperationsTest = require('ethereum-tests').VMTests.vmIOandFlowOperationsTest,
async = require('async'),
VM = require('../../../lib/vm'),
ERROR = require('../../../lib/vm/constants').ERROR,
Account = require('../../../lib/account.js'),
assert = require('assert'),
testUtils = require('../../tes... | JavaScript | 0 | @@ -592,24 +592,176 @@
tKey.match(%0A
+ /(%5Ejump0_foreverOutOfGas$%7C%5EmloadOutOfGasError2$)/)) %7B%0A assert.strictEqual(error, ERROR.OUT_OF_GAS);%0A return true;%0A %7D else if (testKey.match(%0A
/(%5Ejump0
@@ -1071,284 +1071,8 @@
) %7B%0A
- // var jump0_foreverOutOfGas = vmIOandFlowOperationsTest... |
416be506d0025106514b2372901bff7f49969a80 | add users suggest testing file | test/test.wpcom.users.js | test/test.wpcom.users.js | JavaScript | 0.000001 | @@ -0,0 +1,671 @@
+%0A/**%0A * WPCOM module%0A */%0A%0Avar WPCOM = require('../');%0Avar assert = require('assert');%0A%0A/**%0A * Testing data%0A */%0A%0Avar fixture = require('./fixture');%0A%0A/**%0A * me%0A */%0A%0Adescribe('wpcom.users', function () %7B%0A // Global instances%0A var wpcom = WPCOM(fixture.site.to... | |
e834c5d66db21b51a37642b46f47d9ebd2ee8efb | add basic package-file testing | test/testPackageFiles.js | test/testPackageFiles.js | JavaScript | 0 | @@ -0,0 +1,1146 @@
+/* jshint -W097 */// jshint strict:false%0A/*jslint node: true */%0Avar expect = require('chai').expect;%0Avar fs = require('fs');%0A%0Adescribe('Test package.json and io-package.json', function() %7B%0A it('Test package files', function (done) %7B%0A var fileContentIOPackage = fs.r... | |
9bc83aad8767f7bd636ae14d75dd972bb621a562 | add spec-helper tests | spec/spec-helper-spec.js | spec/spec-helper-spec.js | JavaScript | 0.000001 | @@ -0,0 +1,206 @@
+describe('spec-helper', () =%3E %7B%0A describe('jasmine.any', () =%3E %7B%0A it('equals uses jasmine.any', () =%3E %7B%0A const func = () =%3E %7B%7D;%0A expect(func).toEqual(jasmine.any(Function));%0A %7D);%0A %7D);%0A%7D);%0A
| |
962296a903972f141d66727b98516b5aa58a9a8f | Add tests | test/unit/lib/apiUtil.js | test/unit/lib/apiUtil.js | JavaScript | 0.000001 | @@ -0,0 +1,2045 @@
+/* global require, module, process, console, describe, it, before, __dirname */%0A/* jshint -W097 */%0A/* jshint expr: true */%0A'use strict';%0A%0Avar%0A serverRootDir = __dirname + '/../../../',%0A mocha = require('mocha'),%0A expect = require('chai').expect,%0A apiUtil = ... | |
4dfc51a9830d785df1ce0c96a7fa1b2c1a451e3d | Create s3_presignedURL.js | javascript/example_code/s3/s3_presignedURL.js | javascript/example_code/s3/s3_presignedURL.js | JavaScript | 0.000004 | @@ -0,0 +1,1815 @@
+/**%0A * Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.%0A *%0A * This file is licensed under the Apache License, Version 2.0 (the %22License%22).%0A * You may not use this file except in compliance with the License. A copy of%0A * the License is located at%0A *%0A * ht... | |
393209028f7df4022681eb2aeacd63b15ceaf3b4 | add gulpfile chrome:html | gulpfile.js/tasks/chrome-extension/html.js | gulpfile.js/tasks/chrome-extension/html.js | JavaScript | 0.000001 | @@ -0,0 +1,432 @@
+var gulp = require('gulp')%0Avar htmlmin = require('gulp-htmlmin')%0Avar handleErrors = require('../../lib/handleErrors')%0Avar path = require('path')%0A%0Avar paths = %7B%0A src: %5Bpath.join('src/chrome-extension/html', '/**/*.html' )%5D,%0A dest: path.join('public/chrome-extension/html')%0A%7D%0... | |
0f57bd95c6c69c59c446864a0cbc7df206d67420 | Create object.js | object.js | object.js | JavaScript | 0.000003 | @@ -0,0 +1,202 @@
+Function.prototype.new=function()%7B%0A var arg=Array.prototype.slice.call(arguments);%0A return eval(%22new this(arg)%22);%0A%7D%0AObject.prototype.__defineGetter__(%22class%22,function()%7B%0A return this.constructor;%0A%7D)%0A
| |
a3605cd55950e695891bc3041b633a05eb3a414e | Update POST /forgot description. | controllers/forgot.js | controllers/forgot.js | var async = require('async');
var crypto = require('crypto');
var nodemailer = require("nodemailer");
var User = require('../models/User');
var secrets = require('../config/secrets');
/**
* GET /forgot
* Forgot Password page.
*/
exports.getForgot = function(req, res) {
if (req.isAuthenticated()) {
return res... | JavaScript | 0 | @@ -432,22 +432,76 @@
%0A *
-Reset Password
+Create a random token, then the send user an email with a reset link
.%0A *
|
30c1bc33ac2b06840bef6833f3c729a073add4b3 | add cli as stream | cli/cli.js | cli/cli.js | JavaScript | 0.000001 | @@ -0,0 +1,613 @@
+%22use strict%22;%0Avar parserStream = require(%22../lib/wzeditor-rules-stream%22);%0Avar es = require(%22event-stream%22);%0Avar typeName = require(%22type-name%22);%0Aprocess.stdin //connect streams together with %60pipe%60%0A .pipe(es.split()) //split str... | |
954f25ce4b5a488db7bf3119043cba8eb06fb2a2 | use windows-friendly path joining | spec/featured-spec.js | spec/featured-spec.js | var path = require('path')
var test = require('tape')
var yaml = require('yamljs')
test('Limit featured homepage apps to 24', function (t) {
t.plan(1)
var featuredApps = require(path.join(__dirname, '../_data/featured_apps.json'))
t.equal(featuredApps.length, 24, '24 apps should be featured instead of ' + featur... | JavaScript | 0 | @@ -204,15 +204,21 @@
'..
-/
+', '
_data
-/
+', '
feat
|
56c4cd9c3733fd389f8608dba57a71ef42dc0edd | Create Two.js | js/Two.js | js/Two.js | JavaScript | 0 | @@ -0,0 +1,1646 @@
+%22use strict%22;%0Aclass TWO %7B%0A constructor(canvas) %7B%0A // @param this.c should be instanceof CanvasRenderingContext2D%0A this.c = canvas.getContext('2d');%0A %7D%0A clear() %7B%0A this.c.clearRect(0, 0, this.c.canvas.width, this.c.canvas.height);%0A %7D%0A draw(s, m, c, x, y, ... | |
a807ab7ff24100c886f0a78c3fde9aea65882804 | add Archive Controlleur | web/js/controller/archive.js | web/js/controller/archive.js | JavaScript | 0 | @@ -0,0 +1,976 @@
+%0Avar appPost = angular.module('appArchive', %5B%5D);%0A%0AappPost.controller('ArchiveController', %5B'$scope', '$http', function ($scope, $http) %7B%0A%0A var refrech = function () %7B%0A%0A $http(%7B%0A method: 'GET',%0A url: 'listArchive'%0A %7D).then(functi... | |
d0a25f2b906476118ba10fb310af13f7deead943 | Add test for `main` selectors | src/selectors/index.test.js | src/selectors/index.test.js | JavaScript | 0.000001 | @@ -0,0 +1,2100 @@
+import %7B NETWORK_KINDS %7D from 'constants/network';%0Aimport %7B%0A getNetwork,%0A getBeliefs,%0A getSelectedNodes,%0A getSubnetworks,%0A getNetworkKind,%0A getPanelVisibility,%0A getLinkages,%0A%7D from './index';%0A%0A%0Adescribe('Main Selectors', () =%3E %7B%0A describe('getNetwork sel... | |
32950df42851d96d80908795ef42171903674daf | add proxy server - API for mobiles | proxy.js | proxy.js | JavaScript | 0 | @@ -0,0 +1,408 @@
+'use strict'%0A%0Aconst express = require('express')%0Aconst app = express()%0Aconst expressWs = require('express-ws')(app)%0A%0A%0Aapp.listen(8080, function () %7B%0A console.log('Example app listening on port 8080!')%0A%7D);%0A%0Aapp.post('/register', function(req, res) %7B%0A const %7Bdevice%7D ... | |
a6f9b6c5ca3294de7427e3f65299ca080469c14f | Update the Rectangle resize method to resize relative to the south west point. | src/edit/handler/Edit.Rectangle.js | src/edit/handler/Edit.Rectangle.js | L.Edit.Rectangle = L.Edit.SimpleShape.extend({
_createMoveMarker: function () {
var bounds = this._shape.getBounds(),
center = bounds.getCenter();
this._moveMarker = this._createMarker(center, this.options.moveIcon);
},
_createResizeMarker: function () {
var bounds = this._shape.getBounds(),
resizemark... | JavaScript | 0 | @@ -1332,38 +1332,37 @@
latlng) %7B%0A%09%09var
-latlng
+bound
s = this._shape.
@@ -1360,38 +1360,37 @@
s._shape.get
-LatLng
+Bound
s(),%0A%09%09%09
bounds = thi
@@ -1381,51 +1381,41 @@
%0A%09%09%09
+nw =
bounds
- = this._shape.getBounds
+.getNorthWest
(),%0A%09%09%09
-center
+ne
= b
@@ -1427,22 +1427,25 @@... |
774500f3a6176fb38cb57049b016b0cd826f8fe0 | add class. Implement .info() mtd | lib/me.js | lib/me.js | JavaScript | 0.000009 | @@ -0,0 +1,484 @@
+%0A/**%0A * Module dependencies.%0A */%0A%0Avar debug = require('debug')('wp-connect:me');%0A%0A/**%0A * Create a Me instance%0A *%0A * @param %7BMe%7D wpconn%0A * @api public%0A */%0A%0Afunction Me(wpconn)%7B%0A if (!(this instanceof Me)) return new Me(wpconn);%0A this.wpconn = wpconn;%0A%7D%0A%0A... | |
069f798a5ab53e5cb44af6135f71dfad222677a4 | Add bemrc | .bemrc.js | .bemrc.js | JavaScript | 0.000002 | @@ -0,0 +1,185 @@
+module.exports = %7B%0A root : true,%0A levels : %5B%0A %7B%0A layer : 'common',%0A path : '@common'%0A %7D%0A %5D,%0A sets : %7B%0A common : 'common'%0A %7D%0A%7D;%0A
| |
2c2d76f443418241b68e6e7bfe8730bbca46ec45 | test suite for random grouping | test/test.group-user.js | test/test.group-user.js | JavaScript | 0 | @@ -0,0 +1,1314 @@
+var server = require(%22../lib/unhangout-server%22),%0A expect = require(%22expect.js%22),%0A _ = require(%22underscore%22),%0A models = require(%22../lib/server-models%22),%0A options = require(%22../lib/options%22),%0A groupBooter = require(%22../lib/random-grouping%22),%0A reque... | |
8808beb9d9538411ec644b72b4062a8cd1f4e17b | Add fetch options to WFS component | src/components/wfs.js | src/components/wfs.js | /*
* Copyright 2015-present Boundless Spatial Inc., http://boundlessgeo.com
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required ... | JavaScript | 0 | @@ -3038,18 +3038,20 @@
.%0A
-le
+cons
t payloa
@@ -3053,16 +3053,59 @@
ayload =
+ '%3C?xml version=%221.0%22 encoding=%22UTF-8%22?%3E' +
(new XM
@@ -3274,73 +3274,123 @@
-fetch(target_url, %7B%0A
+const fetchOptions = this.props.fetchOptions;%0A fetchOptions.
method
-:
+ =
'POST'
-,
+;... |
cd23ef722d7863f767a70b44bbfebbf397a12440 | Add multipart test for transfer-encoding and content-length | tests/test-multipart.js | tests/test-multipart.js | 'use strict'
var http = require('http')
, path = require('path')
, request = require('../index')
, fs = require('fs')
, tape = require('tape')
function runTest(t, a) {
var remoteFile = path.join(__dirname, 'googledoodle.jpg')
, localFile = path.join(__dirname, 'unicycle.jpg')
, multipartData = []
... | JavaScript | 0 | @@ -684,20 +684,16 @@
))%0A %7D
-%0A
else %7B%0A
@@ -763,24 +763,257 @@
d/))%0A %7D%0A%0A
+ if (chunked) %7B%0A t.ok(req.headers%5B'transfer-encoding'%5D === 'chunked')%0A t.notOk(req.headers%5B'content-length'%5D)%0A %7D else %7B%0A t.ok(req.headers%5B'content-length'%5D)%0A t.no... |
81892b33b07fd49b7e0ace27785b6cefceb4666b | add Home page test | src/views/Home/Home.test.js | src/views/Home/Home.test.js | JavaScript | 0 | @@ -0,0 +1,211 @@
+import React from 'react';%0Aimport ReactDOM from 'react-dom';%0Aimport Home from './Home';%0A%0Ait('renders without crashing', () =%3E %7B%0A const div = document.createElement('div');%0A ReactDOM.render(%3CHome /%3E, div);%0A%7D);%0A
| |
d3e472ea8ce5978652e556c6f10bf3bd99a6a796 | Add ESLint for unit test folder | tests/unit/.eslintrc.js | tests/unit/.eslintrc.js | JavaScript | 0 | @@ -0,0 +1,51 @@
+module.exports = %7B%0A env: %7B%0A mocha: true%0A %7D%0A%7D;%0A
| |
1cdfb03784184ffdd21475b72c53ac74e7e943e0 | Add form selectors | src/selectors/form.js | src/selectors/form.js | JavaScript | 0.000001 | @@ -0,0 +1,574 @@
+/**%0A * mSupply Mobile%0A * Sustainable Solutions (NZ) Ltd. 2019%0A */%0A%0Aexport const selectCanSaveForm = (%7B form %7D) =%3E %7B%0A const areAllValid = Object.values(form).every((%7B isValid %7D) =%3E isValid);%0A const allHaveValues = Object.values(form).every((%7B hasValue %7D) =%3E hasValue... | |
572798ea6f84b15a935058f22d703d53f6624f81 | Implement remove/reinitialize in factory object | src/dashboard.factory.js | src/dashboard.factory.js | (function() {
'use strict';
angular
.module('dashboard')
.factory('dashboardFactory', DashboardFactoryFunction);
DashboardFactoryFunction.$inject = ['dashboardObject'];
/**
* @ngdoc service
* @module dashboard
* @name dashboardObject
* @description
*
* Th... | JavaScript | 0.000002 | @@ -624,17 +624,85 @@
get: get
+,%0A remove: remove,%0A reinitialize: reinitialize
%0A
-
@@ -806,22 +806,22 @@
param %7B
-%5Btype%5D
+String
%7D id %5Bde
@@ -855,32 +855,38 @@
rn %7B
-%5Btype%5D%7D %5Bdescription%5D
+Object%7D Index of dashbaords
%0A
@@ -1051,16 +1051,16 ... |
e2b765e22d89e50170630b85af448011a69c99e5 | Add new mobile-apps entrypoint | lib/assets/javascripts/dashboard/mobile-apps.js | lib/assets/javascripts/dashboard/mobile-apps.js | JavaScript | 0 | @@ -0,0 +1,2574 @@
+const $ = require('jquery');%0Aconst _ = require('underscore');%0Aconst Backbone = require('backbone');%0Aconst DashboardHeaderView = require('dashboard/components/dashboard-header-view');%0Aconst HeaderViewModel = require('dashboard/views/mobile-apps/header-view-model');%0Aconst LocalStorage = requ... | |
722bec5f02c0a6118c4040066fe08d5333976ce4 | test for implicit wait | test/functional/timeouts.js | test/functional/timeouts.js | JavaScript | 0.000002 | @@ -0,0 +1,968 @@
+/*global describe:true, it:true */%0A%22use strict%22;%0A%0A/*%0A * test disabled until findElement is implemented%0A */%0Avar wd = require('wd')%0A , assert = require('assert')%0A , caps = %7B%0A browserName: 'iOS'%0A , platform: 'Mac'%0A , version: '6.0'%0A %7D;%0A%0Adescribe('c... | |
97b133bb0b00d45a192768ab177917b897e98a7b | Add eloquent js file | week-7/eloquent.js | week-7/eloquent.js | JavaScript | 0.000001 | @@ -0,0 +1,1639 @@
+// 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// var boogie = %22I like to boogie%22;%0A%0A// var userFood = prompt(%22What's your fa... | |
de2a2c0678ad3c82c09c1dd792f01ba9640000f8 | add wallaby.js file | wallaby.js | wallaby.js | JavaScript | 0.000001 | @@ -0,0 +1,513 @@
+import Pkg from './package.json';%0A%0Amodule.exports = (wallaby) =%3E (%7B%0A files: %5B%0A %7B pattern: 'node_modules/babel-polyfill/dist/polyfill.js', instrument: false %7D,%0A 'src/**/*.js',%0A '!src/**/*.test.js',%0A %5D,%0A tests: %5B%0A 'src/**/*.test.js',%0A %5D,%0A env: %7B%... | |
04d11949dbb70f8afbfbe5c822ddec48e3dc3fe1 | add spec to test url generator | test/app/url.spec.js | test/app/url.spec.js | JavaScript | 0 | @@ -0,0 +1,755 @@
+define(%0A %5B%0A 'url'%0A %5D, function(URL) %7B%0A%0A describe(%22URL%22, function()%7B%0A%0A beforeEach(function() %7B%0A%0A %7D);%0A%0A it(%22should generate url for a project%22, function()%7B%0A var project = %7Bid: 1%7D;%0A var url = URL.project(project, %7... | |
8febd7a5dfe250812811d62997c687c0661518f3 | add server to test timeouts | test/unresponsive-server.js | test/unresponsive-server.js | JavaScript | 0 | @@ -0,0 +1,346 @@
+const net = require('net');%0A%0Aconst port = process.argv%5B2%5D %7C%7C 50001;%0A%0Aconst server = net.createServer(socket =%3E %7B%0A const time = Date.now();%0A while (Date.now() - time %3C 2000) %7B%0A // burn cpu%0A %7D%0A console.log('end');%0A socket.destroy();%0A serv... | |
805ad507e700e67ad12f5bd54b7ff97a428fe2e6 | add test for global-config | test/utils/global-config.js | test/utils/global-config.js | JavaScript | 0 | @@ -0,0 +1,2112 @@
+'use strict';%0Avar assert = require('assert');%0Avar proxyquire = require('proxyquire');%0Avar sinon = require('sinon');%0A%0Adescribe.only('global config', function () %7B%0A beforeEach(function () %7B%0A this.sandbox = sinon.sandbox.create();%0A%0A this.fs = %7B%0A existsSync: sinon.s... | |
961f2db89b6f732a52fb8b579ab999fe456c5318 | Create vimeo.js | vimeo.js | vimeo.js | JavaScript | 0.000001 | @@ -0,0 +1,1490 @@
+var Vimeo;%0A%0AVimeo = function(arrayOfVideoIds, callback) %7B%0A var getAndAddMetaData, id, runCallbackIfDone, self, _i, _len;%0A self = this;%0A check(arrayOfVideoIds, Match.Where(function(arr) %7B%0A var item, _i, _len, _results;%0A check(arr, Array);%0A _results = %5B%5D;%0A for ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.