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 |
|---|---|---|---|---|---|---|---|
2465811bcfe36fcdc0f9a026af2ce21ca6616ceb | add integration test for results.changedRows | test/integration/connection/test-query-changed-rows.js | test/integration/connection/test-query-changed-rows.js | JavaScript | 0.000002 | @@ -0,0 +1,917 @@
+var assert = require('assert');%0Avar common = require('../../common');%0A%0Avar table = 'changed_rows_test';%0A%0Acommon.getTestConnection(function (err, connection) %7B%0A assert.ifError(err);%0A%0A common.useTestDb(connection);%0A%0A connection.query(%0A 'CREATE TEMPORARY TABLE ?? (%60col1%6... | |
971f9b8df6cfd01a1f627fdcc337cb190e44e0a1 | add unit tests for growlNotifications module | test/unit/growlNotifications/growlNotificationsSpec.js | test/unit/growlNotifications/growlNotificationsSpec.js | JavaScript | 0 | @@ -0,0 +1,906 @@
+'use strict';%0A%0Adescribe('growlNotifications', function() %7B%0A%0A var module;%0A var dependencies;%0A dependencies = %5B%5D;%0A%0A var hasModule = function(module) %7B%0A return dependencies.indexOf(module) %3E= 0;%0A %7D;%0A%0A beforeEach(function() %7B%0A%0A // ... | |
c975d81b411404099eedd852bc7b1ebb160884ea | clear authorship colors test | tests/frontend/specs/button_clear_authorship_colors.js | tests/frontend/specs/button_clear_authorship_colors.js | JavaScript | 0.000002 | @@ -0,0 +1,1732 @@
+describe(%22clear authorship colors button%22, function()%7B%0A //create a new pad before each test run%0A beforeEach(function(cb)%7B%0A helper.newPad(cb);%0A this.timeout(5000);%0A %7D);%0A%0A it(%22makes text clear authorship colors%22, function(done) %7B%0A var inner$ = helper.padInn... | |
024c714e1681758796a769cf832d602531f9d70b | fix info popup opening | core/background/pageAction.js | core/background/pageAction.js | 'use strict';
/**
* Defines an object for access to page action of a single controller (tab)
*/
define([], function() {
/**
* Constructor
*
* @param {Number} tabId
*/
return function(tabId) {
var icons = {
BASE: '/icons/page_action_base.png',
RECOGNIZED: '/icons/page_action_note.png',
DISABLED... | JavaScript | 0.000001 | @@ -504,17 +504,52 @@
ic.html'
+,%0A%09%09%09SONG_INFO: '/popups/info.html'
%0A
-
%09%09%7D;%0A%0A%09%09
@@ -1056,101 +1056,8 @@
d);%0A
-%09%09%09setPageAction(icons.RECOGNIZED, 'Your Last.fm record for this song', 'popups/info.html');%0A
%09%09%7D;
@@ -1373,34 +1373,51 @@
Obj.getTrack(),
-''
+documents.SONG_INF... |
fdfb5d309e5e2c4a4b433736c0f35b2c07a81462 | Add Terms controller | client/app/scripts/controllers/terms.js | client/app/scripts/controllers/terms.js | JavaScript | 0 | @@ -0,0 +1,209 @@
+angular%0A .module('app')%0A .controller('termsController', %5B%0A '$scope',%0A '$routeParams',%0A 'userService',%0A '$rootScope',%0A function($scope, $routeParams, userService, $rootScope) %7B%0A %0A %7D%5D);%0A
| |
ffb4b4781a2b2820e7f64cd1c82763dc96dbeaa9 | Add missing util/array/is-array | src/util/array/is-array.js | src/util/array/is-array.js | JavaScript | 0.999705 | @@ -0,0 +1,142 @@
+define(function() %7B%0A%0A%09return Array.isArray %7C%7C function( obj ) %7B%0A%09%09return Object.prototype.toString.call( obj ) === %22%5Bobject Array%5D%22;%0A%09%7D;%0A%0A%7D);%0A
| |
68830a13d43891d67de4b28627f0e3a43ecfdb7a | Create hi.js | code/node_modules/hi.js | code/node_modules/hi.js | JavaScript | 0.000004 | @@ -0,0 +1,4 @@
+ddd%0A
| |
d77323d9c5086e93a3eda4debef7dab01cf2efaf | add script to seed data | scripts/seedData.js | scripts/seedData.js | JavaScript | 0.000004 | @@ -0,0 +1,2211 @@
+// This script seeds datatools-server with test project and%0A// NOTE: make sure you have a recent version of node (e.g., v8) for async/await%0A// USAGE: app_url='http://localhost:4000' num_feedsources=2 feed_path='/tmp/gtfs.zip' node seedData.js run%0A%0Avar fetch = require('isomorphic-fetch')%0Ava... | |
f9eee0bfb57146e568c3ea4112803c09ed64a34f | Update errorStores based on latest dstore changes | test/data/errorStores.js | test/data/errorStores.js | define([
"dojo/_base/lang",
"dojo/_base/Deferred",
"dstore/Memory",
"./typesData"
], function(lang, Deferred, Memory, typesData){
// summary:
// Returns a hash containing stores which generate errors on specific
// methods, synchronously or asynchronously.
var fetchStore = new Memory(),
asyncFetchStore = n... | JavaScript | 0 | @@ -64,16 +64,40 @@
emory%22,%0A
+%09%22dstore/QueryResults%22,%0A
%09%22./type
@@ -138,16 +138,30 @@
Memory,
+ QueryResults,
typesDa
@@ -822,42 +822,274 @@
;%0A%09%09
-this.total = 0;%0A%09%09return dfd;%0A%09%7D;%0A
+return new QueryResults(dfd, %7B totalLength: 0 %7D);%0A%09%7D;%0A%0A%09// Need to overwrite f... |
8bcf664711db5475543528f2d37e1ba23d6e774c | add ColorFormat static | src/_statics/ColorFormat.js | src/_statics/ColorFormat.js | JavaScript | 0 | @@ -0,0 +1,231 @@
+/**%0A * @file ColorFormat static%0A * @author liangxiaojun(liangxiaojun@derbysoft.com)%0A */%0A%0Aexport default %7B%0A%0A HEX: Symbol('HEX'),%0A RGB: Symbol('RGB'),%0A CMYK: Symbol('CMYK'),%0A LAB: Symbol('LAB'),%0A HSB: Symbol('HSB')%0A%0A%7D;
| |
4f48ebe581d722d0632bf3debc3da771687f8c26 | Create jest.config.js | jest.config.js | jest.config.js | JavaScript | 0.000035 | @@ -0,0 +1,287 @@
+module.exports = %7B%0A moduleFileExtensions: %5B%0A 'js',%0A 'json'%0A %5D,%0A transformIgnorePatterns: %5B%0A '/node_modules/'%0A %5D,%0A moduleNameMapper: %7B%0A '%5E@/(.*)$': '%3CrootDir%3E/src/$1'%0A %7D,%0A testMatch: %5B%0A '**/**/*.test.(js)%7C**/tests/unit/*.(js)'%0A %... | |
814e9b3719d1f3a36b1fafe0f191dae1d2239241 | Fix removeItem when using nested models | app/assets/javascripts/activeadmin_addons/select2.js | app/assets/javascripts/activeadmin_addons/select2.js | //= require select2
//= require_self
$(function() {
setupSelect2(document);
$(document).on('has_many_add:after', function(event, container){
setupSelect2(container);
});
function setupSelect2(container) {
var INVALID_PARENT_ID = -1;
$('.select2-tags', container).each(function(i, el) {
var ... | JavaScript | 0 | @@ -835,25 +835,30 @@
r itemId = '
-#
+%5Bid=%5C'
' + prefix +
@@ -874,16 +874,24 @@
vent.val
+ + '%5C'%5D'
;%0A
@@ -961,26 +961,24 @@
) %7B%0A
-
var selected
@@ -1044,26 +1044,24 @@
,%0A
-
itemName = m
@@ -1089,18 +1089,16 @@
'%5D%5B%5D',%0A
-
|
c28325cca03223e8b6150fe5ddc1ed93bc449c68 | Create Data folder for server to store in. | server/data/init.js | server/data/init.js | JavaScript | 0 | @@ -0,0 +1,28 @@
+%7B%0A%22TestJS%22:%22Test JS File%22%0A%7D%0A
| |
6338eef840e88a0813b61a5dbdfe5a1d48546ce3 | add gamefiles fake filesystem | server/gamefiles.js | server/gamefiles.js | JavaScript | 0.000001 | @@ -0,0 +1,2759 @@
+/*%0A * Copyright 2014, Gregg Tavares.%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions are%0A * met:%0A *%0A * * Redistributions of source code must retain the above cop... | |
d18b3ea86bf592d5e864f44a5f195f1b984a918d | Add formatMoney helper | client/helpers/money.js | client/helpers/money.js | JavaScript | 0.000001 | @@ -0,0 +1,105 @@
+Template.registerHelper('formatMoney', function(number) %7B%0A return accounting.formatMoney(number);%0A%7D);%0A
| |
00535695dbaf4019d425df3544feb2cd5632d799 | test client for testing without a browser | test-client.js | test-client.js | JavaScript | 0 | @@ -0,0 +1,445 @@
+var ws = require('ws');%0Avar readline = require('readline');%0A%0Avar rl = readline.createInterface(%7B%0A input: process.stdin,%0A output: process.stdout%0A%7D);%0A%0A%0A%0Arl.on('close', function()%7B%0A%09rl.close();%0A%09process.kill();%0A%7D)%0A%0A%0Aws = new ws('ws:127.0.0.1:8080');%0A%0Aws.... | |
3f426fe08772506f9f44078b340d13dc01c5441a | Update static/vendors/ace-builds/src-noconflict/snippets/prolog.js | static/vendors/ace-builds/src-noconflict/snippets/prolog.js | static/vendors/ace-builds/src-noconflict/snippets/prolog.js | JavaScript | 0 | @@ -0,0 +1,180 @@
+ace.define(%22ace/snippets/prolog%22,%5B%22require%22,%22exports%22,%22module%22%5D, function(require, exports, module) %7B%0A%22use strict%22;%0A%0Aexports.snippetText =undefined;%0Aexports.scope = %22prolog%22;%0A%0A%7D);%0A
| |
98f0680a93716e78ef8c29892ed954b86070ba85 | Add pending tests for BackingStore | test/store-setup/BackingStore.js | test/store-setup/BackingStore.js | JavaScript | 0 | @@ -0,0 +1,366 @@
+describe('cloverleaf.BackingStore', () =%3E %7B%0A it('should throw if constructed directly');%0A context('when extended by another class', () =%3E %7B%0A it('should throw if select method is not defined by child class');%0A it('should throw if commit method is not defined by child class');%0... | |
cc210ca719b5fd37d466f466e973515c64ea392a | Add modal tests | test/modal/Modal.test.js | test/modal/Modal.test.js | JavaScript | 0.000001 | @@ -0,0 +1,2267 @@
+import React from 'react';%0Aimport %7B mount %7D from 'enzyme';%0Aimport %7B Fade %7D from 'reactstrap';%0Aimport Modal from '../../src/modal/Modal';%0A%0Adescribe('%3CModal /%3E', () =%3E %7B%0A it('should render a the modal component', () =%3E %7B%0A const toggle = jest.fn();%0A const moda... | |
3782e20676039199c26432819b5f33ed605ddfda | add test imager config | test/imager.js | test/imager.js | JavaScript | 0 | @@ -0,0 +1,474 @@
+module.exports = %7B%0A variants: %7B%0A items: %7B%0A resize: %7B%0A mini : %22300x200%22,%0A preview: %22800x600%22%0A %7D,%0A crop: %7B%0A thumb: %22200x200%22%0A %7D%0A %7D,%0A%0A gallery: %7B%0A crop: %7B%0A thumb: %22100x100%22%0A ... | |
a14e4d890f6581101be32ac9e5db9321beac0c8e | add packet round trip test | test/packet.js | test/packet.js | JavaScript | 0 | @@ -0,0 +1,576 @@
+var dns = require('../dns'),%0A Packet = require('../lib/packet');%0A%0Aexports.roundTrip = function (test) %7B%0A var buff, pre, post;%0A%0A pre = new Packet();%0A pre.header.id = 12345;%0A pre.header.rcode = 1;%0A%0A pre.question.push(dns.Question(%7B%0A name: 'www.google.com',%0A type:... | |
8bdca658b560a23878c5daa41011ef762f7e6cf1 | test for reopening a scuttlebutt | test/reopen.js | test/reopen.js | JavaScript | 0.000001 | @@ -0,0 +1,916 @@
+require('tape')('test', function (t) %7B%0A%0Avar levelup = require('levelup')%0Avar rimraf = require('rimraf')%0Avar delay = require('delay-stream')%0Avar Model = require('scuttlebutt/model')%0A%0Afunction create(path, cb) %7B%0A rimraf(path, function (err) %7B%0A if(err) return callback(er... | |
48f8989b33e37aae5957e2d4d083af659487a45e | ADD klefki lib with crypt, decrypt and generateRandomKey functions. | src/klefki.js | src/klefki.js | JavaScript | 0 | @@ -0,0 +1,1832 @@
+/**%0A * Created by ramos on 07/10/15.%0A */%0A%0Avar klefki = %7B%0A%0A lastKey: '',%0A%0A generateRandomKey: function() %7B%0A var keychars = %22abcdefghijklmnopqrstuvwxyz%22,%0A chars = keychars.split(%22%22),%0A result = %22%22,%0A limit = chars.leng... | |
82899dd7a825ef507fa66d5e01d89457a01aa2d6 | Change assertion library used in parser tests | test/primus.parsers.test.js | test/primus.parsers.test.js | var assert = require('assert')
describe('Parsers', function () {
'use strict';
var common = require('./common')
, Primus = common.Primus
, http = require('http')
, expect = common.expect
, server
, primus;
function connectsTest(parser, done) {
var primus = new Primus(server, { parser: p... | JavaScript | 0 | @@ -1,36 +1,4 @@
-var assert = require('assert')%0A%0A
desc
@@ -876,27 +876,30 @@
-assert
+expect(data).to
.equal(
-data,
'hel
|
6a4278f92b332e72a4ec5e0a3f2a8d9fd130acec | add pubsub module | src/pubsub.js | src/pubsub.js | JavaScript | 0.000001 | @@ -0,0 +1,758 @@
+// Code from https://gist.github.com/learncodeacademy/777349747d8382bfb722%0A%0Amodule.exports = %7B%0A events: %7B%7D,%0A keys: %7B%0A exampleEvent: %22exampleEvent%22%0A %7D,%0A on: function (eventName, fn) %7B%0A this.events%5BeventName%5D = this.events%5BeventName%5D %7C%7C %5B%5D;%0A ... | |
b287207ecbabeac7b8d853d50d6749854248cca3 | Add utils file missing from last commit | tests/utils.js | tests/utils.js | JavaScript | 0 | @@ -0,0 +1,521 @@
+/* eslint no-magic-numbers: 0 */%0Aconst faction = require('..')%0Aconst sinon = require('sinon')%0A%0A// Test utility for processing an action through a fake store/middleware setup%0Aexports.handleAction = (action, creators, cb) =%3E %7B%0A const fakeStore = %7B%0A dispatch: sinon.spy(),%0... | |
83448b6108bc3c8754c325890fcd0848ab95d461 | Create subsrt.min.js | subsrt.min.js | subsrt.min.js | JavaScript | 0.000001 | @@ -0,0 +1,1863 @@
+function tosec(t)%7Breturn 3600*parseFloat(t.split(%22:%22)%5B0%5D)+60*parseFloat(t.split(%22:%22)%5B1%5D)+parseFloat(t.split(%22:%22)%5B2%5D.replace(%22,%22,%22.%22))%7Dwindow.onload=function()%7Bvar t=document.getElementsByTagName(%22video%22);%5B%5D.forEach.call(t,function(t)%7Bt.loadTrack()%7D)%... | |
dd80ec88d3afe288e5510d3e5fdad344c7ed13f2 | Add error handler call for tests. | test/mocha.js | test/mocha.js | JavaScript | 0 | @@ -0,0 +1,96 @@
+const errorHandler = require( '../src/error/errorHandler' );%0A%0AerrorHandler.setStyles().start();%0A
| |
2d770b7436234cef9fa7a856b27097bcf3807b4b | add base class | lib/helenus.js | lib/helenus.js | JavaScript | 0.000001 | @@ -0,0 +1,287 @@
+%0A/*!%0A * Cassie%0A * Copyright(c) 2011 SimpleReach %3Crbradberry@simplereach.com%3E%0A * MIT Licensed%0A */%0A%0A/**%0A * Library version.%0A */%0A%0Aexports.version = '0.0.1';%0Aexports.ConnectionPool = require('./pool');%0Aexports.Client = require('./client');%0Aexports.ColumnFamily = require('.... | |
810af368e821a4ae67972ce3d03ccbfb7d155983 | Add the POST method for /images and /reports | lib/service.js | lib/service.js | JavaScript | 0 | @@ -0,0 +1,2474 @@
+module.exports = function(options, callback) %7B%0A%0A var fs = require('fs'),%0A restify = require('restify'),%0A util = require('util');%0A%0A var serverOptions = %7B%0A name: 'queixinhas-API',%0A version: '0.0.1'%0A %7D;%0A%0A var server = restify.createServer(serverOptions);%... | |
55c7627a316d9b5f25adcd3c345e30b1bfc41c62 | add demo script | tests/demo.js | tests/demo.js | JavaScript | 0 | @@ -0,0 +1,968 @@
+var clutter = require('../build/Release/clutter');%0A%0Aclutter.useARGB(true);%0A%0Aif (clutter.init() != clutter.INIT_SUCCESS) %7B%0A%09console.log(%22Failed to initialize clutter.%22);%0A%09process.exit();%0A%7D%0A%0A/* Create a new stage */%0Avar stage = new clutter.Stage();%0Astage.setTitle('node... | |
b6c44d58d8c0c6560c3468a73a350fbb3d4d1c42 | Add stream test using ReadStream and aio_read | test/stream.js | test/stream.js | JavaScript | 0 | @@ -0,0 +1,2045 @@
+var rados = require('../build/Release/rados');%0A%0Avar ReadableStream = require('stream').Readable;%0A%0Avar CEPH_CLUSTER = 'ceph';%0Avar CEPH_ID = 'client.admin';%0Avar CEPH_CONF = '/etc/ceph/ceph.conf';%0Avar CEPH_POOL = 'rbd';%0A%0Amodule.exports = %7B%0A setUp: function(callback) %7B%0A // ... | |
ee9c67fb0cdc09cc1d70e3e9165c2e650a257833 | add header table component | templates/osaka/components/HeaderTable.js | templates/osaka/components/HeaderTable.js | JavaScript | 0 | @@ -0,0 +1,887 @@
+import React from %22react%22;%0Aimport %7B withStyle %7D from %22baseui%22;%0Aimport %7B%0A StyledTable,%0A StyledHead,%0A StyledHeadCell,%0A StyledBody,%0A StyledRow,%0A StyledCell%0A%7D from %22baseui/table%22;%0A%0Aconst smallerStyle = (%7B $theme %7D) =%3E %7B%0A return %7B%0A maxWidth... | |
688d4d75383b785ddb1be9d824c8fb39e8afc6b2 | create hacky mock so auth0 works during testing | __mocks__/auth0-lock.js | __mocks__/auth0-lock.js | JavaScript | 0.000001 | @@ -0,0 +1,183 @@
+// TODO: remove. There was an import issue, so this is a temporary hack.%0A// perhaps a later version of Auth0 will have negate the need for this file.%0Amodule.exports = function () %7B%7D%0A
| |
725a7137d40006a79d8f4b30026e436d8c323dac | add homework_6 | homeworks/bohdan.yarmosh_bodjasg1/homework_6/factory.js | homeworks/bohdan.yarmosh_bodjasg1/homework_6/factory.js | JavaScript | 0.004484 | @@ -0,0 +1,1467 @@
+console.log('Task #1' );%0Afunction freezeFactory(num) %7B%0A let count = 0;%0A return function showValue() %7B%0A if (count %25 num === 0 ) %7B%0A console.log(num);%0A %7D%0A count++%0A %7D%0A%7D%0A%0Alet frozen = freezeFactory(4);%0A%0Afor( let i = 0; i %3C... | |
490ef20d351580810d765382cf2b27bca0e1458c | add open terminal util | lib/utils/open-terminal.js | lib/utils/open-terminal.js | JavaScript | 0 | @@ -0,0 +1,1046 @@
+'use babel'%0A/* globals atom */%0A%0Aimport debug from 'debug'%0Aimport %7B exec %7D from 'child_process'%0A%0Aconst log = debug('kd:open-terminal:log')%0Aconst error = debug('kd:open-terminal:error')%0A%0Aexport default function openTerminal(%7B command %7D) %7B%0A const platform = require('os').... | |
54c351fc22e3a750a4395f46f786fcd2c25dd736 | Fix error message grammar | addons/FluxibleMixin.js | addons/FluxibleMixin.js | /**
* Copyright 2014, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
'use strict';
/**
* React mixin for staticly declaring and add/remove-ing listeners for Store events.
* @class FluxibleMixin
* @example
* // Register listener default handler functi... | JavaScript | 0.99997 | @@ -3648,12 +3648,8 @@
ers
-are
actu
|
127074c4f67873881acdbe6008ba76a4f9f01729 | Remove some unnecessary DOM manipulations | src/loader/loadingscreen.js | src/loader/loadingscreen.js | /*
* MelonJS Game Engine
* @copyright (C) 2011 - 2014 Olivier Biot, Jason Oster, Aaron McLeod
* http://www.melonjs.org
*/
(function () {
// a basic progress bar object
var ProgressBar = me.Renderable.extend({
init: function (v, w, h) {
this._super(me.Renderable, "init", [v.x, v.y, w, h]... | JavaScript | 0.000008 | @@ -1841,28 +1841,16 @@
anvas);%0A
-
%0A
@@ -5202,116 +5202,8 @@
e);%0A
- this.iconCanvas.style.display = %22none%22;%0A document.body.appendChild(this.iconCanvas);%0A
@@ -5888,65 +5888,8 @@
%7D
-%0A%0A document.body.removeChild(this.iconCanvas);
%0A
|
2bec8f3a2e21493ee83ce42fcc24dbb5df51ec9b | add me works test | test/services/me/me-works-service.spec.js | test/services/me/me-works-service.spec.js | JavaScript | 0 | @@ -0,0 +1,594 @@
+const MeWorksService%0A = require('../../../lib/services/me/me-works-service').MeWorksService;%0Aconst HttpClient = require('../../../lib/http-client').HttpClient;%0A%0Adescribe('me works service', () =%3E %7B%0A%0A const Work = new MeWorksService( new HttpClient() );%0A%0A it('has correct m... | |
361b0aad5ce1fb53ebc1558540f5076f5ec8dbb0 | Add test challenge list test | spec/confirm-challenge-list-spec.js | spec/confirm-challenge-list-spec.js | JavaScript | 0.000001 | @@ -0,0 +1,1901 @@
+/* eslint-disable no-undef */%0Aconst controllers = require('../controllers');%0A// const db = require('../utils').db;%0Aconst fixtures = require('../spec/fixtures');%0A%0Aconst Challenges = new controllers.Challenges();%0A// const Performances = new controllers.Performances();%0A// const Results = ... | |
81ae24078b6f3df5e92fd3ed5c882b79636b859b | Add FAB actionCreators | desktop/reactified/client/src/FAB/actionsCreators.js | desktop/reactified/client/src/FAB/actionsCreators.js | JavaScript | 0 | @@ -0,0 +1,170 @@
+const addTask = (state, task) =%3E (%7B%0A type: 'ADD_TASK',%0A ...task%0A%7D);%0Aconst addIdea = (state, idea) =%3E (%7B%0A type: 'ADD_IDEA',%0A ...idea%0A%7D);%0A%0Aexport %7B addTask, addIdea %7D;%0A
| |
fbc99d240ff8aeaac8b26675b31232f375633415 | add kernel test | IPython/html/tests/casperjs/test_cases/kerneljs_test.js | IPython/html/tests/casperjs/test_cases/kerneljs_test.js | JavaScript | 0.000001 | @@ -0,0 +1,847 @@
+%0A//%0A// Miscellaneous javascript tests%0A//%0Acasper.notebook_test(function () %7B%0A this.evaluate(function () %7B%0A IPython.notebook.kernel.kernel_info(%0A function(msg)%7B%0A IPyton._kernel_info_response = msg;%0A %7D)%0A %7D);%0A%0A thi... | |
eb24559fd611dbfa6b125938809a7c016a37f46a | Create a spec for TimePaneCtrler | ut/tabPanes_TimePaneSpec.js | ut/tabPanes_TimePaneSpec.js | JavaScript | 0 | @@ -0,0 +1,1266 @@
+describe('tab-panes TimePaneCtrler', function() %7B%0A%09var $rootScope;%0A%09var $controller;%0A%09beforeEach(module('popupApp'));%0A%09beforeEach(inject(function(_$rootScope_, _$controller_) %7B%0A%09%09$rootScope = _$rootScope_;%0A%09%09$controller = _$controller_;%0A%09%7D));%0A%0A%09function St... | |
73add52e07b189413fc4f0f23b0526f1bff6c35a | fix koraro rdt results | custom/_legacy/mvp_indicators/mvp_child_health_indicators/views/under5_child_health/map.js | custom/_legacy/mvp_indicators/mvp_child_health_indicators/views/under5_child_health/map.js | function(doc) {
// !code util/mvp.js
// !code util/danger_signs.js
if(isChildVisitForm(doc)) {
var indicators = get_indicators(doc),
meta = doc.form.meta;
var indicator_keys = [];
if (indicators.child_dob && indicators.child_dob.value) {
// birthdate found, is... | JavaScript | 0 | @@ -970,84 +970,454 @@
== '
-negative'),%0A rdt_test_positive = (rdt_result === 'positiv
+positive_falciparum' %7C%7C rdt_result === 'positive_vivax' %7C%7C%0A rdt_result === 'positive_mixed' %7C%7C rdt_result === 'indeterminate' %7C%7C rdt_result === 'negativ... |
44a707f826de51a438a5e47e1cabbdc26f5d5c30 | Create webwork.min.js | webwork.min.js | webwork.min.js | JavaScript | 0.000004 | @@ -0,0 +1,609 @@
+function webwork(a)%7Bwindow.URL=window.URL%7C%7Cwindow.webkitURL;a=%22onmessage=function(event)%7BpostMessage(%22+a+%22(event.data));%7D%22;var b;try%7Bb=new Blob(%5Ba%5D,%7Btype:%22application/javascript%22%7D)%7Dcatch(f)%7Bwindow.BlobBuilder=window.BlobBuilder%7C%7Cwindow.WebKitBlobBuilder%7C%7Cwi... | |
4106f23697720fecd6077709617fd9ce43e3c474 | Switch from codeception to testcafe - Add page-model with custom functions | frontend/tests/acceptance/page-model.js | frontend/tests/acceptance/page-model.js | JavaScript | 0 | @@ -0,0 +1,488 @@
+import %7BSelector, t%7D from 'testcafe';%0A%0Aexport default class Page %7B%0A constructor() %7B%0A %7D%0A%0A async login() %7B%0A await t%0A .click(Selector('.navLogin'))%0A .typeText('#email', 'admin@example.com')%0A .typeText('#password', 'passwd')%0A ... | |
0cb25d6e81615bfab2bfe03f34f8f538f1bb62e9 | add results.js | public/scripts/results.js | public/scripts/results.js | JavaScript | 0.000001 | @@ -0,0 +1,2460 @@
+var converter = new Showdown.converter();%0A%0Avar Comment = React.createClass(%7B%0A render: function() %7B%0A var children = this.props.children;%0A return (%0A %3Cdiv className=%22comment%22%3E%0A %3Ch2 className=%22commentAuthor%22%3E%0A ... | |
1b2a2de06e98c609ed6832b9e85b1961c913c0d6 | Add library for handling morse code. This will be tapped when we want to send a pattern from the "not-yet-created" lights module. | morse-codec.js | morse-codec.js | JavaScript | 0 | @@ -0,0 +1,2877 @@
+var morseCodec = function(options) %7B%0A if (typeof options === 'undefined') %7B%0A options = %7B%7D;%0A %7D%0A%0A this.versions = %7B%0A 'ITC': 'itc'%0A %7D;%0A%0A var ditDuration = options.ditDuration %7C%7C 100;%0A var dahDuration = ditDuration * 3;%0A var char... | |
fee2a08eda2b18fefbae47b8f80875133dc7eac7 | Update number-format.js | src/locale/number-format.js | src/locale/number-format.js | import "../arrays/map";
import "../core/identity";
import "../format/formatPrefix";
import "../format/precision";
import "../format/round";
function d3_locale_numberFormat(locale) {
var locale_decimal = locale.decimal,
locale_thousands = locale.thousands,
locale_grouping = locale.grouping,
locale_c... | JavaScript | 0 | @@ -2417,16 +2417,95 @@
value) %7B
+%0A // Local variable to prevent side effect%0A var localSuffix = suffix;
%0A%0A
@@ -2962,33 +2962,38 @@
value);%0A
-s
+localS
uffix = unit.sym
@@ -2995,16 +2995,30 @@
t.symbol
+ + localSuffix
;%0A
@@ -4268,17 +4268,22 @@
lue)) +
-s
+localS
uffi... |
68841c450971884caea722636c5a97762ba9599a | add tests with stream-spec and stream-tester | test/index.js | test/index.js | JavaScript | 0 | @@ -0,0 +1,417 @@
+var spec = require('stream-spec')%0Avar tester = require('stream-tester')%0Avar ps = require('..')()%0A%0Aspec(ps)%0A .through(%7Bstrict: false%7D)%0A .validateOnExit()%0A%0Avar master = tester.createConsistent%0A%0Atester.createRandomStream(1000) //1k random numbers%0A .pipe(master = tester.c... | |
0431abaa3f2599db059f1957c1c4fea2cb36bbfe | add User routes tests | app/user/routes.test.js | app/user/routes.test.js | JavaScript | 0.000001 | @@ -0,0 +1,1871 @@
+'use strict';%0A%0Avar expect = require('chai').expect;%0Avar request = require('supertest');%0A%0Avar app = require('../../app/');%0A%0Adescribe('User Routes', function () %7B%0A describe('GET /logout', function () %7B%0A it('should redirect to /', function (done) %7B%0A request(app)%0A ... | |
06a1f9ef55bc08e0f75223d079cfcd9caf7e8f57 | test utils.js | test/utils.js | test/utils.js | JavaScript | 0.000002 | @@ -0,0 +1,1167 @@
+'use strict';%0A%0Avar _ = require('lodash');%0Avar chai = require('chai');%0Avar sinon = require('sinon');%0Avar should = chai.should();%0Avar Utils = require('../lib/utils');%0A%0Adescribe('Utils', function() %7B%0A describe('#checkRequired', function() %7B%0A it('should check required fields'... | |
ad40a8a6eb20d07b6701680847d5d895415ea38f | Add binary with v1 code. | bin/npm-yarn-compare.js | bin/npm-yarn-compare.js | JavaScript | 0 | @@ -0,0 +1,1794 @@
+#!/usr/bin/env node%0A%0Aprocess.title = 'npm-yarn-compare';%0A%0Alet child_process = require('child_process'),%0A prettyMs = require('pretty-ms'),%0A clc = require('cli-color');%0A%0Alet packageName = process.argv%5B2%5D;%0A%0Aconsole.log('%F0%9F%9B%80 Checking if yarn is installed...');%0Ale... | |
d5b99d572f4499872c6311e9f641231069fc4c50 | Add new logger module. | src/debug/logger.js | src/debug/logger.js | JavaScript | 0 | @@ -0,0 +1,763 @@
+let log;%0Alet warn;%0Alet addBadge;%0A%0Aif (DEBUG) %7B%0A%09addBadge = (args, name, background) =%3E %7B%0A%09%09// Color console badge%0A%09%09// Based on https://github.com/jbail/lumberjack%0A%09%09if (navigator.userAgent.indexOf('Chrome') !== -1 %7C%7C navigator.userAgent.indexOf('Firefox') !== ... | |
ab77f053728ded2b7a07dbb57e59c1212f75ee89 | add e2e test for home page | app/templates/client/source/test/e2e/specs/home.spec.js | app/templates/client/source/test/e2e/specs/home.spec.js | JavaScript | 0 | @@ -0,0 +1,1517 @@
+/* global $ */%0A'use strict';%0A%0A// page object%0Avar HomePage = function () %7B%0A var self = this;%0A%0A self.url = '';%0A self.ele = _getAllElements();%0A self.load = load;%0A%0A ////////%0A%0A function _getAllElements () %7B%0A var header = browser._.getHeader();%0A ... | |
6d119b04dd90c2ad8cfe8e35d9de133c5b7d44e9 | Add fkey relation | migrations/20140223040352-add-project-id-to-time-entries.js | migrations/20140223040352-add-project-id-to-time-entries.js | JavaScript | 0.000001 | @@ -0,0 +1,380 @@
+var dbm = require('db-migrate');%0Avar type = dbm.dataType;%0A%0Avar dbname = %22time_entries%22%0A%0Aexports.up = function(db, callback) %7B%0A db.runSql(%0A 'alter table ' + dbname + ' add column %22projectId%22 integer references projects(id)',%0A callback%0A )%0A%7D;%0A%0Aexports.down = f... | |
377d614cbc78d09347abe4caa3f7fb604cadb115 | random task | src/tasks/random.js | src/tasks/random.js | JavaScript | 0.999989 | @@ -0,0 +1,177 @@
+module.exports = function(define) %7B%0A return function build(context) %7B%0A return function exec(done) %7B%0A done(null, Math.random().toString());%0A %7D%0A %7D%0A%7D
| |
6f6f81bb1d413706f4ff8d2d9b9ec4914236671b | Add helpers | config/helper.js | config/helper.js | JavaScript | 0.000001 | @@ -0,0 +1,251 @@
+'use strict';%0A%0Aexports.getUrlId = function(url) %7B%0A%09if (url == undefined) return '';%0A%09%0A%09return url.replace(/(%5B%5Ea-z0-9%5D)%7C(%5Ehttp)/gi, '');%0A%7D%0A%0Aexports.isUrlId = function(id) %7B%0A%09var checkUrlId = new RegExp(/%5E(%5Ba-z0-9%5D+)$/gi);%0A%09return checkUrlId.test(id);... | |
dbde9b703fb3b3915016827c65a93ce1d2bf254f | Add R square evaluation measure to evaluation.js. | src/qminer/js/evaluation.js | src/qminer/js/evaluation.js | /**
* QMiner - Open Source Analytics Platform
*
* Copyright (C) 2014 Jozef Stefan Institute
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is dis... | JavaScript | 0 | @@ -3914,16 +3914,976 @@
or);%0A%7D%0A%0A
+%0Aexports.newRSquare = function () %7B%0A function rSquare() %7B%0A this.sst = 0;%0A this.sse = 0;%0A this.mean = 0;%0A this.count = 0;%0A this.sumReal = 0;%0A this.sumReal2 = 0;%0A this.r2 = -1;%0A // update functio... |
4891d09f6754607b7b41551ea2a421588552db69 | Structure of the operators if else | javascript/control_structure/control.js | javascript/control_structure/control.js | JavaScript | 0.000184 | @@ -0,0 +1,562 @@
+// operator if..elseif..else%0A/*%0AJavaScript has a similar set of control structures to other languages in the C family. %0AConditional statements are supported by if and else; you can chain them together if you like:%0A*/%0A%0Avar name = %22Nick%22;%0Aif ( name == %22Mark%22)%7B%0A name+= %22!%... | |
be418835d8abe453e843b4c0ee1b96c7a95522c6 | Add interchange.js (actually). | js/foundation/foundation.interchange.js | js/foundation/foundation.interchange.js | JavaScript | 0 | @@ -0,0 +1,1648 @@
+/*jslint unparam: true, browser: true, indent: 2 */%0A%0A;(function ($, window, document, undefined) %7B%0A 'use strict';%0A%0A Foundation.libs.interchange = %7B%0A name : 'interchange',%0A%0A version : '4.2.0',%0A%0A settings : %7B%0A %7D,%0A%0A init : function (scope, method, opti... | |
ad7aa8492c608268c47bbd8fc78077a5e373647d | Append NuGet Pack task | tasks/nuget-pack.js | tasks/nuget-pack.js | JavaScript | 0.000001 | @@ -0,0 +1,2271 @@
+%EF%BB%BF/*%0A * grunt-nuget%0A * https://github.com/spatools/grunt-nuget%0A * Copyright (c) 2013 SPA Tools%0A * Code below is licensed under MIT License%0A *%0A * Permission is hereby granted, free of charge, to any person %0A * obtaining a copy of this software and associated documentation %0A * f... | |
3da8d8709426b4b57bc5a4d0fa4eefcd01736be4 | add new linked list file | Algorithms/JS/linkedList/intersectionOfLinkedList.js | Algorithms/JS/linkedList/intersectionOfLinkedList.js | JavaScript | 0 | @@ -0,0 +1,28 @@
+intersectionOfLinkedList.js%0A
| |
a63bcf23084abae84f93f28ce3cbf689fb3adad2 | add wallaby config (#5) | wallaby.js | wallaby.js | JavaScript | 0 | @@ -0,0 +1,395 @@
+'use strict';%0A%0Amodule.exports = function (wallaby) %7B%0A return %7B%0A env: %7B%0A type: 'node'%0A %7D,%0A files: %5B%0A 'src/**/*.%7Bjs,jsx,ts,tsx%7D',%0A '!**/__tests__/**/*.test.%7Bts,tsx%7D',%0A 'tsconfig.json',%0A 'node_modules/ts-config/tsconfig.json'%0A ... | |
d75bad8de3b5a54aeaef0524ea3a69a623c16fae | Add Ti.Platform.DisplayCaps based on tizen systeminfo API | titanium/Ti/Platform/DisplayCaps.js | titanium/Ti/Platform/DisplayCaps.js | JavaScript | 0 | @@ -0,0 +1,1286 @@
+define(%5B'Ti/_', 'Ti/_/Evented', 'Ti/_/lang'%5D, function(_, Evented, lang) %7B%0A%0A%09function initDisplayCaps() %7B%0A%09%09tizen.systeminfo.getPropertyValue('DISPLAY', onSuccessDisplayCallback, onErrorCallback);%0A%09%09tizen.systeminfo.addPropertyValueChangeListener('DISPLAY', onSuccessDisplay... | |
1552a364c23e668e1fafd7435acd75dec811e368 | fix another encoding issue with the cube name | js/saiku/models/Member.js | js/saiku/models/Member.js | /*
* Member.js
*
* Copyright (c) 2011, OSBI Ltd. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) a... | JavaScript | 0.000014 | @@ -1234,19 +1234,19 @@
scover/%22
+)
+
-
%0A
@@ -1258,24 +1258,34 @@
this.cube +
+encodeURI(
%22/dimensions
|
34280c7360244fea4918c829cf4045919bfc9498 | Add loader for Arduino firmware | www/js/init.js | www/js/init.js | JavaScript | 0 | @@ -0,0 +1,1251 @@
+// Insert script into the DOM%0Afunction insertScript(src) %7B%0A var a=document.createElement(%22script%22);%0A a.src=src;%0A document.head.appendChild(a);%0A%7D%0A%0AinsertScript(%22https://raw.githubusercontent.com/salbahra/Sprinklers/master/www/js/jquery.min.js%22);%0AinsertScript(%22ht... | |
34abe9cb7ed4348b24e041e2058d1168b283ae3b | Fix a failing functional test. | tests/functional/sign_in.js | tests/functional/sign_in.js | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
define([
'intern',
'intern!object',
'intern/chai!assert',
'require',
'intern/node_modules/dojo/node!xmlh... | JavaScript | 0.999997 | @@ -2782,50 +2782,53 @@
.
-findByClassName
+then(FunctionalHelpers.visibleByQSA
('
+.
error')
-%0A .end(
)%0A%0A
|
b65faea900f7bac22a19e07bbca06849d60923b2 | Rename number.js to cdf.js | lib/node_modules/@stdlib/math/base/dist/gamma/cdf/lib/cdf.js | lib/node_modules/@stdlib/math/base/dist/gamma/cdf/lib/cdf.js | JavaScript | 0.999983 | @@ -0,0 +1,565 @@
+'use strict';%0A%0A// MODULES //%0A%0Avar gammainc = require( 'compute-gammainc' );%0A%0A%0A// CDF //%0A%0A/**%0A%0A*%09Evaluates the cumulative distribution function (CDF) for a Gamma distribution with shape parameter %60alpha%60 and rate parameter %60beta%60 at a value %60x%60.%0A*%0A* @param %7BNu... | |
215a40fca4f91d361d5e097f9903adddb5fc6b6b | Update static/vendors/ace-builds/src-noconflict/ext-error_marker.js | static/vendors/ace-builds/src-noconflict/ext-error_marker.js | static/vendors/ace-builds/src-noconflict/ext-error_marker.js | JavaScript | 0 | @@ -0,0 +1,141 @@
+%0A;%0A (function() %7B%0A ace.require(%5B%22ace/ext/error_marker%22%5D, function() %7B%7D);%0A %7D)();%0A
| |
2ed0b2e5f55d044cedd350e14f38f96f7d1b25a3 | Tests for isTrue | tests/isTrue.js | tests/isTrue.js | JavaScript | 0.999987 | @@ -0,0 +1,1236 @@
+describe('hm.lib.predicate.Predicate', function () %7B%0A var _isTrue;%0A%0A beforeEach(module('hm.lib.predicate'));%0A beforeEach(inject(%5B'hm.lib.predicate.Predicate', function (predicate) %7B%0A _isTrue = predicate.isTrue;%0A %7D%5D));%0A%0A describe('isTrue', function () %7B%0A it('s... | |
00f7c15a27f444e33e765903118fdea046969043 | verify array's length | zhengkun.js | zhengkun.js | JavaScript | 0.000285 | @@ -0,0 +1,177 @@
+/*%0A* 2017.9.14 zhengkun%0A*/%0A%0Avar arr =%5B1,2,3%5D;%0Aconsole.log(arr.length);%0A%0Aarr.length = 6%0Aconsole.log(arr);%0A%0Aarr.length = 2%0Aconsole.log(arr);%0A%0Aarr.length = 5%0Aconsole.log(arr);%0A
| |
202bb31bd304b8dd96b25ad0b8e4109265d2bef4 | Fix REST /me regression (#10833) | packages/rocketchat-api/server/helpers/getUserInfo.js | packages/rocketchat-api/server/helpers/getUserInfo.js | const getInfoFromUserObject = (user) => {
const {
_id,
name,
emails,
status,
statusConnection,
username,
utcOffset,
active,
language,
roles,
settings
} = user;
return {
_id,
name,
emails,
status,
statusConnection,
username,
utcOffset,
active,
language,
roles,
settings
};
... | JavaScript | 0 | @@ -444,17 +444,19 @@
%0A%09const
-v
+isV
erifiedE
@@ -461,16 +461,87 @@
dEmail =
+ () =%3E %7B%0A%09%09if (me && me.emails && Array.isArray(me.emails)) %7B%0A%09%09%09return
me.emai
@@ -576,16 +576,40 @@
ified);%0A
+%09%09%7D%0A%09%09return false;%0A%09%7D;%0A
%09const g
@@ -1109,16 +1109,57 @@
%7D);%0A%09%7D... |
699a80458b1d7d3617b9d505ccd73fce99bca01f | Add help text for trading types | src/trade-type-picker/helpText.js | src/trade-type-picker/helpText.js | JavaScript | 0.000001 | @@ -0,0 +1,2293 @@
+export default (%7B%0A CALL: 'You win the payout if the exit spot is strictly higher than the entry spot.',%0A PUT: 'You win the payout if the exit spot is strictly lower than the entry spot.',%0A CALL2: 'You win the payout if the exit spot is strictly higher than the barrier.',%0A PUT2:... | |
a14c28be0098bcc930f7e7bd55cbfaa1ffcf29b5 | Add test require config. | test/js/js-test-require-config.js | test/js/js-test-require-config.js | JavaScript | 0 | @@ -0,0 +1,1622 @@
+define(function() %7B%0A require.config(%7B%0A baseUrl: '.',%0A paths: %7B%0A // lib%0A backbone: 'bower_components/backbone/backbone',%0A bootstrap: 'bower_components/bootstrap/js/bootstrap',%0A 'jasmine-jquery': 'bower_components/jasmine... | |
659d0fc0dbcba4a4da6afaa18f13bd8d664369f0 | can create Manager | test/manager.js | test/manager.js | JavaScript | 0.999633 | @@ -0,0 +1,207 @@
+import %7B assert %7D from %22chai%22%0Aimport %7B Manager %7D from %22../src/manager.js%22%0A%0Adescribe(%22Manager%22, () =%3E %7B%0A%0A%09it('can create', () =%3E %7B%0A%09%09var manager = new Manager;%0A%09%09assert.instanceOf(manager, Manager);%0A%09%7D);%0A%0A%7D)%0A
| |
009e91723f6161dbe7bb08a2e607b2c4271bde74 | Test for time conversion fix | test/test431.js | test/test431.js | JavaScript | 0 | @@ -0,0 +1,536 @@
+if(typeof exports === 'object') %7B%0A%09var assert = require(%22assert%22);%0A%09var alasql = require('..');%0A%7D%0Adescribe('Test 431 error in 8 and 108 convert formats', function() %7B%0A%0A it('1. Should format time correctly', function(done) %7B%0A %09var date = new Date(2016, 0, 1, 0, 0, 0);... | |
7b4796e7cc7ccf0e38e0801293c26dc5fd29a8bd | Update static/vendors/ace-builds/src-noconflict/snippets/scad.js | static/vendors/ace-builds/src-noconflict/snippets/scad.js | static/vendors/ace-builds/src-noconflict/snippets/scad.js | JavaScript | 0 | @@ -0,0 +1,176 @@
+ace.define(%22ace/snippets/scad%22,%5B%22require%22,%22exports%22,%22module%22%5D, function(require, exports, module) %7B%0A%22use strict%22;%0A%0Aexports.snippetText =undefined;%0Aexports.scope = %22scad%22;%0A%0A%7D);%0A
| |
3cf41f4c2e8fec2da6d95151d9005b0e9f51a837 | Update static/vendors/datatables-plugins/api/fnGetColumnIndex.js | static/vendors/datatables-plugins/api/fnGetColumnIndex.js | static/vendors/datatables-plugins/api/fnGetColumnIndex.js | JavaScript | 0 | @@ -0,0 +1,1010 @@
+/**%0A * Maintenance of web-sites can often cause unexpected headaches, particularly%0A * if the hardcoded index of an array (the columns in a DataTables instance)%0A * needs to change due to an added or removed column. This plug-in function%0A * will match a given string to the title of a column in... | |
bf196f8a636126f8d7452bc55af961c97dcb9336 | Create googleanalytics.js | js/googleanalytics.js | js/googleanalytics.js | JavaScript | 0.000003 | @@ -0,0 +1,395 @@
+ (function(i,s,o,g,r,a,m)%7Bi%5B'GoogleAnalyticsObject'%5D=r;i%5Br%5D=i%5Br%5D%7C%7Cfunction()%7B%0A (i%5Br%5D.q=i%5Br%5D.q%7C%7C%5B%5D).push(arguments)%7D,i%5Br%5D.l=1*new Date();a=s.createElement(o),%0A m=s.getElementsByTagName(o)%5B0%5D;a.async=1;a.src=g;m.parentNode.insertBefore(a,m)%0A %7D)(... | |
f050adb8a9f1003730c76c586b1104461bd8a059 | add sum iterative functions | js/sum_array.js | js/sum_array.js | JavaScript | 0.00004 | @@ -0,0 +1,812 @@
+var result = 1;%0Afor (var i = 0; i %3C 5; i++) %7B%0A console.log(i + %22 + %22 + result + %22 = %22 + (i + result));%0A result += i;%0A%7D%0Aconsole.log(%22-----%22);%0Aconsole.log(%22The result is %22 + result);%0Aconsole.log(%22---------------%22);%0A%0Avar numbers = %5B1, 2, 3, 4%5D;%0Avar cou... | |
e6d9a4458f77f60aa99e42e78cd3eb1de713d59d | Create xdkey7-50.js | js/xdkey7-50.js | js/xdkey7-50.js | JavaScript | 0.000016 | @@ -0,0 +1,456 @@
+var key_data = new Array('%E9%94%AE%E4%BD%8D%E8%AF%BE%E7%A8%8B%E5%9B%9B%EF%BC%9Ag h',%0A%22fgfg%22,%0A%22fgfg%22,%0A%22fgjh%22,%0A%22fgjh%22,%0A%22jhjh%22,%0A%22jhjh%22,%0A%22igs%22,%0A%22figs%22,%0A%22figs%22,%0A%22figs%22,%0A%22hair%22,%0A%22hair%22,%0A%22fig%22,%0A%22fig%22,%0A%22fig%22,%0A%22hair... | |
61e14dd2282d18a151687fc0498dd1dd4f8c5bb3 | Add unit tests for the player module | test/player.js | test/player.js | JavaScript | 0 | @@ -0,0 +1,1952 @@
+import test from 'ava';%0Aimport Player from '../src/player'%0A%0Atest('#getDirection works', t =%3E %7B%0A const player = new Player(%7B%7D, %7Bdirection: 0%7D);%0A t.is(player.getDirection(), 0);%0A%7D);%0A%0Atest('#setDirection works', t =%3E %7B%0A const player = new Player(%7B%7D, %7Bdirecti... | |
f8d34c9c3b5e3f322ead929b4032d0e5c533e2cd | Test for duplicate name added. | test/test10.js | test/test10.js | JavaScript | 0 | @@ -0,0 +1,1620 @@
+// Test suite for woad.%0A// Run from 'test' subfolder%0A'use strict';%0Aconst lg = require('../woad.js');%0Aconst test = require('unit.js');%0Aconst fs = require('fs');%0A%0Afunction testFunc() %7B%0A%09console.log('test10 started - testing duplicate name.');%0A%09const fname1 = './test10f1.txt';%0... | |
7c67f6288b10d81e3ccdf38de3d9a7b81339f24a | Create dynaTemplates.js | dynaTemplates.js | dynaTemplates.js | JavaScript | 0 | @@ -0,0 +1,459 @@
+createDynaTemplate= function (tmplt,clss,dvid)%0A/* tmplt = Template Name%0A clss = Class used by the template%0A dvid = ID asigned to the created DIV%0A*/%0A var div = document.createElement(%22DIV%22);%0A div.className = clss;%0A div.id = dvid;%0A document.body.appendChild(div);%0A ... | |
1dbe38f858d943976953e4bbcc75790d683631dd | Add (disabled) mock updates | pkg/packagekit/mock-updates.es6 | pkg/packagekit/mock-updates.es6 | JavaScript | 0 | @@ -0,0 +1,2032 @@
+/*jshint esversion: 6 */%0A%0A/*%0A * Mock %22available updates%22 entries for interactively testing layout changes with large updates%0A * To use it, import it in updates.jsx:%0A *%0A * import %7B injectMockUpdates %7D from %22./mock-updates.es6%22;%0A *%0A * and call it in loadUpdates()'s Finis... | |
295485b7c2800ed437fefab0bfe857d54d2b28d2 | isolate funzioni per statistiche | code/public/js/statistics.js | code/public/js/statistics.js | JavaScript | 0.000001 | @@ -0,0 +1,1994 @@
+function runSummaryStats() %7B%0A var start = $('#stats-summary-form input%5Bname=startdate%5D').val();%0A var end = $('#stats-summary-form input%5Bname=enddate%5D').val();%0A%0A $.getJSON('/stats/summary', %7B%0A start: start,%0A end: end%0A %7D, function(data) %7B%0A ... | |
5ffd4cce97acd07a25dd00ba15401f0ca6ed25f3 | add test support file | test/espower-babel-loader.js | test/espower-babel-loader.js | JavaScript | 0 | @@ -0,0 +1,634 @@
+require('espower-babel')(%7B%0A cwd: process.cwd(),%0A pattern: '.tmp/test/**/*-test.js',%0A espowerOptions: %7B%0A patterns: %5B%0A 'assert(value, %5Bmessage%5D)',%0A 'assert.ok(value, %5Bmessage%5D)',%0A 'assert.equal(actual, expected, %5Bmessage%5D)',%0A 'assert.notEqual(... | |
974c1f4da84975b7c7004098aba3a51b15cf3a45 | add test | test/unit/specs/tag.spec.js | test/unit/specs/tag.spec.js | JavaScript | 0.000001 | @@ -0,0 +1,1460 @@
+import %7B createVue %7D from '../util';%0A%0Adescribe('Tag', () =%3E %7B%0A it('create', () =%3E %7B%0A const vm = createVue(%7B%0A template: %60%0A %3Cel-tag%3E%3C/el-tag%3E%0A %60%0A %7D, true);%0A expect(vm.$el.classList.contains('el-tag')).to.be.true;%0A expect(vm.$e... | |
e26dff44f73f62143d82c449c3cc8185f805d8c2 | add one basic test for gconvertvalidator relates to #475 | test/server/enrichment-map/gene-validator/validate-test.js | test/server/enrichment-map/gene-validator/validate-test.js | JavaScript | 0 | @@ -0,0 +1,458 @@
+const chai = require('chai');%0Aconst expect = chai.expect;%0Aconst %7BvalidatorGconvert%7D = require('../../../../src/server/enrichment-map/gene-validator/index');%0A%0Adescribe('test validatorGconvert', function() %7B%0A it('it should return an object', function() %7B%0A return (validatorGconve... | |
a9c10b12e6c06cd0219fe4edf41771b7f5921917 | Test add5 | test/add5.js | test/add5.js | JavaScript | 0.000002 | @@ -0,0 +1,276 @@
+/* jshint node: true, asi: true, laxcomma: true, esversion: 6 */%0A'use strict'%0A%0Aconst assert = require('assert')%0Aconst addingMachine = require('../index.js')%0A%0Aassert.doesNotThrow(%0A () =%3E %7B%0A addingMachine.add5(1, 3)%0A %7D%0A)%0A%0Aassert.equals(6, addingMachine.add5(1,... | |
817e7e52a4be7b9d7cba5a265c80cff851086896 | Create config.js | locale/config.js | locale/config.js | JavaScript | 0.000003 | @@ -0,0 +1,2232 @@
+//! moment.js locale configuration%0A//! locale : norwegian bokm%C3%A5l (nb)%0A//! authors : Espen Hovlandsdal : https://github.com/rexxars%0A//! Sigurd Gartmann : https://github.com/sigurdga%0A%0A;(function (global, factory) %7B%0A typeof exports === 'object' && typeof module !== 'undef... | |
b2feb831380f13e976dbe87f6b3df7c832f2742e | Add unit tests for exports | tests/unit/pusher/exports.js | tests/unit/pusher/exports.js | JavaScript | 0 | @@ -0,0 +1,528 @@
+var expect = require(%22expect.js%22);%0A%0Avar errors = require(%22../../../lib/errors%22);%0Avar Pusher = require(%22../../../lib/pusher%22);%0Avar Token = require(%22../../../lib/token%22);%0A%0Adescribe(%22Pusher%22, function() %7B%0A it(%22should export %60Token%60%22, function() %7B%0A expe... | |
8f298847966709c6e3fb717df3a32943306b4e75 | Test tokens | test/test.js | test/test.js | JavaScript | 0.000001 | @@ -0,0 +1,544 @@
+var assert = require('assert');%0Angram = require('..');%0A%0Adescribe('Ngrams', function() %7B%0A%09%09it ('should be tokenized', function() %7B%0A%09%09%09console.log(%22L%C3%AA v%C4%83n Duy%E1%BB%87t. Duy%E1%BB%87t Developer%22.tokens())%0A%09%09%09assert.equal(5, %22L%C3%AA v%C4%83n Duy%E1%BB%87t... | |
35ec960746e81390a0310ddff44d7c3ddd548dff | Create minsoo.js | minsoo/minsoo.js | minsoo/minsoo.js | JavaScript | 0.000001 | @@ -0,0 +1,242 @@
+var canvas = document.getElementById(%22canvas%22);%0Avar dc = canvas.getContext(%222d%22);%0A%0Avar count = document.getElementById(%22count%22);%0A%0Avar on_click = function()%7B%0A console.log(%22A%22 + count.value );%0A%7D%0A%0AsetInterval( function()%7B%0A dc.fill();%0A%7D, 33 );%0A
| |
aceb70d4d80bfbe8fdb3e80d862100b724b7f810 | Create completedRating-review.server.model.js | Resources/Assets/Models/completedRating-review.server.model.js | Resources/Assets/Models/completedRating-review.server.model.js | JavaScript | 0.000001 | @@ -0,0 +1 @@
+%0A
| |
4792a884f76c8845c9e8a168ee0079305eebe79c | add ugly test case | test/test.js | test/test.js | JavaScript | 0.000263 | @@ -0,0 +1,903 @@
+/**%0A * XadillaX created at 2015-12-25 16:58:22 With %E2%99%A5%0A *%0A * Copyright (c) 2015 Souche.com, all rights%0A * reserved.%0A */%0A%22use strict%22;%0A%0Avar express = require(%22express%22);%0Avar session = require(%22express-session%22);%0Avar cookieParser = require(%22cookie-parser%22);%0A... | |
570dc71308fa31181d5ce20ce40bc6b1f6fbee8d | Add some file-specific assertions | test/util.js | test/util.js | JavaScript | 0.000004 | @@ -0,0 +1,449 @@
+'use strict';%0A%0A/* global require */%0A%0Aconst Assert = require('assertly');%0A%0AAssert.setup();%0AAssert.register(%7B%0A absolute (file) %7B%0A // expect(f).to.be.absolute();%0A return file && file.isAbsolute();%0A %7D,%0A%0A path (file, expected) %7B%0A // expect(... | |
58633a5bcac72bebbd6355b76f574280308d3b1c | add bad request to http_utils | lib/http_utils.js | lib/http_utils.js | var _ = require('lodash');
module.exports = {
success: success,
error: error
};
/**
* Send a success response
*
* @param res - (required) response object
* @param properties - (optional) additional objects to attach to the response body
* @param statusCode - (optional) statusCode to respond with, default for... | JavaScript | 0 | @@ -74,16 +74,28 @@
r: error
+,%0A bad: bad
%0A%7D;%0A%0A/**
@@ -527,16 +527,25 @@
Send an
+internal
error re
@@ -543,32 +543,35 @@
error response%0A
+ *%0A
* @param res -
@@ -601,63 +601,8 @@
ect%0A
- * @param error - (required) error code or information%0A
* @
@@ -884,23 +884,16 @@
ror(res,
- error,
... |
f5978aa5a0772ebd96188818c5e4623f1bcb9cdc | Add basic test script | test/test.js | test/test.js | JavaScript | 0.000002 | @@ -0,0 +1,204 @@
+var genx = require('../build/default/genx');%0A%0Avar w = new genx.Writer();%0A%0Aw.startDocument();%0Aw.startElementLiteral('genx');%0Aw.startElementLiteral('test');%0Aw.endElement();%0Aw.endElement();%0Aw.endDocument();%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.