conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add test to check if on instead of onAny called.\n" }, { "from": "human", "value": "import {stub} from 'sinon';\nimport logEvents from '../src';\n\ndescribe('distribucache-console-logger', () => {\n let outStub, errStub;\n\n beforeEach(() => {\n outStub = stub(...
javascript
chosen
[ { "from": "system", "value": "Migrate cm_modes/ to import cross-module\n\nroll CodeMirror\n\nBug: 1006759\nChange-Id: I053cabf7d9fb2882816c0b23595ad441d4727464\nReviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2054160\nCommit-Queue: Tim van der Lippe <dba8716ee7f8d1623604...
javascript
chosen
[ { "from": "system", "value": "Fix path only working because of case-insensitive OS\n" }, { "from": "human", "value": "import * as _Html from './primitives/Html'\nimport * as _Svg from './primitives/Svg'\n\nimport _ReactDream from './ReactDream'\n\nexport { default as createElementWithProps } fro...
javascript
chosen
[ { "from": "system", "value": "Check for null & undefined\n" }, { "from": "human", "value": "const _ = require(\"lodash\");\n\nmodule.exports = function omitDeepLodash(input, props) {\n function omitDeepOnOwnProps(obj) {\n if (!_.isArray(obj) && !_.isObject(obj)) {\n return obj;\n }\n...
javascript
chosen
[ { "from": "system", "value": "chore: Allow empty env vars during dev.\n" }, { "from": "human", "value": "if (process.env.NODE_ENV === 'development') {\n require('dotenv-safe').load();\n}\n\nconst createApp = require('./app');\nconst logger = require('pino')();\n\nconst cluster = require('cluste...
javascript
chosen
[ { "from": "system", "value": "Add third-level namespacing to deleted_user_text\n" }, { "from": "human", "value": "/**\n * The `username` helper displays a user's username in a <span class=\"username\">\n * tag. If the user doesn't exist, the username will be displayed as [deleted].\n *\n * @para...
javascript
chosen
[ { "from": "system", "value": "Comment on resource handler overrides\n" }, { "from": "human", "value": "'use strict'\n\n// setup\nimport test from 'ava'\n\n// test something\ntest.todo('testSomething')\n\n/* API\nconst pattyOpts = {port: 8081, secret: 'someSecureString', logpath: '/logs'}\nconst ...
javascript
chosen
[ { "from": "system", "value": "Fix test to correctly disable built-in frontmatter parsing\n" }, { "from": "human", "value": "var assert = require('assert');\nvar Metalsmith = require('metalsmith');\nvar frontmatter = require('../lib');\n\ndescribe('metalsmith-matters', function(){\n it('should a...
javascript
chosen
[ { "from": "system", "value": "Update database-uri and tweet-interval to use properties in config.js\n" }, { "from": "human", "value": "var config = require('./config'),\n Twit = require('twit'),\n mongoose = require('mongoose');\n\nvar T = new Twit(config.oauth_creds),\n quotes = mongoo...
javascript
chosen
[ { "from": "system", "value": "Fix in bug param alpha on setSpeed method\n" }, { "from": "human", "value": "'use strict';\n\nfunction Robot(serialPort) {\n this.serialPort = serialPort;\n}\n\nRobot.prototype.setSpeed = function(alpha, amplitude) {\n this.x = Math.round(Math.cos(parseInt(alpha, ...
javascript
chosen
[ { "from": "system", "value": "Fix image previews for search results\n" }, { "from": "human", "value": "$(document).ready(function() {\n\tif(typeof FileActions!=='undefined'){\n\t\tFileActions.register('image','View','',function(filename){\n\t\t\tviewImage($('#dir').val(),filename);\n\t\t});\n\t\...
javascript
chosen
[ { "from": "system", "value": "Refactor strings to template literals in Presto UI\n" }, { "from": "human", "value": "module.exports = {\n entry: {\n 'index': __dirname +'/index.jsx',\n 'query': __dirname +'/query.jsx',\n 'plan': __dirname +'/plan.jsx',\n 'embedded_p...
javascript
chosen
[ { "from": "system", "value": "Support replyWithFile() in the faux Nock\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2015 IBM Cloudant, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file\n * except in complianc...
javascript
chosen
[ { "from": "system", "value": "Add an underscore to a private property\n" }, { "from": "human", "value": "import ko from \"knockout\";\n\nfunction Viewer(vivliostyle, viewerSettings, opt_viewerOptions) {\n this.viewer = new vivliostyle.viewer.Viewer(viewerSettings, opt_viewerOptions);\n thi...
javascript
chosen
[ { "from": "system", "value": "Refactor to avoid dynamic module resolution\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of single-precision floating-point numbers in the platform byte order.\n*\n* @module @std...
javascript
chosen
[ { "from": "system", "value": "Add nodes in reverse order.\n" }, { "from": "human", "value": "// Only U/I related JS goes here.\n\nfunction sectionNode(ctx, page) {\n page.nodesKnown = page.nodesKnown ||\n _.sortBy(instances(ctx, \"nodeKnown\"), \"name\").reverse();\n page.nodesWanted = page...
javascript
chosen
[ { "from": "system", "value": "Handle non-null falsey keys correctly\n" }, { "from": "human", "value": "import ensureObject from './ensure-object.js';\nimport isArray from './is-array.js';\nimport isObject from './is-object.js';\nimport normalizeField from './normalize-field.js';\nimport normaliz...
javascript
chosen
[ { "from": "system", "value": "Remove redundant newline from Colorbox init JS.\n" }, { "from": "human", "value": "$(document).ready(function () {\n $.colorbox.settings = $.extend({}, $.colorbox.settings, {\n maxWidth: '90%',\n opacity: 0.7,\n scrolling: false\n });\n...
javascript
chosen
[ { "from": "system", "value": "Use cssPreprocessor instead of cssFrameworkOptions\n" }, { "from": "human", "value": "import generateBootstrapCss from './generateBootstrapCss';\nimport generateCssFrameworkNone from './generateCssFrameworkNone';\n\nasync function generateCssFramework(params) {\n i...
javascript
chosen
[ { "from": "system", "value": "Apply connectDropTarget to element instead of ref / domNode\n\n" }, { "from": "human", "value": "import React from 'react'\nimport { DropTarget } from 'react-dnd'\nimport BigCalendar from 'react-big-calendar'\nimport { findDOMNode } from 'react-dom'\nimport { update...
javascript
chosen
[ { "from": "system", "value": "Fix issue when root is being ignored if passed as an empty string.\n" }, { "from": "human", "value": "// TODO: Make options linear.\n// Would make configuration more user friendly.\n'use strict'\n\nvar path = require('path')\nvar packageName = 'chewingum'\n\nmodule....
javascript
chosen
[ { "from": "system", "value": "Fix reading field value to model\n" }, { "from": "human", "value": "import $ from 'jquery'\nimport template from '../../lib/environment.html'\n\nexport default function EnvironmentController(model) {\n const $element = $(template)\n\n $element.find(\":input[name='...
javascript
chosen
[ { "from": "system", "value": "Clear the app token once it is sent to Movim\n" }, { "from": "human", "value": "var Presence = {\n clearQuick : function() {\n localStorage.removeItem('quickDeviceId');\n localStorage.removeItem('quickLogin');\n localStorage.removeItem('quick...
javascript
chosen
[ { "from": "system", "value": "Insert missing 'use strict' statement\n" }, { "from": "human", "value": "/**\n* No operation.\n*\n* @module @stdlib/utils/noop\n*\n* @example\n* var noop = require( '@stdlib/utils/noop' );\n*\n* noop();\n* // ...does nothing.\n*/\n\n// MODULES //\n\nvar noop = requi...
javascript
chosen
[ { "from": "system", "value": "Update test: Enable trim whitespace\n" }, { "from": "human", "value": "var fs = require( 'fs' )\nvar assert = require( 'assert' )\nvar GPT = require( '../' )\n\ndescribe( 'GUID Partition Table', function() {\n \n describe( 'BOOTCAMP', function() {\n \n const...
javascript
chosen
[ { "from": "system", "value": "Update Application JS to Include JQuery\n\nInclude the 'jquery' line in the application.js in order to fix the\n\"undefined jquery\" error being reported in the browser.\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into applicati...
javascript
chosen
[ { "from": "system", "value": "Fix bug in helper where undefined could get passed as argument to Ember.get\n" }, { "from": "human", "value": "import Ember from 'ember'\nconst {Helper, get} = Ember\n\nexport function getTypedComponentName ([componentKeyNamesForTypes, itemTypeKey, model, componentK...
javascript
chosen
[ { "from": "system", "value": "Initialize the EventListener so that it looks like a proper listener\n" }, { "from": "human", "value": "/* -*- js2-basic-offset: 2; indent-tabs-mode: nil; -*- */\n/* vim: set ft=javascript ts=2 et sw=2 tw=80; */\n\"use strict\";\n\nlet can = require(\"../shims/can\"...
javascript
chosen
[ { "from": "system", "value": "Add underline to wysiwyg tool bar\n" }, { "from": "human", "value": "CKEDITOR.editorConfig = function (config) {\n config.filebrowserImageBrowseLinkUrl = '/ckeditor/pictures';\n config.filebrowserImageBrowseUrl = '/ckeditor/pictures';\n config.filebrowserImageUpl...
javascript
chosen
[ { "from": "system", "value": "Add comment for users delete route\n" }, { "from": "human", "value": "import koaRouter from 'koa-router'\nimport {create, remove} from './collection'\n\nconst router = koaRouter()\n\nrouter.post('/', function* () {\n let login = this.request.body.login\n , passw...
javascript
chosen
[ { "from": "system", "value": "Add async and defer support\n" }, { "from": "human", "value": "//= require js.cookie\n'use strict';\n\ndocument.addEventListener('DOMContentLoaded', function() {\n\n var cookiesEu = {\n init: function() {\n var cookiesEuOKButton = document.querySelector('.j...
javascript
chosen
[ { "from": "system", "value": "Simplify config of the Echidna-specific profile\n" }, { "from": "human", "value": "\n// Working Draft profile\n\nexports.name = \"WD-Echidna\";\nexports.config = {\n status: \"WD\"\n, longStatus: \"Working Draft\"\n, previousVersion: tr...
javascript
chosen
[ { "from": "system", "value": "Use latest version of ES\n" }, { "from": "human", "value": "module.exports = {\n extends: 'paazmaya',\n rules: {\n 'no-console': 0,\n 'no-process-env': 0,\n 'no-process-exit': 0\n }\n};\n" }, { "from": "gpt", "value": "module.exports = {\n e...
javascript
chosen
[ { "from": "system", "value": "Add no-trailing-spaces rule to eslint.\n\nChange-Id: I00d938706613b041b2896f40f70edf71c3f943d1\n" }, { "from": "human", "value": "module.exports = {\n extends: ['eslint:recommended', 'google'],\n env: {\n es6: true,\n node: true,\n mocha: true,\n },\n p...
javascript
chosen
[ { "from": "system", "value": "Reduce overhead trying to shorten line\n" }, { "from": "human", "value": "var angularMeteorTemplate = angular.module('angular-blaze-template', []);\n\n// blaze-template adds Blaze templates to Angular as directives\nangularMeteorTemplate.directive('blazeTemplate', [...
javascript
chosen
[ { "from": "system", "value": "Fix import path for unit tests\n" }, { "from": "human", "value": "import draftail from '../../../../../client/src/components/Draftail';\n\n// Expose as a global variable, for integration with other scripts.\nwindow.draftail = draftail;\n" }, { "from": "gpt",...
javascript
chosen
[ { "from": "system", "value": "Create first message hook into parse server\n" }, { "from": "human", "value": "// global var for holding job references for later cancelling\nconst schedule = require('node-schedule');\nconst moment = require('moment');\nconst {MessagesDb} = require('../../pouchdb')...
javascript
chosen
[ { "from": "system", "value": "Refactor plugins/titlecase to use render instead of prerender\n" }, { "from": "human", "value": "const helper = require(\"helper\");\nconst titlecase = helper.titlecase;\nconst cheerio = require(\"cheerio\");\n\nfunction prerender(html, callback, options) {\n const...
javascript
chosen
[ { "from": "system", "value": "Add styling for h6 elements to be used as image captions\n" }, { "from": "human", "value": "/**\n*\n* ContentBlock\n*\n*/\n\nimport React from 'react';\nimport styled, { ThemeProvider } from 'styled-components';\nimport { injectIntl } from 'react-intl';\n\nconst Lat...
javascript
chosen
[ { "from": "system", "value": "[ADD] Add /login as a valid route during the race\n" }, { "from": "human", "value": "import React from 'react';\nimport { BrowserRouter, Switch, Route, Redirect } from 'react-router-dom';\nimport NotFoundPage from '../../../pages/NotFound';\nimport AppContainer from...
javascript
chosen
[ { "from": "system", "value": "Rename sendMessage, remove stringify, check if message passed is of type string. (According to JC's comments).\n" }, { "from": "human", "value": "'use strict';\n\nconst Promise = require('promise');\nconst azure = require('azure-sb'); \nconst trackDependency = requi...
javascript
chosen
[ { "from": "system", "value": "Fix the mispelling of the addObservers method\n" }, { "from": "human", "value": "\n/*\nvar Entry = function(title, content, tags, observers) {\n this.title = title;\n this.content = content;\n this.tags = tags; // TODO esto lo vamos a hacer asi al final ?...
javascript
chosen
[ { "from": "system", "value": "Create customer list controller, for custmers view.\n\n– saas-95\n" }, { "from": "human", "value": "'use strict';\n\n(function() {\n angular.module('ncsaas')\n .controller('CustomerDetailUpdateController', [\n '$routeParams',\n '$rootScope',\n 'cu...
javascript
chosen
[ { "from": "system", "value": "Switch to use the playback API\n" }, { "from": "human", "value": "import path from 'path';\n\nconst browser = WindowManager.getAll('main')[0];\nconst resetThumbbarButtons = (isPlaying) => {\n browser.setThumbarButtons([\n {\n tooltip: 'Previous Track',\n ...
javascript
chosen
[ { "from": "system", "value": "Include seconds on format passed to API\n - so output from the API matches the input.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('confRegistrationWebApp')\n .directive('crsDatetimepicker', function () {\n return {\n templateUrl: 'vie...
javascript
chosen
[ { "from": "system", "value": "Replace deprecated beforeCreate with 'before save' observer\n" }, { "from": "human", "value": "module.exports = function(user) {\n\n user.beforeCreate = function(next, user) {\n if (user.username == undefined) {\n user.username = user.email;\n }\n use...
javascript
chosen
[ { "from": "system", "value": "Remove `Component` suffix from generated class name" }, { "from": "human", "value": "'use strict';\n\nconst stringUtils = require('ember-cli-string-utils');\nconst validComponentName = require('ember-cli-valid-component-name');\nconst normalizeEntityName = require('...
javascript
chosen
[ { "from": "system", "value": "Change index-html example to use transpiled lib\n" }, { "from": "human", "value": "var path = require(\"path\");\n\nvar indexHtml = path.join(__dirname, \"app\", \"index.html\");\n\nmodule.exports = {\n entry: [\n path.join(__dirname, \"app\", \"main.js\")...
javascript
chosen
[ { "from": "system", "value": "Replace facebook options with crowdtangle\n" }, { "from": "human", "value": "angular.module('Aggie')\n\n.value('mediaOptions', ['twitter', 'facebook', 'rss', 'elmo', 'smsgh', 'whatsapp', 'crowdtangle'])\n\n.value('apiSettingsOptions', ['twitter', 'facebook', 'elmo',...
javascript
chosen
[ { "from": "system", "value": "Change icl8 to use new resource format" }, { "from": "human", "value": "define(['mac/palette256'], function(palette) {\n\n 'use strict';\n \n return function(resource) {\n if (resource.data.length !== 1024) {\n console.error('icl8 resource expected to be ...
javascript
chosen
[ { "from": "system", "value": "Revert \"fix: Adds missing qunit-dom setup invocation\"\n\nThis reverts commit c8bf7bbd7257f77818bb3c306d24a8cde7b9fd4c.\n\nTemporarily rolls back qunit-dom migration (the change is bound to\nember-qunit@5+).\n" }, { "from": "human", "value": "import Application fro...
javascript
chosen
[ { "from": "system", "value": "Move disparate functions into groups of functions to call.\n" }, { "from": "human", "value": "/* global SW:true */ \n\n$(document).ready(function(){\n 'use strict';\n console.log( 'Doing SW things!' );\n var card = new SW.Card();\n var helpdesk = card.services(...
javascript
chosen
[ { "from": "system", "value": "Add parameter to request library that throws for unsuccessful HTTP requests.\n" }, { "from": "human", "value": "'use strict';\nconst angular = require('angular');\nconst app = angular.module('app');\nconst request = require('request');\n\napp.factory('apiQueues', qu...
javascript
chosen
[ { "from": "system", "value": "Remove a context from the list of Executors when completed\n" }, { "from": "human", "value": "angular.module('executorModule').controller('ExecutorListController', ['$scope', '$http', 'FoundationApi',\n\nfunction ($scope, $http, foundationApi) {\n $scope.pipeline...
javascript
chosen
[ { "from": "system", "value": "Fix top user/ip links in the analytics view.\n" }, { "from": "human", "value": "Admin.StatsFacetTableView = Ember.View.extend({\n templateName: 'stats/_facet_table',\n\n setLinks: function() {\n _.each(this.data, _.bind(function(term) {\n var params = _.cl...
javascript
chosen
[ { "from": "system", "value": "Fix displaying navbar when is collapsed.\n\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { Link } from \"react-router-dom\";\n\nclass HeaderComponent extends Component {\n constructor(props) {\n super(props)\n\n ...
javascript
chosen
[ { "from": "system", "value": "Update code to follow new Eslint rules, eslint-plugin-jsx-a11y\n" }, { "from": "human", "value": "import React from 'react';\nimport Navbar from '../Navbar/NavbarComponent';\nimport Footer from '../Footer/FooterContainer';\nimport './App.scss';\n\nexport default cla...
javascript
chosen
[ { "from": "system", "value": "Support Grappelli in inline ckeditor initialisation.\n" }, { "from": "human", "value": "$(function() {\n initialiseCKEditor();\n initialiseCKEditorInInlinedForms();\n\n function initialiseCKEditorInInlinedForms() {\n $(\".add-row a\").click(function ...
javascript
chosen
[ { "from": "system", "value": "Add notification for password change\n" }, { "from": "human", "value": "/**\n * Alerts Controller\n */\n\nangular\n .module('RDash')\n .controller('changePasswordCtrl', ['$scope', 'User', changePasswordCtrl]);\n\nfunction changePasswordCtrl($scope, User) {\n\n...
javascript
chosen
[ { "from": "system", "value": "Add check to ensure that the input has been parsed." }, { "from": "human", "value": "// Test for actor system parser.\n\nvar code = \n \"actor ScriptConsole(inStream, outStream, errStream){\\n\" + \n \"var reader = IO.LineReader(inStream);\\n\"+\n \"var out...
javascript
chosen
[ { "from": "system", "value": "Increase size when tablet mode\n" }, { "from": "human", "value": "import React from 'react';\nimport styled from 'styled-components';\n\nconst InformationWrapper = styled.section`\n text-align: center;\n padding: 1.6rem 0;\n`;\n\nconst Name = styled.h1`\n font-si...
javascript
chosen
[ { "from": "system", "value": "Add more logs and try catch to see what's happening with function\n" }, { "from": "human", "value": "var fs = require('fs');\n\nmodule.exports = function (context, xmlZipBlob) {\n context.log('Node.js blob trigger function processed blob:', xmlZipBlob);\n cont...
javascript
chosen
[ { "from": "system", "value": "Resolve class based transform deprecation\n\nember-source 3.27+: Using class based template compilation plugins is deprecated, please update to the functional style\n" }, { "from": "human", "value": "'use strict';\n\n/* eslint-env node */\n\nlet TEST_SELECTOR_PREFIX...
javascript
chosen
[ { "from": "system", "value": "Fix scoping bug in join/leave toggle JS.\n" }, { "from": "human", "value": "$(function() {\n\n var cookieName = 'gnotty-hide-joins-leaves';\n\n // Checks the joins/leaves cookie and returns false if its\n // checkbox has been unchecked, and join/leave messa...
javascript
chosen
[ { "from": "system", "value": "Add print, input, yes/no, many related functions\n\nFull list of affected functions: p p2b yn yn2i i iai s2i i2s" }, { "from": "human", "value": "/**\n * $ - the HTML element lookup function.\n * @param id of the element\n * @return the corresponding element\n */\nf...
javascript
chosen
[ { "from": "system", "value": "Add linting of unused arguments\n" }, { "from": "human", "value": "// Variables http://eslint.org/docs/rules/#variables\n\nmodule.exports = {\n\t\"rules\": {\n\t\t\"init-declarations\": [ \"error\", \"always\" ], // enforce or disallow variable initializations at d...
javascript
chosen
[ { "from": "system", "value": "Set priority on incoming nodes starting opacity.\n\nSimilar to 1740afee36da67cfbee9d36703f9e93f9735ecde\n" }, { "from": "human", "value": "var partialRight = require('./partial-right')\n , d3 = require('d3')\n , DnD = require('./dnd')\n\nmodule.exports = function ...
javascript
chosen
[ { "from": "system", "value": "Move parser object into port open\n" }, { "from": "human", "value": "/* eslint-disable node/no-missing-require */\n'use strict';\nconst SerialPort = require('../../');\nconst exec = require('child_process').exec;\n\n// Serial receiver device \nconst port = process.e...
javascript
chosen
[ { "from": "system", "value": "Fix typo in previous commit\n" }, { "from": "human", "value": "import Component from \"@ember/component\";\nimport { get, set } from \"@ember/object\";\nimport { next, scheduleOnce } from \"@ember/runloop\";\nimport layout from \"./template.hbs\";\nimport \"./styles...
javascript
chosen
[ { "from": "system", "value": "Add unique constraint to user email\n" }, { "from": "human", "value": "module.exports = {\n up: function (migration, DataTypes) {\n return migration.createTable('Users', {\n id: {\n primaryKey: true,\n allowNull: false,\n type: DataType...
javascript
chosen
[ { "from": "system", "value": "Extend will not be removed in 2.9\n" }, { "from": "human", "value": "'use strict';\nconst extend = require('underscore').extend;\nconst deprecated = require('@arangodb/deprecated');\n\nexports.extend = function (protoProps, staticProps) {\n deprecated('2.9', '\"ext...
javascript
chosen
[ { "from": "system", "value": "Add reducer to change highlighted state of help button\n" }, { "from": "human", "value": "import { Map } from 'immutable';\n\nconst tutorial = (\n state = Map({\n active: false,\n current: 0,\n totalPopUps: 0\n }),\n action\n) => {\n switch (action.type...
javascript
chosen
[ { "from": "system", "value": "Return the hash after parsing :)\n" }, { "from": "human", "value": "'use strict';\n\nvar Backbone = require('backbone');\nvar BusinessModel = Backbone.Model.extend({\n\tparse: function(data) {\n console.log(data.name);\n this.name = data.name;\n this.addres...
javascript
chosen
[ { "from": "system", "value": "Index now dynamically loads libraries.\n" }, { "from": "human", "value": "require('coffee-script');\n\n// ---\n\n['command', 'instance', 'list', 'machine', 'parse', 'show'].forEach(function (module) {\n\texports[module] = require('./' + module + '.coffee');\n});\n" ...
javascript
chosen
[ { "from": "system", "value": "Set compression flag to false\n" }, { "from": "human", "value": "import rantscript from 'rantscript';\r\nimport { FETCH_RANTS, RESET_PAGE } from '../consts/rants';\r\nimport { STATE } from '../consts/state';\r\n\r\nexport function fetch(type, amount, page = 0) {\r\n...
javascript
chosen
[ { "from": "system", "value": "Remove shortcut for focusing the searchbox\n" }, { "from": "human", "value": "import Component from '@ember/component';\nimport layout from './template';\nimport { EKMixin, keyUp } from 'ember-keyboard';\nimport { on } from '@ember/object/evented';\n\nexport default...
javascript
chosen
[ { "from": "system", "value": "Fix styling of body cells\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from './template';\n\n\nexport default Ember.Component.extend({\n layout: layout,\n classNames: ['eg-body-cell'],\n attributeBindings: ['style', 'rowIndex:data-...
javascript
chosen
[ { "from": "system", "value": "Make sure to keep the page title up to date\n" }, { "from": "human", "value": "App.ApplicationController = Em.Controller.extend({\n metadata: null\n});\n" }, { "from": "gpt", "value": "App.ApplicationController = Em.Controller.extend({\n metadata: null...
javascript
chosen
[ { "from": "system", "value": "Set User-Agent on all requests\n" }, { "from": "human", "value": "// @flow\n\nglobal.rawFetch = global.fetch\n\nfunction status(response) {\n if (response.status >= 200 && response.status < 300) {\n return response\n } else {\n let error = new Error(response...
javascript
chosen
[ { "from": "system", "value": "Make only the testConnection method async and remove the call to it from create\n" }, { "from": "human", "value": "var debug = require(\"debug\")(\"provider\");\nvar Web3 = require(\"web3\");\nvar { Web3Shim } = require(\"@truffle/interface-adapter\");\n\nvar wrappe...
javascript
chosen
[ { "from": "system", "value": "Test that Redux does not lose subscribers on hot reload\n" }, { "from": "human", "value": "import expect from 'expect';\nimport jsdom from 'mocha-jsdom';\nimport React, { PropTypes, Component } from 'react/addons';\nimport { createRedux } from '../../src';\nimport {...
javascript
chosen
[ { "from": "system", "value": "Change script add API call\n" }, { "from": "human", "value": "define('app/controllers/scripts', ['app/controllers/base_array', 'app/models/script'],\n //\n // Scripts Controller\n //\n // @returns Class\n //\n function (BaseArrayController, Scrip...
javascript
chosen
[ { "from": "system", "value": "Use Controller instead of ArrayController.\n\nCloses #551\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.ArrayController.extend({\n actions: {\n logLabel( dateObjects ) {\n window.console.log( dateObjects[ ...
javascript
chosen
[ { "from": "system", "value": "Resolve error when settings does not have globals/locals objects\n\nCloses #49\n" }, { "from": "human", "value": "const fs = require('fs-extra'),\n Path = require('path');\n\nvar _settings = { // Private storage of settings\n global: {},\n local: {}...
javascript
chosen
[ { "from": "system", "value": "Change icons and content for volunteer section" }, { "from": "human", "value": "import React from 'react';\nimport { FaClockO, FaHandScissorsO } from 'react-icons/lib/fa';\nimport styles from './volunteerChars.css';\n\nconst VolunteerCharacteristics = () => (\n <di...
javascript
chosen
[ { "from": "system", "value": "Move initialisation code over to datetime object" }, { "from": "human", "value": "/**\r\n * DateTime object\r\n */\r\nvar DateTime = Backbone.Model.extend({\r\n\r\n defaults: {\r\n },\r\n\r\n initialize: function () {\r\n },\r\n});\r\n" }, { "fro...
javascript
chosen
[ { "from": "system", "value": "patron-client: Fix for reducer hot loading\n" }, { "from": "human", "value": "import { browserHistory } from 'react-router'\nimport thunkMiddleware from 'redux-thunk'\nimport { createStore, applyMiddleware, compose } from 'redux'\nimport { routerMiddleware } from 'r...
javascript
chosen
[ { "from": "system", "value": "chore: Refactor Bukkit to MCPR conversion so that it is readable\n" }, { "from": "human", "value": "const slugify = require('./slug.js')\nconst bukkitApi = require('./bukkitApi')\n\nfunction convertModel (bukkit) {\n return new Promise(function (resolve, reject) {\...
javascript
chosen
[ { "from": "system", "value": "Add support for Redux Devtools extension\n" }, { "from": "human", "value": "import moment from 'moment';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { AppContainer as HotAppContainer } from 'react-hot-loader';\nimport { applyMiddleware, cr...
javascript
chosen
[ { "from": "system", "value": "Reformat one-line var collection test lists\n" }, { "from": "human", "value": "'use strict';\n\nvar expect = require('chai').expect;\nvar VariableCollection = require('../app/scripts/variable-collection');\nvar Variable = require('../app/scripts/variable');\n\ndescr...
javascript
chosen
[ { "from": "system", "value": "Fix Product Picker to lookup SKU.\n\n Before:\n Ransack was not finding sku on product, thereby it was not including\n it in the search.\n\n After:\n Sku is correctly looked up on the product master.\n" }, { "from": "human", "value": "$.fn.productAutocomp...
javascript
chosen
[ { "from": "system", "value": "FIX crash on undefined or null 'who'\n" }, { "from": "human", "value": "\"use strict\"\n\nimport {Store} from \"flummox\"\nimport find from \"lodash/collection/find\"\n\n\nexport default class PollStore extends Store {\n\n constructor(flux) {\n super();\n\n t...
javascript
chosen
[ { "from": "system", "value": "Fix skip to program button markup\n" }, { "from": "human", "value": "const About = () => {\n return (\n <header id=\"about\" className=\"component\">\n <a href=\"/\" id=\"about-mainPageButton\">Gå til hovedsiden</a>\n\n <img className=\"about-header-lo...
javascript
chosen
[ { "from": "system", "value": "Fix content type integration test\n" }, { "from": "human", "value": "'use strict';\n\nbuster.testCase('Content Type', {\n prepare: function() {\n this.timeout = 30e3;\n },\n\n 'can be read': function() {\n return client.contentType('cat').then(function(cont...
javascript
chosen
[ { "from": "system", "value": "Remove util functions that the refactor has rendered unnecessary\n" }, { "from": "human", "value": "var utils = {\n // probably doesn't handle some cases correctly, but it works fine for what\n // we have now\n deepCopy: function(original) {\n var result;\n ...
javascript
chosen
[ { "from": "system", "value": "Make all these top level\n" }, { "from": "human", "value": "export {default as abstract} from \"./abstract\"\nexport {default as isNewRecord} from \"./isNewRecord\"\nexport {default as isPersisted} from \"./isPersisted\"\nexport {default as isValid} from \"./isValid...
javascript
chosen
[ { "from": "system", "value": "Enable to type dot(.) in title\n\nChanged 'keypress' event to 'keyup' event since keypress event is for printable characters.\n\nAuthor: Mina Lee <minalee@nflabs.com>\n\nCloses #95 from minahlee/fix/enable_dot_in_title and squashes the following commits:\n\n9100fa6 [Mina Lee] E...
javascript
chosen
[ { "from": "system", "value": "Update vector-im to riot-im on Login\n\nSigned-off-by: Andrew (anoa) <1e90ef5887ac4934847b7d77145a2a1355b08439@openmailbox.org>\n" }, { "from": "human", "value": "/*\nCopyright 2015, 2016 OpenMarket Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"Licens...
javascript
chosen
[ { "from": "system", "value": "Allow to set empty credentials (no authentication) for GOCD server\n" }, { "from": "human", "value": "var config = {\n // Name of built js-file\n jsFilename: 'app.js',\n // Port to run the application on\n port: process.env.gocdmonitor_port || 3000,\n ...
javascript
chosen
[ { "from": "system", "value": "Support DiskCopy 4.2 header shift" }, { "from": "human", "value": "define(function() {\n\n 'use strict';\n \n function NO_OP(){}\n \n function split(segment, entries) {\n \n var maybeHFS = segment.getBytes(512 * 2, 2).then(function(sigBytes) {\n var si...
javascript
chosen