conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Enable searching the company id\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\nvar HttpError = require('./errors').HttpError;\n\n/*\n * GET /\n * [page = 0]\n * [key = \"\"]: on empty, it will search all company...
javascript
chosen
[ { "from": "system", "value": "Update success callbacks for BookmarkFactory\n" }, { "from": "human", "value": "//factory is like the model - it access the backend and returns the data to the controller\n\n(function(){\n 'use strict';\n\n angular\n .module('shareMark')\n .factory('Bookmark...
javascript
chosen
[ { "from": "system", "value": "Add `:=` as a relevance booster for Go\n" }, { "from": "human", "value": "/*\nLanguage: Go\nAuthor: Stephan Kountso aka StepLg <steplg@gmail.com>\nContributors: Evgeny Stepanischev <imbolk@gmail.com>\nDescription: Google go language (golang). For info about language...
javascript
chosen
[ { "from": "system", "value": "Use <div> instead of <span> when dynamically generating module routes and containers\n\nThe `getModuleRoutes` method appears to generate a routing entry for all loaded stripes modules. It then maps those routes to a container node that sort of functions as a namespace for the ...
javascript
chosen
[ { "from": "system", "value": "Add inflection logic upon successful ajax upvote call.\n" }, { "from": "human", "value": "$(document).ready( function () {\n $(\".upvote\").click( function() {\n var commentId = $(\".upvote\").data(\"id\");\n event.preventDefault();\n $.ajax({\n url: ...
javascript
chosen
[ { "from": "system", "value": "Fix javascript on pages without navbar\n" }, { "from": "human", "value": "// Support component names relative to this directory:\nconst componentRequireContext = require.context(\"components\", true)\nconst ReactRailsUJS = require(\"react_ujs\")\nReactRailsUJS.useCo...
javascript
chosen
[ { "from": "system", "value": "Remove line label for tax disc volumes\n" }, { "from": "human", "value": "define([\n 'require',\n 'vehicle-excise-duty/collections/services',\n 'vehicle-excise-duty/collections/channels',\n 'vehicle-excise-duty/views/timeseries-graph',\n './failures-module',\n ...
javascript
chosen
[ { "from": "system", "value": "BAP-1194: Implement wrapper for Translator.get() call\n - CR-changes\n" }, { "from": "human", "value": "(function(Translator, _, Oro) {\n var dict = {},\n add = Translator.add;\n\n /**\n * Store all translation ids which were added to Translator\n ...
javascript
chosen
[ { "from": "system", "value": "Change from eql to equal\n" }, { "from": "human", "value": "import { expect } from 'chai';\n\nimport post911GIBStatus from '../../../src/js/post-911-gib-status/reducers';\n\nconst initialState = {\n enrollmentData: null,\n available: false\n};\n\ndescribe('post911...
javascript
chosen
[ { "from": "system", "value": "Fix output of document status log\n" }, { "from": "human", "value": "// Documents viewer\n\n'use strict';\n\nvar _ = require('mano').i18n.bind('View: Component: Documents');\n\nmodule.exports = function (documentData) {\n\treturn _if(documentData.statusLog._leng...
javascript
chosen
[ { "from": "system", "value": "Add data-automation tag to text field error message\n" }, { "from": "human", "value": "import styles from './TextField.less';\n\nimport React, { Component, PropTypes } from 'react';\nimport classNames from 'classnames';\n\nimport ErrorIcon from '../../icons/ErrorIco...
javascript
chosen
[ { "from": "system", "value": "Fix issue, node process won't exit automatically when running notify script\n" }, { "from": "human", "value": "import lib from './lib';\nimport redis from 'src/lib/redisClient';\nimport addTime from 'date-fns/add';\n\nexport default async function scanRepliesAndNoti...
javascript
chosen
[ { "from": "system", "value": "Comment out testing for delete file as delete file failed in this branch\n" }, { "from": "human", "value": "function deleteDoc(browser, docType) {\n const devServer = browser.globals.devServerURL;\n\n browser.url(`${devServer}/`);\n browser.expect.element('#app')...
javascript
chosen
[ { "from": "system", "value": "[WIP] Improve test coverage for PulsarFormComponent\n" }, { "from": "human", "value": "'use strict';\n\nvar $ = require('jquery'),\n\tPulsarFormComponent = require('../../js/PulsarFormComponent');\n\ndescribe('Pulsar Form Component', function() {\n\n\tbeforeEach(fun...
javascript
chosen
[ { "from": "system", "value": "Add top half of page in mysgonks prototype\n" }, { "from": "human", "value": "import React from \"react\"\nimport classes from \"./MySGonks.module.css\"\n\nconst MySGonks = (props) => {\n return (\n <div>\n \n </div>\n )\n}\n\nexport default MySGonks\n"...
javascript
chosen
[ { "from": "system", "value": "Add optional preExecFn in StateChange\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.core').factory('StateChange', [\n '$parse',\n function($parse) {\n function getToken(state, tokenOrId) {\n if (angular.isObject(tokenOrId))...
javascript
chosen
[ { "from": "system", "value": "Fix join channel ui moving when sorting channels\n\nFixes #2218\n" }, { "from": "human", "value": "\"use strict\";\n\nconst $ = require(\"jquery\");\nconst socket = require(\"../socket\");\nconst options = require(\"../options\");\n\nsocket.on(\"sync_sort\", functio...
javascript
chosen
[ { "from": "system", "value": "Make updated personal account info show before transaction is confirmed.\n" }, { "from": "human", "value": "/**\n * @depends {nrs.js}\n * @depends {nrs.modals.js}\n */\nvar NRS = (function(NRS, $, undefined) {\n\t$(\"#account_info_modal\").on(\"show.bs.modal\", func...
javascript
chosen
[ { "from": "system", "value": "Add test for new-navbar-auth-dropdown component.\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('new-navbar-auth-dropdown', 'Integration | Component | ne...
javascript
chosen
[ { "from": "system", "value": "Remove card key listener on routeChangeStart\n" }, { "from": "human", "value": "angular.module('voteApp').factory('cardKeyService', ['$window', function($window) {\n return {\n listen: function(cb) {\n angular.element($window).unbind('message');...
javascript
chosen
[ { "from": "system", "value": "State: Add history object for thread and for board\n" }, { "from": "human", "value": "export default {\n\tstatus: {\n\t\tisScrolling: false, // app scroll\n\t\tcurrentPage: \"home\", // currentPage\n\t\tisHeaderVisible: false, // if currentPage == \"content\"\n\t\...
javascript
chosen
[ { "from": "system", "value": "Fix double error message when \"tour\" is missing\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('alienUiApp').factory('restTechnicalErrorInterceptor', ['$rootScope', '$q', '$window', 'toaster', '$translate',\n function($rootScope, $q, $window, ...
javascript
chosen
[ { "from": "system", "value": "Fix initialization for i18n setting locale\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n model: function() {\n return this.store;\n },\n actions: {\n closeModal: function() {\n return this.disc...
javascript
chosen
[ { "from": "system", "value": "Bring error message to the top, when clicked.\n" }, { "from": "human", "value": "$(function(){\n $('ul.radio-optiongroups').each(function(){\n var $list = $(this),\n $select = $('<select />', {'class': 'hg'});\n\n $list\n .chil...
javascript
chosen
[ { "from": "system", "value": "Add (optional) icon to buttons\n" }, { "from": "human", "value": "/* @flow */\n\nimport React, { Component } from 'react';\nimport {\n TouchableHighlight,\n Text\n} from 'react-native';\nimport styles from './styles';\n\nexport default class Button extends Compone...
javascript
chosen
[ { "from": "system", "value": "Support for testing through xip.io" }, { "from": "human", "value": "import Resolver from 'resolver';\nimport routerMap from 'bibliaolvaso/router';\n\nvar App = Ember.Application.create({\n //LOG_STACKTRACE_ON_DEPRECATION: true,\n //LOG_BINDINGS: t...
javascript
chosen
[ { "from": "system", "value": "Fix accumulateData for production series where latest year is missing a value\n" }, { "from": "human", "value": "import {\n fromPairs,\n defaultTo,\n head,\n indexBy,\n keys,\n last,\n map,\n prop,\n range,\n} from 'ramda'\n\nexport functi...
javascript
chosen
[ { "from": "system", "value": "Use different Twitch API for (un)following games\n\nFix #273\n" }, { "from": "human", "value": "define([\n\t\"store/TwitchAdapter\"\n], function(\n\tTwitchAdapter\n) {\n\n\treturn TwitchAdapter.extend({\n\t\tfindRecord: function( store, type, id, snapshot ) {\n\t\t\...
javascript
chosen
[ { "from": "system", "value": "Add empty tagName to typeahead component\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/power-select-typeahead';\nconst { computed } = Ember;\n\nexport default Ember.Component.extend({\n layout: layout,\n ...
javascript
chosen
[ { "from": "system", "value": "Fix version when typing version command\n\nPlease also Update this when updating the version of the package.json" }, { "from": "human", "value": "#! /usr/bin/env node\nvar program = require('commander')\nvar childProcess = require('child_process')\n\nvar Generator =...
javascript
chosen
[ { "from": "system", "value": "Fix pagination when fetching submission lists\n" }, { "from": "human", "value": "\"use strict\";\n\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst builder = require(\"xmlbuilder\");\n\nconst settings = require(\"../../../settings\");\n\nconst ...
javascript
chosen
[ { "from": "system", "value": "Change the default cache limit to 30 items.\n" }, { "from": "human", "value": "var VERSION = '0.2.2';\n\nvar DEFAULT_BUILD_CACHE_SIZE = 20;\n\nexports.VERSION = VERSION;\nexports.DEFAULT_BUILD_CACHE_SIZE = DEFAULT_BUILD_CACHE_SIZE;\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Use a config schema instead of configDefaults.\n\nKills a Deprecation Cop warning.\n\nconfigDefaults has been deprecated since v0.133.0: https://github.com/atom/atom/commit/f57dbfd9f531c847f8e1ce34beab2b526f71\n" }, { "from": "human", "value": "var DocblockrWorker =...
javascript
chosen
[ { "from": "system", "value": "Check config values before dropping DB data\n" }, { "from": "human", "value": "import fs from 'fs'\nimport path from 'path'\nimport prepare from 'mocha-prepare'\nimport chai from 'chai'\nimport chaiHttp from 'chai-http'\nimport redis from 'redis'\nimport { promisify...
javascript
chosen
[ { "from": "system", "value": "Fix bug, allow null content\n" }, { "from": "human", "value": "import Ember from \"ember\";\nimport DS from \"ember-data\";\n\nexport default DS.Transform.extend({\n deserialize: function(serialized) {\n return Ember.Object.create(serialized);\n },\n serialize...
javascript
chosen
[ { "from": "system", "value": "Update user roles in store after owner transfer\n\nCloses #3466\n- Transferring the owner role is now done via a separate\n endpoint and not through Ember-Data. As a result the\n user role data needs to be updated manually.\n- Updated the owner endpoint to return a response ...
javascript
chosen
[ { "from": "system", "value": "Add a comment about what happens for expired/non-existent uids\n" }, { "from": "human", "value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain ...
javascript
chosen
[ { "from": "system", "value": "fix(Build): Stop cssnano from removing needed vendor prefixes.\n\ncssnano was removing `-webkit` properties that were needed to support older versions of iOS. This\n\ncommit passes a list of supported browsers to cssnano so that such prefixed properties make it into\n\nthe nano...
javascript
chosen
[ { "from": "system", "value": "Sort posts by submitted timestamp\n" }, { "from": "human", "value": "var postsData = [\n {\n title: 'Introducing Julie',\n author: 'JulesWiz',\n url: 'http://ngjulie.meteor.com'\n },\n {\n title: 'Verybite',\n author: 'Jules Verybite',\n url: 'h...
javascript
chosen
[ { "from": "system", "value": "Fix surveys field update when created (using afterCreate now + update on the colection)\n" }, { "from": "human", "value": "/**\n* Surveys.js\n*\n* @description :: TODO: You might write a short summary of how this model works and what it represents here.\n* @docs ...
javascript
chosen
[ { "from": "system", "value": "Remove hard code prj root.\n" }, { "from": "human", "value": "const app = require('./core/app');\nconst element = require('./core/element');\nconst plugin = require('./core/plugin');\nconst paths = require('./core/paths');\nconst vio = require('./core/vio');\nconst ...
javascript
chosen
[ { "from": "system", "value": "Add additional filter to sustaining pledges for is-payment\n" }, { "from": "human", "value": "import Component from '@ember/component';\nimport layout from '../../../templates/components/nypr-accounts/membership-card/giving-history';\nimport { computed } from '@embe...
javascript
chosen
[ { "from": "system", "value": "Correct indentation et replace doublequote\n" }, { "from": "human", "value": "var parse_insee = function(insee){\n if ( insee.length !== 5 ) {\n return null ;\n }\n //Cas spécial pour la Corse\n if ( (insee.substr(0,2) == '2A') || (insee.substr(0,...
javascript
chosen
[ { "from": "system", "value": "Add unique hash generator function\n" }, { "from": "human", "value": "module.exports = \n{\n\tgenerateQueryString: function(data)\n\t{\n\t\tvar ret = [];\n\t\tfor (var d in data)\n\t\t\tif (data[d])\n\t\t\t\tret.push(encodeURIComponent(d) + \"=\" + encodeURIComponen...
javascript
chosen
[ { "from": "system", "value": "Add first endpoint to prefetch." }, { "from": "human", "value": "\nvar CACHE_VERSION = 1;\nvar CURRENT_CACHES = {\n meetup-data: 'meetup-cache-v' + CACHE_VERSION\n};\n\nself.addeventlistener('install', function(event) {\n var urlsToPrefetch = [\n 'someurl',\n ...
javascript
chosen
[ { "from": "system", "value": "Remove hyphen from Tax disc graph label\n" }, { "from": "human", "value": "define([\n 'extensions/collections/graphcollection'\n],\nfunction (GraphCollection) {\n var Services = GraphCollection.extend({\n\n serviceName: 'vehicle-licensing',\n apiName: 'servi...
javascript
chosen
[ { "from": "system", "value": "Send all postures as array\n" }, { "from": "human", "value": "function ddg_spice_yoga_asanas(apiResult) {\n\n if (!apiResult || !apiResult.response.numFound) {\n return Spice.failed('yoga_asanas');\n }\n\n\tfor(i = 0; i < apiResult.response.numFound; i+...
javascript
chosen
[ { "from": "system", "value": "Add watched-canvases api in mirage\n" }, { "from": "human", "value": "export default function sharedConfig() { // eslint-ignore-line no-empty-function\n}\n\nexport function testConfig() {\n this.namespace = '/v1';\n\n this.get('/account', _ => {\n return this.c...
javascript
chosen
[ { "from": "system", "value": "Revert \"uri: use URIjs for joining and resolving\"\n\nThis reverts commit c76562463163ce93cf26a77a5b3a0bd2f0241978.\n" }, { "from": "human", "value": "var _ = require(\"./misc\");\nvar URIjs = require(\"URIjs\");\n\nfunction _joinUrl(baseUri, part) {\n if (part.le...
javascript
chosen
[ { "from": "system", "value": "Fix cursor jumping to the end of \"controlled\" inputs\n\nDOM `INPUT.value` should never be updated when it matches the new vnode.\n\nThis fixes issues where typing into an INPUT with a sync event handler\ncause a render (such as for validation feedback) where setting\n`INPUT.v...
javascript
chosen
[ { "from": "system", "value": "Fix typos in fullscreen methods for IE11\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1520105\n" }, { "from": "human", "value": "$(function() {\n $('#fullscreen').click(function() {\n switch (true) {\n case document.fullScreenEnabled:\n if (documen...
javascript
chosen
[ { "from": "system", "value": "Fix single-argument invocations that were parsing as arrays spuriously.\n" }, { "from": "human", "value": "var Replayer = function(obj) {\n this.record = [];\n var self = this;\n\tfor (var k in obj) {\n\t\tif (typeof obj[k] === 'function') {\n // Cl...
javascript
chosen
[ { "from": "system", "value": "Change logout-url to profile page.\n" }, { "from": "human", "value": "'use strict';\n\nvar config = require('./config.webgme'),\n path = require('path'),\n os = require('os');\n\nconfig.server.port = 8001;\n\nconfig.authentication.enable = true;\nconfig.authen...
javascript
chosen
[ { "from": "system", "value": "Refactor - combine pacakges and files into arrays\n" }, { "from": "human", "value": "Package.describe({\n name: 'gq:openam',\n version: '0.1.0',\n summary: 'OpenAM ForgeRock authentication module'\n});\n\nPackage.onUse(function (api) {\n\n api.versionsFrom('1.2....
javascript
chosen
[ { "from": "system", "value": "Use object instead of searching for the element\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport modalLayout from '../templates/components/modal-dialog';\n\nexport default Ember.Component.extend({\n\n\tclassNames: [ 'media' ],\n\tclassNameBindin...
javascript
chosen
[ { "from": "system", "value": "Set backend dev crs rest endpoint url" }, { "from": "human", "value": "'use strict';\n\nangular.module('confRegistrationWebApp')\n .constant('apiUrl', 'http://ec2-54-209-152-169.compute-1.amazonaws.com:8080/crs-http-json-api/rest/');\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Add next page response test\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport {\n module,\n test\n} from 'qunit';\nimport startApp from 'superhero/tests/helpers/start-app';\nimport data from '../fixtures/characters';\n\nvar application, server;...
javascript
chosen
[ { "from": "system", "value": "Add missing behaviour in StripeJS mock\n" }, { "from": "human", "value": "class Element {\n mount(el) {\n if (typeof el === \"string\") {\n el = document.querySelector(el);\n }\n\n el.innerHTML = `\n <input id=\"stripe-cardnumber\" name=\"cardnum...
javascript
chosen
[ { "from": "system", "value": "Allow ReturnStatements to have no argument.\n" }, { "from": "human", "value": "// { body }\nexports.BlockStatement = (node, generator) => {\n generator.advance(\"{\");\n node.body.forEach(bodyNode => {\n generator.generate(bodyNode);\n });\n generator.advance...
javascript
chosen
[ { "from": "system", "value": "Update health beta registration API request path\n" }, { "from": "human", "value": "import { apiRequest } from '../../common/helpers/api';\n\nexport const BETA_REGISTERING = 'BETA_REGISTERING';\nexport const BETA_REGISTER_SUCCESS = 'BETA_REGISTER_SUCCESS';\nexport c...
javascript
chosen
[ { "from": "system", "value": "Allow for running with bin/index by stubbing sailsPackageJSON\n" }, { "from": "human", "value": "\n/**\n * \n * @param {[type]} scope [description]\n * @return {[type]} [description]\n */\nmodule.exports = function dataForPackageJSON (scope) {\n\n\tvar sails ...
javascript
chosen
[ { "from": "system", "value": "Fix docs link in blueprint" }, { "from": "human", "value": "'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n\nmodule.exports = {\n description: 'Setup ember-i...
javascript
chosen
[ { "from": "system", "value": "Fix React warning about calling setState on unmounted component\n" }, { "from": "human", "value": "import React, {PropTypes} from 'react';\nimport classNames from 'classnames';\nimport t from '../utilities/translate';\n\nexport default class BreedButtonView extends ...
javascript
chosen
[ { "from": "system", "value": "Add overwrite: true to mergeTrees option to let the server run.\n" }, { "from": "human", "value": "var filterSlides = require('./lib/broccoli-slides');\nvar pickFiles = require('broccoli-static-compiler');\nvar mergeTrees = require('broccoli-merge-trees');\n\nvar sl...
javascript
chosen
[ { "from": "system", "value": "Update to most recent state-struct from fermenter-project.\n" }, { "from": "human", "value": "/* NOTE / IMPORTANT: This is *almost* a 1:1 verbatim copy of the file\n 'initialState.js' from our fermenter-project. Both files should be kept in\n sync most of the ti...
javascript
chosen
[ { "from": "system", "value": "Add padding to headerIcon column to avoid text overlapping the icon\n" }, { "from": "human", "value": "//zusätzliche headerCss-einstellung für ColumnModel\nExt2.grid.GridView.baseGetColumnStyle = Ext2.grid.GridView.prototype.getColumnStyle;\nExt2.grid.GridView.proto...
javascript
chosen
[ { "from": "system", "value": "tools: Fix signature in externs for Q.all & Q.allSettled\n" }, { "from": "human", "value": "var Q = {};\n\n/**\n * @constructor\n */\nfunction QDeferred () {};\n\nQDeferred.prototype.reject = function (args) {};\n\nQDeferred.prototype.resolve = function (args) {};\n...
javascript
chosen
[ { "from": "system", "value": "FIX babylon -> babel rename\n\nhttps://github.com/prettier/prettier/pull/5647\n" }, { "from": "human", "value": "import parseJs from 'prettier/parser-babylon';\n\nfunction parse(source) {\n return parseJs.parsers.babylon.parse(source);\n}\n\nexport default {\n par...
javascript
chosen
[ { "from": "system", "value": "Configure redux-logger to be a bit prettier.\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { applyMiddleware, combineReducers, compose, createStore } from 'redux';\ni...
javascript
chosen
[ { "from": "system", "value": "Add missing coma (jshint fix)\n" }, { "from": "human", "value": "var fs = require('fs');\nvar css = fs.readFileSync(__dirname + '/cache/bootstrap.css').toString();\n\nvar CSSOM = require('cssom');\nvar postcss = require('../build');\nvar rework = requir...
javascript
chosen
[ { "from": "system", "value": "Use a span so that labels don't wrap.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nconst COLORS = {\n ED: 'pink',\n ED1: 'blue',\n ED2: 'green',\n EA: 'orange',\n RD: 'grey'\n};\n\nexport default Ember.Component.extend({\n color: Ember.comp...
javascript
chosen
[ { "from": "system", "value": "Use correct npm bin name depending on the OS\n" }, { "from": "human", "value": "'use strict';\n\nconst childProcess = require('child_process');\n\nconst CONFIG = require('../config');\n\n// Recognised by '@electron/get', used by the 'electron-mksnapshot' and 'electr...
javascript
chosen
[ { "from": "system", "value": "Set mochaResults on window object.\n" }, { "from": "human", "value": "define(function() {\n \n /**\n * Listen to `runner` events to populate a global\n * `.mochaResults` var which may be used by selenium\n * to report on results.\n *\n * cloud(mocha.r...
javascript
chosen
[ { "from": "system", "value": "Fix google fonts issue when sourceMaps were on\n" }, { "from": "human", "value": "const autoprefixer = require('autoprefixer');\nconst precss = require('precss');\nconst stylelint = require('stylelint');\nconst fontMagician = require('postcss-font-magician');\n\nmod...
javascript
chosen
[ { "from": "system", "value": "Update help text as per Sarah's latest draft" }, { "from": "human", "value": "module.exports = {\n pageTitle: 'Your Address',\n helpBlock: 'To qualify for health care, you must live in British Columbia.',\n phoneLabel: 'Phone',\n continueButton: 'Continue'\n}" ...
javascript
chosen
[ { "from": "system", "value": "Update css for save button.\n" }, { "from": "human", "value": "$('#dripbot-title').css({\n\t\"display\": \"inline-block\",\n\t\"margin-right\": \"20px\"\n});\n\n$('#dripbot').css({\n \"text-align\": \"left\"\n});\n\n$('#dripbot-toggle.stop').css({\n \"backgrou...
javascript
chosen
[ { "from": "system", "value": "Use standard methods in div creation. Fix for firefox and safari.\n" }, { "from": "human", "value": "import inputData from './data.js';\nimport infiniteDivs from '../../lib/infinitedivs.js';\n\nlet rootElement = document.body;\n\nfunction divGenerator(item) {\n let...
javascript
chosen
[ { "from": "system", "value": "Use tms: protocol; error handling\n" }, { "from": "human", "value": "/*jslint node: true */\n\"use strict\";\n\nvar tilelive = require(\"tilelive\");\nrequire(\"./\").registerProtocols(tilelive);\nrequire(\"mbtiles\").registerProtocols(tilelive);\n\nvar src = \"http...
javascript
chosen
[ { "from": "system", "value": "Add Unit Test for parseErrorResponse\n" }, { "from": "human", "value": "import { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('adapter:web-api', 'Unit | Adapter | web api', {\n // Specify the other units that are required for this test.\n // needs: ['seriali...
javascript
chosen
[ { "from": "system", "value": "Add prompts to component sub-generator\n" }, { "from": "human", "value": "'use strict';\nvar util = require('util');\nvar yeoman = require('yeoman-generator');\n\nvar ComponentGenerator = module.exports = function ComponentGenerator(args, options, config) {\n // ...
javascript
chosen
[ { "from": "system", "value": "Update compiled JS for password block.\n" }, { "from": "human", "value": "// Generated by CoffeeScript 1.6.2\n(function() {\n 'use strict';\n var supported;\n\n supported = void 0;\n\n jQuery.prototype.tamiaPassword = function() {\n if (supported === void 0) ...
javascript
chosen
[ { "from": "system", "value": "Fix Uncaught SyntaxError: Unexpected token ) on Chrome 55" }, { "from": "human", "value": "if (module.hot) {\n var hot = require('./index').hot\n var cache = require.cache\n\n if (!module.parents || !module.parents[0]) {\n throw new Error(\n 'React-Hot-Lo...
javascript
chosen
[ { "from": "system", "value": "Decrease limit for faster testing\n" }, { "from": "human", "value": "var should = require('should');\nvar Client = require('../../../client/v1');\nvar Promise = require('bluebird');\nvar path = require('path');\nvar mkdirp = require('mkdirp');\nvar inquirer = requir...
javascript
chosen
[ { "from": "system", "value": "Add tips to error message\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\nvar minimist = require('minimist');\nvar npmDoctor = require('../lib/npm-doctor');\nvar issueLogger = require('../lib/issue-logger');\n\nvar options = minimist(process...
javascript
chosen
[ { "from": "system", "value": "Change name for release archives\n" }, { "from": "human", "value": "var eventStream = require('event-stream'),\n gulp = require('gulp'),\n chmod = require('gulp-chmod'),\n zip = require('gulp-zip'),\n tar = require('gulp-tar'),\n gzip = require('gulp-...
javascript
chosen
[ { "from": "system", "value": "Update route to match model\n" }, { "from": "human", "value": "const Report = require('../models/reports.js');\n\nmodule.exports = app => {\n app.route('/reports')\n .get((req, res) => {\n Report.find({}, (err, reports) => {\n if(err) {\n res.status...
javascript
chosen
[ { "from": "system", "value": "Fix issue of not working for multipe tabs\n\nRename for clarity:\nscriptInjected -> injected\nattachedTabs -> activeTabs\n\nChange injected type for proper work with multiple tabs.\nInjected property is still a boolean.\nChange activeTabs[tabId] toggling to boolean for clarity....
javascript
chosen
[ { "from": "system", "value": "Improve calling of the internal boom function - call with the correct args\n(Fix problem with internal errors)\n" }, { "from": "human", "value": "import _ from 'lodash';\n\nconst defaultArgs = {\n default: ['message', 'data'],\n methodNotAllowed: ['message', 'data...
javascript
chosen
[ { "from": "system", "value": "Check if screenshot is provided for session and set as image (inactive)\n" }, { "from": "human", "value": "$(document).ready(function() {\n\n var sessionTemplate = $('#eventTemplate');\n\n // Load list of sessions\n $.get('/event/api/session', function(sessions) ...
javascript
chosen
[ { "from": "system", "value": "Add query to get one element\n" }, { "from": "human", "value": "const promise = require('bluebird');\nconst config = require('./_config');\n\nconst options = {\n promiseLib: promise\n};\n\nconst pgp = require('pg-promise')(options);\nconst connectionString = config...
javascript
chosen
[ { "from": "system", "value": "Set default theme based on users system theme\n" }, { "from": "human", "value": "import Vue from 'vue';\nimport FileInfoModal from './components/file-info-modal.vue';\n\nconst app = new Vue({\n el: '#app',\n components: { FileInfoModal },\n data: () => ({\n...
javascript
chosen
[ { "from": "system", "value": "Create list function for group messages\n" }, { "from": "human", "value": "import models from '../models';\n\nconst Group = models.Group;\nconst User = models.User;\nconst userGroup = models.UserGroup;\n\nGroup.belongsToMany(User, { through: 'UserGroup' });\nUser.be...
javascript
chosen
[ { "from": "system", "value": "Add sort order to query results\n\n* Hard coded the sort order for now.\n" }, { "from": "human", "value": "'use strict';\nvar _ = require('lodash'),\n Promise = require('bluebird');\n\nmodule.exports = ['data', function (data) {\n var filters = function (query) ...
javascript
chosen
[ { "from": "system", "value": "Fix bug introduce by typo rename static method\n" }, { "from": "human", "value": "/**\n * Base class for shared model logic\n * @module lib/models/base\n * @exports BaseModel\n */\n'use strict'\n\nconst Immutable = require('seamless-immutable')\nconst exists = requi...
javascript
chosen
[ { "from": "system", "value": "Add all sorts of mongolab stuff\n" }, { "from": "human", "value": "var express = require('express');\nvar mongoose = require('mongoose');\n\nvar app = express();\n\n// connect to mongo database named \"bolt\"\nmongoose.connect('mongodb://localhost/bolt');\nmongoose....
javascript
chosen
[ { "from": "system", "value": "Add ability to specify defaults through hash\n" }, { "from": "human", "value": "$(document).ready(function() {\n var radios = $('.table-view.radio');\n var saveBtn = $('#save');\n\n radios.each(function (index) {\n var radio = $(this);\n var buttons = radio...
javascript
chosen
[ { "from": "system", "value": "Fix an issue with the Stop mediakey\n" }, { "from": "human", "value": "chrome.runtime.onMessage.addListener( function(request, sender, sendResponse){\r\n var click_event = new MouseEvent('click', {\r\n 'view': window,\r\n 'bubbles': true,\r\n ...
javascript
chosen
[ { "from": "system", "value": "Convert Card to functional component\n" }, { "from": "human", "value": "import React from 'react';\n// import PropTypes from 'prop-types';\n\nconst propTypes = {};\n\nconst defaultProps = {};\n\nexport default class Card extends React.Component {\n\trender() {\n\t\t...
javascript
chosen
[ { "from": "system", "value": "Make testing it statements briefer\n" }, { "from": "human", "value": "const assert = require(\"assert\");\nconst CommandRunner = require(\"../commandrunner\");\nconst MemoryLogger = require(\"../memorylogger\");\nlet config = {};\n\ndescribe(\"truffle help\", () => ...
javascript
chosen
[ { "from": "system", "value": "Fix typo in test description\n" }, { "from": "human", "value": "import toJson from 'enzyme-to-json';\n\nimport { getWrapper } from './shared';\n\nlet wrapper = null;\nbeforeEach(() => {\n wrapper = getWrapper();\n});\n\ndescribe('test alerts', () => {\n test('init...
javascript
chosen