conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove unnessasary Ember.on('init') from test controller\n" }, { "from": "human", "value": "/* globals ENABLE_FOO */\n/* globals ENABLE_BAR */\n\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n foo: Ember.on('init', Ember.computed(() => {\n...
javascript
chosen
[ { "from": "system", "value": "Fix issue with output app\n" }, { "from": "human", "value": "import { ObjectId } from 'mongodb';\nimport { GraphQLScalarType } from 'graphql';\nimport { Kind } from 'graphql/language';\nimport merge from 'lodash.merge';\n\nconst resolvers = {};\n\nresolvers.ObjID = ...
javascript
chosen
[ { "from": "system", "value": "Test closing github issue automatically for default branch\n\nFixes #5\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n let path = require('path');\n let express = require('express');\n let http = require('http');\n let _ = require('lodash')...
javascript
chosen
[ { "from": "system", "value": "Make second signal installation test enforce Gtk.Window.type as the return type rather than GObject.TYPE_OBJECT.\n\nsvn path=/trunk/; revision=408\n" }, { "from": "human", "value": "#!/usr/bin/env seed\n// Returns: 0\n// STDIN:\n// STDOUT:2 Weathermen\\n\\[object Gt...
javascript
chosen
[ { "from": "system", "value": "Update quickstart example to better illustrate DI\n" }, { "from": "human", "value": "var botstrap = require('../../lib');\n\nvar bot = botstrap.createBot({\n token:\n});\n\n// responds to any message beginning with !reverse or !esrever\nbot.command(['reverse', 'esr...
javascript
chosen
[ { "from": "system", "value": "Fix the association model on the association route\n" }, { "from": "human", "value": "'use strict';\nvar _ = require('lodash');\nvar Inflector = require('inflected');\nvar auth = require('../services/auth');\nvar HasManyFinder = require('../services/has-many-finder'...
javascript
chosen
[ { "from": "system", "value": "Integrate store locator admin JS with new API results\n" }, { "from": "human", "value": "$j = django.jQuery\n\ntry {\n get_lat_long_url = get_lat_long_url + '?q=';\n}\ncatch(err) {\n get_lat_long_url = window.location.href + '../get_lat_long/?q=';\n}\n\nfuncti...
javascript
chosen
[ { "from": "system", "value": "Replace localhost with the host the page was requested through.\n" }, { "from": "human", "value": "/**\n * Created by Ryan Lamb on 9/16/16.\n */\n\ndefine(function (require) {\n var mapEngine = require('MapClient/MapEngine/mapengine');\n var mapData = require(...
javascript
chosen
[ { "from": "system", "value": "Create new Board object in reducer\n\n* store singleton object, so board object does not modify by #movePiece.\n" }, { "from": "human", "value": "import Shogi from '../src/shogi';\n\nconst InitialState = {\n board: Shogi.Board,\n isHoldingPiece: undefined\n};\n\nc...
javascript
chosen
[ { "from": "system", "value": "Remove reference to non-existant controller\n" }, { "from": "human", "value": "var app = angular.module(\"app\", [\"ngRoute\"]);\n\napp.config(function ($routeProvider) {\n $routeProvider\n .when(\"/\",\n {\n controller: \"HomeController\",...
javascript
chosen
[ { "from": "system", "value": "Add \"him\" and \"hers\" to list of gendered terms\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport Base from 'ember-validations/validators/base';\n\nexport default Base.extend({\n call: function() {\n var prop = this.model.get(this.property...
javascript
chosen
[ { "from": "system", "value": "Add gluestick build to docker file\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar fs = require('fs');\n\nvar version = JSON.parse(fs.readFileSync(\"./package.json\")).version;\nvar tag = \"truecar/gluestick:\" + version;\n\nvar dockerfile = [\n ...
javascript
chosen
[ { "from": "system", "value": "Fix job search bar filter request\n\n" }, { "from": "human", "value": "import Request from \"superagent\";\n\nexport const list = ({ page }) => (\n Request.get(`/api/jobs?page=${page}`)\n);\n\nexport const filter = ({ term }) => (\n Request.get(`/api/jobs?find...
javascript
chosen
[ { "from": "system", "value": "Fix changed interface in bCrypt\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\nvar bcrypt = require('bcrypt-nodejs');\n\nvar config = require('../config');\n\nvar UserSchema = new Schema({\n username: {type: ...
javascript
chosen
[ { "from": "system", "value": "Add tests about the server.\n" }, { "from": "human", "value": "import Server from './server';\nimport { MockSocket } from './com/mocks';\n\ndescribe('Server', function() {\n\tbeforeEach(function() {\n\t\tthis.server = new Server();\n\t});\n\n\tdescribe('connection o...
javascript
chosen
[ { "from": "system", "value": "Change AbortSignal from @record to @interface\n\nPiperOrigin-RevId: 377969274\n" }, { "from": "human", "value": "/*\n * Copyright 2018 The Closure Compiler Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this fil...
javascript
chosen
[ { "from": "system", "value": "Add some description to request tracker directive\n" }, { "from": "human", "value": "angular.module('codebrag.common.directives')\n\n\t.directive('httpRequestTracker', function($http) {\n\t\treturn {\n\t\t\trestricted: 'A',\n\t\t\tscope: {},\n\t\t\tlink: function(sc...
javascript
chosen
[ { "from": "system", "value": "Change Footer report link to issues\n" }, { "from": "human", "value": "import React, { Component } from \"react\"\n\nimport styles from \"./index.css\"\nimport logo from \"./evilmartians.svg\"\n\nexport default class Footer extends Component {\n\n render() {\n r...
javascript
chosen
[ { "from": "system", "value": "Fix typo in error subscription path\n" }, { "from": "human", "value": "import { apply, call, cancelled, put, take } from 'redux-saga/effects'\n\nimport { createSubscriptionChannel } from '../utils/websocket'\nimport { actions } from '../redux/errors'\n\nexport defau...
javascript
chosen
[ { "from": "system", "value": ":new: Store a manifest cache in ManifestRegistry\n" }, { "from": "human", "value": "// @flow\n\nimport fs from 'sb-fs'\nimport path from 'path'\nimport pMap from 'p-map'\n\nexport default class ManifestRegistry {\n cache: Map<string, {| version: string, lastModifie...
javascript
chosen
[ { "from": "system", "value": "fix(sqlite): Update metadata filename when writing\n\nAfter https://github.com/pelias/whosonfirst/pull/389 and\nhttps://github.com/pelias/wof-admin-lookup/pull/229, WOF metafiles are\nexpected to follow the pattern `whosonfirst-data-${layer}-latest.csv`. We\nmissed the code tha...
javascript
chosen
[ { "from": "system", "value": "Add atmosphere details to resources\n" }, { "from": "human", "value": "export var bodies = {\n\tKerbin: {\n\t\tname: 'Kerbin',\n\t\tradius: 600000,\n\t\tatmosphere: 70000,\n\t\trotPeriod: 21600,\n\t\ttextures: {\n\t\t\tdiffuse: require('../../../assets/img/maps/kerb...
javascript
chosen
[ { "from": "system", "value": "Change slug to key to match FlatList implementation\n" }, { "from": "human", "value": "const fs = require('fs');\nconst _ = require('lodash');\n_.mixin(require('lodash-inflection'));\n\nconst IMAGE_PATH = process.argv[2];\n\nconst images = fs.readdirSync(IMAGE_PATH,...
javascript
chosen
[ { "from": "system", "value": "Create flow for build and deploy\n" }, { "from": "human", "value": "const gulp = require('gulp'),\n browser = require('browser-sync');\n\n\ngulp.task('server', function() {\n\n //Iniciando o servidor\n browser.init({\n server: {\n baseDir:...
javascript
chosen
[ { "from": "system", "value": "Add gulp test help info via JSdoc comment\n\nNext step: implement gulp app/build/compile.\n" }, { "from": "human", "value": "const _ = require('lodash/fp');\nconst args = require('yargs').argv;\nconst gulp = require('gulp');\nconst gutil = require('gulp-util');\n// ...
javascript
chosen
[ { "from": "system", "value": "Change build folder to build/\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar babel = require('gulp-babel');\nvar del = require('del');\nvar eslint = require('gulp-eslint');\n\n// CONSTANTS ========================================================...
javascript
chosen
[ { "from": "system", "value": "Fix wallaby node runner version\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function () {\n return {\n files: ['lib/**/*.js'],\n tests: ['test/**/*.js'],\n testFramework: 'jasmine',\n env: {\n type: 'node',\n runner: '...
javascript
chosen
[ { "from": "system", "value": "Change publicPath from /dist/ to /\n" }, { "from": "human", "value": "const path = require('path')\nconst webpack = require('webpack')\nconst WebpackMd5Hash = require('webpack-md5-hash')\nconst ExtractTextPlugin = require('extract-text-webpack-plugin')\n\nmodule.exp...
javascript
chosen
[ { "from": "system", "value": "Refactor loading of scripts to reduce redundant logic\n" }, { "from": "human", "value": "var j = document.createElement('script');\nj.src = chrome.extension.getURL('lib/jquery-2.1.4.min.js');\n(document.head || document.documentElement).appendChild(j);\n\nvar k = do...
javascript
chosen
[ { "from": "system", "value": "Add result screen to state manager\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* @namespace Darwinator\n*/\nwindow.Darwinator = window.Darwinator || {\n\n start: function(game) {\n game.state.add('boot', this.Boot);\n game.state.add('preloader', ...
javascript
chosen
[ { "from": "system", "value": "Fix class name collision in CSS modules\n" }, { "from": "human", "value": "const ExtractTextPlugin = require('extract-text-webpack-plugin')\nconst {ENV} = require('./paths')\n\nconst cssLoader = {\n loader: 'css-loader',\n options: {\n modules: true,\n sourc...
javascript
chosen
[ { "from": "system", "value": "Add onMove function to options\n" }, { "from": "human", "value": "/* global console, Calendar, vis */\n\n(function() {\n \"use strict\";\n\n var calendar = new Calendar();\n calendar.init(document.getElementById('visualization'),\n {\n height: \"100...
javascript
chosen
[ { "from": "system", "value": "Add the timer for disconnecting, one minute after going in the background it'll disconnect\n" }, { "from": "human", "value": "if (Meteor.isCordova) {\n\tdocument.addEventListener('pause', () => {\n\t\tUserPresence.setAway();\n\t\treadMessage.disable();\n\t\tMeteor.d...
javascript
chosen
[ { "from": "system", "value": "Fix response format for failed sign-in attempt\n\nThe format of response for \"Missing credentials\" is:\n{ \"err\": { message: \"Missing credentials\" } }\n\nThe format we have everywhere else is:\n{ \"err\": \"Error details\" }\n\nThis change makes the former response consist...
javascript
chosen
[ { "from": "system", "value": "Remove exit from start event payload\n" }, { "from": "human", "value": "'use strict';\n\nconst { mapValues, omit, pSetTimeout } = require('../utilities');\nconst { logEvent } = require('../log');\nconst { getDefaultDuration } = require('../perf');\n\n// Create event...
javascript
chosen
[ { "from": "system", "value": "Use authExpired action; fix session timeout notification logic\n" }, { "from": "human", "value": "// import {replace} from 'react-router-redux'\n\nimport {authReceived, meReceived} from 'shared/actions/auth'\nimport {publishNotification as notify} from 'shared/actio...
javascript
chosen
[ { "from": "system", "value": "Make non-link ColumnLinks behave as links\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\n\nconst ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {\n co...
javascript
chosen
[ { "from": "system", "value": "Move event handling into its own method\n" }, { "from": "human", "value": "'use babel';\n\nimport { CompositeDisposable } from 'atom';\n\nexport default {\n\n subscriptions: null,\n\n activate() {\n // Events subscribed to in atom's system can be easily cleaned...
javascript
chosen
[ { "from": "system", "value": "Refactor get options git status\n" }, { "from": "human", "value": "'use strict';\n\nvar utils = require('../utils/utilsCtrl.js');\n\n\nfunction createColumnsObj(lists) {\n var columns = {};\n\n for(var list in lists) {\n lists[list].forEach(function(column) {\n...
javascript
chosen
[ { "from": "system", "value": "Fix bad comma in object\n" }, { "from": "human", "value": "/*global angular */\nrequire.config({\n shim: {\n 'angular': {\n exports: 'angular'\n }\n },\n paths: {\n app: 'js/app',\n angular: './components/angular/angular'\n },\n baseUrl: '/'\n}...
javascript
chosen
[ { "from": "system", "value": ":fire: Remove an unnecessary eslint supression\n" }, { "from": "human", "value": "// @flow\n\n/* eslint-disable no-param-reassign */\n\nimport get from 'lodash/get'\nimport set from 'lodash/set'\n\ntype RetVal = Object\n\nexport function processPayload(data: Object)...
javascript
chosen
[ { "from": "system", "value": "Add auth header if token is present.\n" }, { "from": "human", "value": "(function() {\n angular.module('notely.login')\n .factory('AuthInterceptor', AuthInterceptor);\n\n function AuthInterceptor() {\n return {\n request: function(config) {\n ret...
javascript
chosen
[ { "from": "system", "value": "Fix tabbar for requests and expertise\n" }, { "from": "human", "value": "/**\n *\tfills the righthandside flexTab-Bar with the relevant tools\n *\t@see packages/rocketchat-livechat/client/ui.js\n *\t@see packages/rocketchat-lib/client/defaultTabBars.js\n */\n\nRocke...
javascript
chosen
[ { "from": "system", "value": "Use regular expression for target types\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash');\nvar commander = require('commander');\nvar path = require('path');\nvar Queue = require('gear').Queue;\nvar registry = require('...
javascript
chosen
[ { "from": "system", "value": "chore(devops): Change GRAPHQ_URL env variable to default react app config\n" }, { "from": "human", "value": "import { ApolloClient } from 'apollo-client'\nimport { createHttpLink } from 'apollo-link-http'\nimport { setContext } from 'apollo-link-context'\nimport { I...
javascript
chosen
[ { "from": "system", "value": "Use FIREBASE_URL in auth module.\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular\n .module('app.auth')\n .controller('AuthController', AuthController);\n\n AuthController.$inject = ['$location', '$firebaseAuth'];\n\n function A...
javascript
chosen
[ { "from": "system", "value": "Use the SF download links (hack since we can't specify a class with sphinx)\n" }, { "from": "human", "value": "// Avoid `console` errors in browsers that lack a console.\n(function() {\n var method;\n var noop = function () {};\n var methods = [\n 'a...
javascript
chosen
[ { "from": "system", "value": "Make the selenium test log the content of the /assert report to the console\n" }, { "from": "human", "value": "/* global process */\nvar WebDriver = require(\"selenium-webdriver\");\n\nvar driver;\nif (process.env.SAUCE_USERNAME !== undefined) {\n var browserArra...
javascript
chosen
[ { "from": "system", "value": ":fire: Remove mp-weixin's AOP of 'navigateTo'\n" }, { "from": "human", "value": "import navigateTo from 'uni-helpers/navigate-to'\r\nimport redirectTo from '../../helpers/redirect-to'\r\nimport previewImage from '../../helpers/normalize-preview-image'\r\n\r\nfunctio...
javascript
chosen
[ { "from": "system", "value": "Make it easy to swap out dev code for now\n" }, { "from": "human", "value": "import { createHttpLink } from 'apollo-link-http';\n\nexport default createHttpLink({ uri: 'https://api.newspring.cc/graphql' });\n" }, { "from": "gpt", "value": "import { creat...
javascript
chosen
[ { "from": "system", "value": "Use relative import for util for now.\n" }, { "from": "human", "value": "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * External dependencies\n */\nimport { sanitizeHTML } from 'assets/js/util';\n\nexport const setting...
javascript
chosen
[ { "from": "system", "value": "Put readonly on mother tongue instead of disabled\n" }, { "from": "human", "value": "$(document).ready(function() {\n // There is no default option for disabling a field with django-bootstrap4\n $('#id_mother_tongue').prop('disabled', true);\n\n // Set tool...
javascript
chosen
[ { "from": "system", "value": "Exclude entries from unit test report\n" }, { "from": "human", "value": "// For a detailed explanation regarding each configuration property, visit:\n// https://jestjs.io/docs/en/configuration.html\n\nmodule.exports = {\n\tpreset: 'ts-jest',\n\ttestEnvironment: 'nod...
javascript
chosen
[ { "from": "system", "value": "Remove the JSON parse for the health response\n" }, { "from": "human", "value": "const got = require('got');\n\nmodule.exports = data => {\n if (typeof data === 'string') {\n data = { url: data };\n }\n data.method = data.method || 'get';\n data.options = Obj...
javascript
chosen
[ { "from": "system", "value": "Add missing jsunit and asserts requires to the goog.module test\n\n-------------\nCreated by MOE: https://github.com/google/moe\nMOE_MIGRATED_REVID=152205130\n" }, { "from": "human", "value": "// Copyright 2016 The Closure Rules Authors. All rights reserved.\n//\n//...
javascript
chosen
[ { "from": "system", "value": "Disable sourcemaps and compress CSS\n" }, { "from": "human", "value": "/*jshint node:true*/\n/* global require, module */\nvar EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n var app = new EmberApp(defaults, {\n ...
javascript
chosen
[ { "from": "system", "value": "Clear login form upon login.\n" }, { "from": "human", "value": "core.controller('LoginController', function ($controller, $location, $scope, RestApi, StorageService, User) {\n\t\n angular.extend(this, $controller('AbstractController', {$scope: $scope}));\n \n ...
javascript
chosen
[ { "from": "system", "value": "Add a sanity check when reading translation json data\n\ncloses MAT-200\nflag=none\n\ntest plan:\n - the build succeeds\n - muck with one of the packages/translations/lib/canvas-rce/*.json\n files so it's no longer valid json\n - run `yarn installTranslations` from canvas...
javascript
chosen
[ { "from": "system", "value": "Update middleware to support new router action naming\n" }, { "from": "human", "value": "/* global __WEB__*/\n\nconst scrollTopMiddleware = () => (next) => (action) => {\n if (action.type === '@@router/UPDATE_PATH') {\n window.scrollTo(0, 0);\n }\n\n ...
javascript
chosen
[ { "from": "system", "value": "Create GameManager.moveAvailable method, and pass unit test.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('Game', [])\n.service('GameManager', function() {\n // Create a new game\n this.newGame = function() {};\n // Handle ...
javascript
chosen
[ { "from": "system", "value": "Fix lti collaborations page unresponsive on load in chrome\n\nfixes VICE-2440\nflag=none\n\nTest Plan:\n - follow repro steps in linked ticket\n\nChange-Id: I9b682719ea1e258f98caf90a197167a031995f7b\nReviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284881\nReviewed-by...
javascript
chosen
[ { "from": "system", "value": "Update server port to log\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n sass = require('gulp-ruby-sass'),\n prefix = require('gulp-autoprefixer'),\n livereload = require('gulp-livereload'),\n util = require('gulp-util');\n\nvar LIVEREL...
javascript
chosen
[ { "from": "system", "value": "Update pseudocde with newer plan, begin reverseArr function\n" }, { "from": "human", "value": "// Reverse Array In Place\n\n/*RULES:\n Take array as parameter\n Reverse array\n Return reversed array\n\n NOTES:\n Can't create new empty array to push in\n Mu...
javascript
chosen
[ { "from": "system", "value": "Use deterministic name to make test always fail\n\nProblem: The test passes if the directory already exists, which makes it\nintermittent and hard to debug.\n\nSolution: Use a unique directory name for each instance of the test,\nwhich makes the test fail consistently.\n" }, ...
javascript
chosen
[ { "from": "system", "value": "Validate swagger spec in gulp task\n" }, { "from": "human", "value": "'use strict';\nconst gulp=require('gulp');\nconst $=require('gulp-load-plugins')();\n\ngulp.task('eslint',function(){\n return gulp.src(['*.js','api/**/*.js'])\n .pipe($.gitmodified('modified'))...
javascript
chosen
[ { "from": "system", "value": "Modify server url to follow blue/green\n" }, { "from": "human", "value": "/*\n * Configuration values needed in js codes\n *\n * NOTE:\n * Please use the following command to avoid accidentally committing personal changes\n * git update-index --assume-unchanged src/...
javascript
chosen
[ { "from": "system", "value": "Upgrade dom-ruler version in blueprint\n" }, { "from": "human", "value": "module.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function() {\n return this.addBowerPackageToProject('dom-ruler#0.1.4');\n }\n};\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Fix unresolved modules in config watcher\n" }, { "from": "human", "value": "import fs from 'fs'\nimport path from 'path'\nimport resolve from 'resolve'\nimport detective from 'detective'\n\nfunction createModule(file) {\n const source = fs.readFileSync(file, 'utf-8...
javascript
chosen
[ { "from": "system", "value": "Add afterInstall to automatically add {{head-layout}} to application.hbs\n" }, { "from": "human", "value": "/*jshint node:true*/\nmodule.exports = {\n description: '',\n normalizeEntityName: function() { }\n\n // locals: function(options) {\n // // Return cust...
javascript
chosen
[ { "from": "system", "value": "Revert \"Adding exclusion for reconstructive.js loading\"\n\nThis reverts commit f158837d5152bf6b5c6e75ed45d22348fecc3a0f.\n\nThis exclusion is not needed as the recursive loop was caused by the server\n" }, { "from": "human", "value": "/* eslint-env serviceworker *...
javascript
chosen
[ { "from": "system", "value": "Add ice skating routes to used services\n" }, { "from": "human", "value": "import {Schema} from 'normalizr';\nimport {normalizeActionName} from '../common/helpers';\n\nexport const UnitServices = {\n MECHANICALLY_FROZEN_ICE: 33417,\n ICE_SKATING_FIELD: 33418,\n I...
javascript
chosen
[ { "from": "system", "value": "Revert \"add item recognition function\"\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n let blogTitle = document.querySelector('.blog-title');\n let titleText = document.createTextNode('Mister Mercedes');\n\n blogTitle.appendChild(titleText...
javascript
chosen
[ { "from": "system", "value": "Fix a postAccessRequired check for the case of nonexisting post\n\n" }, { "from": "human", "value": "import { ForbiddenException, NotFoundException, ServerErrorException } from '../../support/exceptions';\nimport { dbAdapter } from '../../models';\n\n\nexport functi...
javascript
chosen
[ { "from": "system", "value": "Add error to debug call on JSON parse error\n" }, { "from": "human", "value": "'use strict';\nconst ReconnectingWebSocket = require('./ReconnectingWebSocket');\nconst debug = require('debug')('awry:ARIWebSocket');\n\nclass ARIWebSocket extends ReconnectingWebSocket ...
javascript
chosen
[ { "from": "system", "value": "Fix some issues exposed when making function statics sealed\n\nReviewed By: SamChou19815\n\nDifferential Revision: D40736389\n\nfbshipit-source-id: a3e1c3f5723081bf76e2dbdb637b4deb7a54e180\n" }, { "from": "human", "value": "/**\n * Copyright (c) Meta Platforms, Inc....
javascript
chosen
[ { "from": "system", "value": "Change admin path and link layout\n" }, { "from": "human", "value": "// Simulate config options from your production environment by\n// customising the .env file in your project's root folder.\nrequire('dotenv').config();\n\n// Require keystone\nvar keystone = requi...
javascript
chosen
[ { "from": "system", "value": "Add localization support for speech\n" }, { "from": "human", "value": "'use strict';\n\nconst evalString = require('../eval-string');\nconst correctSSML = require('ssml-validator').correct;\n\nmodule.exports = (inputText, context) => {\n if(!inputText){ return; }\...
javascript
chosen
[ { "from": "system", "value": "Change core.log component’s child logger initialization text\n" }, { "from": "human", "value": "/**\n * @briskhome\n * └core.log <lib/core.log/index.js>\n */\n\nconst bunyan = require('bunyan');\n\nmodule.exports = function setup(options, imports, register) {\n con...
javascript
chosen
[ { "from": "system", "value": "Add timestamps (created/updated) to event schema\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\n\n\nvar EventSchema = new mongoose.Schema({\n title: {type: String, trim: true},\n description: {type: String, trim: true},\n startAt: D...
javascript
chosen
[ { "from": "system", "value": "Update with new input controls\n" }, { "from": "human", "value": "import loop from 'loop';\nimport { render as renderUI, uiElements, clearUi } from 'ui';\nimport { clear } from 'pura/canvas/tuple';\nimport { subtractSet } from 'pura/vector/tuple';\nimport state from...
javascript
chosen
[ { "from": "system", "value": "Add support for the `disabled` attribute on radio inputs.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.View.extend({\n tagName: 'input',\n type: 'radio',\n attributeBindings: ['type', 'htmlChecked:checked', 'value', ...
javascript
chosen
[ { "from": "system", "value": "Remove error and statusCode output\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\nvar request = require('request');\n\nrequest('http://drizzy-server.herokuapp.com/lyric', function (error, response, body) {\n console.log('error:', error); // Print the er...
javascript
chosen
[ { "from": "system", "value": "Make $METEOR_NPM_REBUILD_FLAGS override default flags.\n" }, { "from": "human", "value": "// Command-line arguments passed to npm when rebuilding binary packages.\nvar args = [\n \"rebuild\",\n\n // The --no-bin-links flag tells npm not to create symlinks in the\n...
javascript
chosen
[ { "from": "system", "value": "Change to 0 for compressionSize\n" }, { "from": "human", "value": "var self = window.Flow;\nwindow.Flow.FlowChunk.prototype.getParams = function () {\n return {\n // flowChunkNumber: this.offset + 1,\n // flowChunkSize: this.flowObj.opts.chunkSize,\n ...
javascript
chosen
[ { "from": "system", "value": "Add a couple more test sites\n" }, { "from": "human", "value": "export let baseUrl = 'http://rosettastack.com';\nexport let sites = [{\n name: 'Programmers',\n slug: 'programmers',\n seUrl: 'http://programmers.stackexchange.com/',\n langs: ['en', 'fr'],\n db: '...
javascript
chosen
[ { "from": "system", "value": "Load same resources only once per page load, works around Firefox sending second request without cache headers, eases load on the server and improves loading speed\n" }, { "from": "human", "value": "var dataSource = function () {\n var module = {};\n\n module....
javascript
chosen
[ { "from": "system", "value": "Add docs for JS changeset utilitities\n" }, { "from": "human", "value": "import { defaults, isArray, map, mapValues } from 'lodash'\n\nexport function flattenChangesetValues(changeset) {\n const result = defaults({}, changeset.changes, changeset.data)\n\n return m...
javascript
chosen
[ { "from": "system", "value": "Add try catch to investigate other errors\n" }, { "from": "human", "value": "/* global describe, it */\n\nimport {exec} from '../../../src/utils/util';\nimport assert from 'assert';\nrequire('chai').should();\n\ndescribe(\"Oi CLI\", () => {\n\n it(\"can be invoked\...
javascript
chosen
[ { "from": "system", "value": "Remove unused 'Ember' import in title config\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nimport DocumentTitle from \"ember-document-title/mixins/document-title\";\n\nDocumentTitle.reopen({\n \"titleSpecificityIncreases\": false,\n \"titleD...
javascript
chosen
[ { "from": "system", "value": "Hide other motivation fields when switching between states\n" }, { "from": "human", "value": "import { show, hide } from '@utils';\n\nexport function showMotivation(event, state) {\n event.preventDefault();\n show(document.querySelector(`.motivation.${state}`));\n...
javascript
chosen
[ { "from": "system", "value": "Update send long range message timeline item to support sending messages from within the ship.\n" }, { "from": "human", "value": "import React from \"react\";\nimport { FormGroup, Label, Input } from \"reactstrap\";\n\nexport default ({ updateArgs = () => {}, args, ...
javascript
chosen
[ { "from": "system", "value": "Set tocify scrollTo property to offset top banner\n" }, { "from": "human", "value": "/**\n * User: powerumc\n * Date: 2014. 5. 18.\n * Time: ������ 8:39\n */\n\n\n$(function() {\n\t$(function () {\n\t\t$.ajax({\n\t\t\turl: \"README.md\",\n\t\t\ttype: \"GET\",\n\t\t\...
javascript
chosen
[ { "from": "system", "value": "Add 3rd parameter to addEventListener for backwards browser compatibility.\n\nSee notes in https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.addEventListener#Syntax\n" }, { "from": "human", "value": "//= require openseadragon\n\n(function($) {\n var __os...
javascript
chosen
[ { "from": "system", "value": "Fix case where installOn is undefined\n" }, { "from": "human", "value": "var utils = require('shipit-utils');\n\n/**\n * Symfony tasks\n */\n\nmodule.exports = function (gruntOrShipit) {\n require('./vendors')(gruntOrShipit);\n require('./cache')(gruntOrShipit);\n...
javascript
chosen
[ { "from": "system", "value": "Fix typo in trigger() arguments.\n" }, { "from": "human", "value": "function on(nm, cb, capture) {\n this.each(function(el) {\n el.addEventListener(nm, cb, capture);\n });\n return this;\n}\n\nfunction off(nm, cb, capture) {\n this.each(function(el) {\n el...
javascript
chosen
[ { "from": "system", "value": "Remove the comments from the generated UMD files\n" }, { "from": "human", "value": "// @ts-check\n\nimport typescript from 'rollup-plugin-typescript2';\nimport uglify from 'rollup-plugin-uglify';\nimport gzip from 'rollup-plugin-gzip';\nimport filesize from 'rollup-...
javascript
chosen
[ { "from": "system", "value": "Fix potential null pointer during product translation\n" }, { "from": "human", "value": "const utils = require('../lib/utils')\nconst insecurity = require('../lib/insecurity')\nconst models = require('../models/index')\nconst challenges = require('../data/datacache'...
javascript
chosen
[ { "from": "system", "value": "Transform args into proper arrays\n" }, { "from": "human", "value": "'use strict';\n\nvar Bluebird = require('bluebird');\nvar _path = require('path');\nvar redefine = require('redefine');\n\nmodule.exports = redefine.Class({\n constructor: function(path, option...
javascript
chosen
[ { "from": "system", "value": "Test with real example of AJAX\n" }, { "from": "human", "value": "document.getElementById(\"ayuda\").setAttribute(\"aria-current\", \"page\");\n\nvar aside = document.getElementById(\"complementario\");\nvar button = document.createElement(\"BUTTON\");\nvar text = d...
javascript
chosen
[ { "from": "system", "value": "Fix tests issues with namespaces changes\n" }, { "from": "human", "value": "\r\n\r\nfunction runTests(testType, BABYLON, GUI, INSPECTOR) {\r\n\r\n console.log(\"running tests\");\r\n\r\n describe(testType + ' module tests', function () {\r\n\r\n it(\"sh...
javascript
chosen