conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix app specific JS for adminsysconfig.\n" }, { "from": "human", "value": "// --\n// Core.Agent.Admin.SysConfig.js - provides the special module functions for the AdminSysConfig\n// Copyright (C) 2001-2010 OTRS AG, http://otrs.org/\\n\";\n// --\n// $Id: Core.Agent.A...
javascript
chosen
[ { "from": "system", "value": "Improve http request error reporting and metadata\n" }, { "from": "human", "value": "var Bluebird = require('bluebird');\n\n\nmodule.exports = issueRequest;\n\n\nfunction issueRequest (request) {\n return Bluebird.resolve(request)\n .catch(function (err) {...
javascript
chosen
[ { "from": "system", "value": "Tweak map styles to match theme\n" }, { "from": "human", "value": "angular.module('dplaceMapDirective', [])\n .directive('dplaceMap', function() {\n function link(scope, element, attrs) {\n element.append(\"<div id='mapdiv' style='width:1140px; ...
javascript
chosen
[ { "from": "system", "value": "Remove leftovers from copied webpack config\n\nSigned-off-by: Christoph Wurst <7abde52c298496fa169fb750f91f213a282142af@winzerhof-wurst.at>\n" }, { "from": "human", "value": "const path = require('path');\nconst { VueLoaderPlugin } = require('vue-loader');\n\nmodule...
javascript
chosen
[ { "from": "system", "value": "Fix Mr. Mime abilities in Gen 3\nAccidentally put Scyther's instead in 1d003cbaec\n" }, { "from": "human", "value": "exports.BattlePokedex = {\n\tchansey: {\n\t\tinherit: true,\n\t\tabilities: {0:\"Natural Cure\",1:\"Serene Grace\"},\n\t\tprevo: ''\n\t},\n\tmrmime: ...
javascript
chosen
[ { "from": "system", "value": "Improve example for twitter stream\n" }, { "from": "human", "value": "var rem = require('../..');\nvar read = require('read');\nvar clarinet = require('clarinet');\n\n// Create Twitter API, prompting for key/secret.\nvar tw = rem.load('twitter', 1.0).prompt();\n\n//...
javascript
chosen
[ { "from": "system", "value": "Add test for api error response\n" }, { "from": "human", "value": "var fs = require('fs');\nvar config = require('../config');\n\nvar schemaText = fs.readFileSync(config.schemapath);\nvar schema = JSON.parse(schemaText.toString());\n\nschema.host = 'localhost';\nsch...
javascript
chosen
[ { "from": "system", "value": "Clear history immediately when switching sources\n" }, { "from": "human", "value": "import * as d3 from 'd3';\nimport { t } from '../util/locale';\nimport { modeBrowse } from '../modes/index';\n\n\nexport function uiSourceSwitch(context) {\n var keys;\n\n\n fu...
javascript
chosen
[ { "from": "system", "value": "Add decodeUriComponent on XSRF-TOKEN cookie before setting the X-XSRF-TOKEN header\n" }, { "from": "human", "value": "'use strict';\n\nvar laralytics = {\n init: function(_api, _version) {\n\n // Object track with : screen size, mouse position, browser, all clic...
javascript
chosen
[ { "from": "system", "value": "Add a assertion to test the href of the link\n" }, { "from": "human", "value": "// Polyfills\nif(MouseEvent === undefined) {\n function MouseEvent(eventType, params) {\n params = params || { bubbles: false, cancelable: false };\n var mouseEvent = do...
javascript
chosen
[ { "from": "system", "value": "Add function to search by text\n" }, { "from": "human", "value": "'use strict'\n\nimport React from 'react'\nimport SvgIcon from '../../components/svg-icon'\n\nconst FormSearch = () => (\n <div className='search'>\n <input\n className='form-control'\n ...
javascript
chosen
[ { "from": "system", "value": "Allow empty string for filter schema for deletions\n" }, { "from": "human", "value": "const Joi = require('@hapi/joi')\n\nmodule.exports = Joi.object().pattern(/^/, Joi.array().items(Joi.string()))\n" }, { "from": "gpt", "value": "const Joi = require('@h...
javascript
chosen
[ { "from": "system", "value": "Fix AccordionWrapper initialization by passing initial 'accordion' and 'onChange' props to the container constructor.\n" }, { "from": "human", "value": "// @flow\n\nimport React, { Component } from 'react';\nimport type { ElementProps } from 'react';\n\nimport { Pro...
javascript
chosen
[ { "from": "system", "value": "Add file type and size to S3 sign function data\n" }, { "from": "human", "value": "var get = Ember.get,\n set = Ember.set;\n\nEmber.S3Uploader = Ember.Uploader.extend({\n /**\n Url used to request a signed upload url\n\n @property url\n */\n url: '/sign'...
javascript
chosen
[ { "from": "system", "value": "[feat]: Add getUser endpoint to fetch a user\n" }, { "from": "human", "value": "import express from 'express';\nimport UserController from '../controllers/UserController';\n\nconst userRouter = express.Router();\nuserRouter.post('/api/user/signup', UserController.cr...
javascript
chosen
[ { "from": "system", "value": "Initialize district on territory change\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport { translationMacro as t } from \"ember-i18n\";\n\nexport default Ember.Controller.extend({\n\n i18n: Ember.inject.service(),\n delivery: Ember.computed.al...
javascript
chosen
[ { "from": "system", "value": "Add and remove items from dynamic collection.\n" }, { "from": "human", "value": "import { map } from 'substance'\n\nexport default class DynamicCollection {\n constructor (api, type) {\n this._api = api\n this._type = type\n }\n\n getItems () {\n const a...
javascript
chosen
[ { "from": "system", "value": "Clean target dropdown in clean_panel()\n" }, { "from": "human", "value": "var sideex_wait = {\n next_command_wait: false,\n done: true\n};\n\nvar sideex_testCase = {\n count: 0\n};\n\nvar sideex_testSuite = {\n count: 0\n};\n\nfunction clean_panel() {\n ...
javascript
chosen
[ { "from": "system", "value": "Use the toot effects in \"execute\"\n" }, { "from": "human", "value": "const { next } = require('hooter/effects')\nconst normalizeCommands = require('./normalizeCommands')\n\n\nmodule.exports = function executePlugin(lifecycle) {\n function executeOne(command, cont...
javascript
chosen
[ { "from": "system", "value": "Remove bad use of profiling step\n" }, { "from": "human", "value": "module.exports = function authorize (authApi) {\n return function authorizeMiddleware (req, res, next) {\n req.profiler.done('req2params.setup');\n\n authApi.authorize(req, res, (er...
javascript
chosen
[ { "from": "system", "value": "[isomorphic-core] Add missing .default to require\n" }, { "from": "human", "value": "/* eslint global-require: 0 */\nmodule.exports = {\n Provider: {\n Gmail: 'gmail',\n IMAP: 'imap',\n },\n Imap: require('imap'),\n Errors: require('./src/errors'),\n IMAP...
javascript
chosen
[ { "from": "system", "value": "Use the added_subchannel_activity template for this activity\n" }, { "from": "human", "value": "window.GenericActivityView = Backbone.View.extend({\n tagName: \"div\",\n className: \"activity-block\",\n\n initialize: function(options) {\n this.useTemplate(\"ac...
javascript
chosen
[ { "from": "system", "value": "Fix paths now that master is running with new structure\n" }, { "from": "human", "value": "var config = require('../src/config/config')\nvar client = require('mongodb').MongoClient\nvar fs = require('fs-extra')\n\nclient.connect(config.database.host+'vegodev', funct...
javascript
chosen
[ { "from": "system", "value": "Improve the stack returned from PdfkiwiError\n" }, { "from": "human", "value": "class PdfkiwiError extends Error {\n constructor(message, code, status) {\n super(message);\n\n const hasValidCode = code !== null && code !== undefined;\n Object...
javascript
chosen
[ { "from": "system", "value": "Simplify default for end variable." }, { "from": "human", "value": "angular.module('igTruncate', []).filter('truncate', function (){\n return function (text, length, end){\n if (text !== undefined){\n if (isNaN(length)){\n length = 10;\n }\n\n ...
javascript
chosen
[ { "from": "system", "value": "feat: Change header to 'flow strict'\n" }, { "from": "human", "value": "'use strict';\n\nimport os from 'os';\n\nexport const HEADER = `// @flow\n/* This file is automatically generated by css-modules-flow-types */`;\n\nexport default function printFlowDefinition(to...
javascript
chosen
[ { "from": "system", "value": "Fix static path in production\n" }, { "from": "human", "value": "// Static file helpers\n\nimport { canUseDOM } from 'react/lib/ExecutionEnvironment';\n\nconst os = require('os');\n\nconst PRODUCTION_STATIC_ROOT = 'http://static.tonikarttunen.com/static/';\nconst DE...
javascript
chosen
[ { "from": "system", "value": "Fix location coordinate field naming\n" }, { "from": "human", "value": "module.exports = (function() {\n var config = require('config');\n var mongoose = require('mongoose');\n\n var db = mongoose.connection;\n var schemas = {};\n\n var eventSchema = new mongoo...
javascript
chosen
[ { "from": "system", "value": "Convert generateCourseKey to use randomstring module\n\nSigned-off-by: samgoldman <06cb9b47f702e929df8a0a808508cab59f4c50c4@gmail.com>\n" }, { "from": "human", "value": "// app/models/course.js\n// load the things we need\nlet mongoose = require('mongoose');\nlet Us...
javascript
chosen
[ { "from": "system", "value": "Add time now works and refreshed the page content!\n" }, { "from": "human", "value": "var models = require('../models');\n\nexports.addtime = function(req, res) {\n\t// get a random palette from the top ones \n\tconsole.log(\"Javascript linked!\");\n\tvar activityTo...
javascript
chosen
[ { "from": "system", "value": "Revert \"Added a validation into the parser\"\n\nThis reverts commit 36a90ec21a9be5e5534017360051be49f3a0c2a9.\n" }, { "from": "human", "value": "const {\n UtilsParsingError,\n UtilsRuntimeError,\n} = require('./UtilsErrors');\nconst {\n RequestRuntimeError,\n} =...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary commented out lines\n" }, { "from": "human", "value": "(function() {\n\n describe('awesome-app.search module', function() {\n var $controller,\n $scope,\n SearchService,\n $rootScope,\n control...
javascript
chosen
[ { "from": "system", "value": "Adjust plugin references to new covistra-system name\n" }, { "from": "human", "value": "/**\n\n Copyright 2015 Covistra Technologies Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the ...
javascript
chosen
[ { "from": "system", "value": "Use Punctuation Blacklist for Typeahead Normalizer\n\nSummary: This changes the Typeahead normalizer to use a punctuation blacklist\ninstead of stripping all non-alphanumeric characters. As the normalizer stands\nnow, any international characters (e.g. Japanese characters) are ...
javascript
chosen
[ { "from": "system", "value": "Add login method to PostIt class\n" }, { "from": "human", "value": "import { connection, UserModel, GroupModel } from './models';\n\n/**\n * The User class\n * @author Babatunde Adeyemi <tundewrites@gmail.com>\n * @class\n */\nclass PostIt {\n\n /**\n * Initializ...
javascript
chosen
[ { "from": "system", "value": "Clean up menu button a bit\n" }, { "from": "human", "value": "angular.module('fantastiq.components')\n .directive('menuButton', function () {\n return {\n scope: {},\n replace: true,\n controller: 'MenuButtonController',\n controllerAs: 'menu...
javascript
chosen
[ { "from": "system", "value": "Add error output to testreport.\n" }, { "from": "human", "value": "var assert = require('assert');\nvar request = require('supertest');\nvar exec = require('child_process').exec;\n\nvar application = require(__dirname + '/server.js');\n\ndescribe('server', function ...
javascript
chosen
[ { "from": "system", "value": "Add generated source to build.\n" }, { "from": "human", "value": "const gulp = require(\"gulp\");\nconst lkpm = require('lkpm');\nconst path = require('path');\n\nvar taskExporter = new lkpm.TaskExporter({\n moduleBase: __dirname,\n javaSrcRoots: [path.join(__...
javascript
chosen
[ { "from": "system", "value": "Fix navigator.languages not supported in IE and Safari\n" }, { "from": "human", "value": "import ActionTypes from '../constants/ActionTypes';\nimport BaseStore from './BaseStore';\n\nclass LocaleStore extends BaseStore {\n\n constructor() {\n super();\n ...
javascript
chosen
[ { "from": "system", "value": "Use mock task data for generic task tests\nUpdate getDefaultAnnotation to use the method signature from the combo task.\n" }, { "from": "human", "value": "import { shallow } from 'enzyme';\nimport React from 'react';\nimport assert from 'assert';\nimport tasks from ...
javascript
chosen
[ { "from": "system", "value": "Introduce a new way to `require` plugins when using RequireJS (dev mode).\nThis is to fix an issue with timing that existed previously.\n" }, { "from": "human", "value": "// Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved.\n//\n// R...
javascript
chosen
[ { "from": "system", "value": "Remove willUnmount from connection status\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport {\n NetInfo\n} from 'react-native';\n\nclass ConnectionStatus extends Component {\n componentDidMount() {\n NetInfo.isConnected.addEve...
javascript
chosen
[ { "from": "system", "value": "Patch parts of `FloorDivideOp` in source order.\n" }, { "from": "human", "value": "import BinaryOpPatcher from './BinaryOpPatcher.js';\n\nexport default class FloorDivideOpPatcher extends BinaryOpPatcher {\n /**\n * LEFT '//' RIGHT\n */\n patchAsExpression() {...
javascript
chosen
[ { "from": "system", "value": "Make link property optional on a slide\n" }, { "from": "human", "value": "import React from 'react';\nimport styles from './Slide.css';\nimport {hashHistory} from 'react-router'\nimport MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';\nimport NeufundLogo...
javascript
chosen
[ { "from": "system", "value": "fix: Correct name of event header\n" }, { "from": "human", "value": "const winston = require('winston');\nconst env = require('./env');\nconst GITLAB_TOKEN = env.GITLAB_TOKEN || Math.random(); // Seriously, you must have it set\nconst GITLAB_EVENT_NAME = 'Push Hook'...
javascript
chosen
[ { "from": "system", "value": "Add queue to the blacklist for service configs\n" }, { "from": "human", "value": "let ServiceConfig = {\n BLACKLIST: [\n 'uris',\n 'ports',\n 'version',\n 'versions',\n 'versionInfo',\n 'deployments',\n 'tasks',\n 'taskStats',\n 'tasksHea...
javascript
chosen
[ { "from": "system", "value": "Store the dictItem keys in a map to avoid searching the dict for objects with matching keys (this cut performance tests from 5000ms to 150ms)\n" }, { "from": "human", "value": "'use strict';\n\nvar markovDictionaryBuilder = (function() {\n\n\tfunction buildDict(word...
javascript
chosen
[ { "from": "system", "value": "Fix missing renaming of logout => logoutLink\n\nDuring development, this was previously named `logout`. This cleans up a\nremaining instance of `logout`, renaming it to the preferred\n`logoutLink` to remain consistent with the rest of the codebase.\n" }, { "from": "huma...
javascript
chosen
[ { "from": "system", "value": "Create integration tests for the API.\n\n+ Create test spec to check a GET request for all files.\n+ Create test spec to validate the addition of a file.\n" }, { "from": "human", "value": "'use strict';\n\nvar app = require('./../../../config/express')();\nvar reque...
javascript
chosen
[ { "from": "system", "value": "Revert \"BUGFIX: Removed broken findOneByID wrapper\"\n\nThis reverts commit 8a069ac3d51473aab74d4bc2b2f1f8867fbef250.\n" }, { "from": "human", "value": "/**\n* Plugin which transforms most Monoxide objects into promise returns\n*/\nvar promisify = require('util').p...
javascript
chosen
[ { "from": "system", "value": "Check for supplemental on both _resolved and _raw\n\nParent Lookup first try to find for parent information on supplemental\ndata. In order to do so, it can't use the instance method cldr.get(), or\nit could run into an infinite loop. Therefore, it direct accesses the\nsuppleme...
javascript
chosen
[ { "from": "system", "value": "Fix SSR hydration remounting issue. Thanks @paullewis for discovering it!\n" }, { "from": "human", "value": "import { clone, isString, isFunction, toLowerCase } from '../util';\nimport { isFunctionalComponent } from './functional-component';\n\n\n/** Check if two no...
javascript
chosen
[ { "from": "system", "value": "Add Sponsor component to home page\n" }, { "from": "human", "value": "import React from 'react';\nimport MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';\nimport Theme from '../../../config/theme';\nimport FloatingActionButton from 'material-ui/FloatingA...
javascript
chosen
[ { "from": "system", "value": "Correct input type for password in Login\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { Field, reduxForm } from 'redux-form'\n\nclass LoginForm extends Component {\n render() {\n return (\n <form onSubmit={this.props.h...
javascript
chosen
[ { "from": "system", "value": "Adjust the order of week days based on the current locale\n" }, { "from": "human", "value": "'use strict'\n\nvar moment = require('moment')\n\nvar DEFAULT_WEEK_START_DAY = moment().startOf('week').format('d') * 1\n\nmodule.exports = function getWeekDayNames(startDay...
javascript
chosen
[ { "from": "system", "value": "Add pass record to model name to link\n" }, { "from": "human", "value": "import { kebabCase } from \"lodash\";\nimport pluralize from \"pluralize\";\n\nlet modelNameMap = {\n j5Report: \"assembly-report\"\n};\n\nexport const setModelLinkMap = map => {\n modelNameM...
javascript
chosen
[ { "from": "system", "value": "Watch task on *all* scss files now.\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar minifyCss = require('gulp-minify-css');\nvar rename = require('gulp-rename');\nvar autoprefixer = require('gulp...
javascript
chosen
[ { "from": "system", "value": "Fix a bug where an extra </script> tag was sitting inside a <script> block.\n\n\n\n" }, { "from": "human", "value": "{% load djblets_utils %}\n /*\n * Initial state from the server. These should all be thought of as\n * constants, not state.\n */\n{% if not e...
javascript
chosen
[ { "from": "system", "value": "Add button to return to game list\n" }, { "from": "human", "value": "import React from 'react'\nimport { withRouter } from 'react-router-dom'\nimport Character from './character'\nimport SingleCharacterRolling from \"./single-character-rolling\";\n\nclass Game exten...
javascript
chosen
[ { "from": "system", "value": "Add className prop to icon\n" }, { "from": "human", "value": "import React, {PropTypes} from 'react';\n\nconst Icon = ({name}) => {\n\treturn <svg className={`lexicon-icon lexicon-icon-${name}`}><use xlinkHref={`../bower_components/lexicon/release/images/icons/icons...
javascript
chosen
[ { "from": "system", "value": "Use lodash in all modules." }, { "from": "human", "value": "/*! @license ©2014 Ruben Verborgh - Multimedia Lab / iMinds / Ghent University */\n/** A DistinctIterator emits the unique items from a source. */\n\nvar FilterIterator = require('./FilterIterator'),\n i...
javascript
chosen
[ { "from": "system", "value": "Optimize context value per official docs\n" }, { "from": "human", "value": "/**\n * @file TimestampProvider component.\n */\n\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport axios from 'axios';\n\nimport getLogger from '.....
javascript
chosen
[ { "from": "system", "value": "Fix capitalization of views imported\n\n" }, { "from": "human", "value": "\"use strict\";\n\nconst Promise = require('bluebird');\nconst Task = require('../Task');\nconst path = require('path');\nconst ProjectType = require('../../ProjectType');\nconst fs = require(...
javascript
chosen
[ { "from": "system", "value": "Fix eventing timer n1ql application code for spelling\n\nChange-Id: I578a10b18d595174ad5303ea3072767eca66d031\nReviewed-on: http://review.couchbase.org/86052\nTested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>\nReviewed-by: Mahesh Mandhare <f05f25073b...
javascript
chosen
[ { "from": "system", "value": "Add unit tests for groupBy util function\n" }, { "from": "human", "value": "import groupBy from 'dummy/utils/group-by';\nimport { module, test } from 'qunit';\n\nmodule('Unit | Utility | group by');\n\n// Replace this with your real tests.\ntest('it works', function...
javascript
chosen
[ { "from": "system", "value": "Fix status table right align (attempt)\n" }, { "from": "human", "value": "$(function () {\n var nav_offset = $('#navigation').offset().top;\n $(window).scroll(function () {\n $('#navigation').css('position', ($(window).scrollTop() - nav_offset > 0) ? 'f...
javascript
chosen
[ { "from": "system", "value": "Select curse word at random\n" }, { "from": "human", "value": "/* Test your fear implementation */\n\nvar tyf = {\n \n /** Show a slide and hide all others */\n showSlide(slideId) {\n if(!slideId.startsWith('#')) {\n slideId = '#' + slideI...
javascript
chosen
[ { "from": "system", "value": "Remove bias from random walk\n" }, { "from": "human", "value": "var mongodb = require('mongodb');\nvar server = new mongodb.Server(\"127.0.0.1\", 27017, {});\nvar Db = new mongodb.Db('zombiedb', server, {w:0});\n\nfunction walkingDead() {\n\n Db.open( function (err...
javascript
chosen
[ { "from": "system", "value": "Fix event listener redundancy on machine \"status\" event.\n" }, { "from": "human", "value": "var fs = require('fs');\nvar machine = require('../machine').machine;\nvar log=require('../log').logger(\"websocket\");\nvar socketio = require('socket.io');\nvar clients_l...
javascript
chosen
[ { "from": "system", "value": "Add ajax to upvote a response.\n" }, { "from": "human", "value": "$(document).ready( function () {\n $(\"button.upvote\").click( function() {\n var commentId = $(\".upvote\").data(\"id\");\n event.preventDefault();\n $.ajax({\n url: '/response/up_vote...
javascript
chosen
[ { "from": "system", "value": "Enable $compile debugging info in DEV mode (+ add a concept of dev-mode)\n\n`$compileProvider.debugInfoEnabled(false)` makes the code faster but at\nthe cost of not being able to inspect scopes and bindings.\n\nSince we don't have any concept of dev/production environments in S...
javascript
chosen
[ { "from": "system", "value": "Allow CJS node_modules in test browser bundles\n" }, { "from": "human", "value": "const babel = require('rollup-plugin-babel');\nconst multiEntry = require('rollup-plugin-multi-entry');\nconst resolve = require('rollup-plugin-node-resolve');\nconst commonjs = requir...
javascript
chosen
[ { "from": "system", "value": "Test Case for getSuggestions of HomeController\n" }, { "from": "human", "value": "/**\n * Tests sit right alongside the file they are testing, which is more intuitive\n * and portable than separating `src` and `test` directories. Additionally, the\n * build process ...
javascript
chosen
[ { "from": "system", "value": "Add timeout for name setting\n" }, { "from": "human", "value": "Template.videoFlexTab.helpers({\n\n});\n\n\nTemplate.videoFlexTab.onCreated(function() {\n\tthis.timeout = null;\n\tthis.autorun(() => {\n\n\t});\n\n\t// Opening a PR so we can do this via the https://m...
javascript
chosen
[ { "from": "system", "value": "Update test helper file to handle hd images\n" }, { "from": "human", "value": "import APIConstants from '../constants/APIConstants'\nimport randomInt from '../../app/helpers/random-int'\nconst fixture = require('../fixture-data')\nimport isSameDay from '../../app/he...
javascript
chosen
[ { "from": "system", "value": "Move jquery.colorPicker images to layout resource\n" }, { "from": "human", "value": "/**\n * @class CM_FormField_Color\n * @extends CM_FormField_Abstract\n */\nvar CM_FormField_Color = CM_FormField_Abstract.extend({\n\t_class: 'CM_FormField_Color',\n\n\tready: funct...
javascript
chosen
[ { "from": "system", "value": "Fix bad test runner setup\n" }, { "from": "human", "value": "const Application = require('spectron').Application\nconst assert = require('assert')\nconst path = require('path')\n\ndescribe('application launch', function() {\n this.timeout(10000)\n\n beforeEach(fun...
javascript
chosen
[ { "from": "system", "value": "Fix a bug in spec code\n" }, { "from": "human", "value": "define(function(require) {\n\n var test = require('../../../test')\n\n test.assert(typeof seajs.importStyle === 'function', 'seajs.importStyle')\n\n seajs.importStyle('.a { color: blue }')\n seajs.importS...
javascript
chosen
[ { "from": "system", "value": "Reduce transition durations to 300ms\n" }, { "from": "human", "value": "var loadPresentation = function() {\n\tvar presentation = localStorage.getItem('preview-string');\n\tvar config = JSON.parse(localStorage.getItem('preview-config'));\n\n\tif (presentation) {\n\t...
javascript
chosen
[ { "from": "system", "value": "Check if icon template is available before rendering\n" }, { "from": "human", "value": "var $ = require('jquery');\nvar CoreView = require('backbone/core-view');\nvar iconTemplates = {};\n\nvar importAllIconTemplates = function () {\n var templates = require.contex...
javascript
chosen
[ { "from": "system", "value": "chore: Use Fela prefix instead of Themed" }, { "from": "human", "value": "/* @flow weak */\n/* eslint-disable react/prefer-stateless-function */\nimport React, { Component, PropTypes } from 'react'\n\nconst generateDisplayName = (Comp) => {\n const displayName = Co...
javascript
chosen
[ { "from": "system", "value": "Remove extra point graphic from player\n" }, { "from": "human", "value": "'use strict';\n\nvar Point = require('../../data/point'),\n Rect = require('../../data/rect'),\n TileGraphic = require('../../graphics/tile-graphic'),\n Animation = require('../../gra...
javascript
chosen
[ { "from": "system", "value": "Fix query passed to babel-loader : enable cacheDirectry\n" }, { "from": "human", "value": "module.exports = {\n entry: './js/main.js',\n output: {\n path: __dirname,\n filename: './js/build/bundle.js'\n },\n module: {\n loaders: [\n {\n tes...
javascript
chosen
[ { "from": "system", "value": "Remove DefinePlugin (webpack -p) does this\n" }, { "from": "human", "value": "var path = require(\"path\");\nvar webpack = require(\"webpack\");\n\nmodule.exports = {\n // https://webpack.js.org/configuration/dev-server/\n devServer: {\n contentBase: \"./public...
javascript
chosen
[ { "from": "system", "value": "Add remove export of PageContentModal\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nexport { BottomConfirmModal } from './BottomConfirmModal';\nexport { BottomModal } from './BottomModal';\nexport { ByProg...
javascript
chosen
[ { "from": "system", "value": "Update view to include count of complete files awaiting review.\n" }, { "from": "human", "value": "function viewCollectionDetails(collectionName) {\n\n $.ajax({\n url: \"/zebedee/collection/\" + collectionName,\n type: \"get\",\n headers:{ \"X-Florence-Tok...
javascript
chosen
[ { "from": "system", "value": "Add chapter 12, exercise 4\n" }, { "from": "human", "value": "specialForms.set = (args, scope) => {\n if (args.length != 2 || args[0].type != \"word\") {\n throw new SyntaxError(\"Incorrect use of set\");\n }\n let curScope = scope;\n\n // Would b...
javascript
chosen
[ { "from": "system", "value": "Use a selector for finding filter input\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nconst { $, on } = Ember;\n\nexport default Ember.Component.extend({\n filterTerm: '',\n inputClass: 'js-input',\n localClassNames: ['canvas-block-filter'],\n\...
javascript
chosen
[ { "from": "system", "value": "Fix tear down click handler problem in tests\n\nIt's not obvious what \"the way\" to teardown window event handlers is in\nEmber. The datacenter-picker is permanently in the app during usage, but\nin tests I'm assuming it gets added and removed lots.\n\nSo when you run the test...
javascript
chosen
[ { "from": "system", "value": "Customize Messenger widget - remove useless param\n" }, { "from": "human", "value": "KylinApp.service('MessageService', function (GraphBuilder) {\n var options = {\n extraClasses: 'messenger-fixed messenger-on-top messenger-on-right',\n theme: 'air'...
javascript
chosen
[ { "from": "system", "value": "Change single job view model binding.\n" }, { "from": "human", "value": "var app = app || {};\n\n(function($) {\n 'use strict';\n\n app.JobSingleView = app.JobAbstractView.extend({\n\n template: _.template($('#job-template').html()),\n\n events: {\n 'cl...
javascript
chosen
[ { "from": "system", "value": "Refactoring: Replace single quotes -> double quotes\n" }, { "from": "human", "value": "const loaders = require(\"./loaders\");\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst webpack = require('webpack');\nconst path = require('path');\nmodule.expo...
javascript
chosen
[ { "from": "system", "value": "Increase node acceptance test timeout\n" }, { "from": "human", "value": "var assert = require('assert');\nvar RSVP = require('rsvp');\nvar fs = require('fs');\nvar AddonTestApp = require('ember-cli-addon-tests').AddonTestApp;\n\ndescribe('Acceptance: development bui...
javascript
chosen
[ { "from": "system", "value": "Comment out PublishTask test until fixed\n" }, { "from": "human", "value": "\nvar assert = require('assert');\n var h = require('./helpers');\n\nvar tests = {\n\n 'before': function () {\n process.chdir('./test');\n },\n\n 'after': function () {\n process....
javascript
chosen
[ { "from": "system", "value": "Remove -beta.n suffix from minifier-js before republishing.\n" }, { "from": "human", "value": "Package.describe({\n summary: \"JavaScript minifier\",\n version: \"1.2.16-beta.1\"\n});\n\nNpm.depends({\n \"uglify-js\": \"2.7.5\"\n});\n\nNpm.strip({\n \"uglify-js\...
javascript
chosen
[ { "from": "system", "value": "Add route for basic tests.\n" }, { "from": "human", "value": "var express = require('express');\nvar app = express();\n\n\n\napp.listen(2222);\n" }, { "from": "gpt", "value": "var express = require('express');\nvar app = express();\n\napp.get('/api1/:n',...
javascript
chosen
[ { "from": "system", "value": "Check for a valid trip ket when first searching in url\n" }, { "from": "human", "value": "/* exported configureTripKeyForPath, getTripKeyFromUrl, setProgressBar */\n/** \n* Sets Progress Bar to correct location based on the page number\n* @param {int} pageNumber\n*/...
javascript
chosen
[ { "from": "system", "value": "Add lookup attendees by contact as well as event\n\nIn order to check if an attendee exists on an event the\nfetchEvent attendees function now lets you pass the contact\nas well, this allows a check to see if they alreadu exist\n" }, { "from": "human", "value": "con...
javascript
chosen
[ { "from": "system", "value": "feat: Add experimental `renderPage` hook for render customization\n" }, { "from": "human", "value": "import React from \"react\";\nimport ReactDOMServer from \"react-dom/server\";\nimport { Route, StaticRouter } from \"react-router\";\nimport config from \"config\";...
javascript
chosen
[ { "from": "system", "value": "Add mongo dependency back to template tests\n" }, { "from": "human", "value": "Package.describe({\n summary: \"Additional tests for Spacebars\",\n internal: true\n});\n\n// These tests are in a separate package to avoid a circular dependency\n// between the `space...
javascript
chosen