conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix Campaign relationship with CampaignSubscriber\n" }, { "from": "human", "value": "'use strict';\nmodule.exports = function(sequelize, DataTypes) {\n var campaign = sequelize.define('campaign', {\n name: DataTypes.STRING,\n fromName: DataTypes.STRING,\n ...
javascript
chosen
[ { "from": "system", "value": "Send theme setting during startup\n" }, { "from": "human", "value": "//\n// Copyright 2009-2015 Ilkka Oksanen <iao@iki.fi>\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the Lic...
javascript
chosen
[ { "from": "system", "value": "Add obvious arguments and start on main code\n" }, { "from": "human", "value": "const fs = require('fs');\nconst cp = require('child_process');\nconst readline = require('readline');\nconst commandLineArgs = require('command-line-args');\n\nconst outDir = './clips';...
javascript
chosen
[ { "from": "system", "value": "Fix 24-hour clock preference not working\n" }, { "from": "human", "value": "/* SDK Modules */\nconst simplePrefs = require('sdk/simple-prefs');\n\n/* Constants */\nconst _24HOUR_PREF = '24hour';\nconst TIME_MSG = 'time';\n\n/**\n * Initializes time by sending time o...
javascript
chosen
[ { "from": "system", "value": "Remove unused ol.style.Text width property\n" }, { "from": "human", "value": "goog.provide('ol.style.Text');\n\n\n\n/**\n * @constructor\n * @param {ol.style.TextOptions} options Options.\n */\nol.style.Text = function(options) {\n\n /**\n * @type {string|undefin...
javascript
chosen
[ { "from": "system", "value": "Add user timeline API method.\n" }, { "from": "human", "value": "var _ = require('lodash'),\n Promise = require('bluebird');\n\nmodule.exports.show = function(params) {\n var path = \"/statuses/show.json?id=\" + params.id;\n return this.get(path, params);\n};\n...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary excludes of src/node_modules\n" }, { "from": "human", "value": "import babel from 'rollup-plugin-babel';\nimport eslint from 'rollup-plugin-eslint';\nimport uglify from 'rollup-plugin-uglify';\n\nexport default {\n\tentry: 'src/game.js',\n\tdest:...
javascript
chosen
[ { "from": "system", "value": "Use more descriptive variable name.\n" }, { "from": "human", "value": "(function() {\n angular\n .module(\"HdmiSwitch\", [\"ngResource\", \"ngMaterial\"])\n .factory(\"Mode\", function($http){\n var mode = {};\n mode.address = ...
javascript
chosen
[ { "from": "system", "value": "Use const instead of var\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar stdin = require('get-stdin')\nvar parseTorrent = require('../')\n\nfunction usage () {\n console.error('Usage: parse-torrent /path/to/torrent')\n console.error(' parse-tor...
javascript
chosen
[ { "from": "system", "value": "Add mime-type checker for audio and video\n" }, { "from": "human", "value": "export const IMAGE_MIME_TYPES = ['image/png', 'image/jpeg', 'image/gif', 'image/bmp', 'image/webp', 'image/x-icon', 'image/*'];\n\nfunction isImage(file) {\n const type = (file.type || '...
javascript
chosen
[ { "from": "system", "value": "FIX fix test for new greeting\n" }, { "from": "human", "value": "var util = require('../js/util');\nvar assert = require('assert');\n\ndescribe('Hello World function', function() {\n it('should always fail', function() {\n\n assert.equal(false, false);\n\n...
javascript
chosen
[ { "from": "system", "value": "Update to current Braintree Node library version" }, { "from": "human", "value": "Package.describe({\n name: 'patrickml:braintree',\n version: '1.0.4',\n // Brief, one-line summary of the package.\n summary: 'Complete Sync wrapper for Braintree Payments.',\n //...
javascript
chosen
[ { "from": "system", "value": "Hide (big) devtools dock on startup\n" }, { "from": "human", "value": "import React from 'react'\nimport { createDevTools } from 'redux-devtools'\nimport LogMonitor from 'redux-devtools-log-monitor'\nimport DockMonitor from 'redux-devtools-dock-monitor'\n\nexport de...
javascript
chosen
[ { "from": "system", "value": "Add news reader to router rules.\n" }, { "from": "human", "value": "import Vue from 'vue'\nimport Router from 'vue-router'\nimport menuModule from '../store/modules/menu'\n\nVue.use(Router)\n\nconst router = new Router({\n mode: 'history',\n routes: [\...
javascript
chosen
[ { "from": "system", "value": "Use new retry option on superagent.request\n" }, { "from": "human", "value": "'use strict';\n\nconst { addOauthHeader } = require('@clevercloud/client/cjs/oauth.node.js');\nconst { prefixUrl } = require('@clevercloud/client/cjs/prefix-url.js');\nconst { request } = ...
javascript
chosen
[ { "from": "system", "value": "Configure tests to use sqlite3\n" }, { "from": "human", "value": "module.exports = {\n\n test: {\n client: 'pg',\n connection: 'postgres://localhost/samranking-test',\n migrations: {\n directory: __dirname + '/db/migrations'\n },\n seeds: {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix POST 404 by adding leading slash in routes\n" }, { "from": "human", "value": "var express = require('express');\nvar mongoose = require('mongoose');\nvar bodyParser = require('body-parser');\nvar catController = require(__dirname + '/cat/catController.js');\n\nm...
javascript
chosen
[ { "from": "system", "value": "Add a new line for each content appended to the body for transform writer.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar path = require(\"path\");\nvar DEFAULT_EXPORT_EXPR = \"module.exports\";\n\nfunction TransformWriter(file, body) {\n var exportExp...
javascript
chosen
[ { "from": "system", "value": "Remove reverse historical guessing from Morph description\n" }, { "from": "human", "value": "import React from 'react'\nimport injectSheet from 'react-jss'\nimport PropTypes from 'prop-types'\n\nimport Notice from '../../components/Notice'\nimport Tool from '../../c...
javascript
chosen
[ { "from": "system", "value": "Fix date assertion that returned by `Ember.inspect`\n" }, { "from": "human", "value": "module(\"Ember.inspect\");\n\nvar inspect = Ember.inspect;\n\ntest(\"strings\", function() {\n equal(inspect(\"foo\"), \"foo\");\n});\n\ntest(\"numbers\", function() {\n equal(i...
javascript
chosen
[ { "from": "system", "value": "Fix field editors for names that have dashes\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport function fieldType(content, fieldName) {\n if (!content) { return; }\n let meta;\n\n try {\n meta = content.constructor.metaForProperty(fieldNa...
javascript
chosen
[ { "from": "system", "value": "Remove clean function of gulp default\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n sass = require('gulp-sass'),\n rename = require('gulp-rename'),\n minifyCss = require('gulp-minify-css'),\n autoprefixer = require('gulp-autoprefixer')...
javascript
chosen
[ { "from": "system", "value": "Add task to default, change name to jslint\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar serv = require('gulp-webserver');\nvar jshint = require('gulp-jshint');\nvar nodemon = require('gulp-nodemon');\n\nvar paths = {\n javascript: './js/**/*....
javascript
chosen
[ { "from": "system", "value": "Switch using to using shared `getID`.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar xpi = require(\"./xpi\");\nvar createProfile = require(\"./profile\");\nvar runFirefox = require(\"./firefox\");\nvar fs = require(\"fs-promise\");\nvar includePrefs = re...
javascript
chosen
[ { "from": "system", "value": "Add lint reporter rules and enums\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar todo = require('gulp-todo');\nvar lint = require('gulp-eslint');\n\nvar paths = {\n src: './',\n spec: './spec/*.js',\n js: [\n './*.js',\n './src/*.js',\...
javascript
chosen
[ { "from": "system", "value": "Comment out ftp deploy for now\n" }, { "from": "human", "value": "/**\n* Gulpfile\n* --------\n* Here are the commands you can run.\n* gulp\n* gulp --maps\n* gulp --ugly\n* gulp --hint\n* gulp jshint\n* gulp jshint --ugly\n* gulp browserify\n* gulp browserify --hint...
javascript
chosen
[ { "from": "system", "value": "Fix for gulp config file\n" }, { "from": "human", "value": "var gulp = require('gulp');\n\n// include plug-ins\nvar jshint = require('gulp-jshint');\nvar mocha = require('gulp-mocha');\n\n\n// JS hint task\ngulp.task('jshint', function() {\n gulp.src('./src/*.js')\...
javascript
chosen
[ { "from": "system", "value": "Disable tests on beta/canary builds\n\nThese are failing and the code hasn't been updated to support them yet.\nWhen I get time to investigate why they are failing then I will revert\nthis commit. Till then I will disable them.\n" }, { "from": "human", "value": "mod...
javascript
chosen
[ { "from": "system", "value": "Add archive description to validator and point to my repo for demo\n" }, { "from": "human", "value": "/**\n * This is the default configuration file for the Superdesk application. By default,\n * the app will use the file with the name \"superdesk.config.js\" found ...
javascript
chosen
[ { "from": "system", "value": "Make URL parameter an array\n" }, { "from": "human", "value": "var mockup = require('./index');\n\nmockup.create({\n url: 'https://flinc.org',\n template: 'flat_responsive', // available: 'flat_responsive', 'flat_responsive_2'\n output: 'responsive_mockup.png'\n}...
javascript
chosen
[ { "from": "system", "value": "Fix warning for handleRoute prop\n" }, { "from": "human", "value": "import Button from './Button.react';\n\nimport expect from 'expect';\nimport { shallow } from 'enzyme';\nimport React from 'react';\n\ndescribe('<Button />', () => {\n it('should render its childre...
javascript
chosen
[ { "from": "system", "value": "Set JoinContestMutation $id argument type to Int\n" }, { "from": "human", "value": "import { takeLatest, call, put } from 'redux-saga/effects';\nimport { gql } from 'react-apollo';\nimport { client } from '../../graphql';\nimport { bootstrap } from '../../utils/saga...
javascript
chosen
[ { "from": "system", "value": "Fix js_beautify not runing in Web Workers\n" }, { "from": "human", "value": "---\n---\n/**\n * @name {{ site.name }}\n * @description {{ site.description }}\n * @author {{ site.author }} <{{ site.author_email }}> ({{ site.url }})\n * @version {{ site.version }}\...
javascript
chosen
[ { "from": "system", "value": "Add board parsing to reddit\n" }, { "from": "human", "value": "import fs from 'fs'\n\nexport function parseBoardList(boardList) {\n // console.log(JSON.stringify(boardList))\n try {\n boardList.data.children\n } catch (e) {\n return log.error(...
javascript
chosen
[ { "from": "system", "value": "Change subdomain to reflect that it's in a testing period still\n" }, { "from": "human", "value": "var app = angular.module(\"AdmissionsApp\");\n\napp.service(\"PasswordCheckService\", [\"$http\", function ($http) {\n var submitBaseUrl = \"http://admissions.vscho...
javascript
chosen
[ { "from": "system", "value": "Add option if name not exists.\n" }, { "from": "human", "value": "var PermissionConstructor = require('./PermissionConstructor').PermissionConstructor;\n\nfunction WebService(currentUser) {\n\tthis._currentUser = currentUser;\n\tthis._dependencies = {};\n\tthis.runR...
javascript
chosen
[ { "from": "system", "value": "Add notes for debugging Vega\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('arachne.visualizations.directives')\n .directive('con10tVega', function () { // con10t-vega\n return {\n restrict: 'E',\n scope: {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix issue with state being saved with last value\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PikadayWrapper from '../../lib-components/PikadayWrapper/PikadayWrapper';\n\nexport default class PantryItem extends Component {\n ...
javascript
chosen
[ { "from": "system", "value": "Add hardware back button debounce return value update\n" }, { "from": "human", "value": "/* eslint-disable import/prefer-default-export */\n\n// Credit David Walsh (https://davidwalsh.name/javascript-debounce-function)\n// Slightly editted for linter to accept.\n// ...
javascript
chosen
[ { "from": "system", "value": "Fix spacing and restore STORE_NAME export to user store.\n" }, { "from": "human", "value": "/**\n * core/user data store\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u...
javascript
chosen
[ { "from": "system", "value": "Clone context to prevent pass-by-reference issues\n" }, { "from": "human", "value": "'use strict';\n\nconst _ = require('lodash');\nconst utils = require('../utils');\nconst Log = require('../log');\nconst mix = require('../mixins/mix');\nconst Heritable = require('...
javascript
chosen
[ { "from": "system", "value": "timing: Remove fractional ms in diagnostics screen.\n\nendMs and startMs are created by Date.now(), which has a precision\nof ±1 ms. Don't suggest a precision that we don't have. Remove all\nfractional digits.\n" }, { "from": "human", "value": "/* @flow */\nimport R...
javascript
chosen
[ { "from": "system", "value": "Check feeds every 10 minutes\n" }, { "from": "human", "value": "// load dependencies\nvar express = require('express');\nvar bodyParser = require('body-parser');\nvar mongoose = require('mongoose');\nvar router = require('./router');\nvar Rss = require('./rss');\nva...
javascript
chosen
[ { "from": "system", "value": "Reset dice on each new turn\n" }, { "from": "human", "value": "import Die from \"appkit/models/die\";\n\nexport default Ember.ObjectController.extend({\n dice: [Die.create(), Die.create(), Die.create(), Die.create(), Die.create()],\n\n actions: {\n newTurn: fun...
javascript
chosen
[ { "from": "system", "value": "Add LocalStateForm from existing code\n" }, { "from": "human", "value": "const immutableReactForm = {\n greet() {\n return 'hello';\n }\n};\n\nexport default immutableReactForm;\n" }, { "from": "gpt", "value": "import React from 'react';\nimport cur...
javascript
chosen
[ { "from": "system", "value": "Add check for images property length\n" }, { "from": "human", "value": "(function (env) {\n 'use strict';\n env.ddg_spice_spotify = function(api_result){\n\n var query = DDG.get_query();\n query = query.replace(/on spotify/, '');\n\n if (!...
javascript
chosen
[ { "from": "system", "value": "Add post function for comics\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function(req, res, next) {\n res.render('index', { title: 'Express' });\n});\n\nmodule.exports...
javascript
chosen
[ { "from": "system", "value": "Fix failing test for <Navigation>\n" }, { "from": "human", "value": "/* eslint-disable no-unused-expressions */\nimport { expect } from 'chai';\nimport { shallow, mount } from 'enzyme';\nimport React from 'react';\nimport Navigation from '../../src/js/components/Nav...
javascript
chosen
[ { "from": "system", "value": "Return authenticated key in storage restore\n" }, { "from": "human", "value": "export default () => ({\n clear: jest.fn(() => Promise.resolve()),\n persist: jest.fn(data => Promise.resolve(data)),\n restore: jest.fn(() => Promise.resolve())\n})\n" }, { "f...
javascript
chosen
[ { "from": "system", "value": "Remove firmware version as it's not provided\n\n" }, { "from": "human", "value": "import { make } from 'vuex-pathify'\nimport { version } from '../../package.json'\n\nconst state = {\n version: '',\n platform: 'all', // either 'android', 'ios', or 'all'\n hardwar...
javascript
chosen
[ { "from": "system", "value": "Fix piechart on 0 chars\n" }, { "from": "human", "value": "import {connect} from 'react-redux'\nimport {createSelector} from 'reselect'\nimport DemoPieChart from '../components/DemoPieChart'\nimport {countLetters} from '../utils/stringStats'\nimport {incrementRender...
javascript
chosen
[ { "from": "system", "value": "Fix wrong template file name\n" }, { "from": "human", "value": "/**\n * @file Instantiates and configures angular modules for your module.\n */\ndefine(['angular'], function (ng) {\n 'use strict';\n\n ng.module('{{template_name}}.controllers', []);\n ng.module('{...
javascript
chosen
[ { "from": "system", "value": "Switch less back to fully synchronous, now that the NPM module supports it.\n\nsyncImport was added in 1.3.2 and we just upgraded from 1.3.1 to 1.3.3.\n\nOtherwise error handling gets pretty fussy (eg, sometimes less throws from\nwithin a callback).\n" }, { "from": "hum...
javascript
chosen
[ { "from": "system", "value": "Adjust nav element scrolling functions\n\nThe functions are now functioning in Firefox as well as Chrome\n" }, { "from": "human", "value": "$(document).ready(function () {\n\n // Selecting some DOM elements for further handling\n\n var dom = {\n window:...
javascript
chosen
[ { "from": "system", "value": "Remove broken text exporter code.\n\nFixes regressions.\n" }, { "from": "human", "value": "import { getLabel } from '../shared/nodeHelpers'\n\nexport default class ArticlePlainTextExporter {\n export (article) {\n console.error('TODO: implement full article to p...
javascript
chosen
[ { "from": "system", "value": "Add server-join-room listener to hall connector\n" }, { "from": "human", "value": "import io from 'socket.io-client';\n\nfunction hallConnector(hallUrl, joinRoomCallback) {\n this._socket = io.connect(hallUrl, {'forceNew': true});\n this._socket.on('connect', ...
javascript
chosen
[ { "from": "system", "value": "Fix poker lib getting referenced incorrectly\n" }, { "from": "human", "value": "var poker = require('./node-poker');\n\nvar table = new poker.Table(50,100,2,10,100,1000);\n\ntable.AddPlayer('bob',1000)\ntable.AddPlayer('jane',1000)\ntable.AddPlayer('dylan',1000)\nta...
javascript
chosen
[ { "from": "system", "value": "Replace jQuery with pure Javascript\n" }, { "from": "human", "value": "/**\n * Tatoeba Project, free collaborative creation of multilingual corpuses project\n * Copyright (C) 2010 HO Ngoc Phuong Trang <tranglich@gmail.com>\n *\n * This program is free software: you...
javascript
chosen
[ { "from": "system", "value": "Add addImmediate to Queue class\n" }, { "from": "human", "value": "org.bustany.TrackerBird.Queue = function(delay) {\n\tthis._delay = 100;\n\tthis._items = [];\n\tthis._active = false;\n\n\tvar queue = this;\n\tthis._timerEvent = { notify: function(timer) { queue._a...
javascript
chosen
[ { "from": "system", "value": "Add redux dev tools support\n" }, { "from": "human", "value": "import React from 'react';\nimport { render } from 'react-dom';\nimport { createStore, applyMiddleware } from 'redux';\nimport { Provider } from 'react-redux';\nimport thunk from 'redux-thunk';\nimport p...
javascript
chosen
[ { "from": "system", "value": "Add github url to demo\n" }, { "from": "human", "value": "import { configure } from '@storybook/react';\nimport { setOptions } from '@storybook/addon-options';\n\nsetOptions({\n name: 'React Power Select',\n addonPanelInRight: true,\n});\n\n// automatically import...
javascript
chosen
[ { "from": "system", "value": "Add .warn and .error to DebugLogger\n" }, { "from": "human", "value": "'use strict';\n\nfunction DebugLogger(name, enabled) {\n this.name = name;\n this.enabled = enabled;\n}\n\nDebugLogger.prototype.enable = function() {\n this.enabled = true;\n};\n\nDebugLogger...
javascript
chosen
[ { "from": "system", "value": "Fix bug with disabling buttons when there is two forms\n\n- old code was updating the button of both form buttons\n rather than just the button clicked\n" }, { "from": "human", "value": "(function($) {\n 'use strict';\n\n var button = $('[data-disable-with]');\n\...
javascript
chosen
[ { "from": "system", "value": "Remove unimplemented methods from help\n" }, { "from": "human", "value": "var argv = require('minimist')(process.argv.slice(2));\nvar marco = require('./lib/marco.js');\nvar through = require('through2');\nvar split = require('split');\n\nvar usage = function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Use Object.assign() to specify an alternate movie to search for\n" }, { "from": "human", "value": "const axios = require('axios')\n\n// let params = {\n// t: 'la la land',\n// type: 'movie',\n// tomatoes: 'true'\n// }\nlet params = {\n t: 'passengers',\n typ...
javascript
chosen
[ { "from": "system", "value": "Fix warning: checkbox without onChange attribute" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react'\nimport { FormGroup, Checkbox, Glyphicon } from 'react-bootstrap'\n\nconst propTypes = {\n phenotypes : PropTypes.array,\n to...
javascript
chosen
[ { "from": "system", "value": "Fix url to 404 template\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n moment.locale('nb');\n\n var module = angular.module('billett', [\n 'ngRoute',\n 'billett.auth',\n\n // common\n 'billett.common.directi...
javascript
chosen
[ { "from": "system", "value": "Add sourceMap to babel-emotion-plugin config\n" }, { "from": "human", "value": "const { injectBabelPlugin, getLoader, getBabelLoader, loaderNameMatches } = require('react-app-rewired')\n\nmodule.exports = function override(config, env) {\n // Inject all babel plugi...
javascript
chosen
[ { "from": "system", "value": "Use style loader instead of raw loader for css and get rid of html-raw loader\n" }, { "from": "human", "value": "const path = require('path');\nvar webpack = require('webpack');\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\n\nmodule.exports = {\n de...
javascript
chosen
[ { "from": "system", "value": "Resolve also .jsx modules by default \n\nsee: http://webpack.github.io/docs/configuration.html#resolve-extensions" }, { "from": "human", "value": "import reactTransform from 'babel-plugin-react-transform'\n\nexport default {\n name: 'webpack-babel',\n configure ({...
javascript
chosen
[ { "from": "system", "value": "Move the init/event methods to the private scope\n" }, { "from": "human", "value": "var Gificiency = (function() {\n 'use strict';\n\n var searchField = $('.search'),\n items = $('li'),\n links = $('a');\n\n var search = function(filter) {\n links.ea...
javascript
chosen
[ { "from": "system", "value": "Fix issue with close icon not appearing\n" }, { "from": "human", "value": "import React, { useCallback } from 'react';\nimport { useDocked } from 'openfin-react-hooks';\nimport { snapAndDock } from 'openfin-layouts';\n\nimport './Titlebar.css';\n\nexport default () ...
javascript
chosen
[ { "from": "system", "value": "Add method to detect if CORS is supported" }, { "from": "human", "value": "module.exports = {\n getViewPortInfo: function getViewPort () {\n var e = document.documentElement\n var g = document.getElementsByTagName('body')[0]\n var x = window.innerWidth || ...
javascript
chosen
[ { "from": "system", "value": "Add automatic dir checker to CLI\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport path from 'path';\nimport * as pose from '.';\n\nconst opts = yargs\n.usage('$ pose <action> [options]')\n.help('help')\n.options({\n name:...
javascript
chosen
[ { "from": "system", "value": "Add start and stop functions\n" }, { "from": "human", "value": "'use strict';\n\n(function () {\n\tvar editorHasFocus = false;\n\tvar commandIsActive = false;\n\n\tCKEDITOR.plugins.add('autoid', {\n\t\tinit: function (editor) {\n\t\t\tvar self = this;\n\n\t\t\tif (e...
javascript
chosen
[ { "from": "system", "value": "Remove babel-polyfill in favour of core-js\n" }, { "from": "human", "value": "// ==========================================================================\n// Plyr Polyfilled Build\n// plyr.js v3.4.3\n// https://github.com/sampotts/plyr\n// License: The MIT License...
javascript
chosen
[ { "from": "system", "value": "Comment out unconditional sentry capture\n" }, { "from": "human", "value": "import events from '@girder/core/events';\nimport { restRequest } from '@girder/core/rest';\nimport {init as sentryInit, captureException} from '@sentry/browser';\n\nimport './routes';\n\nev...
javascript
chosen
[ { "from": "system", "value": "Set a high limit on the query to retrieve all the maplayers\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(process...
javascript
chosen
[ { "from": "system", "value": "Use let instead of var\n" }, { "from": "human", "value": "import { isString, isArray, isFunction } from './util';\n\nlet resolved = {};\n\nfunction loadScript(url, callback, errorCallback) {\n var invokeCallback = function() {\n resolved[url] = true;\n\n ...
javascript
chosen
[ { "from": "system", "value": "Use category layout if available in the category generator\n\nIn case a category layout is defined use it over archive and index layouts.\n\nBuilt from f3ac57b2c6cb8ce85da49515309c0f34f8227e40.\n" }, { "from": "human", "value": "var pagination = require('hexo-pagina...
javascript
chosen
[ { "from": "system", "value": "Send most recent status in GET list-subscribers\n" }, { "from": "human", "value": "const list = require('../../models').list;\nconst listsubscriber = require('../../models').listsubscriber;\n\nmodule.exports = (req, res) => {\n // Find all subscribers belonging to ...
javascript
chosen
[ { "from": "system", "value": "Make Google Calendar Answer Generator eligible to be a Quick Link\n" }, { "from": "human", "value": "/*jslint continue: true, devel: true, evil: true, indent: 2, nomen: true, plusplus: true, regexp: true, rhino: true, sloppy: true, sub: true, unparam: true, vars: tr...
javascript
chosen
[ { "from": "system", "value": "Add special text if there's not yet a hangout URL\n" }, { "from": "human", "value": "import React from 'react'\nimport moment from 'moment'\nimport {markdown} from 'markdown'\nimport Person from '../../components/person'\nimport deindent from 'deindent'\n\nexport de...
javascript
chosen
[ { "from": "system", "value": "Fix use of attrs => attributes\n\nI believe this was a copy and paste error, but the undefined attrs was used when it seems like it should be attributes." }, { "from": "human", "value": "'use strict';\n\n/*\n * Binds the attributes to the expression once at startup,...
javascript
chosen
[ { "from": "system", "value": "Improve front to prevent double activation\n" }, { "from": "human", "value": "'use strict'\n\nangular.module('ludwigApp')\n .controller('AccountCtrl', function ($scope, $state, LoginService, RepositoryService) {\n LoginService.get()\n .then(function (user) ...
javascript
chosen
[ { "from": "system", "value": "Fix old spotify player & use class names instead of title for new player.\n" }, { "from": "human", "value": ";(function() {\n \"use strict\";\n\n var BaseController = require(\"BaseController\"),\n _ = require(\"lodash\");\n\n var multiSelectors = {\n pla...
javascript
chosen
[ { "from": "system", "value": "Write to systemd by default\n" }, { "from": "human", "value": "#!/usr/bin/env node\nvar fs = require('fs')\nvar resolve = require('path').resolve\nvar meow = require('meow')\n\nvar initdify = require('./')\n\nvar cli = meow(`\n Usage\n $ systemdify <folder>\n\n ...
javascript
chosen
[ { "from": "system", "value": "Set min value to text field.\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport TextField from 'material-ui/TextField';\nimport Card, { CardActions, CardContent } from 'material-ui/Card';\nimport Button from 'material-ui/Button';\n\...
javascript
chosen
[ { "from": "system", "value": "fix: Rename prop key -> sitekey\n\nkey is reserved attribute.\n" }, { "from": "human", "value": "import recaptcha from './recaptcha.js';\n\nlet widgetId = null;\n\nexport default {\n props: {\n key: {\n type: String,\n required: true\n },\n optio...
javascript
chosen
[ { "from": "system", "value": "Change backend to LOS GraphDB\n" }, { "from": "human", "value": "// Parameters for the application\n\nexport default {\n queryURL: 'https://unece-stardog.ichec.ie/annex/classifications/sparql/query'\n}\n" }, { "from": "gpt", "value": "// Parameters for ...
javascript
chosen
[ { "from": "system", "value": "Fix plugin in pluginSeach directive\n\nAh leftover from the creation through a snippet of this - breaks DI in\nnon-minified mode.\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.search').directive('pluginSearch', function(injectables) ...
javascript
chosen
[ { "from": "system", "value": "Fix Hue test result error\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport { Link } from 'react-router-dom';\nimport NavbarLogo from './NavbarLogo.js';\nimport '../stylesheets/components/navbar.css';\n\nclass NavComponent extends Co...
javascript
chosen
[ { "from": "system", "value": "Fix Nodemon + Yarn integration problem\n" }, { "from": "human", "value": "'use strict';\n\nconst process = require('process');\nconst { promisify } = require('util');\n\nconst { watch, series, parallel } = require('gulp');\n\nconst FILES = require('../files');\n\n//...
javascript
chosen
[ { "from": "system", "value": "Replace sendAction with a function call.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/resize-detector';\n\nconst {\n inject: { service },\n run: { scheduleOnce, bind }\n} = Ember;\n\nexport default Embe...
javascript
chosen
[ { "from": "system", "value": "Update prop message for v-text-field masks\n" }, { "from": "human", "value": "export default {\n app: 'Designates the component as part of the application layout. Used for dynamically adjusting content sizing',\n auto: 'Centers list on selected element',\n center...
javascript
chosen
[ { "from": "system", "value": "Fix broken Filter import in FilterSummary\n" }, { "from": "human", "value": "import React from 'react'\nimport { translate } from 'react-i18next'\nimport PropTypes from 'prop-types'\n\nimport Filter from 'components/Filter'\n\nimport styles from './FiltersSummary.sc...
javascript
chosen
[ { "from": "system", "value": "Fix warning about transitionTo being deprecated\n" }, { "from": "human", "value": "import EditorControllerMixin from 'ghost/mixins/editor-base-controller';\n\nvar EditorNewController = Ember.ObjectController.extend(EditorControllerMixin, {\n actions: {\n /...
javascript
chosen
[ { "from": "system", "value": "Add center and increase suggested value font size" }, { "from": "human", "value": "/**\n * window.c.ProjectSuggestedContributions component\n * A Project-show page helper to show suggested amounts of contributions\n *\n * Example of use:\n * view: () => {\n * ...\...
javascript
chosen
[ { "from": "system", "value": "Fix require on Node.js 0.12.\n" }, { "from": "human", "value": "// Control-flow utilities.\nvar cadence = require('cadence')\n\n// Evented message queue.\nvar Procession = require('.')\n\n// Create a splitter that will split the given queue.\n\n//\nfunction Splitter...
javascript
chosen
[ { "from": "system", "value": "Remove leading hour from session time\n" }, { "from": "human", "value": "import React from 'react';\nimport {\n\tView,\n\tText,\n\tStyleSheet,\n} from 'react-native';\nimport moment from 'moment';\n\nimport {\n\tCOLOR_LGREY,\n\tCOLOR_BLACK,\n} from '../../styles/Col...
javascript
chosen