conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Remove if check for 'next' in initialDeps utility\n"
},
{
"from": "human",
"value": "var definition = require('./definition');\n\nfunction initialDeps(req, res, next, err) {\n var deps = [\n definition.initial('ALL', /.*/, 'req', req),\n definition.... | javascript | chosen |
[
{
"from": "system",
"value": "Make the tab nav test actually test something\n"
},
{
"from": "human",
"value": "const { expect } = require(\"chai\")\nconst path = require(\"path\")\n\nconst Application = require(\"spectron\").Application\n\ndescribe(\"ui\", function () {\n this.timeout(10000)\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix blob file not being destroyed after worker use.\n"
},
{
"from": "human",
"value": "export const createDisposableWorker = response => {\n const URL = window.URL || window.webkitURL\n const blob = new Blob([response], { type: 'application/javascript' }) // eslin... | javascript | chosen |
[
{
"from": "system",
"value": "Define valid keys per platform and filter out invalid options.\n"
},
{
"from": "human",
"value": "var spawn = require('child_process').spawn;\nvar path = require('path');\n\nmodule.exports = function (options) {\n options = options || {};\n options.url = optio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix location type in get video\n\n- Can just use raw int from C*\n"
},
{
"from": "human",
"value": "import Promise from 'bluebird';\nimport { GetVideoResponse, VideoLocationType } from './protos';\nimport { toCassandraUuid, toProtobufTimestamp, toProtobufUuid } from... | javascript | chosen |
[
{
"from": "system",
"value": "Check availability of console before using it (Fix IE9)\n"
},
{
"from": "human",
"value": "/* @flow */\n'use strict';\n\nexport default class Logger {\n start: number;\n\n constructor() {\n this.start = Date.now();\n }\n\n // eslint-disable-next-l... | javascript | chosen |
[
{
"from": "system",
"value": "Return a resolved promise so promise chains waiting on step and flow resolution can end.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst BaseStep = require('./base-step');\n\nmodule.exports = class VoidStep extends BaseStep {\n constructor(options, action... | javascript | chosen |
[
{
"from": "system",
"value": "Move navigator.device to merges object for PlayBook.\n"
},
{
"from": "human",
"value": "module.exports = {\n id: \"playbook\",\n initialize:function() {},\n objects: {\n navigator: {\n children: {\n device: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Implement basic role for accounts\n"
},
{
"from": "human",
"value": "module.exports = function(app) {\n var Role = app.models.Role;\n \n Role.registerResolver('teamMember', function(role, context, cb) {\n \n function reject(msg) {\n console.log(msg);... | javascript | chosen |
[
{
"from": "system",
"value": ":muscle: Store a mapping to lists instead of single actions\n"
},
{
"from": "human",
"value": "// Copyright (c) 2017 The Regents of the University of Michigan.\n// All Rights Reserved. Licensed according to the terms of the Revised\n// BSD License. See LICENSE.txt f... | javascript | chosen |
[
{
"from": "system",
"value": "Set another default value for `user`\n"
},
{
"from": "human",
"value": "import Immutable from 'immutable';\n\nconst defaultState = Immutable.Map({loaded: false});\n\nexport default function authReducer(state = defaultState, action = {}) {\n switch (action.type) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix React error from missing keys\n"
},
{
"from": "human",
"value": "import React from \"react\";\n\nimport { GraphManager } from \"./index\";\n\n\nexport default class AbstractGraph extends React.Component {\n\n constructor(props) {\n super(props);\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify rpc tests using return promise instead of done callback\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar producer = require('../index')().producer;\nvar consumer = require('../index')().consumer;\nvar uuid = require('node-uuid');\n\nv... | javascript | chosen |
[
{
"from": "system",
"value": "Clear menu overlay before navigating to menu item"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport Relay from 'react-relay';\nimport TeamRoute from './TeamRoute';\nimport Can from '../components/Can';\nimport CheckContext... | javascript | chosen |
[
{
"from": "system",
"value": "Make push module a singleton\n"
},
{
"from": "human",
"value": "import HTML5Kinvey from 'kinvey-html5-sdk';\nimport Device from './device';\nimport Popup from './popup';\nimport Push from './push';\nimport assign from 'lodash/assign';\n\nexport default class Kinvey ... | javascript | chosen |
[
{
"from": "system",
"value": "Set log level to error\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n server: {\n port: process.env.PORT || 8889,\n host: \"0.0.0.0\"\n },\n log: {\n level: \"silly\",\n http: ':remote-addr [:date] \":me... | javascript | chosen |
[
{
"from": "system",
"value": "Add hash for schedule slot color\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport { Link } from 'react-router-dom';\nimport ScheduleSlotTime from './ScheduleSlotTime';\n\nfunctio... | javascript | chosen |
[
{
"from": "system",
"value": "Remove copyWithin and fill array methods\n"
},
{
"from": "human",
"value": "function newArray () { return []; };\n\nvar mutatorOpt = {\n check: function (v, path) {\n if (!_.isArray(v))\n throw new Meteor.Error(JSON.stringify(path) + ' is not an array');\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow PhantomJS process to free stack frames\n"
},
{
"from": "human",
"value": "/* eslint-disable */\n'use strict';\nvar system = require('system');\nvar webpage = require('webpage');\n\nvar page;\n\nvar methods = {\n exit: function(callback) {\n callback(true);... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Remove hack for news24 android app since loading pym async fixes it\"\n\nThis reverts commit 1c3a52fb9ec977f22bfd14244ae3b1a3712d96bc.\n"
},
{
"from": "human",
"value": "if (document.location.hostname == \"localhost\") {\n var baseurl = \"\";\n} else {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use environment variable for port if it's set\n"
},
{
"from": "human",
"value": "module.exports = {\n app: {\n options: {\n port: 3000\n }\n }\n}\n"
},
{
"from": "gpt",
"value": "module.exports = {\n app: {\n options: {\n port: proc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spaces in previous commit\n"
},
{
"from": "human",
"value": "const webpack = require('webpack');\nconst ora = require('ora');\nconst rm = require('rimraf');\nconst chalk = require('chalk');\nconst config = require('./webpack.config.js');\n\nconst env = process.e... | javascript | chosen |
[
{
"from": "system",
"value": "Update to latest version of template (1.42)\n\n* some bugfixes\n* improved test logic\n* removed deprecated manifest entries\n* added stable ids for component and rootview\n* added async routing flags\n"
},
{
"from": "human",
"value": "sap.ui.define([\n\t\"sap/ui/te... | javascript | chosen |
[
{
"from": "system",
"value": "Remove tests for core/Deferred for now.\n"
},
{
"from": "human",
"value": "define([\n\t'./aspect',\n\t'./async',\n\t'./compose',\n\t'../has!host-browser?./dom',\n\t'./global',\n\t'./has',\n\t'./lang',\n\t'./on',\n\t'./request',\n\t'./Deferred',\n\t'./Evented',\n\t'.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for $.ajaxSetup not working in Chrome. Usage is not recommended.\nThis caused changes to custom request headers to be ignored. Calling ajaxSetup wasn't updating the headers used by the next AJAX call. The jQuery docs recommend not using ajaxSetup.\n"
},
{
"from": "h... | javascript | chosen |
[
{
"from": "system",
"value": "Stop the centerOn animation if the user scrolls\n"
},
{
"from": "human",
"value": "/**\n * Pixel - jQuery plugins\n */\n(function($){\n\n /**\n * Center scroll on the selected element\n *\n * @param {number} [speed=1025]\n * @returns {*}\n */\... | javascript | chosen |
[
{
"from": "system",
"value": "Add 404 handler to unhandled requests\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst express = require('express');\nconst routeBuilder = require('express-routebuilder');\nconst Resource = require('./resource');\nconst loadResources = require('./util/load-... | javascript | chosen |
[
{
"from": "system",
"value": "Change js file to use cordova.exec\n"
},
{
"from": "human",
"value": "var SmsPlugin = function () {};\n\nSmsPlugin.prototype.send = function (phone, message, method, successCallback, failureCallback) { \n return PhoneGap.exec(successCallback, failureCallback, ... | javascript | chosen |
[
{
"from": "system",
"value": "Correct logic for loading analytics\n"
},
{
"from": "human",
"value": "(function() {\n if (document.location.hostname === \"josephduffy.co.uk\") {\n // Don't load analytics for noanalytics.josephduffy.co.uk or onion service\n return;\n }\n\n var _paq = wind... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue in async example with initial posts’ state\n"
},
{
"from": "human",
"value": "import * as posts from './posts';\n\n\nexport function getInitialState() {\n return {};\n}\n\nexport function PostsActions(state, { isAction, isIntrospection, actionID, payload,... | javascript | chosen |
[
{
"from": "system",
"value": "Update story\nso it reflects the prop changes\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { select } from '@storybook/addon-knobs/react';\nimport { LoadingSpinner } from '../components';\n\ncon... | javascript | chosen |
[
{
"from": "system",
"value": "Add empty paragraph for demo article.\n"
},
{
"from": "human",
"value": "import { Vfs } from '../../dar'\nimport { EMPTY_JATS } from '../ArticleConstants'\n\nexport default function createDemoVfs (seedXML) {\n let data = {\n 'demo/manifest.xml': \"<dar>\\n <doc... | javascript | chosen |
[
{
"from": "system",
"value": "Add segments to API call\n"
},
{
"from": "human",
"value": "Kpcc.ArticlesController = Ember.ArrayController.extend({\n currentPage : 0,\n limit : 12,\n types : \"news,blogs\",\n\n sortAscending : false,\n sortProperties : ['... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'clear' and 'format' to Ukrainian locale"
},
{
"from": "human",
"value": "/**\n * Ukrainian translation for bootstrap-datepicker\n * Igor Polynets\n */\n;(function($){\n\t$.fn.datepicker.dates['uk'] = {\n\t\tdays: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Сере... | javascript | chosen |
[
{
"from": "system",
"value": "Update authentication file for neverbounce authentiction\n"
},
{
"from": "human",
"value": "(function () {\n \"use strict\";\n const Promise = require('bluebird');\n const request = Promise.promisify(require('request'));\n\n const apiUsername = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Add ensure_logged_in to onboarding middleware stack\n"
},
{
"from": "human",
"value": "import express from 'express';\nimport SearchBlocks from '../../collections/search_blocks';\nimport { extend } from 'underscore';\nimport apolloMiddleware from 'react/apollo/middl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix newlines in grunt log output.\n"
},
{
"from": "human",
"value": "/*\n * grunt-ember-handlebars\n * https://github.com/yaymukund/grunt-ember-handlebars\n *\n * Copyright (c) 2012 Mukund Lakshman\n * Licensed under the MIT license.\n *\n * A grunt task that precom... | javascript | chosen |
[
{
"from": "system",
"value": "Add assert for main process API call\n"
},
{
"from": "human",
"value": "// Test for examples included in README.md\nvar helpers = require('./global-setup')\nvar path = require('path')\n\nvar describe = global.describe\nvar it = global.it\nvar beforeEach = global.bef... | javascript | chosen |
[
{
"from": "system",
"value": "Add first steps for createTableQuery\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Utils = require('../../utils');\n\nmodule.exports = (function() {\n var QueryGenerator = {\n dialect: 'mssql',\n\n showTablesQuery: function () {\n return 'SELEC... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for failure case to accumulator\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar accumulator = require('../lib/accumulator.js'),\n nock = require('nock');\n\ndescribe('accumulator', function() {\n afterEach(function() {\n nock.cleanAll()... | javascript | chosen |
[
{
"from": "system",
"value": "Add namedExports to meteor environment\n\nNow that environments are specified with configuration objects, we can\nstart making them even richer.\n\nThis list of namedExports for the meteor environment was provided by\n@rhettlivingston.\n"
},
{
"from": "human",
"valu... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Patch to allow Ender packages to work with jsdom.env\"\n\nThis reverts commit 55ba79071087ffa8a7a9bb3212afc1a571aedefd.\n"
},
{
"from": "human",
"value": "var vm = require('vm');\n\nexports.javascript = function(element, code, filename) {\n var document = ... | javascript | chosen |
[
{
"from": "system",
"value": "Change html element class when javascript is available\n"
},
{
"from": "human",
"value": "(function() {\n \"use strict\";\n\n var h1 = document.getElementsByTagName(\"h1\")[0];\n h1.style.backgroundColor = \"lightblue\";\n})();\n"
},
{
"from": "gpt"... | javascript | chosen |
[
{
"from": "system",
"value": "Create skipped features to flesh out API\n\nSee #4\n"
},
{
"from": "human",
"value": "var frisby = require('frisby');\nvar root = \"http://localhost:3000\";\nvar gamesPath = \"/games\"\n\nfrisby.create('Game starts when a user POSTs a new game')\n .post(root + game... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with not using upgraded history object\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { merge } from 'lodash'\nimport {\n Router as ReactRouter,\n RouterContext,\n browserHistory,\n createMemoryHistory,\n match\n} from ... | javascript | chosen |
[
{
"from": "system",
"value": "Add note in credits about Javascript/HTML5\n"
},
{
"from": "human",
"value": "CubeGame.Credits = function() {};\nCubeGame.Credits.prototype = {\n create: function() {\n this.credits = \"Avoid the obstacles with the Cube!\\nCreated with the Phaser Game Engi... | javascript | chosen |
[
{
"from": "system",
"value": "Add jQuery plugin on page load, not domready\n\nThe phileo plugin was added to jQuery in the domready event callback. As\nthis plugin could be loaded at the bottom of a page - AFTER phileo\nwidget scripts - it was possible for the phileo plugin to not be\nloaded when the widget... | javascript | chosen |
[
{
"from": "system",
"value": "Replace strings comparison with regexp\n"
},
{
"from": "human",
"value": "document.addEventListener('beforeload', onBeforeLoad, true);\n\nvar config = [\n {\n source: 'source.js',\n reSource: 'reSource.js'\n }\n];\n\nfunction onBeforeLoad(event) ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove sass:watch task and replace by default\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar autoprefixer = require('gulp-autoprefixer');\nvar filesize = require('gulp-filesize');\nvar minifyCss... | javascript | chosen |
[
{
"from": "system",
"value": "Add container spacing to 404 page\n"
},
{
"from": "human",
"value": "// @flow\n/**\n * Part of GDL gdl-frontend.\n * Copyright (C) 2018 GDL\n *\n * See LICENSE\n */\n\nimport * as React from 'react';\nimport Taken from './Taken';\nimport { Trans } from '@lingui/reac... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug that failed to show Rekit Studio.\n"
},
{
"from": "human",
"value": "const setItem = type => (key, item) => {\n const obj = window[`${type}Storage`];\n return obj.setItem(key, JSON.stringify(item));\n};\nconst getItem = type => (key, defaultValue, saveIf... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify for loop in EntryPoint.getFiles\n"
},
{
"from": "human",
"value": "/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\"use strict\";\n\nconst ChunkGroup = require(\"./ChunkGroup\");\n\nclass Entrypoint... | javascript | chosen |
[
{
"from": "system",
"value": "Stop force clearing the dom when gelato is preparing it.\n"
},
{
"from": "human",
"value": "var Application = require('application');\n\nmodule.exports = (function() {\n\n function prepareDOM() {\n document.body.innerHTML = '';\n document.body.appen... | javascript | chosen |
[
{
"from": "system",
"value": "Add statusActions arg to remote call sig\n"
},
{
"from": "human",
"value": "/**\n RemoteCall\n @description function that makes the remote call using the fetch polyfill,\n running a series of provided lifecycle hooks\n @exports @default {function} callRemoteRe... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reticle render order and depthTest\n"
},
{
"from": "human",
"value": "(function(){\n\t\n\t/**\n\t * Reticle 3D Sprite\n\t * @param {THREE.Color} [color=0xfffff] - Color of the reticle sprite\n\t * @param {string} [url=PANOLENS.DataImage.Reticle] - Image asset ur... | javascript | chosen |
[
{
"from": "system",
"value": "Test for clusterization distance and turning off\n"
},
{
"from": "human",
"value": "'use strict';\nimport VectorLayer from 'ol/layer/Vector';\nimport { Vector as VectorSource } from 'ol/source';\n\ndescribe('layermanager', function () {\n var scope;\n var $com... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure we pass the correct props to the overlay\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport DayPickerInput from 'react-day-picker/DayPickerInput';\nimport 'react-day-picker/lib/style.css';\n\nfuncti... | javascript | chosen |
[
{
"from": "system",
"value": "Add base for infinite scrolling\n"
},
{
"from": "human",
"value": "require([\"gitbook\"], function(gitbook) {\n\n});"
},
{
"from": "gpt",
"value": "\n\n\nrequire([\"gitbook\", \"core/navigation\"], function(gitbook, navigation) {\n gitbook.events.bind... | javascript | chosen |
[
{
"from": "system",
"value": "fix(archetype): Add 'slug' property to demo object\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2017 CA\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may... | javascript | chosen |
[
{
"from": "system",
"value": ":honeybee: Switch to NHS Beta GA tracking id\n\nAfter discussion with Joe McGrath decided that the stats for the\nconnecting to services work should not be separate from NHS Beta\n"
},
{
"from": "human",
"value": "/*eslint-disable */\n\n//script from:\n//https://ana... | javascript | chosen |
[
{
"from": "system",
"value": "Remove list of project names from slack announcement for cycle launch.\n"
},
{
"from": "human",
"value": "import Promise from 'bluebird'\nimport {Cycle, Phase, Project} from 'src/server/services/dataService'\n\nexport default async function sendCycleLaunchAnnounceme... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up and document the return value of mockRaf\n"
},
{
"from": "human",
"value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http:/... | javascript | chosen |
[
{
"from": "system",
"value": "Correct put method to work correctly\n"
},
{
"from": "human",
"value": "angular.module('app', []).controller('AppCtrl', function ($scope, $http) {\n\t$scope.results = [];\n\n\t$scope.loadUsers = function() {\n\t\t$http.get('/elements')\n\t\t\t.success(function(data)... | javascript | chosen |
[
{
"from": "system",
"value": "Make get shuttles api route more secure by encapsulating array in data key\n\nThis is better as per this article: https://www.owasp.org/index.php/AJAX_Security_Cheat_Sheet#Always_return_JSON_with_an_Object_on_the_outside\n"
},
{
"from": "human",
"value": "const expr... | javascript | chosen |
[
{
"from": "system",
"value": "Implement find for Repository on GitHubAdpater\n"
},
{
"from": "human",
"value": "require('dashboard/core');\nrequire('dashboard/model');\n\nDashboard.GitHubAdpater = DS.Adapter.extend({\n PREFIX: 'https://api.github.com',\n \n ajax: function(url, target, callbac... | javascript | chosen |
[
{
"from": "system",
"value": "Create the Draft server-side instead.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n actions: {\n submit: function () {\n var\n self = this,\n content = this.controller.get('firstSnippet'... | javascript | chosen |
[
{
"from": "system",
"value": "Increase timeout to allow travis tests to pass\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar screenshot = require('../../lib/pipes/screenshot.js');\nvar testcases = require('../files/hash.json');\nvar restbase = require('../../lib/pipes/restbase');\nvar pi... | javascript | chosen |
[
{
"from": "system",
"value": "Remove use of process from global\n"
},
{
"from": "human",
"value": "const { configureStore } = require('../store');\nconst readline = require('readline');\nconst draw = require('./draw');\nconst { keys } = require('./input');\nconst actions = require('../actions');... | javascript | chosen |
[
{
"from": "system",
"value": "Update and fix sass gulp path\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n browserSync = require('browser-sync'),\n sass = require('gulp-sass'),\n bower = require('gulp-bower'),\n notify = require('gulp-notify... | javascript | chosen |
[
{
"from": "system",
"value": "Update gulp tasks to use mocha-phantom"
},
{
"from": "human",
"value": " //Gulp and plugins\nvar gulp = require('gulp'),\n mocha = require('gulp-mocha'),\n plumber = require('gulp-plumber'),\n watch = require('gulp-watch');\n\ngulp... | javascript | chosen |
[
{
"from": "system",
"value": "Build the full project before gulp watch.\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar bower = require('gulp-bower');\nvar minifyCSS = require('gulp-minify-css');\n\nvar paths = {\n css: 'src/styles/**/*.scss... | javascript | chosen |
[
{
"from": "system",
"value": "Fix assertion into info e2e-test\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('my angular musicbrainz app', function () {\n\n beforeEach(function () {\n browser().navigateTo('app/index.html');\n });\n\n\n it('should automatically redi... | javascript | chosen |
[
{
"from": "system",
"value": "Add br tests to special test group\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs');\nvar hljs = require('../../build');\nvar jsdom = require('jsdom').jsdom;\nvar utility = require('../utility');\n\nvar filename = utility.buildPat... | javascript | chosen |
[
{
"from": "system",
"value": "Add default govuk link and logo title\n"
},
{
"from": "human",
"value": "module.exports = {\n htmlLang: '{{htmlLang}}',\n assetPath: '{{govukAssetPath}}',\n afterHeader: '{{$afterHeader}}{{/afterHeader}}',\n bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}',\n bo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded coverage lines from tests bundler\n"
},
{
"from": "human",
"value": "// ---------------------------------------\n// Test Environment Setup\n// ---------------------------------------\nimport sinon from 'sinon'\nimport chai from 'chai'\nimport sinonCh... | javascript | chosen |
[
{
"from": "system",
"value": "gen: Fix typo on object field\n"
},
{
"from": "human",
"value": "var _plan={\n title:\"simple plan\",\n template_engine:\"go\",\n dependency:[\n \"markdown\",\n \"yaml_front_matter\",\n ],\n strategies:[\n {\n title:\"m... | javascript | chosen |
[
{
"from": "system",
"value": "Fix time extraction taking away needed spaces\n"
},
{
"from": "human",
"value": "import moment from 'moment'\nimport chalk from 'chalk'\nimport format from '../time'\nimport pad from 'pad'\nimport { hashPattern } from '../entry'\n\nexport {write as write}\nexport {g... | javascript | chosen |
[
{
"from": "system",
"value": "Improve compose functions in error functions\n"
},
{
"from": "human",
"value": "// @flow\n\nimport { red } from 'chalk';\nimport R from 'ramda';\n\ntype Clog = typeof console.log;\ntype GraphQLError = { message: string };\n\nexport function exitNoConfig(clog: Clog):... | javascript | chosen |
[
{
"from": "system",
"value": "Use message is extracted from the input form\n"
},
{
"from": "human",
"value": "//Function to create an DOM with the provided message string\r\n//<div class='msgbox'><span class='deletebtn'>×</span>msgString</div>\r\nfunction notesCreateMsgBoxDom(msgString) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Set default connection_offset to 0 seconds\n"
},
{
"from": "human",
"value": "/**\n * Ripple Client Configuration\n *\n * Copy this file to config.js and edit to suit your preferences.\n */\nvar Options = {\n server: {\n trace : true,\n trusted: ... | javascript | chosen |
[
{
"from": "system",
"value": "Divide count by page size to determine if we should show the pager footer.\n"
},
{
"from": "human",
"value": "import { FooterController } from './FooterController';\n\nexport function FooterDirective(){\n return {\n restrict: 'E',\n controller: FooterControll... | javascript | chosen |
[
{
"from": "system",
"value": "Change progress plugin javascript to replace progress with custom field value\n"
},
{
"from": "human",
"value": "window.GobiertoAdmin.GobiertoCommonCustomFieldRecordsProgressPluginController = (function() {\n\n function GobiertoCommonCustomFieldRecordsProgressPlugi... | javascript | chosen |
[
{
"from": "system",
"value": "Rename a variable so it makes a bit more sense\n"
},
{
"from": "human",
"value": "require(\"../www/discography/js/lib/model.js\");\nrequire(\"../www/discography/js/models/artist.js\");\nrequire(\"../www/discography/js/lib/ajax.js\");\nrequire(\"../www/discography/js... | javascript | chosen |
[
{
"from": "system",
"value": "Handle login required headers on the client side.\n"
},
{
"from": "human",
"value": "if(!window.console) console = {log: function() {}};\n"
},
{
"from": "gpt",
"value": "if(!window.console) console = {log: function() {}};\n\n$(function(){\n $('body').... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong type and prefix for Angular Factory traces"
},
{
"from": "human",
"value": "var utils = require('../utils')\n\nmodule.exports = function ($provide, traceBuffer) {\n return {\n instrumentAll: function (modules) {\n modules.forEach(function (name) {... | javascript | chosen |
[
{
"from": "system",
"value": "Remove namespace add in previous commit\n"
},
{
"from": "human",
"value": "define(function(require) {\n\n 'use strict';\n\n var zrUtil = require('zrender/core/util');\n\n var echartsAPIList = [\n 'getDom', 'getZr', 'getWidth', 'getHeight', 'dispatchA... | javascript | chosen |
[
{
"from": "system",
"value": "Fix enabled flag not working when the user doesnt explicity set enabled\nto true in config\n"
},
{
"from": "human",
"value": "// jscs:disable\n/* globals define */\nString.prototype.toSnakeCase = function() {\n return this.replace(/([A-Z])/g, function(string) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve data frame search benchmark\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { Suite } = require('./helpers');\nconst { config, data } = require('./fixtures/data.json');\nconst { DataFrame } = require('./src');\n\nconst run = async () => {\n cons... | javascript | chosen |
[
{
"from": "system",
"value": "Replace spurts with boost powerups.\n"
},
{
"from": "human",
"value": "var canvas = document.querySelector(\"#gamevas\");\ncanvas.width = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\ncanvas.height = Math.max(document.documentElement.clien... | javascript | chosen |
[
{
"from": "system",
"value": "Copy files from the bundlesPath\n"
},
{
"from": "human",
"value": "var NwBuilder = require(\"node-webkit-builder\");\nvar asap = require(\"pdenodeify\");\n\nmodule.exports = function(options){\n\tvar nwOptions = {};\n\n\t// Convert the options to camelcase\n\tObject... | javascript | chosen |
[
{
"from": "system",
"value": "Load templates relative to source file\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nvar raml2html = require('raml2html')\n\nfunction die(message) {\n console.error(message)\n process.exit(1)\n}\n\nvar args = process.argv.slice(2)\nif (args.length !=... | javascript | chosen |
[
{
"from": "system",
"value": "Test tile now gets it's texture from the tile type array.\n"
},
{
"from": "human",
"value": "require(\"pixi.js\");\r\n\r\nimport TileType from \"./TileType\";\r\n\r\nvar tileTypes;\r\n\r\n/**\r\n * Load game tile types...\r\n */\r\nfunction loadTileTypes() {\r\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where non-existing function was being called\n"
},
{
"from": "human",
"value": "var duplicate = false;\r\njQuery( document ).ready( function()\r\n{\r\n\tshowHideUserGroup();\r\n\r\n\tcheckValueIsExist( \"name\", \"validateProgramStage.action\", {id:getFieldV... | javascript | chosen |
[
{
"from": "system",
"value": "Update elo in database on click\n"
},
{
"from": "human",
"value": "const User = require('../../models/User');\nconst Elo = require('arpad');\n\nfunction findUsersOfLeague(req, res) {\n User.findAll({ where: { league: req.params.league } }).then((data) => {\n con... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to use Promises on `discard` function\n"
},
{
"from": "human",
"value": "import { busy, scheduleRetry } from './actions';\nimport { JS_ERROR } from './constants';\nimport type { Config, OfflineAction, ResultAction } from './types';\n\nconst complete = (\n act... | javascript | chosen |
[
{
"from": "system",
"value": "Convert minzoom/maxzoom parameters on Layer properties.\n"
},
{
"from": "human",
"value": "(function(tree) {\n\ntree.LayerXML = function(obj, styles) {\n var dsoptions = [];\n for (var i in obj.Datasource) {\n dsoptions.push('<Parameter name=\"' + i + '... | javascript | chosen |
[
{
"from": "system",
"value": "Use statusCode 403 for Permission Denied"
},
{
"from": "human",
"value": "\n'use strict';\n\nvar auth = require('basic-auth');\n\n\n// Loads the controller\n//\n// @app {Object} The config\n//\nfunction main (config) {\n\n return {\n\n isAuth: function(req,... | javascript | chosen |
[
{
"from": "system",
"value": "Add debug-menu manual triggers for Sentry\n\nSigned-off-by: Kristofer Rye <1ed31cfd0b53bc3d1689a6fee6dbfc9507dffd22@gmail.com>\n"
},
{
"from": "human",
"value": "// @flow\nimport * as React from 'react'\nimport {Section, PushButtonCell} from '@frogpond/tableview'\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Change Jasmine import syntax to satisfy Travis\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst { MarkdownRenderer } = require('../src/renderer')\n\ndescribe ('Renderer', () => {\n var renderer\n var callback\n\n beforeEach(() => {\n call... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to close folder icon when collapsing\n"
},
{
"from": "human",
"value": "$(document).ready(function () {\n $('.collapsible').click(function () {\n $(this).parent().find('.collapse').collapse('toggle');\n });\n});\n"
},
{
"from": "gpt",
... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.