conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Set talk details (to be refactored)\n" }, { "from": "human", "value": "var args = arguments[0] || {},\n\tmoment = require('alloy/moment'),\n\timagecache = require('imagecache');\n\nfunction closeWindow(e) {\n $.scheduleDetailWindow.closeWindow();\n}\nimagecache.c...
javascript
chosen
[ { "from": "system", "value": "Allow setting Route.useNavigation to an actual navigation component to replace the default\n" }, { "from": "human", "value": "import React from 'react'\nimport {Grid, Row, Col} from 'react-bootstrap'\n\nimport SecurityBanner from '../components/SecurityBanner'\nimpo...
javascript
chosen
[ { "from": "system", "value": "Make the data binding on value 2-way; allow clicking on bubbles to toggle" }, { "from": "human", "value": "'use strict';\n\n/* Directives */\n\n\nvar module = angular.module('myApp.directives', []);\n\nmodule.directive('appVersion', ['version', function(version) {\n...
javascript
chosen
[ { "from": "system", "value": "Add directive to stop event propagation: eat-click\n" }, { "from": "human", "value": "(function(app) {\n\napp.filter('lengthUnit', function() {\n return function(value) {\n if (value < 1500) {\n return Math.round(value) + ' m';\n }\n return Math.round...
javascript
chosen
[ { "from": "system", "value": "Rewrite as a pitching loader, adding support for webpack v2 exports['default']\n" }, { "from": "human", "value": "var loaderUtils = require('loader-utils');\n\nmodule.exports = function applyLoader(source) {\n var query = loaderUtils.parseQuery(this.query);\n var ...
javascript
chosen
[ { "from": "system", "value": "Bring code implementation in line with documentation\n\nRemove option for passing assetpath as an explicit parameter, just load oit from options instead\n" }, { "from": "human", "value": "var path = require('path'),\n static = require('serve-static');\n\nmodule.e...
javascript
chosen
[ { "from": "system", "value": "(fix): Fix issues with logging error messages" }, { "from": "human", "value": "'use strict';\n\nvar through = require('through2');\nvar Slack = require('node-slack-upload');\nvar chalk = require('chalk');\nvar errors = require('./errors');\n\nfunction upload(token, ...
javascript
chosen
[ { "from": "system", "value": "Convert forEach to for loop to avoid closure.\n" }, { "from": "human", "value": "\"use strict\";\n\nfunction EntityComponentSystem() {\n\tthis.systems = [];\n}\nEntityComponentSystem.prototype.add = function(code) {\n\tthis.systems.push(code);\n};\nEntityComponentSy...
javascript
chosen
[ { "from": "system", "value": "Update version string to 2.6.0-pre.20.1\n" }, { "from": "human", "value": "var\n\tglue = require('./src/glue'),\n\tilib = require('./ilib/lib/ilib');\n\n// ensure the locale-specific date types are included\nrequire('./src/dates');\n\nilib.enyo = glue;\nilib.enyo.ve...
javascript
chosen
[ { "from": "system", "value": "Make the contentFor hook idemponent\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-basic-dropdown',\n contentFor: function(type, config) {\n if (config.environment !== 'test' && type === 'body-foot...
javascript
chosen
[ { "from": "system", "value": "Add help on mistype of command or no command.\n" }, { "from": "human", "value": "var pkg = require('./package.json');\nvar command = require('commander');\n\nvar container = require('./src/bootstrap')();\n\nprocess.title = pkg.name;\n\ncommand\n .version(pkg.vers...
javascript
chosen
[ { "from": "system", "value": "Use `ui.writeWarnLine` instead of `console.warn`.\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nvar VersionChecker = require('ember-cli-version-checker');\nvar hasBeenWarned = false;\n\nmodule.exports = {\n name: 'ember-factory-for-po...
javascript
chosen
[ { "from": "system", "value": "Use const when is possible\n" }, { "from": "human", "value": "'use strict'\n\nvar Promise = require('pinkie-promise')\nvar sliced = require('sliced')\n\nfunction cb2promise () {\n var args = sliced(arguments)\n var fn = args.shift()\n var resolve\n var reject\n\...
javascript
chosen
[ { "from": "system", "value": "Return an array instead of a json file\n" }, { "from": "human", "value": "'use strict';\n\nconst fs = require('fs');\nconst dss = require('dss');\nconst glob = require('glob');\n\nclass Doki {\n constructor(files) {\n this.files = files;\n this.parsedArray...
javascript
chosen
[ { "from": "system", "value": "Move list item creation into its own component\n" }, { "from": "human", "value": "'use strict';\n\nconst choo = require('choo');\nconst html = require('choo/html');\nconst app = choo();\n\n\napp.model({\n state: {\n todos: [\n { title: 'Buy milk' },\n ...
javascript
chosen
[ { "from": "system", "value": "Fix new form confirm code\n\n@atfornes please note that this code is common for the + buttons\nof project and community\n\nFixes #249\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('Teem')\n .factory('NewForm', [\n '$location', '$window', '$roo...
javascript
chosen
[ { "from": "system", "value": "Implement password generation for TURN REST API\n" }, { "from": "human", "value": "var SEP = ':';\n\nvar crypto = require('crypto');\n\nfunction genLongTermKey( username, realm, password ) {\n\tvar md5 = crypto.createHash( 'md5' );\n\n\tvar text = username + SEP + r...
javascript
chosen
[ { "from": "system", "value": "Add a comment about origin of coefficients\n" }, { "from": "human", "value": "module.exports = function (rgb, options) {\n var opts = options || {};\n\n var depth = opts.depth || 24;\n var size = rgb.length / (depth / 8);\n\n var coefficients = opts.coefficients...
javascript
chosen
[ { "from": "system", "value": "Add color to message type labels\n" }, { "from": "human", "value": "if (console._isPatched) return;\n\n['log', 'info', 'warn', 'error', 'dir', 'assert'].forEach(function(method) {\n var baseConsoleMethod = console[method];\n var slice = Array.prototype.slice;\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add error for non-wrapped LinearRing\n" }, { "from": "human", "value": "/**\n * Generates a new GeoJSON Polygon feature, given an array of coordinates\n * and list of properties.\n *\n * @module turf/polygon\n * @param {number[][]} rings - an array of LinearRings\n ...
javascript
chosen
[ { "from": "system", "value": "Add _sessionBeforeBlacklist for testing session in res.on('header'\n" }, { "from": "human", "value": "var deleteItem = require('./lib/deleteItem');\n\nmodule.exports = function (connect) {\n return function (options) {\n var cookieSessionMiddleware = connect.coo...
javascript
chosen
[ { "from": "system", "value": "Add passthrough to traceur-cli and other cli options\n" }, { "from": "human", "value": "#!/usr/bin/env node --harmony\n\"use strict\";\n\nlet path = require('path')\n , fs = require('fs')\n , argv = require('yargs').argv._\n , traceur = require('traceur')\n , rc...
javascript
chosen
[ { "from": "system", "value": "Hide notification bars after a few seconds.\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets...
javascript
chosen
[ { "from": "system", "value": "Remove old error focus script\n\nNo evidence of 'current-error' id being applied to an element across the repo\n" }, { "from": "human", "value": "//= require govuk_publishing_components/lib\n//= require govuk_publishing_components/components/button\n//= require govu...
javascript
chosen
[ { "from": "system", "value": "Resolve the path to printInReverseOrder module\n" }, { "from": "human", "value": "import printInReverseOrder from './printInReverseOrder/printInReverseOrder';\n\ntest('printInReverseOrder', () => {\n expect(printInReverseOrder(211)).toBe('1 1 2');\n expect(printIn...
javascript
chosen
[ { "from": "system", "value": "Set timeout for loader to 5000\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts,...
javascript
chosen
[ { "from": "system", "value": "Clean up some code in the docs component\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { Table, Button, Popconfirm, Row, Col } from 'antd'\nimport Tree from './Tree'\nimport Page from './Page'\n\nimport styles from './Documentat...
javascript
chosen
[ { "from": "system", "value": "Use the correct js comparator\n\nSigned-off-by: Kenneth Myhra <0b608bd85f046792b19ad6fef49a3bfa8a0828b9@gmail.com>\n" }, { "from": "human", "value": "$(document).ready(function ()\n{\n // initialize progress bar\n var progress = 0;\n $(\"#pbar\").css(\"wid...
javascript
chosen
[ { "from": "system", "value": "Update example for update to isSameDay()\n" }, { "from": "human", "value": "import React from \"react\";\nimport DayPicker from \"react-day-picker\";\nimport { dateUtils } from \"react-day-picker/utils\";\n\nimport \"react-day-picker/lib/style.css\";\n\nexport defau...
javascript
chosen
[ { "from": "system", "value": "Add clip to haul truck\n" }, { "from": "human", "value": "'use strict';\n/*global SVG */\n\nSVG.DumpTruckHaul = SVG.invent({\n create: 'g',\n inherit: SVG.G,\n extend: {\n build: function() {\n this.t = 10000;\n\n this.body = this.doc().use('Haulage_...
javascript
chosen
[ { "from": "system", "value": "Switch to talking to the backend on a different port.\n" }, { "from": "human", "value": "import DS from 'ember-data';\n\nexport default DS.JSONAPIAdapter.extend({\n host: 'http://localhost:8000'\n});\n" }, { "from": "gpt", "value": "import DS from 'embe...
javascript
chosen
[ { "from": "system", "value": "Add link to open opened file in user account\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @ngdoc directive\n * @name waxeApp.directive:UserAccount\n * @description\n * # UserAccount\n */\nangular.module('waxeApp')\n .directive('useraccount', ['Sess...
javascript
chosen
[ { "from": "system", "value": "Fix broken test because of moved files" }, { "from": "human", "value": "'use strict';\n\ndescribe('Directive: addMyriaDataset', function () {\n\n // load the directive's module\n beforeEach(module('polestar'));\n\n var element,\n scope;\n\n beforeEach(inject(...
javascript
chosen
[ { "from": "system", "value": "Stop promisifying the docker client\n" }, { "from": "human", "value": "import Docker from 'dockerode'\nimport bluebird from 'bluebird'\n\nconst dockerClient = bluebird.promisifyAll(new Docker({\n Promise: bluebird,\n}))\n\nexport default dockerClient\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Refactor to follow style guides\n" }, { "from": "human", "value": "import Ember from 'ember';\n\n/**\n * @module components\n * @class sl-drop-option\n */\nexport default Ember.Component.extend({\n\n /**\n * Component actions hash\n *\n * @property {o...
javascript
chosen
[ { "from": "system", "value": "Add some first test for switching to the 1D-axes brushMode.\n" }, { "from": "human", "value": "var vows = require('vows'),\n assert = require('assert'),\n events = require('events'),\n load = require('./load'),\n suite = vows.describe('brushMode');\n\nfu...
javascript
chosen
[ { "from": "system", "value": "Clear the body for test fixtures.\n" }, { "from": "human", "value": "/* global vfs */\nimport {\n TextureConfigurator, ArticlePackage,\n ArticleEditorSession,\n ArticleAPI, createEditorContext,\n VfsStorageClient, TextureArchive, InMemoryDarBuffer\n} from '../in...
javascript
chosen
[ { "from": "system", "value": "Add fix for confusing security warnings when phantomjs exits\n" }, { "from": "human", "value": "\"use strict\";\n\n/**\n * Opens the given page and resolves when phantomjs called back.\n * Will be executed inside of phantomjs.\n *\n * @private\n * @param {string} ur...
javascript
chosen
[ { "from": "system", "value": "Add array of test pictures\n" }, { "from": "human", "value": "app.controller('HomeController', ['$http', function($http) {\n console.log('HomeController running');\n\n\n\n}]);\n" }, { "from": "gpt", "value": "app.controller('HomeController', ['$http', f...
javascript
chosen
[ { "from": "system", "value": "Add current time/duration processing for Reddit Playlister\n" }, { "from": "human", "value": "'use strict';\n\n/* global Connector */\n\nConnector.playerSelector = 'body';\n\nConnector.getArtistTrack = function () {\n\tvar text = $('#portablecontrols h3').text().rep...
javascript
chosen
[ { "from": "system", "value": "Add double click to toggle fullscreen\n" }, { "from": "human", "value": "(function() {\n\n var onkey = function(event) {\n if (event.key === 'z' || event.keyCode == 122) {\n vrControls.zeroSensor();\n }\n if (event.key === 'f' || event.keyCode == 102)...
javascript
chosen
[ { "from": "system", "value": "Fix padding on cliploader icon\n\n" }, { "from": "human", "value": "import React from \"react\";\nimport { ClipLoader } from \"halogenium\";\nimport { Icon } from \"../../base\";\nimport { getTaskDisplayName } from \"../../utils\";\n\nconst JobStep = ({ step, isDone...
javascript
chosen
[ { "from": "system", "value": "Move template comments to the right file\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2017 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.nanos.auth',\n name: 'Enable...
javascript
chosen
[ { "from": "system", "value": "Add sanitization strategy to translation\n\n- SAAS-402\n" }, { "from": "human", "value": "'use strict';\n\n(function() {\n angular.module('ncsaas')\n .config(['$translateProvider', function($translateProvider) {\n $translateProvider.useLocalStorage();\n ...
javascript
chosen
[ { "from": "system", "value": "Fix GhostTab and GhostTabPane array dependencies\n\nNo issue\n- TabPanes weren't finding their tab due to not listing all their dependencies in Ember.computed\n" }, { "from": "human", "value": "//See gh-tabs-manager.js for use\nvar TabPane = Ember.Component.extend({...
javascript
chosen
[ { "from": "system", "value": "Fix commands always being blocked\n" }, { "from": "human", "value": "const Profile = require('../structs/db/Profile.js')\nconst Command = require('../structs/Command.js')\n\nasync function setupCommands (disableCommands) {\n await Profile.populatePrefixes()\n awai...
javascript
chosen
[ { "from": "system", "value": ":recycle: Change propTypes because React16 allows us to also pass down arrays\n\nThis will fix the warning when passing down an array to StatusLabel in dev mode\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\nimport PropTypes from '...
javascript
chosen
[ { "from": "system", "value": "Remove turbolinks from manifest (it doesn't work well with the template)\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file with...
javascript
chosen
[ { "from": "system", "value": "Add tests for async event emitter\n" }, { "from": "human", "value": "import test from 'ava';\nimport AsyncEventEmitter from '../lib/async-event-emitter';\nimport EventEmitter from 'events';\n\ntest(\"constructor\", (t) => {\n const aee = new AsyncEventEmitter();\...
javascript
chosen
[ { "from": "system", "value": "Clean up HTML Table visual callback\n\nFixes #79.\n" }, { "from": "human", "value": "/**\n * Generates a function that moves the cursor on a Google Chart\n * @private\n * @param {GoogleChart} chart - the in-memory GoogleChart object\n * @returns {VisualCallback} the...
javascript
chosen
[ { "from": "system", "value": "Add default tabbar as null\n" }, { "from": "human", "value": "/* eslint-disable react/forbid-prop-types */\nimport React, { useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { useNavigation } from '@react-navigation/native';\nimport { cr...
javascript
chosen
[ { "from": "system", "value": "Disable HTML5 mode since our website will consist only of a single page\n\n- HTML5 mode requires a base path to be set. We don't need HTML5 mode at\n all, which is why it is simply disabled.\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n ang...
javascript
chosen
[ { "from": "system", "value": "Add a class to color-picker tag\n" }, { "from": "human", "value": "export default ngModule => {\n ngModule.config(addColorPickerType);\n\n function addColorPickerType(formlyConfigProvider) {\n\n var ngModelAttrs = {};\n\n function camelize(string) {\n s...
javascript
chosen
[ { "from": "system", "value": "Make InputManager mouseup and mousemove global events.\n\nThis fixes when you move camera then move mouse over a dialog it all goes wrong.\n" }, { "from": "human", "value": "'use strict';\n\nfunction _InputManager() {\n EventEmitter.call(this);\n\n var self = this...
javascript
chosen
[ { "from": "system", "value": "fix(theme): Add surface color to theming mixin.\n" }, { "from": "human", "value": "const themeProps = [\n 'primary',\n 'secondary',\n 'background',\n 'on-primary',\n 'on-secondary',\n 'primary-bg',\n 'secondary-bg',\n 'text-primary-on-light',\n 'text-second...
javascript
chosen
[ { "from": "system", "value": "Enable html styling of stack.\n" }, { "from": "human", "value": "/*\n * Handy little util function that highlights all files in the stack trace not\n * in the node_modules/ folder.\n *\n * @module warepot/util/colorize-stack\n */\n'use strict'\n\n// modules > native...
javascript
chosen
[ { "from": "system", "value": "Set timeout on modal popper event listener\n\n- In certain edge cases, the modal pop was racing another function on the page which changed the button state. In some cases the order of events was click on a 'Start' button, some js changes the 'Start' button to a 'Finish' button,...
javascript
chosen
[ { "from": "system", "value": "Use ParseTree.isDirectivePrologue() to simplify PrependStatement\n" }, { "from": "human", "value": "// Copyright 2012 Traceur Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the 'License');\n// you may not use this file except in compliance with the...
javascript
chosen
[ { "from": "system", "value": "Add the same test, but with promise chaining\n" }, { "from": "human", "value": "const test = require('tape')\nconst BorrowState = require('borrow-state')\n\ntest(`read-only-safety`, (t) => {\n t.plan(2)\n let hasHappened = []\n let myState = new BorrowState()\n ...
javascript
chosen
[ { "from": "system", "value": "Remove dependency on browser environment" }, { "from": "human", "value": "import Bacon from 'baconjs';\nimport Immutable from 'immutable';\n\n\nexport function Madera(reducers, actionTypes){\n const action$ = new Bacon.Bus();\n window.action$ = action$;\n a...
javascript
chosen
[ { "from": "system", "value": "Remove R.isNaN leftover in documentation\n\nThe examples for `R.none` are still using `R.isNaN` which was removed in #1112.\nI’ve replace the examples with actual use-cases from the tests.\n" }, { "from": "human", "value": "var _complement = require('./internal/_com...
javascript
chosen
[ { "from": "system", "value": "Add simple nullpadString function for testing\n" }, { "from": "human", "value": "function formatTime () {\n //\n}\n\n/**\n * Trims off null bytes and any additional garbage bytes from a buffer.\n * @param {Buffer} buffer Buffer to parse string from\n * @returns {st...
javascript
chosen
[ { "from": "system", "value": "Add query log to example server\n" }, { "from": "human", "value": "'use strict'\n\nrequire('colors')\nconst config = require('./config.json')\n\nlet io\nconst datas = {\n stringData: 'foo',\n intData: 5,\n floatData: 0.5,\n boolData: true\n}\n\nio = require('soc...
javascript
chosen
[ { "from": "system", "value": "Add form submission handler draft\n" }, { "from": "human", "value": "// @flow\n\nimport $ from 'jquery'\nimport 'bootstrap/dist/css/bootstrap.min.css'\nrequire('bootstrap')\n\n$(document).ready(() => {\n // TODO: Add event handlers\n})\n" }, { "from": "gpt"...
javascript
chosen
[ { "from": "system", "value": "tests/acceptance/upload: Use Mirage.js instead of Polly.js\n" }, { "from": "human", "value": "import { visit, currentURL } from '@ember/test-helpers';\nimport { setupApplicationTest } from 'ember-qunit';\nimport { module, test } from 'qunit';\n\nimport { setupPolly ...
javascript
chosen
[ { "from": "system", "value": "Add javascript for locating latest stable version.\n" }, { "from": "human", "value": "function insert_version_links() {\n var labels = ['dev', '0.8.0', '0.7.0', '0.6', '0.5', '0.4', '0.3'];\n\n for (i = 0; i < labels.length; i++){\n open_list = '<li>'\n...
javascript
chosen
[ { "from": "system", "value": "Increase max buffer to 1MB\n" }, { "from": "human", "value": "var childProcess = require('child_process');\n\n// Exit the process if the command failed and only call the callback if the\n// command succeed, output of the command would also be piped.\nexports.safeExe...
javascript
chosen
[ { "from": "system", "value": "Return user information on intent saving.\n" }, { "from": "human", "value": "var debug = require('debug')('intents');\nvar parse = require('co-body');\n\nmodule.exports.push = function (runtime) {\n return function * (data, next) {\n if (this.method !== 'POST') ...
javascript
chosen
[ { "from": "system", "value": "Fix a few issues in the test file\n\n- Destructure actions from actionCreators\n- Fix createState defaults\n" }, { "from": "human", "value": "import { describe } from 'riteway';\n\nimport dsm from '../dsm';\n\nconst actionStates = [\n ['initialize', 'signed out',\n...
javascript
chosen
[ { "from": "system", "value": "Use FeedbackLite widget for now\n" }, { "from": "human", "value": "(function() {\n var fab = '<div class=\"fixed-action-btn\"><a class=\"btn-floating btn-large btn-grantmakers waves-effect\"><i class=\"material-icons\">mail</i></a></div>';\n $('.feedback-wrapper')...
javascript
chosen
[ { "from": "system", "value": "Test showing/hiding a username modal prompt\n\nCurrently this is using `ReactTestUtils.findRenderedComponentWithType` and then introspecting the `show` prop on the modal to determine if it's visible. I'd preferably like to use bootstrap classes, but `ReactTestUtils.findRendered...
javascript
chosen
[ { "from": "system", "value": "Create game logic / fetch games form current project\n" }, { "from": "human", "value": "var inspect = require('eyes').inspector({ stream: null });\n\nmodule.exports = {\n\n index: function(req, res, next){\n\n process.database.games.find(function(error, games){...
javascript
chosen
[ { "from": "system", "value": "Fix process logs not returning\n\nThe API endpoint listening for a dump of process logs was not returning logs properly for two reasons:\n1. The `id` field was being appended to each log. This had been moved to the `handleLog` function of the `LogHandler`.\n2. The slice needed ...
javascript
chosen
[ { "from": "system", "value": "emojiAutocomplete: Save new function creation for each row.\n\nIn continuation to previous to previous commits, creating function\ninside render method is not good from performance perspective. So\ncreate a `onAutocomplete` function inside component, which will be\ncalled by an...
javascript
chosen
[ { "from": "system", "value": "Declare the media argument in the previous track feature.\n" }, { "from": "human", "value": "(function( window, $, cue, undefined ) {\n\t'use strict';\n\n\t$.extend( MediaElementPlayer.prototype, {\n\t\tbuildcueprevioustrack: function( player, controls ) {\n\t\t\t$(...
javascript
chosen
[ { "from": "system", "value": "Disable update checking by default.\n\nThe plan is to enable it by default after some of the rough edges have been polished.\n\nFixes #1053\n" }, { "from": "human", "value": "pref(\"extensions.{e4a8a97b-f2ed-450b-b12d-ee082ba24781}.description\", \"chrome://greasemo...
javascript
chosen
[ { "from": "system", "value": "Make function name more descriptive\n" }, { "from": "human", "value": "/*\n * ready\n * Watch for when an element becomes available in the DOM\n * @param {String} selector\n * @param {Function} fn\n */\n\n(function(win){\n 'use strict';\n\n var listeners = [],...
javascript
chosen
[ { "from": "system", "value": "Change classNames from array to string\n" }, { "from": "human", "value": "import Component from '@ember/component';\nimport { A } from '@ember/array';\nimport { computed } from '@ember/object';\n\nexport default Component.extend({\n /**\n * Class names for the co...
javascript
chosen
[ { "from": "system", "value": "Change function calls to field accesses instead\n\nIn details-for-tree-entry.js, there are several calls to functions of\nan IndexEntry. However, those are actually fields on an object\ninstead of prototype functions so referring to them as functions will\ncause a ReferenceErro...
javascript
chosen
[ { "from": "system", "value": "Remove unused import in blueprint\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport RavenLogger from 'ember-cli-sentry/services/raven';\n\nexport default RavenLogger.extend({\n\n unhandledPromiseErrorMessage: '',\n\n captureException(/* error *...
javascript
chosen
[ { "from": "system", "value": "Use method in storybook example that wasn't being used that logs actions\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { action } from '@kadira/storybook';\nimport { DraftJSEditor, Renderer, defaultBlocks } from '../../src';\n\...
javascript
chosen
[ { "from": "system", "value": "Remove required autorizedToSite from update memory\n" }, { "from": "human", "value": "import { gql } from 'react-apollo'\n\nexport default gql`\n mutation updateMemory(\n $nodeId: ID!,\n $ownerFirstName: String!,\n $ownerLastName: String,\n $ownerEmail:...
javascript
chosen
[ { "from": "system", "value": "Use for loop over slicing arguments\n" }, { "from": "human", "value": "var __slice = Array.prototype.slice;\n\n/**\n * Generate a function that accepts a variable number of arguments as the last\n * function argument.\n *\n * @param {Function} fn\n * @return {Funct...
javascript
chosen
[ { "from": "system", "value": "Convert double quotes to single quotes to appease jshint\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n\thexToRGB: function( hex ) {\n\t\tvar result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec( hex );\n\t\tif ( result ) {\n\t\t\tr...
javascript
chosen
[ { "from": "system", "value": "Fix webworker ES6 syntax to ES5\n" }, { "from": "human", "value": "importScripts('/static/vendor/scripts/highlight.pack.js');\n\nvar unescape = {\n '&amp;': '&',\n '&lt;': '<',\n '&gt;': '>',\n '&quot;': '\"',\n '&apos;': '\\'',\n};\n\nvar regex = new...
javascript
chosen
[ { "from": "system", "value": "Fix and update {{t-grid}} unit tests\n" }, { "from": "human", "value": "import {\n moduleForComponent,\n test\n} from 'ember-qunit';\nimport { arrayContains } from '../../helpers/common';\n\nvar component;\n\nmoduleForComponent('t-grid', {\n beforeEach: function(...
javascript
chosen
[ { "from": "system", "value": "Fix Salmon Run tweet mystery weapon detection\n\n" }, { "from": "human", "value": "const TwitterPostBase = require('./TwitterPostBase');\nconst { captureSalmonRunScreenshot } = require('../screenshots');\nconst { readData } = require('../utilities');\n\nclass Salmon...
javascript
chosen
[ { "from": "system", "value": "tests/acceptance/login: Use Mirage.js instead of Polly.js\n" }, { "from": "human", "value": "import { visit, click } from '@ember/test-helpers';\nimport { setupApplicationTest } from 'ember-qunit';\nimport { module, test } from 'qunit';\n\nimport { setupPolly } from...
javascript
chosen
[ { "from": "system", "value": "Fix node driver edit issue\n\nhttps://github.com/rancher/rancher/issues/13254\n" }, { "from": "human", "value": "import { get, set, computed } from '@ember/object';\nimport Component from '@ember/component';\nimport NodeDriver from 'shared/mixins/node-driver';\nimpo...
javascript
chosen
[ { "from": "system", "value": "Hide the tree dropdowns if the admin has selected a unknown type" }, { "from": "human", "value": "(function($) {\n $.entwine('kapost', function($) {\n $(window).resize(function() {\n $('#Form_ConvertObjectForm').layout();\n });\n \...
javascript
chosen
[ { "from": "system", "value": "Update up to changes in dbjs\n" }, { "from": "human", "value": "'use strict';\n\nvar value = require('es5-ext/object/valid-value')\n , unserializeId = require('dbjs/_setup/unserialize/id')\n , object = require('dbjs/valid-dbjs-object')\n , nested ...
javascript
chosen
[ { "from": "system", "value": "Add CAP3033 and CAP3034 to array of computer science courses\n" }, { "from": "human", "value": "module.exports = [\n require('./cap3020'),\n require('./cap3027'),\n require('./cap3032')\n];" }, { "from": "gpt", "value": "module.exports = [\n require(...
javascript
chosen
[ { "from": "system", "value": "Disable babel query in vue-loaders\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = function () {\n let config = {\n postcss: this.options.build.postcss,\n loaders: {\n 'js': 'babel-loader?presets[]=es2015&presets[]=stage-2',\n 'p...
javascript
chosen
[ { "from": "system", "value": "Allow buckets to be out of sync\n" }, { "from": "human", "value": "\"use strict\";\n\nconst Bucket = require(\"./Bucket\");\n\nclass ChainedBucket extends Bucket {\n constructor(size, duration, name, parent) {\n super(size, duration);\n this.parent = parent |...
javascript
chosen
[ { "from": "system", "value": "Add logging for state_code error\n" }, { "from": "human", "value": "'use strict';\n\nconst Queries = require('../../helpers/queries');\nconst Parser = require('../../helpers/paydroid_parser');\nconst Boom = require('boom');\n\nexports.getData = {\n auth: {\n ...
javascript
chosen
[ { "from": "system", "value": "Use const instead of let.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(app) {\n app.controller('GamesController', ['$route', '$scope', 'GameService', 'UserService', function($route, $scope, gameService, userService) {\n\n let ctr...
javascript
chosen
[ { "from": "system", "value": "Update routing so something actually shows up when a Backbone URL is accessed externally\n" }, { "from": "human", "value": "var AppRouter = Backbone.Router.extend({\n routes: {\n 'topics/:topicId': 'showResults',\n\n '*actions': 'defaultAction'\n },\n\n\n s...
javascript
chosen
[ { "from": "system", "value": "Use only core datepicker (no multi-lingual, for now)\n" }, { "from": "human", "value": "// This file is for all Javascript that should load at the bottom of the page\n// i.e. before the closing </body> tag\n\n//= require bootstrap\n//= require bootstrap-datepicker\n...
javascript
chosen
[ { "from": "system", "value": "Add configuration to show volcanoes and earthquakes simultaneously" }, { "from": "human", "value": "module.exports = {\n 1: {\n plateOutlines: false,\n plateMovement: false,\n earthquakes: true,\n volcanos: false,\n exclusiveLayers: true\n },\n 2: ...
javascript
chosen
[ { "from": "system", "value": "Clean up old echoes stuff and correct tags/:id 404 code.\n\nSigned-off-by: Shai Sachs <47bd79f9420edf5d0991d1e2710179d4e040d480@ngpvan.com>\n" }, { "from": "human", "value": " \nvar config = require('../config'),\n request = require('request');\n\nvar vanEndpoint...
javascript
chosen