conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove undefined default parameter value\n"
},
{
"from": "human",
"value": "export const loadJSON = (url, postData = undefined) => new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open(postData ? 'post' : 'get', url, true);\n xhr.respo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove @ in front of 'You'.\n"
},
{
"from": "human",
"value": "const qs = require('qs');\n\nmodule.exports.handler = (event, context, callback) => {\n /** Immediate response for WarmUP plugin */\n if (event.source === 'serverless-plugin-warmup') {\n console.log... | javascript | chosen |
[
{
"from": "system",
"value": "Set subcomponent display names for proper documentation\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport OverviewPageBody from './OverviewPageBody';\nimport OverviewPageHeader from './Overv... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor unit test to use `sinon.test` for automatic cleanup\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar auth = require('./auth.json');\nvar sinon = require('sinon');\nvar expect = require('chai').expect;\nvar should = require('chai').should();\nvar requ... | javascript | chosen |
[
{
"from": "system",
"value": "Support responseOk for custom errors\n"
},
{
"from": "human",
"value": "export function responseOk(response) {\n if(response.status >= 200 && response.status < 300) {\n return response\n } else {\n throw new Error(response.statusText)\n }\n}\n\nexport funct... | javascript | chosen |
[
{
"from": "system",
"value": "Use fieldsets rather than divs\n"
},
{
"from": "human",
"value": "const tag = require('forms/lib/tag');\n\nconst MULTIPLE_FIELD_TYPES = ['multipleCheckbox', 'multipleRadio'];\n\nfunction isMultipleField(type) {\n return MULTIPLE_FIELD_TYPES.includes(type);\n}\n\nmo... | javascript | chosen |
[
{
"from": "system",
"value": "Delete function 'evalNewPipe' not used anymore\n"
},
{
"from": "human",
"value": "import {\n BRICK,\n MAIN_BRICK,\n PRIMITIVE,\n SELECTABLE_PIPE\n} from '../../utils/componentNames'\n\nimport {\n elementInputValueIds,\n evalBrick\n} from '../../utils/evalUtils... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused argument and increase patch size limit\n"
},
{
"from": "human",
"value": "export const MAX_PATCH_CHARS = 10240;\n\nexport function filter(original, fileSet) {\n let accumulating = false;\n let accumulated = '';\n let includedChars = 0;\n\n let inde... | javascript | chosen |
[
{
"from": "system",
"value": "Fix initializer deprecation warning for >= ember 2.1.0\n"
},
{
"from": "human",
"value": "import ActiveModelAdapter from \"active-model-adapter\";\nimport ActiveModelSerializer from \"active-model-adapter/active-model-serializer\";\n\nexport default {\n name: 'acti... | javascript | chosen |
[
{
"from": "system",
"value": "Use base is-nan and is-integer modules\n"
},
{
"from": "human",
"value": "'use strict';\n\n// MODULES //\n\nvar gamma = require( '@stdlib/math/base/special/gamma' );\nvar PINF = require( '@stdlib/math/constants/float64-pinf' );\nvar FACTORIALS = require( './factoria... | javascript | chosen |
[
{
"from": "system",
"value": "Change listen port due to conflicts \n\n"
},
{
"from": "human",
"value": "// see http://vuejs-templates.github.io/webpack for documentation.\nvar path = require('path')\n\nmodule.exports = {\n build: {\n env: require('./prod.env'),\n index: path.resolve(__dir... | javascript | chosen |
[
{
"from": "system",
"value": "Whitelist params returned from isMobile\n\nFixes bugs where the environment leaks through isMobile.\n"
},
{
"from": "human",
"value": "import Service from 'ember-service';\nimport get from 'ember-metal/get';\nimport set from 'ember-metal/set';\nimport computed from ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with MessageBox causing a Buffer is not defined on client.\n\n"
},
{
"from": "human",
"value": "/* eslint-disable import/no-unresolved */\nimport SimpleSchema from 'simpl-schema';\nimport MessageBox from 'message-box';\n\n\nMessageBox.defaults({\n messa... | javascript | chosen |
[
{
"from": "system",
"value": "Update WIND to new loader format"
},
{
"from": "human",
"value": "define(['mac/roman'], function(macintoshRoman) {\n\n 'use strict';\n \n return function(resource) {\n var dataDV = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byte... | javascript | chosen |
[
{
"from": "system",
"value": "[Unittests] Remove an incorrectly copy/pasted line\n"
},
{
"from": "human",
"value": "scene = new Athena.Entities.Scene('test');\n\nentity1 = scene.create(\"Entity1\");\n\nCHECK_EQUAL(0, entity1.nbChildren);\n\nentity2 = scene.create(\"Entity2\");\n\nCHECK(entity2.p... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to check length of domains array matches num_domains\n"
},
{
"from": "human",
"value": "var xenstat = require('../build/Release/xenstat.node');\n\nmodule.exports = {\n 'Collect asynchronous': function(test) {\n xenstat.collect(function(err, stats) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove more unneeded DI in mFA\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nangular.module('arethusa.morph').directive('morphFormAttributes', [\n 'morph',\n '$document',\n function(morph, $document) {\n return {\n restrict: 'A',\n scope: {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use more natural constructor call\n"
},
{
"from": "human",
"value": "// volontary written in ES5, so that it works with Node 4.x\nvar path = require('path');\nvar webpack = require('webpack');\nvar ProgressBarPlugin = require('progress-bar-webpack-plugin');\nvar bui... | javascript | chosen |
[
{
"from": "system",
"value": "Substitute console logs with proper asserts\n"
},
{
"from": "human",
"value": "/* jshint mocha: true */\n'use strict';\n\nconst assert = require('assert');\nconst jenkins = require('../lib/jenkins');\n\ndescribe('jenkins', function() {\n describe('getComputers()', ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove use of prototype extension\n\nThis makes the component compatible with newer versions of Ember.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport Remarkable from 'remarkable';\nimport hljs from 'hljs';\n\nexport default Ember.Component.ext... | javascript | chosen |
[
{
"from": "system",
"value": "Update: Create the fixture directory for tests\n"
},
{
"from": "human",
"value": "const emptyDir = require('../');\nconst expect = require('chai').expect;\n\ndescribe('emptyDir', function () {\n it('should call back with true if a directory is empty', function (don... | javascript | chosen |
[
{
"from": "system",
"value": "Include architecture in data posted to Atom.io with crashes\n"
},
{
"from": "human",
"value": "module.exports = function(params) {\n const { crashReporter } = require('electron');\n const platformRelease = require('os').release();\n const { uploadToServer } = par... | javascript | chosen |
[
{
"from": "system",
"value": "Remove requireIf and always load dependent modules\n\ngit-svn-id: ee6e786acc44c9cca5ee17c71a5576c45c210361@25200 560b804f-0ae3-0310-86f3-f6aa0a117693\n"
},
{
"from": "human",
"value": "define(\"dojox/data/JsonQueryRestStore\", [\"dojo\", \"dojox\", \"dojox/data/Json... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the issue when reseting the form on successful calls\n"
},
{
"from": "human",
"value": "// Execute JavaScript on page load\n$(function () {\n $(\"#userNumber, #salesNumber\").intlTelInput({\n responsiveDropdown: true,\n autoFormat: true\n })... | javascript | chosen |
[
{
"from": "system",
"value": "Add author support to the markdown wrapper\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport 'css/markdown-styles.css'\nimport Helmet from 'react-helmet'\nimport { config } from 'config'\n\nmodule.exports = React.createClass({\n propTypes () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test case for line continuation\n"
},
{
"from": "human",
"value": "var UglifyJS = require('../../');\nvar assert = require(\"assert\");\n\ndescribe(\"String literals\", function() {\n it(\"Should throw syntax error if a string literal contains a newline\", fu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reference to oldAncestors in labelSelector\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nangular.module('arethusa.relation').directive('labelSelector', [\n 'relation',\n '$timeout',\n function(relation, $timeout) {\n return {\n restrict: 'A',\... | javascript | chosen |
[
{
"from": "system",
"value": "Copy role doesn't work, need to manually copy the link target\n"
},
{
"from": "human",
"value": "const remote = require('electron').remote;\nconst Menu = remote.Menu;\nconst MenuItem = remote.MenuItem;\n\nmodule.exports = {\n build: function(target) {\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Delete button issue now fixed\n\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { Button, Popup, Input, Heading, Divider } from 'semantic-ui-react';\nexport default class DayEditBox extends React.Component {\n\n render(){\n var myId... | javascript | chosen |
[
{
"from": "system",
"value": "Fix redirect for new canvas (must not include model)\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n teamQuery: Ember.inject.service(),\n\n model({ domain }) {\n return this.get('teamQuery').findByDomain(do... | javascript | chosen |
[
{
"from": "system",
"value": "Test the order of cars is by model as selected by the orderProp default.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* jasmine specs for controllers go here */\ndescribe('Real Racing Telemetry Client controllers', function() {\n\n describe('carController',... | javascript | chosen |
[
{
"from": "system",
"value": "Fix can_access allowing admin all possible boards\n"
},
{
"from": "human",
"value": "var authcommon = require('../authcommon'),\n common = require('../common'),\n config = require('../config'),\n db = require('../db');\n\nexports.can_access = function (iden... | javascript | chosen |
[
{
"from": "system",
"value": "Update the template on preset wording"
},
{
"from": "human",
"value": "var sagui = require('sagui')\n\nmodule.exports = sagui().webpack({\n sagui: {\n /**\n * Different application entry-points\n * Each page is a combination of a JavaScript file and a HT... | javascript | chosen |
[
{
"from": "system",
"value": "Complete deployment script (for GitHub Release)\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst {\n env: {\n GITHUB_RELEASE_OAUTH,\n GIT_REPO_TAG,\n GIT_REPO_OWNER,\n GIT_REPO_NAME\n },\n stdout,\n stderr,\n exit\n} = require('process')\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix param sent to the API\n\nSigned-off-by: soupette <0a59f0508aa203bc732745954131d022d9f538a9@gmail.com>\n"
},
{
"from": "human",
"value": "import { isEmpty, pickBy, transform } from 'lodash';\nimport request from './request';\n\nconst findMatchingPermissions = (us... | javascript | chosen |
[
{
"from": "system",
"value": "Use this._configModel instead of opts.collection.configModel in icon-collection\n"
},
{
"from": "human",
"value": "const Backbone = require('backbone');\nconst IconModel = require('./organization-icon-model');\nconst checkAndBuildOpts = require('builder/helpers/requ... | javascript | chosen |
[
{
"from": "system",
"value": "Use same styling for \"Run\" button as is used by buttons in Sphinx."
},
{
"from": "human",
"value": "/*global jQuery, document */\n/*jslint nomen: true, unparam: true, bitwise: true*/\n\n(function ($) {\n \"use strict\";\n\n var run, register_click_event;\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove comments for ignoring eslint\n"
},
{
"from": "human",
"value": "const { pick } = require('lodash')\nconst { authorisedRequest } = require('../../lib/authorised-request')\nconst config = require('../../config')\n\nfunction fetchRawCompanyListItems(token, id) {... | javascript | chosen |
[
{
"from": "system",
"value": "refactor(match): Change for loop to Array.find\n"
},
{
"from": "human",
"value": "import resolveNode from \"./resolveNode\";\n// import {resolve} from \"path\";\n\nexport default function (filename, regexps, root, extensions) {\n\tfor(let redirectPair of regexps) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Change so that users are redirected to new landing page\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport Utility from '../../shared/util/Utility';\nimport * as Security from '../../shared/reducers/Security';\nimport * as Lessons from '../../sh... | javascript | chosen |
[
{
"from": "system",
"value": "Fix popstate issue in Safari\n"
},
{
"from": "human",
"value": "import { replace } from './actions'\nimport { NAVIGATE } from './constants'\n\nexport default class History {\n constructor (store) {\n this.store = store\n }\n\n listen () {\n window.addEventL... | javascript | chosen |
[
{
"from": "system",
"value": "Use console.log() instead of util.puts()\n\nSince NodeJS v0.11.3, util.puts becomes deprecated API.\n"
},
{
"from": "human",
"value": "var sys = require('util');\nvar XMLHttpRequest = require(\"xmlhttprequest\").XMLHttpRequest;\n\nvar xhr = new XMLHttpRequest();\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Improve logging of errors in renderer\n"
},
{
"from": "human",
"value": "window.onerror = function (message, source, lineno, colno, error) {\n logError(error);\n};\n"
},
{
"from": "gpt",
"value": "window.onerror = function (message, source, lineno, coln... | javascript | chosen |
[
{
"from": "system",
"value": "Clear form on form request.\n"
},
{
"from": "human",
"value": "import * as types from './constants';\n\nexport function form(config) {\n const initialState = {\n id: '',\n isActive: false,\n lastUpdated: 0,\n form: {},\n url: '',\n error: '',\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Fix crash when no data option is passed\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst fs = require('fs-extra')\nconst dataDir = require('data-dir')\nconst logger = require('./logger')\n\n/**\n * Get json form given directory or file. Return ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Refactored ApplicationController to use native class\"\n\nThis reverts commit a7912c49c31cf2031f543eaa0995dd68d93b4453.\n\n- there is an issue with properties not being tracked correctly and the menu not being shown when returning from the editor\n- reverting to workin... | javascript | chosen |
[
{
"from": "system",
"value": "Add ignore warnings for setting a timer\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport React from 'react';\nimport { AppRegistry } from 'react-native';\nimport { Provider } from 'react-redux';\nimpor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix cancel session invite so that it doesn't require admin rights\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n function cancelSessionInviteCtrl($scope, $state, $stateParams, currentUser, $translate, alertService, usSpinnerService, cdEvents... | javascript | chosen |
[
{
"from": "system",
"value": "Mixins/Clonable: Create a deep clone of block data when cloning\n"
},
{
"from": "human",
"value": "(function() {\n var SirTrevor = window.SirTrevor;\n var BlockMixins = SirTrevor.BlockMixins;\n var Block = SirTrevor.Block;\n Block.prototype.availableMixi... | javascript | chosen |
[
{
"from": "system",
"value": "Complete assignment tests to pass\n"
},
{
"from": "human",
"value": "\nmodule(\"About Assignment (topics/about_assignment.js)\");\n\ntest(\"local variables\", function() {\n var temp = __;\n equal(temp, 1, \"Assign a value to the variable temp\");\n});\n\ntest... | javascript | chosen |
[
{
"from": "system",
"value": "Fix obvious bug in `getTopMostElementParent`\n"
},
{
"from": "human",
"value": "export default function getElementOverride (element, overrides) {\n const parentNode = getTopMostElementParent(element)\n\n for (let override in overrides) {\n if (overrides.hasOwnP... | javascript | chosen |
[
{
"from": "system",
"value": "Remove hardcoded sauce connect port\n"
},
{
"from": "human",
"value": "import SauceConnectLauncher from 'sauce-connect-launcher'\n\nclass SauceLaunchService {\n /**\n * modify config and launch sauce connect\n */\n onPrepare (config) {\n if (!co... | javascript | chosen |
[
{
"from": "system",
"value": "Add null-safe property access in helper function\n\nRelated to #152\n"
},
{
"from": "human",
"value": "export const compose = (...fns) => (...args) => {\n fns.forEach(fn => fn && fn(...args));\n};\n\nexport const pick = (obj, ...props) => {\n return props.reduce((... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecesary logs from order function\n"
},
{
"from": "human",
"value": "/* global console, Calendar, vis */\n\n(function() {\n \"use strict\";\n\n var calendar = new Calendar();\n calendar.init(document.getElementById('visualization'),\n {\n h... | javascript | chosen |
[
{
"from": "system",
"value": "chore: Add TODO to intercept calls to get credentials for integration tests\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n clientOptions: {\n apiKey: process.env.DS_NORTHSTAR_API_KEY,\n baseURI: process.env.DS_NORTHSTAR_API_BASEURI,\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug, appering only in Firefox (Date.parse(\"xx-xx-xxxx xx:xx\"))\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n var factoriesModul;\n try {\n factoriesModul = angular.module('dcc.factories');\n } catch (e) {\n fac... | javascript | chosen |
[
{
"from": "system",
"value": "Return new object instead of modifying input objects\n"
},
{
"from": "human",
"value": "require('../app').directive('previewPictures', /* @ngInject */function () {\n return {\n restrict: 'EA',\n templateUrl: '/views/directives/previewpictures.html',\n scop... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Fix SW watching for SW changes\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst config = require('config');\nconst sw = require('../lib/tasks/sw');\nconst task = require('../lib/helpers/task');\nconst sync = require('browser-sync');\n\nmodule.exports ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra '})' from javscript.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Router from 'react-router';\nimport routes from './routes';\n// import SettingsActions from '../../actions/settings';\n// ... | javascript | chosen |
[
{
"from": "system",
"value": "9958: Stop preserving search query between missions\n"
},
{
"from": "human",
"value": "// ELMO.Views.MissionChangeDropdown\n(function(ns, klass) {\n\n // constructor\n ns.MissionChangeDropdown = klass = function(params) {\n $(params.el).on('change', function(e)... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Remove unnecessary lock logging\"\n\nThis reverts commit ffce61611933786a9f01d01925fc154f6a7f1ecd.\n"
},
{
"from": "human",
"value": "var locks = require('locks');\n\n//Map lock only used to create new partitionLocks entries\nvar mapLock = locks.createMutex... | javascript | chosen |
[
{
"from": "system",
"value": "Move short option tests into top level tests\n"
},
{
"from": "human",
"value": "var child = require('child_process');\nvar http = require('http');\nvar test = require('tape');\nvar fs = require('fs');\nvar path = require('path');\nvar url = require('url');\n\ntest('... | javascript | chosen |
[
{
"from": "system",
"value": "Store created assert and reuse.\nThis makes it clearer when asserts need to be created and is more efficient.\n"
},
{
"from": "human",
"value": "define('parsley/factory/constraint', [\n 'parsley/utils'\n], function (ParsleyUtils) {\n var ConstraintFactory = functi... | javascript | chosen |
[
{
"from": "system",
"value": "Send valid json message back when used is unauthorized\n"
},
{
"from": "human",
"value": "\nexports.ensureAuthenticated = function(req, res, next) {\n if (req.isAuthenticated()) {\n next();\n } else {\n res.sendStatus(401);\n }\n};\n"
},
{
"from": "... | javascript | chosen |
[
{
"from": "system",
"value": "Remove old JS code in the normalization report\n\nThis fixes a JS `Uncaught TypeError` error in the normalization report\ncaused by code that was used to setup dialogs for displaying job\ninformation but which were removed a few years ago.\n"
},
{
"from": "human",
"... | javascript | chosen |
[
{
"from": "system",
"value": "Use API from released version of react-router v4 STRIPES-173\n"
},
{
"from": "human",
"value": "function transitionToParams(params) {\n const location = this.props.location;\n const allParams = Object.assign({}, location.query, params);\n const keys = Object.keys... | javascript | chosen |
[
{
"from": "system",
"value": "Test Graph: Adds test to check for neighbours\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\nconst Graph = require('../../src').DataStructures.Graph;\nconst assert = require('assert');\n\ndescribe('Graph', () => {\n it('should be empty when initialized'... | javascript | chosen |
[
{
"from": "system",
"value": "Remove zip+4 mention, it's not working great in google civic.\n"
},
{
"from": "human",
"value": "const html = require('choo/html');\nconst find = require('lodash/find');\n\nmodule.exports = (state, prev, send) => {\n function enterLocation(e) {\n e.preventDefaul... | javascript | chosen |
[
{
"from": "system",
"value": "Use ignorePattern to not gzip index.json\n\nThis option wasn't originally available which is why filePattern needed\nto be overridden.\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n\nmodule.exports = function(deployTarget) {\n const API_VERSION = 'v1.12... | javascript | chosen |
[
{
"from": "system",
"value": "Expand tests to prove Request.then returns a promise\n"
},
{
"from": "human",
"value": "var expect = require(\"expect.js\");\nvar AWS = require('aws-sdk');\nvar AwsQ = require(\"../index.js\");\n\ndescribe('entry point',function(){\n\tit('should inject/hack \\'then\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove reference to images in Config file\n"
},
{
"from": "human",
"value": "var srcFolder = './src';\nvar distFolder = './dist';\nvar docsFolder = './docs';\nvar docsSrc = docsFolder + '/src';\nvar docsDist = docsFolder + '/dist';\n\nvar dirs = {\n srcJS: srcFolde... | javascript | chosen |
[
{
"from": "system",
"value": "Make electron executable path platform dependent\n"
},
{
"from": "human",
"value": "/**\n * Helper module for tests\n */\n\nconst path = require('path');\nexports.appPath = path.resolve(__dirname, '../');\nexports.electronPath = path.resolve(__dirname, '../node_modu... | javascript | chosen |
[
{
"from": "system",
"value": "Change application name in page title\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n angular.module('core')\n .directive('pageTitle', pageTitle);\n\n pageTitle.$inject = ['$rootScope', '$timeout', '$interpolate', '$state'];\n\n function... | javascript | chosen |
[
{
"from": "system",
"value": "Fix value of max. width ('neatMaxWidth') used by postcss-neat\n"
},
{
"from": "human",
"value": "module.exports = {\n plugins: [\n require('postcss-import'),\n require('postcss-css-reset'),\n require('postcss-custom-properties'),\n require('postcss-exte... | javascript | chosen |
[
{
"from": "system",
"value": "Fix unknown error for android/emulator.\n"
},
{
"from": "human",
"value": "define(function (require) {\n var app = {\n // Application Constructor\n initialize: function() {\n this.bindEvents();\n },\n // Bind Event Listeners\n //\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change default decimal place to 2\n"
},
{
"from": "human",
"value": "// @flow\nexport const roundToDecimalPlace = (number: number, place: number = 1): number =>\n Math.round(number * 10 * place) / (10 * place);\n"
},
{
"from": "gpt",
"value": "// @flow\... | javascript | chosen |
[
{
"from": "system",
"value": "Add chat name and message tests\n"
},
{
"from": "human",
"value": "module.exports = {\n 'Does Chat Exist' : function (browser) {\n browser\n .url(browser.launchUrl)\n .waitForElementVisible('body', 1000)\n .waitForElementVisible('iframe#drift-widg... | javascript | chosen |
[
{
"from": "system",
"value": "Remove route-related stuff from test-bb/env\n"
},
{
"from": "human",
"value": "/* jshint strict:false */\n/* global QUnit:false, Backbone:false, window:false */\n\n// Taken from Backbone 1.1.2 test suite\n\n(function() {\n\n var sync = Backbone.sync;\n var ajax = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add banner to Grunt banner\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n \n require('google-closure-compiler').grunt(grunt);\n \n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n concat: {\n options: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move private function to outside of exported scope\n"
},
{
"from": "human",
"value": "var winston = require('winston'),\n utils = require('../utils');\n\nmodule.exports = function(radio, command, logger) {\n logger = logger || winston;\n\n function boundVolume(... | javascript | chosen |
[
{
"from": "system",
"value": "Throw a custom error if a db backend cannot be loaded."
},
{
"from": "human",
"value": "var path = require('path');\n\nvar BACKENDS_PATH = __dirname;\n\nfunction getDatabaseBackend(name, options) {\n var module, databaseBackend;\n\n module = require(path.join(BACK... | javascript | chosen |
[
{
"from": "system",
"value": "Change callback into external function\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst fs = require('fs')\n\nconst { readFile } = require('./fs.utils')\nconst { log } = require('./log.utils')\n\nmodule.exports = exports = configFilename => {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Copy README.md to dist folder\n"
},
{
"from": "human",
"value": "var path = require(\"path\");\nvar webpack = require(\"webpack\");\nvar libraryName = 'lc-form-validation';\nvar CopyWebpackPlugin = require('copy-webpack-plugin');\n\nvar basePath = __dirname;\n\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Set the click behavior in preparation of loading artist/album content.\n\nSigned-off-by: Nick Campbell <e31591b49bf5c9127aafb098f2b9d466891b32f9@gmail.com>\n"
},
{
"from": "human",
"value": "$(document).ready(\n function(){\n\n // Local copy of jQuery selectors,... | javascript | chosen |
[
{
"from": "system",
"value": "Remove failing line for tests\n"
},
{
"from": "human",
"value": "onload = function() {\n var canvas = document.getElementById('canvas');\n var socket = io();\n\n socket.on('state', function(state) {\n // console.log('update state');\n });\n\n var game = new ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix one of the Linking code examples\n\nClose #1996\n"
},
{
"from": "human",
"value": "import { Linking, StyleSheet, Text } from 'react-native';\nimport React, { PureComponent } from 'react';\nimport Example from '../../shared/example';\n\nconst url = 'https://mathi... | javascript | chosen |
[
{
"from": "system",
"value": "Add parse param type test\n"
},
{
"from": "human",
"value": "/*!\n * wef.cssParser tests\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\nmodule(\"cssParser\");\ntest(\"namespace\", function() {\n notEqual(wef.cssParser , undefined, \"is wef.cssParser... | javascript | chosen |
[
{
"from": "system",
"value": "Use `Windows.ApplicationModel.Package.current.id.name` instead of `.ProductId` as we get \"permission denied\" error when trying to retrieve productId\nUnable to find any documentation on required permissions...\n"
},
{
"from": "human",
"value": "\"use strict\"\n\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Remove file loader from conf\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst MiniCssExtractPlugin = require('mini-css-extract-plugin')\nconst WebpackBundleTracker = require('webpack-bundle-tracker')\n\nmodule.exports = {\n mode: 'development'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a global variable leak\n\nRaise errors on the target instead of this to prevent the errors variable in raise from leaking into the global scope.\n\nCloses #1032.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nexports.NOT_IMPLEMENTED = function (target, na... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused path require from eslint config"
},
{
"from": "human",
"value": "var path = require('path');\n\nmodule.exports = {\n extends: [\n require.resolve('ember-cli-eslint/coding-standard/ember-application.js')\n ]\n};\n"
},
{
"from": "gpt",
"... | javascript | chosen |
[
{
"from": "system",
"value": "Use browser eslint inside src\n"
},
{
"from": "human",
"value": "module.exports = {\n root: true,\n env: {\n node: true,\n },\n extends: ['eslint:recommended', 'plugin:prettier/recommended'],\n parserOptions: {\n ecmaVersion: 2021,\n },\n plugins: ['pre... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment explaining weird reload.\n"
},
{
"from": "human",
"value": "require.config({\n paths: {\n text: 'lib/require-text',\n css: 'lib/require-css',\n\n jquery: 'lib/jquery',\n\n underscore: 'lib/underscore',\n 'underscore.crunch': 'lib/undersco... | javascript | chosen |
[
{
"from": "system",
"value": "Check number of not deleted course to display in categories mind map\n"
},
{
"from": "human",
"value": "var appRoot = require('app-root-path');\n//var mongoose = require('mongoose');\nvar Categories = require(appRoot + '/modules/catalogs/categories.js');\nvar Course... | javascript | chosen |
[
{
"from": "system",
"value": "Fix which atom to add subatoms to"
},
{
"from": "human",
"value": "define(['itemObjectModel', 'mac/roman'], function(itemOM, macRoman) {\n\n 'use strict';\n \n function open(item) {\n function onAtom(item, byteSource) {\n return byteSource.slice(0, 8).get... | javascript | chosen |
[
{
"from": "system",
"value": "Split string literals and string objects tests\n"
},
{
"from": "human",
"value": "var __ = 'Fill me in';\n\ndescribe('koan.js', function () {\n describe('Strings', function () {\n\n it('should create Strings', function () {\n expect('a String').toBe(__);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix safe handling of old buttons\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar botQueryHandler = require('./storage/replyQuery');\nvar tg = require('./telegram/telegramAPI');\nvar replyQuery = require('./storage/replyQuery');\nvar lfm = require('./lfmContro... | javascript | chosen |
[
{
"from": "system",
"value": "Implement sorting Listings in Descending order (most recent top of the page)\n"
},
{
"from": "human",
"value": "var db = require('../../db/db');\n\n//Controller method - retrieve joined listing/user/category fields from DB\nexports.getAll = function(category, callba... | javascript | chosen |
[
{
"from": "system",
"value": "Add inrange in vega proper\n"
},
{
"from": "human",
"value": "var expr = require('vega-expression'),\n args = ['datum', 'event', 'signals'];\n\nmodule.exports = expr.compiler(args, {\n idWhiteList: args,\n fieldVar: args[0],\n globalVar: args[2],\n funct... | javascript | chosen |
[
{
"from": "system",
"value": "Allow RPC client to accept string arguments.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar sys = require('sys');\n\nvar logger = require('../lib/logger');\nvar getConfig = require('./init').getConfig;\n\nvar cfg = getConfig();\n\nif (cfg.jsonrpc.pass... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.