conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Change example method to properly reflect action taken\n" }, { "from": "human", "value": "Meteor.startup(function () {\n\n console.log('Running server startup code...');\n\n Accounts.onCreateUser(function (options, user) {\n Roles.addRolesToUserObj(user, ['admi...
javascript
chosen
[ { "from": "system", "value": "Replace toLocaleString usage with months array\n\nNot supported in node 0.10\n" }, { "from": "human", "value": "// Simple, slimline template based on https://github.com/rackt/react-router/blob/master/CHANGES.md\n\nimport Default from './Default'\n\nexport default cl...
javascript
chosen
[ { "from": "system", "value": "Change event propagation in socket.io\n" }, { "from": "human", "value": "// Requires\nvar wireFriendly = require('../utils').wireFriendly;\n\n\nfunction setup(options, imports, register) {\n // Import\n var events = imports.events;\n var io = imports.socket...
javascript
chosen
[ { "from": "system", "value": "[fix] Add support for submitbutton on listing page\n\nFixes: https://qubeshub.org/support/ticket/1409\n" }, { "from": "human", "value": "\nHubzero.submitbutton = function(task) {\n\t$(document).trigger('editorSave');\n\n\tvar frm = document.getElementById('item-form...
javascript
chosen
[ { "from": "system", "value": "Fix profile settings page props type checking\n" }, { "from": "human", "value": "// @flow\nimport React, { Component, PropTypes } from 'react';\nimport { observer, PropTypes as MobxPropTypes } from 'mobx-react';\nimport Settings from '../../components/settings/Setti...
javascript
chosen
[ { "from": "system", "value": "Add a URL to the whitelist\n" }, { "from": "human", "value": "IRG.constants = (function(){\n \n var approvedDomains = function(){\n return [\"imgur.com\", \"flickr.com\", \"cdn.diycozyhome.com\", \"pbs.twimg.com\", \"msnbc.com\",\n \"fbcdn-sp...
javascript
chosen
[ { "from": "system", "value": "Add a new domain to the whitelist\n" }, { "from": "human", "value": "IRG.constants = (function(){\n \n var approvedDomains = function(){\n return [\"imgur.com\", \"flickr.com\", \"cdn.diycozyhome.com\", \"pbs.twimg.com\", \"msnbc.com\",\n \"f...
javascript
chosen
[ { "from": "system", "value": "Update Option Parsing for Mockingjays\n" }, { "from": "human", "value": "Server = require('./src/server');\nMockingjay = require('./src/mockingjay');\nDefaultOptions = require('./src/default_options');\n\nvar Mockingjays = function() {}\n\n/**\n * Start creates a Mo...
javascript
chosen
[ { "from": "system", "value": "Make point parsing and rendering less crappy\n" }, { "from": "human", "value": "\nvar pointTable = {};\n\nmodule.exports = function(match, response) {\n var points = Number(match[1]),\n multiplier = ('to' === match[2]) - ('from' === match[2]),\n target = matc...
javascript
chosen
[ { "from": "system", "value": "Enable passing in handler_url via capture url querystring variable\n\nAllows use with providers that require you pass in notify url with each request\n" }, { "from": "human", "value": "var follow = require('follow');\nvar request = require('request');\n\n\nmodule.ex...
javascript
chosen
[ { "from": "system", "value": "Add draft for core structure.\n" }, { "from": "human", "value": "'use strict';\n// TODO: use traditional way or ?\nlet Framework = {\n inject: function (coreName) {\n console.log(`framework inject ${coreName}`);\n // checkCore();\n this.coreN...
javascript
chosen
[ { "from": "system", "value": "Fix events on Client objects\n" }, { "from": "human", "value": "'use strict';\n\n/* lib/client.js\n * The Client object.\n * * */\n\nmodule.exports = Client;\n\nfunction Client(socket){\n if (typeof socket !== 'object')\n throw new Error('Clients can only bind t...
javascript
chosen
[ { "from": "system", "value": "Read WS_URL from environment variables\n" }, { "from": "human", "value": "module.exports = {\n WS_URL : 'http://www.workshape.io/'\n};" }, { "from": "gpt", "value": "module.exports = {\n WS_URL : process.env.WS_URL || 'http://www.workshape.io/'\n};...
javascript
chosen
[ { "from": "system", "value": "Update the feature model with master_state and dynamic_state props\n" }, { "from": "human", "value": "var FeatureModel = function(attrs){\n this.id = (attrs && attrs.id) || null;\n this.title = (attrs && attrs.title) || null;\n this...
javascript
chosen
[ { "from": "system", "value": "Remove name unique constraint, move to email\n" }, { "from": "human", "value": "const bcrypt = require('bcrypt')\n\nmodule.exports = function (sequelize, DataTypes) {\n const User = sequelize.define('User', {\n id: {\n primaryKey: true,\n type: DataTyp...
javascript
chosen
[ { "from": "system", "value": "xkcd: Change name of the template.\n" }, { "from": "human", "value": "function ddg_spice_xkcd_display(api_result) {\n if (!api_result.img || !api_result.alt) return;\n\n //calls our endpoint to get the number of the latest comic\n $.getJSON('/js/spice/xkcd/latest...
javascript
chosen
[ { "from": "system", "value": "Fix the params object in the find\n" }, { "from": "human", "value": "// Use this hook to manipulate incoming or outgoing data.\n// For more information on hooks see: http://docs.feathersjs.com/api/hooks.html\n\nmodule.exports = function (options = {}) {\n // eslint...
javascript
chosen
[ { "from": "system", "value": "Fix issues with resolving server relative URLs when bundling with JSPM\n" }, { "from": "human", "value": "/*global System:false, exports:false */\n\nvar serverRelativeRegexp = /^\\w+:\\/\\/[^\\/]*/;\n\nfunction santiseSource( source ) {\n return source.replace( /([...
javascript
chosen
[ { "from": "system", "value": "Fix coursesnew with no avatar\n" }, { "from": "human", "value": "console.log(\"Courses+ background page!\");\ncpal.request.addBeforeSendHeaders([\"*://courses2015.dalton.org/*\"], function(details) {\n\tif (details.url.indexOf(\"user/icon/dalton/\") > -1) {\n\t\tdet...
javascript
chosen
[ { "from": "system", "value": "Change abao test to use the local installation instead of the global.\n" }, { "from": "human", "value": "var assert = require('assert');\nvar request = require('supertest');\nvar exec = require('child_process').exec;\n\nvar application = require(__dirname + '/server...
javascript
chosen
[ { "from": "system", "value": "Add initial available pubs load function if the route is accessed without transition\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport * as pubsActions from 'redux/modules/pubs';\n...
javascript
chosen
[ { "from": "system", "value": "Mark this test as todo\n" }, { "from": "human", "value": "var tap = require(\"../\")\n\ntap.test(\"trap result\", function (t0) {\n t0.plan(3)\n \n var t1 = new(tap.Harness)(tap.Test).test()\n \nconsole.log('here')\n t1.plan(1)\n \n t1.on(\"result\", function...
javascript
chosen
[ { "from": "system", "value": "Add progressive image loading example\n" }, { "from": "human", "value": "import React from 'react'\nimport { rhythm } from 'utils/typography'\n\nconst ImagePage = (props) => {\n console.log(props)\n const {regular, retina} = props.data.image\n return (\n <div>...
javascript
chosen
[ { "from": "system", "value": "Fix bug about index 6\n" }, { "from": "human", "value": "/**\n * Created by Wayne on 16/2/22.\n */\n\nvar config = require('./config/config');\nvar setup = require('./config/setup')();\nvar express = require('./config/express');\n\n\nnew express().listen(config.port...
javascript
chosen
[ { "from": "system", "value": "Disable non-functional create service button\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport {observer} from 'mobx-react';\nimport Services from '../components/Services';\nimport Tasks from '../components/Tasks';\nimport FlatButt...
javascript
chosen
[ { "from": "system", "value": "Use port 8080 for testing\n" }, { "from": "human", "value": "import request from 'request';\n\nfunction call(endpoint, method, qs, json) {\n let options = {\n uri: `http://localhost/api/${endpoint}`,\n method\n };\n if (typeof qs !== 'undefine...
javascript
chosen
[ { "from": "system", "value": "Set default currency to USD if none\n" }, { "from": "human", "value": "import { fromJS } from 'immutable';\nimport {\n SERVER_DATA_AUTHORIZE,\n SERVER_DATA_BALANCE,\n SERVER_DATA_PAYOUT_CURRENCIES,\n SERVER_DATA_BUY,\n UPDATE_TOKEN,\n} from '../_const...
javascript
chosen
[ { "from": "system", "value": "Add fastRender for the home\n" }, { "from": "human", "value": "var subscriptions = new SubsManager();\n\nRouter.configure({\n layoutTemplate: 'layout',\n loadingTemplate: 'loading',\n notFoundTemplate: 'notFound'\n});\n\nRouter.route('/', {\n name: 'home...
javascript
chosen
[ { "from": "system", "value": "Switch from watch to watchCollection for bodyclass directive\n" }, { "from": "human", "value": "define([\n 'angular',\n 'app',\n 'lodash'\n],\nfunction (angular, app, _) {\n 'use strict';\n\n angular\n .module('grafana.directives')\n .directive('bodyClass...
javascript
chosen
[ { "from": "system", "value": "Simplify default World constructor callback\n" }, { "from": "human", "value": "var WorldConstructor = function() {\n return function(callback) { callback(this) };\n};\nmodule.exports = WorldConstructor;\n" }, { "from": "gpt", "value": "var WorldConstruc...
javascript
chosen
[ { "from": "system", "value": "Configure jshint, simplify javascript structure\n" }, { "from": "human", "value": "function RecaptchaV3() {\n $(\".recaptcha-v3\").each(function () {\n var el = $(this);\n var clientId = grecaptcha.render($(el).attr(\"id\"), {\n 'sitekey'...
javascript
chosen
[ { "from": "system", "value": "Sort by name if location not available\n" }, { "from": "human", "value": "$(function () {\n var locationList = $(\"#location-list\");\n function populateLocations(features) {\n locationList.empty();\n $.each(features, function(i, v) {\n $(\"<li/>\").app...
javascript
chosen
[ { "from": "system", "value": "Add openBasicModal reducer method to customer invoice\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\n/**\n * Method using a factory pattern variant to get a reducer\n * for a particular page or page style.\...
javascript
chosen
[ { "from": "system", "value": "Fix update behavior removing shouldComponentUpdate\n\nThe should component update was not such a good idea as the component did not update when props of other components changed" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport Polyg...
javascript
chosen
[ { "from": "system", "value": "Test mid-day to avoid DST issues\n" }, { "from": "human", "value": "// These tests are for locale independent features\n// locale dependent tests would be in locale test folder\nimport { module, test } from '../qunit';\nimport moment from '../../moment';\n\nmodule('...
javascript
chosen
[ { "from": "system", "value": "Allow disabling logging when Winston is not being used\n" }, { "from": "human", "value": "var util = require('util');\n\nvar levels = [\n 'silly',\n 'input',\n 'verbose',\n 'prompt',\n 'debug',\n 'http',\n 'info',\n 'data',\n 'help',\n ...
javascript
chosen
[ { "from": "system", "value": "Create prototype to flatten board\n" }, { "from": "human", "value": "// Game Controller\n// A checkers board has 64 squares like a chess board but it only uses 32 squares all the same color\n// Each player has 12 pieces and pieces that make until the last squares on...
javascript
chosen
[ { "from": "system", "value": "Fix max width of overflowing specimens on Firefox\n" }, { "from": "human", "value": "import React, {Component, PropTypes} from 'react';\n\nexport default class Span extends Component {\n render() {\n const {children, span} = this.props;\n\n const style = {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix URL in login tracking\n" }, { "from": "human", "value": "import { getCurrentTitle, getCurrentURL } from \"./page.js\";\n\nlet __sharedTracker = null;\n\nexport default class LoginTracker {\n username = \"\";\n password = \"\";\n _url = getCurrentTitle()...
javascript
chosen
[ { "from": "system", "value": "Use nonsense board name, no localStorage\n" }, { "from": "human", "value": "import Firebase from 'firebase'\nimport Vue from 'vue'\nimport VueRouter from 'vue-router'\n\nimport App from './App.vue'\n\nVue.use(VueRouter)\n\nlet router = new VueRouter({\n hashboang: ...
javascript
chosen
[ { "from": "system", "value": "Add in support for passing through the html param" }, { "from": "human", "value": "'use strict';\n\nvar Mailgun = require('mailgun-js');\nvar packageData = require('../package.json');\n\nmodule.exports = function(options) {\n return new MailgunTransport(options);\n...
javascript
chosen
[ { "from": "system", "value": "Add _send function for hacky-ness\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n // This is my local Docker IRC server\n var defaultHost = '192.168.99.100:6667';\n\n angular.module('app.factories.chat', []).\n factory('chat',...
javascript
chosen
[ { "from": "system", "value": "Allow strings to pass through the stream\n" }, { "from": "human", "value": "'use strict';\n/*eslint no-underscore-dangle: 0*/\nvar ElementFactory = require('./ElementFactory.js');\nvar elem = new ElementFactory({});\nvar stream = require('stream');\n\nvar ToHTML = f...
javascript
chosen
[ { "from": "system", "value": "Update barcode scanner example to reference plugin \"phonegap-plugin-barcodescanner\"\n\nPreviously the incorrect plugin \"cordova-plugin-barcodescanner\" has been referenced\n\nChange-Id: I2e318fdf66ba8186a135a28d8ddc92a94ee63ea4\n" }, { "from": "human", "value": "...
javascript
chosen
[ { "from": "system", "value": "Fix bug when no urls have been set up yet\n" }, { "from": "human", "value": "var Settings = {\n setUrls: function(urls) {\n localStorage.setItem('urls', JSON.stringify(urls));\n },\n getUrls: function() {\n var urls = localStorage.getItem('urls') || '';\n ...
javascript
chosen
[ { "from": "system", "value": "Add coordinateFormat function to controlOptions if present\n" }, { "from": "human", "value": "angular.module('anol.mouseposition', [])\n\n.directive('anolMousePosition', ['MapService', function(MapService) {\n return {\n restrict: 'A',\n require: '?...
javascript
chosen
[ { "from": "system", "value": "Add source-map-support only for node env\n" }, { "from": "human", "value": "const path = require(\"path\");\nconst ROOT = require(\"./config/path-helper\").ROOT;\nconst WebpackIsomorphicTools = require(\"webpack-isomorphic-tools\");\n\nfunction hotReloadTemplate(tem...
javascript
chosen
[ { "from": "system", "value": "Update work around for disabling store caching\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from './template';\n\n\nexport default Ember.Component.extend({\n layout,\n\n store: Ember.inject.service(),\n internalState: Ember.i...
javascript
chosen
[ { "from": "system", "value": "Add backwards compatibility for Node 0.x series\n" }, { "from": "human", "value": "/**\n * Terminal client for the Ma3Route REST API\n */\n\n\n\"use strict\";\n\n\n// npm-installed modules\nvar decamelize = require(\"decamelize\");\nvar parser = require(\"simple-arg...
javascript
chosen
[ { "from": "system", "value": "Call descriptor when a child is added\n" }, { "from": "human", "value": "udefine(function() {\n return function(Factory, groupInstance) {\n\n return function() {\n var child = arguments[0];\n var args = 2 <= arguments.length ? [].slice.call(arguments, ...
javascript
chosen
[ { "from": "system", "value": "Clean up, and use electron functions to open urls\n" }, { "from": "human", "value": "/* global angular */\n\nangular.module('app')\n.directive('extHref', function (platformInfo) {\n\t'use strict';\n\n\treturn {\n\t\trestrict: 'A',\n\t\tlink: link\n\t};\n\n\tfunction...
javascript
chosen
[ { "from": "system", "value": "Add school age group template helper.\n" }, { "from": "human", "value": "Template.registrantDetails.helpers({\n 'registrationTypeOptions': function () {\n // registration types used on the registration form\n return [\n {label: \"Commuter...
javascript
chosen
[ { "from": "system", "value": "Set test regex to select only *.test.js/jsx files in the test directory.\n\nAnd add the root directory as a module directory so that file imports\nwill be absolute.\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rig...
javascript
chosen
[ { "from": "system", "value": "Fixed: Test failure on iOS13 when adding contacts with null property fields.\n" }, { "from": "human", "value": "forge['contact'] = {\n\t'select': function (success, error) {\n\t\tforge.internal.call(\"contact.select\", {}, success, error);\n\t},\n\t'selectById': fun...
javascript
chosen
[ { "from": "system", "value": "Add new components to top of sidebar\n" }, { "from": "human", "value": "import Service from '@ember/service';\nimport Evented from '@ember/object/evented';\n\nexport default Service.extend(Evented, {\n\n showWindow: false,\n shownComponents: null,\n popupContent:...
javascript
chosen
[ { "from": "system", "value": "Allow capture of relative URLs by making regex host segment optional\n" }, { "from": "human", "value": "\"use strict\";\n\n// considered using the node url library, but couldn't resolve dependencies\n// without serious modifications, leading to maintenance nightmare...
javascript
chosen
[ { "from": "system", "value": "Switch to use real APIs on SensorWeb platform\n" }, { "from": "human", "value": "'use strict';\n\n(function(exports) {\n exports.API_URL = '/';\n}(window));\n" }, { "from": "gpt", "value": "'use strict';\n\n(function(exports) {\n exports.API_URL = 'htt...
javascript
chosen
[ { "from": "system", "value": "Remove log message on bulk delete\n" }, { "from": "human", "value": "\"use strict\";\n\nconst Constants = require(\"../../../Constants\");\nconst Events = Constants.Events;\nconst Endpoints = Constants.Endpoints;\nconst apiRequest = require(\"../../../core/ApiReques...
javascript
chosen
[ { "from": "human", "value": "Write CRD todo module for angular.\n" }, { "from": "gpt", "value": "var muchTodo = angular.module('muchTodo', []);\n\nfunction mainController($scope, $http) {\n $scope.formData = {};\n\n $http.get('/api/todos')\n .success(function(data) {\n $scope.todos = d...
javascript
chosen
[ { "from": "system", "value": "Fix test error (still failing)\n" }, { "from": "human", "value": "var chai = require('chai');\nvar expect = chai.expect;\n\n/* fake api server */\nvar server = require('./server');\n\nvar api = server.createServer();\n\nvar clubs = [\n {\n id: '205',\n name: ...
javascript
chosen
[ { "from": "system", "value": "Add excerpt to the story factor & add category factory\n" }, { "from": "human", "value": "import 'babel-polyfill';\n\nimport sinon from 'sinon';\nimport chai from 'chai';\nimport chaiEnzyme from 'chai-enzyme';\nimport factory from 'fixture-factory';\n\nchai.use(chai...
javascript
chosen
[ { "from": "system", "value": "Improve detectQuoteStyle (needed when adding imports and requires)\n" }, { "from": "human", "value": "/**\n * As Recast is not preserving original quoting, we try to detect it.\n * See https://github.com/benjamn/recast/issues/171\n * and https://github.com/facebook/...
javascript
chosen
[ { "from": "system", "value": "Fix style for compatibility with eslint rule changes\n" }, { "from": "human", "value": "import router from 'girder/router';\nimport events from 'girder/events';\nimport { exposePluginConfig } from 'girder/utilities/PluginUtils';\n\nexposePluginConfig('treeview', 'pl...
javascript
chosen
[ { "from": "system", "value": "Remove gutter to match the output\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react'\nimport styled from 'styled-components'\nimport AceEditor from 'react-ace'\n\nconst PreviewContainer = styled.div`\n align-self: center;\n padding: 28px;\...
javascript
chosen
[ { "from": "system", "value": "Return value for client.stream.* calls\n\nThese endpoints didn’t return anything, making them unusable with the\npromises version of the API.\n" }, { "from": "human", "value": "/**\n * Created by austin on 9/24/14.\n */\n\nvar streams = function (client) {\n this.c...
javascript
chosen
[ { "from": "system", "value": "Update minimun zoom to 24 hours\n" }, { "from": "human", "value": "/* global console, Calendar, vis */\n\n(function() {\n \"use strict\";\n\n var calendar = new Calendar();\n calendar.init(document.getElementById('visualization'),\n {\n height: \"10...
javascript
chosen
[ { "from": "system", "value": "Return Loading from Loading methods.\n" }, { "from": "human", "value": "\n'use strict';\n\nvar EventEmitter = require('events'),\n util = require('util');\n\n/**\n * The emitter returned by methods that load data from an external source.\n * @constructor\n * @fir...
javascript
chosen
[ { "from": "system", "value": "Remove HawtioNav* mocks (no longer used)\n\nWe're using Patternfly nav now.\n" }, { "from": "human", "value": "\"use strict\";\n// Angular is refusing to recognize the HawtioNav stuff\n// when testing even though its being loaded\n beforeEach(module(function ($provi...
javascript
chosen
[ { "from": "system", "value": "Add sort by \"taken\" date to avatar query, so the most recent\nimage is returned for the person.\n" }, { "from": "human", "value": "import connection from '../../config/database';\n\nmodule.exports.register = (server, options, next) => {\n async function getAvatar...
javascript
chosen
[ { "from": "system", "value": "Remove extra createBuildOptions for now\n" }, { "from": "human", "value": "var join = require(\"path\").join;\nvar console = require(\"./utils\").console;\nvar fs = require(\"fs-promise\");\nvar zip = require(\"./zip\");\nvar all = require(\"when\").all;\nvar tmp = ...
javascript
chosen
[ { "from": "system", "value": "Add a shortcut method on node to add to frame\n" }, { "from": "human", "value": "(function () {\n \"use strict\";\n\n var Frame = function (elem) {\n if (typeof elem === 'string') {\n elem = document.getElementById(elem);\n }\n\n ...
javascript
chosen
[ { "from": "system", "value": "Print results when using the CLI. Can be turned off with `-q` or `--quiet`.\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\nvar program = require('commander'),\n fs = require('fs'),\n path = require('path'),\n polish = require('./polish'...
javascript
chosen
[ { "from": "system", "value": "Load private key from env if possible\n" }, { "from": "human", "value": "const fs = require('fs');\nconst process = require('process');\nconst jwt = require('jsonwebtoken');\n\n// sign with RSA SHA256\n// FIXME: move to env var\nconst cert = fs.readFileSync('private...
javascript
chosen
[ { "from": "system", "value": "Switch to hash-based history, fix redirect to /build on boot\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { Router, Route, Redirect } from 'react-router';\nimport { ...
javascript
chosen
[ { "from": "system", "value": "Update exports to match bootstrap naming convention\n" }, { "from": "human", "value": "exports.initialize = require('./Bootstrapper')\nexports.dep = require('./DependencySpec')\nexports.events = require('../sdk/Events')\nexports.iterable = require('../s...
javascript
chosen
[ { "from": "system", "value": "Replace usage of deprecated model.attributes" }, { "from": "human", "value": "var Sequelize = require('sequelize'),\n _ = require('lodash');\n\nmodule.exports = function(target) {\n if (target instanceof Sequelize.Model) {\n // Model\n createHook(target);\...
javascript
chosen
[ { "from": "system", "value": "Fix XSS issue in demo\n" }, { "from": "human", "value": "$(function() {\n // When we're using HTTPS, use WSS too.\n var ws_scheme = window.location.protocol == \"https:\" ? \"wss\" : \"ws\";\n var chatsock = new ReconnectingWebSocket(ws_scheme + '://' + win...
javascript
chosen
[ { "from": "system", "value": "Handle room users case when not in room\n" }, { "from": "human", "value": "Template.roomView.helpers({\n room: function () {\n return Rooms.findOne({_id: Session.get('currentRoom')});\n },\n roomUsers: function () {\n var room = Rooms.findOne(...
javascript
chosen
[ { "from": "system", "value": "Handle incoming card click event with simple logger\n" }, { "from": "human", "value": "var express = require('express');\nvar http = require('http');\nvar socketIO = require('socket.io');\nvar path = require('path');\nvar game = require('./game.js');\n\nvar app = ex...
javascript
chosen
[ { "from": "system", "value": "Make lerret -V return the actual version number.\n" }, { "from": "human", "value": "\"use strict\";\n\nconst generate = require(\"./generate\");\nconst log = require(\"./log\");\nconst init = require(\"./init\");\nconst program = require(\"commander\");\n\nmodule.ex...
javascript
chosen
[ { "from": "system", "value": "Remove dev logging, don't need it. Console.log like in the old days!\n" }, { "from": "human", "value": "var express = require('express');\nvar http = require('http');\nvar path = require('path');\nvar app = e...
javascript
chosen
[ { "from": "system", "value": "Use const and string template\n" }, { "from": "human", "value": "var http = require('http');\n\nhttp.createServer(function (req, res) {\n res.writeHead(200, {'Content-Type': 'text/plain'});\n res.end('Hello World from iojs ' + process.version + '!\\n');\n}).listen...
javascript
chosen
[ { "from": "system", "value": "Update logic to fixed test\n" }, { "from": "human", "value": "const ifElse = require('1-liners/ifElse');\nconst isFunction = require('1-liners/isFunction');\nconst filter = require('1-liners/filter');\nconst compose = require('1-liners/compose');\n\nconst castBool =...
javascript
chosen
[ { "from": "system", "value": "Exclude `simpleWorker` from `editorSimpleWorker` in bundling\n" }, { "from": "human", "value": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licens...
javascript
chosen
[ { "from": "system", "value": "Add isLoggedIn knob to story for pollButtons\n" }, { "from": "human", "value": "import React from 'react';\nimport { storiesOf, action } from '@kadira/storybook';\nimport { withKnobs, text, boolean, number, object } from '@kadira/storybook-addon-knobs';\nimport { se...
javascript
chosen
[ { "from": "system", "value": "Change another options log from info to debug" }, { "from": "human", "value": "/**\n * Copyright 2013-2020 the original author or authors from the JHipster project.\n *\n * This file is part of the JHipster project, see https://www.jhipster.tech/\n * for more inform...
javascript
chosen
[ { "from": "system", "value": "Add crypto to storybook fallbacks\n" }, { "from": "human", "value": "module.exports = {\n \"stories\": [\n \"../src/**/*.stories.@(js|jsx|ts|tsx)\"\n ],\n \"addons\": [\n \"@storybook/addon-links\",\n \"@storybook/addon-essentials\"\n ],\n \"core\": {\...
javascript
chosen
[ { "from": "system", "value": "Update API endpoint for websockets\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('app').service('stdout', ['$window', function($window) {\n\tvar callback = undefined;\n\tvar websocket = undefined;\n\n\tthis.subscribe = function(path, _callback) ...
javascript
chosen
[ { "from": "system", "value": "Add params to instantiate aggregation\n" }, { "from": "human", "value": "const RasterAggregation = require('./raster-aggregation');\nconst VectorAggregation = require('./vector-aggregation');\nconst RASTER_AGGREGATION = 'RasterAggregation';\nconst VECTOR_AGGREGATION...
javascript
chosen
[ { "from": "system", "value": "Change mention of client to browser to match src structure\n" }, { "from": "human", "value": "import Buttons from './Buttons.react';\nimport Component from 'react-pure-render/component';\nimport DocumentTitle from 'react-document-title';\nimport List from './List.re...
javascript
chosen
[ { "from": "system", "value": "Fix integration test based on updates to tokenizer\n" }, { "from": "human", "value": "var test = require('tap').test;\nvar corpus = require('../fixtures/corpus');\nvar Sentiment = require('../../lib/index');\nvar sentiment = new Sentiment();\n\nvar dataset = corpus;...
javascript
chosen
[ { "from": "system", "value": "Set the Jest timeout to one minute\n" }, { "from": "human", "value": "/*global unexpected:true, expect:true, expectWithUnexpectedMagicPen:true, setImmediate:true, weknowhow*/\n/* eslint no-unused-vars: \"off\" */\nunexpected = typeof weknowhow === 'undefined' ?\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unused restore() test util\n" }, { "from": "human", "value": "const each = require('lodash/each');\n\n\nfunction captureError(fn) {\n try {\n fn();\n }\n catch (e) {\n return e;\n }\n\n return null;\n}\n\n\nfunction restore(obj) {\n each(obj, v =>...
javascript
chosen
[ { "from": "system", "value": "Add processData and contentType properties to ajax call\n" }, { "from": "human", "value": "// For testing \nif (typeof module !== 'undefined') {\n $ = require('jquery'); \n gebo = require('../config').gebo;\n FormData = require('./__mocks__/...
javascript
chosen
[ { "from": "system", "value": "Make sure modal dialog appears over topbar header\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\nimport ModalDialog from 'react/components/UI/ModalDialog';...
javascript
chosen
[ { "from": "system", "value": "Fix unsupported syntax in node 4\n" }, { "from": "human", "value": "const {readdirSync} = require('fs');\n\nfunction listDir(dir) {\n\treaddirSync(dir)\n\t\t.filter(f => f.endsWith('.cc'))\n\t\t.forEach(f => console.log(dir + '/' + f));\n}\n\nlistDir('src');\nlistDi...
javascript
chosen
[ { "from": "system", "value": "Fix wrong model for replaceChapterCache\n" }, { "from": "human", "value": "import { ReadingRecord, ChapterCache } from 'actions/ConfigActions';\n\nexport const markNotificationSent = async ({comicID, chapterID}) => {\n\ttry {\n\t\tconst readingRecord = await Reading...
javascript
chosen
[ { "from": "system", "value": "Add user profiles and metaverse\n" }, { "from": "human", "value": "import { combineReducers } from 'redux';\n\n// import constellations from './constellations/reducers';\nimport core from './core/reducers';\n// import galaxies from './galaxies/reducers';\n// import ...
javascript
chosen
[ { "from": "system", "value": "Update meteor version to 1.4.1, bump version to 0.3.2\n" }, { "from": "human", "value": "Package.describe({\n name: 'metemq:metemq',\n version: '0.3.1',\n // Brief, one-line summary of the package.\n summary: 'MeteMQ',\n // URL to the Git repository containing ...
javascript
chosen
[ { "from": "system", "value": "Add missing require in client plugin\n" }, { "from": "human", "value": "const JSONRPC = {};\r\nJSONRPC.ClientPluginBase = require(\"../../ClientPluginBase\");\r\n\r\n/**\r\n * PrettyBrowserConsoleErrors plugin.\r\n * @class\r\n * @extends JSONRPC.ClientPluginBase\r\...
javascript
chosen