conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix JS error after project pdf file.\n" }, { "from": "human", "value": "(function () {\n\n'use strict';\n\nangular.module('OpenSlidesApp.mediafiles.projector', ['OpenSlidesApp.mediafiles'])\n\n.config([\n 'slidesProvider',\n function(slidesProvider) {\n ...
javascript
chosen
[ { "from": "system", "value": "Update url so it take care of filters and remove `t=id` not sure why it\nwas needed!\n" }, { "from": "human", "value": "function showGenericRelatedObjectLookupPopup(triggeringLink, ctArray)\n{\n var realName = triggeringLink.id.replace(/^lookup_/, '');\n var n...
javascript
chosen
[ { "from": "system", "value": "Refactor disposal of event handlers on link component\n" }, { "from": "human", "value": "var AnnotationComponent = require('../../ui/AnnotationComponent');\n\n\nfunction LinkComponent() {\n LinkComponent.super.apply(this, arguments);\n\n this._tagName = 'a';\n}\n\...
javascript
chosen
[ { "from": "system", "value": "Add ability to publish rc versions\n" }, { "from": "human", "value": "var vow = require('vow'),\n vowNode = require('vow-node'),\n childProcess = require('child_process'),\n fs = require('fs'),\n exec = vowNode.promisify(childProcess.exec),\n readFile...
javascript
chosen
[ { "from": "system", "value": "Delete the inputs after send the message\n" }, { "from": "human", "value": "var base_url_prod=\"http://147.83.7.157:8080\"\nvar App = angular.module('messages', []);\n\n\n\nApp.controller('controller1', ['$scope', '$http', function($scope, $http) {\n\n\n var refr...
javascript
chosen
[ { "from": "system", "value": "Make fake promise-returning function for test stub\n" }, { "from": "human", "value": "//\"use strict\";\n\n// mocha tests: \ndescribe('searchController', function () {\n var scope;\n var searchFactory;\n var ctrl;\n\n beforeEach(module('app'));\n\n beforeEach(i...
javascript
chosen
[ { "from": "system", "value": "Remove projection from client WMSSource Model\n" }, { "from": "human", "value": "minerva.models.WmsSourceModel = minerva.models.SourceModel.extend({\n\n createSource: function (name, baseURL, projection) {\n var params = {\n name: name,\n ...
javascript
chosen
[ { "from": "system", "value": "Update model with new mycosti value.\n" }, { "from": "human", "value": "/**\n * Class Sliders\n */\nHumble( function () {\n\n var Sliders = function (node, model) {\n\n this.model = model;\n this.node = node;\n this.sliders = {}...
javascript
chosen
[ { "from": "system", "value": "Copy files and dirs recursively\n" }, { "from": "human", "value": "const mix = require('laravel-mix');\nconst fs = require('fs');\n\nmix.config.detectHotReloading()\nif (mix.config.hmr) {\n // There's a bug with Mix/copy plugin which prevents HMR from working:\n ...
javascript
chosen
[ { "from": "system", "value": "Set hmm detail state to null on GET_HMM.REQUESTED\n\n" }, { "from": "human", "value": "/**\n *\n *\n * @copyright 2017 Government of Canada\n * @license MIT\n * @author igboyes\n *\n */\n\nimport { WS_UPDATE_STATUS, FIND_HMMS, GET_HMM } from \"../actionTypes\";\n\nc...
javascript
chosen
[ { "from": "system", "value": "Refactor auth to use npm cookie parse\n" }, { "from": "human", "value": "module.exports = (router) => {\n // router is props.history from a component served by react router\n let cookies = {};\n for (let cookie of document.cookie.split(';')) {\n let c = cookie...
javascript
chosen
[ { "from": "system", "value": "Update get proxy url on first run to minimise repeated function calls.\n" }, { "from": "human", "value": "var eve_image;\n(function createProxFunc() {\n\tvar webpProxySupport = (waitlist.base.getMetaData(\"eve-image-server-webp\") === \"True\");\n\tvar webpBrowserSu...
javascript
chosen
[ { "from": "system", "value": "Verify if any file was choosen inside of the iframe load handler.\n" }, { "from": "human", "value": "var Bind = require(\"github/jillix/bind\");\nvar Events = require(\"github/jillix/events\");\n\nmodule.exports = function(config) {\n\n var self = this;\n Even...
javascript
chosen
[ { "from": "system", "value": "Add scroll capture to sidebar\n" }, { "from": "human", "value": "import styled, { css } from 'styled-components'\nimport rem from 'polished/lib/helpers/rem'\nimport { mobile } from '../../utils/media'\nimport { violetRed, gold } from '../../utils/colors'\n\nconst Si...
javascript
chosen
[ { "from": "system", "value": "Add routes for game queries\n" }, { "from": "human", "value": "const requestsController = require('../../controllers/requests.js');\nconst requestHelper = require('../../helpers/requestHelper.js');\n\nmodule.exports = {\n '/:request/top/:size': {\n get: function...
javascript
chosen
[ { "from": "system", "value": "Allow fonts from data: origins\n" }, { "from": "human", "value": "BrowserPolicy.content.allowOriginForAll(\"*.googleapis.com\");\nBrowserPolicy.content.allowOriginForAll(\"*.gstatic.com\");\nBrowserPolicy.content.allowOriginForAll(\"*.bootstrapcdn.com\");\n" }, ...
javascript
chosen
[ { "from": "system", "value": "MOVE hooks to core group\n" }, { "from": "human", "value": "import React from 'react';\nimport { useEffect, useRef, useState } from '@storybook/client-api';\n\nexport default {\n title: 'Hooks',\n};\n\nexport const Checkbox = () => {\n const [on, setOn] = useState...
javascript
chosen
[ { "from": "human", "value": "Create stack class and constructor\n" }, { "from": "gpt", "value": "/**\n * Stack class to create Stack objects for browserHistory\n * underscore denotes that these variables are private and should not be manipulated externally\n * top method returns the current posi...
javascript
chosen
[ { "from": "system", "value": "Test commit to see if a failing unit test breaks the build\n" }, { "from": "human", "value": "'use strict';\ndescribe('loginController tests', function () {\n var scope, ctrl, authServices, location;\n\n function authServicesMock() {\n var mock = {\n ...
javascript
chosen
[ { "from": "system", "value": "Add clientsClaim and skipWaiting options\n" }, { "from": "human", "value": "let pkg = require('./package.json');\n\nmodule.exports = {\n baseUrl: process.env.NODE_ENV === 'production' ? '/guess-them-all/' : '/',\n\n pwa: {\n name: pkg.description,\n ...
javascript
chosen
[ { "from": "system", "value": "Add new 'engine' option of Casperjs" }, { "from": "human", "value": "exports.init = function(grunt) {\n var exports = {};\n \n exports.casperjs = function(filepath, options, callback) {\n\n var command = 'casperjs test',\n exec = require('child_process'...
javascript
chosen
[ { "from": "system", "value": "Return icon path with largest size\n" }, { "from": "human", "value": "function findBestIcon(iconPaths) {\n return new Promise(function (resolve, reject) {\n resolve(iconPaths[0]);\n });\n}\n\nmodule.exports = findBestIcon;\n" }, { "from": "gpt",...
javascript
chosen
[ { "from": "system", "value": "Remove arrow functon, causes precompile error on prod.\n" }, { "from": "human", "value": "$(function () {\n const menu = $('.js-menu');\n const menuButton = $('.js-menu-toggle', menu);\n\n menuButton.on('click', (e) => {\n menu.toggleClass('is-open')...
javascript
chosen
[ { "from": "system", "value": "Adjust import paths for Less files\n" }, { "from": "human", "value": "var grunt = require('grunt');\n\nmodule.exports = {\n main: {\n options: {\n paths: grunt.file.expand('src/**'),\n sourceMap: true,\n sourceMapRootpath: '/'\n },\n files: ...
javascript
chosen
[ { "from": "system", "value": "Add new test called pingPongType\n" }, { "from": "human", "value": "describe('pingPong', function() {\n it(\"returns ping for a number that is divisible by 3\", function() {\n expect(pingPong(6)).to.equal(\"ping\");\n });\n it(\"returns pong for a number that ...
javascript
chosen
[ { "from": "system", "value": "Allow parametrizing which test-runner to use, only jasmine/mocha allowed now." }, { "from": "human", "value": "var $ = document.getElementById.bind(document);\nimport {simplePassingTestCode} from './example-tests';\nimport {Controller as Main} from '../src/main/main...
javascript
chosen
[ { "from": "system", "value": "Allow general help to be accessible using --help in the command line\n" }, { "from": "human", "value": "#!/usr/bin/env node\nrequire('source-map-support/register')\n\nvar Config = require(\"truffle-config\");\nvar Command = require(\"./lib/command\");\nvar TaskError...
javascript
chosen
[ { "from": "system", "value": "Add pre hook to typescript block\n\nRegister typescript MIME type if there is none yet." }, { "from": "human", "value": "/**\n * Typescript webpack block.\n *\n * @see https://github.com/s-panferov/awesome-typescript-loader\n */\n\nconst { CheckerPlugin, TsConfigPat...
javascript
chosen
[ { "from": "system", "value": "Use tabs instead of spaces\n" }, { "from": "human", "value": "\"use strict\";\n\nfunction getImagesFromDom() {\n return _.chain($(\"img\").toArray())\n .map(function (element) {\n return element.src;\n })\n .value();\n}\n\nfunction endsWith(str, s...
javascript
chosen
[ { "from": "system", "value": "Use env var for TEST_URL\n" }, { "from": "human", "value": "describe('Check vital page elements on home', () => {\n beforeEach(() => {\n cy.visit('http://localhost:4000/')\n })\n\n it('Find the header main title', () => {\n cy.get('#header h1').should('have...
javascript
chosen
[ { "from": "system", "value": "Check if the dom node for the theme about to be activated exists. To minimize js errors.\n" }, { "from": "human", "value": "/* theme selector\n*/\n\n(function() {\n 'use strict';\n\n var themeActive = '';\n var $container = document.querySelector('.themes-box');\...
javascript
chosen
[ { "from": "system", "value": "Revert \"updateMit\" method name change\n" }, { "from": "human", "value": "Meteor.methods({\n\n // Tasks\n createTask: function(task) {\n // FIXME: Use collection hooks\n task.createdAt = new Date()\n task.userId = Meteor.userId()\n\n Tasks.insert(task...
javascript
chosen
[ { "from": "system", "value": "Handle RTL language preview and entry in wagtail admin.\n" }, { "from": "human", "value": "// Temporary workaround until wagtail 1.5 is released\n$(function() {\n $(\".richtext\").on(\"click\", function() {\n\t var $this = $(this);\n\t $(\".hallotoolbar...
javascript
chosen
[ { "from": "system", "value": "Remove usage of combineReducer in rootReducer\n" }, { "from": "human", "value": "import { combineReducers } from 'redux';\nimport events from './eventsReducer';\nimport categories from './categoriesReducer';\nimport zoom from './zoomReducer';\nimport mouse from './m...
javascript
chosen
[ { "from": "system", "value": "Set benchmark to 5 seconds\n" }, { "from": "human", "value": "'use strict'\n\nconst spawn = require('child_process').spawn\n\nclass WrkSpawner {\n constructor (endpoint = 'http://localhost') {\n this.endpoint = endpoint\n }\n\n run (port) {\n return new Pro...
javascript
chosen
[ { "from": "system", "value": "Fix inner model id do not automatic set when set a inner model.\n" }, { "from": "human", "value": "/**\n * Created by dungvn3000 on 3/14/14.\n * The model automatic update mapping field when set associations table.\n */\n\nExt.define('sunerp.model.BaseModel', {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove extra nav menu items\n" }, { "from": "human", "value": "import PropTypes from 'prop-types';\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { Menu } from 'antd';\nimport { Link } from 'redux-little-router';\n\nconst { SubMenu, Item...
javascript
chosen
[ { "from": "system", "value": "Add option that fixes slow Selenium webdriver startup on systems with low entropy (e.g. VMs).\n" }, { "from": "human", "value": "exports.config = {\n capabilities: {'browserName': 'chrome'},\n /*multiCapabilities: [\n {'browserName': 'chrome'},\n ...
javascript
chosen
[ { "from": "system", "value": "Add caching for get neighbors method\n" }, { "from": "human", "value": "function Cell(row, col, value, board) {\n this.row = row,\n this.col = col,\n this.value = value,\n this.board = board\n}\n\nCell.prototype.find = function(word, visited=new Set(), wordIndex...
javascript
chosen
[ { "from": "system", "value": "Rename BUILD_DIR to \"build\" (was \"built\")\n\nPer discussion in PR #4968, the dirname \"build\" is widely used for\nthis purpose.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**...
javascript
chosen
[ { "from": "system", "value": "Add task for Travis CI\n" }, { "from": "human", "value": "/* jshint: node:true */\nmodule.exports = function (grunt) {\n 'use strict';\n\n grunt.initConfig({\n phplint: {\n application: [\"lib/*.php\", \"tests/**/*.php\"]\n },\n ...
javascript
chosen
[ { "from": "human", "value": "Complete 'Waterfall' challenge in 'Async you' tutorial\n" }, { "from": "gpt", "value": "var http = require('http')\n, async = require('async')\n, fs = require('fs');\n\nasync.waterfall([\n function(cb) {\n cb(null, process.argv[2]);\n },\n function(fileFullPath...
javascript
chosen
[ { "from": "system", "value": "Fix correct library name in webpack\n" }, { "from": "human", "value": "const path = require('path');\nconst nodeExternals = require('webpack-node-externals');\n\nmodule.exports = {\n entry: './src/index.js',\n target: 'node',\n externals: [nodeExternals()],\n ou...
javascript
chosen
[ { "from": "system", "value": "Make build process output umd bundle\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\n\nvar minify = new webpack.optimize.UglifyJsPlugin({\n\tminimize: true, compress: { warnings: false }, output: {\n semicolons: ...
javascript
chosen
[ { "from": "system", "value": "Remove random numbers at bottom\n" }, { "from": "human", "value": "$(function() {\n $('.atml-description--title').click(function(e) {\n \n e.preventDefault();\n \n var $this = $(this);\n var $contentId = $this.data('content');\n...
javascript
chosen
[ { "from": "system", "value": "Allow only authenticated admin to add a book\n" }, { "from": "human", "value": "// import Admin class\nimport Admin from '../module/Admin';\n\nmodule.exports = {\n // Add a new book to database\n createBook(req, res) {\n new Admin().addBook(\n req.body.tit...
javascript
chosen
[ { "from": "system", "value": "Add strict mode to support generation script\n" }, { "from": "human", "value": "var fs = require('fs'),\n words = require('./');\n\nfs.writeFileSync('Supported-words.md',\n 'Supported Words:\\n' +\n '=================\\n' +\n '\\n' +\n '| word | polar...
javascript
chosen
[ { "from": "system", "value": "Update points in UI after every points update\n" }, { "from": "human", "value": "var PLAYER = {\n points: 0\n}\n\nfunction earnPoints() {\n PLAYER.points += 1\n}\n\n$(document).ready(function() {\n $('#popcornkernel').click(earnPoints);\n})\n" }, { "from"...
javascript
chosen
[ { "from": "system", "value": "Add _selector to React Native's style propTypes to fix debugger warnings\n" }, { "from": "human", "value": "import _ from 'lodash'\n\nimport renderStaticStyles from '../core/renderer'\n\nexport default {\n create(styles) {\n // flat style object without selector...
javascript
chosen
[ { "from": "system", "value": "Remove print-link JS. There aren't any print links in the template\n" }, { "from": "human", "value": "$(document).ready(function() {\n $('.print-link a').attr('target', '_blank');\n\n // fix for printing bug in Windows Safari\n var windowsSafari = (window.navigat...
javascript
chosen
[ { "from": "system", "value": "Select first tab item when entering tabbed page\n" }, { "from": "human", "value": "export default function normalizeTabControllerClick() {\n\tconst hashLinks = document.querySelectorAll(\".js-tabs-control a[href^='#']\");\n\n\tArray.prototype.forEach.call(hashLinks,...
javascript
chosen
[ { "from": "system", "value": "Load MapQuest tiles over TLS.\n" }, { "from": "human", "value": "$(function () {\n try {\n var map = L.map('map');\n }\n catch(e){\n return true;\n }\n var lat = $('.map-view').data(\"lat\").toString().split(\",\"),\n long = $('....
javascript
chosen
[ { "from": "system", "value": "Use basic React class instead of createMockComponent\n" }, { "from": "human", "value": "import createMockComponent from '../../components/createMockComponent';\n\nclass CardStackPanResponder {\n}\n\nclass PagerPanResponder {\n}\n\nconst NavigationCard = createMockCo...
javascript
chosen
[ { "from": "system", "value": "[client] Fix error: notifications didn't show\n" }, { "from": "human", "value": "// npm packages\nimport React, {PropTypes} from 'react';\nimport {connect} from 'react-redux';\nimport {push} from 'react-router-redux';\n\n// our components\nimport {Navbar} from '../....
javascript
chosen
[ { "from": "system", "value": "Add \"use strict\" to shuffler\n" }, { "from": "human", "value": "/* global randomRoute:true */\n\n// todo: make a lib and move this\nvar shuffle = function (array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (0 !== currentIndex) {\...
javascript
chosen
[ { "from": "system", "value": "Use selectors to handle/read state changes\n" }, { "from": "human", "value": "import EventEmitter from 'eventemitter2'\nimport store from '../store/store'\nimport { actions } from '../store/actions'\n\nconst events = new EventEmitter()\nstore.subscribe(handleEvent)\...
javascript
chosen
[ { "from": "system", "value": "Increase coverage to match update\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.js', 'lib/**/*...
javascript
chosen
[ { "from": "system", "value": "Add showInspectElement option for context menu\n" }, { "from": "human", "value": "import contextMenu from 'electron-context-menu';\n\nexport default win =>\n contextMenu({\n prepend: () => [{\n label: 'Toggle React DevTools',\n click() {\n win.w...
javascript
chosen
[ { "from": "system", "value": "Add 'class=contenteditable' to the contenteditable component\n" }, { "from": "human", "value": "import * as React from 'react'\n\nlet ContentEditable = React.createClass({\n\t// from http://stackoverflow.com/questions/22677931/react-js-onchange-event-for-contentedit...
javascript
chosen
[ { "from": "system", "value": "Fix for failing test on node 0.10\n\nAfter merging #593, tests against node 0.10 started failing with\n\n```\nutil.js:556\n ctor.prototype = Object.create(superCtor.prototype, {\n ^\nTypeError: Object prototype may only be an Object or null\n```\n" }...
javascript
chosen
[ { "from": "system", "value": "Use eval-source-map to speed up rebuild performance\n" }, { "from": "human", "value": "var path = require('path');\n\nconst jsSourcePath = path.join(__dirname, '/src/js');\nconst scssSourcePath = path.join(__dirname, '/src/scss');\n\nmodule.exports = {\n entry: [\n...
javascript
chosen
[ { "from": "system", "value": "Fix the way index redirect works for latest Ember\n" }, { "from": "human", "value": "define([\n 'ember',\n 'JST/index',\n],\n\nfunction (Em) {\n 'use strict';\n\n var IndexRoute = Em.Route.extend({\n actions: {\n // error handler for when descendent\n ...
javascript
chosen
[ { "from": "system", "value": "Refactor: Switch challenges to go off the webservice\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @ngdoc function\n * @name worldOfWorkCraftApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the worldOfWorkCraftApp\n */\nangular...
javascript
chosen
[ { "from": "system", "value": "Use default username on startup\n" }, { "from": "human", "value": "import DefaultConfig from 'anyware/lib/game-logic/config/default-config';\nimport GAMES from 'anyware/lib/game-logic/constants/games';\n\nclass Config extends DefaultConfig {\n constructor() {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix flash of unstyled content in CDN\n\n- added function to hide body before c-theme loaded" }, { "from": "human", "value": "(function(doc) {\n var parentScript = doc.querySelectorAll('script');\n var arr = Array.prototype.slice.call(parentScript);\n var scriptEl...
javascript
chosen
[ { "from": "system", "value": "Change to headless chrome in CI\n" }, { "from": "human", "value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n config.set({\n basePath...
javascript
chosen
[ { "from": "system", "value": "Change some name variables improving readability\n\nThe calling `diff.toString()` was made only for `blessed`\ncompatibility. It seems that it doesn't deal too much with real\nintegers.\n" }, { "from": "human", "value": "var util = require('util');\nvar hits = requi...
javascript
chosen
[ { "from": "system", "value": "Rename variables, var -> const/let\n" }, { "from": "human", "value": "const MESSAGE_RANGE = 1000\n\nclass Shouty {\n constructor() {\n this.locations = new Map()\n this.messages = new Map()\n }\n\n setLocation(person, coordinate) {\n this.locations.set(p...
javascript
chosen
[ { "from": "system", "value": "Change exported name to plivo\n" }, { "from": "human", "value": "const plivo = require('plivo');\n\nclass Log {\n constructor (Config) {\n this.config = Config;\n const authId = this.config.get('sms.plivo.authId');\n const authToken = this.config.get('sms....
javascript
chosen
[ { "from": "system", "value": "Remove loading indicator in case of error\n" }, { "from": "human", "value": "'use strict';\n\napp.controller('UserProfileController', ['userService', '$routeParams', '$scope', 'favoritePost',\n function (userService, $routeParams, $scope, favoritePost) {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove programmatically set <video> attributes\n\nAttributes added as HTML in 1a864376aab054ef7a90be41eeb50c28a2e43820\n" }, { "from": "human", "value": "import { imageDataFromVideo } from './image-data.js'\nimport { hasFired } from './promisify.js'\n\nclass Camera ...
javascript
chosen
[ { "from": "system", "value": "Bring the image in immediately so the frame doesn't move\n" }, { "from": "human", "value": "// JS Goes here - ES6 supported\n\nvar $ = window.jQuery;\n\n$(document).ready(function() {\n $(\".carousel\").slick({\n infinite: true,\n speed: 500,\n slidesToSho...
javascript
chosen
[ { "from": "system", "value": "Fix console error: remove info addon from the addons array\n" }, { "from": "human", "value": "module.exports = {\n stories: ['./**/*.stories.js', '../**/*.stories.js'],\n addons: ['@storybook/addon-backgrounds', '@storybook/addon-info', '@storybook/addon-knobs'],\...
javascript
chosen
[ { "from": "system", "value": "Make sure resolve returns the mountPath in all cases\n" }, { "from": "human", "value": "const { exec } = require('child_process');\nconst mkdirp = require('./mkdir-promise');\n\nconst fileExists = (err) => /file exists/i.test(err.message);\n\nconst mountShare = ({ u...
javascript
chosen
[ { "from": "system", "value": "Update rule for getting store from ip\n" }, { "from": "human", "value": "const networkWhitelist = [36, 126, 127];\n\nexport function isWhitelisted(ipAddress) {\n const bits = ipAddress.split('.');\n return networkWhitelist.includes(\n parseInt(bits[1])\n );\n}...
javascript
chosen
[ { "from": "system", "value": "Support for development update channel\n" }, { "from": "human", "value": "{\n\t\"stable\": {\n \"CSIDE_version\": \"1.0.0.3\",\n \"nw_version\": \"0.21.4\",\n \"desc\": \"ChoiceScript Update -- Support for Multireplace @{} etc.\",\n\t\t\"target\": \"https:/...
javascript
chosen
[ { "from": "system", "value": "Add Course IDs array to each lesson.\n" }, { "from": "human", "value": "Template.sectionAddLesson.events({\n 'click .add-lesson-button': function (event, template) {\n // Get lesson name\n var lessonName = template.find(\".lesson-name\").value;\n\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unused path, fs, and depp-merge dependencies from Object.\n" }, { "from": "human", "value": "var path = require('path')\n , fs = require('fs')\n , clone = require('clone')\n , getset = require('deep-get-set')\n , DeepMerge = require('deep-merge')\n , mer...
javascript
chosen
[ { "from": "system", "value": "Update link to base class in docs" }, { "from": "human", "value": "/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event.js';\n\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/Map~Map} for which...
javascript
chosen
[ { "from": "system", "value": "Add basic Book model and book list\n" }, { "from": "human", "value": "\"use strict\";\n\nconst app = require('express')();\n\nconst port = 8080;\n\napp.get('/', function(req, res) {\n res.send('Hello, data!');\n});\n\napp.listen(port);\nconsole.log('Biblys Data Ser...
javascript
chosen
[ { "from": "system", "value": ":lipstick: Use correct external link icon\n" }, { "from": "human", "value": "import React, { useState } from 'react';\nimport { IconChevronRightSmallOutline } from '@teamleader/ui-icons';\n\nimport Box from '../../box';\nimport Link from '../../link';\n\nimport them...
javascript
chosen
[ { "from": "system", "value": "Update the gulp file to use gulp-utilities.\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar clean = require('./source/services/gulp/clean');\n\nclean.config(null, gulp);\n" }, { "from": "gpt", "value": "var utilities = require('gulp-u...
javascript
chosen
[ { "from": "system", "value": "[App] Add release api url to prepare update\n\n" }, { "from": "human", "value": "/*\n * Author: Alexandre Havrileck (Oxyno-zeta) \n * Date: 08/06/16\n * Licence: See Readme\n */\n(function () {\n\t'use strict';\n\n\tangular\n\t\t.module('libparsio.technical.constant...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary components from camera\n" }, { "from": "human", "value": "require('aframe');\nimport React from 'react'\n\nconst Player = () => (\n <a-entity position='0 1.8 0'>\n <a-entity id='player' camera look-controls wasd-controls spawner='mixin: laser;...
javascript
chosen
[ { "from": "system", "value": "Fix typos in `Krang.deepExtend` function." }, { "from": "human", "value": "Krang.deepExtend = function(destination, source) {\n for (var property in source) {\n var type = typeof source[property], deep = true;\n \n if (source[property] === null || type !==...
javascript
chosen
[ { "from": "system", "value": "Add push history for logo\n" }, { "from": "human", "value": "import React from 'react';\nimport HeaderNav from './HeaderNav';\nimport { buyAll } from '../actions/sale';\n\nexport default (\n () => (\n <div className=\"header\">\n <div className=\"logo part\...
javascript
chosen
[ { "from": "system", "value": "Fix path helper name in the react-router configuration\n" }, { "from": "human", "value": "import Index from 'index'\n// import Feed from 'feed'\nimport routingPaths from 'main/routingPaths'\n\nexport default [\n {\n path: routingPaths.profilePath,\n component...
javascript
chosen
[ { "from": "system", "value": "Add example tasks to test display\n" }, { "from": "human", "value": "(function() {\n var app = angular.module('todo', []);\n\n app.controller('TodoController', function() {\n this.tasks = {};\n });\n})();" }, { "from": "gpt", "value": "(function() ...
javascript
chosen
[ { "from": "system", "value": "Fix title when posting contact form" }, { "from": "human", "value": "const router = require('express').Router()\n\nconst contactController = require('./controllers/details')\nconst contactEditController = require('./controllers/edit')\nconst contactArchiveController...
javascript
chosen
[ { "from": "system", "value": "Use relative url for loading documentation.json.\n" }, { "from": "human", "value": "var Documentation = require('./model/Documentation');\nvar Component = require('../ui/Component');\nvar DocumentationReader = require('./DocumentationReader');\nvar $$ = Component.$$...
javascript
chosen
[ { "from": "system", "value": "Add missing IE11 support for remote console fullscreen\n\nFixes https://bugzilla.redhat.com/show_bug.cgi?id=1523839\n" }, { "from": "human", "value": "$(function() {\n $('#fullscreen').click(function() {\n switch (true) {\n case document.fullScreenEnabled:\...
javascript
chosen
[ { "from": "system", "value": "Make editor note text available by default\n" }, { "from": "human", "value": "import colors from '../colors'\n\nexport default {\n routeLoading: 0,\n asyncLoading: true,\n notes: [\n /*\n {\n '.key': ''\n color: '',\n created_at: '',\n t...
javascript
chosen
[ { "from": "system", "value": "FIX minor bug with UEs not calculating after populating planner with full 160 mcs\n" }, { "from": "human", "value": "import { searchByModuleCode } from '../../../../../../../database-controller/module/methods';\n\nexport const findUnrestrictedElectivesRequirementMod...
javascript
chosen
[ { "from": "system", "value": "Split strings out of functions and into static properties. This allows\nSwat to translate the strings. See the calendar for another example of this.\n\n\nsvn commit r2046\n" }, { "from": "human", "value": "function SwatDisclosure(id)\n{\n\tthis.image = document.getE...
javascript
chosen
[ { "from": "system", "value": "Make wedding page home page.\n" }, { "from": "human", "value": "import React from 'react';\nimport { Router, Route, IndexRoute, browserHistory } from 'react-router';\nimport { syncHistoryWithStore } from 'react-router-redux';\n\nimport App from './components/App';\n...
javascript
chosen
[ { "from": "system", "value": "Update sendEvent function to force passing undefined if metadata is empty.\n" }, { "from": "human", "value": "/**\n * Analytics advanced tracking script to be inserted into the frontend via PHP.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed ...
javascript
chosen
[ { "from": "system", "value": "Add drivers ids to Bot model\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar timestamps = require('mongoose-timestamp');\n\nvar Schema = mongoose.Schema;\n\nvar botSchema = new Schema({\n name: {type: String, unique: true, required: true...
javascript
chosen
[ { "from": "system", "value": "Improve error reporting from server\n" }, { "from": "human", "value": "var request = require('request');\n\nfunction Action(actionPath, payload) {\n\tthis.actionPath = 'http://test@liferay.com:test@localhost:8080/api/jsonws' + actionPath;\n\tthis.payload = payload;\...
javascript
chosen
[ { "from": "system", "value": "Set up basic main page for displaying a maximum of 10 users, need to add load more option\n" }, { "from": "human", "value": "import React, {Component} from 'react';\r\n\r\nclass Home extends Component {\r\n render() {\r\n return (\r\n <div>\r\n ...
javascript
chosen
[ { "from": "system", "value": "Add a button to go back to blog list page\n" }, { "from": "human", "value": "import React from 'react'\nimport {MuiThemeProvider} from 'material-ui/styles'\nimport theme from './theme'\nimport Card from 'material-ui/Card'\nimport Typography from 'material-ui/Typogra...
javascript
chosen