conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Correct heading for task table ID column\n" }, { "from": "human", "value": "var TaskTableHeaderLabels = {\n cpus: 'CPU',\n disk: 'DISK',\n host: 'HOST',\n mem: 'MEM',\n id: 'TASK NAME',\n name: 'TASK NAME',\n status: 'STATUS',\n updated: 'UPDATED',\n versio...
javascript
chosen
[ { "from": "system", "value": "Revert \"fix: You have to include shadydom before shadycss else shadycss will not work.\"\n\nThis reverts commit 831a3a7ffbc6b53c5766ac1564dc3f95c5b74ef0.\n" }, { "from": "human", "value": "// We load the Safari fix before document-register-element because DRE\n// o...
javascript
chosen
[ { "from": "system", "value": "Support native objects in getter\n" }, { "from": "human", "value": "import {inspect} from \"util\";\nimport {getProperties, isImmutable, isNumeric} from \"./helpers\";\n\n// LENS =======================================================================================...
javascript
chosen
[ { "from": "system", "value": "[Refactoring] Split the function for call and wait processes\n" }, { "from": "human", "value": "import chain from './chain';\nimport {clone} from './utils';\n\nfunction vq(el, props, opts = null) {\n if (!el || !props) throw new Error('Must have two or three args')...
javascript
chosen
[ { "from": "system", "value": "Fix HMR with some help from my good friend Dan\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport thunk from 'redux-thunk';\nimport { Provider } from 'react-redux';\nimport { createStore, applyMiddleware, compose...
javascript
chosen
[ { "from": "system", "value": "Fix mutable className array in Popup\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport ProjectedLayer from './projected-layer';\nimport {\n anchors,\n OverlayPropTypes,\n} from './util/overlays';\n\nconst defaultClassName = ['map...
javascript
chosen
[ { "from": "system", "value": "Move authentication higher up the food chain\n" }, { "from": "human", "value": "import thunk from 'redux-thunk'\nimport createLogger from 'redux-logger'\nimport { browserHistory } from 'react-router'\nimport { syncHistory } from 'react-router-redux'\nimport { combin...
javascript
chosen
[ { "from": "system", "value": "Add test to verify usage of gulp version of file\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar gulpB = require('../');\nvar expect = require('chai').expect;\nvar es = require('event-stream');\nvar path = require('path');\nvar browserify = requi...
javascript
chosen
[ { "from": "system", "value": "Test the actual test result.\n" }, { "from": "human", "value": "/* eslint-disable no-console, no-duplicate-imports, import/no-duplicates */\nimport proxyquire from 'proxyquire';\nimport describe from '../src';\nimport { specStream } from '../src';\n\ndescribe('RxT',...
javascript
chosen
[ { "from": "system", "value": "Add some xml functions to arethusaUtil\n" }, { "from": "human", "value": "\"use strict\";\n\n// Provides the global arethusaUtil object which comes with several\n// utility functions\n\nwindow.arethusaUtil = {\n // Pads a number with zeros\n formatNumber: function...
javascript
chosen
[ { "from": "system", "value": "Remove \"login\" class after transition\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n\n\trenderTemplate() {\n\t\tthis.render( 'admin', {\n\t\t\tcontroller: 'dashboard'\n\t\t});\n\t}\n\n});\n" }, { "fro...
javascript
chosen
[ { "from": "system", "value": "Make index page appear on heroku\n" }, { "from": "human", "value": "// web.js\nvar express = require(\"express\");\nvar logfmt = require(\"logfmt\");\nvar app = express();\n\napp.use(logfmt.requestLogger());\n\napp.get('/', function(req, res) {\n res.send('Hello Wo...
javascript
chosen
[ { "from": "system", "value": "Use thunk to access delay state\n" }, { "from": "human", "value": "const updateStructure = newState => {\n return { type: 'UPDATE_VERT_STRUCTURE', newState };\n};\n\nconst highlightNode = (delay, unHighlight, nodeId) => {\n setTimeout(() => unHighlight(nodeId), de...
javascript
chosen
[ { "from": "system", "value": "Disable dragging sections for now.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/karbon-sortable-item';\n\nexport default Ember.Component.extend({\n tagName: 'li',\n classNames: ['spacer'],\n classNameB...
javascript
chosen
[ { "from": "system", "value": "Change port number t o 5000, per heroku instructions\n" }, { "from": "human", "value": "var fs = require('fs');\nvar flatiron = require('flatiron'),\n app = flatiron.app;\n\n\napp.use(flatiron.plugins.http, {\n // HTTP options\n});\n\nvar text_index = fs.readFileS...
javascript
chosen
[ { "from": "system", "value": "Add Javascript check for selected file in importer\n" }, { "from": "human", "value": "/**\n * * Created by PhpStorm.\n * User: Philipp Dippel Inf | DMS - M\n * For Project: headerXporter\n * Date: 29.08.17\n * Copyright: Philipp Dippel\n */\n\njQuery(document).read...
javascript
chosen
[ { "from": "system", "value": "Update jshint to work with the correct files.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jasmine: {\n geojson_t...
javascript
chosen
[ { "from": "system", "value": "Revert \"add support for addon icon (requires FontAwesome)\"\n\nThis reverts commit 5db7b0a5550757c653de869516c308ff10452b74.\n" }, { "from": "human", "value": "import Em from 'ember';\nimport FormGroupComponent from './group';\nimport ControlMixin from 'ember-idx-f...
javascript
chosen
[ { "from": "system", "value": "Fix race condition in api causing bad counts in dashboard.\n\nA CheckEvent triggers both a refresh of the count in the api and in the\ndashboard - the dashboard asking the api for a fresher value. When using\nwebsockets, the response from MongoDB could happen after the request\...
javascript
chosen
[ { "from": "system", "value": "Fix absolute path requirement for output.path since webpack 2.3.0\n" }, { "from": "human", "value": "const commonConfig = require(\"./webpack.common.config\");\nconst nodeExternals = require(\"webpack-node-externals\");\nconst merge = (...objs) => require(\"deepmerg...
javascript
chosen
[ { "from": "system", "value": "Set an initial selection area of 115 by 115 pixels. Added minimum (115 by 115 pixels) and maximum (300 by 300 pixels) sizes for cropping images\n" }, { "from": "human", "value": "/* $This file is distributed under the terms of the license in /doc/license.txt$ */\n\n...
javascript
chosen
[ { "from": "system", "value": "Check for existance of CKEditor" }, { "from": "human", "value": "/*!\n * Small jQuery plugin to detect whether or not a form's values have been changed.\n * @see: https://gist.github.com/DrPheltRight/4131266\n * Written by Luke Morton, licensed under MIT. Adapted fo...
javascript
chosen
[ { "from": "system", "value": "Remove unused command line options parsing code\n\nSigned-off-by: Sonmez Kartal <d2d15c3d37396a5f2a09f8b42cf5f27d43a3fbde@koding.com>\n" }, { "from": "human", "value": "var argv = require('minimist')(process.argv);\n\nrequire('coffee-script').register();\nmodule...
javascript
chosen
[ { "from": "system", "value": "Remove logging to console from debugging\n" }, { "from": "human", "value": "'use strict';\n\nvar nouns = [\n 'cat',\n 'dog',\n 'mouse',\n 'house'\n];\nvar firstNoun = '';\nvar secondNoun = '';\nvar metaphor = '';\n\nvar numberOfNouns = nouns.length;\nvar lastNou...
javascript
chosen
[ { "from": "system", "value": "Add File and Blob APIs testing.\n" }, { "from": "human", "value": "/*\n#\n# i2mx.js - v0.1-Alpha\n# Apache v2 License\n#\n*/\n\n// Create img2musicXML (abbreviated as i2mx) namespace\nvar i2mx = i2mx || { };\n\n// Create JsCheckup class (@TODO: Move to inside namesp...
javascript
chosen
[ { "from": "system", "value": "[modal] Reset bootstrap alert before showing modal\n" }, { "from": "human", "value": "/**\n * @fileoverview Describes a password modal\n */\ndefine([\n 'text!templates/password.html',\n 'backbone',\n 'underscore'\n],\nfunction(passwordModalTemplate) {\n return B...
javascript
chosen
[ { "from": "system", "value": "Change event from hover to click to show the hidden-panels\n" }, { "from": "human", "value": "$(document).ready(function() {\n\t$(\"#web-debug-toolbar .hidden-panel\").hide();\n\n\t$(\"#web-debug-toolbar .panel-toggle-button\").hover(function() {\n\t\tif ($(\"#web-d...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary functions and add emptyTable\n" }, { "from": "human", "value": "tableBuilder.$inject = [ 'tableContent' ];\n\nfunction tableBuilder (tableContent) {\n\tconst service = {\n\t\tnewTable: newTable,\n append: append,\n indexOf: indexOf,\...
javascript
chosen
[ { "from": "system", "value": "Add part time and internship job types" }, { "from": "human", "value": "JOB_TYPES = [\"Full Time\", \"Hourly Contract\", \"Term Contract\", \"Mentoring\", \"Bounty\", \"Open Source\", \"Volunteer\", \"Other\"];\n\nSUMMERNOTE_OPTIONS = {\n type: 'summernote',\n hei...
javascript
chosen
[ { "from": "system", "value": "Update guardian druid for soft mitigation check damage schools.\n" }, { "from": "human", "value": "import CoreMitigationCheck from 'parser/shared/modules/MitigationCheck';\nimport SPELLS from 'common/SPELLS';\n\n\nclass MitigationCheck extends CoreMitigationCheck {\...
javascript
chosen
[ { "from": "system", "value": "Refactor filestack dev console script:\n\n- Add progress notifications\n- Add proper next page handling\n- Add filename and extension to the result file\n" }, { "from": "human", "value": "(function () {\n\n function b64EncodeUnicode(str) {\n return btoa(encodeUR...
javascript
chosen
[ { "from": "system", "value": "perf(mapboxgl): Disable interactivity on the mapbox gl layer since it is handled by leaflet\n" }, { "from": "human", "value": "import L from 'leaflet'\nimport {} from 'mapbox-gl-leaflet'\nimport {GridLayer, withLeaflet} from 'react-leaflet'\n\nconst accessToken = pr...
javascript
chosen
[ { "from": "system", "value": "Create subject annotation when toggling subject tool.\n" }, { "from": "human", "value": "var Application = require(\"substance-application\");\nvar Component = Application.Component;\nvar $$ = React.createElement;\nvar _ = require(\"underscore\");\n\n// TagSubjectTo...
javascript
chosen
[ { "from": "system", "value": "Fix rtestricted route showing modal\n" }, { "from": "human", "value": "import React from 'react';\nimport { connect } from 'react-redux';\nimport { withRouter } from 'react-router';\nimport { showModalWindow } from 'actions/ModalActions';\nimport CheckAuth from 'com...
javascript
chosen
[ { "from": "system", "value": "Include providerData for queue items\n" }, { "from": "human", "value": "const db = require('sqlite')\nconst squel = require('squel')\n\nasync function getQueue (roomId) {\n const result = []\n const entities = {}\n\n try {\n const q = squel.select()\n .fi...
javascript
chosen
[ { "from": "system", "value": "Fix bug with automatic date transformations\n" }, { "from": "human", "value": "/**\n * convert json dates to date objects\n * for all requests using the $http service\n *\n * @return callback for app.config()\n */\ndefine([], function () {\n\t'use strict';\n\n\n ...
javascript
chosen
[ { "from": "system", "value": "Fix undefined error in scripts\n" }, { "from": "human", "value": "/*\n * decaffeinate suggestions:\n * DS101: Remove unnecessary use of Array.from\n * DS102: Remove unnecessary code created because of implicit returns\n * DS205: Consider reworking code to avoid use ...
javascript
chosen
[ { "from": "system", "value": "Fix derp in primary interface\n" }, { "from": "human", "value": "\"use strict\";\n\nhex.Transform = require('./hex_transform');\nhex.ChunkedTransform = require('./chunked_hex_transform');\n\nmodule.exports = hex;\n\nfunction hex(buffer, options) {\n if (!options....
javascript
chosen
[ { "from": "system", "value": "Improve handling of nested usage\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-nouislider',\n\n included: function(app) {\n this._super.included(app);\n if(!process.env.EMBER_CLI_FASTBOOT) ...
javascript
chosen
[ { "from": "system", "value": "Fix : Correcting path for acme.json\n" }, { "from": "human", "value": "var fs = require(\"fs\");\nvar path = require(\"path\");\nvar acme = require(\"acme/acme.json\");\n\nif (typeof(acme) !== 'undefined' && (!acme.hasOwnProperty(\"DomainsCertificate\") ||\n !acm...
javascript
chosen
[ { "from": "system", "value": "Fix issue with error when the context object is not set\n" }, { "from": "human", "value": "var _ = require('lodash');\n\nexports.register = function (plugin, options, next) {\n\n var environment = process.env.NODE_ENV || 'development';\n\n // Hook onto the 'on...
javascript
chosen
[ { "from": "system", "value": "Load modules and set readtables only once\n\nDon't re-setup modules and readtables for each file to prevent the module cache from breaking the plugin when processing multiple files." }, { "from": "human", "value": "var sweet = require('sweet.js');\nvar gutil = requi...
javascript
chosen
[ { "from": "system", "value": "Support --name options to filter spec files\n" }, { "from": "human", "value": "'use strict';\n\nvar jest = require('jest-cli'),\n gutil = require('gulp-util'),\n through = require('through2');\n\nmodule.exports = function (options) {\n options = options || ...
javascript
chosen
[ { "from": "system", "value": "Fix no response due\nto newlines\n" }, { "from": "human", "value": "'use strict';\nvar net = require('net');\n\nmodule.exports = {\n\tget: get\n};\n\nfunction get(opts, text, callback) {\n\tvar socket = new net.Socket();\n\n\tsocket.connect(opts.port, opts.host, fun...
javascript
chosen
[ { "from": "system", "value": "Rename underscore variable to fix jslint warning\n" }, { "from": "human", "value": "var config = require('./config'),\n\t_ = require('underscore');\n\nmodule.exports = require('./lib/api').Api.buildFromFile(config);\n\nmodule.exports.configure = function(options) {\...
javascript
chosen
[ { "from": "system", "value": "Add Array.isArray check for keys\n" }, { "from": "human", "value": "'use strict';\n\nvar assign = require('object-assign');\nvar hasOwn = require('hasown');\n\nmodule.exports = function(object, keys){\n\n\tvar result = {}\n\n\tif (keys){\n\t\tkeys = keys.filter(hasO...
javascript
chosen
[ { "from": "system", "value": "Add some websocket debugging code\n" }, { "from": "human", "value": "import path from 'path';\nimport express from 'express';\nimport morgan from 'morgan';\n\nrequire('dotenv').config();\n\nexport default callback => {\n const server = express();\n server.set('env...
javascript
chosen
[ { "from": "system", "value": "Move options building to dedicated function\n\n* No validation (yet), just returns request-friendly object.\n* Add newline before return in parseParams fn.\n* Add newline to EOF\n* TODO\n ** Validate parameters\n ** Accept and parse multiple parameters\n" }, { "from":...
javascript
chosen
[ { "from": "system", "value": "Change function name from getElements to getTime.\n" }, { "from": "human", "value": "PinPoint.ItemsfromDomExtractor = function(targetName) {\n this.targetName = targetName;\n}\n\nPinPoint.ItemsfromDomExtractor.prototype = {\n getElements : function(element) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add comment to example regarding source.\n" }, { "from": "human", "value": "\nvar BurpImporter = require(__dirname + '/../index'),\n util = require('util');\n\nvar importer = new BurpImporter(__dirname + '/example1.xml');\nimporter.on('start', function (info) {\n...
javascript
chosen
[ { "from": "system", "value": "Replace Function.prototype.bind polyfill with one that works for the latest version of Phantomjs\n" }, { "from": "human", "value": "(function() {\n /**\n * Function.bind for ECMAScript 5 Support\n *\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/...
javascript
chosen
[ { "from": "system", "value": "Write set values to log file\n" }, { "from": "human", "value": "var express = require('express'),\n Memcached = require('memcached');\n\n// Constants\nvar port = 3000;\nvar env = process.env.NODE_ENV || 'production';\nvar mc = new Memcached(process.env.MC_PORT.re...
javascript
chosen
[ { "from": "system", "value": "Refactor landing page to use mapDispatchToProps which is another method of doing what we were already doing\n" }, { "from": "human", "value": "import React from 'react'\nimport { Link } from 'react-router'\nimport { setSearchTerm } from './actionCreators'\nimport { ...
javascript
chosen
[ { "from": "system", "value": "Make <canvas> drawings look sharp on high-density (\"Retina\") screens\n" }, { "from": "human", "value": "// DiagonalDivider\n\nimport React, { PropTypes } from 'react/addons'; // eslint-disable-line no-unused-vars\nimport styles from './DiagonalDivider.less';\nimpo...
javascript
chosen
[ { "from": "system", "value": "Add try block to allow fallback to runtime check for HAS_BLOCK symbol\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport emberVersionInfo from './ember-version-info';\n\nconst { major, minor, isGlimmer } = emberVersionInfo();\n\nlet hasBlockSymbol...
javascript
chosen
[ { "from": "system", "value": "Remove Edge launcher from Karma Conf\n" }, { "from": "human", "value": "module.exports = function(config) {\n config.set({\n frameworks: [ \n 'jasmine',\n 'karma-typescript',\n ],\n plugins: [\n 'karma-typescript',\n 'karma-jasmine',\n ...
javascript
chosen
[ { "from": "system", "value": "Debug Error: No such file\n" }, { "from": "human", "value": "// @AngularClass\n// Look in config for karma.conf.js\nmodule.exports = require('./config/karma.conf.js');\n" }, { "from": "gpt", "value": "// @AngularClass\n// Look in config for karma.conf.js...
javascript
chosen
[ { "from": "system", "value": "Add description for `paranoidEqual` function\n" }, { "from": "human", "value": "'use strict';\n\n\nvar assert = require('assert');\nvar inspectors = require('./assert-paranoid-equal/inspectors');\nvar Context = require('./assert-paranoid-equal/context');\n\n\nfuncti...
javascript
chosen
[ { "from": "system", "value": "Add a mock for window.matchMedia.\n\nThe window.matchMedia function is used in the Spectacle Slide component (and other parts of Radium).\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\n\nit...
javascript
chosen
[ { "from": "system", "value": "Add isFastBoot property to service\n" }, { "from": "human", "value": "import Ember from \"ember\";\n\nlet alias = Ember.computed.alias;\nlet computed = Ember.computed;\n\nexport default Ember.Service.extend({\n cookies: alias('_fastbootInfo.cookies'),\n headers: a...
javascript
chosen
[ { "from": "system", "value": "Remove line number check for nwjs.\n" }, { "from": "human", "value": "'use strict';\n\nconst expect = require('chai').expect;\nconst helper = require('../spec-helper');\n\nconst APP_NAME = 'electron-log-test-nwjs';\n\ndescribe('nwjs test project', function() {\n th...
javascript
chosen
[ { "from": "system", "value": "Fix matomo generation to only happen in production\n" }, { "from": "human", "value": "/* global MATOMO_SITE_ID, MATOMO_TRACKER_URL, MATOMO_ENABLE_LINK_TRACKING */\n\nexport default ({ router }) => {\n // Google analytics integration\n if (MATOMO_SITE_ID && MATOMO_...
javascript
chosen
[ { "from": "system", "value": "Move click handler inside the right block\n" }, { "from": "human", "value": "(function(document, saveAs, smoothScroll, downloadName) {\n 'use strict';\n\n if(window.location.protocol.indexOf('http') !== -1) {\n // Created before download in order to be JS-modif...
javascript
chosen
[ { "from": "system", "value": "Increase mocha timeout to 50000ms\n\nFix #13090\n" }, { "from": "human", "value": "module.exports = {\n recursive: true,\n reporter: 'spec',\n slow: 0,\n timeout: 40000,\n ui: 'bdd',\n extension: 'js',\n};\n" }, { "from": "gpt", "value"...
javascript
chosen
[ { "from": "system", "value": "Fix this crashing spewage:\nUncaught Error: [HMR] Hot Module\nReplacement is disabled.\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\n\n// Listen port\nconst PORT = process.env.PORT || 8080;\n\n\n// Load base c...
javascript
chosen
[ { "from": "system", "value": "Disable pagination check for prev page.\n\nDue to bans timelines can return less than limit posts now.\nTo work, it requires proper pagination metadata from timelines.\n" }, { "from": "human", "value": "define([\"app/app\",\n \"ember\"], function(App, Ember) ...
javascript
chosen
[ { "from": "system", "value": "Fix append contents js again\n" }, { "from": "human", "value": "/**\n * Load all h2, h3, h4, h5 and h6 tags as contents.\n */\n$('.append-contents').each(function() {\n let html = '<ul class=\"list-unstyled contents\">',\n level = 2;\n \n fo...
javascript
chosen
[ { "from": "system", "value": "FIX catch and notify about errors" }, { "from": "human", "value": "/*\n * based on speakWorker.js from:\n * \n * speak.js\n * https://github.com/logue/speak.js\n * License: GPL-3.0\n */\n\nimportScripts('speakGenerator.js');\n\nonmessage = function(event) {\n\t\n\tv...
javascript
chosen
[ { "from": "system", "value": "fix(Brush): Use floor instead of round for determining brush's selected pixels\n" }, { "from": "human", "value": "/**\n * Gets the pixels within the circle.\n * @export @public @method\n * @name getCircle\n *\n * @param {number} radius The radius of the circle....
javascript
chosen
[ { "from": "system", "value": "Fix server fatal error (loading non existant route)\n" }, { "from": "human", "value": "var _ = require('underscore');\n\nvar routes = [\n 'users',\n 'building',\n 'units'\n];\n\nmodule.exports.mount = function(app) {\n _(routes).each(function(route){\n ...
javascript
chosen
[ { "from": "system", "value": "Fix sourcemaps so they write to separate .map file\n" }, { "from": "human", "value": "var gulp = require(\"gulp\"),\n plugins = require(\"gulp-load-plugins\")(),\n pkg = require(\"./package.json\"),\n paths = {\n src: {\n css: \"....
javascript
chosen
[ { "from": "system", "value": "Add missing title to navigation options in payment info screen\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { View, Alert } from 'react-native';\nimport { Text, ListItem, Thumbnail, Body, Left, Form, Content, Button } from 'na...
javascript
chosen
[ { "from": "system", "value": "Use a timeout to handle position fixed only on scroll" }, { "from": "human", "value": "// ==UserScript==\n// @name Remove Position Fixed\n// @namespace name.robgant\n// @description Makes anything on the page with position fixed become static\n// @include ...
javascript
chosen
[ { "from": "system", "value": "Make sure workers are not getting executed for tests\n" }, { "from": "human", "value": "/* eslint-env node, mocha */\nconst expect = require('chai').expect\nconst scheduler = require('../../src/bin/scheduler.js')\n\ndescribe('bin > scheduler', () => {\n it('can run...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary use of Promise.resolve\n" }, { "from": "human", "value": "'use strict';\n\nconst Path = require('path');\nconst Glob = require('glob');\n\nasync function getFiles(paths, ignored) {\n const opts = {\n nodir: true,\n dot: false,\n ...
javascript
chosen
[ { "from": "system", "value": "Remove scrollIntoView() to fix scroll jank preventing users from scrolling\n" }, { "from": "human", "value": "const observer = new IntersectionObserver(entries => {\n const intersectingEntries = entries.filter(e => e.isIntersecting);\n for (const entry of inte...
javascript
chosen
[ { "from": "system", "value": "Hide hint button on click\n" }, { "from": "human", "value": "// Model\nBustinBash.Hints.Model = function() {}\n\n// View\nBustinBash.Hints.View = function() {}\n\nBustinBash.Hints.View.prototype = {\n render: function(hint) {\n var source = $(\"#hints-template...
javascript
chosen
[ { "from": "system", "value": "Add more logging to GitHub sample\n" }, { "from": "human", "value": "module.exports = function (context) {\n context.log('GitHub WebHook triggered!');\n context.done(null, 'New GitHub comment: ' + context.req.body.comment.body);\n}" }, { "from": "gpt"...
javascript
chosen
[ { "from": "system", "value": "Add support for custom explorer URL\n" }, { "from": "human", "value": "var loopback = require('loopback');\nvar boot = require('loopback-boot');\n\nvar app = module.exports = loopback();\n\napp.start = function() {\n // start the web server\n return app.listen(fun...
javascript
chosen
[ { "from": "system", "value": "Fix browser hanging because of fast typing in editor.\n" }, { "from": "human", "value": "define( [\"backbone\", \"backbone.marionette\", \"communicator\", \"medium.editor\", \"jquery\", \"erfgeoviewer.common\",\n \"tpl!template/detail.html\"],\n function( Backbo...
javascript
chosen
[ { "from": "system", "value": "Increase number of seed activities to make demo more realistic for typical use case\n" }, { "from": "human", "value": "var xhr = require('../lib/xhr');\nvar { API, ActionTypes } = require('../Constants');\nvar ServerActionCreators = require('../actions/ServerActionC...
javascript
chosen
[ { "from": "system", "value": "Remove console.log and add in done() for people spec.\n" }, { "from": "human", "value": "/**\n * @author Hamza Waqas <hamzawaqas@live.com>\n * @since 2/9/14\n */\n\nvar linkedin = require('../../')('75gyccfxufrozz', 'HKwSAPg0z7oGYfh5')\ntoken = process.env.IN_TOK...
javascript
chosen
[ { "from": "system", "value": "Fix public path in production build\n" }, { "from": "human", "value": "exports.modifyWebpackConfig = function (config) {\n config.loader('jpg', {\n test: /\\.jpg$/,\n loader: 'url?limit=10000',\n })\n\n config.loader('png', {\n test: /\\.png$/,\n load...
javascript
chosen
[ { "from": "system", "value": "Put in a temporary fix for the layout system.\n" }, { "from": "human", "value": "import _ from 'underscore';\nimport React from 'react';\nimport equip from './equip';\nimport PostsGrid from '../StaticResponsiveGrid';\nimport Post from './Post';\n\nconst Posts = ({ s...
javascript
chosen
[ { "from": "system", "value": "Fix Ajax request not looking for the good lowercase README.md while they are all named in uppercace 'hands-on-exercises'\n" }, { "from": "human", "value": "$(function() {\n var readme = $('.readme');\n var converter = new Showdown.converter();\n for(var i=0;i<rea...
javascript
chosen
[ { "from": "system", "value": "Fix typo in sourcemap option" }, { "from": "human", "value": "module.exports = {\n options: {\n require: ['sass-css-importer'],\n loadPath: ['<%%= bowerOpts.directory || \"bower_components\" %>'],\n bundleExec: true\n },\n debug: {\n src: '<%%= dirs.t...
javascript
chosen
[ { "from": "system", "value": "Fix bug where audit wouldn't show up after closing and re-opening devtools.\n" }, { "from": "human", "value": "var tabs = {};\n\nchrome.extension.onRequest.addListener(function(request, sender, callback) {\n var tabId = request.tabId;\n\n if (!(tabId in tabs))...
javascript
chosen
[ { "from": "system", "value": "Add Content-Type handling for charset\n" }, { "from": "human", "value": "'use strict';\n\nconst { parse: parseContentType } = require('content-type');\n\nconst { findFormat } = require('../../../formats');\n\nconst { parsePreferHeader } = require('./headers');\n\n//...
javascript
chosen
[ { "from": "system", "value": "Exclude disabled buttons from click feedback\n" }, { "from": "human", "value": "/*\n * Author: CM\n * Dependencies: jquery.transit.js\n */\n(function($) {\n\n document.addEventListener('mousedown', function(event) {\n var $elem = $(event.target).closest('.clickF...
javascript
chosen
[ { "from": "system", "value": "Remove the old upload module\n" }, { "from": "human", "value": "// Socket\nimport '../modules/socket/socket-server';\n\n// Auth modules\nimport '../modules/facebook/facebook';\nimport '../modules/google/google';\nimport '../modules/session/session';\nimport '../modu...
javascript
chosen
[ { "from": "system", "value": "Add type checking to array elements\n" }, { "from": "human", "value": "function verifyStructure(template, struct) {\n for (key in template) {\n if (!keyExists(key, struct)) {\n console.log(\"Could not find expected key:\", key, \"in provided str...
javascript
chosen
[ { "from": "system", "value": "Add client initial request through component did mount\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport * as profileActions from '../....
javascript
chosen
[ { "from": "system", "value": "Use vanilla JS in exception scrapper\n" }, { "from": "human", "value": "/*global $*/\nmodule.exports = function(page) {\n return page.evaluate(function() {\n const exception = $(\".strong.title\")[0].childNodes[1].textContent;\n const info =...
javascript
chosen
[ { "from": "system", "value": "Fix drawer height (use full vertical height)\n" }, { "from": "human", "value": "import Drawer from 'antd/lib/drawer';\nimport React, { useEffect } from 'react';\n\nfunction DrawerWrapper({\n title,\n visible,\n onClose,\n width,\n placement,\n children\n}) {\n...
javascript
chosen
[ { "from": "system", "value": "Add additional example for tests\n" }, { "from": "human", "value": "console.log('Do something always');\n\nif (module.hot) {\n console.log('Do something, when hot reload available');\n}\n\nif (module.hot) {\n console.log('Do something, when hot reload available');...
javascript
chosen
[ { "from": "system", "value": "Fix for intel routing changes" }, { "from": "human", "value": "// ==UserScript==\n// @id iitc-plugin-console@hansolo669\n// @name IITC plugin: console\n// @category Debug\n// @version 0.0.1\n// @namespace https://github.com/ha...
javascript
chosen
[ { "from": "system", "value": "Fix hide model on clicking\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { Modal } from '../../components'\nimport { Button } from 'react-bootstrap'\n\nclass TestModal extends Component {\n\n constructor () {\n super()\n ...
javascript
chosen
[ { "from": "system", "value": "Fix error propagation on feed fetching.\n" }, { "from": "human", "value": "var feedRead = require('feed-read');\nvar readabilitySax = require('readabilitySAX');\nvar _url = require('url');\n\nfunction fetchFeed(url, cb) {\n console.log('[.] Fetching...
javascript
chosen
[ { "from": "system", "value": "Update with reference to global nav partial\n" }, { "from": "human", "value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyon...
javascript
chosen
[ { "from": "system", "value": "Make sure time zone doesn't change too much.\n" }, { "from": "human", "value": "/**\n* Copyright (C) 2008 10gen Inc.\n* \n* This program is free software: you can redistribute it and/or modify\n* it under the terms of the GNU Affero General Public License...
javascript
chosen