conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Resolve URLs in Stylus files\n" }, { "from": "human", "value": "const HtmlWebpackPlugin = require('html-webpack-plugin');\n\nmodule.exports = {\n context: __dirname + '/src',\n entry: './bootstrapper',\n output: {\n path: __dirname + '/public',\n filename: ...
javascript
chosen
[ { "from": "system", "value": "Use ui.writeLine instead of console.log to respect --silent\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nvar fs = require('fs');\n\nmodule.exports = {\n name: 'ember-cli-sentry',\n\n included: function(app) {\n this._super.includ...
javascript
chosen
[ { "from": "system", "value": "Support passing database as an argument\n" }, { "from": "human", "value": "'use strict';\n\nvar connect = require('readable-lists-api');\nvar run = require('./lib/run-bot.js');\n\nvar readers = {};\nreaders.pipermail = require('./lib/readers/pipermail');\n\nvar db =...
javascript
chosen
[ { "from": "system", "value": "Update handler signature to match node v4+ runtime\n" }, { "from": "human", "value": "require('dotenv').load();\n\nvar stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);\n\nexports.handler = function(event, context) {\n\n stripe.charges.create({\n amount...
javascript
chosen
[ { "from": "system", "value": "Allow default options to be overridden\n" }, { "from": "human", "value": "'use strict';\n\nvar assign = require('object-assign');\nvar chalk = require('chalk');\nvar lpad = require('lpad-align');\nvar ProgressBar = require('progress');\n\n/**\n * Progress bar downlo...
javascript
chosen
[ { "from": "system", "value": "Enhance user experience with more energetic response\n\nPrevious standard output of the thirteen() function did not sufficiently convey how revolutionary the project is to arithmetic and indeed mathematics as we understand it. Adding exclamation points helps communicate the pro...
javascript
chosen
[ { "from": "system", "value": "Fix dependency for production env\n" }, { "from": "human", "value": "\nmodule.exports = {\n app: require('./src/app'),\n cache: require('./src/cache'),\n cls: require('./src/cls'),\n config: require('./src/config'),\n db: require('./src/db/...
javascript
chosen
[ { "from": "system", "value": "Support loading and auto-tasking of task dependencies." }, { "from": "human", "value": "var argv = require('minimist')(process.argv.slice(2));\nvar fs = require('fs');\nvar path = require('path');\n\nmodule.exports = function (options) {\n options = options || {};\...
javascript
chosen
[ { "from": "system", "value": "Fix calling without query throws TypeError\n" }, { "from": "human", "value": "/*\n * @license MIT http://www.opensource.org/licenses/mit-license.php\n * @author Hovhannes Babayan <bhovhannes at gmail dot com>\n */\nvar loaderUtils = require('loader-utils');\n\nmodu...
javascript
chosen
[ { "from": "system", "value": "Add dispatcher to the library\n" }, { "from": "human", "value": "'use strict';\n\nconst DAS = module.exports = {};\n\nDAS.ActionHandler = require('./ActionHandler');\n\n" }, { "from": "gpt", "value": "'use strict';\n\nconst DAS = module.exports = {};\n\n...
javascript
chosen
[ { "from": "system", "value": "Change detection to ignore borders" }, { "from": "human", "value": ";(function(window, document){\n\tdocument.addEventListener('touchmove', function(e) {\n\t\tisScrollElement(e.target) || e.preventDefault();\n\t}, false);\n\tdocument.addEventListener('touchstart', f...
javascript
chosen
[ { "from": "system", "value": "Clean up bitly API object references.\n" }, { "from": "human", "value": "/**\n * bit.ly access library code.\n */\nvar Shortener = new JS.Singleton('Shortener', {\n initialize: function() {\n this.extend({\n CLIENT: BitlyClient || null,\n NAMESPACE:...
javascript
chosen
[ { "from": "system", "value": "Add toString method for CallSiteContext\n" }, { "from": "human", "value": "// Context for k-CFA analysis\n//\n// Assume a context is an array of numbers.\n// A number in such list denotes a call site, that is @label of a CallExpression.\n// We keep the most recent '...
javascript
chosen
[ { "from": "system", "value": "Make multiple update operate on ids\n" }, { "from": "human", "value": "module.exports = function(sugar, models, assert) {\n return function updateMultipleAuthors(cb) {\n var firstAuthor = {name: 'foo'};\n var secondAuthor = {name: 'bar'};\n v...
javascript
chosen
[ { "from": "system", "value": "Fix compatibility with webpack 2.1.0-beta.26\n" }, { "from": "human", "value": "module.exports = {\n\tmodule: {\n\t\tloaders: [{\n\t\t\ttest: /\\.css$/,\n\t\t\tloader: \"style!css\"\n\t\t}, {\n\t\t\ttest: /\\.pug$/,\n\t\t\tloader: \"pug?self\"\n\t\t}]\n\t}\n}\n" }...
javascript
chosen
[ { "from": "system", "value": "Stop including sourcemap for production mode\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\nconst nodeEnv = process.env.NODE_ENV || 'development';\nconst { VueLoaderPlugin } = require('vue-loader');\n\nconst co...
javascript
chosen
[ { "from": "system", "value": "Enable inline info instead of hiding it after the blue button in the upper right corner\n" }, { "from": "human", "value": "import { configure, addDecorator } from '@storybook/react';\nimport { setDefaults } from '@storybook/addon-info';\nimport { setOptions } from '...
javascript
chosen
[ { "from": "system", "value": "Fix bug with remoteScrollTime docs changer.\n" }, { "from": "human", "value": "define([\n\t'underscore',\n\t'text!templates/grid-docs.html',\n\t'text!pages/grid-options-remoteScrollTime.html',\n\t'dobygrid',\n\t'js/sample-fetcher'\n], function (_, template, page, Do...
javascript
chosen
[ { "from": "system", "value": "Fix ResolverIntercept to maintain full import path while still normalizing the path; fixes npm support in truffle since bug >4.1.3\n" }, { "from": "human", "value": "const path = require(\"path\");\n\nfunction ResolverIntercept(resolver) {\n this.resolver = resolve...
javascript
chosen
[ { "from": "system", "value": "Add union type for symbols of all symbologies\n" }, { "from": "human", "value": "// @flow\nexport opaque type WideBar = \"W\"\nexport const WIDE_BAR: WideBar = \"W\"\n\nexport opaque type NarrowBar = \"N\"\nexport const NARROW_BAR: NarrowBar = \"N\"\n\nexport opaque...
javascript
chosen
[ { "from": "system", "value": "Make tests pass on v0.8\n\nCan't pass file open flags to writeFileSync in 0.8.\n\nClose #79\n" }, { "from": "human", "value": "var fs = require('fs')\nvar mkdirp = require('mkdirp')\n\nmodule.exports = function () {\n fill(4, 10, 2, __dirname + '/target')\n}\n\nif ...
javascript
chosen
[ { "from": "system", "value": "Use Chrome for CI testing" }, { "from": "human", "value": "/*jshint node:true*/\nmodule.exports = {\n \"framework\": \"qunit\",\n \"test_page\": \"tests/index.html?hidepassed\",\n \"disable_watching\": true,\n \"launch_in_ci\": [\n \"PhantomJS\"\n ],\n \"la...
javascript
chosen
[ { "from": "system", "value": "Change import and disable flair tests temporarily\n" }, { "from": "human", "value": "// Licensed under the Apache License, Version 2.0 (the “License”); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n...
javascript
chosen
[ { "from": "system", "value": ":arrow_up: Update Vuejs version on examples to 2.3.4\n" }, { "from": "human", "value": "/* global requirejs, require */\n/**\n * app.js\n *\n * Distributed under terms of the MIT license.\n */\n\nrequirejs.config({\n paths: {\n \"Vue\": \"https://cdnjs.clo...
javascript
chosen
[ { "from": "system", "value": "Add escape to stop export\n" }, { "from": "human", "value": "import './style.css!';\nimport 'bootstrap/css/bootstrap.css!';\nimport angular from 'angular';\n\nimport ShadertoyService from './shadertoy/service';\n\nimport ExportDirective from './export/directive';\ni...
javascript
chosen
[ { "from": "system", "value": "Implement mark update for todos\n" }, { "from": "human", "value": "import React from 'react'\nimport { Link } from 'react-router'\nimport Loader from 'react-loaders'\n\nimport { focusTodo, deleteTodo } from '../actions';\n\nexport default class TodoListItem extends ...
javascript
chosen
[ { "from": "system", "value": "Implement the API call to like artists in database\n" }, { "from": "human", "value": "var model = require('../models/index');\n\n/* Sets a like in the Like table for a given artist and user (by Facebook ID number) */\nexports.likeArtist = function(req, res) {\n ret...
javascript
chosen
[ { "from": "system", "value": "Disable changing a line's height\n" }, { "from": "human", "value": "var MarkupLine = {\r\n HandlesType: function(type) {\r\n return type == 'line';\r\n },\r\n\r\n Paint: function(elementObject) {\r\n $('#' + elementObject.Handle).css({\r\n ...
javascript
chosen
[ { "from": "system", "value": "Add header to data table\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { StyleSheet, VirtualizedList, VirtualizedListPropTypes } from...
javascript
chosen
[ { "from": "system", "value": "Clean up & comment language determination\n" }, { "from": "human", "value": "const i18n = require('i18next')\nconst _ = require('underscore')\nconst path = require('path')\n\nmodule.exports = {\n setup(options = {}) {\n const subdomainLang = options.subdomainLan...
javascript
chosen
[ { "from": "system", "value": "Allow permissions for Images collection.\n" }, { "from": "human", "value": "var imageStore = new FS.Store.GridFS('images')\n\nImages = new FS.Collection('images', {\n stores: [imageStore]\n});" }, { "from": "gpt", "value": "var imageStore = new FS.Store...
javascript
chosen
[ { "from": "system", "value": "Revert \"added link to error fix\"\n\nThis reverts commit 0086364d111a76710ddf05a056b8d369fada1162.\n" }, { "from": "human", "value": "//$(document).ready(function(){\nvar ready = function(){\n $(\"#what\").on('click', function(e){\n e.preventDefault();\n ...
javascript
chosen
[ { "from": "system", "value": "Remove mobile option due to gold plating\n" }, { "from": "human", "value": "(function() {\n\t'use strict';\n\tangular.module('pagespeedApp').factory('pagespeedApi', pagespeedApi);\n\n\tpagespeedApi.$inject = ['$http'];\n\n\tfunction pagespeedApi($http) {\n\t\tvar en...
javascript
chosen
[ { "from": "system", "value": "Add description for useEastAsianWidth option\n" }, { "from": "human", "value": "'use babel';\n\nimport Controller from './controller.js';\n\nexport default {\n config: {\n grammars: {\n type : 'array',\n default: ['source.gfm'],\n items : {\n ...
javascript
chosen
[ { "from": "system", "value": "feat(middleware): Add state name and action name to the middleware object\n" }, { "from": "human", "value": "/**\n * Created by thram on 16/01/17.\n */\n\nimport {getState, setState, resetState} from \"./store\";\n\nlet dicts = {}, middlewares = [];\n\nexport const ...
javascript
chosen
[ { "from": "system", "value": "Use 30s timeout in waitfor function in case things happen slower than they should\n" }, { "from": "human", "value": "/**\n * @fileoverview Run the bootstrap service\n */\n\nvar port = 3020,\n system = require('system'),\n page = require('webpage').create(),\n ...
javascript
chosen
[ { "from": "system", "value": "Fix the header of function for AWS Lambda.\n" }, { "from": "human", "value": "bookcrossing.handler = function(event, context, callback) {\n\tconsole.log(\"Batatas\");\n}" }, { "from": "gpt", "value": "exports.handler = function(event, context, callback) ...
javascript
chosen
[ { "from": "system", "value": "Update default options to match new queue-promise API\n" }, { "from": "human", "value": "// @flow\n\nimport mixin from \"merge-descriptors\";\nimport EventEmitter from \"events\";\nimport SpiderQueue from \"./queue/promise\";\nimport SpiderRouter from \"./routing/ro...
javascript
chosen
[ { "from": "system", "value": "Add command to toggle statusbar in view menu\n" }, { "from": "human", "value": "require(\"./stylesheets/main.less\");\n\nvar settings = require(\"./settings\");\nvar StatusBar = require(\"./bar\");\n\nvar commands = codebox.require(\"core/commands\");\nvar dialogs =...
javascript
chosen
[ { "from": "system", "value": "feat(analytics): Add exception tracking for initial render\n\n" }, { "from": "human", "value": "import React from 'react'\nimport ReactDOM from 'react-dom'\nimport 'normalize.css'\n\nimport {Analytics} from './lib/analytics'\nimport {Header} from './header'\nimport ...
javascript
chosen
[ { "from": "system", "value": "Send email notification of important changes\n" }, { "from": "human", "value": "'use strict';\n\nconst redis = require('./lib/redis');\nconst jenkins = require('./lib/jenkins');\nconst gitter = require('./lib/gitter');\nconst schedule = require('node-schedule');\...
javascript
chosen
[ { "from": "system", "value": "Fix the package being broken from npm API changes\n\nFixes https://github.com/sindresorhus/npm-email-cli/issues/1\n" }, { "from": "human", "value": "'use strict';\nconst {URL} = require('url');\nconst got = require('got');\nconst registryUrl = require('registry-url'...
javascript
chosen
[ { "from": "system", "value": "Use behavior instead mixin to Polymer 1.x compatibility\n" }, { "from": "human", "value": "const createPolobxMixin = function(stores) {\n let appState = {};\n\n Object.keys(stores).forEach( key => {\n const store = mobx.observable(stores[key].store);\n const...
javascript
chosen
[ { "from": "system", "value": "Use let instead of var for max compatibility\n" }, { "from": "human", "value": "'use strict'\n\n/**\n * Mixes reducers in order. The resulting reducer function will try all\n * available reducers until a new state is obtained, thus it is recommended\n * to keep the ...
javascript
chosen
[ { "from": "system", "value": "Allow public download from S3\n" }, { "from": "human", "value": "'use stirct'\n\nvar opbeat = require('opbeat').start()\nvar uuid = require('node-uuid')\nvar AWS = require('aws-sdk')\nvar Printer = require('ipp-printer')\n\nvar port = process.env.PORT || 3000\n\nvar...
javascript
chosen
[ { "from": "system", "value": "Use example.com instead of google.com\n\nBecause google.com does not work in China.\n\nFixes: https://github.com/feross/connectivity/issues/1\n" }, { "from": "human", "value": "var net = require('net')\nvar once = require('once')\n\n/**\n * Detect if the network is ...
javascript
chosen
[ { "from": "system", "value": "Allow to set empty settings.ext with null value" }, { "from": "human", "value": "'use strict';\n\nvar through = require('through2');\nvar gutil = require('gulp-util');\nvar ejs = require('ejs');\n\nmodule.exports = function (options, settings) {\n settings = sett...
javascript
chosen
[ { "from": "system", "value": "Correct the name of the css file\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-chartist',\n\n included: function included(app) {\n this.app = app;\n this._super.included(app);\n\n app.im...
javascript
chosen
[ { "from": "system", "value": "Fix breaking changes in FastBoot\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: '@upsilon/ember-range-slider',\n included: function(app) {\n if (!process.env.EMBER_CLI_FASTBOOT) {\n app.import('node_...
javascript
chosen
[ { "from": "system", "value": "Fix development / production loader script.\n" }, { "from": "human", "value": "/*! resol-vbus | Copyright (c) 2013-2019, Daniel Wippermann | MIT license */\n'use strict';\n\n\n\nconst fs = require('fs');\n\n\n\nlet useDevelopmentSource;\ntry {\n fs.accessSync('sr...
javascript
chosen
[ { "from": "human", "value": "[dist] Add top-level include for `pkgcloud.common`\n" }, { "from": "gpt", "value": "/*\n * index.js: Top-level include for the pkgcloud common module.\n *\n * (C) 2011 Nodejitsu Inc.\n *\n */\n \nexports.auth = require('./auth');" } ]
javascript
chosen
[ { "from": "system", "value": "Test out the live transport.\n" }, { "from": "human", "value": "\"use babel\";\n\nimport async from \"async\";\nimport GitHubClient from \"node-github\";\nimport package from \"../../../package.json\";\n\nimport Fork from \"../../models/fork\";\n\nvar github = new G...
javascript
chosen
[ { "from": "system", "value": "Update burnstudio: add go-to-top feature\n" }, { "from": "human", "value": "$(function(){\n\t$(\"#slideshow\").slidesjs({\n\t\twidth: 960,\n\t\theight: 312,\n\t\tnavigation: {\n\t\t\tactive: true,\n\t\t\teffect: 'slide'\n\t\t},\n\t\tpagination: {\n\t\t\tactive: true...
javascript
chosen
[ { "from": "system", "value": "Add required change for Google+ API deprecation\n\nSince Google+ is shutting down soon, we need to get the profile data\nfrom another URL. Since the library already supports it, all we need to\ndo is adding a single line of code.\n\nDetails:\nhttps://github.com/hackmdio/codimd/...
javascript
chosen
[ { "from": "system", "value": "Resolve files from the /es folder instead of /src\n" }, { "from": "human", "value": "import { resolve } from 'path';\nimport { removeStartSlash } from './common';\n\nexport const rootDirectory = resolve(__dirname, '../../..');\n\n/**\n * Resolves a file in the root ...
javascript
chosen
[ { "from": "system", "value": "Introduce option to set text formField's value without triggering `change`\n" }, { "from": "human", "value": "/**\n * @class CM_FormField_Text\n * @extends CM_FormField_Abstract\n */\nvar CM_FormField_Text = CM_FormField_Abstract.extend({\n\t_class: 'CM_FormField_Te...
javascript
chosen
[ { "from": "system", "value": "[native] Use hook instead of connect functions and HOC in EditSettingButton\n\nTest Plan: Flow\n\nReviewers: ashoat, palys-swm\n\nReviewed By: ashoat\n\nSubscribers: zrebcu411, Adrian\n\nDifferential Revision: https://phabricator.ashoat.com/D482\n" }, { "from": "human",...
javascript
chosen
[ { "from": "system", "value": "Switch to tenant specific endpoint\n" }, { "from": "human", "value": " // Don't commit this file to your public repos. This config is for first-run\n //\n exports.creds = {\n \treturnURL: 'https://proseware.skwantoso.com/auth/openid/return',\n \tidentityMetadata: ...
javascript
chosen
[ { "from": "system", "value": "Remove some extraneous comments and fix a spacing problem.\n" }, { "from": "human", "value": "var ABTestHelper = require('../ABTestHelper.js');\nmodule.exports['Test Input'] = {\n setUp: function(callback) {\n // Put test setup here\n\n\n // Test wildly varyi...
javascript
chosen
[ { "from": "system", "value": "Make use of this.viewerController for scalebar object.\n" }, { "from": "human", "value": "/* \n * Copyright (C) 2012 B3Partners B.V.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License...
javascript
chosen
[ { "from": "system", "value": "Make it module loaders compatible\n" }, { "from": "human", "value": "var f = function(x) { return function() {return x}; ; };\nvar lambdaRegex = /\\((.*)\\)[\\s]*=>[\\s]*(.+)/;\nf.property = function(propertyName) {\n\tif(propertyName[0] === '!')\n\t\treturn functio...
javascript
chosen
[ { "from": "system", "value": "Document the change to un-confuse future us\n" }, { "from": "human", "value": "var throng = require('throng');\nvar donateServer = require('./server');\nvar workers = process.env.WEB_CONCURRENCY || 1;\n\nfunction start() {\n var server = donateServer();\n\n server...
javascript
chosen
[ { "from": "system", "value": "Remove passive option & improve performance\n" }, { "from": "human", "value": "function ScrollSyncer (vertical, horizontal, usePassive) {\n this._from = null\n this._to = []\n this._bindOptions = usePassive\n ? { passive: true }\n : undefined\n\n this._syn...
javascript
chosen
[ { "from": "system", "value": "Write license information to file\n" }, { "from": "human", "value": "'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\nvar dir = require('node-dir');\nvar q = require('q');\n\nvar findLicenses = function () {\n var deferred = q.defer();\n\n ...
javascript
chosen
[ { "from": "system", "value": "Fix solution of leetcode question 60\n" }, { "from": "human", "value": "/**\n * @param {number} n\n * @param {number} k\n * @return {string}\n */\nvar getPermutation = function(n, k) {\n const nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];\n const totalNums = [1];\n ...
javascript
chosen
[ { "from": "system", "value": "Update copy to clipboard style\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport copy from 'copy-to-clipboard'\n\nexport default class CopyToClipboard extends Component {\n static propTypes = {\n...
javascript
chosen
[ { "from": "system", "value": "Test Onionoo instance is an object\n" }, { "from": "human", "value": "import test from 'ava'\nimport Onionoo from '../'\n\ntest('Onionoo is a function', t => {\n t.is(typeof Onionoo, 'function')\n})\n\ntest('Onionoo cannot be invoked without \\'new\\'', t => {\n t...
javascript
chosen
[ { "from": "system", "value": "Fix error with console.log override\n" }, { "from": "human", "value": "import { configure } from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\nimport 'raf/polyfill';\n\nconfigure({ adapter: new Adapter() });\n\njest.mock('webAudioWrapper');\n\n// noop c...
javascript
chosen
[ { "from": "system", "value": "Split the babel-preset-jolt into helper functions and add react-native to web platform for now\n" }, { "from": "human", "value": "// Modules\nconst resolveDependencies = require('./resolveDependencies');\n\n\nmodule.exports = (context, options = {}) => { // eslint-d...
javascript
chosen
[ { "from": "system", "value": "Remove \"it\" from test name\n" }, { "from": "human", "value": "var overload = require('../src/overload');\nvar should = require('should');\n\ndescribe('overload', function() {\n describe('inherit', function() {\n it('it should exist', function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Refactor how defer is constructed\n" }, { "from": "human", "value": "var Stirrup = function(library) {\n if(typeof library !== 'object' && typeof library !== 'function') {\n throw 'You must provide Stirrup with a promise library';\n }\n this.library = library;...
javascript
chosen
[ { "from": "system", "value": "Change exec time to response time\n" }, { "from": "human", "value": "\n/**\n * default options\n */\nconst defaultOptions = {\n requestTimeout: 10 * 1000, //request timeout, default is 10s\n requestTimeoutCallback: () => {}, //request timeout callback\n sendPower...
javascript
chosen
[ { "from": "system", "value": "Update for new class selector" }, { "from": "human", "value": "function removeItemsWithoutPriceDrops() {\n var lowPrice = 999999;\n var anyRemoved = false;\n var listItems = document.getElementsByClassName('a-section g-item-sortable');\n\n for (var i = 0; i < li...
javascript
chosen
[ { "from": "system", "value": "Remove trailing whitespace from blueprint\n" }, { "from": "human", "value": "/* jshint expr:true */\nimport {\n describe,\n it,\n beforeEach,\n afterEach\n} from 'mocha';\nimport { expect } from 'chai';\nimport Ember from 'ember';\nimport startApp from '../helpe...
javascript
chosen
[ { "from": "system", "value": "Fix missing paths in native from last commit\n" }, { "from": "human", "value": "import React from 'react';\nimport { Button, ScrollView, Text } from 'react-native';\nimport { StackNavigator } from 'react-navigation';\n\nimport Home from '../components/Home';\nimport...
javascript
chosen
[ { "from": "system", "value": "Remove useless import of Entity\n" }, { "from": "human", "value": "import Entity from 'mostly-entity';\nimport fp from 'mostly-func';\n\n// 返回值定制\nexport default function responder () {\n return function (hook) {\n // If it was an internal call then skip this ho...
javascript
chosen
[ { "from": "system", "value": "Hide color picker if there is only one available\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { Link } from 'react-router';\nimport map from 'lodash/map';\nimport classNames from 'classnames';\n\nconst ColorPicker = ({ colors,...
javascript
chosen
[ { "from": "system", "value": "Comment stuff on document ready\n" }, { "from": "human", "value": "document.getElementById(\"load-comments\").addEventListener(\"click\",function(e) {\n this.parentNode.removeChild(this);\n\tload_disqus();\n});\n" }, { "from": "gpt", "value": "document....
javascript
chosen
[ { "from": "system", "value": "Handle 400 errors when transitioning to the /run/:id route\n" }, { "from": "human", "value": "import AuthenticateRoute from 'wholetale/routes/authenticate';\nimport { inject as service } from '@ember/service';\nimport RSVP from 'rsvp';\n\nexport default Authenticate...
javascript
chosen
[ { "from": "system", "value": "Comment out maildev for now.\n" }, { "from": "human", "value": "var _ = require('lodash');\nvar S = require('string');\nvar nodeMailer = require(\"nodemailer\");\nvar secrets = require('../config/secrets');\n\nfunction MailBoss() {\n var transporter = null;\n\n //...
javascript
chosen
[ { "from": "system", "value": "Add data_set_name preview to data_set admin form\n\n- Grabs the values of data_group and data_type bound to a change event on those drop downs\n- populates a <p> tag to show a preview\n- BUG / TODO: Doesn't update the preview when a new data group/type is added to the form. I t...
javascript
chosen
[ { "from": "system", "value": "Add linoleum subprojects to babel defaults" }, { "from": "human", "value": "/* eslint-disable object-shorthand */\nmodule.exports = {\n // We need to make sure that the transpiler hit the linoleum source since we are\n // not building to npm or simliar.\n ignore:...
javascript
chosen
[ { "from": "system", "value": "Change model createdAt and updatedAt fields to default\n" }, { "from": "human", "value": "\"use strict\";\n\n\n\nmodule.exports = function(sequelize, DataTypes) {\n\n var Client = sequelize.define('Client', {\n id: { type: DataTypes.INTEGER, primaryKey: true, au...
javascript
chosen
[ { "from": "system", "value": "Make typography scale value a bit shorter\n" }, { "from": "human", "value": "import { modularScale } from 'polished';\n\n// Generate typography scale\nconst getTypeScale = (sizes, ratio) => {\n\treturn Object.keys(sizes).reduce((scale, size) => {\n\t\tscale[size] = ...
javascript
chosen
[ { "from": "system", "value": "Add merge sort test case\n" }, { "from": "human", "value": "// Implement merge sort: \"divide and conquer\" algorithm using recursion\n\nfunction mergeSort(arr) {\n\tif (arr.length < 2) {\n\t\treturn arr;\n\t}\n\n\tvar middle = parseInt(arr.length / 2),\n\t\tleft = ...
javascript
chosen
[ { "from": "system", "value": "Update internal version variable to 0.1.2\n" }, { "from": "human", "value": "function Rye (selector, context) {\n if (!(this instanceof Rye)){\n return new Rye(selector, context)\n }\n\n if (selector instanceof Rye){\n return selector\n }\n...
javascript
chosen
[ { "from": "system", "value": "Add ability to \"fix\" texture\n\n" }, { "from": "human", "value": "import {\n RepeatWrapping,\n UVMapping,\n NearestFilter,\n LinearMipMapLinearFilter,\n TextureLoader,\n Vector2\n} from 'three';\n\nconst loader = new TextureLoader();\n\nexport class Texture...
javascript
chosen
[ { "from": "system", "value": "Hide mobile (also hidden in styles.css) when css is not loaded\n" }, { "from": "human", "value": "import config from \"config\";\nimport ReactDOMServer from \"react-dom/server\";\nimport serialize from \"serialize-javascript\";\nimport \"cookie-parser\";\nimport Hel...
javascript
chosen
[ { "from": "system", "value": "Fix issue with react external name\n" }, { "from": "human", "value": "'use strict';\n\nvar webpack = require('webpack');\n\nmodule.exports = {\n output: {\n library: 'reactElementPan',\n libraryTarget: 'umd'\n },\n externals: {\n react:...
javascript
chosen
[ { "from": "system", "value": "Enable source map in development build\n" }, { "from": "human", "value": "var baseConfig = require('./webpackBaseConfig')\nvar ExtractTextPlugin = require('extract-text-webpack-plugin')\nvar path = require('path')\n\nmodule.exports = [Object.assign({}, baseConfig, {...
javascript
chosen
[ { "from": "system", "value": "feat(webpack): Rename bundle to index. Multple entry points for including deps and minifying. Add so\n\nBREAKING CHANGE: rename bundle to index and change dist/.\n" }, { "from": "human", "value": "var camelCase = require('camelcase');\nvar path = require('path');\nv...
javascript
chosen
[ { "from": "system", "value": "Disable minification until we're ready to release\n" }, { "from": "human", "value": "var path = require('path');\r\nvar webpack = require('webpack');\r\n\r\nmodule.exports = {\r\n entry: './src/wordypass.js',\r\n output: {\r\n path: './dist/',\r\n fi...
javascript
chosen
[ { "from": "system", "value": "Add pStat and pReaddir utilities\n" }, { "from": "human", "value": "'use strict';\n\nconst { promisify } = require('util');\nconst { realpath, readFile } = require('fs');\n\nconst { capitalize } = require('underscore.string');\n\nconst { mapValues, mapKeys } = requi...
javascript
chosen
[ { "from": "system", "value": "Create the drag and drop behavior\n" }, { "from": "human", "value": "tosMap.controller('MapsController', [\n\t\"$scope\", \"Location\",\n\tfunction ($scope, Location) {\n\t\tLocation.query().$promise.then(function (response) {\n\t\t\t$scope.locations = response;\n\t...
javascript
chosen
[ { "from": "system", "value": "Fix issue accepting badge on behalf of ninja\n" }, { "from": "human", "value": " 'use strict';\n\nfunction cdAcceptBadgeCtrl($scope, $state, cdBadgesService, cdUsersService, alertService, $translate) {\n var userId = $state.params.userId;\n var badgeSlug = $state....
javascript
chosen
[ { "from": "system", "value": "Send correct response if logout authentication header is invalid. Fixes SWA-59\n" }, { "from": "human", "value": "'use strict';\n\nvar express = require('express'),\n\tconstants = require('./../config/constants'),\n\tconfig = require('./../config/config'),\n\treposi...
javascript
chosen
[ { "from": "system", "value": "docs: Add source for geolocation function\n" }, { "from": "human", "value": "// use strict:\n\"use strict\";\n\n// Function gets the location of the user provided the user opts in\nif (navigator.geolocation) {\nnavigator.geolocation.getCurrentPosition(userPosition, ...
javascript
chosen
[ { "from": "system", "value": "Mark a key as the primary key\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\nvar config\t\t= require(\"config\");\n\nvar ObjectId = mongoose.Schema.Types.ObjectId;\n\nvar APIKeySchema = new Schema({...
javascript
chosen
[ { "from": "system", "value": "Fix launching npm under windows (node 6+)\n" }, { "from": "human", "value": "const cp = require('child_process');\nconst chokidar = require('chokidar');\n\nconst exec = (cmd, args) => {\n return () => {\n var child = cp.spawn(cmd, args);\n\n child.stdout.pipe...
javascript
chosen
[ { "from": "system", "value": "Add test to launch an overlay" }, { "from": "human", "value": "// Copyright (c) 2013 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n'use strict';\n\nbase.require...
javascript
chosen