conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add create form reserve with ajax modal window\n" }, { "from": "human", "value": "$(document).ready(function(){\n $('#navLogInRegisterButton').on(\"click\",function(event){\n event.preventDefault();\n $.ajax({\n method:\"get\",\n url:\"/sessions/new...
javascript
chosen
[ { "from": "system", "value": "Update icon font name to ‘icomoon’\n" }, { "from": "human", "value": "const register = require('postcss-variables/lib/register');\nlet v = require('wee-core/styles/variables');\nlet { colors, font, heading, icon } = require('wee-core/styles/variables');\nlet color =...
javascript
chosen
[ { "from": "system", "value": "style: Make required attribute status explicit\n\nWe'll let the user decide if they want to use a button or tag\n" }, { "from": "human", "value": "angular.module('snap')\n .directive('snapToggle', function() {\n 'use strict';\n return function (scope, el...
javascript
chosen
[ { "from": "system", "value": "Make generic function to add object to world\n" }, { "from": "human", "value": "import frames from '../../../sprite-frames';\nimport { centerOfObject } from '../../../utils';\n\nimport Tree from '../../../sprites/Tree';\nimport Generator from '../../../sprites/Gener...
javascript
chosen
[ { "from": "system", "value": "Remove menu test that display menu\n" }, { "from": "human", "value": "define([\n\t'modules/MainMenu/src/MainMenuModel',\n\t'modules/MainMenu/src/MainMenuController',\n\t'modules/MainMenu/src/MainMenuView',\n\t'modules/Harmonizer/src/HarmonizerController',\n\t'module...
javascript
chosen
[ { "from": "system", "value": "Add `float` to always convert list" }, { "from": "human", "value": "/**\n * Consider:\n *\n * .a {\n * margin: 0 5px 0 0;\n * }\n *\n * .a {\n * margin: 0;\n * }\n *\n * Would be converted to:\n *\n * html[dir='ltr'] .a {\n * margin: 0 ...
javascript
chosen
[ { "from": "system", "value": "Add team fetching error handling\n" }, { "from": "human", "value": "import { fromJS, Record, List } from 'immutable';\nimport { createReducer } from 'reduxsauce';\n\nimport { teamsActionsTypes } from './teams.actions';\n\nconst StateRecord = new Record({\n list: Li...
javascript
chosen
[ { "from": "system", "value": "Update webpack to 3rd version\n" }, { "from": "human", "value": "const webpack = require('webpack')\n\nconst plugins = [\n new webpack.DefinePlugin({\n 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),\n __DEV__: process.env.NODE_ENV === 'developm...
javascript
chosen
[ { "from": "system", "value": "Use lists, not delimited strings\n" }, { "from": "human", "value": "var webpack = require( 'webpack' );\n\nmodule.exports = {\n entry: [\n 'webpack-dev-server/client?http://localhost:8080',\n 'webpack/hot/only-dev-server',\n './src/index.jsx'\n ...
javascript
chosen
[ { "from": "system", "value": "[Refactor] Fix formatting in WrapperInterface declaration\n" }, { "from": "human", "value": "// @flow\n\ndeclare type Selector = string | Component\n\ndeclare interface WrapperInterface { // eslint-disable-line no-undef\n computed(): Object;\n contains...
javascript
chosen
[ { "from": "system", "value": "Use __dirname for source dir\n" }, { "from": "human", "value": "module.exports = {\n entry: {\n app: './src/init.js'\n },\n output: {\n path: __dirname + '/dist',\n filename: 'bundle.js'\n },\n module: {\n loaders: [{\n ...
javascript
chosen
[ { "from": "system", "value": "Update STXT to new loader format" }, { "from": "human", "value": "define(['mac/roman'], function(macintoshRoman) {\n\n 'use strict';\n \n return function(resource) {\n var dataDV = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byte...
javascript
chosen
[ { "from": "system", "value": "GoogleJsapi: Load Google JS API only if not already present on the page\n" }, { "from": "human", "value": "import Component from '@ember/component';\n\nfunction createEvent(name) {\n let event = document.createEvent('Event');\n event.initEvent(name, true, true);\n...
javascript
chosen
[ { "from": "system", "value": "Fix for ckeditor in dev\n" }, { "from": "human", "value": "CKEDITOR.config.ignoreEmptyParagraph = false;\nCKEDITOR.config.allowedContent = true;\nCKEDITOR.config.baseHref = '/assets/ckeditor/';\nCKEDITOR.config.height = 400;\nCKEDITOR.config.width = '95.5%';\nCKEDIT...
javascript
chosen
[ { "from": "system", "value": "Update to current valid strikethrough tags\n\nThe `strike` tag is no longer a valid HTML tag. See https://www.w3schools.com/tags/tag_strike.asp\r\n\r\nTwo very similar tags are its replacement, `s` and `del` -- and `del` has a corresponding `ins` tag. See https://www.w3schools....
javascript
chosen
[ { "from": "system", "value": "Fix silly garbage handling issues\n" }, { "from": "human", "value": "import { remote } from 'electron';\n\nconst window = remote.getCurrentWindow();\n\nwindow.on('app-command', (e, cmd) => {\n if (cmd === 'browser-backward') {\n remote.getCurrentWebContents().go...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"use strict dependency injection\"\"\n" }, { "from": "human", "value": "'use strict';\n/**\n * angular-select-text directive\n */\nangular.module('angular-select-text', []).\n directive('selectText', function ($window) {\n var selectElement;\n\n...
javascript
chosen
[ { "from": "system", "value": "Add process.env.ENV to getEnv() method\n" }, { "from": "human", "value": "\"use strict\";\n\nvar use = require(\"alamid-plugin/use.js\");\n\nvar path = require(\"path\"),\n argv = require(\"minimist\")(process.argv.slice(2));\n\nfunction dynamicConfig(basePath, f...
javascript
chosen
[ { "from": "system", "value": "Revert \"Use BlobBuilder (supported by Chrome for Android)\"\n\nThis reverts commit 844d4d4410b9fd73cb49a01ab1c975c3bb84d017.\n" }, { "from": "human", "value": "// Based on http://www.html5rocks.com/en/tutorials/workers/basics/\ndefine(function() {\n var URL = wi...
javascript
chosen
[ { "from": "system", "value": "Mark where to add pagination in projects\n" }, { "from": "human", "value": "define([\n 'jquery',\n 'underscore',\n 'backbone',\n 'models/project/ProjectModel'\n], function($, _, Backbone, ProjectModel){\n var ProjectsCollection = Backbone.Collection.extend({\n ...
javascript
chosen
[ { "from": "system", "value": "Add currentWindowId to store object\n" }, { "from": "human", "value": "/* Popup initialization */\nimport { createUIStore } from 'redux-webext';\nimport addEventListeners from './event-listeners';\nimport { populateTabList } from './dom-utils';\n\n// Add a key conta...
javascript
chosen
[ { "from": "system", "value": "Add display user public key\n" }, { "from": "human", "value": "/**\n * Secret View\n *\n * @copyright (c) 2018 Passbolt SARL\n * @licence AGPL-3.0 http://www.gnu.org/licenses/agpl-3.0.en.html\n */\n\n\"use strict\";\nvar AppView = require('../appView.js');\n\nclass ...
javascript
chosen
[ { "from": "system", "value": "Change contract detail data type from string to number\n" }, { "from": "human", "value": "import { runAndGetResult, expectResultTypes, parts } from '../tools';\n\ndescribe('After Purchase Blocks', () => {\n let result;\n\n beforeAll(done => {\n runAndGe...
javascript
chosen
[ { "from": "system", "value": "Fix IndexLink component without href value can't be a link\n" }, { "from": "human", "value": "import React, {Component} from 'react'\nimport {IndexLink, Link} from 'react-router'\nimport styles from '../sass/Navbar'\n\nclass Navbar extends Component {\n construct...
javascript
chosen
[ { "from": "system", "value": "Enforce shape of store property\n\nThis produce better Error messages, when store property is not being provided.\r\n\r\nIn our case we migrated to redux-1.0.x and got the waring: \r\n\"Warning: Failed Context Types: Required child context `store` was not specified in `Provider...
javascript
chosen
[ { "from": "system", "value": "Fix keep random guest name\n\nBefore fix, use setInterval() in function, the function will be called many times like recursive. I moved that code to document.read(), and it run properly.\n\nRename the function when fix this bug.\n" }, { "from": "human", "value": "fu...
javascript
chosen
[ { "from": "system", "value": "Set columns to reactivate component\n" }, { "from": "human", "value": "window.c.AdminUserDetail = (function(m, _, c){\n return {\n controller: function(){\n return {\n actions: {\n reset: {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix task indices being drawn when adding new task.\n" }, { "from": "human", "value": "function doEval(e) {\n $.post(\"/eval\", { evalInput: $(\"#evalInput\").val() } ,\n function(response) {\n $(\"#display\").html(response);\n })\n .done(f...
javascript
chosen
[ { "from": "system", "value": "Move `loc` call into a computed property\n\nIf you don't have a Locale loaded yet this can cause an exception\nto be thrown when it's evaluated.\n" }, { "from": "human", "value": "import { ACTIVE_IN_INPUT } from '../../application/keyboardShortcuts.js';\nimport { Cl...
javascript
chosen
[ { "from": "system", "value": "Add state to notes when registering\n" }, { "from": "human", "value": "{\n angular.module('meganote.signUp')\n .directive('signUp', [\n\n 'UsersService',\n (UsersService) => {\n\n class SignUpController{\n constructor (){\n t...
javascript
chosen
[ { "from": "system", "value": "Update controller to match the SPA ngRoute use.\n" }, { "from": "human", "value": "\nangular.module(\"tampereCoaches\", [])\n\t.controller(\"home\", function($scope, $http) {\n\t\t$http.get(\"/resources\").success(function(model) {\n\t\t\t$scope.greeting = model;\n\...
javascript
chosen
[ { "from": "system", "value": "Update naming convention to fix bug\n" }, { "from": "human", "value": "(function(){\n \"use strict\"\n $(document).ready(init);\n\n function init(){\n $(\".sort\").on('click', sortActivities);\n $(\".user-activities\").on('click', \".card\", showDescription...
javascript
chosen
[ { "from": "system", "value": "Resolve deprecation warning for SafeString\n\n[#LEI-294]\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n pageNumber: null,\n width: Ember.computed('pageNumber', function() {\n var width = (this.pageNumb...
javascript
chosen
[ { "from": "system", "value": "Add `PATCH` as an uncacheable method\n" }, { "from": "human", "value": "/**\n Utility Functions\n @description a collection of utility functions, aka junk drawer\n @exports {function} isRemoteResourceAction\n @exports {function} isCacheableRequest\n @exports {f...
javascript
chosen
[ { "from": "system", "value": "Fix url param for project\n" }, { "from": "human", "value": "\"use strict\";\n\nconfig.$inject = [ '$stateProvider' ];\n\nfunction config ($stateProvider) {\n\n\t$stateProvider\n\t\t.state('main.project', {\n\t\t\turl: '/proyectos/{projectId}',\n\t\t\ttemplateUrl: \...
javascript
chosen
[ { "from": "system", "value": "Replace exec with spawn for Electron apps\n" }, { "from": "human", "value": "var wincmd = require('./binaries')\nvar exec = require('child_process').exec\nvar DarwinEventLogger = require('./darwin')\n\n/**\n * EventLogger Constructor\n *\n * @param {Object|string} [...
javascript
chosen
[ { "from": "system", "value": "Add a dumb catch to the data handlers handle call\n" }, { "from": "human", "value": "import Registry from './Registry';\nimport {flow, isFunction, isString, omit} from 'lodash';\n\nexport default class DataHandler {\n\n /**\n * Register a new data handler using t...
javascript
chosen
[ { "from": "system", "value": "Add webkit support for AudioContext\n" }, { "from": "human", "value": "'use strict'\n\nconst audio = document.querySelector('audio')\nconst audioContext = new window.AudioContext\nconst audioSource = audioContext.createMediaElementSource(audio)\nconst analyser = aud...
javascript
chosen
[ { "from": "system", "value": "Add correct column types to test data generator.\n" }, { "from": "human", "value": "function generateData(rows) {\n var data = [];\n for (var i = 0; i < rows; ++i) {\n data.push({\n \"id\": \"#\" + (i + 1),\n \"created_at\": new Da...
javascript
chosen
[ { "from": "system", "value": "Add empty enable and disable functions (required)\n" }, { "from": "human", "value": "const MessageTraySource = imports.ui.messageTray.Source;\n\nfunction init () {\n MessageTraySource.prototype['SOURCE_ICON_SIZE'] = 24;\n}\n" }, { "from": "gpt", "valu...
javascript
chosen
[ { "from": "system", "value": "Add minimized version of updated script.\n" }, { "from": "human", "value": "melange.templates.inherit(function(){function k(){c=jQuery(d).text();e=jQuery(f).text()}function l(){if(google.maps.BrowserIsCompatible()){var b,g=m,h=false;a=new google.maps.Map2(document.g...
javascript
chosen
[ { "from": "system", "value": "Fix <0 TBB and <0 category headers not showing\n" }, { "from": "human", "value": "\t\n(function poll() {\n\t\n\tif ( typeof ynabToolKit !== \"undefined\" && ynabToolKit.actOnChangeInit === true) {\n\n\t\tynabToolKit.removeZeroCategories = function () {\n\t\t var...
javascript
chosen
[ { "from": "system", "value": "Fix bug when title didn't exist\n" }, { "from": "human", "value": "console.log('fs attach record');\n\nfunction loadResource(url) {\n return new Promise(function(resolve, reject){\n var link = document.createElement('link');\n link.setAttribute('rel', 'import...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix logic in queue removal\n" }, { "from": "human", "value": "const logger = require('winston')\nconst { Module } = require('../../core')\n\nclass Queue extends Module {\n constructor (...args) {\n super(...args, {\n name: 'music:queue'\n })\n\n ...
javascript
chosen
[ { "from": "system", "value": "Bring structure to app dependecies list\n" }, { "from": "human", "value": "(function(){\n 'use strict';\n\n // Prepare the 'taxretApp' module for subsequent registration of configuration, controllers and delegates\nangular\n .module('taxretApp', ['ngMessages', 'n...
javascript
chosen
[ { "from": "system", "value": "Fix undeclared variable error and prevent event default\n" }, { "from": "human", "value": "(function (){\n var GOVUKDATEFIELDS = function (){\n var $allDateGroupInstances = $(\".form-date\"),\n\n init = function (){\n\n $allDateGroupInstances.each(fu...
javascript
chosen
[ { "from": "system", "value": "Make localStorage mock a little more precise\n" }, { "from": "human", "value": "/* eslint-env jest */\n\nvar mockStorage = {}\n\nexport const __mockClear = () => {\n mockStorage = {}\n}\n\nexport default {\n getItem: jest.fn((key) => {\n return mockStorage[key]...
javascript
chosen
[ { "from": "system", "value": "Fix(license): Create MIT license by default\n\nFix #7\n" }, { "from": "human", "value": "'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\nconst { template, packageJson } = require('mrm-core');\n\nmodule.exports = function(config) {\n\tconst...
javascript
chosen
[ { "from": "system", "value": "Add function to reset pickers from stored data\n\nThis will be required for the import functionality.\n" }, { "from": "human", "value": "function WinClassicTheme() {\n Theme.call(this);\n\n var pickers = document.getElementsByClassName(\"color-item\");\n var expo...
javascript
chosen
[ { "from": "system", "value": "Convert Brewmaster changelog to new format & update the *not actively maintained* entry\n" }, { "from": "human", "value": "export default `\n20-10-2017 - Changed completion status to \"Not actively maintained\" as @wopr resigned. (by Zerotorescue)\n24-08-2017 - Adde...
javascript
chosen
[ { "from": "system", "value": "Fix types across the stack; User contract expects bytes32 vals\n" }, { "from": "human", "value": "/**\n *\n * @flow\n */\n'use strict';\n\nimport type {Action} from '../actions/types';\n\nexport type User = {\n id: number;\n name: string;\n handle: string;\...
javascript
chosen
[ { "from": "system", "value": "Use clearfix instead of overflow\n" }, { "from": "human", "value": ";(function() {\n var templates = {\n form: '\\\n <form class=\"form-horizontal\">{{fieldsets}}</form>\\\n ',\n\n fieldset: '\\\n <fieldset>\\\n {{legend}}\\\n {{fie...
javascript
chosen
[ { "from": "system", "value": "Fix shadow on iOS too\n" }, { "from": "human", "value": "/**\n * A simple directive that will add or remove a class to the body of the document if the document has been scrolled.\n */\nexport function ScrollClass() {\n return {\n restrict: 'A',\n scope: {},\n...
javascript
chosen
[ { "from": "system", "value": "Replace invalid date time strings\n" }, { "from": "human", "value": "import moment from 'moment';\n\nexport default function init(ngModule) {\n ngModule.filter('toMilliseconds', () => value => value * 1000.0);\n\n ngModule.filter('dateTime', clientConfig =>\n f...
javascript
chosen
[ { "from": "system", "value": "Fix bug in EventEmitter once method causing arguments to be lost.\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @constructor\n */\nfunction EventEmitter() {\n this.eventHandlers = {};\n}\n\nEventEmitter.prototype.emit = function(event) {\n if (!this....
javascript
chosen
[ { "from": "system", "value": "Use new Audio() instead of createElement\n" }, { "from": "human", "value": "({\n name: 'support-consistent-playback-delay',\n description: 'Consistent time between play() and actual playback (< 20ms)',\n assert: function(finish) {\n var audio = this.audio = do...
javascript
chosen
[ { "from": "system", "value": "Fix JS errors in OC7\n\nsee #241\n" }, { "from": "human", "value": "$(document).ready(function() {\n\tOC.Router.registerLoadedCallback(function() {\n\t\tvar url;\n\t\tif (OC.Router) {\n\t\t\turl = OC.Router.generate('roundcube_refresh');\n\t\t} else {\n\t\t\turl = O...
javascript
chosen
[ { "from": "system", "value": "Fix bug in collectd plain text protocol output\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n'use strict';\n\nconst dnode = require('dnode');\nconst host = process.env.COLLECTD_HOSTNAME || 'storj.node';\nconst interval = 120; //override default collectd ...
javascript
chosen
[ { "from": "system", "value": "Fix to avoid crash at online build\n" }, { "from": "human", "value": "\nrequire('dotenv').config();\nconst config = require('./source/config');\nconst info = require('./source/info');\nconst notaries = require('./source/notaries');\nconst smartContract = require('./...
javascript
chosen
[ { "from": "system", "value": "Change less main-source name to something more recognizable\n" }, { "from": "human", "value": "/*!\n * customize-engine-less <https://github.com/nknapp/customize-engine-less>\n *\n * Copyright (c) 2015 Nils Knappmeier.\n * Released under the MIT license.\n */\n'use ...
javascript
chosen
[ { "from": "system", "value": "Fix example mit license script\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n'use strict';\n\nvar fs = require('fs');\nvar exec = require('../util/exec');\n\nvar repoDir = process.env.REPO_DIR;\nvar file = repoDir + '/package.json';\nvar pkg;\n\nif (!f...
javascript
chosen
[ { "from": "system", "value": "Add petition start date and running time back in for ended petitions\n" }, { "from": "human", "value": "import React from 'react';\nimport styles from './petition-sidebar.scss';\nimport Countdown from 'components/Countdown';\nimport PetitionResponseStatus from 'cont...
javascript
chosen
[ { "from": "system", "value": "Update to always run, and tune some of the selectors\n" }, { "from": "human", "value": "var doc = window.document;\n\nfunction setup(container) {\n var inputs = container.getElementsByTagName('input');\n var arr = Array.prototype.slice.call(inputs);\n\n for (var ...
javascript
chosen
[ { "from": "system", "value": "Reset file as no changes were made. Just formatting\n" }, { "from": "human", "value": "const router = require('../router')\nconst urls = require('../../../lib/urls')\n\ndescribe('Company router', () => {\n it('should define all routes', () => {\n const paths = r...
javascript
chosen
[ { "from": "system", "value": "Update ID to match IA Page" }, { "from": "human", "value": "(function (env) {\n \"use strict\";\n env.ddg_spice_rfc = function(api_result) {\n\n if (!api_result || api_result.error || api_result.message == \"no results.\") {\n return Spice.fa...
javascript
chosen
[ { "from": "system", "value": "Handle Sentry error ID in front Ajax\n" }, { "from": "human", "value": "/**\n * Common stack, plugins and helpers\n */\nimport config from 'config';\nimport $ from 'jquery';\nimport 'bootstrap';\nimport 'widgets/site-search';\nimport 'utils/ellipsis';\nimport 'vendo...
javascript
chosen
[ { "from": "system", "value": "Rollback prematurely modified by mistake post reducers\n" }, { "from": "human", "value": "const defaultState = {\n comment: { id: null, content: '' }\n};\n\nexport default function(state = defaultState, action) {\n switch (action.type) {\n case 'COMMENT_SELECT'...
javascript
chosen
[ { "from": "system", "value": "Disable copy hack in Firefox\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = function(chat) {\n\tconst selection = window.getSelection();\n\n\t// If selection does not span multiple elements, do nothing\n\tif (selection.anchorNode === selectio...
javascript
chosen
[ { "from": "system", "value": "Change substitution syntax in queryTemplate from ${query} to $QUERY. The former misleading resembled ES6 string-template notations, but that's not really what was happening here -- as was rightly pointed out by an ESLint no-template-curly-in-string error in Users.js.\n" }, ...
javascript
chosen
[ { "from": "system", "value": "Add missing action parameter for callOnContentRedady\n" }, { "from": "human", "value": "Kwf.onJElementReady('.cssClass .outerYoutubeContainer', function youtubePlayer(el) {\n var youtubeApiLoaded = false;\n var animationFinished = false;\n var imageEl = el....
javascript
chosen
[ { "from": "system", "value": "Return task passed in from post - passing 2/16.\n" }, { "from": "human", "value": "var express = require('express');\nvar cors = require('cors');\nvar bodyParser = require('body-parser');\nvar nano = require('nano')('http://localhost:8984');\nvar todo = nano.db.use(...
javascript
chosen
[ { "from": "system", "value": "Implement query to search by author name (substring)\n" }, { "from": "human", "value": "// call to required packages\nvar express = require('express');\nvar d3 = require('d3');\nvar fs = require('fs');\n\nvar app = express(); // create the application module\n\nvar ...
javascript
chosen
[ { "from": "system", "value": "Add signal handlers to gracefully stop server\n" }, { "from": "human", "value": "var server = require('./server');\n\nserver.start();\n" }, { "from": "gpt", "value": "var server = require('./server');\n\nserver.start();\n\nvar shutdown = () => {\n serve...
javascript
chosen
[ { "from": "system", "value": "Fix `Error:` appearing in log console messages\n" }, { "from": "human", "value": "'use strict'\n\nconst { resolve } = require('path')\n\n// Retrieve error message of a standard error\nconst getErrorMessage = function ({\n error: { type, description, details },\n m...
javascript
chosen
[ { "from": "system", "value": "Fix jsx-runtime props not unmangled in tests\n" }, { "from": "human", "value": "module.exports = function(api) {\n\tapi.cache(true);\n\n\tconst minify = String(process.env.MINIFY) === 'true';\n\n\tconst rename = {};\n\tconst mangle = require('./mangle.json');\n\tfor...
javascript
chosen
[ { "from": "system", "value": "Use metric types from index.js in example\n" }, { "from": "human", "value": "'use strict';\n\nvar express = require('express');\nvar server = express();\nvar register = require('../lib/register');\n\nvar Histogram = require('../lib/histogram');\nvar h = new Histogra...
javascript
chosen
[ { "from": "system", "value": "Remove dead code from test\n" }, { "from": "human", "value": "test('scripts_load_external_async.php', function (assert, document) {\n var expected = [\n 'inline',\n 'deferred inline',\n 'synchronous external',\n 'second inline',\n ...
javascript
chosen
[ { "from": "system", "value": "Add access to static facades\n" }, { "from": "human", "value": "/**\n * Poetry library\n * Facade to the lib exports\n * @name Poetry\n * @exports\n */\n\nmodule.exports = new Proxy( {\n\n //// Enpoint registration ////\n route: require( './methods/endpoint' )...
javascript
chosen
[ { "from": "system", "value": "Add 'places' library for the maps search box.\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Google maps configuration.\n *\n * @param uiGmapGoogleMapApiProvider\n */\nMapsConfiguration.$inject = ['uiGmapGoogleMapApiProvider'];\nfunction MapsConfigurati...
javascript
chosen
[ { "from": "system", "value": "Add asciidoc as markup grammar\n" }, { "from": "human", "value": "/* @flow */\n\nimport { Disposable } from 'atom';\nimport ReactDOM from 'react-dom';\n\nimport store from './store';\n\nexport function reactFactory(\n reactElement: React$Element<any>,\n domElement...
javascript
chosen
[ { "from": "system", "value": "Throw errors intercepted by oboe.js\n\nThis workaround allows us to still receive errors in the console when\noboe's fail() handler would normally silently hide them.\n\nThis implements AC 3 of\nhttps://github.com/mesosphere/marathon/issues/1691\n" }, { "from": "human",...
javascript
chosen
[ { "from": "system", "value": "Fix styles for centering button in app\n" }, { "from": "human", "value": "import React from 'react';\n\nconst styles = {\n container: {\n backgroundColor: '#EEE',\n display: 'flex',\n alignItems: 'center',\n flexDirection: 'column',\n flexWrap: 'wrap...
javascript
chosen
[ { "from": "system", "value": "Make it so a parameter is required for the test to pass." }, { "from": "human", "value": "// 26: class - more-extends\n// To do: make all tests pass, leave the assert lines unchanged!\n\ndescribe('class can inherit from another', () => {\n\n it('extend an `old styl...
javascript
chosen
[ { "from": "system", "value": "ENYO-1912: Remove aria-labelledby when user adds accessibilityLabel to Button\n\nhttps://jira2.lgsvl.com/browse/ENYO-1912\nEnyo-DCO-1.1-Signed-off-by: Bongsub Kim <bongsub.kim@lgepartner.com>\n\nChange-Id: I50a490dbd25c59e4b48a828ab5e397e07dd9d13f\n" }, { "from": "human...
javascript
chosen
[ { "from": "system", "value": "Fix closing shade mode equalizer\n" }, { "from": "human", "value": "import React from \"react\";\nimport { connect } from \"react-redux\";\nimport Volume from \"../Volume\";\nimport Balance from \"../Balance\";\nimport { segment } from \"../../utils\";\n\nimport { c...
javascript
chosen
[ { "from": "system", "value": "Remove press from init list\n" }, { "from": "human", "value": "'use strict';\n\nconst about = require('./about');\nconst home = require('./home');\nconst getInvolved = require('./get-involved');\nconst donate = require('./donate');\nconst press = require('./press')...
javascript
chosen
[ { "from": "system", "value": "Make demo validation a bit smarter\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nconst { get, set, isEmpty } = Ember;\n\nexport default Ember.Controller.extend({\n submit() {\n window.alert('Saved!');\n },\n\n reset() {\n set(this, 'objec...
javascript
chosen
[ { "from": "system", "value": "Rewrite subreddit counter to use new parser\n" }, { "from": "human", "value": "var fs = require(\"fs\");\nvar path = require(\"path\");\n\nvar file = process.argv[2];\n\nif (!file) {\n console.log(\"Provide a file\");\n process.exit();\n}\n\nvar accum = '';\nv...
javascript
chosen
[ { "from": "system", "value": "requireParamTypes: Change if to early return format\n\n- The if statement in the require param type rule uses the quick bail format\n\nCloses gh-112\n" }, { "from": "human", "value": "module.exports = validateParamTag;\nmodule.exports.tags = ['param', 'arg', 'argume...
javascript
chosen
[ { "from": "system", "value": "Add webui logging for API commands\n" }, { "from": "human", "value": "function do_command(item, command, val) {\n var data = {};\n\n if (val != undefined) {\n\tdata[\"val\"] = val;\n }\n $.get(\"/api/item/\" + item + \"/command/\" + command, data);\n}\n\...
javascript
chosen
[ { "from": "system", "value": "Stop initial context from being shared between test cases\n" }, { "from": "human", "value": "const Context = require('../semantics/context');\n\nmodule.exports = class Program {\n constructor(statements) {\n this.statements = statements;\n }\n\n analyze(contex...
javascript
chosen
[ { "from": "system", "value": "Add createdAt field to user schema\n" }, { "from": "human", "value": "var Schema = {};\n\nSchema.UserProfile = new SimpleSchema({\n name: {\n type: String\n },\n events: {\n type: [Object],\n blackbox: true\n },\n carpool: {\n type: Number\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Add some info in comment\n\nThis work was done with a friend looking to start his CS studies soon" }, { "from": "human", "value": "export default function solve(input) {\n const output = [];\n for (let i = 0; i < input[0].length; ++i) {\n output.push([]);\n }\...
javascript
chosen
[ { "from": "system", "value": "Set coverage directory to 'reports'\n" }, { "from": "human", "value": "// https://github.com/thymikee/jest-preset-angular#brief-explanation-of-config\nmodule.exports = {\n preset: 'jest-preset-angular',\n roots: ['src'],\n setupFilesAfterEnv: ['<rootDir>/src/setu...
javascript
chosen
[ { "from": "system", "value": "Implement api to send recent queries\n" }, { "from": "human", "value": "const express = require('express');\nconst Google = require('google-images');\nconst dotenv = require('dotenv');\nconst extract = require('./src/extract');\n\ndotenv.config();\nconst app = expre...
javascript
chosen
[ { "from": "system", "value": "Save note on Enter key press, autofocus the input field\n" }, { "from": "human", "value": "// @flow\nimport type { TodoItem } from \"./model/TodoItem\";\n\nimport React from \"react\";\nimport ContentAdd from \"material-ui/svg-icons/content/add\";\nimport TextField ...
javascript
chosen
[ { "from": "system", "value": "Fix: Correct a typo in the error message in tests\n" }, { "from": "human", "value": "module.exports = function(context) {\n\n \"use strict\";\n\n return {\n \"Identifier\": function(node) {\n if (node.name === \"foo\") {\n cont...
javascript
chosen
[ { "from": "system", "value": "Make type propType of field lazy\n" }, { "from": "human", "value": "import {PropTypes} from 'react'\n\nfunction lazy(fn) {\n let cachedFn\n return (...args) => (cachedFn || (cachedFn = fn()))(...args)\n}\n\nconst field = PropTypes.shape({\n name: PropTypes.string...
javascript
chosen
[ { "from": "system", "value": "Change the wrong config route to a static route for now\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';\n/**\n The checkout route.\n\n **To Override:** You'll n...
javascript
chosen
[ { "from": "system", "value": "Add async methods to get the URL\n" }, { "from": "human", "value": "// Copyright 2015 Fabian Dietenberger\n\n'use-strict'\n\nvar q = require('q'),\n request = require('request');\n\nvar hypemResolver = {};\n\nhypemResolver.getByUrl = function (hypemUrl) {\n v...
javascript
chosen