conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make it possible to set session secret using environment variables\n" }, { "from": "human", "value": "const express = require('express');\nconst session = require('express-session');\nconst SequelizeStore = require('connect-session-sequelize')(session.Store);\nconst...
javascript
chosen
[ { "from": "system", "value": "Correct signature for updateConversationLoader params\n" }, { "from": "human", "value": "import { GraphQLString, GraphQLNonNull } from \"graphql\"\nimport { mutationWithClientMutationId } from \"graphql-relay\"\nimport Conversation from \"schema/me/conversation\"\n\...
javascript
chosen
[ { "from": "system", "value": "Fix break caused by Cadence changes.\n" }, { "from": "human", "value": "var cadence = require('cadence')\nvar logger = require('prolific.logger').createLogger('mingle.srv')\nvar sprintf = require('sprintf-js').sprintf\n\nmodule.exports = cadence(function (async, dns...
javascript
chosen
[ { "from": "system", "value": "Change geometry name in the basic example" }, { "from": "human", "value": "const createContext = require('pex-context')\n//const createRenderer = require('pex-renderer')\nconst createRenderer = require('../..')\nconst createSphere = require('primitive-sphere')\n\nco...
javascript
chosen
[ { "from": "system", "value": "Hide start button when game ended\n" }, { "from": "human", "value": "const h = require('virtual-dom/h');\n\nmodule.exports = function (data) {\n const {gameID, game} = data;\n return h('div', {className: 'room'}, [\n game.playing ? null : h('a', {href: '/new-pl...
javascript
chosen
[ { "from": "system", "value": "Add a function to draw the line bar at nav with the scroll\n" }, { "from": "human", "value": "/* SMOOTH SCROLL */\n$('a[href^=\"#\"]').on('click', function(event) {\n\tvar target = $(this.getAttribute('href'));\n\tif (target.length) {\n\t\tevent.preventDefault();\n\...
javascript
chosen
[ { "from": "system", "value": "Add full path for public directory\n" }, { "from": "human", "value": "var express = require('express'),\n app = express(),\n bodyParser = require('body-parser'),\n serveStatic = require('serve-static'),\n radiodan = require('radiodan...
javascript
chosen
[ { "from": "system", "value": "Remove \"Event\" on event grid\n" }, { "from": "human", "value": "var $ = require(\"jquery\");\nvar _ = require(\"underscore\");\nvar Backbone = require(\"backbone\");\nBackbone.$ = $;\n\nvar cardView = require(\"./cardView.js\");\n\nvar allView = Backbone.View.exte...
javascript
chosen
[ { "from": "system", "value": "Exclude worker-slave/index from istanbul instrumenting\n" }, { "from": "human", "value": "var path = require(\"path\");\nvar Config = require(\"webpack-config\").Config;\n\nmodule.exports = new Config()\n .extend(\"./conf/webpack.test.config.js\")\n .merge({\n...
javascript
chosen
[ { "from": "system", "value": "Swap the palindome spec for subset sum\n" }, { "from": "human", "value": "\"use strict\";\n\nvar Sentient = require(\"../../lib/sentient\");\n\ndescribe(\"Exercise 4\", function () {\n var machineCode = Sentient.compile({\n instructions: [\n // Add your ins...
javascript
chosen
[ { "from": "system", "value": "Append .jpg to screenshot filename\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular.module('chaise.viewer')\n\n .controller('OSDController', ['image', '$window', function OSDController(image, $window) {\n var vm = this;\n ...
javascript
chosen
[ { "from": "system", "value": "Make some more changes to custom bpmnjs modeller\n" }, { "from": "human", "value": "'use strict';\n\n// inlined diagram; load it from somewhere else if you like\nvar pizzaDiagram = require('../resources/pizza-collaboration.bpmn');\n\n// custom elements JSON; load it...
javascript
chosen
[ { "from": "system", "value": "FIX -> ECMAScript 6 for in test\n" }, { "from": "human", "value": "/**\n * Created by rankun203 on 12/30/14.\n */\n\nvar arr = ['one', 'two', 'three'];\nArray.prototype._someLibraryAddedThis = {};\n\nfor (var i in arr) {\n console.log(arr[i]);\n}" }, { "f...
javascript
chosen
[ { "from": "system", "value": "Remove empty object-ids from table-wrap.\n" }, { "from": "human", "value": "import {\n extractCaptionTitle,\n wrapCaptionTitle,\n expandCaption,\n expandTitle,\n expandObjectId,\n removeChild,\n addLabel\n} from './r2tHelpers'\n\nexport default class ConvertE...
javascript
chosen
[ { "from": "system", "value": "Reposition the graph while printing\n\nRelated to\nhttps://github.com/gaearon/redux-devtools/issues/318#issuecomment-254039\n542\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport PrintIcon from 'react-icons/lib/md/print'...
javascript
chosen
[ { "from": "system", "value": "Improve checks for rewriting in middleware\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function () {\n\n return function(req, res, next) { // Gotta catch 'em all (and serve index.html)\n\n function acceptsHtml(accepts) {\n if(!accep...
javascript
chosen
[ { "from": "system", "value": "Reset Tooltip directive Init + Fixed Karma Test\n" }, { "from": "human", "value": "import $ from 'jquery';\n\nexport default {\n bind(el) {\n requestAnimationFrame(() => {\n $(el).tooltip({\n trigger: 'hover',\n });\n });\n },\n\n component...
javascript
chosen
[ { "from": "system", "value": "Update documentation link and text\n" }, { "from": "human", "value": "import React from 'react';\n\nimport AuthStore from '../stores/AuthStore';\nimport AlertPanel from './AlertPanel';\nimport Config from '../config/Config';\nimport MetadataStore from '../stores/Met...
javascript
chosen
[ { "from": "system", "value": "Update service worker to update cached files, get effect reset fix." }, { "from": "human", "value": "// Version 6\n\nself.addEventListener('install', function(e) {\n e.waitUntil(\n caches.open('playbulb-candle').then(function(cache) {\n return cache.addAll(...
javascript
chosen
[ { "from": "system", "value": "Use region for displaying search\n" }, { "from": "human", "value": "import _ from 'underscore'\nimport {Behavior} from 'backbone.marionette'\nimport SearchFormView from '../../modules/search/views/SearchForm'\n\nclass Search extends Behavior {\n onRender() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add location path to console\n" }, { "from": "human", "value": "myApp.controller('InventoryController', function($scope, $window, $location, $routeParams, inventoryService) {\n $scope.inventories = inventoryService.loadInventories();\n $scope.inventory = inven...
javascript
chosen
[ { "from": "system", "value": "Return Context object on extend/merge, improve merge performance\n" }, { "from": "human", "value": "var _ = require('underscore');\n\nfunction Context(fields) {\n this.fields = _.clone(fields);\n}\n\n/**\n * @param {Object} fields\n */\nContext.prototype.extend = f...
javascript
chosen
[ { "from": "system", "value": "Check that query params are actually strings\n\nPreviously `toLowerCase` could fail because it tried to perform the\noperation on something else than a string.\n" }, { "from": "human", "value": "var minimatch = require('minimatch');\nvar is = require('annois');\nvar...
javascript
chosen
[ { "from": "system", "value": "Update client ID for recent devconsole updates.\n" }, { "from": "human", "value": "zipextractor.config.DRIVE_API_CONFIG_DATA = {\r\n 'clientId': '824911851129-k13qd3ah93spnmrhcqj3pfkaeaua3g13.apps.googleusercontent.com',\r\n 'appId' :'824911851129', \r\n ...
javascript
chosen
[ { "from": "system", "value": "Implement guard for undefined children props\n\nJust leave children element as it is, go directly to else clause." }, { "from": "human", "value": "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = WordLimit;\n\n...
javascript
chosen
[ { "from": "system", "value": "Tidy up syntax and change spacing\n" }, { "from": "human", "value": "#!/usr/bin/env node\nconst moment = require(\"moment\");\nconst Sugar = require(\"sugar\");\nconst chalk = require(\"chalk\");\nconst exec = require(\"child_process\").exec;\n\n// Check for CLI arg...
javascript
chosen
[ { "from": "system", "value": "Use hostname to keep express from being whiny\n" }, { "from": "human", "value": "var express = require('express');\nvar format = require('util').format;\n\nvar app = express();\napp.get('/', function(req, res) {\n res.status(200).json({msg: format('Hello from %s!',...
javascript
chosen
[ { "from": "system", "value": "Allow for tab_width when using tabs.\n" }, { "from": "human", "value": "'use strict';\nvar Subscriber = require('emissary').Subscriber;\nvar editorconfig = require('editorconfig');\nvar plugin = module.exports;\n\nSubscriber.extend(plugin);\n\nfunction init(editor) ...
javascript
chosen
[ { "from": "system", "value": "Remove id,subscription key for LUIS" }, { "from": "human", "value": "var service=require('./services/service.js');\nvar Client = require('node-rest-client').Client;\n\nmodule.exports= {\n getResponse :function(message,callback){\n processMessage(message,fu...
javascript
chosen
[ { "from": "system", "value": "Use ES6 import for uuid/v4 rather than require\n" }, { "from": "human", "value": "var uuid4 = require('uuid/v4')\n\n/**\n * Generates RFC4122 version 4 guid ()\n */\n\nexport default function random() {\n return uuid4().replace(/-/g, '');\n}\n" }, { "from":...
javascript
chosen
[ { "from": "system", "value": "Remove checks for sliced arraybuffer since blob handles that now\n" }, { "from": "human", "value": "var WritableStream = require('stream').Writable;\nvar util = require('util');\nvar Blob = require('blob');\nvar URL = global.URL || global.webkitURL || global.mozURL;...
javascript
chosen
[ { "from": "system", "value": "Add support for multiline comments in PHP.\n" }, { "from": "human", "value": "module.exports = {\n name: 'PHP',\n nameMatchers: ['.php', '.php3', '.php4', '.php5', '.fbp'],\n singleLineComment: require('./common/c-style.js').singleLine()\n}\n" }, { "from"...
javascript
chosen
[ { "from": "system", "value": "Refactor method for finding RDs\n" }, { "from": "human", "value": "/**\n * Created by chengfulin on 2015/4/10.\n */\nvar walkes = require('walkes'),\n worklist = require('../analyses'),\n Set = require('../analyses').Set,\n DFA = require('./dfa');\n\nmodule...
javascript
chosen
[ { "from": "system", "value": "Use ... instead of Object.assign\n" }, { "from": "human", "value": "const fs = require(\"fs\");\n\nfunction readFile(file) {\n let parsed;\n try {\n parsed = JSON.parse(fs.readFileSync(file, \"utf8\"));\n } catch (err) {\n if (err.code === \"ENOENT\") {\n ...
javascript
chosen
[ { "from": "system", "value": "Format JavaScript files with Prettier: scripts/draft-js/__github__/scripts/jest\n\nReviewed By: kassens\n\nDifferential Revision: D33474087\n\nfbshipit-source-id: 5f9c2d0dcc36515758b26eebc59acefc662e9386\n" }, { "from": "human", "value": "/**\n * Copyright (c) Faceb...
javascript
chosen
[ { "from": "system", "value": "Fix not found page returning wrong status code\n" }, { "from": "human", "value": "import express from 'express';\nimport React from 'react';\nimport { renderToString } from 'react-dom/server'\nimport { RouterContext , match } from 'react-router';\nimport appRoutes f...
javascript
chosen
[ { "from": "system", "value": "Improve doc related to “isMultiTenantSupportInstalled”" }, { "from": "human", "value": "import knex from 'knex';\nimport PromiseAsyncCache from 'promise-async-cache';\nimport * as knexTenantSupport from './knex-tenant-support';\n\n\nconst debug = require('./debug')(...
javascript
chosen
[ { "from": "system", "value": "Add destroy the tree when done with it\n" }, { "from": "human", "value": "import View from 'girder/views/View';\n\nimport attach from '../attach';\n\nconst TreeView = View.extend({\n initialize(settings) {\n },\n\n render() {\n attach(this.el);\n ...
javascript
chosen
[ { "from": "system", "value": "Fix deprecation warning for the source-mongodb plugin.\n" }, { "from": "human", "value": "module.exports = {\n plugins: [\n /*\n * Gatsby's data processing layer begins with “source” plugins. Here we\n * setup the site to pull data from the \"documents\"...
javascript
chosen
[ { "from": "system", "value": "Set pageX/pageY according to quirksmode's rules.\n" }, { "from": "human", "value": "'use strict';\n'browser-only';\n\n/**\n * @license\n * (c) 2014 Cluster Labs, Inc. https://cluster.co/\n * License: MIT\n */\n\nvar ElementWrapper = skit.browser.ElementWrapper;\n\n\...
javascript
chosen
[ { "from": "system", "value": "Fix require destructor in configure-react that broke build-storybook\n" }, { "from": "human", "value": "/* global window */\n/* eslint-disable global-require, import/no-extraneous-dependencies, import/no-unresolved */\n\nfunction configureStorybook() {\n if (typeof...
javascript
chosen
[ { "from": "system", "value": "Put PPL records in localadmin\n" }, { "from": "human", "value": "var through2 = require('through2');\n\nfunction featureCodeToLayer(featureCode) {\n switch (featureCode) {\n case 'ADM1':\n return 'region';\n case 'ADM2':\n return 'county...
javascript
chosen
[ { "from": "system", "value": "Change entity create to call set event\n" }, { "from": "human", "value": "import * as ecsChanges from './changes';\n\nconst ECSController = {\n [ecsChanges.ENTITY_CREATE]: (change, store, notify) => {\n const { id, template } = change.data;\n // Manipulate ch...
javascript
chosen
[ { "from": "system", "value": "Rename function and update description\n" }, { "from": "human", "value": "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in complianc...
javascript
chosen
[ { "from": "system", "value": "Set collapsable element's initial state to collapse.\n" }, { "from": "human", "value": "angular.module('ui.bootstrapAddOns.collapse',['ui.bootstrap.transition'])\n\n.directive('collapsableelement', function() {\n return {\n restrict: 'E',\n replace: tru...
javascript
chosen
[ { "from": "system", "value": "Remove \"express.\" from errorHandler line\n" }, { "from": "human", "value": "// Module dependencies.\r\nvar express = require('express');\r\nvar ArticleProvider = require('./articleprovider-memory').ArticleProvider;\r\n\r\nvar app = express();\r\nvar bodyParser = r...
javascript
chosen
[ { "from": "system", "value": "Make core global (make debugging easier)\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nGLOBAL.BOTPLUGVERSION = '0.0.1';\n\nvar Core = require(\"./core/Core.js\");\n\ncore = new Core();\n\n" }, { "from": "gpt", "value": "#!/usr/bin/env node\n\...
javascript
chosen
[ { "from": "system", "value": "Order posts by submitted as we render them.\n\nWe still want them ordered by score when we publish (so we only see the highest scored). But we want to order them with a fixed order when we render so that when the score changes we can animate them around without DOM nodes being ...
javascript
chosen
[ { "from": "system", "value": "Fix copy & paste error" }, { "from": "human", "value": "'use strict';\n\n// FUNCTIONS //\n\nvar isPrimitive = require( './primitive.js' );\nvar isObject = require( './object.js' );\n\n\n// IS POSITIVE NUMBER //\n\n/**\n* Tests if a value is a nonnegative number.\n*\...
javascript
chosen
[ { "from": "system", "value": "Fix window position if taskbar on top\n" }, { "from": "human", "value": "const {Menu} = require('electron')\nconst menubar = require('menubar')\n\n// Toggle with cmd + alt + i\nrequire('electron-debug')({showDevTools: true})\n\nconst initialIcon = `${__dirname}/img/...
javascript
chosen
[ { "from": "system", "value": "Revert \"style for None option button on picklists\"\n\nThis reverts commit d46c7325118f53f24ef8e969a01b0673a384a758.\n" }, { "from": "human", "value": "/// <reference path=\"../../../../../argos-sdk/libraries/ext/ext-core-debug.js\"/>\n/// <reference path=\"../../....
javascript
chosen
[ { "from": "system", "value": "Enable CORS as this is publicly accessible content.\n" }, { "from": "human", "value": "// Bring in our dependencies\nconst app = require('express')();\nconst routes = require('./routes');\nYAML = require('yamljs');\nconst swaggerDoc = YAML.load('./openapi.yaml');\nc...
javascript
chosen
[ { "from": "system", "value": "Create a ByteSource for a dropped file" }, { "from": "human", "value": "\nrequire([], function() {\n \n 'use strict';\n \n function makeFileDrop(el, callback) {\n if (typeof el === 'string') {\n el = document.getElementById(el);\n if (!el) {\n ...
javascript
chosen
[ { "from": "system", "value": "Simplify watching handlebars files for assemble\n" }, { "from": "human", "value": "// Watch project files for and spawn associated tasks upon changes\nmodule.exports = function(grunt) {\n grunt.config('watch', {\n options: {\n spawn: false\n ...
javascript
chosen
[ { "from": "system", "value": "Add sourceMap option to react-tools transform\n\nAllow tools like grunt-react to include inline source maps in the\ngenerated JavaScript. Browserify can then combine these source maps when\nbundling everything together.\n\nUsage:\n\n```\nvar transform = require('react-tools').t...
javascript
chosen
[ { "from": "system", "value": "Add mainTitle.raw to default work search field" }, { "from": "human", "value": "module.exports = {\n queryDefaults: {\n size: 100\n },\n defaultAggregates: {\n facets: {\n global: {},\n aggs: {}\n }\n },\n defaultPublicationFields: [\n 'ag...
javascript
chosen
[ { "from": "system", "value": "Update broken link to DS.attr docs\n\nCloses #5816" }, { "from": "human", "value": "import { isNone as none } from '@ember/utils';\nimport Transform from './transform';\n\n/**\n The `DS.StringTransform` class is used to serialize and deserialize\n string attribute...
javascript
chosen
[ { "from": "system", "value": "Add more tests for the most common attributes\n" }, { "from": "human", "value": "/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/\n/*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/\n/*global notD...
javascript
chosen
[ { "from": "system", "value": "Split feeds and app config locations.\n" }, { "from": "human", "value": "var fs = require('fs');\nvar p = require('path');\nvar slug = require('slug');\nvar url = require('url');\nvar util = require('util');\n\nslug.defaults.mode ='rfc3986';\n\nvar env = proce...
javascript
chosen
[ { "from": "system", "value": "Set the diff-match-patch timeout to 100ms\n\nThis might result in worse diffs, but we don't want to spend a second\nblocking the event loop while we figure out nicer diffs when comparing\ndocuments.\n" }, { "from": "human", "value": "const DMP = require('diff-match-...
javascript
chosen
[ { "from": "system", "value": "Handle auto-running of the TestSwarm injection script in the test suite.\n" }, { "from": "human", "value": "jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.\n" }, { "from": "gpt", "value": "jQuery.noConflict(); // Allow the test...
javascript
chosen
[ { "from": "system", "value": "Maintain current operation for non-incognito mode\n" }, { "from": "human", "value": "(function() {\n chrome.browserAction.onClicked.addListener(function() {\n var appUrl = chrome.extension.getURL('index.html');\n chrome.tabs.create({ url: appUrl });\n });\n}...
javascript
chosen
[ { "from": "system", "value": "Change isValid to isRange and include results\n" }, { "from": "human", "value": "import chrono from 'chrono-node'\nimport militaryParser from './parsers/militaryParser'\nimport requireMeridiemRefiner from './refiners/requireMeridiemRefiner'\nimport impliedAMEndRefin...
javascript
chosen
[ { "from": "system", "value": "Add wildcard condition to handle navigation to non-root url\n" }, { "from": "human", "value": "const path = require('path');\nconst morgan = require('morgan');\nconst bodyParser = require('body-parser');\n\nconst webpack = require('webpack');\nconst webpackConfig =\...
javascript
chosen
[ { "from": "system", "value": "Allow receiver to emit control events\n" }, { "from": "human", "value": "var events = require(\"events\");\nvar io = require('socket.io-client');\n\nvar Receiver = function () {};\nReceiver.prototype = new events.EventEmitter;\n\nReceiver.prototype.connect = functio...
javascript
chosen
[ { "from": "system", "value": "Add onChange handle to call back when a field has been changed.\n" }, { "from": "human", "value": "angular.module('materialscommons').component('mcEditableHeader', {\n template: `\n <div layout=\"column\" layout-align=\"start stretch\">\n <span ng-if=\"...
javascript
chosen
[ { "from": "system", "value": "Add addType method to page\n" }, { "from": "human", "value": "var registerMiddleware = require('./middleware'),\n registerModel = require('./model'),\n registerApi = require('./api');\n\nmodule.exports = function setup(options, imports, register) {\n var fr...
javascript
chosen
[ { "from": "system", "value": "Add navbar prop to router.\n" }, { "from": "human", "value": "const styles = require('../Style/style.js')\n\nimport React, { Component } from 'react'\nimport { Navigator } from 'react-native'\nimport HomeMap from './HomeMap'\nimport ParkingDetails from './ParkingDet...
javascript
chosen
[ { "from": "system", "value": "Remove yarn check when creating an application in dev mode\n" }, { "from": "human", "value": "const shell = require('shelljs');\nconst _ = require('lodash');\n\nlet isStrapiInstalledWithNPM;\n\nconst watcher = (cmd) => {\n\n const data = shell.exec(cmd, {\n sile...
javascript
chosen
[ { "from": "system", "value": "Update to current google analytics" }, { "from": "human", "value": "var _gaq = [\n ['_setAccount', 'UA-7409939-1'],\n ['_trackPageview']\n];\n(function(d, t) {\n var g = d.createElement(t),\n s = d.getElementsByTagName(t)[0];\n g.src = '//www.google-analytics...
javascript
chosen
[ { "from": "system", "value": "Fix issue with always redirecting to /admin when logged in\n" }, { "from": "human", "value": "// JS Goes here - ES6 supported\nif (window.netlifyIdentity) {\n window.netlifyIdentity.on('login', () => {\n document.location.href = '/admin/';\n });\n}\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Improve performance (set minimongo debug to false)\n" }, { "from": "human", "value": "import minimongo from 'minimongo-cache';\nprocess.nextTick = setImmediate;\n\nexport default {\n _endpoint: null,\n _options: null,\n ddp: null,\n subscriptions: {},\n db: new...
javascript
chosen
[ { "from": "system", "value": "Switch from delay ID to direct style manipulation.\n\nI was having trouble with the extension CSS file so I figured this was\neasier.\n" }, { "from": "human", "value": "(function () {\n \"use strict\";\n var settings, id;\n\n if (window !== window.top) {\n ...
javascript
chosen
[ { "from": "system", "value": "Change vendor script view to not be strictly couple to a user.\n\nFor public views, we will not have a user.\n" }, { "from": "human", "value": "var cdb = require('cartodb.js-v3');\n\nmodule.exports = cdb.core.View.extend({\n initialize: function () {\n this.conf...
javascript
chosen
[ { "from": "system", "value": "Remove the first empty option after duplicating the filter group dropdown\n" }, { "from": "human", "value": "export class MassAddToGroup {\n constructor () {\n // update the hidden input for the new group's ID with the remembered value\n const $txtNewGroup = ...
javascript
chosen
[ { "from": "system", "value": "Remove service worker registration log\n\nRemove the service worker registration log message as it fires on every\npage load (seemingly).\n" }, { "from": "human", "value": "// Copyright (c) Martin Costello, 2017. All rights reserved.\n// Licensed under the Apache 2...
javascript
chosen
[ { "from": "system", "value": "Correct column numbers after 'mutation type' deletion\n" }, { "from": "human", "value": "var MutationTable = function ()\n{\n var element\n\n function detailFormatter(index, row, element)\n {\n html = 'Impact: ' + row[5] + '<br>'\n html += 'Si...
javascript
chosen
[ { "from": "system", "value": "Make progress toward auto-registration for FreeBSD\n" }, { "from": "human", "value": "var os = require('os'),\n exec = require('child_process').exec;\n\n\nexports.lookup_hostname = function (callback) {\n var os_type = os.type();\n\n var process_hostname ...
javascript
chosen
[ { "from": "system", "value": "Add LOK members to the team list\n\n" }, { "from": "human", "value": "import * as actions from '../actions/StatusActions'\nimport React from 'react'\nimport TeamList from './TeamList'\nimport {connect} from 'react-redux'\nimport {bindActionCreators} from 'redux'\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix syntax error on expression\n" }, { "from": "human", "value": "(function($) {\n $(window).bind('userDataLoaded', function(event, data) {\n if (data.login || $('meta[name=profile.allow_unauthenticated_comments]').length > 0) {\n $('.post-comment-button')....
javascript
chosen
[ { "from": "system", "value": "Change the Cart and Orders top bar again\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n angular\n .module('orders')\n .run(menuConfig);\n menuConfig.$inject = ['Menus'];\n\n function menuConfig(Menus) {\n // Set top bar menu items...
javascript
chosen
[ { "from": "system", "value": "Enable usage of $ sign" }, { "from": "human", "value": "$(function(){\n \n var $container = $(\"#container\"),\n $blocks = $(\"#blocks\"),\n heightContainer = $container.outerHeight(),\n scrolledHeight = $container[0].scrollHeight,\n ...
javascript
chosen
[ { "from": "system", "value": "Add getAllTodos function in Max's suggested way for readibility\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\ndb = require('../queries');\n\nrouter.use(express.static('public'));\nrouter.get('/api/todos', db....
javascript
chosen
[ { "from": "system", "value": "Use chai's assert instead of Node's.\n" }, { "from": "human", "value": "var assert = require('assert');\n\nvar worker = require('../../worker');\n\ndescribe('Dummy worker', function() {\n describe('#hello()', function() {\n it('should return \"hello\"', function...
javascript
chosen
[ { "from": "system", "value": "Change to nicer check for FileReader\n" }, { "from": "human", "value": "(function () {\n\t// Check that the browser supports the FileReader API.\n\tif (typeof FileReader === 'undefined') {\n\t\tdocument.write('<strong>Sorry, your web browser does not support the Fil...
javascript
chosen
[ { "from": "system", "value": "Add IE8 compatibility by avoiding .bind()\n" }, { "from": "human", "value": "(function($) {\n \"use strict\";\n\n function countCharactersLeft() {\n var counting = setTimeout(function() {\n if (counting) clearTimeout(counting);\n\n ...
javascript
chosen
[ { "from": "system", "value": "Update console logs for cli script\n" }, { "from": "human", "value": "//-------------------------------------------------------------------------------\n// Common Modules\n//-------------------------------------------------------------------------------\n\nvar bugpa...
javascript
chosen
[ { "from": "system", "value": "Fix an import path to work for case sensitive OSes\n" }, { "from": "human", "value": "define(['backbone', 'marionette', 'app/modules/activity/d3/graph', 'text!templates/devTools/activity/graph.html'\n ], function(Backbone, Marionette, Graph, tpl) {\n\n var Activit...
javascript
chosen
[ { "from": "system", "value": "Add Windows 6.3 (8.1) to the list of known versions.\n\nChange-Id: I4989605776cf6dbbc8a8852d88f0fc6262f08f0b\nReviewed-by: Jake Petroules <2d627e1cecd5435752fa500bacbe05f7cc90c369@petroules.com>\nReviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@digia.com>\...
javascript
chosen
[ { "from": "system", "value": "Add finalise action handling in pages reducer\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport { DataTablePageReducer } from '../pages/dataTableUtilities/reducer/DataTablePageReducer';\nimport getPageI...
javascript
chosen
[ { "from": "system", "value": "Make postmortem play nice with mocha.\n" }, { "from": "human", "value": "var postmortem = require('./lib');\n\n// Automatically install postmortem when this postmortem/register is required.\npostmortem.install();\n\nmodule.exports = postmortem;\n" }, { "from...
javascript
chosen
[ { "from": "system", "value": "Set Live page as a webpack chunk\n" }, { "from": "human", "value": "import Vue from \"vue\";\nimport Router from \"vue-router\";\nimport Search from \"./views/Search.vue\";\nimport Live from \"@/views/Live.vue\";\n// import Stats from '@/views/Stats.vue'\n\nVue.use(...
javascript
chosen
[ { "from": "system", "value": "Fix import path of PageContainer\n" }, { "from": "human", "value": "import React, { Component } from \"react\"\nimport { Route } from \"react-router\"\n\nimport AppContainer from \"./AppContainer\"\nimport { PageContainer as PhenomicPageContainer } from \"phenomic\"...
javascript
chosen
[ { "from": "system", "value": "Make load methods call proper ajax urls\n" }, { "from": "human", "value": "var najax = require(\"najax\");\nvar Promise = require('promise');\nvar Snowflake = function Snowflake(snowflakeUrl) {\n var instance = this;\n\n this.snowflakeUrl = snowflakeUrl;\n ...
javascript
chosen
[ { "from": "system", "value": "Fix issue with multiple functions\n" }, { "from": "human", "value": "\"use strict\";\n\nconst _ = require(\"lodash\");\n\n/**\n * Set Serverless environment variables for local invocations\n *\n * @param {Serverless} serverless - Serverless Instance\n * @param {Map<...
javascript
chosen
[ { "from": "system", "value": "Adjust MorphForm textarea boxes to fill available height\n" }, { "from": "human", "value": "import * as v from '../../styles/variables'\n\nconst styles = {\n section: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n alignIte...
javascript
chosen
[ { "from": "system", "value": "Add basic test for default config values\n" }, { "from": "human", "value": "const assert = require(\"assert\");\nconst sinon = require(\"sinon\");\nconst request = require(\"request-promise\");\nconst {\n LoadingStrategy\n} = require(\"../../../compilerSupplier/loa...
javascript
chosen
[ { "from": "system", "value": "Allow transformResultsToCollection to fallback to other props" }, { "from": "human", "value": "const { find } = require('lodash')\n\nconst { transformInvestmentProjectToListItem } = require('../investment-projects/transformers')\nconst { transformContactToListItem }...
javascript
chosen
[ { "from": "system", "value": "Correct error handling route path.\n" }, { "from": "human", "value": "const app = new (require('koa'))()\nconst send = require('koa-send')\nconst path = require('path')\nconst config = require('./config.json')\n\napp.use(require('koa-stati...
javascript
chosen
[ { "from": "system", "value": "Add date to street level\n" }, { "from": "human", "value": "const makeRequest = require('../common/makeRequest')\nconst PATHS = require('../common/paths')\n\n/**\n * Make a request for street level crimes based on a location.\n * @param {number} latitude - A number ...
javascript
chosen