conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update docs after building Travis build 224 of\nregro/regolith\n\nThe docs were built from the branch 'master' against the commit\n2cae806beee82e089f843dfbb254603d838475f7.\n\nThe Travis build that generated this commit is at\nhttps://travis-ci.org/regro/regolith/jobs/355514019...
javascript
chosen
[ { "from": "system", "value": "Set slider value when adding a new congestion battery\n\nThis would work when editing an existing battery, but without triggering\nthe event manually it would default to 0% when adding a new battery.\n" }, { "from": "human", "value": "var BatteryTemplateUpdater = (f...
javascript
chosen
[ { "from": "system", "value": "Add flexible find Application service" }, { "from": "human", "value": "angular.module('app').factory('applicationService', ['$http', 'MARLINAPI_CONFIG',\n function($http, MARLINAPI_CONFIG) {\n\n var url = MARLINAPI_CONFIG.base_url;\n\n // create and...
javascript
chosen
[ { "from": "system", "value": "Add recipe list to overview view\n" }, { "from": "human", "value": "var React = require('react');\nvar Parse = require('parse');\nvar ParseReact = require('parse-react');\n\nvar RecipeList = new React.createClass({\n\tmixins: [ParseReact.Mixin],\n\t\n\tobserve: func...
javascript
chosen
[ { "from": "system", "value": "Use content size when creating the main window\n" }, { "from": "human", "value": "import Window from './window'\nimport {ipcMain} from 'electron'\nimport resolveRoot from '../resolve-root'\nimport hotPath from '../hot-path'\nimport flags from '../shared/util/feature...
javascript
chosen
[ { "from": "system", "value": "Add encode on global.js file read. node v4.x compat.\n" }, { "from": "human", "value": "var fs = require('fs');\nvar p = require('path');\nvar slug = require('slug');\nvar url = require('url');\nvar util = require('util');\n\nslug.defaults.mode ='rfc3986';\n\n...
javascript
chosen
[ { "from": "system", "value": "Make message field as required\n" }, { "from": "human", "value": "'use strict';\n\nvar mongoose = require('mongoose');\n\nconst WAITING_FOR_PRINT = 'WAITING_FOR_PRINT';\nconst PRINTED_WAITING_FOR_SEND = 'PRINTED_WAITING_FOR_SEND';\nconst SENT = 'SENT';\n\nvar status...
javascript
chosen
[ { "from": "system", "value": "Fix console input focus on clearing.\n" }, { "from": "human", "value": "import {connect} from 'react-redux';\nimport Console from '../components/Console';\nimport {\n getCurrentCompiledProjectKey,\n getConsoleHistory,\n getCurrentProjectKey,\n getHiddenUICompone...
javascript
chosen
[ { "from": "system", "value": "Add border bottom to divs.\n" }, { "from": "human", "value": "import inputData from './data.js';\nimport infiniteDivs from '../../lib/infinitedivs.js';\n\nlet rootElement = document.body;\n\nfunction divGenerator(item) {\n let div = document.createElement('div'),\n...
javascript
chosen
[ { "from": "system", "value": "Add cors header to example\n" }, { "from": "human", "value": "const http = require(\"http\")\nconst url = require(\"url\")\nconst namor = require(\"namor\")\n\nconst server = http.createServer((req, res) => {\n\tconst { query } = url.parse(req.url, true)\n\n\tconst ...
javascript
chosen
[ { "from": "system", "value": "Remove babel-stage-0 preset to prevent crash in Electron 1.x\n" }, { "from": "human", "value": "module.exports = {\n presets: [\"es2015-node4\", \"stage-0\", \"react\"],\n plugins: [\n \"add-module-exports\",\n [\"transform-async-to-module-method\", {\n ...
javascript
chosen
[ { "from": "system", "value": "Add articleTemplate method. Edit renderPosts\n" }, { "from": "human", "value": "\"use strict\";\n\n// src/ui.js\n\nlet ui = {\n renderPosts(posts) {\n console.log(posts);\n }\n};\n\nexport { ui };\n" }, { "from": "gpt", "value": "\"use strict\";\n\n...
javascript
chosen
[ { "from": "system", "value": "Use jQuery nomenclature (event => eventType)" }, { "from": "human", "value": "/**\n * Events.\n *\n * @mixin\n * @namespace Bolt.events\n *\n * @param {Object} bolt - The Bolt module.\n */\n(function (bolt) {\n 'use strict';\n\n /*\n * Bolt.events mixin co...
javascript
chosen
[ { "from": "system", "value": "Remove extra line in the end of file\n" }, { "from": "human", "value": "'use babel';\n\nimport filesizeView from '../lib/filesize-view';\n\ndescribe('View', () => {\n // Disable tooltip, only enable on tests when needed\n atom.config.set('filesize.EnablePopupAppea...
javascript
chosen
[ { "from": "system", "value": "Use try/catch for loading mapfiles.\n" }, { "from": "human", "value": "\n/**\n * Small wrapper around node-pool. Establishes a pool of 5 mapnik map objects\n * per mapfile.\n * @TODO: Make pool size configurable.\n */\nmodule.exports = new function() {\n return {...
javascript
chosen
[ { "from": "system", "value": "Add config change test to the View spec\n" }, { "from": "human", "value": "'use babel';\n\nimport filesizeView from '../lib/filesize-view';\n\ndescribe('View', () => {\n // Disable tooltip for these tests\n atom.config.set('filesize.EnablePopupAppearance', false);...
javascript
chosen
[ { "from": "system", "value": "Use the angular module pattern instead of using a closure.\n" }, { "from": "human", "value": "/*global cardApp*/\n/*jslint unparam: true */\n(function () {\n\n 'use strict';\n\n // Implements custom validation for card number.\n var INTEGER_REGEXP = /^([aAk...
javascript
chosen
[ { "from": "system", "value": "Make it work in IE10\n" }, { "from": "human", "value": "var HumanView = require('human-view');\nvar templates = require('../templates');\n\nmodule.exports = HumanView.extend({\n template: templates.pathway,\n events: {\n 'dragstart .columns': 'drag',\n 'drag...
javascript
chosen
[ { "from": "system", "value": "Add TODO to remove console.log from non-dump functions\n" }, { "from": "human", "value": "var Util = require('util');\nvar Packet = require('../packet');\nvar capture = require('../capture');\n\nmodule.exports = function(options) {\n var self = this; // ZongJi inst...
javascript
chosen
[ { "from": "system", "value": "Fix trigger exception when no listeners specified\n" }, { "from": "human", "value": "let GlobalEvents = () => {\n let events = {};\n\n return {\n off: (eventHandle) => {\n let index = events[eventHandle.eventName].findIndex((singleEventHandle...
javascript
chosen
[ { "from": "system", "value": "Fix detecting if it's a dynamic files... script tags from the original html were previously incorrectly identified as dynamic files.\n" }, { "from": "human", "value": "/*\n Keep track of\n*/\n\nimport Backbone from \"backbone\"\nimport _ from \"underscore\"\n\nex...
javascript
chosen
[ { "from": "system", "value": "Fix how to calculate ws URL from baseapi URL\n" }, { "from": "human", "value": "/* jshint camelcase:false */\n\nPolymer('nn-annotable', {\n ready: function(){\n this.baseapi = this.baseapi || window.location.origin;\n this.tokens = this.baseapi.split('://');\...
javascript
chosen
[ { "from": "system", "value": "fix(output): Add type check for polygon and polyline arrays\n\nAdded a type check to properly wrap polygon and polyline arrays" }, { "from": "human", "value": "module.exports.point = justType('Point', 'POINT');\nmodule.exports.line = justType('LineString', 'POLYLINE...
javascript
chosen
[ { "from": "system", "value": "Change name separator of the endpoint (can't use pipe duh).\n" }, { "from": "human", "value": "var semver = require('semver');\nvar createError = require('./createError');\n\nfunction decompose(endpoint) {\n var regExp = /^(?:([\\w\\-]|(?:[\\w\\.\\-]+[\\w\\-])?)\...
javascript
chosen
[ { "from": "system", "value": "Add reference to counter in stop method\n" }, { "from": "human", "value": "function Metronome(tempo, beatsPerMeasure){\n this.tempo = Number(tempo);\n this.beatsPerMeasure = Number(beatsPerMeasure);\n this.interval = null;\n}\n\nMetronome.prototype.start = functi...
javascript
chosen
[ { "from": "system", "value": "Fix bug that the old settings of the ain2 is got replaced\n" }, { "from": "human", "value": "/*\n * MIT LICENCE\n */\n\nvar util = require('util'),\n winston = require('winston'),\n SysLogger = require(\"ain2\");\n\nvar ain;\n\nvar SyslogAin2 = exports.SyslogA...
javascript
chosen
[ { "from": "system", "value": "Add connection parameter and change req to request\n" }, { "from": "human", "value": "var _ = require('lodash-node');\n\nvar Action = function(name, two, three, four) {\n var options, run, helpers;\n\n // Syntax .extend('action#method', function() { ... }, {})\n ...
javascript
chosen
[ { "from": "system", "value": "Remove enyo.Selection from layout library, moved into enyo base-UI\n" }, { "from": "human", "value": "enyo.depends(\n\t\"Selection.js\",\n\t\"FlyweightRepeater.js\",\n\t\"List.css\",\n\t\"List.js\",\n\t\"PulldownList.css\",\n\t\"PulldownList.js\"\n);" }, { "...
javascript
chosen
[ { "from": "system", "value": "Make options argument to ol.style.Fill optional\n" }, { "from": "human", "value": "goog.provide('ol.style.Fill');\n\ngoog.require('ol.color');\n\n\n\n/**\n * @constructor\n * @param {olx.style.FillOptions} options Options.\n */\nol.style.Fill = function(options) {\n...
javascript
chosen
[ { "from": "system", "value": "Resolve CLIMATE-147 - Add tests for regionSelectParams service\n\n- Add getParameters test.\n\ngit-svn-id: https://svn.apache.org/repos/asf/incubator/climate/trunk@1496037 13f79535-47bb-0310-9956-ffa450edef68\n\nFormer-commit-id: 3d2be98562f344323a5532ca5757850d175ba25c" }, ...
javascript
chosen
[ { "from": "system", "value": "[server] Use custom way to resolve URLs for file assets that are relative\n" }, { "from": "human", "value": "import lost from 'lost'\nimport postcssUrl from 'postcss-url'\nimport postcssImport from 'postcss-import'\nimport postcssCssnext from 'postcss-cssnext'\nimpo...
javascript
chosen
[ { "from": "system", "value": "Update the list of keywords for dockerfiles\n" }, { "from": "human", "value": "Prism.languages.docker = {\n\t'keyword': {\n\t\tpattern: /(^\\s*)(?:ONBUILD|FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|COPY|VOLUME|USER|WORKDIR|CMD|LABEL|ENTRYPOINT)(?=\\s)/mi,\n\t\tlookbehind: t...
javascript
chosen
[ { "from": "system", "value": "Use .js extension for import\n\nCo-Authored-By: ahocevar <02d02e811da4fb4f389e866b67c0fe930c3e5051@gmail.com>" }, { "from": "human", "value": "/**\n * @module ol/geom\n */\n\nexport {default as Circle} from './geom/Circle.js';\nexport {default as Geometry} from './g...
javascript
chosen
[ { "from": "system", "value": "Revert \"compile alekhine as needed in development\"\n\nThis reverts commit 917d5d50fd6ef0bbf845efa0bf13a2adba2fe58a.\n" }, { "from": "human", "value": "require(\"@babel/register\")({\n only: [\n \"src\",\n /node_modules\\/alekhine/\n ]\n})\n\nmodule.exports...
javascript
chosen
[ { "from": "system", "value": "Test Heap Sort: Sort array with equal vals\n" }, { "from": "human", "value": "/* eslint-env mocha */\nconst HeapSort = require('../../../src').algorithms.Sorting.HeapSort;\nconst assert = require('assert');\n\ndescribe('HeapSort', () => {\n it('should have no data ...
javascript
chosen
[ { "from": "system", "value": "LIKA-244: Add translations to cookie popup\n" }, { "from": "human", "value": "window.cookieconsent.initialise({\n container: document.getElementById(\"cookie_consent\"),\n position: \"top\",\n type: \"opt-in\",\n static: false,\n theme: \"suomifi\",\n...
javascript
chosen
[ { "from": "system", "value": "Test promise in the actions" }, { "from": "human", "value": "import {firebaseApp,firebaseAuth,firebaseDb, firebaseStorage, firebaseAuthInstance } from '../components/Firebase.js'\nimport { browserHistory } from 'react-router';\n\nexport function goToNextState() {\n\...
javascript
chosen
[ { "from": "system", "value": "Add missing status prop for PlaybackCtrl\n" }, { "from": "human", "value": "import { connect } from 'react-redux'\nimport PlaybackCtrl from './PlaybackCtrl'\nimport { requestPlay, requestPause, requestVolume, requestPlayNext } from 'store/modules/status'\n\n// Obje...
javascript
chosen
[ { "from": "system", "value": "Update navigation to be in alphabetical order\n" }, { "from": "human", "value": "'use strict';\n\nconst path = require('path');\n\nconst buildNavigation = function(styleguideArray) {\n let options = this;\n\n options.navigation = {};\n\n styleguideArray.forEach((...
javascript
chosen
[ { "from": "system", "value": ":art: Use art instead of const in cli file\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict'\nprocess.title = 'ucompiler'\n\nrequire('debug').enable('UCompiler:*')\nconst UCompiler = require('..')\nconst knownCommands = ['go', 'watch']\nconst para...
javascript
chosen
[ { "from": "system", "value": "Remove prod/staging ports so people don't get the idea to run this on these environments\n" }, { "from": "human", "value": "var env = process.env.NODE_ENV || 'development';\n\nvar defaults = {\n \"static\": {\n port: 3003\n },\n \"socket\": {\n options: {\n...
javascript
chosen
[ { "from": "system", "value": "Update library name to be a timestamp\n\nSigned-off-by: Josh Adam <8493dc4643ddc08e2ef6b4cf76c12d4ffb7203d1@canada.ca>\n" }, { "from": "human", "value": "import axios from \"axios\";\n\nexport const getGalaxyClientAuthentication = clientId =>\n axios\n .get(\n ...
javascript
chosen
[ { "from": "system", "value": "fix(replacement): Fix file extension added when redirect didn't have one\n" }, { "from": "human", "value": "import resolveNode from \"../helpers/resolveNode\";\nimport match from \"../helpers/matchRedirect\";\nimport {relative, dirname} from \"path\";\n\nexport defa...
javascript
chosen
[ { "from": "system", "value": "Create spot along with user\n" }, { "from": "human", "value": "const bcrypt = require('bcrypt');\nconst GitHub = require('github-api');\nconst crypto = require('crypto');\n\nconst { User } = require('../models');\nconst { email } = require('../utils');\n\nconst GITH...
javascript
chosen
[ { "from": "system", "value": "Switch to preview rendering in seperate controller\n" }, { "from": "human", "value": "jQuery(function() {\n \n jQuery('a[href=#preview]').click(function(e) {\n var form = jQuery('#new_reply');\n jQuery.ajax({\n url: form.attr('action'),\n type: 'po...
javascript
chosen
[ { "from": "system", "value": "Implement proper parameter matching rules\n" }, { "from": "human", "value": "module.exports = class Call {\n constructor(callee, args) {\n this.callee = callee;\n this.args = args;\n }\n\n analyze(context) {\n this.callee.analyze(context);\n context.a...
javascript
chosen
[ { "from": "system", "value": "Fix bug in IE9 when observed elements are removed from the DOM\n" }, { "from": "human", "value": "// jquery.observe_field.js\n\n\n(function( $ ){\n\n jQuery.fn.observe_field = function(frequency, callback) {\n\n frequency = frequency * 1000; // translate to mill...
javascript
chosen
[ { "from": "system", "value": "Set default options for graphic component\n\n" }, { "from": "human", "value": "define([], function () {\n 'use strict';\n\n var ComponentGraphic = function (options) {\n this.color = options.color || \"#dc322f\";\n };\n\n ComponentGraphic.prototype.paint = fu...
javascript
chosen
[ { "from": "system", "value": "Fix Webpack entry module path\n" }, { "from": "human", "value": "const webpack = require('webpack');\n\nconst ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\n\nconst path = require('path');\n\n// Extract CSS into a separate file\nconst extractSass = n...
javascript
chosen
[ { "from": "system", "value": "Update parameters and variables shapes\n" }, { "from": "human", "value": "import PropTypes from 'prop-types'\n\n\nconst valuesShape = PropTypes.objectOf(PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.number,\n PropTypes.string,\n]))\n\nexport const parameter...
javascript
chosen
[ { "from": "system", "value": "Update electron version fixing security issues\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n \"download-electron\": {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix mobile footer toolbar import rename\n" }, { "from": "human", "value": "// @flow\nimport React from 'react'\nimport 'normalize.css/normalize.css'\nimport Footer from 'components/Footer/Footer'\nimport Nav from '../Nav/Nav'\nimport MobileFooterToolbar from '../Nav...
javascript
chosen
[ { "from": "system", "value": "Add initializer to set active tab in page header" }, { "from": "human", "value": "(function(){\n \n \"use strict\";\n \n var d = document, inits = [];\n window.initializers = inits;\n \n // initializer to manipulate all hyperlinks\n inits.push(function(){\n ...
javascript
chosen
[ { "from": "system", "value": "Fix a typing mistake in 'logical absurdity' message\n" }, { "from": "human", "value": "/*\n Copyright 2019 Google LLC\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 m...
javascript
chosen
[ { "from": "system", "value": "FIX - changed node api to https\n" }, { "from": "human", "value": "import defaults from 'defaults'\n\nconst API_GLOBAL = '_IMDIKATOR'\n\nconst env = process.env.NODE_ENV || 'development'\n\nconst DEFAULTS = {\n port: 3000,\n reduxDevTools: false\n}\n\nconst global...
javascript
chosen
[ { "from": "system", "value": "Add shabang to bin file\n" }, { "from": "human", "value": "var gut = require('../');\n\nif (process.argv.length > 2 && process.argv[2] === 'status') {\n console.log(\"\\n\\tGut status: %s\", gut.getStatus());\n}\n\nconsole.log('\\nI think you meant \"git\"');\n" ...
javascript
chosen
[ { "from": "system", "value": "Fix releaf ckeditor assets copying\n" }, { "from": "human", "value": "//= link_tree ../images\n//= link releaf/application.css\n//= link releaf/application.js\n" }, { "from": "gpt", "value": "//= link_tree ../images\n//= link_tree ../javascripts/ckeditor...
javascript
chosen
[ { "from": "system", "value": "Fix text editor wrapping when floating\n" }, { "from": "human", "value": "pw.component.register('content-editor-plaintext', function (view, config) {\n var self = this;\n\n var mock = document.createElement('DIV');\n mock.classList.add('console-content-plaintext-...
javascript
chosen
[ { "from": "system", "value": "Use right length of header" }, { "from": "human", "value": "define(['itemObjectModel', 'mac/roman'], function(itemOM, macRoman) {\n\n 'use strict';\n \n function open(item) {\n function onBlock(item, byteSource) {\n return byteSource.slice(0, 12).getBytes...
javascript
chosen
[ { "from": "system", "value": "Remove unused option for client-side bundle\n" }, { "from": "human", "value": "const url = require('url');\n\nconst config = {\n builders: {\n web: {\n entry: './src/index.tsx',\n stack: ['web'],\n openBrowser: true,\n dllExcludes: ['bootstra...
javascript
chosen
[ { "from": "system", "value": "Fix active menu item content.\n" }, { "from": "human", "value": "const Handlebars = require('handlebars');\n\nconst templates = {\n active: Handlebars.compile('<li class=\"active\">{{{content}}}</li>'),\n unactive: Handlebars.compile('<li><a href=\"{{link}}\">...
javascript
chosen
[ { "from": "system", "value": "Change to new event form instead of to selecting an event\n" }, { "from": "human", "value": "'use strict';\nexport default class NewEventCtrl {\n\n /*@ngInject*/\n constructor($scope) {\n $scope.event = {info:{}};\n $scope.stage = {\n select: true,\n ...
javascript
chosen
[ { "from": "system", "value": "Change port back to 6666\n" }, { "from": "human", "value": "var express = require('express');\nvar https = require('https');\nvar logger = require('./logger');\nvar security = require('./security');\nvar db = require('./db');\n\nvar app = configureExpressApp();\nini...
javascript
chosen
[ { "from": "system", "value": "Change default dev port to 3000\n" }, { "from": "human", "value": "// see http://vuejs-templates.github.io/webpack for documentation.\nvar path = require('path')\n\nmodule.exports = {\n build: {\n env: require('./prod.env'),\n index: path.resolve(__dirname, '...
javascript
chosen
[ { "from": "system", "value": "Remove file extension from href's\n" }, { "from": "human", "value": "(function( $ ) {\n $.fn.activeNavigation = function(selector) {\n var pathname = window.location.pathname\n var hrefs = []\n $(selector).find(\"a\").each(function(){\n ...
javascript
chosen
[ { "from": "system", "value": "Make single worker semaphore example slightly more interesting\n" }, { "from": "human", "value": "var {Worker} = require(\"ringo/worker\")\nvar {Semaphore} = require(\"ringo/concurrent\")\nvar {setInterval, clearInterval} = require(\"ringo/scheduler\");\n\nfunction ...
javascript
chosen
[ { "from": "system", "value": "Change min image size to 200x200\n" }, { "from": "human", "value": "import { Meteor } from 'meteor/meteor';\nimport { $ } from 'meteor/jquery';\n\n/* global cloudinary */\n\n/**\n * Opens the Cloudinary Upload widget and sets the value of the input field with name e...
javascript
chosen
[ { "from": "system", "value": "Fix AR list module test\n" }, { "from": "human", "value": "define((require) => {\n\n describe('requester_module', () => {\n beforeEach(() => {\n require('app/views/teacher/modules/assistance_request_list_module');\n });\n\n define(...
javascript
chosen
[ { "from": "system", "value": "Add ability to delete a task\n" }, { "from": "human", "value": "define([\n 'underscore',\n 'backbone'\n], function(_, Backbone) {\n var TaskView = Backbone.View.extend({\n tagName: 'li',\n className: 'task',\n events: {\n \"dragstart\" : \"on_dragst...
javascript
chosen
[ { "from": "system", "value": "Work around react router bug\n\n<Miss /> sometimes renders even when it should not\n" }, { "from": "human", "value": "import React from 'react'\nimport { Panel } from 'react-bootstrap'\nimport MarkdownBlock from '../shared/MarkdownBlock'\nimport { getCreator, getCo...
javascript
chosen
[ { "from": "system", "value": "Use an atomic update operation" }, { "from": "human", "value": "// TODO: should the baseScore be stored, and updated at vote time?\n\n// This interface should change and become more OO, this'll do for now\nvar Scoring = {\n // re-run the scoring algorithm on a sing...
javascript
chosen
[ { "from": "system", "value": "Fix links in the cherry-pick demo\n" }, { "from": "human", "value": "import './base.css';\nimport './application.css';\nimport 'suitcss-base';\nimport 'suitcss-utils-text';\nimport 'suitcss-components-arrange';\nimport React from 'react';\n\nmodule.exports = React.c...
javascript
chosen
[ { "from": "system", "value": "Add data-root div around main body for later use\n" }, { "from": "human", "value": "module.exports = function (body) {\n return `\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Minor WOT</titl...
javascript
chosen
[ { "from": "system", "value": "Fix typo in limit configuration and remove bodyparser urlencoded\nmiddleware.\n" }, { "from": "human", "value": "import express from 'express';\nimport bodyParser from 'body-parser';\n\nimport AppCache from 'parse-server/lib/cache';\n\nimport ParseCliController from...
javascript
chosen
[ { "from": "system", "value": "Support any callable object as callback\n" }, { "from": "human", "value": "'use strict';\n\nvar callable = require('./valid-callable')\n , forEach = require('./for-each')\n\n , defaultCb = function (value, key) { return [key, value]; };\n\nmodule.exports = functi...
javascript
chosen
[ { "from": "system", "value": "Add Consectutive String Description solution\n" }, { "from": "human", "value": "var ConsecutiveString = function(){};\n\n/*validate k and length of the array. If the array length is 0 of less than k of k is less thatn or equal to 0\nreturn an empty string.\nif k is ...
javascript
chosen
[ { "from": "system", "value": "Add new font to JS\n" }, { "from": "human", "value": "WebFontConfig = {\n custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'Stub Serif FS', 'Stub Serif FS'],\n urls: [ 'http://f.fontdeck.com/s/css/...
javascript
chosen
[ { "from": "system", "value": "Add placeholder to attribute bindings\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nconst {\n Component,\n get\n} = Ember;\n\nexport default Component.extend({\n tagName: 'input',\n type: 'text',\n attributeBindings: [\n 'accept',\n 'au...
javascript
chosen
[ { "from": "system", "value": "CHANGE paramKey for storysource addon disable\n" }, { "from": "human", "value": "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport addons from '@storybook/addons';\n\nimport StoryPanel from './StoryPanel';\nimport { ADDON_ID, PANEL_ID } from ...
javascript
chosen
[ { "from": "system", "value": "Rename res to not overwrite express res.\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\nvar request = require('request');\n\nrouter.get('/', function(req, res) {\n request({\n url: 'https://status.heroku.com...
javascript
chosen
[ { "from": "system", "value": "Add styled components to EditableTableHeader\n" }, { "from": "human", "value": "import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst EditableTableHeader = ({columnNames}) => {\n\n return(\n <div>\n {columnNames.map( columnName => {return <...
javascript
chosen
[ { "from": "system", "value": "Fix remote computation document's start date bug.\n\nThis ensures that remote computation documents are created with a\ndynamically generated start date.\n\nCloses #185.\n" }, { "from": "human", "value": "'use strict';\n\nconst ComputationResult = require('./computa...
javascript
chosen
[ { "from": "system", "value": "Allow importing RAR files in the UI\n\nFixes 2366\n" }, { "from": "human", "value": "\n/**\n * Default upload config\n *\n */\n\nmodule.exports = {\n uploadStates: [\n 'enqueued',\n 'pending',\n 'importing',\n 'uploading',\n 'guessing',\n 'unpack...
javascript
chosen
[ { "from": "system", "value": "Add `.e.c-ts` to `.gitignore` on install.\n" }, { "from": "human", "value": "/* eslint-env node */\n\nconst path = require('path');\n\nmodule.exports = {\n description: 'Initialize files needed for typescript compilation',\n\n files() {\n return [\n path.j...
javascript
chosen
[ { "from": "system", "value": "Test case two for comment contents\n" }, { "from": "human", "value": "var cmm = require(\"__buttercup/classes/commands/command.cmm.js\");\n\nmodule.exports = {\n setUp: function(cb) {\n this.command = new cmm();\n (cb)();\n },\n\n callbackInje...
javascript
chosen
[ { "from": "system", "value": "Change beat to fractional values\n" }, { "from": "human", "value": "var five = require(\"../lib/johnny-five.js\"),\n board = new five.Board();\n\nboard.on(\"ready\", function() {\n // Creates a piezo object and defines the pin to be used for the signal\n var piez...
javascript
chosen
[ { "from": "system", "value": "Update for plug-in : wallhaven.cc\n" }, { "from": "human", "value": "var hoverZoomPlugins = hoverZoomPlugins || [];\nhoverZoomPlugins.push({\n name: 'wallhaven.cc',\n prepareImgLinks: function (callback) {\n var res = [];\n hoverZoom.urlReplace(...
javascript
chosen
[ { "from": "system", "value": "Improve usability in passphrase input dialog.\n\nAdd the possiblity to press Enter to submit the dialog and to press Escape to\ndismiss it.\n\nR=akuegel@chromium.org, jhawkins@chromium.org\nBUG=171370\n\n\nReview URL: https://chromiumcodereview.appspot.com/12321166\n\ngit-svn-i...
javascript
chosen
[ { "from": "system", "value": "Remove cookie banner from cookie settings page\n" }, { "from": "human", "value": " 'use strict';\n require('./cookie-functions.js');\n require('govuk_publishing_components/components/cookie-banner.js');\n\n window.GOVUK.DEFAULT_COOKIE_CONSENT = {\n 'essential'...
javascript
chosen
[ { "from": "system", "value": "Fix linting errors on server\n" }, { "from": "human", "value": "'use strict';\n\nconst cookieParser = require('cookie-parser');\nconst csrf = require('csurf');\n\nmodule.exports = function(server) {\n let secure = true;\n if (process.env.NODE_ENV === 'development'...
javascript
chosen
[ { "from": "system", "value": "Add kugghjulet.png to home scope\n" }, { "from": "human", "value": "'use strict';\n\n/* Controllers */\n\nvar cvAppControllers = angular.module('cvAppControllers', []);\n\ncvAppControllers.controller('HomeController', ['$scope', '$http', function($scope, $http) {\n\...
javascript
chosen
[ { "from": "system", "value": "Revert name change of stopwords-english\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* A list of English stopwords.\n*\n* @module @stdlib/datasets/smart-stopwords-en\n*\n* @example\n* var STOPWORDS = require( '@stdlib/datasets/smart-stopwords-en' )\n* //...
javascript
chosen
[ { "from": "system", "value": "Add method createBook to bookshelfApi connection.\n" }, { "from": "human", "value": "import 'whatwg-fetch';\n\nconst apiBaseURL = 'http://localhost:1337';\n\nfunction parseJSONFromResponse(response) {\n return response.json();\n}\n\nexport const bookshelfApi = {\n ...
javascript
chosen
[ { "from": "system", "value": "Change test result to test travis ci notification\n" }, { "from": "human", "value": "const sum = require('./sum');\n\ntest('adds 1 + 2 to equal 3', () => {\n expect(sum(1, 2)).toBe(3);\n});" }, { "from": "gpt", "value": "const sum = require('./sum');\n\...
javascript
chosen
[ { "from": "system", "value": "Debug and tested server routes, successful post and get\n" }, { "from": "human", "value": "const Q = require('q');\nconst RegularUsers = require('./../models/userSchema.js');\nconst BusinessUsers = require('./../models/businessUserSchema.js');\nconst Events = requir...
javascript
chosen
[ { "from": "system", "value": "Add note about 404 pitfall with renderInitial example\n" }, { "from": "human", "value": "var monorouter = require('monorouter');\nvar reactRouting = require('monorouter-react');\nvar PetList = require('./views/PetList');\nvar PetDetail = require('./views/PetDetail')...
javascript
chosen
[ { "from": "system", "value": "Send command in the published message\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies.\n */\n\n/**\n * Find device by id\n */\nexports.command = function(req, res) {\n var client = exports.client;\n var channel = '/control/' + r...
javascript
chosen
[ { "from": "system", "value": "Sort crates within a category by downloads by default\n\nThere will be an RFC soon about whether this is the best ordering or\nnot.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport PaginationMixin from '../../mixins/pagination';\n\nconst { compu...
javascript
chosen
[ { "from": "system", "value": "Change div to p when creating new logs\n" }, { "from": "human", "value": "/**\n * public/src/js/logger.js - delish\n * \n * Licensed under MIT license.\n * Copyright (C) 2017 Karim Alibhai.\n */\n\nconst util = require('util')\n , debounce = require('debounce')\n...
javascript
chosen
[ { "from": "system", "value": "Select the test template only if exists\n\nRelated to\nhttps://github.com/zalmoxisus/redux-devtools-test-generator/issues/3\n" }, { "from": "human", "value": "export default function getPreloadedState(position, cb) {\n chrome.storage.local.get([\n 'monitor' + po...
javascript
chosen