conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove commented code not used.\n\n\nFormer-commit-id: e3f7d5db84e5f24f7647e03c5b1f15a5e24b2d21" }, { "from": "human", "value": "setupFlorence();\n\n\n//forms field styling markup injection\n//$('select:not(.small)').wrap('<span class=\"selectbg\"></span>');\n//$('s...
javascript
chosen
[ { "from": "system", "value": "Connect to database before testing and nuke db before each\n" }, { "from": "human", "value": "'use strict';\nvar assert = require('assert');\n\ndescribe('Invoice', function() {\n beforeEach(function(done) {\n // TODO: connect to db and provide a handle to it\n ...
javascript
chosen
[ { "from": "system", "value": "Add status, author, slug, description, goals, requirements, outcome columns to project migration file\n" }, { "from": "human", "value": "\r\nexports.up = function(knex, Promise) {\r\n return knex.schema.createTable('projects', function (table) {\r\n table.increm...
javascript
chosen
[ { "from": "system", "value": "Stop logging safari-extension:// CSP blocking\n" }, { "from": "human", "value": "var utils = require('../lib/utils');\n\nmodule.exports = {\n ping: function(request, reply) {\n return reply('ok').code(200);\n },\n\n status: function(appVersion) {\n return f...
javascript
chosen
[ { "from": "system", "value": "Add a random field to time service responses\n" }, { "from": "human", "value": "var cote = require('cote');\n\nvar hostname = require('os').hostname();\nvar source = `time-service@${hostname}`;\n\nvar timeResponder = new cote.Responder({\n name: 'Time Responder'\...
javascript
chosen
[ { "from": "system", "value": "Fix bug that prevents `yo incubator` from working\n" }, { "from": "human", "value": "\"use strict\";\n\nvar yeoman = require(\"yeoman-generator\");\nvar incSay = require(\"incubator-say\");\nvar util = require(\"util\");\nvar path = require(\"path\");\n\nvar Inc...
javascript
chosen
[ { "from": "system", "value": "Correct footer links for guides\n" }, { "from": "human", "value": "// --- Dependencies\nimport * as React from 'react'\nimport { cx } from 'emotion'\n\n// --- Images\nimport LogoSrc from '../images/logo-spark-footer.svg'\n\n// --- Utils\nimport styles from '../util...
javascript
chosen
[ { "from": "system", "value": "Remove import for debug code\n\nRemove an import added during debugging.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport {\n moduleFor,\n test\n} from 'ember-qunit';\n\nmoduleFor('service:i18n', {\n // Specify the other units that are requir...
javascript
chosen
[ { "from": "system", "value": "Fix typo for route property." }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n protocol: 'https://',\n host: 'tartan.plaid.com',\n endpoint: {\n get: {\n method: 'GET',\n route: 'connect'\n },\n submit: {\n method: 'PO...
javascript
chosen
[ { "from": "system", "value": "Add mpd client as a publicly acessible object\n" }, { "from": "human", "value": "var mpdProcess = require('./mpd-process.js'),\n mpdClient = require('./mpd-client.js');\n\nexports.instance = function (mpdConfig, radiodanConfig) {\n var instance = {},\n clie...
javascript
chosen
[ { "from": "system", "value": "Add sub views to the router." }, { "from": "human", "value": "\"use strict\";\n\n(function () {\n angular\n .module(\"argo\")\n .config(config)\n .run(setup);\n\n config.$inject = [\"$stateProvider\", \"$urlRouterProvider\"];\n function...
javascript
chosen
[ { "from": "system", "value": "Move Extended Template Funciton Logic into Template Object\n" }, { "from": "human", "value": "var Template = module.exports = function(fn, args) {\n this.fn = fn ? recoverFn(fn.toString()) : null\n this.args = args || []\n}\n\nTemplate.prototype.$serialize = funct...
javascript
chosen
[ { "from": "system", "value": "Hide Drag-Drop when no ElementDetails\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport {DragDropContext} from 'react-dnd';\nimport {Col} from 'react-bootstrap';\nimport HTML5Backend from 'react-dnd-html5-backend';\n\nimport List fro...
javascript
chosen
[ { "from": "system", "value": "spec-helper: Add support for function call attribute (&)\n" }, { "from": "human", "value": "window.m = angular.mock.module;\nwindow.compileHtml = function(htmlStr, data, parentElement = null) {\n data = data || {};\n var $scope;\n inject(function($compile, ...
javascript
chosen
[ { "from": "system", "value": "Clean up comments & reformat code\n" }, { "from": "human", "value": "//----------------------------\n// Define search and replace\n// terms for image src link\n//----------------------------\n\nvar search = \"s100\";\nvar replace = \"s512\";\n\n//-------------------...
javascript
chosen
[ { "from": "system", "value": "Fix bound function in gulp error log\n" }, { "from": "human", "value": "const notify = require('gulp-notify');\n\nmodule.exports = () => {\n const args = Array.prototype.slice.call(arguments);\n\n // Send error to notification center with gulp-notify\n notify.onE...
javascript
chosen
[ { "from": "system", "value": "Revert \"Made it slighly more compact with less jQuery selection\"\n\nThis reverts commit c9bc3900909a85b9b4be31c4dac7f809127a8bf0.\n" }, { "from": "human", "value": "// Update the local timeline from a Meteor server\n// XXX: If @a is subscribed to @b, @a should get...
javascript
chosen
[ { "from": "system", "value": "Use our linting rules in gulp.\n" }, { "from": "human", "value": "'use strict'\n\nconst util = require('gulp-util')\nconst path = require('path')\n\nexports.fn = function (gulp, paths, mode, done) {\n if (mode.production) {\n util.log('Skipping \\'' + util.color...
javascript
chosen
[ { "from": "system", "value": "Fix method to always return a value.\n" }, { "from": "human", "value": "Application.Services.factory('Events', ['$filter', EventsService]);\n\nfunction EventsService($filter) {\n var service = {\n date: '',\n\n addConvertedTime: function (project) ...
javascript
chosen
[ { "from": "system", "value": "Fix reddit parsing in case error is returned/data is unavailable\n" }, { "from": "human", "value": "//\n// Reddit UI Data Parser\n//\n// Parses log data provided to UI frontent into content that can be rendered.\n//\n\nconst redditParser = (chartName, chartData, cal...
javascript
chosen
[ { "from": "system", "value": "Fix display of HTML-escaped chars in player description\n" }, { "from": "human", "value": "const $ = jQuery = require(\"jquery\")\r\nconst localforage = require(\"localforage\")\r\nconst path = require(\"path\")\r\nconst fs = require(\"fs\")\r\nconst Jimp = require(...
javascript
chosen
[ { "from": "system", "value": "Add parenthesized compound statements as a primary expression.\n" }, { "from": "human", "value": "module.exports = grammar({\n name: 'ruby',\n\n extras: $ => [\n $.comment,\n $._line_break,\n /[ \\t\\r]/\n ],\n\n rules: {\n program: $ => $._compound_...
javascript
chosen
[ { "from": "system", "value": "Fix _ function call from schedule window\n" }, { "from": "human", "value": "Ext.define('Clonos.window.Schedule', {\n extend: 'Ext.window.Window',\n alias: 'widget.scheduleWindow',\n title: _('Schedule refresh'),\n modal: true,\n draggable: false,\n ...
javascript
chosen
[ { "from": "system", "value": "Correct comments around license header\n" }, { "from": "human", "value": "// /**\n * @license\n * Copyright 2020 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\n// === Files in this section do not contain FOAM models\n\n...
javascript
chosen
[ { "from": "system", "value": "Make view instantiation right capitals\n" }, { "from": "human", "value": "/**\n * Reset Password page\n */\n'use strict';\nvar $ = require('jquery');\n\nvar setPassword = require('js/setPassword');\n\n\n$(document).ready(function() {\n new setPassword('#setPasswo...
javascript
chosen
[ { "from": "system", "value": "Allow events not to be trapped in mapKeyEventCallbacks\n" }, { "from": "human", "value": "/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\nimport EventUtil from '....
javascript
chosen
[ { "from": "system", "value": "Deploy: Use call API to call generate console\n" }, { "from": "human", "value": "var term = require('term'),\n async = require('async'),\n fs = require('graceful-fs'),\n extend = require('../../extend'),\n list = extend.deployer.list(),\n util = require('../../...
javascript
chosen
[ { "from": "system", "value": "Store token in localStorage, if possible\n\nClose #1059\n" }, { "from": "human", "value": "/* global CONFIG */\nimport { getCookie, setCookie, localStorage, userParser } from '../utils/';\n\nconst { userStorageKey, tokenPrefix } = CONFIG.auth;\nconst NAME = `${token...
javascript
chosen
[ { "from": "system", "value": "Reformat the code to match the rest of Paper.js\n" }, { "from": "human", "value": "/**\n * Imports svg into items with groups\n * Stetson Alpha - Paper.js\n *\n */\n\nvar ImportSVG = function()\n{\n //initialize\n function initialize()\n {\n\n };\n\n ...
javascript
chosen
[ { "from": "system", "value": "Remove clean task before build task\n" }, { "from": "human", "value": "var path = require('path');\nvar gulp = require('gulp');\nvar notify = require(\"gulp-notify\");\nvar changed = require('gulp-changed');\nvar babel = require('gulp-babel');\nvar sourcemaps = requ...
javascript
chosen
[ { "from": "system", "value": "Improve text suffix for days" }, { "from": "human", "value": "module.exports = function(date) {\n\tif(date === undefined) {\n\t\tthrow new Error('No date provided');\n\t}\n\tif((date instanceof Date) === false) {\n\t\tthrow new Error('Provided date is not an instanc...
javascript
chosen
[ { "from": "system", "value": "Add accounts to initial state\n" }, { "from": "human", "value": "import * as types from './actions'\n\nconst initialState = {\n queue: [\n { id: 1, amount: 200 },\n { id: 2, amount: 10 },\n { id: 3, amount: 50 },\n { id: 4, amount: 100 }\n ],\n totalA...
javascript
chosen
[ { "from": "system", "value": "Fix model loader for webpack\n" }, { "from": "human", "value": "const ssaclAttributeRoles = require('ssacl-attribute-roles')\nconst debug = require('debug')('bshed:models')\nconst Sequelize = require('sequelize')\nconst assert = require('assert')\nconst path = requi...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect policy number formatting\n" }, { "from": "human", "value": "import Realm from 'realm';\n\nexport class InsurancePolicy extends Realm.Object {\n get policyNumber() {\n return `${this.policyNumberPerson} ${this.policyNumberFamily}`;\n }\n}\n\nInsura...
javascript
chosen
[ { "from": "system", "value": "Fix a great disturbance in the force...\n\nAs though a thousand linters were silent, and Abram cried out.\n" }, { "from": "human", "value": "/*\nAutomatically expose translations for addon in a way that can be merged in with app\n https://github.com/jamesarosen/e...
javascript
chosen
[ { "from": "system", "value": "Fix test in dev environment.\n" }, { "from": "human", "value": "var EC = protractor.ExpectedConditions;\n\ndescribe('con10t page', function() {\n\n it('should display a heatmap on the grako_map page', function(done) {\n\n browser.get('/project/grako_map');...
javascript
chosen
[ { "from": "system", "value": "[local-sync] Fix “Add INBOX label” issue\n" }, { "from": "human", "value": "const SyncbackTask = require('./syncback-task')\nconst TaskHelpers = require('./task-helpers')\n\nclass SetThreadLabelsIMAP extends SyncbackTask {\n description() {\n return `SetThreadLa...
javascript
chosen
[ { "from": "system", "value": "Put highcharts in separate build chunk.\n" }, { "from": "human", "value": "/*global module: false, require: false */\n'use strict';\n\nvar React = require('react');\nvar chart = require('./chart');\nrequire('../css/chart.css');\n\nvar ChartView = React.createClass({...
javascript
chosen
[ { "from": "system", "value": "Replace nbsp in plain text\n\nref #33\n" }, { "from": "human", "value": "var plain_text_clone = null;\n\nfunction toggle_plain_text() {\n var lines = document.querySelectorAll(\"td.code_line\"),\n line_len = lines.length,\n text = \"\",\n pla...
javascript
chosen
[ { "from": "system", "value": "Clean up modal when it goes away\n" }, { "from": "human", "value": "/* Scat functionality */\n\n\"use strict\";\n\nclass ScatUtils {\n\n htmlToElement (html) {\n let template= document.createElement('template');\n template.innerHTML= html.trim();\n return ...
javascript
chosen
[ { "from": "system", "value": "Format submission timestamp as string in CSV download\n" }, { "from": "human", "value": "PT = PT || {};\n\nPT.downloadCsv = function(serverResponse){\n var survey = serverResponse.survey;\n var responses = serverResponse.responses;\n var a = document.createElemen...
javascript
chosen
[ { "from": "system", "value": ":new: Implement basics of indie registry\n" }, { "from": "human", "value": "'use babel'\n\nimport {Emitter, CompositeDisposable} from 'atom'\n\nexport class IndieRegistry {\n constructor() {\n this.subscriptions = new CompositeDisposable()\n this.emitter = ne...
javascript
chosen
[ { "from": "system", "value": "Add date year months and day matchers\n" }, { "from": "human", "value": "'use strict'\n\nconst chai = require('chai')\nglobal.expect = chai.expect\n" }, { "from": "gpt", "value": "'use strict'\n\nconst edtf = require('../..')\nconst chai = require('chai'...
javascript
chosen
[ { "from": "system", "value": "Build HTML coverage report too\n" }, { "from": "human", "value": "module.exports = function (karma) {\n 'use strict';\n\n karma.set({\n basePath: '.',\n\n frameworks: ['jasmine'],\n browsers: ['PhantomJS'],\n\n plugins: [\n 'karma-jasmine',\n ...
javascript
chosen
[ { "from": "system", "value": "Handle the case where mimetype doesn't exist in the file property\n" }, { "from": "human", "value": "import React, { Component } from 'react';\r\nimport MrkdwnText from './MrkdwnText';\r\n\r\nimport './Files.less';\r\n\r\nexport default class extends Component {\r\n...
javascript
chosen
[ { "from": "system", "value": "Define right params to API\n" }, { "from": "human", "value": "angular.module(\"proBebe.services\").factory('BirthdayCard', function($http, Constants) {\n\n function Card() {}\n\n Card.get = function(params){\n return $http.get(Constants.BIRTHDAY_CARD, params);\...
javascript
chosen
[ { "from": "system", "value": "Fix AJAX cannot get the CSRF token\n\nProduction has CSRF_COOKIE_HTTPONLY = True so even if CSRF is in the\ncookie, javascript cannot access it.\n\nMore on https://docs.djangoproject.com/en/1.9/ref/settings/#csrf-cookie-httponly\n" }, { "from": "human", "value": "//...
javascript
chosen
[ { "from": "system", "value": "Add privateroom table to db\n" }, { "from": "human", "value": "const Sequelize = require('sequelize');\nconst sequelize = new Sequelize('tbd', 'root', '12345');\n\nconst users = sequelize.define('user', {\n userName: {\n type: Sequelize.STRING\n },\n password:...
javascript
chosen
[ { "from": "system", "value": "Fix error in filename for user and location router.\n" }, { "from": "human", "value": "// load environment variables\nrequire('dotenv').config({silent: true})\n\nconst express = require('express')\nconst app = express()\nconst userRouter = require('./routes/userRout...
javascript
chosen
[ { "from": "system", "value": "Add promise stack traces for debugging...\n" }, { "from": "human", "value": "/*\n * Kansas Metrics\n * Metrics library for Kansas.\n * https://github.com/thanpolas/kansas-metrics\n *\n * Copyright (c) 2014 Thanasis Polychronakis\n * Licensed under the MIT license.\n...
javascript
chosen
[ { "from": "system", "value": ":art: Make server compatible with latest Client\n" }, { "from": "human", "value": "\"use strict\"\n\nlet EventEmitter = require('events').EventEmitter\nlet WS = require('ws')\n\nlet Client = require('./Client')\n\nclass Server extends EventEmitter{\n constructor(Op...
javascript
chosen
[ { "from": "system", "value": "feat(redux): Add lastModified to the thread reducer\n" }, { "from": "human", "value": "import * as types from '../types'\nimport initialState from '../initialState';\nimport { createReducer, mergeState } from '~/utils/redux';\n\nexport default createReducer(initialS...
javascript
chosen
[ { "from": "system", "value": "Add key to module table list item\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\n\nimport ActionDelete from 'material-ui/svg-icons/action/delete';\nimport IconButton from 'material-ui/IconButton';\nimport { List, ListItem } from 'mater...
javascript
chosen
[ { "from": "system", "value": "Add Ext.dom.Element as common requirement\n" }, { "from": "human", "value": "/*jslint browser: true, undef: true *//*global Ext*/\nExt.define('Site.Common', {\n singleton: true,\n requires: [],\n\n constructor: function() {\n Ext.onReady(this.onDocRe...
javascript
chosen
[ { "from": "system", "value": "Add more robust test case\n" }, { "from": "human", "value": "\nimport test from 'ava'\nimport jsdom from 'jsdom-global'\nimport cxs from '../src'\n\njsdom('<html></html>')\n\ntest.beforeEach(t => {\n cxs.clearCache()\n\n t.context.style = {\n display: 'block',\...
javascript
chosen
[ { "from": "system", "value": "Fix save method to update only changed fields\n" }, { "from": "human", "value": "Meteor.methods({\n '/member/save': function(data) {\n var member = new Member(data);\n\n if (member.validate()) {\n return member.save();\n } else {\n return false;\...
javascript
chosen
[ { "from": "system", "value": "Add track art to normal\n" }, { "from": "human", "value": "'use strict';\n\n/* global Connector */\n\nif (/^\\/premiere\\/.*/.test(window.location.pathname)) {\n\n\tConnector.playerSelector = '.hype-player';\n\n\tConnector.artistSelector = '#album-header-artist';\n\...
javascript
chosen
[ { "from": "system", "value": "Replace createElement with a ReactFactory.\n" }, { "from": "human", "value": "/* global React ReactDOM */\nvar div = React.DOM.div\nvar h1 = React.DOM.h1\n\nvar MyTitle = React.createClass({\n render () {\n return (\n div(null,\n ...
javascript
chosen
[ { "from": "system", "value": "Create soundAndCounter method to call updateCounterView\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.prototyp...
javascript
chosen
[ { "from": "system", "value": "Use import rather than require\n" }, { "from": "human", "value": "let split = require('split');\n\nlet counts = Object.create(null);\n\nprocess.stdin.setEncoding('utf8');\n\nprocess.stdin.pipe(split()).on('data', line =>\n (line.toLowerCase().match(/[a-z\\']+/g) ||...
javascript
chosen
[ { "from": "system", "value": "Use structured selector in SuccessModalSelector\n\nRefs #473.\n" }, { "from": "human", "value": "import { createSelector } from 'reselect';\n\nimport ModalTypes from 'constants/ModalTypes';\nimport modalIsOpenSelectorFactory from 'state/selectors/factories/modalIsOp...
javascript
chosen
[ { "from": "system", "value": "Fix for appid detection in friendsthatplay\n" }, { "from": "human", "value": "'use strict';\n\nvar CurrentAppID,\n\tGetCurrentAppID = function()\n\t{\n\t\tif( !CurrentAppID )\n\t\t{\n\t\t\tCurrentAppID = location.pathname.match( /\\/(app|sub)\\/([0-9]{1,7})/ );\n\t\...
javascript
chosen
[ { "from": "system", "value": "fix(Header): Fix header link issues on github pages\n" }, { "from": "human", "value": "import \"./Header.css\";\n\nimport { Link } from \"react-router-dom\";\nimport React from \"react\";\n\n/**\n * A simple header with a label that links to \"/\"\n *\n * @export\n ...
javascript
chosen
[ { "from": "system", "value": "Use primitive memoization in isGitRoot\n" }, { "from": "human", "value": "'use strict';\n\nvar resolve = require('path').resolve\n , memoize = require('es5-ext/lib/Function/prototype/memoize')\n , promisify = require('deferred').promisify\n , lstat = prom...
javascript
chosen
[ { "from": "system", "value": "Fix a bad function name\n" }, { "from": "human", "value": "\"use strict\";\n\nvar createParser = require(\"postcss-selector-parser\"),\n \n keyframes = /keyframes$/i;\n\nexports.keyframes = keyframes;\n\n// TODO: this is probably inefficient, but oh well for n...
javascript
chosen
[ { "from": "system", "value": "Check Leaflet version on init\n" }, { "from": "human", "value": "/**\n * @api\n * @namespace carto\n *\n * @description\n * # Carto.js\n * All the library features are exposed through the `carto` namespace.\n *\n *\n * - **Client** : The api client.\n * - **sou...
javascript
chosen
[ { "from": "system", "value": "KiwiShell: Insert sleep when waiting user input\n" }, { "from": "human", "value": "/*\n * Expand Eeadline object\n */\nReadline.inputLine = function(){\n\tlet line = null ;\n\twhile(line == null){\n\t\tline = Readline.input() ;\n\t}\n\tconsole.print(\"\\n\") ; // in...
javascript
chosen
[ { "from": "system", "value": "Fix code style in `./Solutions`\n" }, { "from": "human", "value": "'use strict';\n\nconst methods = iface => {\n const names = [];\n for (const name in iface) {\n const fn = iface[name];\n if (typeof fn === 'function') {\n names.push([name, fn.length]);...
javascript
chosen
[ { "from": "system", "value": "Fix asset `checksAfterTimeOut`, use valid global instance of `wTools`\n" }, { "from": "human", "value": "\nrequire( 'wTesting' );\nconst _ = require( 'wTools' );\n_.include( 'wConsequence' );\n\n//\n\nfunction routine1( test )\n{\n test.description = 'description1'...
javascript
chosen
[ { "from": "system", "value": "Add state for create event error handling\n" }, { "from": "human", "value": "import { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport * as actionCreators from '../actions/index.jsx';\nimport HostCreateEvent from '../components/Host...
javascript
chosen
[ { "from": "system", "value": "Use lowercase when property on tools for things like \"1980s\"\n" }, { "from": "human", "value": "import styled from 'styled-components';\nimport React from 'react';\nimport LanguageThemeProvider from 'components/LanguageThemeProvider';\nimport ContentBlock from 'co...
javascript
chosen
[ { "from": "system", "value": "Disable global, non-passive `touchstart` and `touchmove` event listeners\n\nsee https://github.com/emberjs/ember.js/issues/15140\n" }, { "from": "human", "value": "import Application from '@ember/application';\nimport Resolver from './resolver';\nimport loadInitiali...
javascript
chosen
[ { "from": "system", "value": "Add Pinback URL for the verification process\n" }, { "from": "human", "value": "const Report = require('./Report');\nconst Notification = require('./Notification');\n\nasync function Reporter( request, reply ) {\n\n const result = await new Report({\n k: process...
javascript
chosen
[ { "from": "system", "value": "Include original error if Botkit fails to connect\n\nHelps users diagnose issues from Botkit by logging the original error" }, { "from": "human", "value": "'use strict'\n\nconst Botkit = require('botkit')\n\nclass SlackBot {\n constructor() {\n this.controller =...
javascript
chosen
[ { "from": "system", "value": "Simplify and make better :)\n\nRemoved deep watch because it broke on when using scopes. Instead it now sets a series of getters on the scope for each property found on the given scope. Also it's much more performant." }, { "from": "human", "value": "angular.module(...
javascript
chosen
[ { "from": "system", "value": "Refactor adding question to conversation\n\nThis will make adding different types of questions easier.\n" }, { "from": "human", "value": "const handleJoin = (bot, message) =>\n bot.reply(message, 'This trusty survey bot is here to help.')\n\nconst doSurvey = (bot, ...
javascript
chosen
[ { "from": "system", "value": "Rename PLF and add tooltip\n" }, { "from": "human", "value": "/** @jsx React.DOM */\n'use strict';\n\nvar React = require('react/addons'),\n ReactIntlMixin = require('react-intl');\n\nvar cx = React.addons.classSet;\n\n\nvar ReformSelector = React.createClass({\n ...
javascript
chosen
[ { "from": "system", "value": "Fix modal when modal is open on mounting\n" }, { "from": "human", "value": "import { useState, useRef, useEffect, useMemo } from 'react';\nimport invariant from 'fbjs/lib/invariant';\nimport useIdentifier from '../../hooks/useIdentifier';\nimport useModalEffects fro...
javascript
chosen
[ { "from": "system", "value": "Update button to use JQueryUI Mixin\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n tagName: 'button',\n disabled: false,\n icon: \"\",\n\n didInsertElement: function() {\n var _this = thi...
javascript
chosen
[ { "from": "system", "value": "Set up a valid process to begin testing against.\n" }, { "from": "human", "value": "describe('Processes', function() {\n 'use strict';\n let atf = require('../../specs/atf');\n let ropts = {\n db: 'mctest',\n port: 30815\n };\n\n let r =...
javascript
chosen
[ { "from": "system", "value": "Allow active element selection for REST routing." }, { "from": "human", "value": "$(function() {\n\n $('#side-menu').metisMenu();\n\n});\n\n//Loads the correct sidebar on window load,\n//collapses the sidebar on window resize.\n// Sets the min-height of #page-wra...
javascript
chosen
[ { "from": "system", "value": "Update TAP status field label words\n" }, { "from": "human", "value": "const interaction = {\n company: 'Company',\n subject: 'Subject',\n notes: 'Notes',\n contact: 'Contact',\n date: 'Date of interaction',\n dit_adviser: 'DIT adviser',\n service: 'Service',...
javascript
chosen
[ { "from": "system", "value": "Stop polling if 'filterDate' is undefined\n" }, { "from": "human", "value": "// Place all the behaviors and hooks related to the matching controller here.\n// All this logic will automatically be available in application.js.\n// You can use CoffeeScript in this file...
javascript
chosen
[ { "from": "system", "value": "Make sure we can't book in next day and can't submit if there's a problem\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar Objectid = mongoose.Schema.Types.ObjectId;\n\nvar PendinguserSchema = n...
javascript
chosen
[ { "from": "system", "value": "Fix jest auto-mocks hoisting on Windows\n\nSummary: ts-jest transformation was not applied on Windows because of wrong pattern in jest.config. Because of this jest.mock calls was not hoisted to the top and were applied after imports.\n\nReviewed By: mweststrate\n\nDifferential ...
javascript
chosen
[ { "from": "system", "value": "Fix import of animeGridList style\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport AnimeBoxLink from 'components/AnimeBoxLink';\n\nimport {\n GridContainer,\n} from 'style/animeGridList';\n\nclass AnimeGri...
javascript
chosen
[ { "from": "system", "value": "Set `drake` only if DOM is present\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nconst {Component, on} = Ember;\n\nexport default Component.extend({\n\n drake: null,\n\n destroyDrake: function () {\n var drake = this.get('drake');\n ...
javascript
chosen
[ { "from": "system", "value": "Remove dead comment and NewAirbrake export" }, { "from": "human", "value": "var Client = require(\"./client\"),\n SourcemapsObtainer = require(\"./util/sourcemaps_obtainer\"),\n SourcemapsProcessor = require(\"./processors/sourcemaps_processor\")...
javascript
chosen
[ { "from": "system", "value": "Use the correct name for the ListBuckets operation\n" }, { "from": "human", "value": "var inspect = require('eyes').inspector();\nvar awssum = require('awssum');\nvar amazon = awssum.load('amazon/amazon');\nvar S3 = awssum.load('amazon/s3').S3;\n\nvar env = process....
javascript
chosen
[ { "from": "system", "value": "Reset device list on scan\n" }, { "from": "human", "value": "(function(){\n 'use strict';\n angular\n .module('steamWorks')\n .controller('btCtrl', btCtrl);\n\n\n btCtrl.$inject = ['$scope', '$state', 'deviceSvc'];\n\n function btCtrl($scope, $state, deviceSv...
javascript
chosen
[ { "from": "system", "value": "Update JSON object sent for login\n" }, { "from": "human", "value": "import {Router} from 'express'\nimport models from '../models';\n\nexport default () => {\n\tlet app = Router()\n\n\tapp.get('/new', (req, res) => {\n\t\tres.render('sessions/new')\n\t})\n\n\tapp.p...
javascript
chosen
[ { "from": "system", "value": "Modify menu module and add new items.\n" }, { "from": "human", "value": "import * as types from '../../mutation-types'\nimport lazyLoader from './lazyLoader'\n\nconst state = {\n items: [\n {\n name: 'Home',\n path: '/',\n meta: {\n label: ...
javascript
chosen
[ { "from": "system", "value": "Use native system dialog instead of input type=file\n" }, { "from": "human", "value": "// @flow\nimport React, { Component, PropTypes } from 'react';\nimport { Link } from 'react-router';\nimport Dropzone from 'react-dropzone';\nimport styles from './Server.css';\n\...
javascript
chosen
[ { "from": "system", "value": "Add redirect to locale after edit\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport { push } from 'react-router-redux';\nimport { connect } from 'react-redux';\nimport LocalePairsEditable from './../components/LocalePairsEditable'\...
javascript
chosen
[ { "from": "system", "value": "Remove lint failure for multiple classes in same file\n" }, { "from": "human", "value": "const { static: staticContent } = require('@feathersjs/express');\nconst path = require('path');\n\nconst hooks = require('./hooks');\nconst merlinHooks = require('./hooks/merli...
javascript
chosen
[ { "from": "system", "value": "Check for empty polls before posting\n" }, { "from": "human", "value": "var PollModule = function () {\n};\n\nPollModule.prototype.Message = function(message)\n{\n if(message.deletable)\n {\n message.delete();\n }\n var keyword = \"poll\";\n va...
javascript
chosen
[ { "from": "system", "value": "Fix promise implementation in connection tests. Assert on result length as well.\n" }, { "from": "human", "value": "import dbConfig from '../src/databaseConfig';\nimport MssqlSnapshot from '../src/MssqlSnapshot';\nimport * as utility from './testUtilities';\n\ndesc...
javascript
chosen
[ { "from": "system", "value": "Change keys with single arg to keys with array of keys\n" }, { "from": "human", "value": "const path = require('path');\nconst os = require('os');\nconst modificatorKey = (os.type().toLowerCase() === 'darwin')\n ? 'COMMAND'\n : 'CONTROL';\n\nmodule.exports = functio...
javascript
chosen
[ { "from": "system", "value": "Change ajax to replace different div\n" }, { "from": "human", "value": "$(document).ready(function(){\n $('nav').children().eq(2).on('click', function(event){\n event.preventDefault();\n\n $.ajax({\n url: event.target.href\n }).done(function(response)...
javascript
chosen
[ { "from": "system", "value": "Set focus after click to next element\n\nThe clearSelection function in clipboard.js blurs the button which hands focus back to the top of body so this plops it back\n" }, { "from": "human", "value": "function Copy ($module) {\n this.$module = $module\n}\nCopy.prot...
javascript
chosen