conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Comment out broken integration tests for the moment\n" }, { "from": "human", "value": "/* global describe, it */\nvar chai = require('chai');\nvar expect = chai.expect;\nvar builder = require('../dist/');\nvar path = require('path');\n\n\ndescribe ('drizzle builder ...
javascript
chosen
[ { "from": "system", "value": "Fix uncaught exception if minecraft server is offline when the bot starts\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(config, ircbot) {\n\tconst Rcon = require('rcon');\n\tconst client = new Rcon(config.rcon.host, config.rcon.port, ...
javascript
chosen
[ { "from": "system", "value": "Implement more ByteArray methods using Array generics\n" }, { "from": "human", "value": "defineClass(org.helma.wrappers.ByteArray);\nexport('ByteArray');\n\n__shared__ = true;\n\nObject.defineProperty(String.prototype, 'toByteArray', {\n value: function(charset) ...
javascript
chosen
[ { "from": "system", "value": "Remove unused base class option\n" }, { "from": "human", "value": "export default {\n disableHistory: false,\n swipe: true,\n rootAttribute: `data-perfundo`,\n classNames: {\n base: `perfundo`,\n link: `perfundo__link`,\n overlay: `perfundo__overlay`,\n...
javascript
chosen
[ { "from": "system", "value": "Change min node version to 6 since we're using babel\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n'use strict';\n\n/**\n * This file works with any node version >= 0.10.0. If the version is less\n * than 8, we print out a message and ask the developer t...
javascript
chosen
[ { "from": "system", "value": "Use once instead of on to run the event only once.\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": "Add routes to cvApp module\n" }, { "from": "human", "value": "'use strict';\n\nvar cvApp = angular.module('cvApp', ['ngRoute', 'cvAppControllers']);\n" }, { "from": "gpt", "value": "'use strict';\n\nvar cvApp = angular.module('cvApp', ['ngRoute', 'cvAppC...
javascript
chosen
[ { "from": "system", "value": "Fix using HAPPO_IS_ASYNC with Storybook plugin\n\nWe weren't passing the right things to the remoteRunner, causing async\nreport rendering to fail with a cryptic \"is not iterable (cannot read\nproperty Symbol(Symbol.iterator))\" error.\n" }, { "from": "human", "val...
javascript
chosen
[ { "from": "system", "value": "Simplify implementation and achieve full test coverage\n" }, { "from": "human", "value": "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file exc...
javascript
chosen
[ { "from": "system", "value": "Move Router.reopen() options to Ember.Router.extend()\n" }, { "from": "human", "value": "var Router = Ember.Router.extend();\n\nRouter.map(function() {\n this.resource('todos', { path: '/' }, function() {\n // this.route('index', { path: '/' }); // this route i...
javascript
chosen
[ { "from": "system", "value": "Make the black actually use black ascii BG colors.\n\nThe generated QR codes in the original version didn't work when using a\nterminal with black text on white background.\n\nThis change makes the library use an actual color code for black (or at\nleast dark grey) background f...
javascript
chosen
[ { "from": "system", "value": "Fix the wrong validation on ID.\n" }, { "from": "human", "value": "\n\nfunction validateId( id ) {\n\treturn ( id.indexOf( ' ' ) !=-1 || id.indexOf( '\\t' ) != -1 || id.indexOf( '\\n' ) != -1 || id.indexOf( '\\r' ) != -1 || id.indexOf( '\\r\\n' ) != -1 );\n}\n\nexp...
javascript
chosen
[ { "from": "system", "value": "Make dead link warnings non-voting\n\nDead link warnings are nice, but right now we have install steps which\nrely on private links.\n\nSigned-off-by: Cullen Taylor <0a4f58109a9f9b7b2781cb48fa62bfe7918cb3d0@outlook.com>\n" }, { "from": "human", "value": "\"use stric...
javascript
chosen
[ { "from": "system", "value": "Update to include the latest web platform tests\n\nIncludes https://github.com/w3c/web-platform-tests/pull/5111.\n" }, { "from": "human", "value": "\"use strict\";\n\nif (process.env.NO_UPDATE) {\n process.exit(0);\n}\n\nconst path = require(\"path\");\nconst fs = ...
javascript
chosen
[ { "from": "system", "value": "Use auth.isSetup with key for administrative setup\n\nInstead of auth.isAdmin with token\n" }, { "from": "human", "value": "const express = require('express')\nconst router = express.Router()\n\nconst api = require('./controller')\nconst auth = require('../auth/cont...
javascript
chosen
[ { "from": "system", "value": "Append search returns on keypress works\n" }, { "from": "human", "value": "$(document).ready(function() {\n\t$(\"#searchnow\").on(\"click\", searchGems)\n});\n\nfunction searchGems(e){\n\te.preventDefault();\n\tvar searchWord = $('#search').val()\n\tvar ajaxSearch =...
javascript
chosen
[ { "from": "system", "value": "Fix path matching for non-*nix environments.\n\nFixes #505\n" }, { "from": "human", "value": "var Transform = require('stream').Transform;\nvar collector = require('./service-collector');\nvar license = require('./browser-builder').license;\n\nmodule.exports = funct...
javascript
chosen
[ { "from": "system", "value": "Add jobTypes reducer in combineReducers\n" }, { "from": "human", "value": "import account from './account';\nimport person from './person';\nimport languages from './languages';\n\nconst { combineReducers } = require('redux');\n\nexport default combineReducers({ per...
javascript
chosen
[ { "from": "system", "value": "Update missing bash environment statement\n" }, { "from": "human", "value": "\r\n\r\nvar cheerio = require('cheerio'),\r\n args = require('commander'),\r\n path = require('path'),\r\n fs = require('fs'),\r\n inputStream = process.stdin,\r\n outputStream = proce...
javascript
chosen
[ { "from": "system", "value": "Fix missing needs in contribution test\n" }, { "from": "human", "value": "import { expect } from 'chai';\nimport { it, describe } from 'mocha';\nimport { setupModelTest } from 'ember-mocha';\n\ndescribe('Unit | Model | contribution', function() {\n setupModelTest('...
javascript
chosen
[ { "from": "system", "value": "Change props.route to actual value\n" }, { "from": "human", "value": "import Component from 'react-pure-render/component';\nimport React, {PropTypes} from 'react';\n\n// RouterHandler is back since suggested solution via React.cloneElement sucks.\n// https://github....
javascript
chosen
[ { "from": "system", "value": "Check if window is defined\n" }, { "from": "human", "value": "import { TOGGLE_SIDEBAR } from '../constants/sidebar';\n\nexport const DOCKED_MIN_WIDTH = 980;\nexport const INITIAL_STATE = window.innerWidth >= DOCKED_MIN_WIDTH;\n\nexport default function sidebarReduce...
javascript
chosen
[ { "from": "system", "value": "Add request invalidation, receivedAt to thread reducer\n" }, { "from": "human", "value": "import initialState from './initialState';\nimport { \n THREAD_LOADED, \n THREAD_REQUESTED, \n THREAD_DESTROYED\n} from '../constants'\n\nexport default function (stat...
javascript
chosen
[ { "from": "system", "value": "Refactor stage menu to stage menuItems\n" }, { "from": "human", "value": "import React from 'react';\nimport Menu from './Menu';\nimport { connect } from 'react-redux';\n\nconst mapStateToProps = (state) => {\n return {\n menu: Array.isArray(state.menu) ? ...
javascript
chosen
[ { "from": "system", "value": "Change hardcoding of cherry to reflect borders instead\n" }, { "from": "human", "value": "gamePieces = {};\n\ngamePieces.createTeleport = function() {\n starOne = game.add.sprite(10, game.world.height - 300, 'star');\n starOne.anchor.setTo(0.5, 0.5);\n starOne.sc...
javascript
chosen
[ { "from": "system", "value": "Mark backcompat on some Handlebars functions\n" }, { "from": "human", "value": "// XXX this file no longer makes sense in isolation. take it apart as\n// part file reorg on the 'ui' package\nvar globalHelpers = {};\n\nUI.registerHelper = function (name, func) {\n ...
javascript
chosen
[ { "from": "system", "value": "Move registration box to news page\n" }, { "from": "human", "value": "import React from 'react';\nimport { get } from '../fetcher';\n\n\nimport NewsPost from './NewsPost';\n\nconst NewsPage = React.createClass({\n getInitialState() {\n return {\n ...
javascript
chosen
[ { "from": "system", "value": "STASHDEV-6530: Update front-end code to stop using APIs removed in Stash 3.0\n" }, { "from": "human", "value": "define('plugin/download-archive', ['jquery', 'aui', 'model/page-state', 'util/navbuilder', 'exports'], function ($, AJS, pageState, navBuilder, exports) {...
javascript
chosen
[ { "from": "system", "value": "v/b-h/d: Refactor to use timezone() helper\n\nSigned-off-by: Kristofer Rye <1ed31cfd0b53bc3d1689a6fee6dbfc9507dffd22@gmail.com>\n" }, { "from": "human", "value": "// @flow\n\nimport * as React from 'react'\nimport type {BuildingType} from '../types'\nimport {Timer} ...
javascript
chosen
[ { "from": "system", "value": "Rename the SuggestedGenes schema name to be singular\n" }, { "from": "human", "value": "import fetch from \"../lib/apis/fetch\"\nimport { GraphQLObjectType, GraphQLList, GraphQLString } from \"graphql\"\n\nconst SuggestedGeneType = new GraphQLObjectType({\n name: \...
javascript
chosen
[ { "from": "system", "value": "(server): Change request headers to prefer JSON\n" }, { "from": "human", "value": "export default {\n headers: {\n \"Host\": \"a.4cdn.org\",\n \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0\",\n \"...
javascript
chosen
[ { "from": "system", "value": "Update to integrate the pushstate in angular\n" }, { "from": "human", "value": "'use strict';\n\n//--------------------------------------------------------------\n// Angular Main\n//--------------------------------------------------------------\n\nan...
javascript
chosen
[ { "from": "system", "value": "Insert Ribbon using shortcut before page load.\n\nAdds an event listener after document.readyState == 'interactive',\nremoves it when document.readyState becomes complete.\n" }, { "from": "human", "value": "import { bodyLoader } from 'src/util/loader'\n\nimport * as...
javascript
chosen
[ { "from": "system", "value": "Add test for additional-provider list.\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('additional-provider-list', 'Integration | Component | additional p...
javascript
chosen
[ { "from": "system", "value": "Use strictEqual in the test.\n" }, { "from": "human", "value": "var vows = require('vows'),\n assert = require('assert'),\n events = require('events'),\n load = require('./load'),\n suite = vows.describe('brushModes');\n\nfunction d3Parcoords() {\n var ...
javascript
chosen
[ { "from": "system", "value": "Remove form request type definition from form class (it's form by default anyways).\n\nDo not overwrite element submit method." }, { "from": "human", "value": "/*\n---\n \nscript: Form.js\n \ndescription: Act as a form to submit data\n \nlicense: Public domain (http...
javascript
chosen
[ { "from": "system", "value": "Update test name on swagger test\n" }, { "from": "human", "value": "var request = require('supertest')\n , app = require('../express');\n\ndescribe(\"user tests\", function() {\n\n it(\"should get swagger document\", function(done) {\n request(app)\n .get(...
javascript
chosen
[ { "from": "system", "value": "Improve readability of polller javascript\n" }, { "from": "human", "value": "(function() {\n \"use strict\";\n window.GOVUK = window.GOVUK || {};\n\n window.GOVUK.smartPoller = function(wait, poller) {\n var max_wait = 10000000;\n\n ( function startPoller()...
javascript
chosen
[ { "from": "system", "value": "Watch job, job-summary, and job-allocs on the task group page\n" }, { "from": "human", "value": "import Route from '@ember/routing/route';\n\nexport default Route.extend({\n model({ name }) {\n // If the job is a partial (from the list request) it won't have tas...
javascript
chosen
[ { "from": "system", "value": "Remove useless log during build\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\n\nvar dir = {\n\tbase: path.normalize(__dirname + '/')\n};\ndir.src = dir.base + 'src/';\n\ntask('default', [], function() {\n//\tjake.cpR(dir.sr...
javascript
chosen
[ { "from": "system", "value": "Update no-DTrace stub for new probe.fire() function.\n" }, { "from": "human", "value": "var util = require('util');\n\nvar DTraceProvider;\n\nfunction DTraceProviderStub() {}\nDTraceProviderStub.prototype.addProbe = function() {};\nDTraceProviderStub.prototype.enabl...
javascript
chosen
[ { "from": "system", "value": "Fix project on home page if there's only 1\n" }, { "from": "human", "value": "\nApp.HomeController = Ember.ObjectController.extend({\n needs: ['currentUser'],\n\tproject: null,\n isCampaignHomePage: false,\n\tprojectIndex: 1,\n\n actions: {\n nextPro...
javascript
chosen
[ { "from": "system", "value": "Test Fenwick Tree: Tests for range sum\n" }, { "from": "human", "value": "/* eslint-env mocha */\nconst FenwickTree = require('../../src').DataStructures.FenwickTree;\nconst assert = require('assert');\n\ndescribe('Fenwick Tree', () => {\n it('should be empty when ...
javascript
chosen
[ { "from": "system", "value": "Change google maps api text to include destination\n" }, { "from": "human", "value": "require('dotenv').config();\nconst request = require('request-promise');\n\nconst googlemaps = {\n\n getResponse: (loc, placeStr, originalStr) => {\n // originalString is the t...
javascript
chosen
[ { "from": "system", "value": "Add couch view to help debug upload problems\n" }, { "from": "human", "value": "function(doc) {\n if (doc.type === \"SonositeUpload\" || doc.type === \"VscanUpload\") {\n emit([doc.domain, doc.type, doc.case_id], doc._id);\n }\n}\n" }, { "from":...
javascript
chosen
[ { "from": "system", "value": "Revert \"Reduce anonymous function creation during iteration for edge cases\"\n\nThis reverts commit 38006447b94b9113998954f15b6b869313e09d9e.\n" }, { "from": "human", "value": "'use strict'\n\nvar values = require('../sources/values')\nvar once = require('../source...
javascript
chosen
[ { "from": "system", "value": "Use new environment variables in firebase configuration\n" }, { "from": "human", "value": "import Firebase from 'firebase';\nimport Fastclick from 'react-fastclick';\n\nimport { getSectors } from 'store/api/local';\nimport { fetchUser } from 'store/actions/user.acti...
javascript
chosen
[ { "from": "system", "value": "Add e2e test for home view.\n" }, { "from": "human", "value": "describe('angularjs homepage todo list', function () {\n it('should add a todo', function () {\n browser.get('https://angularjs.org');\n\n element(by.model('todoList.todoText')).sendKey...
javascript
chosen
[ { "from": "system", "value": "Fix passing onClearNotices to Notices in LogInBox\n" }, { "from": "human", "value": "import React from 'react';\nimport Notices from 'components/notices';\n\nconst LogInBox = ( props ) => {\n return (\n <div className=\"log-in-box\">\n <Notices errors={ pro...
javascript
chosen
[ { "from": "system", "value": "add: Copy icons directory under extra resources\n" }, { "from": "human", "value": "/**\n * Copyright (c) Ajay Sreedhar. All rights reserved.\n *\n * Licensed under the MIT License.\n * Please see LICENSE file located in the project root for more information.\n */\n\...
javascript
chosen
[ { "from": "system", "value": "Work with array of NSE values\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport request from 'ajax-request';\n\nexport default class StockComponent extends Component {\n constructor(props) {\n super(props);\n this.state = {\...
javascript
chosen
[ { "from": "system", "value": "Fix relative path to *.json file at async action creator\n" }, { "from": "human", "value": "import axios from 'axios';\n\nimport { FETCH_BOOKS } from './action_types';\n\nconst BOOK_DATABASE_URI = '/book_store.json';\n\nexport const fetchBookPending = () => ({\n\tty...
javascript
chosen
[ { "from": "system", "value": "Update backend - Flight search result\n" }, { "from": "human", "value": "var Flight = require('../models/Flight'),\n\texpress = require('express'),\n\tflightRouter = express.Router();\n\nflightRouter.get(\"/\",function (req, res, next) {\n\tFlight.find({}, function(...
javascript
chosen
[ { "from": "system", "value": "Remove flags on article pages\n" }, { "from": "human", "value": "import * as routes from './routes'\nimport express from 'express'\nimport adminOnly from 'desktop/lib/admin_only'\n\nconst app = (module.exports = express())\n\napp.set('view engine', 'jade')\napp.set(...
javascript
chosen
[ { "from": "system", "value": "Disable auto-update until next season\n" }, { "from": "human", "value": "'use strict';\r\n\r\nfunction config() {\r\n const periodFormat = '{0}-{1}';\r\n const firstHandledYear = 2000;\r\n const lastHandledPeriod = 2021;\r\n\r\n const currentPeriod = per...
javascript
chosen
[ { "from": "system", "value": "Deal with commodity display for contracts\n" }, { "from": "human", "value": "var path \t\t= require('path');\nvar rootPath \t= path.normalize(__dirname + '/../../');\n\nmodule.exports \t= {\n local: {\n baseUrl: 'http://localhost:3008',\n db: 'mongo...
javascript
chosen
[ { "from": "system", "value": "Add route logic to serve initial template\n" }, { "from": "human", "value": "/**\n * @module server/lib/routes/client\n */\n'use strict';\n\nvar log = require('logger')(__filename);\n\nvar exports = module.exports;\n\nvar _routes = exports._routes = [\n ['get', '/'...
javascript
chosen
[ { "from": "system", "value": "Add frontend event hooks for before and after app is loaded\n" }, { "from": "human", "value": "// When all scripts are loaded, we invoke the application\n$(function () {\n var app = new girder.App({});\n});\n" }, { "from": "gpt", "value": "// When all...
javascript
chosen
[ { "from": "system", "value": "Add environment variables to service schema\n" }, { "from": "human", "value": "/* eslint-disable no-unused-vars */\nimport React from 'react';\n/* eslint-enable no-unused-vars */\n\nimport General from './service-schema/General';\nimport Optional from './service-sch...
javascript
chosen
[ { "from": "system", "value": "Update JS for work page.\n" }, { "from": "human", "value": "(function($) {\n $(function() {\n \n $('a.project').click(function(event) {\n event.preventDefault();\n $('.work-belt').css('left','-100%');\n $('.work-container').show();\n });\n\n ...
javascript
chosen
[ { "from": "system", "value": "Remove modal from DOM after hide\n" }, { "from": "human", "value": "window.bindModalClicks = function() {\n $('a[data-toggle=modal]').on('click', function() {\n var template = $($(this).attr('href')).html();\n var output = Mustache.render(template, { content:...
javascript
chosen
[ { "from": "system", "value": "Remove Las Vegas, NV from placeholder (doesn't fit)\n" }, { "from": "human", "value": "var config = {\n name: \"Las Vegas\",\n address: \"495 S. Las Vegas Blvd. Las Vegas, NV 89101\",\n latitude: 36.18,\n longitude: -115.14,\n initialZoom: 12,\n finalZoom: 14,...
javascript
chosen
[ { "from": "system", "value": "Return new notebook action to ensure promise order\n" }, { "from": "human", "value": "module.exports = function() {\n this.Widgets.Dashboard = this.Widget.extend({\n root: 'bk-control-panel',\n createNotebook: function() {\n this.find(\".new-notebook\")....
javascript
chosen
[ { "from": "system", "value": "Add more fields when viewing collecting event\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n\n /** Map default zoom level. */\n zoom: 5,\n\n /** Attributes to display in list. */\n displayAttrib...
javascript
chosen
[ { "from": "system", "value": "Handle rate limit for file uploads\n" }, { "from": "human", "value": "\"use strict\";\n\nconst Constants = require(\"../../../Constants\");\nconst Events = Constants.Events;\nconst Endpoints = Constants.Endpoints;\nconst apiRequest = require(\"../../../core/ApiReque...
javascript
chosen
[ { "from": "system", "value": "Add path to Account entity\n" }, { "from": "human", "value": "\"use strict\";\n\nconst Entity = require('../../orm/entity');\nconst Text = require('../../orm/attribute/text');\n\nclass AccountEntity extends Entity {\n constructor(engine, name) {\n super(engine, ...
javascript
chosen
[ { "from": "system", "value": "Add completion for miscellaneous flags.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar fs = require('fs');\nvar path = require('path');\nvar tab = require('tabalot');\nvar noop = function() {}\nvar homedir = path.resolve(process.env[(process.platform ...
javascript
chosen
[ { "from": "system", "value": "Check for ajax errors before checking if term is created\n" }, { "from": "human", "value": "import $ from 'jquery';\n\nclass Taxonomy {\n\n /**\n * Initialize Papi taxonomy class.\n */\n static init() {\n new Taxonomy().binds();\n }\n\n /**\n * Bind ele...
javascript
chosen
[ { "from": "system", "value": "Prepend new events to the list of events (ugh... this is ugly)\n" }, { "from": "human", "value": "define([\n 'backbone',\n 'marionette',\n 'views/event/event',\n 'views/event/no_event'],\nfunction(Backbone, Marionette, EventView, NoEventView) {\n retu...
javascript
chosen
[ { "from": "system", "value": "Add location information in error reporting.\n\nWhen the Gearfile contains errors, add precise location information to the error name.\r\nSee https://github.com/joyent/node/issues/3452 for the undocumented boolean." }, { "from": "human", "value": "#!/usr/bin/env nod...
javascript
chosen
[ { "from": "system", "value": "Fix load event for notifications\n" }, { "from": "human", "value": "// client side\n// main.js\n// - create the global defines object\n// - routing using page.js\n// - more TODO as we go along\n\n// This is guranteed to be the first to be executed from our js files,...
javascript
chosen
[ { "from": "system", "value": "Increase perfs when loading a product's page\n" }, { "from": "human", "value": "'use strict';\n\nvar set_taxon_select = function(selector){\n if ($(selector).length > 0) {\n $(selector).select2({\n placeholder: Spree.translations.taxon_placeholder,\n m...
javascript
chosen
[ { "from": "system", "value": "Use Object.assign instead of ol/obj\n" }, { "from": "human", "value": "/**\n * @module ngeo.interaction.MeasureAreaMobile\n */\nimport ngeoInteractionMeasureArea from 'ngeo/interaction/MeasureArea.js';\nimport ngeoInteractionMobileDraw from 'ngeo/interaction/MobileD...
javascript
chosen
[ { "from": "system", "value": "Add a lint rule to enforce no more literals in jsx.\n" }, { "from": "human", "value": "module.exports = {\n root: true,\n extends: ['scratch', 'scratch/es6', 'scratch/react', 'plugin:import/errors'],\n env: {\n browser: true\n },\n globals: {\n...
javascript
chosen
[ { "from": "system", "value": "Exclude mobile devices from v4 ramp for now\n" }, { "from": "human", "value": "\nimport { isWebView, getAgent } from '../lib';\n\nconst SUPPORTED_AGENTS = {\n Chrome: 27,\n IE: 9,\n MSIE: 9,\n Firefox: 30,\n Safari: 5.1,\n Opera: 23\n};\n\nexport f...
javascript
chosen
[ { "from": "system", "value": "Return `Promise.resolve()` instead of `undefined` to match a real async function\n\nAsync functions always return promises, so do the same here.\n" }, { "from": "human", "value": "var assert = require('assert');\n\nclass AwaitLock {\n\n constructor() {\n this._a...
javascript
chosen
[ { "from": "system", "value": "Use __dirname and expand the JSON.\n" }, { "from": "human", "value": "// require the library\nvar CsvToArray = require (\"../index\");\n\n// and use it\nCsvToArray ({\n csvOptions: {\n delimiter: \";\"\n }\n , file: \"./input.csv\"\n , columns: [\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unused config var for torii session mgmt\n" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n EmberENV: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add fallback support for AngularJS $q if jQuery is undefined\n" }, { "from": "human", "value": "// Returns a jQuery deferred object, or pass a success and fail callbacks if you don't want to use jQuery\nvar getAppVersion = function (success, fail) {\n var dfr = nul...
javascript
chosen
[ { "from": "system", "value": "Fix an icon link that was generating bad URLs\n\nOn current staging, but not production, navigating directly to a path\nsuch as `/crates/crate-name` results in a request sent to\n`/crates/cargo-835dd6a18132048a52ac569f2615b59d.png` (a 404 response\nstatus).\n\nIt appears that t...
javascript
chosen
[ { "from": "system", "value": "[date-input] Fix wrong part name in import\n" }, { "from": "human", "value": "import React from 'react'\nimport {storiesOf} from 'part:@sanity/storybook'\nimport RichDateInput from 'part:@sanity/form-builder/input/richDate'\n\nstoriesOf('Icons').add(\n 'Date picker...
javascript
chosen
[ { "from": "system", "value": "Bring back commented lines of code.\n" }, { "from": "human", "value": "var Model;\n\nmodule(\"Ember.RecordArray\", {\n setup: function() {\n Model = Ember.Model.extend({\n id: Ember.attr(),\n name: Ember.attr()\n });\n Model.adapter = Ember.Fixtu...
javascript
chosen
[ { "from": "system", "value": "Stop all music on level exit\n" }, { "from": "human", "value": "module.exports = function(game) { // eslint-disable-line no-unused-vars\n};\n" }, { "from": "gpt", "value": "var tracksToStop = [\n \"ambient-sea-track.mp3\",\n \"trash-island-theme.mp3\",...
javascript
chosen
[ { "from": "system", "value": "Fix command check in resolve-redux\n\n" }, { "from": "human", "value": "import { put, call } from 'redux-saga/effects';\nimport checkRequiredFields from './warn_util';\n\nexport default function* sendCommandSaga({ sendCommand }, action) {\n const { command, aggre...
javascript
chosen
[ { "from": "system", "value": "Change triggerEvent possible value to mouseover for consistency\n" }, { "from": "human", "value": "(function($){\n $.fn.seAccordion = function(options) {\n var defaults = {\n header: 'h1',\n content: 'div',\n speed: 'slow',...
javascript
chosen
[ { "from": "system", "value": "Fix SCSS name in fulpfile\n" }, { "from": "human", "value": "// Run 'gulp' to do the important stuff\nvar gulp = require('gulp'),\n prefixer = require('gulp-autoprefixer'),\n sass = require('gulp-sass'),\n livereload = require('gulp-livereload'),\n nodemon = req...
javascript
chosen
[ { "from": "system", "value": "Return false on click event" }, { "from": "human", "value": "import Ember from 'ember';\n\nconst {\n Component\n} = Ember;\n\n/**\n * @module\n * @augments ember/Component\n */\nexport default Component.extend({\n\n // ---------------------------------------------...
javascript
chosen
[ { "from": "system", "value": "Remove js for related stickying\n" }, { "from": "human", "value": "//= require libs/jquery/jquery-ui-1.8.16.custom.min\n//= require libs/jquery/plugins/jquery.base64\n//= require libs/jquery/plugins/jquery.mustache.js\n//= require libs/jquery/plugins/jquery.player.m...
javascript
chosen
[ { "from": "system", "value": "Fix bug, need to return the value explicitly. Oh JavaScript." }, { "from": "human", "value": "//= require moment/moment\n//= require jquery/dist/jquery\n//= require jquery-ujs/src/rails\n//= require lodash/dist/lodash\n//= require handlebars.runtime\n//= require kno...
javascript
chosen
[ { "from": "system", "value": "Add initial widget and dashboard collections\n" }, { "from": "human", "value": "/**\n * @fileoverview\n * Provides methods for connecting the app's frontend to the endpoints API.\n * \n * @author trevor.nelson1@gmail.com (Trevor Nelson)\n * Based off of the hello-en...
javascript
chosen
[ { "from": "system", "value": "Remove dead code from the debugging process\n" }, { "from": "human", "value": "/*jshint node:true */\n\nconsole.log(\"Addon transformation complete.\");\n\nvar firefox,\n interval = setInterval(function () { }, 1000);\n\nprocess.on('SIGTERM', function () {\n if (f...
javascript
chosen
[ { "from": "system", "value": "Fix test by returning promise\n" }, { "from": "human", "value": "const path = require('path');\nconst test = require('ava');\nconst findModule = require('../lib/find_module');\n\nconst dir = path.join(__dirname, '..', 'testdata');\n\nconst runFind = function(t, symb...
javascript
chosen
[ { "from": "system", "value": "Add Display.html_contact js method that injects rendered contact template onto page\n" }, { "from": "human", "value": "$(document).ready(function(){\n console.log(\"Connected\");\n Search.form_listener();\n Display.list_listener();\n})\n\nvar Search = (function()...
javascript
chosen
[ { "from": "system", "value": "Fix where putting app styles\n" }, { "from": "human", "value": "import React from 'react'\n\nimport { prefixLink } from 'gatsby-helpers'\nimport { GoogleFont, TypographyStyle } from 'typography-react'\nimport typography from './utils/typography'\nimport HTMLScripts ...
javascript
chosen
[ { "from": "system", "value": "Add the announced global schema\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies.\n */\nvar mongoose = require('mongoose'),\n\tSchema = mongoose.Schema;\n\n/**\n * Superhero Schema\n */\nvar SuperheroSchema = new Schema({\n\tname: {\n\...
javascript
chosen
[ { "from": "system", "value": "Add “Settlement” transaction type for Cash Transactions. AMAAS-2012\n" }, { "from": "human", "value": "export const CASH_TRANSACTION_TYPES = [ 'Cashflow', 'Coupon', 'Dividend', 'Payment' ]\nexport const TRANSACTION_TYPES = [ 'Allocation', 'Block', 'Exercise', 'Expir...
javascript
chosen
[ { "from": "system", "value": "Fix for 'CreateListFromArrayLike called on non-object'\n" }, { "from": "human", "value": "if (!window['$']) var $ = function a(){}\n(function a(){\n $.get('https://api.github.com/repos/KaMeHb-UA/LeNode/releases/latest', function(data, status){\n if (status...
javascript
chosen
[ { "from": "system", "value": "Add none webpack mode for unit tests\n" }, { "from": "human", "value": "import path from 'path';\nimport nodeExternals from 'webpack-node-externals';\n\nexport default {\n entry: {\n js: [path.resolve(__dirname, './suite/index.js')],\n },\n output: {\n path...
javascript
chosen
[ { "from": "system", "value": "Set possible to use ~\n" }, { "from": "human", "value": "// http://eslint.org/docs/user-guide/configuring\n\nmodule.exports = {\n root: true,\n parser: 'babel-eslint',\n parserOptions: {\n sourceType: 'module'\n },\n env: {\n browser: true,\n },\n exten...
javascript
chosen
[ { "from": "system", "value": "dev-mode: Add crates to the scenario\n" }, { "from": "human", "value": "import { module, test } from 'qunit';\n\nimport { setupApplicationTest } from 'cargo/tests/helpers';\n\nimport { visit } from '../helpers/visit-ignoring-abort';\n\nlet s = new URLSearchParams(wi...
javascript
chosen