conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix national caseload screen, ensure ID isn't used in query\n" }, { "from": "human", "value": "const knex = require('../../../knex').web\nconst orgUnitFinder = require('../helpers/org-unit-finder')\nconst ORGANISATION_UNIT = require('../../constants/organisation-uni...
javascript
chosen
[ { "from": "system", "value": "Make tooltips work when tabbing\n\nFixed the tooltips on IE, and changed the background colour to be\nnicer on Firefox.\n\nPatch by: Haoyu Bai <baihaoyu@gmail.com>\n" }, { "from": "human", "value": "$(function() {\n $('tr[title]').bt();\n});" }, { "from": "...
javascript
chosen
[ { "from": "system", "value": "Set default value to true\n" }, { "from": "human", "value": "module.exports = (sequelize, Sequelize) => {\n const Like = sequelize.define('likes', {\n id: {\n type: Sequelize.INTEGER,\n primaryKey: true,\n allowNull: false,\n autoIncrement: t...
javascript
chosen
[ { "from": "system", "value": "Make it work with pages which use `serverTiming`\n" }, { "from": "human", "value": "(function(){\n 'use strict';\n\n if (document.readyState === 'complete') {\n startCollect();\n } else {\n window.addEventListener('load', startCollect);\n }\n\n function s...
javascript
chosen
[ { "from": "system", "value": "Move instance count closer to set operator symbol\n" }, { "from": "human", "value": "var RoundNode = require(\"./RoundNode\");\n\nmodule.exports = (function () {\n\n\tvar radius = 40;\n\n\tvar o = function (graph) {\n\t\tRoundNode.apply(this, arguments);\n\n\t\tvar ...
javascript
chosen
[ { "from": "system", "value": "Clean DO sidebar METS data on failure\n" }, { "from": "human", "value": "(function () {\n\n 'use strict';\n\n angular.module('drmc.directives').directive('arDigitalObjectViewerSidebar', function (SETTINGS, InformationObjectService, ModalDigitalObjectViewerService)...
javascript
chosen
[ { "from": "system", "value": "Extend the component generator of the base generator\n" }, { "from": "human", "value": "'use strict';\nconst Generator = require('yeoman-generator');\n\nclass ComponentGeneratorWrapper extends Generator {\n\n constructor(args, opts) {\n super(args, opts);\n t...
javascript
chosen
[ { "from": "system", "value": "Allow passing a scope to enable/disable methods. Defaults to base scope\n" }, { "from": "human", "value": "import debugLib from 'debug';\n\nconst BASE_SCOPE = 'cornerstoneTools';\nconst baseLogger = debugLib(BASE_SCOPE);\n\n// TODO: Have webpack set this appropriate...
javascript
chosen
[ { "from": "system", "value": "Add Adress to lat, lng converter\n" }, { "from": "human", "value": "define([\"backbone\", \"underscore\" ], function(Backbone, _) {\n var UserProfile = Backbone.Model.extend({\n \t//data attributes\n defaults: {\n \tage: null,\n \tgender: null,\...
javascript
chosen
[ { "from": "system", "value": "Add a breaking change to hello_test to show example of Travis failure.\n" }, { "from": "human", "value": "var mocha = require('mocha');\nvar chai = require('chai');\nvar assert = require('chai').assert;\nvar hello = require('../src/hello');\n\ndescribe('hello', func...
javascript
chosen
[ { "from": "system", "value": "Fix up recent filter even though we should remove it.\n" }, { "from": "human", "value": "Application.Filters.filter('reviewFilter', function () {\n return function (reviews, status) {\n if (reviews) {\n var arr = [];\n for (var i = 0;...
javascript
chosen
[ { "from": "system", "value": "Fix test to work on unix.\n" }, { "from": "human", "value": "var cmd = \"node \" + __dirname + \"\\\\..\\\\bin\\\\kudusync\";\nvar ignoredTestsMap = {};\n\nexports.cmd = cmd;\nexports.ignoredTestsMap = ignoredTestsMap;\n" }, { "from": "gpt", "value": "va...
javascript
chosen
[ { "from": "system", "value": "Test now draws closed cards from rightnow\n" }, { "from": "human", "value": "var trello = require('node-trello');\nvar t = new trello(\"appkey\", \"usertoken\");\n\n// Get a list of cards created today\nvar d = new Date();\nd.setHours(0,0,0,0);\nt.get(\"/1/boards/ta...
javascript
chosen
[ { "from": "system", "value": "Handle empty values for shape commands\n" }, { "from": "human", "value": "export default function parse(input) {\n let c = '';\n let i = 0;\n let temp = '';\n let result = {};\n let key = '';\n let value = '';\n while ((c = input[i++]) !== undefined) {\n i...
javascript
chosen
[ { "from": "system", "value": "Add scrollPosition function call on messages template ready\n" }, { "from": "human", "value": "if (Meteor.isClient) {\n\n Accounts.ui.config({\n passwordSignupFields: 'USERNAME_ONLY'\n });\n\n Template.messages.helpers({\n messages: function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add slug to post object\n" }, { "from": "human", "value": "\nfunction getPosts() {\n const req = require.context(\"../posts\", true, /^\\.\\/.*\\.md$/);\n const dirtyFileNames = req.keys();\n\n return dirtyFileNames.map(f => {\n const spl = f.split('...
javascript
chosen
[ { "from": "system", "value": "Revert \"Updated semantic ui dependency.\"\n\nThis reverts commit 32d815b9e0415822d4721eb86cf94d2ff46be786.\n" }, { "from": "human", "value": "// Meteor package definition.\nPackage.describe({\n name: 'aramk:notifications',\n version: '0.2.0',\n summary: 'A notif...
javascript
chosen
[ { "from": "system", "value": "Create and clean the test root directory when starting test cases\n" }, { "from": "human", "value": "'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\nconst rimraf = require('rimraf');\n\nconst root = path.join(__dirname, '../temp');\n\nfunc...
javascript
chosen
[ { "from": "system", "value": "Use the enviroment ports and host if avaliable\n" }, { "from": "human", "value": "process.env.BABEL_ENV = 'development';\nprocess.env.NODE_ENV = 'development';\n\nconst WebpackServe = require('webpack-serve');\nconst config = require('../config/webpack.config.dev');...
javascript
chosen
[ { "from": "system", "value": "Move HTTP POST to service\n" }, { "from": "human", "value": "angular\n .module('app', [\n ])\n .controller('ChatBoxController', ['$http', function($http) {\n const chat = this;\n chat.msgs = ['Welcome to Chat Bot!'];\n\n chat.submitMsg = function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Change cookie expire date to 10 years\n\n" }, { "from": "human", "value": "function setCookie(cname,cvalue,exdays) {\n let d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n //toGTMString exists\n let expires = \"expires=\" + d.toGMTString();\n...
javascript
chosen
[ { "from": "system", "value": "Correct path for the \"node_modules\" directory\n" }, { "from": "human", "value": "\"use strict\";\n\n/*\n * Configuration for the application\n * @type {\n * npm: '', // Absolute path to \"node_modules\" directory for NPM installed libraries and modu...
javascript
chosen
[ { "from": "system", "value": "Fix deprecated promise API call\n" }, { "from": "human", "value": "'use babel'\n\nimport Opener from '../opener'\n\nexport default class AtomPdfOpener extends Opener {\n open (filePath, texPath, lineNumber, callback) {\n // Opens PDF in a new pane -- requires pd...
javascript
chosen
[ { "from": "system", "value": "Use 'localhost' for the server (default)\n" }, { "from": "human", "value": "'use strict';\n\nexport const AppConfigConstant = {\n\tdebug: true,\n\tlogLevel: 'INFO'\n};\n" }, { "from": "gpt", "value": "'use strict';\n\nexport const AppConfigConstant = {\n...
javascript
chosen
[ { "from": "system", "value": "Fix publicPath for development server\n" }, { "from": "human", "value": "import path from \"path\";\n\nimport { ENTRY_PATH, OUTPUT_PATH } from \"../constants\";\n\nimport {\n isDevelopment,\n isProduction,\n isReact,\n resolveExternal,\n resolveInternal\n} from...
javascript
chosen
[ { "from": "system", "value": "Test case rename from checkstyle to jslint\n" }, { "from": "human", "value": "'use strict';\n\nvar should = require('should'),\n fs = require('fs'),\n xmlEmitter = require('../../lib/jslint_xml_emitter');\n\ndescribe('jslint_xml', function () {\n var mockXM...
javascript
chosen
[ { "from": "system", "value": "Enable the model to be accessible\n" }, { "from": "human", "value": "/*global require: false, exports: true, module: false */\nvar queries = require('./queries'),\n schemas = require('./schemas'),\n core = require('./coreworm')(queries),\n model = require('...
javascript
chosen
[ { "from": "system", "value": "Fix a bug in updater config\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\nvar program = require('commander'),\n colors = require('colors'),\n pkg = require('./package.json'),\n fs = require('fs');\n\nprogram\n .version(pkg.versio...
javascript
chosen
[ { "from": "system", "value": "Correct PropType to shut up React\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\n\nexport default class MapLayersPicker extends React.Component {\n\n\tstatic propTypes = {\n\t\ttitle: PropTypes.string,\n\t\tlayers: PropTypes.array.isRe...
javascript
chosen
[ { "from": "system", "value": "[BPK-989] Fix spinner theme attributes export\n" }, { "from": "human", "value": "/*\n * Backpack - Skyscanner's Design System\n *\n * Copyright 2017 Skyscanner Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this fil...
javascript
chosen
[ { "from": "system", "value": "Change the order of the update matchday menu\n" }, { "from": "human", "value": "(function() {\n\t'use strict';\n\t\n\tangular\n\t\t.module('app.matchday')\n\t\t.controller('UpdateRankMatchday', UpdateRankMatchday);\n\n\tfunction UpdateRankMatchday(initData, $scope, ...
javascript
chosen
[ { "from": "system", "value": "Test with latest jsdom, fix access to window\n" }, { "from": "human", "value": "var jsdom = require(\"jsdom\");\nvar fs = require('fs');\nvar path = require('path');\nvar assert = require('assert');\n\nfs.readdirSync(__dirname).filter(function(file) {\n\tif (path.ex...
javascript
chosen
[ { "from": "system", "value": "Allow IE8 to pass hasDOM check.\n" }, { "from": "human", "value": "\n/*\n Ember can run in many different environments, including environments like\n Node.js where the DOM is unavailable. This object serves as an abstraction\n over the browser features that Ember...
javascript
chosen
[ { "from": "system", "value": "Allow indices greater than standard array length\n" }, { "from": "human", "value": "import fromPairs from 'lodash.frompairs';\n\nexport default class ArrayIndicesProxy {\n constructor(targetArray, handler) {\n const newHandler = fromPairs(Object.entries(handler)...
javascript
chosen
[ { "from": "system", "value": "Send http status 403 when stats is hidden\n" }, { "from": "human", "value": "const {readFileSync} = require('fs')\nconst {resolve} = require('path')\n\nfunction createRequestDecorator (stats) {\n return (req, res, next) => {\n res.locals = res.locals || Object.c...
javascript
chosen
[ { "from": "system", "value": "Fix bug preventing a credential from being set\n\nCloses arigatomachine/cli#685\n" }, { "from": "human", "value": "'use strict';\n\nvar credentials = exports;\ncredentials.isNewAPI = true;\n\nvar utils = require('common/utils');\n\ncredentials.get = function (client...
javascript
chosen
[ { "from": "system", "value": "Add html plugin to production config\n" }, { "from": "human", "value": "var webpack = require('webpack');\nvar loaders = require('./webpack.loaders');\nvar autoprefixer = require('autoprefixer');\nvar path = require('path');\n\nvar outpath = path.join(__dirname, \"....
javascript
chosen
[ { "from": "system", "value": "Update css styling using jquery\n" }, { "from": "human", "value": "/**\n * Created by root on 9/19/17.\n */\n'use strict';\n\n$(document).ready(function () {\n $(\"#shl-item, #shl-price\").addClass('text-center');\n $(\".shl-input\").addClass('text-center');\n...
javascript
chosen
[ { "from": "system", "value": "[FIX] Correct scope in policy engine.\n" }, { "from": "human", "value": "const Promise = require('bluebird');\nconst requireAll = require('require-all');\nconst policies = requireAll(__dirname+'/../../config/policies/');\n\nfunction PolicyEngine() { \n this.policie...
javascript
chosen
[ { "from": "system", "value": "Fix spacing around curly brackets\n" }, { "from": "human", "value": "const sinon = require('sinon')\nconst chai = require('chai')\nconst sinonChai = require('sinon-chai')\nconst expect = chai.expect\nchai.use(sinonChai)\n\ndescribe('countryMapping', () => {\n const...
javascript
chosen
[ { "from": "system", "value": "Remove console logging from homecontroller\n" }, { "from": "human", "value": "app.controller('HomeController', ['$scope', 'stocks', function($scope, stocks) {\n\tstocks.success(function(data) {\n\t\t// if (data.query.count > 0) {\n\t\t\t// $scope.stocks = data.query...
javascript
chosen
[ { "from": "system", "value": "Drop the 'button' class because we don't need it anymore\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport Box from '../box';\nimport { ButtonGroup } from '../button';\nimport cx from 'class...
javascript
chosen
[ { "from": "system", "value": "Add tests for validating ember object (which would be the most used case :/)\n" }, { "from": "human", "value": "import validate from '../../../utils/validate';\nimport { module, test } from 'qunit';\n\nimport Required from 'ember-simple-validate/lib/validators/requi...
javascript
chosen
[ { "from": "system", "value": "Add correct flag to render different layout.\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\n\nimport { tile as tileConstants } from './constants';\n\nconst styles = {\n wrapper: {\n width: tileConstants.width,\n height: tileCons...
javascript
chosen
[ { "from": "system", "value": "Add to cart from item url.\n" }, { "from": "human", "value": "import _request from 'request-promise'\n\nconst jar = _request.jar()\nconst request = _request.defaults({\n headers: {'Content-Type': 'application/json'},\n jar,\n})\n\nconst SCV='https://www.alza.sk/Se...
javascript
chosen
[ { "from": "system", "value": "Remove obsolete React 15.3.0 workaround\n" }, { "from": "human", "value": "// ensure base DOM properties are already injected\nimport 'react-dom'\nimport DOMProperty from 'react-dom/lib/DOMProperty'\n\nexport { DOMProperty as _DOMProperty }\n\nexport const emailAttr...
javascript
chosen
[ { "from": "system", "value": "[Menu] Fix nested menus that can't be clicked issue\n\nThis fixes a regression that was introduced in https://github.com/callemall/material-ui/pull/3360. The previous `click-awayable` mixin listened on `mouseup` and `touchend` events and the new `ClickAwayListener` was implemen...
javascript
chosen
[ { "from": "system", "value": "Add example for invalidating specific paths\n" }, { "from": "human", "value": "if (!process.env[\"CLOUDFRONT_DISTRIBUTION_ID\"]) {\n throw new Error(\"CLOUDFRONT_DISTRIBUTION_ID env var must be set\");\n}\n\nCLOUDFRONT_DISTRIBUTION_ID = process.env[\"CLOUDFRONT_DIS...
javascript
chosen
[ { "from": "system", "value": "Test if next month button is initially disabled if current month is after the maxDate prop\n" }, { "from": "human", "value": "import Calendar from 'date-picker/calendar';\nimport injectTheme from '../fixtures/inject-theme';\nimport React from 'react';\nimport Calend...
javascript
chosen
[ { "from": "system", "value": "Fix path to \"util.js\" in test\n" }, { "from": "human", "value": "const util = require('../../lib/continuous-delivery/util');\n\ndescribe(\"Continuous delivery\", function() {\n describe(\"utils\", function() {\n describe(\"makeStringArray\", function() {...
javascript
chosen
[ { "from": "system", "value": "Make sure function runs even if one of the promise fails\n" }, { "from": "human", "value": "$(document).ready(function () {\n let zone;\n let district;\n\n let getZone = $.get('/inputs/geojson/zone', function (data) {\n zone = data;\n });\n\n l...
javascript
chosen
[ { "from": "system", "value": "Use presence subdomain in frontend\n" }, { "from": "human", "value": "module.exports = {\n presenceUrl: 'http://localhost:9870',\n backendUrl: 'http://backend.unichat.eu/api',\n};\n" }, { "from": "gpt", "value": "module.exports = {\n presenceUrl...
javascript
chosen
[ { "from": "system", "value": "Create a simple component without JSX\n" }, { "from": "human", "value": "import React from 'react'\nimport ReactDOM from 'react-dom'\n\nimport App from './App'\n\nReactDOM.render(<App />, document.getElementById('app'))" }, { "from": "gpt", "value": "imp...
javascript
chosen
[ { "from": "system", "value": "Fix bug in how loading indicator was created. You can now run xavier\ninside a frame.\n" }, { "from": "human", "value": "/*\n\nCopyright 2014 - 2016 Roland Bouman (roland.bouman@gmail.com)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may...
javascript
chosen
[ { "from": "system", "value": "Use simpler endpoint for barelyBot\n" }, { "from": "human", "value": "\"use strict\";\n\nconst express = require(\"express\");\nconst bodyParser = require(\"body-parser\");\n\nconst gutibot = require(\"./gutiBot\");\n\nconst barelyBot = require(\"./barelyBot\").bot;...
javascript
chosen
[ { "from": "system", "value": "Support for custom model names and view layers to add their own custom models\n" }, { "from": "human", "value": "/*\n * Initializes the model/data layer.\n * @param app - The Scroll app instance\n */\nmodule.exports = function(app) {\n // load the model layer modul...
javascript
chosen
[ { "from": "system", "value": "Use Element.getAttribute instead of `node.dataset`\n\nThis is more compatible with older browsers and makes it easier to use a\ntranspiler without requiring polyfills.\n" }, { "from": "human", "value": "module.exports = {\n server: server,\n client: client\n}\n\nv...
javascript
chosen
[ { "from": "system", "value": "Refactor waitForRequests to be more clear\n" }, { "from": "human", "value": "let timer = null\n\nfunction waitForRequests(mockedRequests) {\n return new Promise(resolve => {\n if (mockedRequests.length < 1) {\n resolve()\n return\n }\n\n timer = ...
javascript
chosen
[ { "from": "system", "value": "[FEATURE] Add view, function for registering admin if doesnt exist.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('publicApp')\n .controller('LoginCtrl', ['$scope', '$http', '$location', 'UserService', function ($scope, $http, $location, $user)...
javascript
chosen
[ { "from": "system", "value": "Make Sentry release for public-site consistent\n" }, { "from": "human", "value": "import bootstrapper from 'public_site/bootstrapper.react';\nimport Raven from 'raven-js';\n\nlet sentryDSN = 'https://27643f06676048be96ad6df686c17da3@app.getsentry.com/73366';\n\nRave...
javascript
chosen
[ { "from": "system", "value": "Make sure code is clean and readable.\n" }, { "from": "human", "value": "const getMonth = function month(string) {\n let date = new Date(string);\n let index = date.getMonth();\n let months = [\"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\...
javascript
chosen
[ { "from": "system", "value": "Fix lint error in test\n" }, { "from": "human", "value": "'use strict';\n\nvar http = require('http');\n\nvar assert = require('assertive');\n\nvar fetch = require('../lib/fetch');\n\ndescribe('fetch', function() {\n var server;\n\n before('start echo server', fun...
javascript
chosen
[ { "from": "system", "value": "Add render for seven hour.\n" }, { "from": "human", "value": "import React from 'react';\nimport WeatherIcons from '../weather_icons/WeatherIcons'\n\nconst SevenHour = ({hourlyForecast}) => {\n if(!hourlyForecast){\n return(\n <div></div>\n )\n }\n\n c...
javascript
chosen
[ { "from": "system", "value": "Write the code to read haproxy socket\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\n/* GET home page. */\nrouter.post('/', function(req, res) {\n\t//var param = JSON.parse(req.body.payload);\n\tconsole.log(re...
javascript
chosen
[ { "from": "system", "value": "Add broadcasts to Pipeland automagically\n" }, { "from": "human", "value": "\nimport winston from \"winston\";\nimport _ from \"underscore\";\n\nimport Broadcast from \"./classes/Broadcast\";\nimport ENV from \"./env\";\nimport SK from \"./sk\";\n\nconst broadcasts ...
javascript
chosen
[ { "from": "system", "value": "Fix for tests in zuul\n" }, { "from": "human", "value": "import test from 'tape';\nimport computedStyles from '../src/';\n\ndocument.body.innerHTML += `\n <style>\n div {\n font-family: sans-serif;\n }\n </style>\n <div id=\"node\" style=\"...
javascript
chosen
[ { "from": "system", "value": "Add the parent element to the list of potential targets\n" }, { "from": "human", "value": "var arrayUnion = require('array-union');\n\nmodule.exports = function(el, targets, states) {\n var targetNames = [];\n var state;\n var nodes;\n var elTargetName;\n\n // ...
javascript
chosen
[ { "from": "system", "value": "Allow spreading with ununsed underscore-prefixed vars\n" }, { "from": "human", "value": "module.exports = {\n extends: ['eslint:recommended', 'prettier'],\n parser: 'babel-eslint',\n plugins: ['import', 'prettier'],\n env: {\n node: true,\n ...
javascript
chosen
[ { "from": "system", "value": "Add foreign keys to User model\n" }, { "from": "human", "value": "var db = require('./db');\n\ndb.knex.schema.hasTable('sessions').then(function(exists) {\n if (!exists) {\n db.knex.schema.createTable('sessions', function(session) {\n session.increments('id...
javascript
chosen
[ { "from": "system", "value": "Enable live-reload emulator builds to work without a network connection\n" }, { "from": "human", "value": "const os = require('os');\n\nmodule.exports = function getNetworkIp() {\n let interfaces = os.networkInterfaces();\n let addresses = [];\n\n f...
javascript
chosen
[ { "from": "system", "value": "Add comment to codecs app script\n" }, { "from": "human", "value": "const {app, BrowserWindow, ipcMain} = require('electron')\nconst path = require('path')\nconst url = require('url')\n\nconst MEDIA_ERR_SRC_NOT_SUPPORTED = 4\n\nlet window\n\napp.once('ready', () => ...
javascript
chosen
[ { "from": "system", "value": "Use oop helpers for GrowlBox class\n\n[skip ci]\n" }, { "from": "human", "value": "// website/static/js/growlBox.js\n'use strict';\nvar $ = require('jquery');\nrequire('bootstrap.growl');\n\n/**\n* Show a growl-style notification for messages. Defaults to an error t...
javascript
chosen
[ { "from": "system", "value": "Fix email collection js bug.\n" }, { "from": "human", "value": "$(document).ready(function() {\n var $join = $('#landing-join'),\n $landingEmailForm = $join.find('form'),\n $landingEmailInput = $join.find('.landing-email-input'),\n $landingEmailSubmi...
javascript
chosen
[ { "from": "system", "value": "Bump dep xamfoo:reactive-obj to 0.4.1\n" }, { "from": "human", "value": "Package.describe({\n name: 'blazer:react',\n version: '0.2.1',\n summary: \"Blaze with React: Create stateful components with methods and mixins like in Facebook's React\",\n git: 'https://...
javascript
chosen
[ { "from": "system", "value": "Remove polyfill from unit test\n" }, { "from": "human", "value": "var path = require('path')\n\nmodule.exports = function(config) {\n config.set({\n singleRun: true,\n\n files: [\n './node_modules/babel-polyfill/browser.js',\n 'test/index.js',\n ...
javascript
chosen
[ { "from": "system", "value": "Fix default editor not working for dynamic content\n" }, { "from": "human", "value": "(function () {\r\n var updateUrl = window.IVOAZ_CONTENT_EDITABLE_UPDATE_URL;\r\n var current, timeout;\r\n var htmlTags = document.getElementsByTagName('html');\r\n\r\n ...
javascript
chosen
[ { "from": "system", "value": "Remove localhost config for Axios\n" }, { "from": "human", "value": "import timeago from 'timeago.js';\nimport axios from 'axios';\nimport Vue from 'vue';\nimport VueMaterial from 'vue-material';\nimport 'vue-material/dist/vue-material.min.css';\n\nimport InstallerI...
javascript
chosen
[ { "from": "system", "value": "Correct typo for style prop.\n" }, { "from": "human", "value": "/**\n * Spinner component.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in complia...
javascript
chosen
[ { "from": "system", "value": "Use the dist folder icon for \"export\"\n\nThis is the convention for HaxeFlixel projects (https://github.com/HaxeFlixel/flixel)." }, { "from": "human", "value": "/* eslint-disable max-len */\nexports.extensions = {\n supported: [\n { icon: 'dist', extensions: [...
javascript
chosen
[ { "from": "system", "value": "Remove old progress stuff before creating new.\n\ngit-svn-id: aa6b683a0c3c4a7a7056638acacb3aaf04dd239a@3148 63c81c92-1a08-11de-87e6-23293a004a03\n" }, { "from": "human", "value": "function initProgressMarkers() {\n var $formPage = $('.FormPage');\n var $progressMa...
javascript
chosen
[ { "from": "system", "value": "Update lint rule for component methods order\n" }, { "from": "human", "value": "module.exports = {\n 'root': true,\n\n 'parser': 'babel-eslint',\n\n 'extends': [\n 'airbnb',\n 'plugin:import/errors'\n ],\n\n 'rules': {\n 'space-before-function-paren': ...
javascript
chosen
[ { "from": "system", "value": "Use platform from 'os' module\n" }, { "from": "human", "value": "'use strict'\n\nconst { env, platform } = process\n\nmodule.exports = {\n extends: [\n 'eslint:recommended',\n 'eslint-config-airbnb-base',\n 'plugin:prettier/recommended',\n ],\n\n env: {\...
javascript
chosen
[ { "from": "system", "value": "FIX Use localhost instead of IP\n" }, { "from": "human", "value": "var http = require('http');\nvar util = require('./util');\nvar counter = 0;\nvar port = 1337;\n\nvar greeting = function (req, res) {\n var answer = util.helloWorld();\n counter = counter + 1;...
javascript
chosen
[ { "from": "system", "value": "Use correct version of antiscroll in blueprint\n" }, { "from": "human", "value": "module.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function(options) {\n // We assume that handlebars, ember, and jquery already exist\n return this.add...
javascript
chosen
[ { "from": "system", "value": "Use call instead of bind to prevent phantomjs failures\n" }, { "from": "human", "value": "import ActiveModelAdapter from 'active-model-adapter';\nimport ActiveModelSerializer from 'active-model-adapter/active-model-serializer';\n\nexport default {\n name: 'active-m...
javascript
chosen
[ { "from": "system", "value": "Fix lost grid reload callback after ajax grid reload.\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, ...
javascript
chosen
[ { "from": "system", "value": "Change test browser back to firefox\n" }, { "from": "human", "value": "var config;\n\nconfig = require('../../lib/protractor.conf.js').config;\n\nconfig.capabilities = {\n browserName: 'chrome'\n};\n\nconfig.framework = 'mocha';\n\nconfig.specs = [\n '../generalSt...
javascript
chosen
[ { "from": "system", "value": "Fix resloving traceurRuntime path on windows\n\nFix for correct resloving traceurRuntime path also on windows" }, { "from": "human", "value": "var fs = require('fs'),\n\tpath = require('path'),\n\ttraceurPath = require.resolve('traceur'),\n\tmakeNode = require(\"../...
javascript
chosen
[ { "from": "system", "value": "Make select2 widgets work with Django admin's inline addition\n\nDMOJ/site#315" }, { "from": "human", "value": "(function ($) {\n\n var init = function ($element, options) {\n $element.select2(options);\n };\n\n var initHeavy = function ($element, op...
javascript
chosen
[ { "from": "system", "value": "Fix bad import of music-metadata-browser\n" }, { "from": "human", "value": "import JSZip from \"jszip\";\nimport musicMetadataBrowser from \"music-metadata-browser\";\nimport WebampLazy from \"./webampLazy\";\n\nclass Winamp extends WebampLazy {\n constructor(optio...
javascript
chosen
[ { "from": "system", "value": "Add compile-step to debug flow\n" }, { "from": "human", "value": "'use strict';\n\nconst apiEngine = require('../index');\n\n// eslint-disable-next-line fp/no-mutation\nError.stackTraceLimit = 100;\n\nconst startServer = async function () {\n try {\n const { opt...
javascript
chosen
[ { "from": "system", "value": "Prepare for Hapi 6 migration.\n" }, { "from": "human", "value": "// Load modules\n\nvar Fs = require('fs');\nvar Path = require('path');\nvar HeapDump = require('heapdump');\nvar Hoek = require('hoek');\n\n\n// Declare internals\n\nvar internals = {\n initialized...
javascript
chosen
[ { "from": "system", "value": "Add some other famous streaming websites\n" }, { "from": "human", "value": "var targetPages = [\"https://www.youtube.com/watch*\"];\nvar settings = {};\n\nfunction openOriginal(info, tab) {\n browser.tabs.create({\n url: info.linkUrl\n });\n}\n\nfunction restor...
javascript
chosen
[ { "from": "system", "value": "Change ES6 module syntax to module.exports\n\nReviewed By: rubennorte\n\nDifferential Revision: D7490562\n\nfbshipit-source-id: 861681c24eab678d25af47bb25738651fe3e26b4\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * Thi...
javascript
chosen
[ { "from": "system", "value": "Remove accidental left in line\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar babel = require('gulp-babel');\nvar jsdoc = require(\"gulp-jsdoc\");\n\ngulp.task(\"babel\", function() {\n return gulp.src('src/**/*.js')\n .pipe(babel())\n .p...
javascript
chosen
[ { "from": "system", "value": "Add a Scripts build task\n\nCopies JavaScript to /public/javascripts\n" }, { "from": "human", "value": "'use strict'\n\nconst paths = require('./config/paths.json')\nconst gulp = require('gulp')\nconst cssnano = require('gulp-cssnano')\nconst del = require('del')\nc...
javascript
chosen
[ { "from": "system", "value": "Use new onCreate callback for buster.testRunner\n" }, { "from": "human", "value": "/*jslint onevar: false, eqeqeq: false*/\n/*global require*/\nif (typeof require != \"undefined\") {\n var sinon = require(\"sinon\");\n\n var buster = {\n assert: require...
javascript
chosen
[ { "from": "system", "value": "Make quill editor variable global\n\nSo visitors can easily try out the API\n" }, { "from": "human", "value": "$(document).ready(function() {\n var editor = new Quill('#editor', {\n modules: {\n 'toolbar': { container: '#toolbar' },\n 'image-tooltip': ...
javascript
chosen
[ { "from": "system", "value": "Fix window size before running tests\n\nTo make tests as repeatable as possible.\n" }, { "from": "human", "value": "const wd = require('wd');\nconst Promise = require('bluebird');\nconst browser = require('./browser');\nconst normalise = require('./normalise-logs');...
javascript
chosen
[ { "from": "system", "value": "Enable deleting the search query from the box to clear it\n" }, { "from": "human", "value": "/**\n*\n* SearchInput\n*\n*/\n\nimport React from 'react';\nimport FontAwesome from 'react-fontawesome';\nimport { Button, Form, FormGroup, FormControl } from 'react-bootstr...
javascript
chosen