conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use an array, not a NodeList, to allow for-of iteration of l10n nodes\n" }, { "from": "human", "value": "import AmpersandView from 'ampersand-view';\nimport mustache from 'mustache';\n// BaseView just abstracts out stuff we seem to use in all the views\n\nexport def...
javascript
chosen
[ { "from": "system", "value": "Fix mobilization block title edit\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react'\nimport classnames from 'classnames'\nimport { DropDownMenu, NavbarEditionWrapper } from '../../../../scripts/components'\n\nconst MenuItems = ({ blocks, mo...
javascript
chosen
[ { "from": "system", "value": "Fix filtering- of deleted notification\n\n" }, { "from": "human", "value": "import {\n FETCH_NOTIFICATIONS,\n FETCH_NOTIFICATIONS_COUNT,\n DELETE_NOTIFICATION\n} from '../actions/notifications';\n\nconst defaultState = {\n message: '',\n count: 0,\n ...
javascript
chosen
[ { "from": "system", "value": "Create a copy of node data for modal state.\n" }, { "from": "human", "value": "import { $$, Component } from '../dom'\nimport { Form, FormRow, Modal, MultiSelect } from '../ui'\n\nexport default class CitationModal extends Component {\n getInitialState () {\n co...
javascript
chosen
[ { "from": "system", "value": "Add relationship links to serialized data\n\nFixes #14\n" }, { "from": "human", "value": "export function initialize(applicationInstance) {\n let store = applicationInstance.lookup('service:store');\n let shoebox = applicationInstance.lookup('service:fastboot').ge...
javascript
chosen
[ { "from": "system", "value": "Add comment explaining non js prepended classes\n" }, { "from": "human", "value": "require([ \"jquery\", \"lib/analytics/analytics\" ], function($, Analytics) {\n\n \"use strict\";\n\n var omniCode = \"LP highlights Insurance\",\n analytics = new Analytics();...
javascript
chosen
[ { "from": "system", "value": "Use correct i18n for skip links\n" }, { "from": "human", "value": "import React from 'react';\n\nimport I18n from 'i18n-js';\n\nimport styles from './SkipLinks.module.css';\n\nexport function SkipLinks() {\n\n function scrollDown() {\n setTimeout(() => {\n ...
javascript
chosen
[ { "from": "system", "value": "[react-native] Fix dev menu keyboard shortcut in sample app\n\nSummary:\nTo press Cmd+Shift+Z in Sample App on the iOS Simulator is nothing happen.\n\nTo press Cmd+Control+Z is showing dev menu.\nCloses https://github.com/facebook/react-native/pull/598\nGithub Author: sungwook ...
javascript
chosen
[ { "from": "system", "value": "Tweak to processing error responses.\n" }, { "from": "human", "value": "'use strict';\n\nvar angular = require('angular');\nvar HyRes = require('hy-res');\n\nangular.module('hrCore', [])\n .factory('hrHttp', ['$http', function($http) {\n var headersProcessor = f...
javascript
chosen
[ { "from": "system", "value": "Add jshint rule to ignore undefined in test file\n" }, { "from": "human", "value": "'use strict';\n\ndescribe('Directive: webcam', function () {\n\n var element;\n\n beforeEach(module('webcam'));\n\n beforeEach(inject(function ($rootScope, $compile) {\n elemen...
javascript
chosen
[ { "from": "system", "value": "Fix: Remove memory leak when writing streaming contents\n" }, { "from": "human", "value": "'use strict';\n\nvar streamFile = require('../../src/getContents/streamFile');\nvar fs = require('graceful-fs');\n\nfunction writeStream (writePath, file, cb) {\n var opt = {...
javascript
chosen
[ { "from": "system", "value": "Fix javascript links to list prefix path\n" }, { "from": "human", "value": "function searchFrameLinks() {\n $('#method_list_link').unbind(\"click\").click(function() {\n toggleSearchFrame(this, '/list/' + library + '/methods');\n });\n\n $('#class_list_link')....
javascript
chosen
[ { "from": "system", "value": "Fix screenshot size.\nNot providing a maxWidth/maxHeight defaults GetUserMedia to a width of 640 pixels, making all our screenshots 640 pixels wide.\nSpecify a large upper limit to be able to take screenshots of the actual screen size. Not making this int_max to keep a sanity c...
javascript
chosen
[ { "from": "system", "value": "Build to server public directory\n" }, { "from": "human", "value": "var webpack = require('webpack');\nvar Config = require('webpack-config').Config;\n\nmodule.exports = new Config().merge({\n entry: \"./entry.js\",\n output: {\n path: __dirname,\n ...
javascript
chosen
[ { "from": "system", "value": "Add trivikr as one of the maintainers" }, { "from": "human", "value": "import React from 'react';\n\nimport styles from './Footer.scss';\nimport Link from '../Link';\n\nexport default function Footer({addConferenceUrl, togglePast, showPast}) {\n return (\n <foot...
javascript
chosen
[ { "from": "system", "value": "Update tests to be ff compliant.\n" }, { "from": "human", "value": "/**\n * Client tests\n */\nimport React from \"react/addons\";\nimport Component from \"src/components/boilerplate-component\";\n\n// Use `TestUtils` to inject into DOM, simulate events, etc.\n// Se...
javascript
chosen
[ { "from": "system", "value": "Remove unused import from label component spec\n" }, { "from": "human", "value": "import React from 'react';\nimport { render } from 'enzyme';\nimport { expect } from 'chai';\nimport { Label, LabelColors } from '../../src/components/label';\nimport { Colors } from '...
javascript
chosen
[ { "from": "system", "value": "Add tests for toOption() for PlainResult\n" }, { "from": "human", "value": "import test from 'ava';\n\ntest.todo('Ok');\n\ntest.todo('Err');\n\n" }, { "from": "gpt", "value": "import test from 'ava';\n\nimport { isSome, isNone } from '../../__dist/cjs/Pl...
javascript
chosen
[ { "from": "system", "value": "Add integration test for search result.\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('search-result', 'Integration | Component | search result', {\n i...
javascript
chosen
[ { "from": "system", "value": "Build up how DataStore works with and transforms its data types\n" }, { "from": "human", "value": "var DataStore = Ember.Object.extend({\n init: function () {\n this._super();\n this.set('store', {});\n },\n\n addType: function (type) {\n this.store[type...
javascript
chosen
[ { "from": "system", "value": "blueprints/route-test: Use `options.entity-name` for test description\n" }, { "from": "human", "value": "'use strict';\n\nconst testInfo = require('ember-cli-test-info');\nconst path = require('path');\nconst stringUtil = require('ember-cli-string-utils');\nconst us...
javascript
chosen
[ { "from": "system", "value": "Add worker mock for tests\n" }, { "from": "human", "value": "// This file is part of BenchExec, a framework for reliable benchmarking:\n// https://github.com/sosy-lab/benchexec\n//\n// SPDX-FileCopyrightText: 2019-2020 Dirk Beyer <https://www.sosy-lab.org>\n//\n// S...
javascript
chosen
[ { "from": "system", "value": "Apply SLDS style to maximize width of modal\n" }, { "from": "human", "value": "({\n handleEditBatch: function (component) {\n\n $A.createComponents([[\"c:geBatchWizard\", {recordId: component.get('v.recordId')}]],\n function (components, status,...
javascript
chosen
[ { "from": "system", "value": "[FIX] Improve pending results screen text\n" }, { "from": "human", "value": "import React from 'react';\nimport autobind from 'core-decorators/es/autobind';\nimport { NonIdealState, Button, Intent } from '@blueprintjs/core';\nimport LoadingSpinner from '../../../com...
javascript
chosen
[ { "from": "system", "value": "Test handling of callback-wielding functions\n" }, { "from": "human", "value": "'use strict';\nvar assert = require('assert');\nvar callbackify = require('./');\n\nfunction sum (a, b) { return a + b; }\n\nit('should make a sync function pass return to a callback', f...
javascript
chosen
[ { "from": "system", "value": "Adjust media scaling in narrow window\n" }, { "from": "human", "value": "import Immutable from 'immutable';\nimport { COLUMN_MEDIA_RESIZE } from '../actions/column_media';\n\nconst initialState = Immutable.Map({\n scale: null,\n single: null,\n wide: null,\n});\n...
javascript
chosen
[ { "from": "system", "value": "Fix scheduling of firing an ActionCheckbox action\n" }, { "from": "human", "value": "var ActionCheckbox = Ember.Checkbox.extend({\n transmitAction: function () {\n var action = this.get('action'),\n model = this.get('model');\n\n if (action && model) {...
javascript
chosen
[ { "from": "system", "value": "Update passive event listener feature detection\n" }, { "from": "human", "value": "export { listener };\n\n/**\n * Feature detection for passive event listeners as per:\n * https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n *...
javascript
chosen
[ { "from": "system", "value": "Update the default value for the header cta link to be an empty string instead of a hash.\n" }, { "from": "human", "value": "/**\n * WidgetHeaderCTA component.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2...
javascript
chosen
[ { "from": "system", "value": "Add proper missing config text\n" }, { "from": "human", "value": "/**\n * Copyright 2017-present, Callstack.\n * All rights reserved.\n * \n * webpackConfigNotFound.js\n * \n * @flow\n */\nconst dedent = require(\"dedent\");\n\nmodule.exports = ({ path }: { path: st...
javascript
chosen
[ { "from": "system", "value": "Test child process command logging\n" }, { "from": "human", "value": "var fs = require('fs');\n\nvar exec = require('child_process').exec;\n\n\nfunction Err(msg, err){\n var err_str = 'build error\\n'\n + (msg ? msg + '\\n' : '')\n + (err ? err.message + '\\n...
javascript
chosen
[ { "from": "system", "value": ":arrow_up: Optimize Screen Page's Operation Code\n" }, { "from": "human", "value": "var request = new XMLHttpRequest();\nrequest.onload = function() {\n\tvar data = JSON.parse(this.response);\n\tdocument.getElementById('position').innerText = data.curPos;\n};\n\nset...
javascript
chosen
[ { "from": "system", "value": "Enable add button after post\n" }, { "from": "human", "value": "angular.module('accumulatorApp', [])\n .controller('AccumulatorController', ['$scope', '$http', function ($scope, $http) {\n\n $scope.accumulator = [];\n $scope.item = '';\n $scope.enabled = f...
javascript
chosen
[ { "from": "system", "value": "Fix issue where first selection in detail pane after refresh would not be possible\n" }, { "from": "human", "value": "\ndefine([\n 'rangy',\n 'rangy-text'\n], function(\n rangy,\n rangyText\n) {\n\n return {\n expandRangeByWords: function(range...
javascript
chosen
[ { "from": "system", "value": "Make mocha work with babel6\n" }, { "from": "human", "value": "'use strict';\n\nrequire('../node_modules/babel-core/register');\n\nvar src = [\n 'tests/lib/*.js',\n 'tests/lib/parser/properties/*.js',\n 'tests/lib/parser/l20n/*.js',\n 'tests/lib/resolver/*.js',\...
javascript
chosen
[ { "from": "system", "value": "Add story for MDX docs using dark theme\n" }, { "from": "human", "value": "import React from 'react';\nimport { DocsContainer } from '@storybook/addon-docs/blocks';\nimport markdown from './markdown.stories.mdx';\n\nexport default {\n title: 'Addons/Docs/mdx-in-sto...
javascript
chosen
[ { "from": "system", "value": "Fix news typo on error\n" }, { "from": "human", "value": "import { log } from '@/store/utils'\n\nexport function success (commit, data) {\n commit('set', data)\n commit('setRefreshing', false)\n}\n\nexport function error (commit, msg) {\n log('Error while updatin...
javascript
chosen
[ { "from": "system", "value": "Return null for an empty patch for now\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport yubikiri from 'yubikiri';\n\nimport {autobind} from '../helpers';\nimport ObserveModel from '../views/observe-model';\ni...
javascript
chosen
[ { "from": "system", "value": "Add webpack to bundle and transpile, Add redux\n" }, { "from": "human", "value": "/*jshint esversion: 6 */\nimport reducers from './reducers';\nimport App from './components/App.jsx';\n\nconst store = Redux.createStore(reducers);\nconst rootEl = document.getElementB...
javascript
chosen
[ { "from": "system", "value": "Add reference for phantomJSPath option\n\nIn certain instances, it seems building the phantomjs server the path\nto the binary is not always correct and seems to default to /usr/local/bin.\nSetting the value exclusively should resolve this.\n" }, { "from": "human", ...
javascript
chosen
[ { "from": "system", "value": "Fix message catching the field for which a duplicate key error ocurred\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Get unique error field name\n */\nvar getUniqueErrorMessage = function(err) {\n\tvar output;\n\n\ttry {\n\t\tvar fieldName = err.err.su...
javascript
chosen
[ { "from": "system", "value": "Enable beta and canary channels.\n" }, { "from": "human", "value": "/*jshint node:true*/\nmodule.exports = {\n useVersionCompatibility: true,\n scenarios: [\n {\n name: 'ember-beta',\n command: 'echo DISABLED'\n },\n {\n name: 'ember-canary...
javascript
chosen
[ { "from": "system", "value": "Change categories.controller to original tutorial code\n" }, { "from": "human", "value": "import template from './categories.html';\nimport controller from './categories.controller';\nimport './categories.styl';\n\n// use ES6 shorthand syntax for object initializers...
javascript
chosen
[ { "from": "system", "value": "Add a few more modules to ignore\n" }, { "from": "human", "value": "'use strict'\n\nvar isPresent = require('is-present')\nvar githubRepos = require('github-repositories')\nvar Promise = require('pinkie-promise')\n\nvar reposToIgnore = [\n 'tachyons',\n 'tachyons-...
javascript
chosen
[ { "from": "system", "value": "Allow the event sink host to be configured\n" }, { "from": "human", "value": "'use strict'\n\nconst ndjson = require('ndjson'),\n request = require('request'),\n zlib = require('zlib')\n\nmodule.exports = (readableObjectStream, eventWriteKey) => {\n\n con...
javascript
chosen
[ { "from": "system", "value": "Fix result logging of shell plugin\n" }, { "from": "human", "value": "var exec = require('./exec').exec\nvar chalk = require('chalk')\n\nmodule.exports = function WebpackShellPlugin (options) {\n return {\n apply: function (compiler) {\n compiler.plugin('af...
javascript
chosen
[ { "from": "system", "value": "Move up to dirname regardless of glob characters\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\nvar isglob = require('is-glob');\n\nmodule.exports = function globParent(str) {\n\twhile (isglob(str)) str = path.dirname(str);\n\tretur...
javascript
chosen
[ { "from": "system", "value": "Add wildcard GET request to avoid 404 error when going to directly to a page or refreshing on a page.\n" }, { "from": "human", "value": "import compression from 'compression';\nimport express from 'express';\nimport fs from 'fs';\n\nconst app = express();\nconst por...
javascript
chosen
[ { "from": "system", "value": "Create cache objects without prototype\n\nThis will fix getting and setting `constructor` key." }, { "from": "human", "value": "module.exports = function (max) {\n var size = 0, cache = {}, _cache = {}\n\n function update (key, value) {\n cache[key] = value\n ...
javascript
chosen
[ { "from": "system", "value": "Support functions who returning promises\n" }, { "from": "human", "value": "'use strict';\n\nvar co = require('co');\n\nmodule.exports = co;\nmodule.exports.series = function(arr) {\n return co(function* () {\n var result = [];\n for (let promise of...
javascript
chosen
[ { "from": "system", "value": "Fix mistake - exec needs to be a single string\n" }, { "from": "human", "value": "/*!\n * to-clipboard <https://github.com/jonschlinkert/to-clipboard>\n *\n * Copyright (c) 2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nvar cp = r...
javascript
chosen
[ { "from": "system", "value": "Remove the default maximum parsing limit of 1,000 keys\n" }, { "from": "human", "value": "var querystring = require(\"querystring\");\nvar list = /L_([A-Za-z]+)(\\d+)/;\n\nmodule.exports = function(input) {\n var data;\n var output = {};\n\n if (typeof input === ...
javascript
chosen
[ { "from": "system", "value": "Sort periodic and parameterized job detail pages by most recently submitted\n" }, { "from": "human", "value": "import Route from '@ember/routing/route';\nimport { collect } from '@ember/object/computed';\nimport { watchRecord, watchRelationship, watchAll } from 'nom...
javascript
chosen
[ { "from": "system", "value": "Add started flag and move resolve into event :art:\n" }, { "from": "human", "value": "const nodemon = require(\"nodemon\")\n\nvar server\n\nmodule.exports = function () {\n this.nodemon = function (opts) {\n return new Promise((resolve, reject) => {\n if (!...
javascript
chosen
[ { "from": "system", "value": "Fix so it works in grunt etc\n" }, { "from": "human", "value": "/**\n * Properties to prefix.\n */\nvar props = [\n\t\"hyphens\",\n\t\"line-break\",\n\t\"text-align-last\",\n\t\"text-emphasis\",\n\t\"text-emphasis-color\",\n\t\"text-emphasis-style\",\n\t\"word-break...
javascript
chosen
[ { "from": "system", "value": "Use split+join instead of ES2018 feature(look behind)\n\nhttps://github.com/tc39/proposal-regexp-lookbehind\nThis feature is not supported in many environment (ex. Node.js 8.9.x, Safari etc).\n" }, { "from": "human", "value": "// @flow\n\nimport type {\n DocumentPa...
javascript
chosen
[ { "from": "system", "value": "Add autohide to cols-config messages\n" }, { "from": "human", "value": "/**\n * @module ember-flexberry\n */\n\nimport Ember from 'ember';\nimport ColsconfigDialogController from '../mixins/colsconfig-dialog-controller';\nimport { translationMacro as t } from 'ember...
javascript
chosen
[ { "from": "system", "value": "Remove redundant 'slides' var from test\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n describe(\"<%= pluginFullName %>\", function() {\n\n var slides, deck,\n\n createDeck = function() {\n slides = [];\n\n var parent = ...
javascript
chosen
[ { "from": "system", "value": "Fix store not updating, because incorrect event string\n\nThis was hard to track down :<\n" }, { "from": "human", "value": "import _ from 'underscore';\nimport BaseStore from 'stores/BaseStore';\nimport Dispatcher from 'dispatchers/Dispatcher';\nimport Store from 's...
javascript
chosen
[ { "from": "system", "value": "Fix key warning of snackbar elements\n" }, { "from": "human", "value": "import React from 'react';\nimport SnackbarItem from './SnackbarItem';\nimport './Snackbar.css';\nimport { useSnackbarContext } from '../../utils/SnackbarProvider';\n\nconst SnackbarContainer = ...
javascript
chosen
[ { "from": "system", "value": "Update spec to no longer expect label text on intervention plot bands\n" }, { "from": "human", "value": "describe(\"InterventionPlotBand\", function() {\n\n describe(\".toHighChartsDate\", function() {\n describe(\"good input\", function() {\n it(\"returns ...
javascript
chosen
[ { "from": "system", "value": "Remove main abstract from metadata.\n" }, { "from": "human", "value": "/**\n * This is an artificial model that takes all sorts of abstracts from the document model\n * so that they can be represented as individual cards\n */\nexport default class AbstractsSectionMo...
javascript
chosen
[ { "from": "system", "value": "Clean up history model: ES6, DRY, simpler schema.\n" }, { "from": "human", "value": "var mongoose = require(\"mongoose\");\nvar historySchema = new mongoose.Schema(\n {\n collectionName: {type: String},\n collectionId: {type: mongoose.Schema.Types.O...
javascript
chosen
[ { "from": "system", "value": "Load the group when we load the store page\n" }, { "from": "human", "value": "import angular from \"angular\";\nimport uiRouter from \"angular-ui-router\";\nimport storeDetailComponent from \"./storeDetail.component\";\n\nlet storeDetailModule = angular.module(\"sto...
javascript
chosen
[ { "from": "system", "value": "Improve response validation error handling\n" }, { "from": "human", "value": "'use strict'\n\nconst { throwError } = require('../../errors')\n\n// Check output, for the errors that should not happen,\n// i.e. server-side (e.g. 500)\n// In short: response should be a...
javascript
chosen
[ { "from": "system", "value": "Add log messages about database seeding progress\n" }, { "from": "human", "value": "var seeds = require('./features.json');\nvar Feature = require('./feature');\n\nmodule.exports = function (callback) {\n // Drop the features collection.\n Feature.remove(function ...
javascript
chosen
[ { "from": "system", "value": "Define an error object if it is undefined to prevent errors on failed requests.\n" }, { "from": "human", "value": "/*\n * Internal module that is used by the default client, http client, and\n * the session fetching apparatus. Made as a separate module to avoid\n * ...
javascript
chosen
[ { "from": "system", "value": "Remove imports where not used.\n" }, { "from": "human", "value": "import React from 'react'\nimport sinon from 'sinon'\nimport { expect } from 'chai'\nimport { shallow, mount, render } from 'enzyme'\nimport ColorSchemer from './ColorSchemer.jsx'\n\ndescribe('ColorSc...
javascript
chosen
[ { "from": "system", "value": "Add sharingSettings to the modules datastore.\n" }, { "from": "human", "value": "/**\n * `core/modules` data store\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use thi...
javascript
chosen
[ { "from": "system", "value": "Add word addition on synonymize call\n" }, { "from": "human", "value": "'use strict'\n\nconst Logger = use('Logger');\n\nconst SynonymService = use('App/Services/SynonymService');\n\nclass SynonymController {\n async synonymize({request}) {\n let synonymService ...
javascript
chosen
[ { "from": "system", "value": "Add french as default language\n" }, { "from": "human", "value": "migrate(function () {\n\n // TODO Grep language from existing scenarios\n\n db.scenarii.createIndex(\n {\n \"info.name\": \"text\",\n \"comment\": \"text\",\n \"steps.info.name\": ...
javascript
chosen
[ { "from": "system", "value": "Add a default template attribute\n" }, { "from": "human", "value": "'use strict';\r\n\r\n/*!\r\n * angular-bootstrap-grid-list-toggle\r\n * https://github.com/seblucas/angular-bootstrap-grid-list-toggle\r\n * Copyright (c) 2015 ; Licensed MIT\r\n */\r\nangular.modul...
javascript
chosen
[ { "from": "system", "value": "Abort locale switcher set up if the local switcher is not present\n\nIf attachments references are not allowed the select is not rendered and trying to add an event listener to it was causing an error. This was causing the GovSpeak preview to break as well.\n" }, { "fro...
javascript
chosen
[ { "from": "system", "value": "Add cancel function to the object returned by createMockTask\n" }, { "from": "human", "value": "import { TASK } from '@redux-saga/symbols'\n\nexport const cloneableGenerator = generatorFunc => (...args) => {\n const history = []\n const gen = generatorFunc(...args...
javascript
chosen
[ { "from": "system", "value": "Revert \"fixed deleting repositories doenst always work\"\n\nThis reverts commit 81be538dfc24b1088959c9ae4e6d7aad31667897.\n\nThe loop was ignored. See PR #54\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @ngdoc function\n * @name docker-registry-front...
javascript
chosen
[ { "from": "system", "value": "Use innerHTML to be firefox compatible\n" }, { "from": "human", "value": "// window on load\nwindow.onload = function () {\n\n // get run code button\n document.getElementById(\"run-code\").addEventListener(\"click\", function () {\n // evaluate the cod...
javascript
chosen
[ { "from": "system", "value": "Sort entities by depth before display\n\n" }, { "from": "human", "value": "define([], function () {\n 'use strict';\n\n var GameRenderer = function (canvas, entities) {\n this.canvas = canvas;\n this.entities = entities;\n this.gc = this.canvas.getContext...
javascript
chosen
[ { "from": "system", "value": "Add case_sharing to saved_app view so that the case sharing warning will work\n" }, { "from": "human", "value": "function(doc){\n if((doc.doc_type == 'Application' || doc.doc_type == 'RemoteApp') && doc.copy_of != null) {\n emit([doc.domain, doc.copy_of, d...
javascript
chosen
[ { "from": "system", "value": "[default-login] Fix bug where logout would use incorrect URL\n" }, { "from": "human", "value": "import client from 'part:@sanity/base/client'\n\nexport default {\n getProviders: () => client.request({\n uri: '/auth/providers',\n withCredentials: true\n }).th...
javascript
chosen
[ { "from": "system", "value": "Enable users management in SQU mode (SAAS-787)\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('ncsaas')\n .constant('MODE', {\n modeName: 'modeSquStudentCloud',\n toBeFeatures: [\n 'monitoring',\n 'backups',\n 'password',\n ...
javascript
chosen
[ { "from": "system", "value": "[GeneratorBundle] Fix webpack output path for admin-bundle-extra js\n" }, { "from": "human", "value": "import defaultConfig from './webpack.config.default';\n\nexport default function webpackConfigAdminExtra(speedupLocalDevelopment, optimize = false) {\n const co...
javascript
chosen
[ { "from": "system", "value": "Make non-browserfiable interested in non-javascript resources.\n" }, { "from": "human", "value": "\n\nvar allJavascript = /\\.js$/;\nvar json = /package\\.json$/;\nvar coffeeOrJs = /\\.(?:js)|(?:coffee)$/;\nvar nonModule = /scripts/;\nvar minified = /-min\\.js$/;\nv...
javascript
chosen
[ { "from": "system", "value": "Fix JSON encoding of empty field\n" }, { "from": "human", "value": "function submit_item_form(controls, url) {\n var data = { };\n for(var i=0; i<controls.length; ++i) {\n var control = controls[i];\n var element = $(\"#\"+control);\n\n va...
javascript
chosen
[ { "from": "system", "value": "Remove text-muted to maintain color contrast ratio\n" }, { "from": "human", "value": "import React from \"react\";\nimport * as styles from \"./footer.scss\";\n\nconst Footer = () => {\n \"use strict\";\n return (\n <footer className={styles.footer} >\n <d...
javascript
chosen
[ { "from": "system", "value": "Use regex to match query URL\n" }, { "from": "human", "value": "'use strict';\n\nconst express = require('express');\nconst trackRouter = express.Router();\nconst controller = require('./trackController');\nconst payload = require('../middleware/payload');\nconst sq...
javascript
chosen
[ { "from": "system", "value": "Update a flow definition to accept a string|null\n" }, { "from": "human", "value": "// @flow\nimport React from 'react'\nimport classNames from 'classnames'\n\ntype Props = {\n isAuthenticationView: boolean,\n isDiscoverView: boolean,\n isNavbarHidden: boolean,\n...
javascript
chosen
[ { "from": "system", "value": "Update script to use the Slack RTM client\n" }, { "from": "human", "value": "// Description:\n// Uses the Slack Real Time Messaging API to file GitHub issues\n//\n// Configuration:\n// HUBOT_SLACK_GITHUB_ISSUES_CONFIG_PATH\n\n'use strict';\n\nvar Config = requir...
javascript
chosen
[ { "from": "system", "value": "UI: Convert users page to LightComponent\n" }, { "from": "human", "value": "\nimport React from \"react\";\nimport { AppMenu } from \"ui-components/app_menu\";\nimport Component from \"ui-lib/component\";\n\nclass Page extends Component {\n constructor(props) {\n...
javascript
chosen
[ { "from": "system", "value": "Add comment referencing Django CSRF docs.\n" }, { "from": "human", "value": "/*\n * Internal module that is used by the default client, http client, and\n * the session fetching apparatus. Made as a separate module to avoid\n * circular dependencies and repeated cod...
javascript
chosen
[ { "from": "system", "value": "Add return of updated cursor in SwapProps\n" }, { "from": "human", "value": "module.exports = {\n swapProps: function (obj) {\n this.props.cursor.update(function (state) {\n return state.mergeDeep(obj);\n });\n }\n};\n" }, { "from": "gpt", "...
javascript
chosen
[ { "from": "system", "value": "Fix for Google Analytics event tracking\n" }, { "from": "human", "value": "var _ = require('underscore');\n\n/**\n * Track an event to analytics providers (e.g. Google Analytics, Mixpanel).\n *\n * @param {string} event_category Typically the object interacted with,...
javascript
chosen
[ { "from": "system", "value": "Update literal definitions wiht KINDS constant\n" }, { "from": "human", "value": "'use strict';\n\nconst pagination = require('./pagination');\nconst buildResponseCollectionMeta = require('./response-collection-meta');\nconst publicationState = require('./publicatio...
javascript
chosen
[ { "from": "system", "value": "Disable old URL for /room\n" }, { "from": "human", "value": "/* jslint node: true, browser: true */\n/* global angular: true */\n\n'use strict';\n\n// Declare app level module which depends on views, and components\nvar olyMod = angular.module('mcWebRTC', [\n 'ngRo...
javascript
chosen
[ { "from": "system", "value": "Change port back to 8000\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @ngdoc service\n * @name openSenseMapApp.OpenSenseBoxAPI\n * @description Defines the settings for the OpenSenseBox API such as the URL\n * # OpenSenseBox\n * Factory in the openSen...
javascript
chosen
[ { "from": "system", "value": "Clean some code about assessmentRepository\n" }, { "from": "human", "value": "const Boom = require('boom');\nconst Assessment = require('../../domain/models/data/assessment');\nconst assessmentSerializer = require('../../infrastructure/serializers/assessment-seriali...
javascript
chosen
[ { "from": "system", "value": "Raise parse query limit to 200 in order to get all Places and limit fuse search results count to 10\n" }, { "from": "human", "value": "require('cloud/app.js');\nvar Fuse = require('cloud/fuse.min.js');\n\n/*\n * Provides Cloud Functions for Rice Maps.\n */\nParse.Cl...
javascript
chosen
[ { "from": "system", "value": "Add lock icon to notification link\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport Text from 'react/components/UI/Text';\nimport Truncate from 'react/components/UI/Truncate';\n\nconst NotificationObjectLin...
javascript
chosen
[ { "from": "system", "value": "Test that non-daemon containers get removed after they finish executing\n" }, { "from": "human", "value": "var commands = require('../lib/commands'),\n expect = require('chai').expect\n\ndescribe('starting a simple container', function() {\n var container = ...
javascript
chosen
[ { "from": "system", "value": "Check if a twitch user exists\n" }, { "from": "human", "value": "// Conditionally show description field if the type is a new one.\n\nvar select = document.getElementById('existing-type');\nvar input = document.getElementById(\"bottype\");\nvar description = documen...
javascript
chosen
[ { "from": "system", "value": "Change method name to be more explicit\n" }, { "from": "human", "value": "$(function() {\n var $tabs = $('#search-results-tabs'),\n $searchForm = $('.js-search-hash');\n\n if($tabs.length > 0){\n $tabs.tabs({ 'defaultTab' : getDefaultSearchTab(), scrollOnl...
javascript
chosen