conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove developer debug window during screen share\n\nRight now when you try to share your screen it opens a developer window." }, { "from": "human", "value": "'use strict';\n\nconst electron = require('electron');\nconst { remote } = require('electron');\nconst self...
javascript
chosen
[ { "from": "system", "value": "fix(tests): Change redirect URL for test\n" }, { "from": "human", "value": "describe('Splash page', function() {\n\n beforeEach(function() {\n browser.get('http://localhost:8088/');\n });\n\n it('should redirect to the worklist.', function() {\n expect(...
javascript
chosen
[ { "from": "system", "value": "Fix Marksmanship error not introduced by me\n" }, { "from": "human", "value": "import SPELLS from 'common/SPELLS';\n\nimport CoreCooldownThroughputTracker, { BUILT_IN_SUMMARY_TYPES } from 'parser/shared/modules/CooldownThroughputTracker';\n\nclass CooldownThroughput...
javascript
chosen
[ { "from": "system", "value": "Add `expectRanges` test helper method.\n" }, { "from": "human", "value": "/*! resol-vbus | Copyright (c) 2013-2014, Daniel Wippermann | MIT license */\n'use strict';\n\n\n\nvar Q = require('q');\n\n\n\nvar testUtils = {\n\n performAsyncTest: function(done, callba...
javascript
chosen
[ { "from": "system", "value": "Fix size report to display app/shared size\n" }, { "from": "human", "value": "var config = require('../../config');\nvar gulp = require('gulp');\nvar repeatString = require('../../lib/repeatString');\nvar sizereport = require('gulp-sizereport');\n\n/...
javascript
chosen
[ { "from": "system", "value": "Fix start for bin script.\n" }, { "from": "human", "value": "\"use strict\";\n\nexports.port = process.env.ARGO_PORT || 8000;\n\nexports.staticFiles = \"./src/client/\";\nexports.apiUrl = \"/api\";\nexports.streamUrl = \"/stream\";\n\nexports.environment = process.e...
javascript
chosen
[ { "from": "system", "value": "Include forgot/reset password routes in local auth module\n" }, { "from": "human", "value": "app.get('/login', user.loginGet);\napp.post('/login', user.loginPost);\n//app.get('/logout', userController.logout);\n//app.get('/forgot', userController.getForgot);\n//app....
javascript
chosen
[ { "from": "system", "value": "Change url for rpc methods\n" }, { "from": "human", "value": "// Requires\nvar HttpRPCManager = require('./manager').HttpRPCManager;\n\n\nfunction setup(options, imports, register) {\n // Import\n var app = imports.server.app;\n\n // Construct\n var mana...
javascript
chosen
[ { "from": "system", "value": "Debug wp api fetch failures.\n" }, { "from": "human", "value": "/**\n * Proxy calls to wp.apiFetch within the page context.\n *\n * @link https://github.com/WordPress/gutenberg/blob/master/packages/api-fetch/README.md\n * @param {Object} options Options object passe...
javascript
chosen
[ { "from": "system", "value": "Add filters controller missing definition\n" }, { "from": "human", "value": "'use strict';\n\nvar angular\n , DashboardController\n , ChartController;\n\nangular.module('wharf', ['ui.router', 'wharf.controllers']);\n\nangular.module('wharf').config(function($state...
javascript
chosen
[ { "from": "system", "value": "Move requires to the top of the template\n" }, { "from": "human", "value": "/*\n * Copyright 2011 eBay Software Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\...
javascript
chosen
[ { "from": "system", "value": "Add two functions to support the location setting\n" }, { "from": "human", "value": "export function setBackupOption(backup, index) {\n\treturn {\n\t\ttype: 'SETTINGS_SET_BACKUP',\n\t\tpayload: {\n\t\t\tbackup,\n\t\t\tindex,\n\t\t},\n\t};\n}\n\nexport function setBa...
javascript
chosen
[ { "from": "system", "value": "Add angular scripts to asset pipeline and include semantic-ui, clipboard, and ngclipboard\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...
javascript
chosen
[ { "from": "system", "value": "Print number inputs in CSV\n" }, { "from": "human", "value": "PT = PT || {};\n\nPT.downloadCsv = function(serverResponse){\n var survey = serverResponse.survey;\n var responses = serverResponse.responses;\n var a = document.createElement('a');\n var csvString = ...
javascript
chosen
[ { "from": "system", "value": "Fix issue with Redirect not rendering history page\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { Redirect, Route } from 'react-router';\n\nclass PrivateRoute extends Component {\n re...
javascript
chosen
[ { "from": "system", "value": "Fix constantparams serialization bug (dims were not serialized).\n" }, { "from": "human", "value": "var ad = require('../../ad');\nvar Network = require('../network.js');\n\n\n// Network that takes no inputs and returns a constant set of parameters\nfunction Constan...
javascript
chosen
[ { "from": "system", "value": "Remove @xstate/vue from the whitelisted automatically publishable packages\n" }, { "from": "human", "value": "const { exec } = require('@actions/exec');\nconst getWorkspaces = require('get-workspaces').default;\n\nasync function execWithOutput(command, args, options...
javascript
chosen
[ { "from": "system", "value": "Reset vacation type creation screen when creation succeed" }, { "from": "human", "value": "// Create a controller with name VacationsCtrl to bind to the html page.\nvacationAppControllers.controller('VacationTypeCtrl', function($scope, vacationTypeService) {\n\t// R...
javascript
chosen
[ { "from": "system", "value": "Add comments on service provider\n" }, { "from": "human", "value": "angular.module('{{.ServiceName}}', [])\n.provider('{{.ServiceName}}', function($q) {\n\tvar provider = {};\n\n\tprovider.setUrl = function(url) {\n\t\tprovider.url = url;\n\t};\n\n\tprovider.$get = ...
javascript
chosen
[ { "from": "system", "value": "Load app view as default\n" }, { "from": "human", "value": "import * as Backbone from 'backbone';\nimport Items from '../collections/items';\nimport SearchBoxView from '../views/searchBox-view';\nimport SearchResultsView from '../views/searchResults-view';\nimport D...
javascript
chosen
[ { "from": "system", "value": "feat: Add contentType as a parameter for OnRedirect callback function\n" }, { "from": "human", "value": "const mediaType = 'application/vnd.cignium.resource+json'\n\nexport async function request(method, href, data, config) {\n const request = {\n body: data && ...
javascript
chosen
[ { "from": "system", "value": " Fix initTrade to cover comment editing properly\n" }, { "from": "human", "value": "import Trade from './trade.model';\nimport Book from '../book/book.model';\n\nfunction initTrade({ requester, book, comment }) {\n const query = { requester, book };\n const update...
javascript
chosen
[ { "from": "system", "value": "Fix types and constants not being exported after splitting up module\n" }, { "from": "human", "value": "import state from './state';\nimport getters from './getters';\nimport mutations from './mutations';\nimport actions from './actions';\n\nexport default {\n name...
javascript
chosen
[ { "from": "system", "value": "Fix typo on HelloWorld sample.\n\nPiperOrigin-RevId: 251953041\n" }, { "from": "human", "value": "// Copyright 2018 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the Lice...
javascript
chosen
[ { "from": "system", "value": "Use lesson names as menu link titles\n" }, { "from": "human", "value": "var classNames = require('classnames')\nvar React = require('react')\n\nrequire('./LessonMenu.css')\n\nvar LessonMenu = React.createClass({\n handleSelectLesson(index) {\n this.props.selectL...
javascript
chosen
[ { "from": "system", "value": "FIX toolbar not activating on topbar menu click\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport filtersIcon from '../icons/filtersIcon.svg';\nimport effectsIcon from '../icons/effectsIcon.svg';\nimport MenuItemIconAbove from './M...
javascript
chosen
[ { "from": "system", "value": "Remove instagram temporarily until all instagram app permissions are resolved\n" }, { "from": "human", "value": "/** index.js\n* @file: /config/index.js\n* @description: Handles passport authentication\n* @parameters: Object(app), Object(passport)\n* @exports: Passp...
javascript
chosen
[ { "from": "system", "value": "Add utm metadata to sharing link for tracking\n" }, { "from": "human", "value": "import { connect } from 'react-redux'\nimport ModalShare from '../components/ModalShare'\nimport { showHideModal } from '../actions'\nimport { withRouter } from 'react-router'\n\nimport...
javascript
chosen
[ { "from": "system", "value": "Add implimentations of the .get and .set methods.\n\nWhen you have a property that is only a function, it\nwill be the method implementation used when the\nobject is in that state, or any of it's child\nsubstates.\n\nIn this case, a call to uri.get() will reach the\nsame functi...
javascript
chosen
[ { "from": "system", "value": "Use .withRouter() instead of context to get active link, since context API apparently isn't quite stable\n\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { Link, IndexLink } from 'react-router';\n\nexport default class NavLink e...
javascript
chosen
[ { "from": "system", "value": "Make angular work correctly when compressed ... again ... :rage:\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('calendarApp')\n .controller('AppointmentmodalCtrl', function ($scope, $modalInstance, event, Config) {\n 'use strict';\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add number input to mui\n" }, { "from": "human", "value": "/**\n * Created by steve on 15/09/15.\n */\nimport React from 'react';\nvar utils = require('../utils');\nvar classNames = require('classnames');\nimport ValidationMixin from '../ValidationMixin';\n\nclass M...
javascript
chosen
[ { "from": "system", "value": "Add log on socket errors.\n" }, { "from": "human", "value": "/*\r\nCopyright (c) Lightstreamer Srl\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain...
javascript
chosen
[ { "from": "system", "value": "Use arrow functions instead of `function` keyword" }, { "from": "human", "value": "'use strict';\n\nconst debug = require('debug')('calendar:routes:common');\n\nmodule.exports = {\n sendAppropriateResponse : function (req, res, output) {\n if (req.accepts('html'...
javascript
chosen
[ { "from": "system", "value": "Prepare the analyzer base config values before opening the config dialog (setting default values)\n" }, { "from": "human", "value": "'use strict';\nimport _ from 'lodash/core';\n\nimport ConfigurationEditController from './config.edit.controller';\nimport configurat...
javascript
chosen
[ { "from": "system", "value": "chore(repl): Use process argv as inspection source\n" }, { "from": "human", "value": "var UDF = require( '..' )\nvar BlockDevice = require( 'blockdevice' )\nvar util = require( 'util' )\nvar fs = require( 'fs' )\nvar path = require( 'path' )\n\nfunction inspect( val...
javascript
chosen
[ { "from": "system", "value": "Fix database errors not displaying\n" }, { "from": "human", "value": "module.exports = function (req, res) {\n\tvar keystone = req.keystone;\n\tif (!keystone.security.csrf.validate(req)) {\n\t\treturn res.apiError(403, 'invalid csrf');\n\t}\n\treq.list.model.findByI...
javascript
chosen
[ { "from": "system", "value": "Switch to DSL for OTP authentication.\n" }, { "from": "human", "value": "exports = module.exports = function(parse, csrfProtection, loadState, authenticate, proceed) {\n \n /*\n return [\n require('body-parser').urlencoded({ extended: false }),\n ceremony.l...
javascript
chosen
[ { "from": "system", "value": "CLI: Add CRA preset to MDX template\n" }, { "from": "human", "value": "module.exports = [\n {\n name: '@storybook/addon-docs/react/preset',\n options: {\n configureJSX: true,\n },\n },\n];\n" }, { "from": "gpt", "value": "module.exports =...
javascript
chosen
[ { "from": "system", "value": "Use https URL for bing" }, { "from": "human", "value": "/*\n * MapEmAll is licensed under the conditions of the MIT License (MIT)\n *\n * Copyright (c) 2015-2016 Philip Stöhrer\n * All rights reserved.\n *\n * See https://raw.githubusercontent.com/stophi-dev/MapEmAl...
javascript
chosen
[ { "from": "system", "value": "Switch off a browsersync label\n" }, { "from": "human", "value": "/**\n * Start browserSync server\n */\n'use strict';\n\nconst gulp = require('gulp'),\n fs = require('fs');\n\nmodule.exports = function(options) {\n\n return () => {\n // If index.html e...
javascript
chosen
[ { "from": "system", "value": "Create a better fluent example in the tests\n" }, { "from": "human", "value": "var replace = require( \"../src/str-replace\" );\n\nmodule.exports = {\n replace_all: function( assert ) {\n var actual = replace\n .all( \"/\" )\n .from( \"/home/dir\" )\n ...
javascript
chosen
[ { "from": "system", "value": "Use the new noconflict build to show an example of how to embed rollbar.js into a library which will not cause any conflicts with another install of Rollbar @rokob\n" }, { "from": "human", "value": "import Rollbar from 'rollbar';\n\nconst rollbar = new Rollbar({\n ...
javascript
chosen
[ { "from": "system", "value": "Change templates action to follow our naming convention\n" }, { "from": "human", "value": "const {Action, api} = require('actionhero');\nconst templates = require('../lib/dal/templates');\n\n\nmodule.exports.allTemplatesPublic = class TopViewedPublishedDatasetsActio...
javascript
chosen
[ { "from": "system", "value": "Add packageType to the list of flags android builds understand and can parse\n\nThis allows corber to perform bundle/aap builds for android\nhttps://github.com/apache/cordova-android/pull/764\n" }, { "from": "human", "value": "const _pick = require('lodash...
javascript
chosen
[ { "from": "system", "value": "Change the vote up/down buttons into thumbs up/down.\n" }, { "from": "human", "value": "// ------------------------------ Dynamic Icons ------------------------------ //\n\n/**\n * Take an icon name (such as \"open\") and return the HTML code to display the icon\n *...
javascript
chosen
[ { "from": "system", "value": "Fix font size, line height and selection background\n" }, { "from": "human", "value": "define(function (require, exports, module) {\n \"use strict\";\n\n var ExtensionUtils = brackets.getModule(\"utils/ExtensionUtils\");\n\n ExtensionUtils.addEmbeddedStyleS...
javascript
chosen
[ { "from": "system", "value": "Fix file error call parameters\n" }, { "from": "human", "value": "// Dependencies ---------------------------------------------------------------\n// ----------------------------------------------------------------------------\nvar fs = require('fs'),\n path = re...
javascript
chosen
[ { "from": "system", "value": "Update club endpoint for intake form\n" }, { "from": "human", "value": "const LOAD = 'hackclub/clubs/LOAD'\nconst LOAD_SUCCESS = 'hackclub/clubs/LOAD_SUCCESS'\nconst LOAD_FAIL = 'hackclub/clubs/LOAD_FAIL'\n\nconst initialState = {\n loaded: false\n}\n\nexport defau...
javascript
chosen
[ { "from": "system", "value": "Return support of old algorithm (changing document.location)\n\nused when links are loaded via ajax" }, { "from": "human", "value": "links = document.links;\nfor(var i = 0; i < links.length; ++i) {\n href = links[i].href;\n if(href) {\n if(href.match(/http:\\/\...
javascript
chosen
[ { "from": "system", "value": "Add WebVTT subtitles drop on each browsers\n" }, { "from": "human", "value": "function lg(s) { console.log(s); }\n\nvar\n\telBody = document.body,\n\telVideo = document.querySelector( \"video\" )\n;\n\nelBody.ondragover = function() {\n\tlg(\"body:ondragover\");\n\t...
javascript
chosen
[ { "from": "system", "value": "Load background even faster first time\n" }, { "from": "human", "value": "var default_opacity = 0.2;\nvar animate_time = 0;\nvar default_animate_time = 1000;\nvar num_images = 152;\n\nfunction fix_resolutions() {\n var img = $('#imgloader').get(0);\n var img_ratio...
javascript
chosen
[ { "from": "system", "value": "Add debug to prod settings\n" }, { "from": "human", "value": "module.exports = {\r\n port: 3000,\r\n canvas: {\r\n apiUrl: 'https://kth.instructure.com/api/v1'\r\n },\r\n logging: {\r\n log: {\r\n level: 'info',\r\n src: false\r\n },\r\n st...
javascript
chosen
[ { "from": "system", "value": "[auth] Connect to www not beta (which no longer exists)\n" }, { "from": "human", "value": "\"use strict\";\nvar BaobabControllers; //globals\n\nBaobabControllers\n.controller('AppCtrl', ['$scope', '$me', '$inbox', '$auth', '$location', '$cookieStore', '$sce', functi...
javascript
chosen
[ { "from": "system", "value": "Add tests for proposition display.\n" }, { "from": "human", "value": "\ndefine(\n[\n 'chai',\n 'sinon',\n 'fixtures',\n 'argumenta/widgets/Proposition',\n 'argumenta/widgets/Base'\n],\nfunction(chai, undefined, fixtures, Proposition, Base) {\n\n va...
javascript
chosen
[ { "from": "system", "value": "Handle errors, and turn off after delay\n" }, { "from": "human", "value": "var http = require('http');\nvar gpio = require('pi-gpio');\nvar currentState = false;\n\nvar actuator = function(outputValue) {\n console.log('Switching relay: '+outputValue);\n currentSta...
javascript
chosen
[ { "from": "system", "value": "Make default code more sensible (on instead of off)\n\nProbably should use a proper template here, though.\n" }, { "from": "human", "value": "define(['codemirror', 'matchbrackets', 'continuecomment', 'javascripthint', 'javascriptmode'], function() {\n function in...
javascript
chosen
[ { "from": "system", "value": "Add runtime metamodel to Callable\n" }, { "from": "human", "value": "function initType(a,b,c,d,e,f){}//IGNORE\nfunction String$(x){}//IGNORE\nfunction ArraySequence(x){}//IGNORE\nvar exports;//IGNORE\n\nfunction Callable(wat) {\n return wat;\n}\ninitType(Callable...
javascript
chosen
[ { "from": "system", "value": "[BUGFIX] Make sure the requirejs binaries wont get uglified since they are breaking the ulgification\n" }, { "from": "human", "value": "/**\n * Grunt-Contrib-Uglify\n * @description Minify files with UglifyJS.\n * @docs https://github.com/gruntjs/grunt-contrib-uglif...
javascript
chosen
[ { "from": "system", "value": "webview: Use non-breaking space to separate emoji and reaction count.\n\nThis way, text-overflow will not break lines between emojis and\ntheir reaction counts.\n" }, { "from": "human", "value": "/* @flow */\nimport type { AggregatedReaction, RealmEmojiState, RealmE...
javascript
chosen
[ { "from": "system", "value": "Add a constructor for a component of the save-button\n" }, { "from": "human", "value": "(function(app) {\n 'use strict';\n\n var jCore = require('jcore');\n var helper = app.helper || require('../helper.js');\n var dom = app.dom || require('../dom.js');\n var B...
javascript
chosen
[ { "from": "system", "value": "Update new tab base URL to auto-forward + display user-friendly title\n" }, { "from": "human", "value": "!(function( global ) {\n \n var Opera = function() {};\n\n Opera.prototype.REVISION = '1';\n\n Opera.prototype.version = function() {\n return this.REVISI...
javascript
chosen
[ { "from": "system", "value": "Make _movie include the id\n" }, { "from": "human", "value": "const hyperglue = require('hyperglue')\nconst html = require('fs').readFileSync(__dirname + '/index.html')\n\nmodule.exports = function(movie) {\n\treturn hyperglue(html, {\n\t\t'.name': movie.name,\...
javascript
chosen
[ { "from": "system", "value": "Fix for bug introduced with r510. Only make the removeChild call if the parentNode is properly set. This way we can zap the grid div contents quickly with the div.innerHTML = \"\" but still have a valid good destroy() function.\n\ngit-svn-id: 86a4f41f9d0383640198789122b520d4105...
javascript
chosen
[ { "from": "system", "value": "Make perms write_roles actually work\n" }, { "from": "human", "value": "/**\n * Based on: https://github.com/iriscouch/manage_couchdb/\n * License: Apache License 2.0\n **/\nfunction(newDoc, oldDoc, userCtx, secObj) {\n var ddoc = this;\n\n secObj.admins = secObj....
javascript
chosen
[ { "from": "system", "value": "Implement getting of artists by their genre\n" }, { "from": "human", "value": "var model = require('../models/index');\n\n/* Returns a list of artists with the given genre (in the query string) */\nexports.getArtistsByGenre = function(req, res) {\n return res.statu...
javascript
chosen
[ { "from": "system", "value": "Mark covid update link type as non-optional\n" }, { "from": "human", "value": "// @flow\n\nexport type UpdateType = {\n\tauthors: string[],\n\tcategories: string[],\n\tcontent: string,\n\tdatePublished: ?string,\n\texcerpt: string,\n\tfeaturedImage: ?string,\n\tlink...
javascript
chosen
[ { "from": "system", "value": "Add a wrapper so that nodejs tests catch uncaught exceptions.\n" }, { "from": "human", "value": "import { isNil } from 'substance'\n\nexport default function addTestAPI (tape) {\n const Test = tape.Test\n\n Test.prototype.nil =\n Test.prototype.isNil = function (...
javascript
chosen
[ { "from": "system", "value": "Add fragments to merged props\n" }, { "from": "human", "value": "import {\n visit,\n remote,\n saveAndProcessPage,\n copyPage,\n} from '../action_creators'\nimport { urlToPageKey } from './url'\n\nexport function mapStateToProps(\n state = { pages: {}, breezy: ...
javascript
chosen
[ { "from": "system", "value": "Remove obsolete import of handleRequest function.\n\ngit-svn-id: fac99be8204c57f0935f741ea919b5bf0077cdf6@9490 688a9155-6ab5-4160-a077-9df41f55a9e9\n" }, { "from": "human", "value": "import('helma.webapp', 'webapp');\nimport('model');\n\nvar handleRequest = webapp.h...
javascript
chosen
[ { "from": "system", "value": "Add view mode to UI store\n" }, { "from": "human", "value": "import { Store, toImmutable } from 'nuclear-js'\n\nimport actionTypes from '~/actions/actionTypes'\nconst { TOGGLE_LICENSE_MODAL, TOGGLE_ABOUT_MODAL } = actionTypes\n\nexport default Store({\n getInitial...
javascript
chosen
[ { "from": "system", "value": "Use the .caller property to test tail-calls instead of trying to cause stackoverflow errors\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2012-2014 André Bargull\n * Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.\n *\n * <...
javascript
chosen
[ { "from": "system", "value": "Add userId var and setMentorId function\n" }, { "from": "human", "value": "app.controller('NavController', ['$http', '$firebaseAuth', '$mdDialog', 'AuthFactory', function($http, $firebaseAuth, $mdDialog, AuthFactory) {\n console.log('NavController running');\n var...
javascript
chosen
[ { "from": "system", "value": "Fix windows name pipeline issue\n" }, { "from": "human", "value": "'use strict';\nconst path = require('path');\nconst os = require('os');\n\nexports.toNumber = function(x) { return (x = Number(x)) >= 0 ? x : false; };\nexports.getSocketPath = function(channel)\n{\n...
javascript
chosen
[ { "from": "system", "value": "Set a default for localstorage data, just in case.\n" }, { "from": "human", "value": "walk(document.body);\n\nvar rpl = \"butt\";\nfunction loadRpl() {\n var rpl = localStorage[\"rpl\"];\n return rpl;\n}\n\nfunction walk(node) \n{\n\t// I stole this function from ...
javascript
chosen
[ { "from": "system", "value": "Add log logic in client module for postSequences event\n" }, { "from": "human", "value": "/**\n * @module client/main\n */\n'use strict';\n\nrequire('./app');\nrequire('angular');\n\n/**\n * Each 'index' generated via grunt process dynamically includes all browserif...
javascript
chosen
[ { "from": "system", "value": "Fix typo in project grid event registration\n" }, { "from": "human", "value": "(function() {\n var grid, projectItems;\n\n // setup grid\n {\n grid = $('.project-grid');\n grid.isotope({\n itemSelector: '.project-item',\n\n percentPosition: true,\...
javascript
chosen
[ { "from": "system", "value": "Fix maximum length for messages\n" }, { "from": "human", "value": "'use strict';\nangular.module('arethusa.core').service('notifier', function () {\n var self = this;\n this.messages = [];\n\n function Message(type, message, description) {\n this.type = type;\...
javascript
chosen
[ { "from": "system", "value": "Fix and ungodly number of linter errors\n" }, { "from": "human", "value": "navigator.geolocation.getCurrentPosition(function(position) {\n makeMap({lat: position.coords.latitude, lng: position.coords.longitude}); \n}, function(err) {\n console.error(err);\n});\nv...
javascript
chosen
[ { "from": "system", "value": "Return dispatch in the try block.\n" }, { "from": "human", "value": "import {createAction} from 'redux-actions';\nimport axios from 'axios';\n\nexport const FETCH_APP_REQUEST = 'FETCH_APP_REQUEST';\nexport const FETCH_APP_SUCCESS = 'FETCH_APP_SUCCESS';\nexport const...
javascript
chosen
[ { "from": "system", "value": "Fix typo in option validation.\n" }, { "from": "human", "value": "import { declare } from \"@babel/helper-plugin-utils\";\nimport transformTypeScript from \"@babel/plugin-transform-typescript\";\n\nexport default declare(\n (api, { jsxPragma, allExtensions = false,...
javascript
chosen
[ { "from": "system", "value": "Fix simple button isActing state\n" }, { "from": "human", "value": "import Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport default class FormButtonComponent extends Component {\n @action\n handleClick() {\n if (!this.args...
javascript
chosen
[ { "from": "system", "value": "Create basic Boid class with properties\n" }, { "from": "human", "value": "function setup() {\n // put setup code here\n}\n\nfunction draw() {\n // put drawing code here\n}\n" }, { "from": "gpt", "value": "function setup() {\n createCanvas(640, 480);\...
javascript
chosen
[ { "from": "system", "value": "Use proper value center (not middle) for `<FlexParent horizontalAlignment>` attribute\n" }, { "from": "human", "value": "/* eslint-disable import/no-unresolved */\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\n// Styling\nimport { FlexParent, Fl...
javascript
chosen
[ { "from": "system", "value": "Add a try guard around git description\n" }, { "from": "human", "value": "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// Support for Node 0.10\n// See https://github.com/webpack/css-loader/issues/144\nre...
javascript
chosen
[ { "from": "system", "value": "Disable days before today for selection\n" }, { "from": "human", "value": "import React from \"react\";\nimport DayPicker, {DateUtils} from \"react-day-picker\";\nimport \"./MeetingDaysField.scss\";\n\nclass MeetingDaysField extends React.Component {\n static propT...
javascript
chosen
[ { "from": "system", "value": "Use new react root api\n" }, { "from": "human", "value": "import { ApolloProvider } from \"@apollo/client\"\nimport API from \"api\"\nimport \"bootstrap/dist/css/bootstrap.css\"\nimport { jumpToTop } from \"components/Page\"\nimport \"locale-compare-polyfill\"\nimpo...
javascript
chosen
[ { "from": "system", "value": "Add alternate callback for Heroku\n" }, { "from": "human", "value": "import React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { browserHistory, Router } from 'react-router';\nimport { syncHistoryWithStore } fro...
javascript
chosen
[ { "from": "system", "value": "Fix issue with post with no tag\n" }, { "from": "human", "value": "import needle from 'needle';\nimport { SiteConf, getDate } from 'base';\n\nexport const postsApiHandler = (req, res) => {\n needle('get', SiteConf.PostsApi)\n .then(resp => {\n const data =...
javascript
chosen
[ { "from": "system", "value": "Format data smaller in logger\n" }, { "from": "human", "value": "import debugModule from \"debug\";\nconst debug = debugModule(\"debugger:store:common\");\nconst reduxDebug = debugModule(\"debugger:redux\");\n\nimport { compose, createStore, applyMiddleware } from \...
javascript
chosen
[ { "from": "system", "value": "Append text based on current_line number\n" }, { "from": "human", "value": "//jQuery all client side\n$(document).ready(function(){\n\t$('#txt').bind('keypress', function(e) {\n\t\tif(e.keyCode==13){\n\t\t\tconsole.log('test');\n\t\t\t$.getJSON('/check_code', {\n\t\...
javascript
chosen
[ { "from": "system", "value": "Fix purchase confirmation decimal points\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport { FormattedTime } from 'react-intl';\nimport { epochToDate } from '../_utils/DateUtils';\nimport { M } from '../_common';\n\nconst PurchaseC...
javascript
chosen
[ { "from": "system", "value": "Update play button selector for Hype Machine test.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(driver, connectorSpec) {\n\tconnectorSpec.shouldBehaveLikeMusicSite(driver, {\n\t\turl: 'http://hypem.com/artist/Violet+Days+x+Win+and+Wo...
javascript
chosen
[ { "from": "system", "value": "Use proper placeholders for future functionalities\n" }, { "from": "human", "value": "const {i18n, React} = Serverboards\nimport Details from '../containers/details'\n\nclass DetailsTab extends React.Component{\n constructor(props){\n super(props)\n\n this.st...
javascript
chosen
[ { "from": "system", "value": "Change content type check to check for 'application/json' not 'json'\n" }, { "from": "human", "value": "var Promise = require(\"bluebird\");\n\nmodule.exports = (response, body) => {\n var outResponse = {\n statusCode: response.statusCode,\n headers: response...
javascript
chosen
[ { "from": "system", "value": "Troubleshoot script for displaying getting the counts of tickets assigned to each user.\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 ...
javascript
chosen
[ { "from": "system", "value": "Add ISO-639-2 code to Albanian locale\n" }, { "from": "human", "value": "import formatDistance from './_lib/formatDistance/index'\nimport formatLong from './_lib/formatLong/index'\nimport formatRelative from './_lib/formatRelative/index'\nimport localize from './_li...
javascript
chosen
[ { "from": "system", "value": "Remove chai truncation to read error messages on spec failure\n" }, { "from": "human", "value": "var chai = require('chai');\nvar sinonChai = require('sinon-chai');\nvar sdk = require('flowxo-sdk');\n\nchai.use(sinonChai);\nchai.use(sdk.Chai);\n\nchai.should();\ncha...
javascript
chosen
[ { "from": "system", "value": "fix: Fix syntax errors made in previous commit\n" }, { "from": "human", "value": "import classNames from 'classnames';\nimport React, { PropTypes } from 'react';\n\nconst HeaderView = ({\n items,\n githubLink,\n onLabelClick\n}) => (<div className=\"github-...
javascript
chosen
[ { "from": "system", "value": "Add ref for file upload dropZone\n\n" }, { "from": "human", "value": "import { h, Component } from 'preact';\nimport Dropzone from 'react-dropzone';\nimport style from './style';\n\nexport default class FileUpload extends Component {\n constructor(props) {\n sup...
javascript
chosen