conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Refactor IconView to simplify placeholder behaviour\n" }, { "from": "human", "value": "var $ = require('jquery');\nvar CoreView = require('backbone/core-view');\nvar iconTemplates = {};\n\nvar importAllIconTemplates = function () {\n var templates = require.context...
javascript
chosen
[ { "from": "system", "value": "Fix get user info link in search list\n" }, { "from": "human", "value": "/**\n*\n* InputSearchLi\n*\n*/\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport styles from './styles.scss';\n\nfunction InputSearchLi({ onClick, isAdding, item }) {\n...
javascript
chosen
[ { "from": "system", "value": "Add attributes for drag and drop\n" }, { "from": "human", "value": "function generate_board_page(that, board_id){\n /* Generate the board page */\n\n // Gets the node of board page\n var bp_node = that.nodeById('board_page');\n\n // Make a serverCall to ...
javascript
chosen
[ { "from": "system", "value": "Remove selectorFound event listener\nRename templateLayout() to init()\n" }, { "from": "human", "value": "/*!\n * TemplateLayout Wef plugin\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\n\n//requires: cssParser\n//exports: templateLayout\n(function () ...
javascript
chosen
[ { "from": "system", "value": ":rotating_light: Fix Access-Control-Allow-Headers to single line\n\n" }, { "from": "human", "value": "const leancloudHeaders = require('leancloud-cors-headers');\n\nmodule.exports = function() {\n return function(req, res, next) {\n res.setHeader('Access-Control...
javascript
chosen
[ { "from": "system", "value": "Add function to generate general Ruby file name\n" }, { "from": "human", "value": "define(function (require, exports, module) {\n 'use strict';\n\n function CodeWriter(indentString) {\n this.lines = [];\n this.indentString = (indentString ? indentString : ' ...
javascript
chosen
[ { "from": "system", "value": "Fix react-app-rewire-less not working on Windows\n\nCloses #53" }, { "from": "human", "value": "function rewireLess (config, env, lessLoaderOptions = {}) {\n const lessExtension = /\\.less$/;\n\n const fileLoader = config.module.rules\n .find(rule => rule.loade...
javascript
chosen
[ { "from": "system", "value": "Set the coutdown min and sec values to 00 when the deadline time has been reached.\n" }, { "from": "human", "value": "$(document).ready(function(){\n $('.log-btn').click(function(){\n\t$('.log-status').addClass('wrong-entry');\n $('.alert').fadeIn(500);\n ...
javascript
chosen
[ { "from": "system", "value": "Remove various BL Megas from Low Tier Random" }, { "from": "human", "value": "exports.BattleFormatsData = {\n\tkangaskhanmega: {\n\t\trandomBattleMoves: [\"fakeout\",\"return\",\"suckerpunch\",\"earthquake\",\"poweruppunch\",\"crunch\"],\n\t\trandomDoubleBattleMoves...
javascript
chosen
[ { "from": "system", "value": "Fix required value prop failing on null values\n" }, { "from": "human", "value": "import AdvancedSelect, {\n propTypes as advancedSelectPropTypes\n} from \"components/advancedSelectWidget/AdvancedSelect\"\nimport { AdvancedSingleSelectOverlayTable } from \"componen...
javascript
chosen
[ { "from": "system", "value": "Add message prop and display\n" }, { "from": "human", "value": "import React from 'react'\n\nconst Form = ({fields, handleChange, handleSubmit, submitValue, message}) => {\n const formFields = fields.map(field => {\n return (\n <div>\n <label>{field....
javascript
chosen
[ { "from": "system", "value": "Append CoderStats link rather than cloning posibly non-existing link item.\nDon't listen on DOMSubtreeModified event\n" }, { "from": "human", "value": "var link = document.getElementsByClassName('octicon-link')[0],\n path = document.location.pathname,\n detail...
javascript
chosen
[ { "from": "system", "value": "Allow srcset attribute on images\n" }, { "from": "human", "value": "import sanitizeHtml from 'sanitize-html';\nimport { Utils } from '../modules';\nimport { throwError } from './errors.js';\n\nUtils.sanitizeAllowedTags = [\n 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blo...
javascript
chosen
[ { "from": "system", "value": "Use config.OSF.apiNamespace instead of hardcoding original namespace.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n model(params) {\n let node = this.modelFor('nodes.detail');\n this.store.ada...
javascript
chosen
[ { "from": "system", "value": "Test no longer checks for blank, checks that it spits out somehting\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('maintenance-banner', 'Integration | C...
javascript
chosen
[ { "from": "system", "value": "Use lib from npm instead of ./lib\n" }, { "from": "human", "value": "const path = require('path');\nconst fs = require('fs');\nconst streamsql = require('streamsql');\nconst config = require('./config');\nconst configStore = require('../../lib/config.js');\nconst db...
javascript
chosen
[ { "from": "system", "value": "Fix Facebook \"_=_\" appended hash issue\n\nRefs #104.\n" }, { "from": "human", "value": "import React from 'react';\nimport { Route } from 'react-router';\n\nimport App from 'containers/App';\nimport HomePage from 'containers/HomePage';\nimport LoginPage from 'cont...
javascript
chosen
[ { "from": "system", "value": "Fix small issue with contsantly copying over the hidden chans \n\n" }, { "from": "human", "value": "var defaults = require('./defaults.json'),\n _ = require('lodash'),\n path = require('path'),\n fs = require('fs'),\n mkpath = require('mkpath'),\n home = proces...
javascript
chosen
[ { "from": "system", "value": "Stop observing value changes when the view is unloaded." }, { "from": "human", "value": "App.InsightChartView = Em.View.extend({\n classNames: [\"chart\"],\n\n thumbNailBinding: \"controller.thumbNail\",\n width:null,\n height: null,\n viz: null,\n specUpdated...
javascript
chosen
[ { "from": "system", "value": "Add 'onMouseLeave' & 'onMouseUp' props\n" }, { "from": "human", "value": "import React, { Fragment, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nclass Link extends PureComponent...
javascript
chosen
[ { "from": "system", "value": "Update date change for build\n" }, { "from": "human", "value": "import React, {Component} from \"react\";\nimport RaisedButton from \"material-ui/RaisedButton\";\n\nconst styles = {\n button: {\n margin: 12,\n },\n}\n\nclass Home extends Component {\n render()...
javascript
chosen
[ { "from": "system", "value": "Add missing config variable name\n" }, { "from": "human", "value": "\nvar path = require('path');\nvar yaml_config = require('node-yaml-config');\nvar _ = require('lodash');\n\nfunction ymlHerokuConfigModule() {\n\n var HEROKU_VARS_SUPPORT = [\n 'user', 'passwor...
javascript
chosen
[ { "from": "system", "value": "Remove style hardcoding (margin: '-5px') in Title component\n" }, { "from": "human", "value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport EditableLabel from 'components/widgets/EditableLabel'\n\nimport {Title, LaneHeader, RightContent } fr...
javascript
chosen
[ { "from": "system", "value": "Reset setting fields when saving fails.\n" }, { "from": "human", "value": "jQuery(function($) {\n $('.setting .js-save-on-change').each(function () {\n var $field = $(this);\n $field.closest('.setting').data('old', $field.val());\n });\n\n\t$(doc...
javascript
chosen
[ { "from": "system", "value": "Store the options in the local storage\n" }, { "from": "human", "value": "\"use strict\";\n\nvar router = new VueRouter({\n routes: [\n { path: \"/search\", component: Vue.component(\"main-search\") },\n { path: \"/tags\", component: Vue.component(\...
javascript
chosen
[ { "from": "system", "value": "Add action item to TODO.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2018 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.GENMODEL({\n package: 'foam.nanos.client',\n name: 'Client',\n imple...
javascript
chosen
[ { "from": "system", "value": "Update floating button to use handleClick callback\n" }, { "from": "human", "value": "'use strict';\n\nimport React, { Component } from 'react';\nimport ReactCSS from 'reactcss';\n\nclass FloatingButton extends Component {\n classes() {\n return {\n 'defaul...
javascript
chosen
[ { "from": "system", "value": "Fix trailing comma that causes load problems in IE\n" }, { "from": "human", "value": "enyo.kind({\n\tname: \"enyo.canvas.Text\",\n\tkind: enyo.canvas.Shape,\n\tpublished: {\n\t\ttext: \"\",\n\t\tfont: \"12pt Arial\",\n\t\talign: \"left\",\n\t},\n\trenderSelf: functi...
javascript
chosen
[ { "from": "system", "value": "createNotificationsMiddleware: Put an arg default back\n" }, { "from": "human", "value": "import { fetch } from 'domain/Api';\nimport ApiCall from 'containers/ApiCalls';\n\n/*\n * Supports currying so that args can be recycled more conveniently.\n * A contrived exam...
javascript
chosen
[ { "from": "system", "value": "Print stack trace on all errors that have it\n" }, { "from": "human", "value": "'use strict';\n\nvar express = require('express')\n , logger = require('morgan')\n , mongoose = require('mongoose')\n , path = require('path')\n , messages = require('./routes/messag...
javascript
chosen
[ { "from": "system", "value": "Add Middleware to serve static assets\n" }, { "from": "human", "value": "var express = require('express'),\n routes = require(__dirname + '/app/routes.js'),\n app = express(),\n port = (process.env.PORT || 3000);\n\n// Application settings\napp.engine('html...
javascript
chosen
[ { "from": "system", "value": "Add api to module exports\n" }, { "from": "human", "value": "var express = require('express');\nvar redis = require('ioredis');\nvar logger = require('morgan');\nvar cookieParser = require('cookie-parser');\nvar bodyParser = require('body-parser');\n\nvar routes = r...
javascript
chosen
[ { "from": "system", "value": "Tweak JavaScript to pass lint\n" }, { "from": "human", "value": "$('.help-content').hide()\n$('.help-toggle').click(function(){\n $(this).toggleClass('open').next('.help-content').slideToggle('slow');\n});" }, { "from": "gpt", "value": "/* global $ */\n...
javascript
chosen
[ { "from": "system", "value": "Handle case where IntroWithButton has no button\n" }, { "from": "human", "value": "import React from \"react\";\n\nclass IntroWithButton extends React.Component {\n static displayName = \"Panel.IntroWithButton\";\n\n static propTypes = {\n children: React.PropT...
javascript
chosen
[ { "from": "system", "value": "Save one request on bookmark delete.\n" }, { "from": "human", "value": "angular.module('caco.bookmark.crtl', ['caco.bookmark.REST'])\n .controller('BookMarkCrtl', function ($rootScope, $scope, $stateParams, $location, BookMarkREST) {\n $rootScope.module = ...
javascript
chosen
[ { "from": "system", "value": "Use fadeIn/Out instead of show/hide since the latter are laggy in weaker machines\n" }, { "from": "human", "value": "(function main() {\n\tvar active = $('ul.nav li.active');\n\n\t$('#ART').add('#credits').show(900);\n\n\t$('ul.nav').on('click', 'li', function() {\n...
javascript
chosen
[ { "from": "system", "value": "Make bullets keep track of their weapons owners\n" }, { "from": "human", "value": "'use strict';\n\nDarwinator.Bow = function(game, coolDown, bulletSpeed, bullets, damage, owner) {\n Darwinator.Weapon.call(this, game, coolDown, bulletSpeed, damage, owner);\n this....
javascript
chosen
[ { "from": "system", "value": "Allow functions in global exposure bodies" }, { "from": "human", "value": "import createGraph from '../query/lib/createGraph.js';\nimport {Match} from 'meteor/check';\n\nexport const ExposureDefaults = {\n blocking: false,\n method: true,\n publication: tru...
javascript
chosen
[ { "from": "system", "value": "Convert time to JS format\n\nJS uses ms instead of s provided by the API.\n" }, { "from": "human", "value": "var async = require('async');\n\nvar pingdom = require('./pingdom');\n\n\nfunction checks(config, limit, done) {\n var api = pingdom(config);\n\n api.c...
javascript
chosen
[ { "from": "system", "value": "Remove unused var in test\n" }, { "from": "human", "value": "require('dotenv/config')\nconst sinon = require('sinon')\nconst tap = require('tap')\n\nconst App = require('../lib/app')\n\ntap.test('App', async t => {\n\tawait t.test('run', async t => {\n\t\tawait t.te...
javascript
chosen
[ { "from": "system", "value": "9623: Apply search when dismissing any popover\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from 'react-bootstrap/Button';\nimport OverlayTrigger from 'react-bootstrap/OverlayTrigger';\n\nimport { ...
javascript
chosen
[ { "from": "system", "value": "Add support for mute role\n" }, { "from": "human", "value": "const mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\n\nvar SettingSchema = new Schema({\n modLogID: {\n type: Number,\n required: false\n },\n filterInvites: {\n ...
javascript
chosen
[ { "from": "system", "value": "Disable SimpleMDE autosaving, as it retains it would retain it's content after posting\n" }, { "from": "human", "value": "\n$(document).ready(function(){\n var simplemde = new SimpleMDE({\n element: $(\"#postreply\")[0],\n autosave: {\n e...
javascript
chosen
[ { "from": "system", "value": "Read default cookie opt setting from body data tag\n" }, { "from": "human", "value": "var componentEvent = require('kwf/component-event');\nvar cookies = require('js-cookie');\n\nvar CookieOpt = {};\n\nCookieOpt.getDefaultOpt = function() {\n return 'in'; // TODO...
javascript
chosen
[ { "from": "system", "value": "Revert \"get dynamicly if https or http is supported for youtube iframe api\"\n\nThis reverts commit ffbdfe78a884b06447ff6da01137820224081962.\n" }, { "from": "human", "value": "Ext.namespace('Kwf.Utils.YoutubePlayer');\nKwf.Utils.YoutubePlayer.isLoaded = false;\nKw...
javascript
chosen
[ { "from": "system", "value": "Enable prefetching to try it out\n" }, { "from": "human", "value": "// This is a second entry point to speed up our query\n// to fetch search results.\n// We've patched react-scripts to add this as another entry\n// point. E.g., the Webpack config by running lives a...
javascript
chosen
[ { "from": "system", "value": "Add spec to verify custom query params are left alone\n\n[#29578495]\n" }, { "from": "human", "value": "describe(\"QueryString\", function() {\n\n describe(\"#setParam\", function() {\n\n it(\"sets the query string to include the given key/value pair\", function...
javascript
chosen
[ { "from": "system", "value": "Fix native Text computed lineHeight\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport theme from '../theme';\nimport { StyleSheet, Text } from 'react-native';\n\nconst styles = StyleSheet.create({\n text: {\n color: ...
javascript
chosen
[ { "from": "system", "value": "Set cron ranges to match real arrangement times\n" }, { "from": "human", "value": "const RoundpiecesBot = require('./../src/roundpiecesbot');\n\nconst token = process.env.ROUNDPIECES_API_KEY;\nconst adminUserName = process.env.ROUNDPIECES_ADMIN_USERNAME;\nconst list...
javascript
chosen
[ { "from": "system", "value": "Add method to read and write\n" }, { "from": "human", "value": "const path = require( 'path' )\nconst fs = require( 'fs' )\n\n// Create a new path from arguments.\nconst getAbsolutePath = ( ...args ) => path.resolve( path.join.apply( null, args ) )\nconst isExist ...
javascript
chosen
[ { "from": "system", "value": "Change benchmark results color to magenta\n\nas white on blue is barely visible in travis\n" }, { "from": "human", "value": "const chalk = require('chalk');\nfunction benchmarkResultsToConsole(suite){\n console.log(\"\\n\");\n console.log(\"==================\...
javascript
chosen
[ { "from": "system", "value": "Add another invalid use case\n" }, { "from": "human", "value": "import test from 'ava';\nimport avaRuleTester from 'eslint-ava-rule-tester';\nimport rule from '../src/rules/jsx-no-logical-expression';\n\nconst ruleTester = avaRuleTester(test, {\n parserOptions: {\n...
javascript
chosen
[ { "from": "system", "value": "Remove the boilerplate comment now that we have more tests.\n" }, { "from": "human", "value": "import { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('adapter:github-release', 'Unit | Adapter | github release', {\n // Specify the other units that are required ...
javascript
chosen
[ { "from": "system", "value": "Add target _blank on article links\n" }, { "from": "human", "value": "$( document ).ready(function() {\n\n\t/* Sidebar height set */\n\t$('.sidebar').css('min-height',$(document).height());\n\n\t/* Secondary contact links */\n\tvar scontacts = $('#contact-list-secon...
javascript
chosen
[ { "from": "system", "value": "Rewrite header handling in websocket disconnect event\n" }, { "from": "human", "value": "import WebSocketRequestContext from './WebSocketRequestContext.js'\n\n// TODO this should be probably moved to utils, and combined with other header\n// functions and utilities\...
javascript
chosen
[ { "from": "system", "value": "Improve hot loading compile time\n" }, { "from": "human", "value": "var config = require('./webpack.config.js');\nvar webpack = require('webpack');\nvar webpackDevServer = require('webpack-dev-server');\nvar compiler;\nvar server;\n\n// Source maps\nconfig.devtool =...
javascript
chosen
[ { "from": "system", "value": "Add etag as unique key\n\nFinish 25\n" }, { "from": "human", "value": "import React from 'react'\nimport VideoListItem from './video_list_item'\n\nconst VideoList = (props) => {\n\n const videoItems = props.videos.map((video) => {\n return <VideoListItem video={...
javascript
chosen
[ { "from": "system", "value": "Remove id from Record and add id field\n\nReason: on CardModel.update() it doesn’t keep the id field, so shit\ncrashes\n" }, { "from": "human", "value": "import uuid from 'uuid';\nimport { Record as record } from 'immutable';\n\nexport class CardModel extends record...
javascript
chosen
[ { "from": "system", "value": "Disable eslint for this for now." }, { "from": "human", "value": "export default function skipSpace() {\n // https://github.com/ternjs/acorn/blob/master/src/tokenize.js#L100-L116\n return function ha(endSign) {\n const endS = endSign ? endSign : '*/';\n let ...
javascript
chosen
[ { "from": "system", "value": "Improve specs for error event\n" }, { "from": "human", "value": "define(function(require) {\n\n var test = require('../../../test')\n var n = 0\n\n\n // 404\n var a = require('./a')\n test.assert(a === null, '404 a')\n\n // exec error\n setTimeout(function() ...
javascript
chosen
[ { "from": "system", "value": "Move cursor left on function completion.\n" }, { "from": "human", "value": "'use babel';\n\nimport {filter} from 'fuzzaldrin';\nimport commands from './commands';\nimport variables from './variables';\n\nexport const selector = '.source.cmake';\nexport const disable...
javascript
chosen
[ { "from": "system", "value": "Revert back to older atom-shell where remote-debugging works\n\nThis allows console to work again.\nIn b5b1c142b6d92d3f254c93aa43432230d4d31e14 we upgraded to an\natom-shell where remote-debugging /json doesn't seem to work.\nDetails at atom/atom-shell#969\n" }, { "from...
javascript
chosen
[ { "from": "system", "value": "Modify link generation to allow off site links\n" }, { "from": "human", "value": "import React from 'react';\nimport { Link } from 'react-router';\n\nfunction NavbarLink({to, href, className, component, children}) {\n const Comp = component || Link;\n\n return (\n...
javascript
chosen
[ { "from": "system", "value": "Disable redirect button on finish order page\n\n" }, { "from": "human", "value": "import { Component } from 'preact';\nimport style from './style';\n\nexport default class FinishOrder extends Component {\n constructor(props) {\n super(props);\n }\n\n render(pr...
javascript
chosen
[ { "from": "system", "value": "Add labels to task markers.\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport { List } from 'immutable';\nimport Polyline from './Polyline';\nimport Marker from './Marker';\n\nclass TaskPlot extends React.Component {\n\n shouldCom...
javascript
chosen
[ { "from": "system", "value": "Change api url to https\n" }, { "from": "human", "value": "import axios from 'axios';\n\nconst API_BASE = 'http://api.zorexsalvo.com/v1';\n\n\nexport default {\n getPosts: ({ commit }) => {\n axios.get(`${API_BASE}/posts/`).then(\n (response) => {\n ...
javascript
chosen
[ { "from": "system", "value": "Add flag to remove stuff outside of `g` element on resize & update.\n" }, { "from": "human", "value": "// remove all children of the main `g` element\n// prepare for re-drawing (e.g. during resize) with margins\nexport default ({\n g,\n margin\n}) => {\n g.select...
javascript
chosen
[ { "from": "system", "value": "Enable jqplot charts to be visible in IE8\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1058261\n" }, { "from": "human", "value": "//= require cfme_application\n//= require dialog_import_export\n//= require widget_import_export\n//= require jquery.jqplot\n//= requi...
javascript
chosen
[ { "from": "system", "value": "Support className & id attrs and stream of arrays.\n" }, { "from": "human", "value": "import Bacon from \"baconjs\"\nimport React from \"react\"\n\nexport default React.createClass({\n getInitialState() {\n return {}\n },\n tryDispose() {\n const {dispose} ...
javascript
chosen
[ { "from": "system", "value": "Use __propName as default action for button\n" }, { "from": "human", "value": "\nmi2JS.comp.add('base/Button', 'Base', '',\n\n// component initializer function that defines constructor and adds methods to the prototype \nfunction(proto, superProto, comp, superComp){...
javascript
chosen
[ { "from": "system", "value": "FIX Move the module definition to the top of the function\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar proxy = require('../lib/fiware-orion-pep'),\n config = require('../config');\n\nproxy.start(function (error, proxyObj) {\n if (error) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add java to automatic conversions\n" }, { "from": "human", "value": "var codes = document.getElementsByTagName(\"code\");\nvar title, elTitle, elPre;\nfor (var i=0, l=codes.length ; i<l ; i++) {\n elPre = codes[i].parentNode;\n if (elPre.tagName != \"PRE\") contin...
javascript
chosen
[ { "from": "system", "value": "Add support for chayns-call 52\n\n" }, { "from": "human", "value": "import * as jsonCallFunctions from './calls/index';\n\nconst jsonCalls = {\n 1: jsonCallFunctions.toggleWaitCursor,\n 2: jsonCallFunctions.selectTapp,\n 4: jsonCallFunctions.showPictures,\...
javascript
chosen
[ { "from": "system", "value": "Set up running like browser in command line, build renderComponent helper function\n" }, { "from": "human", "value": "// Set up testing enviroment to run like a browser in the command line \n\n\n// Build 'renderComponent' helper that should render a given react clas...
javascript
chosen
[ { "from": "system", "value": "Update js to bust compressor cache.\n" }, { "from": "human", "value": "\n'use strict';\n\n(function() {\n angular.module('fireStation.homeController', [])\n\n .controller('home', function($scope, map, $filter) {\n var homeMap = map.initMap('map', {s...
javascript
chosen
[ { "from": "system", "value": "Fix Error object's stacktrace inconsistency across browsers\n" }, { "from": "human", "value": "import Logger from 'ember-console';\nimport { isTesting } from './testing';\n\nlet onerror;\n// Ember.onerror getter\nexport function getOnerror() {\n return onerror;\n}\...
javascript
chosen
[ { "from": "system", "value": "Make the example test run without requiring local server\n" }, { "from": "human", "value": "var util = require('util'),\n webdriver = require('selenium-webdriver'),\n chrome = require('selenium-webdriver/chrome'),\n retry = require('./index.js');\n\nvar dri...
javascript
chosen
[ { "from": "system", "value": "Add comment in directories test\n" }, { "from": "human", "value": "/* global beforeEach, describe, it */\n\nvar watch = require('..');\nvar join = require('path').join;\nvar fs = require('fs');\nvar rimraf = require('rimraf');\nrequire('should');\n\nfunction fixture...
javascript
chosen
[ { "from": "system", "value": "Check to make sure app_metadata exists\n\nThere shouldn’t be cases where app_metadata doesn’t exist but if it doesn’t then it will cause an error that prevents the user from being logged in.\n\nSigned-off-by: Michael Willmott <4063ad43ea4e0ae77bf35022808393a246bdfa61@gmail.com>...
javascript
chosen
[ { "from": "system", "value": "Make the example a bit nicer\n" }, { "from": "human", "value": "// use level-dyno and open a new datastore\nvar dyno = require('../level-dyno.js');\nvar flake = require('flake')('eth0');\n\n// open a new database\nvar db = dyno('/tmp/users');\n\n// do the above sequ...
javascript
chosen
[ { "from": "system", "value": "Add third-party and CC-BY license URLs for 'de' locale\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.\n * \n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this so...
javascript
chosen
[ { "from": "system", "value": "Fix location of SSL key and certificate\n" }, { "from": "human", "value": "'use strict';\n\nvar spdyPush = require('..')\n , spdy = require('spdy')\n , express = require('express')\n , path = require('path')\n , fs = require('fs');\n\nvar app = express();\napp.u...
javascript
chosen
[ { "from": "system", "value": "Refactor to OOP ish design\n" }, { "from": "human", "value": "/*\n * Refresh rendered file through mfr\n */\n\n'use strict';\n\nvar $ = require('jquery');\nvar $osf = require('js/osfHelpers');\n\nvar FileRenderer = {\n start: function(url, selector){\n thi...
javascript
chosen
[ { "from": "system", "value": "Revert SQLite to file-based instead of in-memory" }, { "from": "human", "value": "/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\n\n/* jslint node: true */\nconst fs = require('fs')\nconst path = require('path')\nconst sequeli...
javascript
chosen
[ { "from": "system", "value": "Add logout and register state, remove incorrect templateUrl\n" }, { "from": "human", "value": "'use strict';\n\nvar pathwayApp = angular.module('pathwayApp', ['ui.router', 'templates']);\n\npathwayApp.config(function($stateProvider, $urlRouterProvider, $locationProv...
javascript
chosen
[ { "from": "system", "value": "fix(tests): Allow importing test data for any db collection\n" }, { "from": "human", "value": "const fs = require('fs');\nconst { promisify } = require('util');\nconst mongodb = require('mongodb');\nconst request = require('request');\n\nasync function readMongoDocu...
javascript
chosen
[ { "from": "system", "value": "Remove dependency on Node.js' util module\n\nCloses #194.\n" }, { "from": "human", "value": "\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error messa...
javascript
chosen
[ { "from": "system", "value": "Set delay to zero for local development.\n" }, { "from": "human", "value": "/*\n * In order to prevent errors caused by e2e tests running too fast you can slow them down by calling the following\n * function. Use higher values for slower tests.\n *\n * utils.delayPr...
javascript
chosen
[ { "from": "system", "value": "Trim whitespace on subtitle import\n" }, { "from": "human", "value": "const parseTime = (s) => {\n const re = /(\\d{2}):(\\d{2}):(\\d{2}),(\\d{3})/;\n const [, hours, mins, seconds, ms] = re.exec(s);\n return 3600*(+hours) + 60*(+mins) + (+seconds) + 0.001*(+ms);...
javascript
chosen
[ { "from": "system", "value": "Set port to environment variable.\n" }, { "from": "human", "value": "/**\n * Production environment settings\n *\n * This file can include shared settings for a production environment,\n * such as API keys or remote database passwords. If you're using\n * a version...
javascript
chosen
[ { "from": "system", "value": "Update tests to cover most common cases\n\nThey don't work, of course, because (I think) some mix of React, jsdom, and\niframes don't work correctly together.\n" }, { "from": "human", "value": "import React from 'react';\nimport { expect } from 'chai';\nimport { mou...
javascript
chosen
[ { "from": "system", "value": "Make WS connection in index page for testing purposes.\n" }, { "from": "human", "value": "console.log('Tokimeki Memorial');" }, { "from": "gpt", "value": "console.log('Tokimeki Memorial');\n\nvar host = window.document.location.host.replace(/:.*/, '');\n...
javascript
chosen
[ { "from": "system", "value": "Fix case of promise polyfill\n" }, { "from": "human", "value": "import \"mojave/polyfill/Promise\";\nimport \"unfetch/polyfill\";\n\nexport default window.fetch;\n" }, { "from": "gpt", "value": "import \"mojave/polyfill/promise\";\nimport \"unfetch/polyf...
javascript
chosen
[ { "from": "system", "value": "Add image and proptypes for member detail page\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\n\nclass MembersDetail extends Component {\n\n render() {\n const {displayName} = this.props;\n return (\n <div>\n ...
javascript
chosen
[ { "from": "system", "value": "Add comment about autodismiss options\n" }, { "from": "human", "value": "export default {\n state: {\n isVisible: false,\n options: {\n text: '',\n autoDismiss: true,\n },\n },\n getters: {\n snackbarIsVisible(state) {\n return state.is...
javascript
chosen
[ { "from": "system", "value": "Add placeholder for loading collection names\n" }, { "from": "human", "value": "import React from 'react';\nimport { connect } from 'react-redux';\n\nconst DocumentListItem = ({ title, collection, schema }) => (\n <tr className={`result result--${schema}`}>\n <t...
javascript
chosen
[ { "from": "system", "value": "Hide all tooltips when showing a modal window" }, { "from": "human", "value": "$(document).ready(function() {\n $('#global-modal-container').on('show.bs.modal', function (event) {\n sourceUrl = $(event.relatedTarget).attr('href');\n getGlobalModalHt...
javascript
chosen
[ { "from": "system", "value": "Use require.resolve to locate main.scss\n" }, { "from": "human", "value": "const sass = require('node-sass');\nconst path = require('path');\nconst config = require('../config');\nconst fs = require('fs');\nconst imdino = require('imdi-no');\n\nconst development = c...
javascript
chosen
[ { "from": "system", "value": "Add scope to token xyz.\n" }, { "from": "human", "value": "module.exports = [\n {\n \"_key\": \"default:token-123\",\n \"token\": \"xyz\",\n \"scope\": [\"oada-rocks:all\"],\n \"createTime\": 1413831649937,\n \"expiresIn\": 60,\n \"user\": { \"_id...
javascript
chosen
[ { "from": "system", "value": "Add missing semicolon to avoid warnings" }, { "from": "human", "value": "'use strict';\n\nvar <%= classedName %> = {\n\n}\n\n<% if (es6) { %> export default <%= classedName %>; <% }\nelse { %>module.exports = <%= classedName %>; <% } %>\n" }, { "from": "gpt"...
javascript
chosen