conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Enable running blueprint without entity name" }, { "from": "human", "value": "module.exports = {\n description: '',\n\n // locals: function(options) {\n // // Return custom template variables here.\n // return {\n // foo: options.entity.options.foo\n /...
javascript
chosen
[ { "from": "system", "value": "Fix modal name in onSuccess\n" }, { "from": "human", "value": "AutoForm.addHooks(\"newUserForm\", {\n 'onSubmit': function (user) {\n // Get reference to form context\n var form = this;\n // Add user\n Meteor.call(\"addUser\", user, function (error, use...
javascript
chosen
[ { "from": "system", "value": "Move console log to listen callback\n" }, { "from": "human", "value": "const express = require('express');\nconst graphqlHTTP = require('express-graphql');\nconst { buildSchema } = require('graphql');\n\n// Construct a schema, using GraphQL schema language\nconst sc...
javascript
chosen
[ { "from": "system", "value": "Make test suite wait for default user to be created\n" }, { "from": "human", "value": "'use strict';\n\n// init app (if not done already)\nbefore(function(doneBefore){\n var self = this;\n self.timeout(30000);\n\n if (global.app) doneBefore();\n else {\n glob...
javascript
chosen
[ { "from": "system", "value": "title: Add jsdoc explaining `getTitle*Color` selectors.\n\nMake clear why selectors are not subscribed to nav state change.\n" }, { "from": "human", "value": "/* @flow */\nimport { createSelector } from 'reselect';\n\nimport type { Narrow } from '../types';\nimport ...
javascript
chosen
[ { "from": "system", "value": "Fix to use port in PORT environment variable\n" }, { "from": "human", "value": "require('babel-register')\nrequire('css-modules-require-hook')({\n rootDir: './lib/share'\n})\n\nconst fs = require('fs')\nconst app = require('./app').default\nconst config = require('...
javascript
chosen
[ { "from": "system", "value": "Remove our explicit false value for shouldBackgroundReloadRecord\n" }, { "from": "human", "value": "import DS from 'ember-data';\nimport DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';\nimport ENV from 'code-corps-ember/config/environment';\n\ne...
javascript
chosen
[ { "from": "system", "value": "Clear any gif response if the window isn't visible\n" }, { "from": "human", "value": "import { call, put, takeLatest } from 'redux-saga/effects';\nimport GIF from './constants';\nimport SEARCH from '../search/constants';\nimport { result, error } from './actions';\n...
javascript
chosen
[ { "from": "system", "value": "Migrate code for express 4.0\n" }, { "from": "human", "value": "var express = require('express');\nvar less = require('less-middleware');\nvar path = require('path');\n\nexports.register = function(application, params) {\n params = params || {};\n\n var prefix = p...
javascript
chosen
[ { "from": "system", "value": "Add ability to query fixtures\n" }, { "from": "human", "value": "HighFidelity.ApplicationAdapter = DS.FixtureAdapter;\n// HighFidelity.ApplicationSerializer = DS.LSSerializer.extend();\n// HighFidelity.ApplicationAdapter = DS.LSAdapter.extend({\n// namespace: 'h...
javascript
chosen
[ { "from": "system", "value": "Allow reducers/index to export object of reducers to merge in\n" }, { "from": "human", "value": "import { combineReducers } from 'redux';\n\nconst context = require.context(__PROJECT__ + '/reducers', false, /.js$/);\ncontext.keys().forEach(context);\n\nconst reducer...
javascript
chosen
[ { "from": "system", "value": "Use module constant for function timeout, increase to 900 sec (15 min)\n" }, { "from": "human", "value": "const utils = require('./utils');\n\n/*\n Mimicks the lambda context object\n http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html\n*/\n...
javascript
chosen
[ { "from": "system", "value": "Fix bug, need to return server for counting request\n" }, { "from": "human", "value": "var pstarter = require('pstarter');\nvar worker = function() {\n\tvar config = require('./config');\n\tvar express = require('express');\n\tvar app = express();\n\tvar http = requ...
javascript
chosen
[ { "from": "system", "value": "Increase entity size config limit. Default is too small. VAN API can\nreturn larger responses than will fit, which causes a 413 to OSDI clients\neven though the VAN api call was fine. Increased limit.\n" }, { "from": "human", "value": "/*jslint nodejs: true*/\n\n...
javascript
chosen
[ { "from": "system", "value": "Update extension to support new YouTube redesign\n" }, { "from": "human", "value": "// Define search and replace terms for image src link\nvar search = \"s100\";\nvar replace = \"s512\";\n\nfunction getProfileImageContainer() {\n // Get profile image containers\n...
javascript
chosen
[ { "from": "system", "value": "Add extra spaces to improve readability\n" }, { "from": "human", "value": "(function () {\n\n 'use strict';\n\n var path = require('path'),\n loadConfig = require(path.join(__dirname, 'grunt/load')),\n config = {};\n\n module.exports = functio...
javascript
chosen
[ { "from": "system", "value": "Return always null from websocket connection route handlers\n" }, { "from": "human", "value": "import debugLog from '../debugLog.js'\n\nexport default function httpRoutes(webSocketClients) {\n return [\n {\n method: 'GET',\n path: '/{path*}',\n ha...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect reference to playerModel service\n" }, { "from": "human", "value": "export\ndefault class PlayerController {\n\tconstructor($rootScope, $scope, $localStorage, $log, playersModel, websocket) {\n\t\t'ngInject';\n\n\t\tthis.$rootScope = $rootScope;\n\t\tt...
javascript
chosen
[ { "from": "system", "value": "Fix indent & syntax error.\n" }, { "from": "human", "value": "// ==UserScript==\n// @name JSON prettifier.\n// @namespace https://github.com/kilfu0701\n// @description Prettify json string, use 'ctrl + shift + a' to run this script.\n// @match ...
javascript
chosen
[ { "from": "system", "value": "Fix ReactJS warning console message\n" }, { "from": "human", "value": "'use strict';\nvar React = require('react');\nvar globals = require('./globals');\nvar _ = require('underscore');\n\n\nvar Page = module.exports.Page = React.createClass({\n render: function()...
javascript
chosen
[ { "from": "system", "value": "Create file if file doesnt exist\n" }, { "from": "human", "value": "var fs = require('fs');\n\nmodule.exports = function(context) {\n\n //\n // Write some data to a file.\n // Creates new file with the name supplied if the file doesnt exist\n //\n context.write...
javascript
chosen
[ { "from": "system", "value": "Use simulant to do ‘timeupdate’ event; improve assertion\n" }, { "from": "human", "value": "/* eslint-env mocha */\nconst Vue = require('vue-test');\nconst sinon = require('sinon');\nconst audioRenderer = require('../../src/views/index.vue');\n\nfunction makeVm(prop...
javascript
chosen
[ { "from": "system", "value": "Load the media module inside node\n" }, { "from": "human", "value": "'use strict';\n\n(function () {\n var Peeracle = {};\n Peeracle.Peer = require('./peer');\n Peeracle.Tracker = require('./tracker');\n module.exports = Peeracle;\n})();\n" }, { "from": ...
javascript
chosen
[ { "from": "system", "value": "Expatistan: Move to group \"base\" and enable \"More at ...\"\n" }, { "from": "human", "value": "(function(env){\n env.ddg_spice_expatistan = function(api_result) {\n \"use strict\";\n\n if(!api_result || api_result.status !== 'OK') {\n r...
javascript
chosen
[ { "from": "system", "value": "Remove '-' as valid char for a named prepared value\n\nOtherwise it might break code like \"SELECT :value1-:value2\"\n" }, { "from": "human", "value": "var SqlString = require('mysql/lib/protocol/SqlString');\n\n//save the original format function\nvar formatIndexAr...
javascript
chosen
[ { "from": "system", "value": "Move default colors out of getter and into state\n" }, { "from": "human", "value": "export default {\n\n // Return the color in which an item should be drawn\n getColor: (state, getters, rootState) => {\n // Check if there is a default color for the step\n i...
javascript
chosen
[ { "from": "system", "value": "Add as property to mask route\n" }, { "from": "human", "value": "import Layout from '../components/MyLayout'\nimport Link from 'next/link'\n\nconst PostLink = (props) => (\n <li>\n <Link href={`/post?title=${props.title}`}>\n <a>{props.title}</a>\n </Lin...
javascript
chosen
[ { "from": "system", "value": "Add pdb and cif property\n" }, { "from": "human", "value": "'use strict';\n\nconst common = module.exports = {};\n\ncommon.getBasename = function (filename) {\n let base = filename.replace(/.*\\//, '');\n return base.replace(/\\.[0-9]+$/, '');\n};\n\ncommon.ge...
javascript
chosen
[ { "from": "system", "value": "Create returns object as well\n" }, { "from": "human", "value": "/**\n * Created by Itay Herskovits on 2/1/15.\n */\n(function () {\n\n angular.module('mytodoApp')\n .service('TodoService', ['$http', 'Backand', 'AuthService', TodoService]);\n\n functio...
javascript
chosen
[ { "from": "system", "value": "Add stealth address to scope.\n" }, { "from": "human", "value": "define(['./module', 'darkwallet'], function (controllers, DarkWallet) {\n 'use strict';\n controllers.controller('ReceiveStealthCtrl', ['$scope', 'notify', function($scope, notify) {\n // function t...
javascript
chosen
[ { "from": "system", "value": "Implement methods for create device and notification for apn\n" }, { "from": "human", "value": "var apn = require('apn');\nvar _ = require('lodash');\nvar util = require('util');\nvar BaseNotification = require('./BaseNotification');\n\nutil.inherits(APNNotification...
javascript
chosen
[ { "from": "system", "value": "Revert \"Stop FF/tabs stealing focus\"\n\nThis reverts commit 428a4e9dfc389b5fc30278b8bb736d23d4959d9d.\n" }, { "from": "human", "value": "user_pref(\"browser.backspace_action\", 2);\nuser_pref(\"browser.ctrlTab.previews\", true);\nuser_pref(\"browser.fixup.alternat...
javascript
chosen
[ { "from": "system", "value": "Kill enter form submit firefox bug" }, { "from": "human", "value": "$(function() {\n\n $(\".add-alignment\").live('click', function(obj) {\n\n $('#alignmentsModal').modal('show');\n\n return false;\n })\n\n});" }, { "from": "gpt", "va...
javascript
chosen
[ { "from": "system", "value": "Change about link to home\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { Link } from 'react-router';\nimport styles from './Header.module.css';\n\nclass Header extends Component {\n render() {\n return (\n <div classN...
javascript
chosen
[ { "from": "system", "value": "Add code to block deletion of a folder\n" }, { "from": "human", "value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.or...
javascript
chosen
[ { "from": "system", "value": "Change selector for textImage to set/remove class largeImage and largeText\n" }, { "from": "human", "value": "Kwf.Utils.ResponsiveEl('.kwcTextImage', [420]);\n\n//remove largeText class if >55% of element is covered by image\nKwf.onElementWidthChange('.kwcTextImage'...
javascript
chosen
[ { "from": "system", "value": "Remove buttons/links on activity description\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport moment from 'moment';\n\nimport TagList from './TagList';\n\nclass Activity extends Component {\n\n render() {\n const { ...
javascript
chosen
[ { "from": "system", "value": "Replace hardcoded string with constant and add comment\n" }, { "from": "human", "value": "import * as React from \"react\";\nimport {render} from \"react-dom\";\nimport {App} from \"./App\";\n\nrender(\n <App name=\"Sam\"/>,\n document.getElementById(\"root\")...
javascript
chosen
[ { "from": "system", "value": "Resolve some error messages due to unnecessarily retrieved data\n" }, { "from": "human", "value": "\nmodule.exports = function(grunt) {\n grunt.registerTask('bundleEPUB', function() {\n var done = this.async();\n grunt.config.requires('akasha');\n ...
javascript
chosen
[ { "from": "system", "value": "Add test for schema generation on nested objects.\n" }, { "from": "human", "value": "var schemaGenerator = require(\"./schema-generator.js\");\n\ndescribe(\"Schema Generation\", function(){\n it(\"Knows that strings should use the string Editor\", function(){\n ...
javascript
chosen
[ { "from": "system", "value": "Fix the AngularJS module under minification\n" }, { "from": "human", "value": "'use strict';\n\n// Declare app level modules\nangular.module(\n 'suitcase',\n ['ngResource', 'suitcase.controllers'],\n function($interpolateProvider) {\n // Customize th...
javascript
chosen
[ { "from": "system", "value": "Fix missed resolve check on converted resolver.\n" }, { "from": "human", "value": "/**\n * @class SchemaResolver\n * Class exposing a method to resolve schema references to schema objects in a\n * schema.\n */\ndefine([\n], function (\n) {\n return function(resol...
javascript
chosen
[ { "from": "system", "value": "Make it more robust - don't error if setting is not present.\n" }, { "from": "human", "value": "var config = require('../../util/config').config;\n\n\n/**\n * Return true if key starts with a prefixed defined in prefixes.\n *\n * @param {String} key Key name.\n * @p...
javascript
chosen
[ { "from": "system", "value": "Add test implementation for custom cookie name\n" }, { "from": "human", "value": "import { createCookieStore } from '../../src/storage'\nimport Cookie from 'js-cookie'\n\ndescribe('cookie store', () => {\n describe('#persist', () => {\n it('returns resolved prom...
javascript
chosen
[ { "from": "system", "value": "Enable i18next Debugging For Tests\n\nEnable i18next's debugging output in the test environment to make\ndiagnosing problems easier.\n" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePref...
javascript
chosen
[ { "from": "system", "value": "Add self.isLoggedIn and modify login function\n" }, { "from": "human", "value": "app.controller('LoginController', ['$scope', '$mdDialog', '$firebaseAuth', 'AuthFactory', function($scope, $mdDialog, $firebaseAuth, AuthFactory){\n console.log('login controller is ru...
javascript
chosen
[ { "from": "system", "value": "Update documentation for target extension\n" }, { "from": "human", "value": "'use strict';\n\nfunction filter(creep, opts) {\n opts = opts || {};\n\n return {\n filter: function(target) {\n // Insert code\n }\n };\n}\n\n// Room === ...
javascript
chosen
[ { "from": "system", "value": "Convert widget specs to jasmine 2.x syntax\n" }, { "from": "human", "value": "require([ \"public/assets/javascripts/lib/widgets/travel_insurance\" ], function(TravelInsurance) {\n\n \"use strict\";\n\n describe(\"TravelInsurance\", function() {\n define(\"wnmoc...
javascript
chosen
[ { "from": "system", "value": "Fix error message when logging in with locked account.\n" }, { "from": "human", "value": "/**\n * @module myModule\n * @summary: This module's purpose is to:\n *\n * @description:\n *\n * Author: Justin Mooser\n * Created On: 2015-05-15.\n * @license Apache-2.0\n */...
javascript
chosen
[ { "from": "system", "value": "Replace HTML-encoded &amp; with &\n" }, { "from": "human", "value": "import _ from 'lodash';\n\nfunction extractHrefs(htmlBody) {\n const matchHref = /href=\"([^\\\"]*)\"/g;\n let results = [];\n let match;\n\n while (match = matchHref.exec(htmlBody)) {\n res...
javascript
chosen
[ { "from": "system", "value": "Add user page favorites and uploads number indicator\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react'\nimport { Container, Segment, Menu, Header } from 'semantic-ui-react'\nimport { Link } from 'react-router'\nimport moment from...
javascript
chosen
[ { "from": "system", "value": "Update import in response to deprecation warning\n" }, { "from": "human", "value": "import { expect } from 'chai';\n\nimport { launchNewNotebook } from '../../build/main/launch';\n\nvar ipc = require('ipc');\n\ndescribe('launch', () => {\n describe('launchNewNotebo...
javascript
chosen
[ { "from": "system", "value": "Replace template tags that were interfering\n" }, { "from": "human", "value": "/**\n * Include this file _after_ the main backbone-forms file to override the default templates.\n * You only need to include templates you want to override.\n * \n * Requirements when c...
javascript
chosen
[ { "from": "system", "value": "Move iso tests to jsdom" }, { "from": "human", "value": "/* eslint-disable max-len,func-names */\nimport { chai, expect } from './spec_helper'\nimport app from '../src/server-iso'\nimport { fetchOauthToken } from '../oauth'\n\ndescribe('isomorphically rendering on t...
javascript
chosen
[ { "from": "system", "value": "Remove incompatible code for 0.12\n" }, { "from": "human", "value": "module.exports = {\n\n handleResponseCode: function(response) {\n var status = parseInt(response.status, 10);\n if (status >= 400) {\n throw new Error(`Invalid response:...
javascript
chosen
[ { "from": "system", "value": "Disable verbose mode on XBMC connection\n" }, { "from": "human", "value": "var xbmc = require('xbmc');\n\nexports.name = 'task.xbmc';\nexports.version = '1.0.0';\n\nexports.register = function(plugin, options, next) {\n var app = plugin.app;\n\n function run(job, ...
javascript
chosen
[ { "from": "system", "value": "Set the type of rotonde-plugin-chat\n" }, { "from": "human", "value": "export { default as ChatClientPlugin } from './client';\nexport { default as ChatServerPlugin } from './server';\n" }, { "from": "gpt", "value": "import { PLUGIN_TYPE } from 'rotonde-...
javascript
chosen
[ { "from": "system", "value": "Remove useless ternary operator over undefined\n" }, { "from": "human", "value": "/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http:...
javascript
chosen
[ { "from": "system", "value": "Test for version strings in abilities.\n" }, { "from": "human", "value": "var assert = require('assert');\n\nrequire('./support/start')(function(command) {\n exports['test abilities endpoint'] = function() {\n assert.response(command.servers['Core'],\n ...
javascript
chosen
[ { "from": "system", "value": "Disable clicking on thread underline when accepting selection\n" }, { "from": "human", "value": "import React from 'react'\nimport { connect } from 'react-redux'\nimport { openCommentThreads, selectCommentThread } from 'redux/actions.js'\n\nfunction mapStateToProps(...
javascript
chosen
[ { "from": "system", "value": "Remove describe.only as it blocks other tests to run\n\nI used it to filter out other tests to speed up the development, but forgot to remove before i had sent previous PR to fix the issue with process.nextTick. My bad.\n" }, { "from": "human", "value": "var assert ...
javascript
chosen
[ { "from": "system", "value": "Add constant defined no op on press\n" }, { "from": "human", "value": "/* eslint-disable react/forbid-prop-types */\n/* eslint-disable import/prefer-default-export */\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport React from 'react';...
javascript
chosen
[ { "from": "system", "value": "Use `VariableDeclaration` node type instead of `StateVariableDeclaration`\n" }, { "from": "human", "value": "const BaseChecker = require('./../base-checker')\nconst naming = require('./../../common/identifier-naming')\n\nconst ruleId = 'const-name-snakecase'\nconst ...
javascript
chosen
[ { "from": "system", "value": "Set default value for stylesheets" }, { "from": "human", "value": "if (typeof wysihtml5ParserRules === 'undefined') {\n var wysihtml5ParserRules = {\n classes: {\n \"wysiwyg-color-gold\": 1\n },\n tags: {\n \"b\": 1,\n \"strong\": { \"rename...
javascript
chosen
[ { "from": "system", "value": "Add $httpbackend test to test notesTabController" }, { "from": "human", "value": "/* \n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the editor....
javascript
chosen
[ { "from": "system", "value": "Remove parse in Progam collection.\n" }, { "from": "human", "value": "define([\n\n 'App.config',\n 'App.models.Program',\n 'backbone'\n\n], function(config, ProgramModel, Backbone) {\n\n 'use strict';\n\n return Backbone.Collection.extend({\n\n model : Progr...
javascript
chosen
[ { "from": "system", "value": "Fix numbers cast to int\n" }, { "from": "human", "value": "\nTemplate.dash.total = function(){\n var total = 0;\n Expenses.find().map(function(doc){\n total += doc.ammount;\n });\n return total;\n};\nTemplate.dash.me = function(){\n var total = 0;\n Expense...
javascript
chosen
[ { "from": "system", "value": "Change slogan y home page\n" }, { "from": "human", "value": "import React from 'react';\nimport { InitialSearchContainer } from '../containers';\n\nconst HomePage = () => (\n <div className=\"landing-page\">\n <h1>\n <img src={require('../assets/images/logo...
javascript
chosen
[ { "from": "system", "value": "Add side padding to subtitles\n" }, { "from": "human", "value": "import React from 'react';\nimport styled from '@emotion/styled';\n\nconst Content = styled.div`\n margin: 0 0 30px;\n text-align: center;\n color: #666;\n`;\n\nconst Title = styled.h2`\n margin: 0...
javascript
chosen
[ { "from": "system", "value": "Update title for the sub sidebar\n\nFix https://github.com/ProtonMail/proton-vpn-settings/issues/105\n" }, { "from": "human", "value": "import React, { useState, useEffect } from 'react';\nimport { c } from 'ttag';\nimport PropTypes from 'prop-types';\n\nconst SubSi...
javascript
chosen
[ { "from": "system", "value": "Make conditional rendering even shorter syntax" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport styles from './boardCard.css';\n\nconst BoardCard = ({\n alt,\n name,\n role,\n src,\n description\n}) => (\n...
javascript
chosen
[ { "from": "system", "value": "Use grim uncreative white-space utility names\n\nBecause CSS is terrible and there's no way to pretty this up no matter\nhow hard I try.\n" }, { "from": "human", "value": "import defineClasses from '../util/defineClasses'\n\nexport default function() {\n return def...
javascript
chosen
[ { "from": "system", "value": "Add another check for missing workflow\n" }, { "from": "human", "value": "import { expeditions } from 'constants/expeditions';\n\nconst RECENT_EXPEDITIONS_LENGTH = 4;\n\nexport function findExpedition(key) {\n return expeditions[key] ? expeditions[key] : expedition...
javascript
chosen
[ { "from": "system", "value": "Remove console statements from tests\n\nRemove console statements from mock objects and functions.\n" }, { "from": "human", "value": "import Text from './text'\nimport Browser from '../browser';\n\ndescribe('Text', () => {\n describe('clearSelection', () => {\n ...
javascript
chosen
[ { "from": "system", "value": "Add memo temperature sync icon\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { GREY, DARK_GREY } from '../globalStyles';\nimport { ...
javascript
chosen
[ { "from": "system", "value": "Allow unauthenticated access to networks\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';\n\nexport default Ember.Route.extend(AuthenticatedRouteMixin, {\n activ...
javascript
chosen
[ { "from": "system", "value": "Change formatting in Posts router\n" }, { "from": "human", "value": "const express = require('express');\nconst Post = require('../models/post');\n\n\nconst postsRouter = express.Router();\n\npostsRouter.get('/', (req, res, next) => {\n Post.find((err, posts) => {\...
javascript
chosen
[ { "from": "system", "value": "Move standard-minifiers self-test timeout *after* slow run.match.\n" }, { "from": "human", "value": "import selftest, {Sandbox} from '../tool-testing/selftest.js';\n\nselftest.define('standard-minifiers - CSS splitting', function (options) {\n const s = new Sandbox...
javascript
chosen
[ { "from": "system", "value": "Add Email Address for Contact\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from \"react\";\nimport { LOGO_BACKGROUND_PATH } from \"../constants/image_paths\";\n\nconst BetterSelfAddress = () => (\n <p className=\"address small\">\n B...
javascript
chosen
[ { "from": "system", "value": "Test basic a-frame tag (not react component)\n" }, { "from": "human", "value": "import 'aframe';\nimport 'babel-polyfill';\nimport {Animation, Entity, Scene} from 'aframe-react';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport Camera from '....
javascript
chosen
[ { "from": "system", "value": "Include client's WebSocket in onMessage function.\n" }, { "from": "human", "value": "const url = require('url');\nconst WebSocket = require('ws');\n\nvar wss;\n\n/* Initializes the WebSocket on the given server. */\nfunction start(server) {\n\twss = new WebSocket.Se...
javascript
chosen
[ { "from": "system", "value": "Add GET request for page with form to add new emoticon\n" }, { "from": "human", "value": "const express = require('express'),\n router = express.Router({mergeParams: true}),\n db = require('../models');\n\nrouter.get('/', function(req, res, next) {\n db.E...
javascript
chosen
[ { "from": "system", "value": "Comment out preload as fetch headers\n" }, { "from": "human", "value": "const fs = require('fs')\nconst path = require('path')\nconst promisify = require('util').promisify\nconst writeFile = promisify(fs.writeFile)\nconst globby = require('globby')\n\n;(async () => ...
javascript
chosen
[ { "from": "system", "value": "Use code tags for Make script checks\n" }, { "from": "human", "value": "// @flow\n\nimport type { ActionArgs } from '../src/runners/action-args.js'\n\nconst util = require('util')\nconst exec = util.promisify(require('child_process').exec)\n\nmodule.exports = async ...
javascript
chosen
[ { "from": "system", "value": "Split sides into left and right\n" }, { "from": "human", "value": "modeule.exports = {\n SIDES = {\n x0: 700,\n y0: 300,\n x1: 2000,\n y1: 2000\n },\n CENTER = {\n x0: 700,\n y0: 301,\n x1: 602,\n y1: 700\n },\n SMALL_AREA = {\n x0: 1...
javascript
chosen
[ { "from": "system", "value": "Remove this. on gpio ref\n" }, { "from": "human", "value": "const WebSocket = require('ws');\nconst gpio = require('rpi-gpio')\n\nconst wss = new WebSocket.Server({ port: 8080 });\n\nvar power = false;\nvar mute = false;\n\nconst pinConfig = {\n power: 18,\n m...
javascript
chosen
[ { "from": "system", "value": "Append the button rather than pre-pend to give a natural z-index boost without having to specify overrides.\n" }, { "from": "human", "value": "jQuery(function($){\n $('#annotations').hide()\n\n var allTooltips = $();\n\n $('<button class=\"btn btn-info\"><span cl...
javascript
chosen
[ { "from": "system", "value": "Fix problem with missing semicolon\n\nThe minified source was dealing with it, we need to deal with it only\nfor the non-minified variant.\n" }, { "from": "human", "value": "import { terser } from 'rollup-plugin-terser'\nimport filesize from 'rollup-plugin-filesize'...
javascript
chosen
[ { "from": "system", "value": "Set default groups as protected in usergroup seed\n" }, { "from": "human", "value": "\"use strict\";\n\n/*global nodeca*/\n\nvar NLib = require('nlib');\n\nvar Async = NLib.Vendor.Async;\n\nvar models = nodeca.models;\n\nmodule.exports.up = function (cb) {\n // FIX...
javascript
chosen
[ { "from": "system", "value": "Use SVGPointList API in test\n" }, { "from": "human", "value": "describe('svgStar', function () {\n var $compile,\n $rootScope;\n\n beforeEach(module('md5.svg-star'));\n\n beforeEach(inject(function (_$compile_, _$rootScope_) {\n $compile = _$compile_;\n ...
javascript
chosen
[ { "from": "system", "value": "Upgrade Angular Validation Match to 1.7.1\n" }, { "from": "human", "value": "/*!\n * angular-validation-match\n * Checks if one input matches another\n * @version v1.7.0\n * @link https://github.com/TheSharpieOne/angular-validation-match\n * @license MIT License, ht...
javascript
chosen
[ { "from": "system", "value": "Use the declared first and second variables" }, { "from": "human", "value": "(function ($) {\n\n $.fn.dragster = function (options) {\n var settings = $.extend({\n enter: function () { },\n leave: function () { }\n }, options);...
javascript
chosen
[ { "from": "system", "value": "Allow Property Models to be undefined\n" }, { "from": "human", "value": "const Config = use('config');\nconst Errors = use('core/errors');\n\nconst DefaultProperty = require('./default');\nconst PrimaryKeyPattern ...
javascript
chosen
[ { "from": "system", "value": "Fix returning user cookie to not be HTTP-only.\n" }, { "from": "human", "value": "module.exports = function(ctx) {\n ctx.cookies.set('returning', 'true', { maxAge: 10 * 365 * 24 * 60 * 60 * 1000 })\n}\n" }, { "from": "gpt", "value": "module.exports = fu...
javascript
chosen
[ { "from": "system", "value": "Refactor footer col left example\n" }, { "from": "human", "value": "({\n /* ... */\n content: [\n { block: 'logo' },\n { \n block: 'social', \n providers: ['vk', 'facebook', 'twitter']...
javascript
chosen
[ { "from": "system", "value": "Add MAsterId to the dashboard projects query\n\n" }, { "from": "human", "value": "'use strict';\n// External Modules -----------------------------------------------------\nconst mongoose = require('mongoose');\n\n// My Modules ---------------------------------------...
javascript
chosen
[ { "from": "system", "value": "Refresh attendees list when a new attendee join the meeting\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('payMyMeetingApp')\n.controller('showMeetingController', function ($scope, $http, $routeParams, $log) {\n\t$scope.meetingId = $routeParams....
javascript
chosen
[ { "from": "system", "value": "Fix validation failing for unknown options\n" }, { "from": "human", "value": "const { findOneByName } = require('../../common')\n\n\nfunction validateOption(name, value, config) {\n if (config.required && typeof value === 'undefined') {\n throw new Error(`Option...
javascript
chosen
[ { "from": "system", "value": "Change to history mode, v2\n" }, { "from": "human", "value": "import Vue from 'vue'\nimport Router from 'vue-router'\nimport index from '@/components/index'\nimport four from '@/components/four'\n\nVue.use(Router)\n\nexport default new Router({\n routes: [\n {\n...
javascript
chosen
[ { "from": "system", "value": "Update test with new default messaging\n" }, { "from": "human", "value": "const aws = require('aws-sdk');\nconst config = require('../config');\nconst sendRegistrationEmail = require('../sendRegistrationEmail');\n\ndescribe('sendRegistrationEmail', () => {\n let sa...
javascript
chosen