conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix describe name for getter tests\n" }, { "from": "human", "value": "/**\n * Module dependencies.\n */\n\nrequire('should');\n\nvar fixtures = require('../lib');\n\n/**\n * Tests\n */\n\ndescribe('fixturefiles', function() {\n describe('function', function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add more tests for reducer\n" }, { "from": "human", "value": "import { expect } from 'chai';\n\nimport { ADD_ITEM, COMPLETE_ITEM } from '../src/shared/actions/ItemActions';\nimport itemReducer from '../src/shared/reducers/itemReducer';\n\ndescribe('reducer', () => {...
javascript
chosen
[ { "from": "system", "value": "Fix scrolling bug with contact me link\n" }, { "from": "human", "value": "//Bootstrap and jquery included via CodePen. Much js functionality is in minified Bootstrap.js and configured through data attributes.\n\n$(document).ready(function() {\n function sendMail(...
javascript
chosen
[ { "from": "system", "value": "Allow Guests to view Articles\n" }, { "from": "human", "value": "'use strict';\n\n// Setting up route\nangular.module('articles').config(['$stateProvider',\n function ($stateProvider) {\n // Articles state routing\n $stateProvider\n .state('articles', {\...
javascript
chosen
[ { "from": "system", "value": "Initialize Hue service at startup\n" }, { "from": "human", "value": "Nbsp = {};\n\nNbsp.updateColor = function() {\n var red = Session.get('red'),\n green = Session.get('green'),\n blue = Session.get('blue');\n $('body').css({\n 'background-color': 'r...
javascript
chosen
[ { "from": "system", "value": "Set the mime-type on a test data file to binary.\n\nI just checked this file in, and it shouldn't have a trailing newline.\nHowever when I checked it out, SVN seems to have put back an LF at the end.\nHopefully this will prevent that from happening.\n\nBUG=http://crbug.com/2286...
javascript
chosen
[ { "from": "system", "value": "Update ESLint to permit no-space between fun paren\n" }, { "from": "human", "value": "module.exports = {\n parser: \"babel-eslint\",\n root: true,\n parserOptions: {\n ecmaVersion: 2017,\n sourceType: 'module'\n },\n extends: \"airbnb\",\n env: {\n br...
javascript
chosen
[ { "from": "system", "value": "Update eslint for switch/case statements\n" }, { "from": "human", "value": "// http://eslint.org/docs/user-guide/configuring\n\nmodule.exports = {\n root: true,\n parser: 'babel-eslint',\n parserOptions: {\n sourceType: 'module'\n },\n env: {\n browser: t...
javascript
chosen
[ { "from": "system", "value": "Add code to pass most recent specs.js commit\n" }, { "from": "human", "value": "var pingPong = function(userNumber) {\n return true;\n}\n" }, { "from": "gpt", "value": "var pingPong = function(userNumber) {\n if ((userNumber % 3 === 0) || (userNumber %...
javascript
chosen
[ { "from": "system", "value": "Convert `PlantsViewPage` to an a stateless component\n" }, { "from": "human", "value": "import PlantList from './plantList';\nimport PlantListAddBox from './plantListAddBox';\nimport PlantView from './plantView';\nimport React from 'react';\n\nexport default class P...
javascript
chosen
[ { "from": "system", "value": "Change `List` so that it sets it's head, tail and `length` properties & export it from module." }, { "from": "human", "value": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint asi: true undef: true es5: true node: true browser: true devel: true\n forin: tr...
javascript
chosen
[ { "from": "system", "value": "Fix centering of provider list\n" }, { "from": "human", "value": "var m = require('mithril');\nvar utils = require('./utils');\nvar MESSAGES = JSON.parse(require('raw!./messages.json'));\n\nvar Footer = {};\n\nFooter.view = function(ctrl) {\n return m('', [\n ...
javascript
chosen
[ { "from": "system", "value": "style: Change eslint rule no-empty: allowEmptyCatch\n" }, { "from": "human", "value": "module.exports = {\n \"env\": {\n \"node\": true\n },\n \"extends\": \"eslint:recommended\",\n \"rules\": {\n \"indent\": [\n \"error\",\n ...
javascript
chosen
[ { "from": "system", "value": "Change the singleRun Karma option to true for Travis builds\n" }, { "from": "human", "value": "module.exports = function karma(config) {\n config.set({\n frameworks: ['mocha'],\n files: [\n { pattern: 'src/**/*.js', included: false },\n 'tests/**/*....
javascript
chosen
[ { "from": "system", "value": "Fix wrong prop type in prop validation\n\nuseWrapper now validated as boolean value, instead of string\n" }, { "from": "human", "value": "import React from \"react\";\n\nclass Button extends React.Component {\n\n buttonWithWrapper () {\n return (\n <ButtonW...
javascript
chosen
[ { "from": "system", "value": "Update PropType description and change to a better name\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport Box from '../box';\nimport WidgetBody from './WidgetBody';\nimport WidgetFooter from...
javascript
chosen
[ { "from": "system", "value": "Change JS variables to constants\n" }, { "from": "human", "value": "let backtrace = document.querySelector(\".Flow-Debug-Exception-Backtrace-Code\");\nlet localStorageItemIdentifier = 'Flow-Debug-Exception-Backtrace-Code-Open';\n\nif (window.localStorage.getItem(loc...
javascript
chosen
[ { "from": "system", "value": "Add repo url as prop\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { \n List,\n ListItem,\n} from 'react-native-elements';\n\nexport default class RepoList extends Component {\n constructor(props) {\n super(props);\n }\n...
javascript
chosen
[ { "from": "system", "value": "Clean up how UI works\n" }, { "from": "human", "value": "'use strict';\n\nvar Q = require('q'),\n scorer = require('./scorer'),\n print = require('./board/print');\n\nmodule.exports = {\n play: function(board, player_x, player_o) {\n var self = this;...
javascript
chosen
[ { "from": "system", "value": "Set service query method to cache data requests.\n" }, { "from": "human", "value": "/* global angular */\nvar wizardServices = angular.module('wizardServices', ['ngResource']);\n\nwizardServices.factory('Transaction', ['$resource',\n function ($resource) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add css to add-option button\n" }, { "from": "human", "value": "/* global $ */\n\n(function (window, document, $) {\n 'use strict';\n\n var LiveEditorToolbar = function LiveEditorToolbar (params) {\n this.init(params);\n };\n\n LiveEditorToolbar.p...
javascript
chosen
[ { "from": "system", "value": "Change test to reflect changes to coords\n" }, { "from": "human", "value": "const chai = require('chai')\nconst assert = chai.assert;\nconst sinon = require('sinon');\nconst Bumper = require(\"../lib/bumper\")\n\ndescribe(\"Bumper\", function(){\n context(\"with as...
javascript
chosen
[ { "from": "system", "value": "Make selectGameRoute be a reselect selector, so the actual object itself won't change if id and name haven't changed.\n\nboardgame-game-view looks for _gameRoute to have changed, and triggers a _resetState if it does. But before this commit, it would change every time state upd...
javascript
chosen
[ { "from": "system", "value": "Remove cwd from file name.\n" }, { "from": "human", "value": "const fs = require('fs');\n\nconst parseInput = (input, config) => new Promise((resolve, reject) => {\n\n let parser = () => null;\n\n if (!config.parser) {\n\n parser = require('doxdox-parse...
javascript
chosen
[ { "from": "system", "value": "Clean up test, add missing expected files\n" }, { "from": "human", "value": "/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\n\ndescribe('bespoke generator', function () {\n bef...
javascript
chosen
[ { "from": "system", "value": "Remove active admin assets as they cause probems with jquery tabs\n" }, { "from": "human", "value": "//= require active_admin/base\n//= require vendor/select2\n//= require vendor/redactor\n// require jquery.ui.tabs\n\n$(document).ready(function(){\n if($(\"select.s...
javascript
chosen
[ { "from": "system", "value": "Revert \"Fix error \"connection error to wss://tracker.webtorrent.io?1fe16837ed\"\"\n\nThis reverts commit 5cf5083c97d2189a75c1124581c40c30cf3921dc.\n" }, { "from": "human", "value": "global.WRTC = require('wrtc')\nglobal.WEBTORRENT_ANNOUNCE = [ 'wss://tracker.webto...
javascript
chosen
[ { "from": "system", "value": "Select emoji character when copy not supported\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n charClass: 'hidden-emoji-char',\n\n copyText(text) {\n let copied;\n let input = Ember.$('<input>');\n ...
javascript
chosen
[ { "from": "system", "value": "Fix error when activating on empty editor\n" }, { "from": "human", "value": "'use babel'\n\nimport { dirname, basename } from 'path'\n\nfunction getPath (path) {\n let [projectPath, filePath] = atom.project.relativizePath(path)\n\n if (!projectPath) {\n project...
javascript
chosen
[ { "from": "system", "value": "Fix JavaScript bug with arguments.\n" }, { "from": "human", "value": "\n\n/**\n * @param {Object}\n * @param {Array.<String>}\n */\nmodule.exports = function(_class, _instance, mixined) {\n\n\t_instance.mixined = {};\n\t(mixined||[]).forEach(function(name) {\n\t\t_i...
javascript
chosen
[ { "from": "system", "value": "Use 100 items per page, so we get all the katas." }, { "from": "human", "value": "export const GITHUB_URL = 'https://api.github.com/search/code?q=repo%3Atddbin%2Fkatas+language%3AJavaScript+path%3Akatas%2Fes6%2Flanguage';
" }, { "from": "gpt", "value": "...
javascript
chosen
[ { "from": "system", "value": "Update name of Bridging-Header file\n\nUpdate name of Bridging-Header file #101" }, { "from": "human", "value": "// nS - No Space\n// lC - Lowercase\n\nexport function foldersAndFiles(currentAppName, newName) {\n const nS_CurrentAppName = currentAppName.replace(/\\...
javascript
chosen
[ { "from": "system", "value": "Remove “caused by“ from unhandled rejection messages, it merely repeats the same information\n" }, { "from": "human", "value": "import preInit from '../common/pre-init';\n\nprocess.on('unhandledRejection', (reason, p) => {\n console.error('Unhandled Rejections:');\...
javascript
chosen
[ { "from": "system", "value": "Convert data to a string then apply the regex\n" }, { "from": "human", "value": "'use strict';\n/* global require */\n/* global process */\n\nvar fs = require ('fs');\nvar path = require ('path');\n\nvar mkdirSync = function (path) {\n try {\n fs.mkdirSync (path...
javascript
chosen
[ { "from": "system", "value": "Add alert when error occurs.\n" }, { "from": "human", "value": "(function(){\n\n window.onerror = function(msg, file, line) {\n var xhr = new XMLHttpRequest();\n xhr.open(\"POST\", '/log', true);\n xhr.setRequestHeader('Content-Type', 'application/json');\...
javascript
chosen
[ { "from": "system", "value": "Add icon dinamically to the button, based on the projecttype\n" }, { "from": "human", "value": "function styleButton(button,checked){\n if(checked){\n button.style.border='5px solid black';\n }\n else{\n button.style.border='0px solid black';\...
javascript
chosen
[ { "from": "system", "value": "Update dependency meteor-typescript to v0.9.0" }, { "from": "human", "value": "Package.describe({\n name: 'angular-typescript-compiler',\n version: '0.3.1_2',\n summary: 'Angular TypeScript Compiler Package',\n git: 'https://github.com/Urigo/angular-meteor/tree/...
javascript
chosen
[ { "from": "system", "value": "Set my own colors instead\n" }, { "from": "human", "value": "var Flattenize = require (\"../index\")\n , myImage = new Flattenize ()\n ;\n\nmyImage.convert(\"http://www.steegle.com/images/chrome.jpg\");\n" }, { "from": "gpt", "value": "var Flattenize =...
javascript
chosen
[ { "from": "system", "value": "Add tests using array for path\n" }, { "from": "human", "value": "'use strict';\n/* globals describe, it */\n\nvar assert = require('assert');\nvar get = require('../');\nvar isPlainObject = require('lodash.isplainobject');\n\n\n\ndescribe('get', function(){\n var ...
javascript
chosen
[ { "from": "system", "value": "Disable CI env var for tests.\n" }, { "from": "human", "value": "// travis doesn't support colors, so we have to force it\nprocess.env.FORCE_COLOR = 1;\n\nconsole.log(process.env);\n\nglobal.chai = require('chai');\nglobal.chai.use(require('chai-as-promised'));\nglo...
javascript
chosen
[ { "from": "system", "value": "Add getLanguageId method to NullLanguageMode\n" }, { "from": "human", "value": "const {Disposable} = require('event-kit')\nconst Point = require('./point')\n\nconst EMPTY = []\n\nmodule.exports =\nclass NullLanguageMode {\n bufferDidChange () {}\n buildHighlightIt...
javascript
chosen
[ { "from": "system", "value": "Make ol.Coordinate inherit from goog.math.Vec2\n" }, { "from": "human", "value": "goog.provide('ol.Coordinate');\n\ngoog.require('goog.math.Coordinate');\n\n\n\n/**\n * @constructor\n * @extends {goog.math.Coordinate}\n * @param {number} x X.\n * @param {number} y Y...
javascript
chosen
[ { "from": "system", "value": "Add skip install flag to test\n" }, { "from": "human", "value": "var path = require('path'),\n assert = require('yeoman-generator').assert,\n helpers = require('yeoman-generator').test,\n os = require('os');\n\ndescribe('sails-rest-api:app', function () {\n...
javascript
chosen
[ { "from": "system", "value": "Add optional plugin build options\n\nAdds a `--plugins` CLI option Grunt build command which is a comma separated list of plugins that will be included in the build.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n ...
javascript
chosen
[ { "from": "system", "value": "Add jshint and grunt-complexity to the test task\n\nSigned-off-by: Henrique Vicente <d390f26e2f50ad5716a9c69c58de1f5df9730e3b@gmail.com>\n" }, { "from": "human", "value": "/*\n * grunt-config-options\n * https://github.com/henvic/grunt-cli-config\n *\n * Copyright (...
javascript
chosen
[ { "from": "system", "value": "tests: Fix test that uses classList (which is IE >= 10).\n" }, { "from": "human", "value": "'use strict';\n\nimport registry from '../../src/registry';\nimport skate from '../../src/skate';\n\ndescribe('Registry', function () {\n afterEach(function () {\n regist...
javascript
chosen
[ { "from": "system", "value": "Remove false comment about ajax_start and ajax_stop\n" }, { "from": "human", "value": "import {Locale} from 'Framework/Locale'\nimport {Flash} from 'Framework/Flash'\nconst locale = new Locale()\n\nexport class Ajax {\n initAjax () {\n /* set some defaults for A...
javascript
chosen
[ { "from": "system", "value": "Use CircularProgress to indicate saving\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { inject, observer } from 'mobx-react'\n\n@inject('AppStore')\n@observer\nexport default class NewTabLink extends Component {\n render () {\n...
javascript
chosen
[ { "from": "system", "value": "Expand list of files that are linted to include tests.\n" }, { "from": "human", "value": "/*!\n * Price Recommendation Service\n * ----------------------------\n * Gruntfile.\n */\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n jshint: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add version to head of minified version\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n\t// Project configuration.\n\tgrunt.initConfig({\n\t\tpkg: grunt.file.readJSON('package.json'),\n\t\tless: {\n\t\t\toptions: {\n\t\t\t\tieCompat: true,\...
javascript
chosen
[ { "from": "system", "value": "Add routing logic for three views.\n" }, { "from": "human", "value": "/*\n\tHigh level presentation component for entire front-end applicaiton\n\tindex > app > nav & view\n*/\nimport React from 'react'\nimport Main from './main/main'\n\n// a \"location\" state varia...
javascript
chosen
[ { "from": "system", "value": "Add `grunt test` and `grunt build`\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n watch: {\n jasmine: {\n files: [ 'aviator.js', 'spec/*_spec.js' ],\n tasks: [ 'jasmine:all' ],\n opt...
javascript
chosen
[ { "from": "system", "value": "Add default task to grunt\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n });\n\n grunt.loadNpmTasks('grunt-contrib-jasmine');\n\n grunt.initConfig({\n jasmine: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add an uglify task for Grunt.\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n\n\tgrunt.initConfig({\n\n\t\tpkg: grunt.file.readJSON('package.json'),\n\n\t\tclean: {\n\t\t\tbuild: {\n\t\t\t\tsrc: \"build\"\n\t\t\t}\n\t\t},\n\n\t\tcopy: {\n\t\...
javascript
chosen
[ { "from": "system", "value": "Fix unit search suggestions bug\n" }, { "from": "human", "value": "import {createAction} from 'redux-actions';\nimport values from 'lodash/values';\nimport {SearchActions, MAX_SUGGESTION_COUNT} from './constants';\nimport {Action} from '../common/constants';\nimport...
javascript
chosen
[ { "from": "system", "value": "Store x variable on client side\n" }, { "from": "human", "value": "function something()\r\n{\r\n\tvar x = window.localStorage.getItem('aaa');\r\n\r\n\twindow.localStorage.setItem('aaa', 555);\r\n\r\n\talert(x);\r\n}\r\n" }, { "from": "gpt", "value": "fun...
javascript
chosen
[ { "from": "system", "value": "Remove component and helper routes\n" }, { "from": "human", "value": "var Router = Ember.Router.extend(); // ensure we don't share routes between all Router instances\n\nRouter.map(function() {\n this.route('about');\n this.route('login');\n this.route('component...
javascript
chosen
[ { "from": "system", "value": "Update sample of google chrome developer tools\n" }, { "from": "human", "value": "console.warn('panel.js');\n\nconst messagesEl = document.getElementById('messages');\n\n// chrome.devtools.network.onRequestFinished.addListener((req) => {\n// const url = req.requ...
javascript
chosen
[ { "from": "system", "value": "Remove globally defined functions in tests\n" }, { "from": "human", "value": "import Enzyme, { shallow, render, mount } from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\n// React 16 Enzyme adapter\nEnzyme.configure({ adapter: new Adapter() });\n// Make...
javascript
chosen
[ { "from": "system", "value": "Update electron require to be called directly from 'const {app, BrowserWidow}' line\n" }, { "from": "human", "value": "'use strict';\n\nconst electron = require('electron');\nconst {app, BrowserWindow} = electron;\n\nlet mainWindow;\n\napp.on('ready', () => {\n mai...
javascript
chosen
[ { "from": "system", "value": "Remove duplicated code from LCM\n" }, { "from": "human", "value": "'use strict';\n\nvar gcd = require('./gcd.js');\n\n/**\n * Algorithm to calculate Least Common Multiple based on Euclidean algorithm\n *\n * @param Number\n * @param Number\n *\n * @return Number\n *...
javascript
chosen
[ { "from": "system", "value": "Allow flags to pass through object validations.\n" }, { "from": "human", "value": "// Validation for bookmark payloads.\n'use strict';\n\nvar Hoek = require('hoek');\nvar Joi = require('joi');\n\nvar validators = {};\n\nvalidators.bookmarkID = Joi.string().guid();\n...
javascript
chosen
[ { "from": "system", "value": "Add better error message if app failed to compile\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2014, Tidepool Project\n * \n * This program is free software; you can redistribute it and/or modify it under\n * the terms of the associated License, which is...
javascript
chosen
[ { "from": "system", "value": "Add search to Topic List screen\n\nAdd search by topic in the navigation of the Topic List screen\n" }, { "from": "human", "value": "/* @flow */\nimport React, { PureComponent } from 'react';\n\nimport type { Actions, Stream, Topic } from '../types';\nimport connect...
javascript
chosen
[ { "from": "system", "value": "Enforce camelcase variables with eslint\n\nThis has been our practice, now it is THE RULE.\n" }, { "from": "human", "value": "module.exports = {\n root: true,\n parserOptions: {\n ecmaVersion: 8,\n sourceType: 'module'\n },\n extends: 'eslint:recommended',...
javascript
chosen
[ { "from": "system", "value": "Remove exception for mixin linting now that they've all been removed.\n" }, { "from": "human", "value": "module.exports = {\n root: true,\n parser: 'babel-eslint',\n parserOptions: {\n ecmaVersion: 2018,\n sourceType: 'module',\n ecmaFeatures: {\n l...
javascript
chosen
[ { "from": "system", "value": "Fix 'lpUserStatusCallback' error when running Grunt\n" }, { "from": "human", "value": "window.lp = {};\nwindow.lp.supports = {};\nwindow.lp.isMobile = false;\n\nrequire.config({\n paths: {\n jquery: \"vendor/assets/javascripts/jquery/jquery\",\n lib: \"public...
javascript
chosen
[ { "from": "system", "value": "Update eslint config to allow 2 spaces\n\n - happy to discuss and revert this.\n" }, { "from": "human", "value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"es6\": true,\n \"node\": true\n },\n \"extends\": \"eslint:recommended\",\n \"par...
javascript
chosen
[ { "from": "system", "value": "Enable 'browser' environment for ESLint\n" }, { "from": "human", "value": "module.exports = {\n extends: 'eslint:recommended',\n parserOptions: {\n sourceType: 'script',\n modules: true,\n },\n env: {\n es6: true,\n node: true,\n jest: true,\n ...
javascript
chosen
[ { "from": "system", "value": "Change comment color to increase contrast\n" }, { "from": "human", "value": "module.exports = {\n plain: {\n color: '#f8f8f2',\n backgroundColor: '#272822'\n },\n styles: [\n {\n types: ['comment', 'prolog', 'doctype', 'cdata'],\n style: {\n ...
javascript
chosen
[ { "from": "system", "value": "Increase max length for page tagline, title and subtitles\n\nSome people rely on long titles as a workaround for missing formatting\noptions.\n\nREDMINE-16574\n" }, { "from": "human", "value": "pageflow.ConfigurationEditorTabView.groups.define('general', function() ...
javascript
chosen
[ { "from": "system", "value": "Test for adding duplicates to database\n" }, { "from": "human", "value": "const test = require('tape');\nconst User = require('../../../models/User');\nconst { connect, add } = require('../../database');\n\ntest('connection to database', async (assert) => {\n const...
javascript
chosen
[ { "from": "system", "value": "Use lib instead of es\n" }, { "from": "human", "value": "import extractValuesFromDOMEvent from 'awareness/es/extractValuesFromDOMEvent'\n\nexport default function extractFromDOM(args) {\n if (args[0]) {\n const values = extractValuesFromDOMEvent(args[0])\n\n ...
javascript
chosen
[ { "from": "system", "value": "Use double quotes in the context menu, for consistency with Chrome's \"Search Google for ...\"\n" }, { "from": "human", "value": "chrome.contextMenus.create(\n {\n \"title\": \"Define '%s'\",\n \"contexts\":[\"selection\"],\n \"onclick\": fun...
javascript
chosen
[ { "from": "system", "value": "Clarify what the arrow function transformer does" }, { "from": "human", "value": "/**\n * Turn arrow functions into normal functions.\n *\n * @example\n *\n * **In**\n *\n * ```javascript\n * arr.map(x => x * x);\n * ```\n *\n * **Out**\n *\n * ```javascript\n * arr...
javascript
chosen
[ { "from": "system", "value": "Include the control's id as an attr on the button\n\n- To allow easy CSS selection of a particular button. We might want to\n hide it in some cases or give it a different color etc.\n" }, { "from": "human", "value": "import React from 'react';\nimport { connect } f...
javascript
chosen
[ { "from": "system", "value": "Add some logic to get neurons\n" }, { "from": "human", "value": "(function(){\n 'use strict';\n angular.module('starter.controllers')\n .controller('DashCtrl', function($scope) {\n console.log($scope);\n });\n})();\n" }, { "from": "gpt", "value": ...
javascript
chosen
[ { "from": "system", "value": "Reduce timeout for hiding the info box\n" }, { "from": "human", "value": "function eventsourcetest() {\n var alInfo = $(\"#alInfo\");\n var alSuccess = $(\"#alSuccess\");\n var ta = document.getElementById('output');\n var source = new EventSource('php/g...
javascript
chosen
[ { "from": "system", "value": "Clarify assertions and add missing suite\n" }, { "from": "human", "value": "const chai = require('chai');\nconst expect = chai.expect;\nconst xcode = require('xcode');\nconst getGroup = require('../../src/ios/getGroup');\n\nconst project = xcode.project('test/fixtur...
javascript
chosen
[ { "from": "system", "value": "chore: Make the middleware do the right thing for Location headers\n\nSigned-off-by: Kai Blin <ad3597797f6179d503c382b2627cc19939309418@biosustain.dtu.dk>\n" }, { "from": "human", "value": "var proxyMiddleware = require('http-proxy-middleware');\n\nmodule.exports = ...
javascript
chosen
[ { "from": "system", "value": "Add return to menu button in game\n" }, { "from": "human", "value": "\"use strict\";\n\nvar GameState = function(game) {}\n\nvar publicMethods = function() {\n this.create = function() {};\n};\n\nvar privateMethods = function() {};\n\nprivateMethods.call(GameState....
javascript
chosen
[ { "from": "system", "value": "Change platform from Linux to Windows 8.1\n" }, { "from": "human", "value": "var config = require('./protractor-shared.conf').config;\n\nconfig.sauceUser = process.env.SAUCE_USERNAME;\nconfig.sauceKey = process.env.SAUCE_ACCESS_KEY;\n\nconfig.allScriptsTimeout = 600...
javascript
chosen
[ { "from": "system", "value": "Add repos to list component\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { View } from 'react-native';\nimport RepoSearchBar from './components/RepoSearchBar';\nimport RepoSearchButton from './components/RepoSearchButton';\nim...
javascript
chosen
[ { "from": "system", "value": "internal-test-helpers: Convert `NamespacesAssert` to ES6 class\n" }, { "from": "human", "value": "import { run } from '@ember/runloop';\nimport { NAMESPACES, NAMESPACES_BY_ID } from '@ember/-internals/metal';\n\nfunction NamespacesAssert(env) {\n this.env = env;\n}...
javascript
chosen
[ { "from": "system", "value": "fixed: Add transition time and take redraw function into requestAnimationFrame\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('chemartApp')\n .factory('moleculeDrawer', function (centerAtoms, canvas) {\n return function (molecule) {\n va...
javascript
chosen
[ { "from": "system", "value": "[WEB-559] Fix issue with button focus styles\n" }, { "from": "human", "value": "export default ({ colors, borders }) => ({\n primary: {\n backgroundColor: colors.purpleMedium,\n border: borders.input,\n borderColor: colors.purpleMedium,\n color: colors....
javascript
chosen
[ { "from": "system", "value": "Refactor sign-up directive to use UsersService\n" }, { "from": "human", "value": "{\n class UsersService {\n create(user) {\n console.log('CREATED!');\n console.log(user);\n }\n }\n\n angular\n .module('meganote.users')\n .service('UsersServ...
javascript
chosen
[ { "from": "system", "value": "Fix of broken test and addition of new test\n" }, { "from": "human", "value": "'use strict';\ndescribe('controller specs', function() {\n var $scope;\n\n beforeEach(module('myApp.controllers'));\n \n beforeEach(inject(function($rootScope, $controller) {\n $sco...
javascript
chosen
[ { "from": "system", "value": "Update CLI version to 0.0.6-alpha\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nconst cli = require('commander');\nconst path = require('path');\nconst glob = require('glob');\n\nconst options = {\n realpath: true,\n cwd: path.resolve(__dirname, './lib...
javascript
chosen
[ { "from": "system", "value": "Add protractor test function to click after an element is loaded\n" }, { "from": "human", "value": "\"use strict\";\n\nvar UserPages = require(\"./UserPages.js\");\nvar MailParser = require(\"mailparser\").MailParser;\nvar fs = require(\"fs\");\n\nvar restUrl = \"ht...
javascript
chosen
[ { "from": "system", "value": "Make server launcher use logger for server startup message\n" }, { "from": "human", "value": "#!/usr/bin/env node\n/*\n * Copyright (c) 2015-2016 PointSource, LLC.\n * MIT Licensed\n */\nvar server = require('../');\n\nserver.init({\n appDir: process.cwd()\n}, fu...
javascript
chosen
[ { "from": "system", "value": "Make sure parent controller is an array\n" }, { "from": "human", "value": "import Em from 'ember';\nimport { defaultValue } from 'llama-table/computed';\nvar computed = Em.computed;\nvar alias = computed.alias;\nvar reads = computed.reads;\n\n/**\n * Adds some extra...
javascript
chosen
[ { "from": "system", "value": "Add HTMLInputElement to satisfy ag-grid dependecy\n" }, { "from": "human", "value": "// satisfy ag-grid HTMLElement dependency\nHTMLElement = typeof HTMLElement === 'undefined' ? function () {} : HTMLElement;\nHTMLSelectElement = typeof HTMLSelectElement === 'undefi...
javascript
chosen
[ { "from": "system", "value": "Disable debug when running unit tests for compliance\n" }, { "from": "human", "value": "var promisesAplusTests = require(\"promises-aplus-tests\"),\n spromise = require(\"../dist/spromise-debug\");\n\n// Adapter so that promise tests can run\nfunction adapter() {...
javascript
chosen
[ { "from": "system", "value": "Change widget attribute to string\n\nIn Django 1.8, widget attribute data-date-picker=True will be rendered\nas 'data-date-picker'. This patch will just look for the presence of the \nattribute, ignoring the actual value.\n\nChange-Id: I0beabddfe13c060ef2222a09636738428135040a\...
javascript
chosen
[ { "from": "system", "value": "Enable disabling of koa-body parser\n" }, { "from": "human", "value": "const Koa = require('koa')\nconst Routes = require('./routes')\n\nmodule.exports = class {\n constructor(app, container, config, log) {\n this.app = app\n this.log = log\n this.containe...
javascript
chosen
[ { "from": "system", "value": "Add success tracking for local transactions.\n" }, { "from": "human", "value": "var GOVUK = GOVUK || {};\nGOVUK.Analytics = GOVUK.Analytics || {};\nGOVUK.Analytics.Trackers = {};\n\n/*\n * Available methods on control:\n * - trackTimeBasedSuccess(millisecondsUntilSu...
javascript
chosen
[ { "from": "system", "value": "Return immediately if not search string provided\n" }, { "from": "human", "value": "/**\n * Determines whether one string may be found within another string, returning true or false as appropriate.\n * @param {String} subjectString The string to process.\n * @param ...
javascript
chosen
[ { "from": "system", "value": "Select the first overlay by default\n" }, { "from": "human", "value": "/* See license.txt for terms of usage */\r\n\r\ndefine(function(require, exports, module) {\r\n\r\n// Dependencies\r\nconst React = require(\"react\");\r\nconst { PopupPanel } = require(\"popup-p...
javascript
chosen
[ { "from": "system", "value": "Fix massive SPAM of errors from QR code in the browser console.\n" }, { "from": "human", "value": "/*global angular*/\n(function () {\n 'use strict';\n\n angular.module('core').directive('qrDeviceInteraction', function () {\n var template = '';\n ...
javascript
chosen