conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Revert \"don't exclude open dependency from babel-loader, as it contains ES6 spread operator\"\n\nThis reverts commit 06a4956dc1535e2e7f31373af69bd805dfa4fca1.\n" }, { "from": "human", "value": "/**\n * Base webpack config used across other specific configs\n */\n\n...
javascript
chosen
[ { "from": "system", "value": "Remove keyboard shortcuts used in design\n" }, { "from": "human", "value": "$(document).ready(function($) {\n\n // header dropdowns\n $('.mainItem a, ul.dropdown').hover(function() {\n $(this).parent().toggleClass('hover');\n });\n\n // sticky foo...
javascript
chosen
[ { "from": "system", "value": "Fix walk ECMAScript module file name" }, { "from": "human", "value": "import buble from \"rollup-plugin-buble\"\n\nexport default {\n entry: \"acorn-walk/src/index.js\",\n moduleName: \"acorn.walk\",\n plugins: [\n buble({transforms: {dangerousForOf: true}})\n...
javascript
chosen
[ { "from": "system", "value": "Load account on transactions page\n" }, { "from": "human", "value": "import React from 'react'\nimport { connect } from 'react-redux'\nimport List from './List'\nimport Filter from './Filter'\nimport Pager from './Pager'\nimport Footer from './Footer'\nimport { load...
javascript
chosen
[ { "from": "system", "value": "Use require for window object. Better comments.\n" }, { "from": "human", "value": "'use strict';\n\nvar hg = require('../../index.js');\nvar document = require('global/document');\n\n// Copied from examples/count.js\nfunction App() {\n return hg.state({\n ...
javascript
chosen
[ { "from": "system", "value": "Clarify log, add error handler\n" }, { "from": "human", "value": "'use strict';\n\nconst Firebase = require('firebase');\n\nconst firebase_secrets = require('../common/secrets/scrape-img.js').firebase;\n\nconst dbRef = new Firebase(firebase_secrets.url);\n\nfunction...
javascript
chosen
[ { "from": "system", "value": "Use knex for search index raw query.\n" }, { "from": "human", "value": "import BaseModel from '../models/base'\n\nexport default (app) => {\n const service = {\n create: async () =>\n BaseModel.raw('REFRESH MATERIALIZED VIEW CONCURRENTLY entries_search'),\n...
javascript
chosen
[ { "from": "system", "value": "Add ‘do not reply’ message to custom email.\n" }, { "from": "human", "value": "import React from 'react'\n\nexport default (email, submit) =>\n <div className='custom-email-container'>\n <h3>Write out your custom email</h3>\n <form onSubmit={submit}>\n <...
javascript
chosen
[ { "from": "system", "value": "Fix can't build entry point by incorrect build setting\n" }, { "from": "human", "value": "const webpack = require(\"webpack\");\nconst path = require(\"path\");\n\nconst sourceDir = path.join(__dirname, \"src\");\nconst distDir = path.join(__dirname, \"dist\");\n\nm...
javascript
chosen
[ { "from": "system", "value": "Add focused class if placeholder length is greather than 0\n" }, { "from": "human", "value": "$(document).ready(function(){\n function floatingLabel() {\n var PARENT_CLASS = '.form-group',\n INPUT_CLASS = '.form-group.floating-labels input, .form-group.fl...
javascript
chosen
[ { "from": "system", "value": "Revert \"hard coding in fake channel\"\n\nThis reverts commit cac3904dd369f155e2adb055c04740dc4779a934.\n" }, { "from": "human", "value": "Template.messages.messages = function(){\n return Messages.find({channel: \"fakechannel\"},{ sort: {time: 1}});\n}\n\nTemplate...
javascript
chosen
[ { "from": "system", "value": "Migrate only archive manager keys\n" }, { "from": "human", "value": "import { TASK_TYPE_HIGH_PRIORITY } from \"@buttercup/channel-queue\";\nimport log from \"../../shared/library/log.js\";\nimport { getDefaultStorageAdapter } from \"./BrowserStorageInterface.js\";\n...
javascript
chosen
[ { "from": "system", "value": "Use more specific imports in demo site controller\n" }, { "from": "human", "value": "import Controller from '@ember/controller';\nimport RSVP from 'rsvp';\nimport { run } from '@ember/runloop';\n\nexport default Controller.extend({\n asyncContent: null,\n showTool...
javascript
chosen
[ { "from": "system", "value": "Use mixin.detect for components not within mixin unit tests.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport mixinUnderTest from 'sl-ember-components/mixins/sl-component-input-id';\nimport { module, test } from 'qunit';\n\nmodule( 'Unit | Mixin...
javascript
chosen
[ { "from": "system", "value": "Make progressiveTimeout test less flaky\n\nThis test deals with async timing, for which I had some reservations.\nIt seems I was right. This seems to fail from time to time when run\non CI. I did relax the checks and removed one of the upper limit ones\n(< 2050).\n\nIf this ver...
javascript
chosen
[ { "from": "system", "value": "Print tasks with manifest with no execution field\n\nI think all should have it but possibly not?\n" }, { "from": "human", "value": "import fs from 'fs';\nimport fetchAllPages from './fetchAllPages.js';\n\nconst token = process.argv[2];\nif (!token) {\n throw new E...
javascript
chosen
[ { "from": "system", "value": "Remove uuid in constructor, since strong loop server will see null as value provided, there won't be any defaultFn called. Otherwise you can give uuid \"undefined\", it's OK.\n" }, { "from": "human", "value": "import CartBlogEditorCtrl from './base/cart-blog-editor....
javascript
chosen
[ { "from": "system", "value": "Maintain an internal stack of keystroke handlers - when blurring the element with current control, return to the previous element with keystroke control\n" }, { "from": "human", "value": "jsio('from common.javascript import Singleton')\n\njsio('import browser.events...
javascript
chosen
[ { "from": "system", "value": "Enable service search filter tests\n" }, { "from": "human", "value": "xdescribe('Service Search Filters', function () {\n context('Filters services table', function () {\n beforeEach(function () {\n cy.configureCluster({\n mesos: '1-for-each-health',...
javascript
chosen
[ { "from": "system", "value": "Add support for pre fetch callbacks (for example to save codemirror state to a textarea before opening the preview)\n" }, { "from": "human", "value": "class ParsedownPreview {\n constructor(element) {\n const data = element.dataset;\n\n this.url = d...
javascript
chosen
[ { "from": "system", "value": "Add loading spinner, change p to div.preview\n" }, { "from": "human", "value": "var React = require('react');\nvar ReactDOM = require('react-dom');\nvar Link = require('./Link');\nvar Pastie = require('../models/pastie');\n\nmodule.exports = class FeedList extends R...
javascript
chosen
[ { "from": "system", "value": "Modify unit test for controller template\n" }, { "from": "human", "value": "'use strict';\n\ndescribe('Controller: <%= classifiedControllerName %>Controller', function () {\n\n // load the controller's module\n beforeEach(module('<%= slugifiedModuleName %>'));\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix \"Missing translation key for 'null'\"\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { get } from '../../store';\n\nimport { areWeFunYet, translate as $t } fro...
javascript
chosen
[ { "from": "system", "value": "Allow google/DDG results to fall back to URL if no title\n\n- in some cases, where a page's title cannot be extracted (most websites work fine, PDFs depend on how the pdf metadata was set up) overview will fallback to displaying URL for title\n- search injection result views di...
javascript
chosen
[ { "from": "system", "value": "Change so that it returns a function instead of the password value\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = pluginOptions => ({ connection, command }) => {\n const password =\n command.password || pluginOptions.password || connection.c...
javascript
chosen
[ { "from": "system", "value": "Make explicit that function works only for strings\n" }, { "from": "human", "value": "'use strict';\n\n// MODULES //\n\nvar getKeys = require( 'object-keys' ).shim();\n\n\n// MAIN //\n\n/**\n* Returns an array of unique values.\n*\n* @private\n* @param {Array} arr -...
javascript
chosen
[ { "from": "system", "value": "Change Form Sign Up to Class to Get Refs\n" }, { "from": "human", "value": "'use strict'\n\nimport React, { Component } from 'react'\nimport { connect } from 'react-redux'\n\nimport signUpRequest from '../actions/sign-up'\n\nconst FormSignUp = () => {\n const handl...
javascript
chosen
[ { "from": "system", "value": "Use brace (browserified ace) for editor.\n\nAlso fix the bundled map file locations.\n\nChange-Id: Icbe5b54e1ff71fab4ddef0607acd5ffd5ba61df3\n" }, { "from": "human", "value": "var _ = require('lodash');\n\n// TODO(sadovsky): Neither CodeMirror (npm: codemirror or co...
javascript
chosen
[ { "from": "system", "value": "Update API error handling for empty responses\n" }, { "from": "human", "value": "import apiClient from 'panoptes-client/lib/api-client';\nimport counterpart from 'counterpart';\n\ncounterpart.setFallbackLocale('en');\n\n\nconst translations = {\n strings: {\n pr...
javascript
chosen
[ { "from": "system", "value": "Fix word count if the altered string ends up empty\n" }, { "from": "human", "value": "function runLogEditorWordCount(){\n\tvar common = LogEditorCommon.getInstance(),\n\t\tpreviewDiv = $(\"div.mdd_editor_wrap textarea\");\n\n\tcommon.toolbar.append(\"<li id='geoachi...
javascript
chosen
[ { "from": "system", "value": "Refactor to avoid dynamic module resolution\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* Buffer constructor.\n*\n* @module @stdlib/buffer/ctor\n*\n* @example\n* var ctor = require( '@stdlib/buffer/ctor' );\n*\n* var b = new ctor( [ 1, 2, 3, 4 ] );\n* /...
javascript
chosen
[ { "from": "system", "value": "Update iD link to one hosted on S3\n" }, { "from": "human", "value": "'use strict';\nvar logo = require('./logo');\n/*\n * App config for production.\n */\nmodule.exports = {\n environment: 'production',\n consoleMessage: logo,\n api: 'http://54.255.146.89',\n m...
javascript
chosen
[ { "from": "system", "value": "Fix Ember 2.1 deprecation keeping retrocompatibility\n" }, { "from": "human", "value": "import config from '../config/environment';\nimport Features from '../features/-main';\n\nexport function initialize( registry, application ) {\n var serviceName = config.featur...
javascript
chosen
[ { "from": "system", "value": "Remove title attribute from Bootstrap Select buttons.\n" }, { "from": "human", "value": "ManageIQ.angular.app.directive('selectpickerForSelectTag', function() {\n return {\n require: 'ngModel',\n link: function (scope, elem, attr, ctrl) {\n scope['form_'...
javascript
chosen
[ { "from": "system", "value": "Remove some old 'hoard related' eroneous scripts on installation.\n" }, { "from": "human", "value": "var path = require('path');\r\nvar exec = require('child_process').exec;\r\n\r\nexec('npm run-script generateparser', function(err, stdout,stderr) {\r\n console.log...
javascript
chosen
[ { "from": "system", "value": "Allow Assessment assignee to edit own comments\n\nThat is, edit own comments immediately without refreshing the page.\nBefore the fix this wasn't possible because local permissions info\nhas not been updated on comment creation.\n" }, { "from": "human", "value": "/*...
javascript
chosen
[ { "from": "system", "value": "Change the username min length constraint to what BW allows." }, { "from": "human", "value": "// common constants, shared between multiple pieces of code (and likely client and server)\n\nexport const EMAIL_PATTERN = /^[^@]+@[^@]+$/\nexport const EMAIL_MINLENGTH = 3...
javascript
chosen
[ { "from": "system", "value": "Remove JS that is no longer used\n\nWhen I was looking at CSS that wasn't used I found this Javascript too.\n\nI identified this wasn't used by grepping the code base for class names.\n" }, { "from": "human", "value": "// Happen as soon as the DOM is loaded and befo...
javascript
chosen
[ { "from": "system", "value": "Add ability to search Giant Bomb API\n" }, { "from": "human", "value": "require('dotenv').config()\n\nvar giantBomb = process.env.GIANT_BOMB\nvar searchQuery = \"http://www.giantbomb.com/api/search/?\"\nvar gameQuery = \"http://www.giantbomb.com/api/game/?\"\n\nmodu...
javascript
chosen
[ { "from": "system", "value": "Use caller as key for subfolder runtime deps\n" }, { "from": "human", "value": "import caller from 'caller'\nimport { _resolveFilename } from 'module'\nimport { dirname } from 'path'\n\nexport default class RuntimeDependencyManager {\n constructor() {\n this.dep...
javascript
chosen
[ { "from": "system", "value": "Change pattern to avoid REDOS\n\nThis pattern was not exploitable in its current form.\nHowever, it was a potential copy/paste problem.\n" }, { "from": "human", "value": "/*!\n * git-username <https://github.com/jonschlinkert/git-username>\n *\n * Copyright (c) 2014...
javascript
chosen
[ { "from": "system", "value": "Fix a bug where the widgets of an open page would reload when hovered\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { VegaChart, getVegaTheme } from 'widget-editor';\n\n// /widget_data.json?widget_id=\nc...
javascript
chosen
[ { "from": "system", "value": "Add version check for notebook path\n" }, { "from": "human", "value": "//----------------------------------------------------------------------------\n// Copyright (C) 2012 The IPython Development Team\n//\n// Distributed under the terms of the BSD License. The ...
javascript
chosen
[ { "from": "system", "value": "docs: Update example for template parameters\n" }, { "from": "human", "value": "var path = require('path');\nvar HtmlWebpackPlugin = require('../..');\nvar webpackMajorVersion = require('webpack/package.json').version.split('.')[0];\nmodule.exports = {\n context: _...
javascript
chosen
[ { "from": "system", "value": "Move to html template string\n" }, { "from": "human", "value": "var model = new falcor.Model({\n cache: {\n user: {\n name: \"Frank\",\n surname: \"Underwood\",\n address: \"1600 Pennsylvania Avenue, Washington, DC\"\n }\n }\n});\n\nmodel\n ....
javascript
chosen
[ { "from": "system", "value": "Make editor fill up the entire screen.\n" }, { "from": "human", "value": "\"use strict\"\n\nvar SVGPlayground = require(\"./lib/SVGPlayground.js\")\n\n// Async initialization\nif (document.readyState === \"loading\") {\n document.addEventListener(\"DOMContentLoaded...
javascript
chosen
[ { "from": "system", "value": "Add .mpg video extension to supported list\n" }, { "from": "human", "value": "module.exports = {\n isPlayable,\n isVideo,\n isAudio,\n isPlayableTorrent\n}\n\nvar path = require('path')\n\n/**\n * Determines whether a file in a torrent is audio/video we can play...
javascript
chosen
[ { "from": "system", "value": "Handle blank git user emails\n" }, { "from": "human", "value": "define([\n 'knockout'\n , '../util'\n , 'text!./git_user.html'\n], function(ko, util, template) {\n function GitUserModel(params) {\n this.el = util.param(params['el'])\n ...
javascript
chosen
[ { "from": "system", "value": "Remove CSS style renaming wrapper (gets evaluated and throws error at compile-time)\n" }, { "from": "human", "value": "'use strict';\n\ngoog.provide('Blockly.CustomCssClassMenuRenderer');\n\ngoog.require('goog.ui.MenuRenderer');\n\n/**\n * Simple dropdown menu rende...
javascript
chosen
[ { "from": "system", "value": "fix(widget-message): Fix overwriting issue with target id\n" }, { "from": "human", "value": "import {base64} from '@ciscospark/common';\n\n\nexport function constructActivityEventData(activity) {\n const hydraActivity = Object.assign({}, activity);\n\n // Base64 e...
javascript
chosen
[ { "from": "system", "value": "Fix gas total is empty in fee details\n" }, { "from": "human", "value": "import React from \"react\"\nimport ReactTooltip from \"react-tooltip\";\n\nconst FeeDetail = (props) => {\n return (\n <div className=\"gas-configed theme__text-4\">\n <div className=...
javascript
chosen
[ { "from": "system", "value": "Fix bug for social authentication\n" }, { "from": "human", "value": "'use strict';\n/**\n * @ngdoc function\n * @name com.module.core.controller:MainCtrl\n * @description Login Controller\n * @requires $scope\n * @requires $state\n * @requires $location\n * @require...
javascript
chosen
[ { "from": "system", "value": "[DDW-614] Fix broken rewards table story\n" }, { "from": "human", "value": "// @flow\nimport React from 'react';\nimport { map } from 'lodash';\nimport BigNumber from 'bignumber.js';\nimport { action } from '@storybook/addon-actions';\n\n// Screens\nimport StakingRe...
javascript
chosen
[ { "from": "system", "value": "Add Facebook pixel tracking to giveaway signups\n" }, { "from": "human", "value": "// Placeholder manifest file.\n// the installer will append this file to the app vendored assets here: vendor/assets/javascripts/spree/frontend/all.js'\n\njQuery(document).ready(funct...
javascript
chosen
[ { "from": "system", "value": "Remove test that checks for an application directory.\n" }, { "from": "human", "value": "var assert = require(\"chai\").assert;\nvar Init = require(\"../lib/init\");\nvar fs = require(\"fs\");\nvar path = require('path');\n\ndescribe('init', function() {\n var conf...
javascript
chosen
[ { "from": "system", "value": "Add index on 'origin.id' field to speedup fork groups computation\n" }, { "from": "human", "value": "'use strict';\n\nconst helper = require('./helper');\n\nmodule.exports = function() {\n return helper.getCollection('decks').then((decks) => {\n return dec...
javascript
chosen
[ { "from": "system", "value": "Send parameters as lowercase. Can't test because demo server is\nunavailable." }, { "from": "human", "value": "/**\n * Router for opening query when session is initialized\n */\nvar QueryRouter = Backbone.Router.extend({\n routes: {\n 'query/open/:query_na...
javascript
chosen
[ { "from": "system", "value": "Improve color display, remove gray from the texts\n" }, { "from": "human", "value": "// ==UserScript==\n// @name 网易云音乐海外助手\n// @namespace http://www.sudodev.cn/music-163-access-abroad/\n// @updateURL http://git.oschina.net/bobshi/NetEaseMusicHelper/raw/mast...
javascript
chosen
[ { "from": "system", "value": "Add instance methods to single player imports\n\nFixes https://github.com/CookPete/react-player/issues/376\n" }, { "from": "human", "value": "import React, { Component } from 'react'\n\nimport { propTypes, defaultProps, DEPRECATED_CONFIG_PROPS } from './props'\nimpo...
javascript
chosen
[ { "from": "system", "value": "casper: Fix waiting condition in message deletion tests.\n\nWe now specifically wait for the length to decrease by one. This seems\nlike a more deterministic condition to wait on.\n\nPreviously we were waiting till the id of the deleted message remained\nvisible; intuitively, t...
javascript
chosen
[ { "from": "system", "value": "Fix auto-complete not updating state with chosen suggestion\n\nThe autocomplete tool was updating the input with the selected value but\nwas not sending a `change` event so this update to the input field was\nnot getting communicated to the React component state.\n\nThis correc...
javascript
chosen
[ { "from": "system", "value": "Add username to ajax data\n" }, { "from": "human", "value": "var EventHandler = (function() {\n var jQueryObject;\n\n var bindClickEvents = function() {\n $(Window.chatLog).on('click', \".upvote\", upVote);\n Window.sendButton.on('click', FirebaseModule.send...
javascript
chosen
[ { "from": "system", "value": "Fix typo in /data fixture.\n" }, { "from": "human", "value": "import { Router, Route, connect } from '../../index';\n\n// It expects a factory function that it can inject dependencies into.\nexport default (React, browserHistory) => {\n const Home = React => {\n ...
javascript
chosen
[ { "from": "system", "value": "Add missing curly brackets in CM Tabris templates\n" }, { "from": "human", "value": "(function() {\n var templates = {\n \"name\": \"javascript\",\n \"context\": \"javascript\",\n \"templates\": [{\n \"name\": \"properties\",\n \"description\": \...
javascript
chosen
[ { "from": "system", "value": "Fix local-cli's installedGlobally check to work on Windows platforms\n\nSummary:\n<!--\nThank you for sending the PR! We appreciate you spending the time to work on these changes.\n\nHelp us understand your motivation by explaining why you decided to make this change.\n\nYou ca...
javascript
chosen
[ { "from": "system", "value": "Fix Edge loopback. Works on builds 10158 and higher." }, { "from": "human", "value": "var gulp = require('gulp');\nvar run = require('gulp-run');\n\ngulp.task('edge-loopback', function() {\n run('start-process powershell -verb runas CheckNetIsolation LoopbackExempt...
javascript
chosen
[ { "from": "system", "value": "Test that mx checks are not done\n" }, { "from": "human", "value": "var utils = require('../lib/utils'),\n _ = require('underscore');\n\nexports.test_is_email = function ( test ) {\n\n var good = [\n 'bob@example.com',\n ];\n \n var bad = [...
javascript
chosen
[ { "from": "system", "value": "Fix double modal issue on 401 error\n" }, { "from": "human", "value": "angular.module('DataServices')\n .service('hostCountGraphData',\n [\"Rest\",\n \"GetBasePath\",\n \"ProcessErrors\",\n \"$q\",\n HostCountGr...
javascript
chosen
[ { "from": "system", "value": "Stop adding words, return object, temporarily ignore flags\n" }, { "from": "human", "value": "'use strict'\n\nconst Logger = use('Logger');\n\nconst SynonymService = use('App/Services/SynonymService');\nconst WordStorageService = use('App/Services/WordStorageService...
javascript
chosen
[ { "from": "system", "value": "Fix syntax highlighting for es searches\n" }, { "from": "human", "value": "\"use strict\";\ndefine(function(require) {\n var SearchView = require('views/searches/search'),\n NullSearchView = require('views/searches/search/null'),\n PingSearchView = ...
javascript
chosen
[ { "from": "system", "value": "Revert \"target site to manifold-api-pre API\"\n\nThis reverts commit 0740fed601a2039507f45a6f4e94a56c6d4bbc6d.\n" }, { "from": "human", "value": "module.exports = {\n apiUrl: 'https://manifold-api-pre.azurewebsites.net',\n analytics: 'UA-98003629-1',\n api...
javascript
chosen
[ { "from": "system", "value": "self-repair: Remove stale reference to driver.location\n" }, { "from": "human", "value": "import NormandyDriver from 'selfrepair/normandy_driver';\nimport {\n fetchRecipes,\n filterContext,\n doesRecipeMatch,\n runRecipe,\n} from 'selfrepair/self_repair_runner';...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded EOL; not editing jshint file anymore\n" }, { "from": "human", "value": "'use strict';\n\nvar EOL = require('os').EOL;\n\nmodule.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function() {\n return this.addBowerPackageToProje...
javascript
chosen
[ { "from": "system", "value": "[base] Remove faulty keypress condition in input text component\n\nSee https://github.com/driebit/ginger/commit/d4f55200359e4534c528b967c2d85188196778da#commitcomment-23920421\n" }, { "from": "human", "value": "$.widget(\"ui.search_cmp_input_text\", {\n\n _create...
javascript
chosen
[ { "from": "system", "value": "Mark status bar tile as read-only\n" }, { "from": "human", "value": "module.exports =\nclass UpdatePackageDependenciesStatusView {\n constructor (statusBar) {\n this.statusBar = statusBar\n this.element = document.createElement('update-package-dependencies-st...
javascript
chosen
[ { "from": "system", "value": "Update database so that email addresses must be unique to each account.\n\nAdded a unique constraint to the email field for users.\n" }, { "from": "human", "value": "// Create users table\nexports.up = function(knex, Promise) {\n return Promise.all([\n knex.sche...
javascript
chosen
[ { "from": "system", "value": "[aeolus] Fix search results link issue\n" }, { "from": "human", "value": "/**\n * VIEW: Document Summary\n * \n */\n\nvar template = require('./templates/documentHighlight.tpl');\n\nmodule.exports = Backbone.Marionette.ItemView.extend({\n\n //----------------------...
javascript
chosen
[ { "from": "system", "value": "Remove preview link until preview is restored\n" }, { "from": "human", "value": "import React from 'react'\n\nimport styles from './PreviewTools.styl'\n\nexport default ({ href, layout, theme, onLayoutChanged, onThemeChanged }) =>\n <div className={styles.container...
javascript
chosen
[ { "from": "system", "value": "Add print statements for logging lambda func\n" }, { "from": "human", "value": "var https = require('https');\n\nexports.handler = function(event, context, callback) {\n\n // This token should live as an environmental variable set in the\n // build config for ...
javascript
chosen
[ { "from": "system", "value": "Update telescope-search for iron:router 1.0\n" }, { "from": "human", "value": "adminNav.push({\n route: 'searchLogs',\n label: 'Search Logs'\n});\n\n\nMeteor.startup(function () {\n\n PostsSearchController = PostsListController.extend({\n view: 'search',\n ...
javascript
chosen
[ { "from": "system", "value": "Change .includes to .indexOf for node 5.10 support\n" }, { "from": "human", "value": "let config = require('../config');\nmodule.exports = function(req, res, next) {\n\tconst validFormats = ['html', 'json'];\n\treq.responseFormat = function() {\n\t\tlet format = nul...
javascript
chosen
[ { "from": "system", "value": "Add promise for trackEvent for both piwik and internalAnalytics\n\nPrivacy track code improvement\n" }, { "from": "human", "value": "import { createAction } from 'redux-act'\n\nimport analytics from 'src/analytics'\nimport internalAnalytics from 'src/analytics/inter...
javascript
chosen
[ { "from": "system", "value": "Put string into resource cache instead of parsed object, angular takes care of that.\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module(\"hikeio\").\n\tdirective(\"preloadResource\", [\"resourceCache\", function(resourceCache) {\n\t\treturn {\n\t\t...
javascript
chosen
[ { "from": "system", "value": "Update core/main view to list groceries module\n" }, { "from": "human", "value": "'use strict';\n\n// Setting up route\nangular.module('core').config(['$stateProvider', '$urlRouterProvider',\n\tfunction($stateProvider, $urlRouterProvider) {\n\t\t// Redirect to home ...
javascript
chosen
[ { "from": "system", "value": "Add types for inject function\n" }, { "from": "human", "value": "// @flow\nimport * as React from \"react\";\n\nconst ApiContext = React.createContext();\n\nexport const ApiProvider = ApiContext.Provider;\n\nexport function withMoiraApi(Component) {\n class Wrapp...
javascript
chosen
[ { "from": "system", "value": "Rewrite Navigation bar as a stateless function\n" }, { "from": "human", "value": "import React from 'react';\nimport { Link } from 'react-router';\n\nimport { Nav, Navbar, NavItem } from 'react-bootstrap';\nimport { LinkContainer } from 'react-router-bootstrap';\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix linting of main file\n\nFile name was changed in previous commit and main file was not being\nlinted. It contained no errors and is now being linted again.\n" }, { "from": "human", "value": "'use strict';\nvar gulp = require('gulp');\nvar jshint = require('gulp-...
javascript
chosen
[ { "from": "system", "value": "Fix for cluster creation dialog\n" }, { "from": "human", "value": "casper.start().loadPage('#clusters');\n\ncasper.then(function() {\n this.test.comment('Testing cluster list page');\n this.test.assertExists('.cluster-list', 'Cluster container exists');\n t...
javascript
chosen
[ { "from": "system", "value": "Use my user and branch (for now).\n" }, { "from": "human", "value": "var autoTester = Script.require(\"https://raw.githubusercontent.com/highfidelity/hifi_tests/master/tests/utils/autoTester.js\" );\n\nautoTester.enableAuto();\n\nScript.include(\"./test.js?raw=true\...
javascript
chosen
[ { "from": "system", "value": "Change EPA API Data Structure\n" }, { "from": "human", "value": "'use strict';\nlet Schema = require('mongoose').Schema;\n\nlet schema = new Schema(\n {\n tim: {type: Number},\n data:{\n \t \"CO\": {type: String},\n\t\t \"County\": {type: String},\n\t\t ...
javascript
chosen
[ { "from": "system", "value": "Add reset button to clear localstorage & reload page\n" }, { "from": "human", "value": "var rb = require('react-bootstrap');\nvar React = require('react');\n\nvar TabbedArea = rb.TabbedArea,\n TabPane = rb.TabPane;\n\nvar DataItemList = require('./dataitemlist')\...
javascript
chosen
[ { "from": "system", "value": "Update config to pass node 6 tests\n" }, { "from": "human", "value": "module.exports = async () => {\n return {\n type: 'plain',\n targets: {\n foo: {},\n },\n apiKey: 'tom',\n apiSecret: 'dooner',\n };\n};\n" }, { "from": "gpt", "v...
javascript
chosen
[ { "from": "system", "value": "Use the correct env var\n" }, { "from": "human", "value": "// Copyright (c) 2015 The Virtual Vulcano authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that\n// can be found in the LICENSE.md file.\n\n'use strict'\n\nvar Seq...
javascript
chosen
[ { "from": "system", "value": "Update access control for allow origin\n" }, { "from": "human", "value": "var express = require('express')\nvar app = express()\n\nvar isUrl = require('is-url')\nvar normalizeUrl = require('normalize-url')\nvar scrutinize = require('scrutinize')\n\napp.use(function ...
javascript
chosen
[ { "from": "system", "value": "[codestyle] Fix bad indentation in the JSONH parser\n" }, { "from": "human", "value": "'use strict';\n\nvar JSONH = require('jsonh');\n\n/**\n * Message encoder.\n *\n * @param {Mixed} data The data that needs to be transformed in to a string.\n * @param {Function} ...
javascript
chosen
[ { "from": "system", "value": "Fix a breakage of the job details page.\n\nThis was an uncaught casualty of #1504.\n" }, { "from": "human", "value": "import router from 'girder/router';\nimport events from 'girder/events';\n\nimport JobModel from './models/JobModel';\nimport JobDetailsWidget from ...
javascript
chosen
[ { "from": "system", "value": "Update up to changes in memoizee package\n" }, { "from": "human", "value": "'use strict';\n\nvar noop = require('es5-ext/function/noop')\n , assign = require('es5-ext/object/assign')\n , memoize = require('memoizee')\n , ee = require('event-emitter')...
javascript
chosen
[ { "from": "system", "value": "Add state to search bar\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n\nclass SearchBar extends Component {\n render() {\n return <input onChange={(event) => console.log(event.target.value)} />;\n }\n}\n\nexport default SearchBar...
javascript
chosen
[ { "from": "system", "value": "Remove new lines in if-statement\n" }, { "from": "human", "value": "'use strict';\n\n// MODULES //\n\nvar pow = require( '@stdlib/math/base/special/pow' );\n\n\n// MAIN //\n\n/**\n* Returns the variance of an arcsine distribution.\n*\n* @param {number} a - minimum s...
javascript
chosen
[ { "from": "system", "value": "Disable dark blue from being chosen by the worldist\n" }, { "from": "human", "value": "var fs = require('fs'),\n _ = require('lodash'),\n gameConstants = require('../common/game-constants');\n\nvar WordList = function WordList(maxLength)...
javascript
chosen