conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add root level js files to eslint\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar eslint = require('gulp-eslint');\nvar runSequence = require('run-sequence');\nvar concat = require('gulp-concat');\nvar benchmark = require('gulp-bench');\nvar gulp...
javascript
chosen
[ { "from": "system", "value": "Allow objects to pass through the parse method" }, { "from": "human", "value": "/**\n * \"Safe\" utility methods.\n *\n * @package rodeo\n * @author Andrew Sliwinski <andrew@diy.org>\n */\n\n/**\n * Constructor\n */\nfunction Util () {};\n\n/**\n * Prints input to s...
javascript
chosen
[ { "from": "system", "value": "Fix the condition that use \"instanceof\"\n\n\"instanceof\" with left non-object operand is always false.\n" }, { "from": "human", "value": "/**\n * Base class for over-segmentation algorithms.\n *\n * Copyright 2015 Kota Yamaguchi\n */\ndefine([\"../compat\"],\nfu...
javascript
chosen
[ { "from": "system", "value": "Update relative path, add ./ :metal:\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar browserSync = require('browser-sync');\nvar sass = require('gulp-sass');\nvar prefix = require('gulp-autoprefixer');\n\n// Start Static Server...
javascript
chosen
[ { "from": "system", "value": "Hide window by hotkey if it is visible\n" }, { "from": "human", "value": "import { BrowserWindow, globalShortcut } from 'electron';\nimport {\n INPUT_HEIGHT,\n WINDOW_WIDTH,\n RESULT_HEIGHT,\n MIN_VISIBLE_RESULTS\n} from './constants/ui';\n\nimport buildMenu fro...
javascript
chosen
[ { "from": "system", "value": "Add enb server-middleware to express\n" }, { "from": "human", "value": "var express = require('express');\nvar app = express();\n\napp.get('/', function(req, res){\n res.send('Hello World');\n});\n\napp.listen(3000);\n" }, { "from": "gpt", "value": "v...
javascript
chosen
[ { "from": "system", "value": "Use a more succinct way of printing out the response body\n" }, { "from": "human", "value": "const http = require('http')\n\nconst url = 'http://ipecho.net/plain'\nlet req = http.get(url, (res) => {\n console.log('Status code:', res.statusCode)\n\n let body = []\n...
javascript
chosen
[ { "from": "system", "value": "Fix assertion error documentation URL\n\nPrefix version number with 'v' to obtain correct URL.\n\nThis fixes #8556.\n" }, { "from": "human", "value": "/**\n * @module ol/AssertionError\n */\nimport {VERSION} from './util.js';\n\n/**\n * Error object thrown when an a...
javascript
chosen
[ { "from": "system", "value": "Remove console.log when exporting txt file\n" }, { "from": "human", "value": "const wrap = require('word-wrap');\n\nfunction msgText(msg, charasMap) {\n if (msg.type === 'narrator') {\n return wrap(msg.content, { width: 72, indent: '', cut: true });\n }...
javascript
chosen
[ { "from": "system", "value": "Use always \"module.exports\", not the alias \"exports\"\n" }, { "from": "human", "value": "'use strict';\n\n// Configuration for the New Relic Node.js agent\n\nexports.config = {\n app_name: process.env.NEW_RELIC_APP_NAME || 'app',\n logging: {\n filep...
javascript
chosen
[ { "from": "system", "value": "Add item buy packet code\n" }, { "from": "human", "value": "module.exports = {\n // Packet constants\n PLAYER_START: \"1\",\n PLAYER_ADD: \"2\",\n PLAYER_ANGLE: \"2\",\n PLAYER_UPDATE: \"3\",\n PLAYER_ATTACK :\"4\",\n LEADERBOAD: \"5\",\n PLA...
javascript
chosen
[ { "from": "system", "value": "Edit lazyLoad for appBlog state\n" }, { "from": "human", "value": "// app.states.js\n\n\"use strict\";\n\nconst appBlog = {\n name: \"blog\",\n url: \"/blog\",\n component: \"blogComponent\",\n lazyLoad: ($transition$) => {\n const $ocLazyLoad = $transition$....
javascript
chosen
[ { "from": "system", "value": "Fix vee-validate collision with errors property of v-text-fields\n" }, { "from": "human", "value": "import Vue from 'vue'\nimport VueI18n from 'vue-i18n'\nimport VeeValidate from 'vee-validate'\n\nlet en = require('../store/lang/en.json'),\n pl = require('../stor...
javascript
chosen
[ { "from": "system", "value": "Remove unread class from the icon when notifications are marked as read\n" }, { "from": "human", "value": "'use strict';\n\n// Send page content to update data live\nbrowser.runtime.sendMessage({\n type: 'pontoon-page-loaded',\n url: document.location.toString...
javascript
chosen
[ { "from": "system", "value": "docs(TrackerDash): Remove mention of private GitHub project\n" }, { "from": "human", "value": "import $ from 'jquery';\n\nimport topInfoBar from './templates/topInfoBar.jade';\nimport VisComponent from '../../VisComponent';\n\nclass TopInfoBar extends VisComponent {...
javascript
chosen
[ { "from": "system", "value": "Fix bug with string representation in bitwise hash\n" }, { "from": "human", "value": "var util = require('util'),\n BaseHash = require('./BaseHash');\n\nutil.inherits(BitwiseHash, BaseHash);\n\n/**\n * BitwiseHash class\n * @description :: Convert data to 32bit i...
javascript
chosen
[ { "from": "system", "value": "Remove tests that are not committed.\n" }, { "from": "human", "value": "testFiles = [\n 'graphics.js',\n 'displayObject.js',\n 'displayObjectContainer.js',\n // 'eventDispatcher.js',\n 'broadcastEvents.js',\n 'bitmap.js',\n 'stage.js',\n 'filters.js',\n 'mo...
javascript
chosen
[ { "from": "system", "value": "Handle errors in CMS handler\n" }, { "from": "human", "value": "var CMS = require('../agents/cms');\n\nmodule.exports = {\n displayCMSPage: function(request, reply) {\n CMS(request.params.slug).then(function(page) {\n reply.view('cms', {\n page: page...
javascript
chosen
[ { "from": "system", "value": "Fix missing embedded java path for starting elasticsearch.\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash'),\n path = require('path');\n\n_.extend(exports, {\n envOverrides: {},\n\n supervisordConfigPath: function() {\n var confi...
javascript
chosen
[ { "from": "system", "value": "Fix zone name comment, make UCU triggers work anywhere. Add twisters.\n" }, { "from": "human", "value": "// O3S - Deltascape 3.0 Savage\n[{\n zoneRegex: /(The Unending Coil Of Bahamut \\(Ultimate\\)|Unknown Zone \\(xyz\\))/,\n triggers: [\n {\n id: 'UCU So...
javascript
chosen
[ { "from": "system", "value": "Add LCTY to locality 🎢\n" }, { "from": "human", "value": "var through2 = require('through2');\n\nfunction featureCodeToLayer(featureCode) {\n switch (featureCode) {\n case 'PCLI':\n return 'country';\n case 'ADM1':\n return 'region';\n ...
javascript
chosen
[ { "from": "system", "value": "Use material-ui Table for module table\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\n\nconst ModuleTable = ({\n modules,\n removeModule,\n}) => (\n <table className=\"table table-bordered\">\n <tbody>\n {modules.map(module ...
javascript
chosen
[ { "from": "system", "value": "Fix missing comma after merge\n" }, { "from": "human", "value": "var _ = require('./utils'),\n Reflux = require('../src'),\n Keep = require('./Keep'),\n allowed = {preEmit:1,shouldEmit:1};\n\n/**\n * Creates an action functor object. It is mixed in with fun...
javascript
chosen
[ { "from": "system", "value": "Fix decimal image with on request\n" }, { "from": "human", "value": "import { get } from 'lodash/object';\n\nexport default (size = 0, attrs = {}) => (\n size ? {\n w: parseInt(size, 10),\n h: get(attrs, 'h', attrs.height)\n ? (parseInt(size, 10) / parse...
javascript
chosen
[ { "from": "system", "value": "Load 20 most recent pchats\n" }, { "from": "human", "value": "//\n// Load private chat history from the archive\n//\n(function () {\n var connection;\n\n $(document).on('connected.ditto.chat', function (e, conn) {\n var an_hour_ago = new Date();\n ...
javascript
chosen
[ { "from": "system", "value": "Fix error message when svgexport is not installed\n" }, { "from": "human", "value": "var _ = require(\"lodash\");\nvar Q = require(\"q\");\nvar fs = require(\"./fs\");\nvar exec = require('child_process').exec;\nvar request = require(\"request\");\n\nvar links = req...
javascript
chosen
[ { "from": "system", "value": "Fix error on view when token or subscribes props are undefined\n" }, { "from": "human", "value": "\nimport getPath from './getPath'\nimport createDataListener from './createDataListener'\n\nfunction updateInstanceData(db, schema, props, data, self, prop, val) {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Set default log level to error\n\n" }, { "from": "human", "value": "const winston = require('winston');\n\nconst { format, transports, createLogger } = winston;\n\nlet logLevel = process.env.LOG_LEVEL;\n\nif (!logLevel) {\n\tswitch (process.env.NODE_ENV) {\n\t\tcase...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect spelling of initialize, simplify rendering.\n" }, { "from": "human", "value": "var Views = {};\nViews.ListingView = Backbone.View.extend({\n\tinitialise: function() {\n\t\tthis.listenTo(this.collection, 'add', this.render);\n\t\tthis.listenTo(this.coll...
javascript
chosen
[ { "from": "system", "value": "Add signIn() and configure() methods to Nfield module\n" }, { "from": "human", "value": "module.exports = (function Nfield () {\n \n var Promise = require('bluebird');\n \n var nfieldInstance;\n \n function createNfieldInstance (nfieldParams, requestParams) {\...
javascript
chosen
[ { "from": "system", "value": "Update migration script to handle async\n" }, { "from": "human", "value": "const {readFileSync} = require('fs');\n\nmodule.exports = {\n up: function (queryInterface, Sequelize) {\n\n queryInterface.renameColumn(\n 'users',\n 'subscribedPodcastFeedUrls...
javascript
chosen
[ { "from": "system", "value": "Fix bug where domains were valid entries.\n" }, { "from": "human", "value": "/* Returns a clever domain for the given text, if one exists. */\nfunction checkDomains() {\n\n /* Get the input string */\n var userString = document.getElementById(\"domainInput\").valu...
javascript
chosen
[ { "from": "system", "value": "Add back in providerType - was too quick on the trigger to remove it\n" }, { "from": "human", "value": "'use strict';\n\nlet angular = require('angular');\n\nmodule.exports = angular\n .module('spinnaker.gce.serverGroup.transformer', [\n require('../../core/util...
javascript
chosen
[ { "from": "system", "value": "Call function on load window\n" }, { "from": "human", "value": "var React = require( 'react' );\nvar ReactDom = require( 'react-dom' );\n\nReactDOM.render(\n\t<h1>Hello, world!</h1>,\n document.getElementById('example')\n);\n\nconsole.log( \"Render window\" );\n"...
javascript
chosen
[ { "from": "system", "value": "Convert refresh token correctly, fixes bad request error\n" }, { "from": "human", "value": "import { atob } from 'Base64';\nimport { PrivateAPI } from '@r/private';\n\nimport Session from '../../app/models/Session';\nimport makeSessionFromData from './makeSessionFro...
javascript
chosen
[ { "from": "system", "value": "Use environment variable to fetch map information\n" }, { "from": "human", "value": "const mapBaseLayers = require('../../../public/static/map/map-base-layers.config.json')\n\nasync function fetchMap(resolver, query) {\n const result = await fetch('http://localhost...
javascript
chosen
[ { "from": "system", "value": "Change state tapes to numTapes\n" }, { "from": "human", "value": "import Immutable from 'immutable';\n\nimport {\n parseGrounds,\n parseEntities\n} from 'state/utils/parseLevel';\n\nimport * as level1 from 'state/levels/level-01';\n\nexport const initialState = Im...
javascript
chosen
[ { "from": "system", "value": "Revert getAccessToken function (did not do what it was supposed to)\n" }, { "from": "human", "value": "'use strict';\n\nvar request = require('supertest');\n\n// TODO: make configurable\nvar apiHost = 'api.anyfetch.com';\nrequest = request(apiHost);\n\n/**\n * Trade...
javascript
chosen
[ { "from": "system", "value": "Change topic keys to match new naming scheme\n" }, { "from": "human", "value": "var Q = require('q'),\n utils = require('./utils'),\n EventEmitter = require('events').EventEmitter,\n actions = require('../static/actions.json');\n\nmodule.exports.create ...
javascript
chosen
[ { "from": "system", "value": "Add support for page templales" }, { "from": "human", "value": "module.exports = function (filename) {\n\treturn [\n\t\t'<?php',\n\t\t'/**',\n\t\t' * DEVELOPMENT MODE ONLY',\n\t\t' *',\n\t\t' * Includes and Runs php files directly',\n\t\t' * from the dev theme to en...
javascript
chosen
[ { "from": "system", "value": "Add SearchControls to search page\n\nRefs #29.\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport DocumentTitle from 'react-document-title';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'red...
javascript
chosen
[ { "from": "system", "value": "Fix the bug people unable to recommend an article.\n" }, { "from": "human", "value": "'use strict';\n\n// TODO(mkhatib): Write tests.\n\nangular.module('webClientApp')\n .directive('recommendButton', ['ArticleRecommendation', function (ArticleRecommendation) {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Drop properties from <TextAnnotator />\n\nNew TextAnnotator component only allows three properties:\n- children\n- tags\n- onCreateAnnotation\n" }, { "from": "human", "value": "import React from 'react'\nimport { storiesOf } from '@storybook/react'\nimport { action ...
javascript
chosen
[ { "from": "system", "value": "Use latests current User approach\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nconst { inject: { service } } = Ember;\n\nexport default Ember.Service.extend({\n session: service('session'),\n store: service(),\n\n load() {\n if (this.get('s...
javascript
chosen
[ { "from": "system", "value": "Make button open private window\n" }, { "from": "human", "value": "var buttons = require('sdk/ui/button/action');\nvar tabs = require(\"sdk/tabs\");\n\nvar button = buttons.ActionButton({\n id: \"mozilla-link\",\n label: \"Visit Mozilla\",\n icon: {\n\t\"16...
javascript
chosen
[ { "from": "system", "value": "Increase timeout for TestingBot tests\n" }, { "from": "human", "value": "define([\n\t'intern!object',\n\t'intern/chai!assert',\n\t'../support/integration',\n\t'intern/dojo/node!../../TestingBotTunnel'\n], function (\n\tregisterSuite,\n\tassert,\n\tsupport,\n\tTestin...
javascript
chosen
[ { "from": "system", "value": "Test arities of 0 properly.\n" }, { "from": "human", "value": "/* global describe it */\n\n/*\n * Ensure that storage providers are complete and consistent.\n */\n\n var chai = require('chai');\n var dirtyChai = require('dirty-chai');\n\n chai.use(dirtyChai);\n var ...
javascript
chosen
[ { "from": "system", "value": "Fix displying right tags per category\n" }, { "from": "human", "value": "/*global hexo */\n\nvar _ = require('lodash');\n\nfunction tag_to_class(tag_name) {\n return 'tag-' + tag_name.replace(/\\s/g, '-');\n}\n\nhexo.extend.helper.register('tag_to_class', tag_to_...
javascript
chosen
[ { "from": "system", "value": "Add support for newer thread layout\n" }, { "from": "human", "value": "// ==UserScript==\n// @name Modify URL @2ch\n// @namespace curipha\n// @description Modify texts starting with \"ttp://\" to anchor and redirect URIs to direct link\n// @include...
javascript
chosen
[ { "from": "system", "value": "Fix NodeJS shim in Vector2 file\n" }, { "from": "human", "value": "function Vector2(x, y) {\n\tthis.x = x;\n\tthis.y = y;\n}\nVector2.prototype.add = function(other) {\n\tif (!(other instanceof Vector2)) throw new TypeError(\"Cannot add '\" + other + \"'' to '\" + t...
javascript
chosen
[ { "from": "system", "value": "Modify routes to reflect deleted and modified routes\n" }, { "from": "human", "value": "module.exports = (function() {\n\treturn {\n\n\t\t// POST /users\n\t\tcreate: require('./create'),\n\n\t\t// GET /users/:id\n\t\tuser: \trequire('./user'),\n\n\t\t// PUT /users/:...
javascript
chosen
[ { "from": "system", "value": "Add mapping for age covariate.\n" }, { "from": "human", "value": "'use strict';\n\nconst { DEFAULT_LAMBDA } = require('../src/constants.js');\nconst path = require('path');\n\nmodule.exports = {\n /**\n * This property is used to pass computation input values fro...
javascript
chosen
[ { "from": "system", "value": "Delete require cache rather than create endless directories\n" }, { "from": "human", "value": "'use strict'\n\nconst fs = require('fs')\nconst path = require('path')\nconst mkdirp = require('mkdirp')\nconst assign = require('lodash.assign')\nconst makeTemplate = req...
javascript
chosen
[ { "from": "system", "value": "Revert \"Dummy commit (no changes) to get a damn tag into the history...\"\n\nThis reverts commit aa73132bcdc520bd89580f2510a88ee990eaea20.\n\n-- I need to read the git manual, commit no longer needed...\n" }, { "from": "human", "value": "module(\"config\");\n\ntest...
javascript
chosen
[ { "from": "system", "value": "Test if browser supports Windows Pointer events\n" }, { "from": "human", "value": "goog.provide('ol.BrowserFeature');\n\n\n/**\n * @define {boolean} Assume touch.\n */\nol.ASSUME_TOUCH = false;\n\n\n/**\n * @type {Object}\n */\nol.BrowserFeature = {\n /**\n * @ty...
javascript
chosen
[ { "from": "system", "value": "Add enabled param and move some params from schema to init for socket-control\n" }, { "from": "human", "value": "// TODO: Remove unnecessary bits from schema\n\nAFRAME.registerComponent('socket-controls', {\n schema: {\n previousPos: {default: new THREE.Vector3(...
javascript
chosen
[ { "from": "system", "value": "Enable the console for the install\n" }, { "from": "human", "value": "pref (\"toolkit.defaultChromeURI\", \"chrome://moonshine/content/player-shell.xul\");\n" }, { "from": "gpt", "value": "pref (\"toolkit.defaultChromeURI\", \"chrome://moonshine/content/...
javascript
chosen
[ { "from": "system", "value": "Fix another weird logger instantiation\n" }, { "from": "human", "value": "import reactServer from \"./react-server\";\n\nconst logger = reactServer.logging.getLogger(__LOGGER__);\n\n// takes in the err and stats object returned by a webpack compilation and returns\n...
javascript
chosen
[ { "from": "system", "value": "Add in a few learnsets" }, { "from": "human", "value": "exports.BattleScripts = {\n init: function() {\n for (var i in this.data.FormatsData)\n this.data.FormatsData[i].dreamWorldRelease = true;\n }\n //remind me to add...
javascript
chosen
[ { "from": "system", "value": "Fix user not being set\n" }, { "from": "human", "value": "var P = require('bluebird');\nvar user = require('./user');\nvar users = require('./db').get('users');\nP.promisifyAll(users);\n\nmodule.exports = function(req, res, next) {\n if (!req.session.token) return ...
javascript
chosen
[ { "from": "system", "value": "Make a copy of monitor data\n" }, { "from": "human", "value": "const UPDATE_MONITORS = 'scratch-gui/monitors/UPDATE_MONITORS';\n\nconst initialState = [];\n\nconst reducer = function (state, action) {\n if (typeof state === 'undefined') state = initialState;\n ...
javascript
chosen
[ { "from": "system", "value": "Revert change in endpoint configuration\n" }, { "from": "human", "value": "/*\n * AET\n *\n * Copyright (C) 2013 Cognifide Limited\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the L...
javascript
chosen
[ { "from": "system", "value": "Configure chosen.js to allow search for multiple words.\n\nPreviously if you typed \"foo bar\", this would find \"foo bar baz\", but\nnot \"baz foo bar\". This should now be fixed. See [1] for more details.\n\n[1] https://github.com/harvesthq/chosen/issues/573\n" }, { "...
javascript
chosen
[ { "from": "system", "value": "Fix the context scope of SystemJS.register when called from browser's System.register\n" }, { "from": "human", "value": "import { global, isBrowser, isWorker } from './common.js';\nimport SystemJSProductionLoader from './systemjs-production-loader.js';\n\nSystemJSPr...
javascript
chosen
[ { "from": "system", "value": "Refresh the embed block onload in PublishBrief\n" }, { "from": "human", "value": "var Publish = {\n enableSend: function() {\n MovimUtils.removeClass('#button_send', 'disabled');\n },\n disableSend: function() {\n MovimUtils.addClass('#button_...
javascript
chosen
[ { "from": "system", "value": "Update paragraph to new name\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n/* component styles */\n// import { styles } from './styles.scss';\n\nexport class About extends Component {\n render() {\n return (\n // <about class...
javascript
chosen
[ { "from": "system", "value": "Introduce a label prop for badges\n" }, { "from": "human", "value": "import React from 'react';\nimport classnames from 'classnames';\nimport { spacingStyles } from '../Spacing/utils';\nimport { Icon } from '../Icon';\nimport { Tooltip } from '../Tooltip';\nimport {...
javascript
chosen
[ { "from": "system", "value": "Add csrf token protection to jQuery initiated requests\n" }, { "from": "human", "value": "import Rails from 'rails-ujs';\nimport jQuery from 'jquery';\n\n// We use `jQuery.active` in our capybara suit to wait for ajax requests.\n// Newer jQuery-less version of rails...
javascript
chosen
[ { "from": "system", "value": "Switch order in log script for consistency.\n" }, { "from": "human", "value": "const morgan = require('morgan');\n\nmodule.exports = (server) => {\n\tswitch (server.get('env')) {\n\t\tcase 'production':\n\t\t\tserver.use(morgan('tiny'));\n\t\t\tbreak;\n\n\t\tcase '...
javascript
chosen
[ { "from": "system", "value": "Remove base64 methods from extras, not used in any Enyo team code, seems buggy, and outside our competency\n" }, { "from": "human", "value": "//* @public\n\nenyo.string = {\n\t/** return string with white space at start and end removed */\n\ttrim: function(inString...
javascript
chosen
[ { "from": "system", "value": "Add check for empty userName and password\n" }, { "from": "human", "value": "const UserDB = require('../db/userdb').Users\n\nexports.form = (req, res, next) => {\n res.render('register', {title: 'Welcome to Chat app'})\n}\nexports.submit = (req, res, next) => {\n ...
javascript
chosen
[ { "from": "system", "value": "Stop upscaling image type learning item images\n" }, { "from": "human", "value": "export default (props) => (\n <img className=\"pure-img\" src={`https://chalees-min.imgix.net${props.imagePath}?w=726&fit=clip&auto=format,compress`} />\n)" }, { "from": "gpt"...
javascript
chosen
[ { "from": "system", "value": "Add session time to initial state\n" }, { "from": "human", "value": "export default {\n root: {\n isAuthenticated: false,\n isAuthenticationInProgress: false\n }\n}" }, { "from": "gpt", "value": "export default {\n root: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add hash to webpack bundle name\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\n\nconst pat...
javascript
chosen
[ { "from": "system", "value": "Create observable out of promise explicitly for better understanding\n" }, { "from": "human", "value": "Rx.Observable\n .fromEvent(document.getElementById(\"search\"), \"keyup\")\n .map(event => {\n return event.target.value;\n })\n .switchMap(searchQuery => ...
javascript
chosen
[ { "from": "system", "value": "Support event handlers on proxy, reduce iterations\n" }, { "from": "human", "value": "/* @flow */\nimport React, { Component, PropTypes } from \"react\"\nimport { Element as ReactElement } from \"react\"\n\nimport ReactHigherEventProxyContextTypes from \"./ReactHigh...
javascript
chosen
[ { "from": "system", "value": "Update example to use state-reuse init\n" }, { "from": "human", "value": "var flux = require('flux-redux');\n\n/**\n * Hot reloading stores!\n *\n * The trick is to always re-use the `dispatcher` instance\n *\n * dispatcher.addStore will use the stores' merge functi...
javascript
chosen
[ { "from": "system", "value": "Fix problem with image not updating.\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @file\n * Delivers a component representing one single category in the autocomplete\n * parent autocomplete component.\n */\n\nimport React from 'react';\nimport {isArra...
javascript
chosen
[ { "from": "system", "value": "Revert example to use the new glob patterns for auto titles\n" }, { "from": "human", "value": "module.exports = {\n stories: [{ directory: '../stories/', files: '**/*.stories.@(json|yaml|yml)' }],\n logLevel: 'debug',\n addons: [\n '@storybook/addon-docs',\n ...
javascript
chosen
[ { "from": "system", "value": "Allow empty query for substances\n" }, { "from": "human", "value": "'use strict';\n\nconst Promise = require('bluebird');\n\nconst {MongoClient} = require('mongodb');\n\nconst MONGO_URL = process.env.MONGO_URL;\nconst MONGO_COLLECTION = process.env.MONGO_COLLECTION;...
javascript
chosen
[ { "from": "system", "value": "Return exit status `1` when one or more tests are failing\n\nResolves https://github.com/voldern/roc-plugin-dredd/issues/3\n" }, { "from": "human", "value": "import UpstreamDredd from 'dredd';\n\nimport Reporter from './reporter';\n\nexport default class Dredd exten...
javascript
chosen
[ { "from": "system", "value": "Fix typo to fetch appropriate scopes\n" }, { "from": "human", "value": "'use strict'\n\nvar express = require('express')\nconst querystring = require('querystring')\n\nconst config = require('../config/environment')\n\nvar router = express.Router()\n\nrouter.get('/g...
javascript
chosen
[ { "from": "system", "value": "Add Smooth Scroll for Anchor\n" }, { "from": "human", "value": "$(function(){\r\n\tvar owl = $('#owlCarousel');\r\n\r\n\towl.owlCarousel({\r\n\t\tlazyLoad: true,\r\n\t\tresponsiveClass: true,\r\n\t\tautowidth: true,\r\n\t\tloop: true,\r\n\t\tresponsive: {\r\n\t\t\t0...
javascript
chosen
[ { "from": "system", "value": "Add a SplatNet updater command to the Shipit file\n\n" }, { "from": "human", "value": "require('dotenv').config();\n\nmodule.exports = shipit => {\n shipit.initConfig({\n production: {\n servers: process.env.SHIPIT_PRODUCTION_SERVER,\n ...
javascript
chosen
[ { "from": "system", "value": "Replace template to component. Use component\n" }, { "from": "human", "value": "\"use strict\";\n\nconst angular = require(\"angular\");\n\nfunction homeRouting($urlRouterProvider, $stateProvider) {\n $urlRouterProvider.otherwise(\"/home\");\n\n $stateProvider\n ...
javascript
chosen
[ { "from": "system", "value": "Fix crash when using default folder\n" }, { "from": "human", "value": "\nvar Router = require('routes');\nvar router = new Router();\nvar st = require('st');\nvar fs = require('fs');\n\nvar mount = st({\n path: __dirname + '/static/', // resolved against the proces...
javascript
chosen
[ { "from": "system", "value": "Move text to body of attachment.\n" }, { "from": "human", "value": "'use strict'\n\nfunction run (db, msg) {\n\t// Get random favorite to ask about\n\tdb.getRandomFavorite((err, message) => {\n\t\tif (err) {\n\t\t\tconsole.error(err)\n\t\t}\n\t\tmsg.say({\n\t\t\ttex...
javascript
chosen
[ { "from": "system", "value": "Add \"push\" and \"replace\" handy methods \n\nThere are also two handy methods of history API that allow not to specify state object during transitions:\r\n\r\n* `push(path[, state])`\r\n* `replace(path[, state])`" }, { "from": "human", "value": "import { ROUTER_DI...
javascript
chosen
[ { "from": "system", "value": "Fix for if on the same page\n" }, { "from": "human", "value": "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of th...
javascript
chosen
[ { "from": "system", "value": "Add proper spacing to inner elements\n" }, { "from": "human", "value": "import React from 'react'\nimport { Grid, Typography} from '@material-ui/core'\nimport { Edit, Delete} from '@material-ui/icons'\n\nexport default function TravelObject(props) {\n let content...
javascript
chosen
[ { "from": "system", "value": "Move GameboardController.playerName to a getter\n" }, { "from": "human", "value": "class GameboardController {\n constructor(Game, GlobalEvents) {\n \"ngInject\";\n\n this.currentAnswer = '';\n this.currentMangledWord = Game.currentWord.mangled;\n this....
javascript
chosen
[ { "from": "system", "value": "Make sure the view router bails out when not needed\n" }, { "from": "human", "value": "const express = require('express');\n\nconst router = express.Router();\n\nrouter.use(require('cookie-parser')());\n\nrouter.get('/:owner/:project/:type?/:asset?', [\n function (...
javascript
chosen
[ { "from": "system", "value": "Update light component to use changing opacity instead of changing color\n" }, { "from": "human", "value": "import React from 'react';\nimport Radium from 'radium';\n\nimport { lightActive, lightInactive } from 'theme/variables';\n\nconst size = 18;\nconst innerPadd...
javascript
chosen
[ { "from": "system", "value": "Work around Chrome sandbox issue 😭\n" }, { "from": "human", "value": "/* eslint-env node */\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: ['Chrome', 'Firefox'],\n launch_in_dev: ['Chrome', 'Firefox'],\...
javascript
chosen
[ { "from": "system", "value": "Update messaging to reflect only web signups will be exported\n" }, { "from": "human", "value": "import React from 'react';\nimport './user-export.scss';\n\nclass UserExport extends React.Component {\n render() {\n return (\n <div className=\"user-export\">...
javascript
chosen
[ { "from": "system", "value": "Add io to message event definition\n" }, { "from": "human", "value": "'use strict';\n\nconst Debug = require('debug');\n\nmodule.exports = function MessageEventDefinition(eventDefinition) {\n const id = eventDefinition.id;\n const type = eventDefinition.type;\n c...
javascript
chosen
[ { "from": "system", "value": "Fix directive for equalizing heights: Injecting MediaSize-Service instead of checking old window.mediaSize\n" }, { "from": "human", "value": "(function($, pm) {\n\n /*\n * Equal Box heights\n */\n pm.directive('[data-plenty-equal]', function(i, elem) {...
javascript
chosen
[ { "from": "system", "value": "Use absolute path in mocha acceptance test blueprints\n" }, { "from": "human", "value": "import { describe, it, beforeEach, afterEach } from 'mocha';\nimport { expect } from 'chai';\nimport startApp from '../helpers/start-app';\n<% if (destroyAppExists) { %>import d...
javascript
chosen
[ { "from": "system", "value": "Revert \":memo: Switch TypeDoc to modules mode\"\n\nThis reverts commit b09ace410657317bcc5b73d180be52f6499b2108.\n" }, { "from": "human", "value": "const TypeDocPlugin = require('typedoc-webpack-plugin');\nconst path = require('path');\nconst webpack = require('web...
javascript
chosen
[ { "from": "system", "value": "Remove the extra require for https\n" }, { "from": "human", "value": "var https = require('https');\nvar yaml = require('js-yaml');\nvar request = require('request');\n\n// The URL of the data file with GitHub's language colors.\nexports.languagesURL = 'https://raw....
javascript
chosen