conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Support for async mode in refCounter\n" }, { "from": "human", "value": "'use strict';\n\nrequire('../_base').ext.refCounter = function (ignore, conf) {\n\tvar cache, get, clear;\n\n\tcache = {};\n\n\tconf.on('init', function (id) { cache[id] = 1; });\n\tconf.on('hit...
javascript
chosen
[ { "from": "system", "value": "Use egal indexOf in indexesOf\n" }, { "from": "human", "value": "// Find all indexes of given value\n\n'use strict';\n\nvar indexOf = Array.prototype.indexOf;\n\nmodule.exports = function (value, fromIndex) {\n\tvar r = [], i;\n\twhile ((i = indexOf.call(this, value...
javascript
chosen
[ { "from": "system", "value": "Remove debugging line. Be consistent about quotes.\n" }, { "from": "human", "value": "var express = require(\"express\");\nvar multer = require('multer');\nvar app = express();\n\nvar storage = multer.diskStorage({\n d...
javascript
chosen
[ { "from": "system", "value": "Put my stuff with Eddies stuff\n" }, { "from": "human", "value": "var express = require('express'), \n app = express(),\n http = require('http'),\n socketIo = require('socket.io');\n\n// start webserver on port 8080\nvar server = http.createServer(app);\nv...
javascript
chosen
[ { "from": "system", "value": "Revert \"accept 'magic 8 ball' as input\"\n" }, { "from": "human", "value": "var bodyParser = require('body-parser');\nvar answers = require('./answers.js');\nvar express = require('express');\nvar request = require('request');\nvar app = express();\n\nvar port = pr...
javascript
chosen
[ { "from": "system", "value": "Add event to update reactive variable\n" }, { "from": "human", "value": "Template.activities.created = function () {\n // Get reference to template instance\n var instance = this;\n\n instance.showLatestActivities = new ReactiveVar();\n};\n\nTemplate.activities.r...
javascript
chosen
[ { "from": "system", "value": "Fix logical operator when testing for architecture.\n" }, { "from": "human", "value": "module.exports = Register;\n\nfunction Register(pluginPath) {\n\n \n electron = require('electron')\n const app = electron.app\n\n const isWindows = process.platform ...
javascript
chosen
[ { "from": "system", "value": "Change tab to clicked list item\n" }, { "from": "human", "value": "function makeListWithArray(array) {\n var list = document.createElement('ul');\n\n for (var i = 0; i < array.length; i++) {\n var item = document.createElement('li');\n item.className = 'resu...
javascript
chosen
[ { "from": "system", "value": "Fix category reloadAll and removeAll\n" }, { "from": "human", "value": "const Collection = require('discord.js').Collection;\n\nclass Category {\n /**\n * Creates a new command category.\n * @param {string} id - ID of the category.\n */\n construct...
javascript
chosen
[ { "from": "system", "value": "Replace non-breaking spaces with real spaces before rendering math with KaTeX\n\nSummary: https://app.asana.com/0/74945521838608/174138257679861\n\nTest Plan:\n- make serve\n- localhost:9000\n- write some math containing a non-breaking space\n- verify that the math is rendered ...
javascript
chosen
[ { "from": "system", "value": "Add `X-Requested-With: XMLHttpRequest` header so Rails can recognize XHR\n\nBackport from\nhttps://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3732\n" }, { "from": "human", "value": "import axios from 'axios';\nimport csrf from './csrf';\n\naxios.defaults.headers...
javascript
chosen
[ { "from": "system", "value": "Clean inputs from user, ready it for python scripts\n" }, { "from": "human", "value": "var defaults = {\n bracket: null,\n bounds: null,\n method: 'brent',\n tol: null,\n options: null\n};\n\nvar extendNoOverwrite = function (obj, defaults){\n for (key in defa...
javascript
chosen
[ { "from": "system", "value": "Add handler for unavailable files\n" }, { "from": "human", "value": "var nunjucks = require('nunjucks');\nvar minify = require('html-minifier').minify;\n\nvar FileSystemLoader = nunjucks.FileSystemLoader;\nvar defaultMinifyOpts = {\n\tremoveComments: true,\n\tcollap...
javascript
chosen
[ { "from": "system", "value": "Fix filter button not hiding and showing when selecting different tabs.\n" }, { "from": "human", "value": "var reverseOrderBtn;\nvar downloadBtn;\nvar refreshBtn;\nvar openBrowserBtn;\nvar moreBtn;\nvar infoTab;\nvar chapterTab;\nvar fadeSpeed = 250;\nvar infoPanel;...
javascript
chosen
[ { "from": "system", "value": "Fix stupid mistake in reexports.\n" }, { "from": "human", "value": "export { setResolver, getResolver } from './resolver';\nexport { setApplication } from './application';\nexport {\n default as setupContext,\n getContext,\n setContext,\n unsetContext,\n pauseT...
javascript
chosen
[ { "from": "system", "value": "Change mechanizm of showing photo\n" }, { "from": "human", "value": "define(\n [\n 'canjs',\n 'core/appState',\n 'lodash'\n ],\n function (can, appState, _) {\n\n var monitors = [\n 1024,\n 1152,\n ...
javascript
chosen
[ { "from": "system", "value": "Make StringMatch questions use new choice type\n" }, { "from": "human", "value": "/**\n * Copyright 2016 James Sharkey\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 *\...
javascript
chosen
[ { "from": "system", "value": "Support for sitemaps with only 0 or 1 item\n" }, { "from": "human", "value": "class ItemProvider {\n\n constructor() {\n this.SWITCH_ITEM = \"SwitchItem\";\n this.DIMMER_ITEM = \"DimmerItem\";\n this.COLOR_ITEM = \"ColorItem\";\n this.ROLLERSHUT...
javascript
chosen
[ { "from": "system", "value": "Add pageload fix for errthang\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": "Revert \"Attempt to fix provider injection\"\n\nThis reverts commit 436801481c2aab67a2b55521a32a476cd88687dc.\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/...
javascript
chosen
[ { "from": "system", "value": "Change logic to apply everyone group to user metadata as new auth0\ninternal profiles's `user.groups` is read-only and will cause errors\n" }, { "from": "human", "value": "function (user, context, callback) {\n // This is a work-around because the SSO Dashboard app...
javascript
chosen
[ { "from": "system", "value": "[Core] Make assets work for implementors.\n" }, { "from": "human", "value": "module.exports = function() {\n 'use strict';\n global.Clastic = global.Clastic || {};\n\n /**\n * @class Clastic.Clastic\n * @constructor\n */\n global.Clastic.Clas...
javascript
chosen
[ { "from": "system", "value": "docs: Update site ads on navigation\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport useScript from '@charlietango/use-script';\nimport DocSidebarBase from '@theme-original/DocSidebar';\nimport styles from '....
javascript
chosen
[ { "from": "system", "value": "Fix error message when svgexport is not installed\n" }, { "from": "human", "value": "var Promise = require('./promise');\nvar command = require('./command');\nvar fs = require('./fs');\nvar error = require('./error');\n\n// Convert a svg file to a pmg\nfunction conv...
javascript
chosen
[ { "from": "system", "value": "REMOVE COMMIT run only these tests\n" }, { "from": "human", "value": "require('should');\n\ndescribe(\"Mosto functional test\", function() {\n /*\n * arrancar sin playlists\n ** ver negro\n\n * arrancar con playlists\n ** ver que haya el play corr...
javascript
chosen
[ { "from": "system", "value": "Copy bower_components to www in bower gulp task\n" }, { "from": "human", "value": "'use strict';\n\nimport bower from 'gulp-bower';\nimport cache from 'gulp-cached';\nimport debug from 'gulp-debug';\nimport gulp from 'gulp';\nimport remember from 'gulp-remember';\ni...
javascript
chosen
[ { "from": "system", "value": "Refactor to use new model\n" }, { "from": "human", "value": "const dbOpsSchedules = require('../../util/db/schedules.js')\nconst ArticleModel = require('../../models/Article.js')\nconst log = require('../../util/logger.js')\n\nexports.normal = async (bot, message) =...
javascript
chosen
[ { "from": "system", "value": "Return current user as promise (saas-185)\n" }, { "from": "human", "value": "'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('usersService', ['RawUser', 'RawKey', usersService]);\n\n function usersService(RawUser, RawKey) {\n /*jshint va...
javascript
chosen
[ { "from": "system", "value": "Fix bug where textinput did re-render itself everytime\n" }, { "from": "human", "value": "import React from 'react';\nimport TextField from 'material-ui/TextField';\n\nconst PollAnswersForm = ({answers, addPollAnswer}) => {\n\n const onAddPollAnswer = (key) => {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix hero for only supported size\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\n\nimport s from './Hero.css';\r\n\nexport default class Hero extends Component {\n render() {\n\n const {\n className,\n children,...
javascript
chosen
[ { "from": "system", "value": "Clear badge text and set it when enabling or disabling badge text option\n" }, { "from": "human", "value": "import backgroundStore from './store';\nimport {\n startCountingBadgeTextAndAddListeners,\n stopCountingBadgeTextAndRemoveListeners,\n} from './badge-text-l...
javascript
chosen
[ { "from": "system", "value": "Fix channel fixture to set provider id\n" }, { "from": "human", "value": "const { fakeChannel, fakeChannelsResult } = require('tests/fakes');\n\n\nmodule.exports = (sandbox, channels) => {\n sandbox.stub(channels, 'get')\n .withArgs('1')\n .returns(fakeChanne...
javascript
chosen
[ { "from": "system", "value": "Remove first image to be used as cover for post\n" }, { "from": "human", "value": "/**\n * Main JS file for Casper behaviours\n */\n\n/*globals jQuery, document */\n(function ($) {\n \"use strict\";\n\n $(document).ready(function(){\n\n $(\".post-conten...
javascript
chosen
[ { "from": "system", "value": "Save reference to the to each editor on each textarea\n\n... so that it can be accessed from outside" }, { "from": "human", "value": "/**\n * Init for Processwire\n * These items could be added if fullscreen or sidebyside would work on PW\n * Note that fullscreen mo...
javascript
chosen
[ { "from": "system", "value": "Rename Lock class to match README\n" }, { "from": "human", "value": "import p from '../package';\nimport Renderer from './lock/renderer';\nimport { subscribe, getState } from './store/index';\nimport Auth0Lock from './lock/auth0_lock';\nimport Auth0 from 'auth0-js';...
javascript
chosen
[ { "from": "system", "value": "Add default width for panel\n" }, { "from": "human", "value": "define([\n \"src/panel\",\n \"less!src/stylesheets/main.less\"\n], function(Panel) {\n var panel = new Panel();\n\n // Add panel to grid\n codebox.app.grid.addView(panel);\n\n // Render...
javascript
chosen
[ { "from": "system", "value": "Move Type Mapping To Export Default In Index.JS\n\nMove the Type Mapping to export default, in Index.js because to allow\nthe developer to develop components of a theme for each of the types\nthat Frig allows to be rendered.\n" }, { "from": "human", "value": "import...
javascript
chosen
[ { "from": "system", "value": "Fix Input.wasKeyPressed for the first keypress\n" }, { "from": "human", "value": "'use strict';\r\n\r\nexport default class Input {\r\n\tconstructor(element, canvas) {\r\n\t\tthis.pressedKeys = {};\r\n\t\tthis.framePressedKeys = {};\r\n\t\tthis.previousPressedKeys =...
javascript
chosen
[ { "from": "system", "value": "Drop scs so they can be auto-fixed.\n" }, { "from": "human", "value": "// Array literal test\nvar a = Array();\nvar ab = [];\n\n// Array constructions\nvar b = new Array();\nvar bb = [];\n\n// Curly braces for statements\nfor (;;) x;\nfor (;;) {\\n x;\\n}\n\n// Lit...
javascript
chosen
[ { "from": "system", "value": "Use the correct Kinvey class\n" }, { "from": "human", "value": "import { Kinvey } from 'kinvey-javascript-sdk-core/dist/kinvey';\nimport { KinveyRackManager } from 'kinvey-javascript-sdk-core/dist/rack/rack';\nimport { CacheMiddleware as CoreCacheMiddleware } from '...
javascript
chosen
[ { "from": "system", "value": "Move the YTSearch function into its own method, call that when we start the app and pass in a default search term, add a property of onSearchTermChange which throws a function which calls the videoSearch method passing in the term as an argument.\n" }, { "from": "human"...
javascript
chosen
[ { "from": "system", "value": "fix: Add missing parentheses after Symbol\n" }, { "from": "human", "value": "import errorCodes from './error-codes.js'\nimport ExtendableError from 'es6-error'\n\nconst errorCode = Symbol\n\nexport default class VASTError extends ExtendableError {\n constructor (co...
javascript
chosen
[ { "from": "system", "value": "Remove the need for the babel polyfill\n" }, { "from": "human", "value": "require('babel-polyfill')\nconst async = require('async')\n\nfunction parallel (promiseFunctions) {\n return generatePromise(promiseFunctions, async.parallel)\n}\n\nfunction series (promiseFu...
javascript
chosen
[ { "from": "system", "value": "Create a redirect from /profile to /\n" }, { "from": "human", "value": "import React from \"react\"; // eslint-disable-line no-unused-vars\nimport { render } from \"react-dom\";\nimport { Router, Route, IndexRoute } from \"react-router\";\nimport { createHistory } f...
javascript
chosen
[ { "from": "system", "value": "Print sync errors to the console when `failureActionCreator` is not set.\n" }, { "from": "human", "value": "import { cancelled, put, take } from 'redux-saga/effects'\n\nexport function* syncChannel(channel, options) {\n const { successActionCreator, failureActionCr...
javascript
chosen
[ { "from": "system", "value": "Make password decoding more fun\n\n" }, { "from": "human", "value": "const crypto = require('crypto')\n\nlet input = 'abbhdwsy'\n\nlet md5 = str => crypto.createHash('md5').update(str).digest('hex')\nlet printCode = code => code.reduce((s, x) => s + (x != null ? x :...
javascript
chosen
[ { "from": "system", "value": "Change tooltip to \"Question Grid\"\n" }, { "from": "human", "value": "export default class {\n constructor($scope, auth, toast) {\n 'ngInject';\n\n $scope.buttons = [\n {\n name: 'View Code',\n icon: 'code',...
javascript
chosen
[ { "from": "system", "value": "Rename origin -> sourceNodes, u -> node" }, { "from": "human", "value": "// This is an ES6 module.\nexport function Graph(){\n \n // Keys are node ids.\n // Values are arrays of adjacent node ids.\n var edges = {};\n \n // Gets or creates the adjacent node lis...
javascript
chosen
[ { "from": "system", "value": "Add componentWillReceiveProps for dynamic datasource updates" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { ListView } from 'react-native';\n\nclass ScrollableList extends Component {\n constructor(props) {\n super(props);\n...
javascript
chosen
[ { "from": "system", "value": "Fix code climate style issues\n" }, { "from": "human", "value": "AjaxErrorMessageObj = function() {\n this.$flash = $('#ajax-error-message');\n this.$flash_text = $('#ajax-error-message-text');\n this.$flash_close = $('#ajax-error-message > .ajax-error-dism...
javascript
chosen
[ { "from": "system", "value": "Handle onChange event of buffer/storage section configuration\n\nSigned-off-by: Kenji Okimoto <7a4b90a0a1e6fc688adec907898b6822ce215e6c@clear-code.com>\n" }, { "from": "human", "value": "import \"lodash/lodash\"\n$(document).ready(() => {\n let configUrl = (name) =...
javascript
chosen
[ { "from": "system", "value": "Change CloudWatch metrics timer to 1 minute.\n" }, { "from": "human", "value": "var async = require('async');\n\nvar context;\nvar publishTimer;\n\nfunction publishToDashboard() {\n async.waterfall([\n function(callback) {\n context.consuler.get...
javascript
chosen
[ { "from": "system", "value": "Hide collapse before showing a modal\n\nThis will hopefully work out great on a mobile device.\n" }, { "from": "human", "value": "// Modal views\r\n$(function (app) {\r\n var modals = {\r\n $el: $('#modal-root'),\r\n show: function (modal) {\r\n ...
javascript
chosen
[ { "from": "system", "value": "Fix bug where sound isn't loaded but we say it is\n" }, { "from": "human", "value": "var loadAsset = require(\"./load-asset\");\n\nmodule.exports = function(audioContext, url, callback) {\n return loadAsset(url, \"arraybuffer\", function(err, asset) {\n if (err)...
javascript
chosen
[ { "from": "system", "value": "Change querykeys to allow for single key selection\n" }, { "from": "human", "value": "function levelrange(start, end){\n\treturn {\n\t\tkeyEncoding:'ascii',\n\t\tstart:start,\n\t\tend:end + '\\xff'\n\t}\n}\n\nfunction querykeys(path, starttime, endtime){\n\tpath += ...
javascript
chosen
[ { "from": "system", "value": "Add constants for fetching books.\n" }, { "from": "human", "value": "export const ADD_BOOK = 'ADD_BOOK';\nexport const TITLE_CHANGE = 'TITLE_CHANGE';\nexport const AUTHOR_CHANGE = 'AUTHOR_CHANGE';\n" }, { "from": "gpt", "value": "export const ADD_BOOK = ...
javascript
chosen
[ { "from": "system", "value": "Allow a better definition of the current scope\n\nLet's allow controllers to store the current action's id if it is\npresent (e.g. on an artist page).\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = class BaseController {\n /**\n * Delegates ...
javascript
chosen
[ { "from": "system", "value": "Watch for the `blur` event instead of `keypress`\n\nPressing \"Done\" on iOS7 is not triggering an <enter> keypress.\n" }, { "from": "human", "value": "MovieList.Views.Searchbox = Backbone.View.extend({\n template: _.template($('#tmpl-search').html()),\n\n eve...
javascript
chosen
[ { "from": "system", "value": "Use config variable instead of hardcoded url\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nimport AuthenticateRoute from 'wholetale/routes/authenticate';\n\nexport default AuthenticateRoute.extend({\n\n model: function(params) {\n // console.l...
javascript
chosen
[ { "from": "system", "value": "Fix JS of profile acct settings\n" }, { "from": "human", "value": "'use strict';\n\nvar $ = require('jquery');\nvar $osf = require('js/osfHelpers.js');\nvar accountSettings = require('js/accountSettings.js');\nvar changePassword = require('js/setPassword');\n\n$(fun...
javascript
chosen
[ { "from": "system", "value": "Add isDependencyError method to DependencyError\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = DependencyError;\n\nfunction DependencyError(message) {\n this.name = 'DependencyError';\n this.message = message;\n\n if (process.env.EMBER_VE...
javascript
chosen
[ { "from": "system", "value": "Update name of parents field to match API and add child_count\n" }, { "from": "human", "value": "import DS from 'ember-data';\nimport OsfModel from 'ember-osf/models/osf-model';\n\n/**\n * @module ember-preprints\n * @submodule models\n */\n\n/**\n * Model for OSF A...
javascript
chosen
[ { "from": "system", "value": "Update locationType for production docs site\n" }, { "from": "human", "value": "/* eslint-env node */\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n rootURL: '/',\n locationType: 'auto',\n ...
javascript
chosen
[ { "from": "system", "value": "Update to follow Airbnb style standards\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n showSettings: false,\n showLayer : true,\n didReceiveAttrs() {\n this._super(...arguments);\n if...
javascript
chosen
[ { "from": "system", "value": "Use expect api for element assertions\n" }, { "from": "human", "value": "const {client} = require('nightwatch-cucumber');\nconst {defineSupportCode} = require('cucumber');\n\nconst homePage = client.page.home();\n\ndefineSupportCode(({Given, Then}) => {\n\n Given...
javascript
chosen
[ { "from": "system", "value": "Add action to button story\n" }, { "from": "human", "value": "import React from 'react'\nimport { storiesOf } from '@kadira/storybook'\n\nimport { Button } from '../buttons'\n\nstoriesOf('Buttons', module)\n .add('Standard button', () => (\n <Button>I'm a button...
javascript
chosen
[ { "from": "system", "value": "Update TwitterStatus test to remove mock of Twit module\n" }, { "from": "human", "value": "jest.dontMock('../lib/twitter-status');\n\nimport TwitterStatus from '../lib/twitter-status';\njest.mock('Twit');\n\nvar ReadYaml = require('read-yaml');\nvar Twit = require('...
javascript
chosen
[ { "from": "system", "value": "Revert hideSilenced constant to default false value, set hideOccurrences to false\n" }, { "from": "human", "value": "var constantModule = angular.module('uchiwa.constants', []);\n\n// Settings\nconstantModule.constant('settings', {\n date: 'yyyy-MM-dd HH:mm:ss',\n ...
javascript
chosen
[ { "from": "system", "value": "Fix for Pokedex defaulting to [], not {}\n" }, { "from": "human", "value": "FullScreenPokemon.FullScreenPokemon.settings.statistics = {\n \"prefix\": \"FullScreenPokemon::\",\n \"defaults\": {\n \"storeLocally\": true\n },\n \"values\": {\n ...
javascript
chosen
[ { "from": "system", "value": "Refactor and optimization on redis key/value\n" }, { "from": "human", "value": "var db = require('../app').db;\nvar generate = require('project-name-generator');\nvar count;\nexports.getRoot = function(req, cb) {\n cb(null, {\"title\":\"Title\"});\n};\n\nvar setPage...
javascript
chosen
[ { "from": "system", "value": "Hide the \"Read\" role as being something users can select\n" }, { "from": "human", "value": "/*************************************************\n * Copyright (c) 2015 Ansible, Inc.\n *\n * All Rights Reserved\n *************************************************/\n\n...
javascript
chosen
[ { "from": "system", "value": "Add error mesage to report image carousel\n" }, { "from": "human", "value": "import React, { PureComponent } from \"react\";\nimport { Modal } from \"react-bootstrap\";\n\nexport default class ImageAnswerModal extends PureComponent {\n componentDidMount() {\n wi...
javascript
chosen
[ { "from": "system", "value": "Fix bug with leaking queues\n" }, { "from": "human", "value": "var io = require('socket.io').listen(8001)\n , amqp = require('amqp')\n ;\n\nio.set('log level', 1)\n\nvar connection = amqp.createConnection()\n\nconnection.on('ready', function(){\n\n connection.q...
javascript
chosen
[ { "from": "system", "value": "Add smc-util project to jest\n" }, { "from": "human", "value": "const { defaults: tsjPreset } = require(\"ts-jest/presets\");\nconst path = require(\"path\");\n\nmodule.exports = {\n projects: [\n {\n displayName: \"smc-webapp\",\n testMatch: [\n ...
javascript
chosen
[ { "from": "system", "value": "Set reconnect test to ignore on travis\n" }, { "from": "human", "value": "/**\n * @ignore\n */\nexports['Should correctly stop reconnection attempts after limit reached'] = {\n metadata: { requires: { topology: ['single'] } },\n\n // The actual test we wish to run...
javascript
chosen
[ { "from": "system", "value": "Refactor entry javascript to use ReduxRouter as the entry component into the application\n" }, { "from": "human", "value": "import 'babel-core/polyfill';\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimpor...
javascript
chosen
[ { "from": "system", "value": "Add default values for params\n" }, { "from": "human", "value": "import gravity from \"lib/loaders/legacy/gravity\"\nimport OrderedSet from \"./ordered_set\"\nimport { GraphQLString, GraphQLNonNull, GraphQLList, GraphQLBoolean, GraphQLInt } from \"graphql\"\n\nconst...
javascript
chosen
[ { "from": "system", "value": "Add 'service:metrics' to dashboard route test" }, { "from": "human", "value": "import { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('route:dashboard', 'Unit | Route | dashboard', {\n // Specify the other units that are required for this test.\n // needs...
javascript
chosen
[ { "from": "system", "value": "Change additions from green to blue for accessibility\n\nit was mentioned on irc.perl.org#metacpan\nthat red/green is bad for color blindness\nand the blue seems a bigger contrast.\n" }, { "from": "human", "value": ";(function()\n{\n\t// CommonJS\n\ttypeof(require) ...
javascript
chosen
[ { "from": "system", "value": "Update example to it works again.\n" }, { "from": "human", "value": "var Http = require('http');\nvar Hapi = require('hapi');\nvar EventEmitter = require('events').EventEmitter;\nvar GoodFile = require('../');\n\nvar server = new Hapi.Server('127.0.0.1', 31337);\n\n...
javascript
chosen
[ { "from": "system", "value": "Remove prefix in the forwarded messages from IRC\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(config, ircbot) {\n\tconst Rcon = require('rcon');\n\n\tconst client = new Rcon(config.rcon.host, config.rcon.port, config.rcon.password);\...
javascript
chosen
[ { "from": "system", "value": "Reset scroll on back/next pages.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n queryParams: {\n page: {\n refreshModel: true\n }\n }, \n\n model(params) {\n let now = new Date();\n let twoM...
javascript
chosen
[ { "from": "system", "value": "Edit code to fix bug\n" }, { "from": "human", "value": "module.exports = (sequelize, DataTypes) => {\n const Group = sequelize.define('Group', {\n name: {\n type: DataTypes.STRING,\n allowNull: false,\n },\n description: {\n type: DataTypes....
javascript
chosen
[ { "from": "system", "value": "Fix placement of newly added list items\n\nUpdate how we work out where to add new items to lists to cope with\nthe changed page layout\n" }, { "from": "human", "value": "// ------------------------\n// Launch a backbone powered entry box when someone clicks the ne...
javascript
chosen
[ { "from": "system", "value": " Change arrow function to an IE11 compatible function\n\nImports https://github.com/api-platform/core/pull/2899 and fixes https://github.com/nelmio/NelmioApiDocBundle/issues/1517" }, { "from": "human", "value": "// This file is part of the API Platform project.\n//\...
javascript
chosen
[ { "from": "system", "value": "Add a lasting effect to each eligible card" }, { "from": "human", "value": "const DrawCard = require('../../drawcard.js');\n\nclass YoungHarrier extends DrawCard {\n setupCardAbilities(ability) {\n this.action({\n title: 'Prevent other character...
javascript
chosen
[ { "from": "system", "value": "Use XHR to get/send thruster settings\n" }, { "from": "human", "value": "let HL = 0;\nlet VL = 1;\nlet VC = 2;\nlet VR = 3;\nlet HR = 4;\n\nclass Data {\n static getData(cb) {\n cb(null, {\n sensitivity: {\n strength: 0.7,\n ...
javascript
chosen
[ { "from": "system", "value": "Set the isNew flag when finding a feed\n" }, { "from": "human", "value": "'use strict';\n\nconst request = require('request'),\n trans = require('trans'),\n chalk = require('chalk');\n\nmodule.exports = (state, opts, cb) => {\n const url = state.conf('api...
javascript
chosen
[ { "from": "system", "value": "Fix current status color change\n" }, { "from": "human", "value": "var socket = io();\n\n$('.btn-green').click(function() {\n socket.emit('changeColor', 'green');\n});\n\n$('.btn-yellow').click(function() {\n socket.emit('changeColor', 'yellow');\n});\n\n$('.b...
javascript
chosen
[ { "from": "system", "value": "Adjust score for devil and coin\n\n* Also allow joker to cover any cell in that column\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.ObjectController.extend({\n cells: Ember.computed.alias('content.board.cells'),\n spinner: ...
javascript
chosen
[ { "from": "system", "value": "Use the mock service, add features as needed\n\nConflicts:\n\tapp/js/controllers.js\n\nWTK: I removed everything except websocket.js (originally services.js)\nsince we're splitting out the websocket code.\n" }, { "from": "human", "value": "'use strict';\n\n/* Servic...
javascript
chosen
[ { "from": "system", "value": "Fix reference in example script.\n" }, { "from": "human", "value": "const trace = require('./lib/trace')();\n\n// register a JS listener\ntrace.on('trace', (category, trace_obj) => {\n console.log(category, trace_obj);\n});\n\n// send a trace\ntrace.trace('joshgav-...
javascript
chosen
[ { "from": "system", "value": "Fix typo in examples text\n" }, { "from": "human", "value": "/**\n * @flow\n */\n\nimport React from 'react';\nimport { Picker, StyleSheet, View } from 'react-native';\n\nconst PickerExample = props => (\n <View style={styles.root}>\n <Picker {...props}>\n ...
javascript
chosen
[ { "from": "system", "value": "fix(rasterize-list): Update test to not hang on failed promise-dependant expecation\n" }, { "from": "human", "value": "'use strict';\n\nconst expect = require('../../helpers/expect');\nconst fs = require('fs');\nconst sizeOf = require('image...
javascript
chosen
[ { "from": "system", "value": "Support giving full dates in month-year inputs\n\nFrom user testing" }, { "from": "human", "value": "'use strict';\n\nangular.module('ddsApp').directive('ddsDateMonthYear', function() {\n return {\n require: 'ngModel',\n link: function(scope, elm, a...
javascript
chosen
[ { "from": "system", "value": "Rewrite read function with async/await\n" }, { "from": "human", "value": " var Promise = require('bluebird');\n var fs = Promise.promisifyAll(require('fs'));\n\n exports.read = function read(filename){\n fs.readFileAsync(filename, 'UTF-8').then(function(data){...
javascript
chosen
[ { "from": "system", "value": "Add missing expectations in test\n\nSummary: Closes https://github.com/facebook/relay/pull/619\n\nReviewed By: yungsters\n\nDifferential Revision: D2680098\n\nfb-gh-sync-id: ec48fcfbae336b1615ed754e5fa3857e5891610d\n" }, { "from": "human", "value": "/**\n * Copyrigh...
javascript
chosen
[ { "from": "system", "value": "Use dumb query parsing to avoid a DoS attack where a { $regex } matcher\nwith evil regex could be inserted into a query\n\nhttp://localhost:8080/api/statistics/counters?area[$regex]=((\\w%2B.%2B)%2B)%2BG\n\nThe URL would:\n\n* Have its query value parsed as an object\n* This wa...
javascript
chosen
[ { "from": "system", "value": "Make sure that organization new button goes to organization page\n" }, { "from": "human", "value": "import React, {Component} from 'react'\nimport {connect} from 'react-redux'\n\n\nimport {httpRequestSelector} from 'gComponents/organizations/show/httpRequestSelector...
javascript
chosen
[ { "from": "system", "value": "Add lint and watch config.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n\n jasmine: {\n src : 'assets/require.js',\n helpers : 'test/lib/*.js',\n timeout : 10000\n }\n...
javascript
chosen