conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Disable account auto-merge by default;\n" }, { "from": "human", "value": "let DefaultSettings = new Map;\n\nDefaultSettings.set('weboob-auto-update', 'true');\nDefaultSettings.set('weboob-auto-merge-accounts', 'true');\nDefaultSettings.set('weboob-installed', 'false...
javascript
chosen
[ { "from": "system", "value": "Add log to payment service requests\n" }, { "from": "human", "value": "var cote = require('cote'),\n models = require('../models');\n\nvar paymentResponder = new cote.Responder({\n name: 'payment responder',\n key: 'payment'\n});\n\npaymentResponder.on('*',...
javascript
chosen
[ { "from": "system", "value": "Change toggle drawer to open drawer.\n\n- Fixes propType validation error (`open` can't have value `function`)\r\n- It is not possible to invoke the `onPress` of `hamburgerButton` while the menu is showing anyway!" }, { "from": "human", "value": "import React from '...
javascript
chosen
[ { "from": "system", "value": "Fix template in edit test suite\n" }, { "from": "human", "value": "define([\n 'jquery',\n 'underscore',\n 'backbone',\n 'models/testsuite/TestSuiteModel',\n 'text!templates/testsuites/testSuiteTemplate.html'\n], function($, _, Backbone, TestSuiteModel...
javascript
chosen
[ { "from": "system", "value": "Add informative message on first run.\n\nSigned-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@2metz.fr>\n" }, { "from": "human", "value": "#!/usr/bin/env node\nvar argv = require('optimist').boolean('billable')\n .de...
javascript
chosen
[ { "from": "system", "value": "Add test to verify component type conditions\n" }, { "from": "human", "value": "jest.dontMock('../MountPoint');\njest.dontMock('../MountService');\n/* eslint-disable no-unused-vars */\nconst React = require('react');\n/* eslint-enable no-unused-vars */\n\ndescribe('...
javascript
chosen
[ { "from": "system", "value": "Revert \"clean up module implementation by removing conditional exports\"\n\nThis reverts commit de34cc3e55cb4580220a26e0157a61db9ae4f8c4.\n\nThe commit negated the intention of commit 642323e - \"Return early if no\n`window` object (eg. Node.js)\".\n" }, { "from": "hum...
javascript
chosen
[ { "from": "system", "value": "Remove yes/no answer check after submitted once\n" }, { "from": "human", "value": "//hide and show answers\n$(document).ready(function(e){\n\n function provide_feedback(is_correct, notice_text) {\n $.ajax({\n url: window.location.pathname + \"/feedbac...
javascript
chosen
[ { "from": "system", "value": "Fix undefined telescope on createUser\n" }, { "from": "human", "value": "Accounts.onCreateUser(function(options, user){\n user = Telescope.callbacks.run(\"onCreateUser\", user, options);\n // get facebook profile picture\n if (options.profile) {\n if(user....
javascript
chosen
[ { "from": "system", "value": ":new: Use the new watcher API in uc-watch\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\"use strict\"\nlet Main = require('../lib/main-with-plugins')\nlet Minimist = require('minimist')\nlet FSWatcher = require('node-fswatcher')\nlet Options = Minimist(pr...
javascript
chosen
[ { "from": "system", "value": "Make addStock method call node server\n" }, { "from": "human", "value": "app.controller('HomeController', ['$scope', '$http', 'stocks', function($scope, $http, stocks) {\n\tstocks.getStocks().success(function(data) {\n\t\t$scope.stocks = data;\n\t});\n\t// $scope.st...
javascript
chosen
[ { "from": "system", "value": "Load Vue globals before app\n" }, { "from": "human", "value": "import Vue from 'vue'\r\nimport VueFire from 'vuefire'\r\nimport App from './App'\r\n\r\nimport 'jquery-ui/jquery-ui.min.js'\r\n\r\nimport imagesLoaded from 'imagesloaded'\r\nimagesLoaded.makeJQueryPlugi...
javascript
chosen
[ { "from": "system", "value": "Disable auto mock by default (otherwise there wont be code coverage data)\n" }, { "from": "human", "value": "jest.unmock('../path.jsx');\n\nconst path = require('../path.jsx');\n\ndescribe('join', () => {\n it('joins \"d\" and \"s\" to equal \"d/s\"', () => {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix Entity import on cell phone\n" }, { "from": "human", "value": "import Entity, { printMessage, action, time, state } from \"../../Entity.js\";\nimport { addItem } from '../inventory.js';\n\nexport class CellPhone extends Entity {\n constructor() {\n super();\...
javascript
chosen
[ { "from": "system", "value": "Change canceling icon to 'spinning orange'\n" }, { "from": "human", "value": "import JobStatus from 'girder_plugins/jobs/JobStatus';\n\nJobStatus.registerStatus({\n WORKER_FETCHING_INPUT: {\n value: 820,\n text: 'Fetching input',\n icon: 'ico...
javascript
chosen
[ { "from": "system", "value": "Implement e2e test for step4\n" }, { "from": "human", "value": "/**\n * Created by eugene.karanda on 02.04.2016.\n */\n\ndescribe('Tutorial Application', function() {\n\n describe('Phone list view', function() {\n\n beforeEach(function() {\n bro...
javascript
chosen
[ { "from": "system", "value": "Add test for sending actions from layer component\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('flexberry-layers', 'Integration | Component | flexberry...
javascript
chosen
[ { "from": "system", "value": "Add a test for isEmpty method\n" }, { "from": "human", "value": "var assert = require('chai').assert;\nvar string = require('../../util/string');\n\ndescribe('util/string', function () {\n\tdescribe('#isEmpty', function () {\n\t\tit('should return true', function ()...
javascript
chosen
[ { "from": "system", "value": "Clear the search query on focus as well and some minor JS clean up.\n" }, { "from": "human", "value": "$(document).ready(function() {\n var divs = \"#flash_success, #flash_notice, #flash_error\";\n $(divs).each(function() {\n humanMsg.displayMsg($(this).text())...
javascript
chosen
[ { "from": "system", "value": "Reset term state and change default search term.\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport {connect} from 'react-redux';\nimport {searchVideos} from '../actions/index';\nimport {bindActionCreators} from 'redux';\n\n\nclass Se...
javascript
chosen
[ { "from": "system", "value": "Fix issue with ButtonView PropTypes\n" }, { "from": "human", "value": "import React, {PropTypes} from 'react';\nimport classNames from 'classnames';\n\nconst ButtonView = ({text, styleName, onClick, disabled=false}) => {\n const handleClick = () => {\n if (!disa...
javascript
chosen
[ { "from": "system", "value": "Add attributes to streams entity\n" }, { "from": "human", "value": "// streams-model.js - A mongoose model\n// \n// See http://mongoosejs.com/docs/models.html\n// for more of what you can do here.\nmodule.exports = function (app) {\n const mongooseClient = app.get(...
javascript
chosen
[ { "from": "system", "value": "Hide modal dialogue on success\n" }, { "from": "human", "value": "Template.newHome.created = function () {\n // Create reference to template instance\n var instance = this;\n\n // Subscribe to all Groups\n instance.subscribe('allGroups');\n};\n" }, { "fr...
javascript
chosen
[ { "from": "system", "value": "Handle escape key in menu hamburger\n" }, { "from": "human", "value": "// @flow\nimport * as React from 'react';\nimport { EditorMenuButton } from './EditorMenu';\nimport Box from './Box';\nimport Set from './Set';\nimport A from './A';\nimport { ManageYourWebsMessa...
javascript
chosen
[ { "from": "system", "value": "Fix format of reports index json\n" }, { "from": "human", "value": "import React from 'react'\nimport {Table} from 'react-bootstrap'\nimport {Link} from 'react-router'\n\nimport API from '../../api'\nimport Breadcrumbs from '../../components/Breadcrumbs'\n\nimport m...
javascript
chosen
[ { "from": "system", "value": "Tracker: Check if variable is defined.\n" }, { "from": "human", "value": "/**\n * Event tracker (analytics)\n */\n\nvar module = angular.module('tracker', []);\nvar mixpanel;\n\nmodule.factory('rpTracker', ['$rootScope', function ($scope) {\n var track = function (...
javascript
chosen
[ { "from": "system", "value": "Remove removed mixins from mixin list\n" }, { "from": "human", "value": "/**\n * This module defines a mapping between supported GET request query parameter\n * arguments and their corresponding mixin, if available.\n */\n'use strict';\n\nvar filterMixins = require(...
javascript
chosen
[ { "from": "system", "value": "Fix source file link generation for 'README.md'\n" }, { "from": "human", "value": "var docdown = require('docdown')\nvar fs = require('fs')\nvar packageFile = require('../package.json')\n\nfs.writeFileSync('../README.md', docdown({\n\tpath: '../' + packageFile.main,...
javascript
chosen
[ { "from": "system", "value": "Set index true for entries\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar highlightSchema = new Schema({\n video_id: {type: String, required: true},\n start: {type: Number, required: true},\n end: {typ...
javascript
chosen
[ { "from": "system", "value": "Hide share dropdown when clicking menu\n" }, { "from": "human", "value": "$(document).ready(function() {\n $('.menu-title .toggle').click(function(event) {\n event.stopPropagation();\n event.preventDefault();\n\n $('.menu-wrapper').toggleClass('visible');\...
javascript
chosen
[ { "from": "system", "value": "UPDATE cypress - Mocha Chai\n" }, { "from": "human", "value": "describe('My First Test', function() {\n it('Does not do much!', function() {\n expect(true).to.equal(true)\n })\n})\n" }, { "from": "gpt", "value": "describe('My First Test', function()...
javascript
chosen
[ { "from": "system", "value": "Configure Mocha to use the JUnit XML reporter\n" }, { "from": "human", "value": "\"use babel\"\n\nimport Mocha from 'mocha'\nimport fs from 'fs-plus'\nimport {assert} from 'chai'\n\nexport default function (testPaths) {\n global.assert = assert\n\n const mocha = n...
javascript
chosen
[ { "from": "system", "value": "Add test for __internal.measurePerformance boolean\n\n\nFormer-commit-id: 4c4154a641998aa89653a1bd330f18fa09cd7e8b\nFormer-commit-id: b4fe0e5b1511d073c8e1cba8294e746b976a03cd" }, { "from": "human", "value": "const { Photon } = require('@prisma/photon')\n\nmodule.exp...
javascript
chosen
[ { "from": "system", "value": "Add examples/* to linted files.\n" }, { "from": "human", "value": "/*jslint node: true */\n\"use strict\";\nmodule.exports = function(grunt) {\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: ...
javascript
chosen
[ { "from": "system", "value": "Use spec reporter to know which specs hang\n" }, { "from": "human", "value": "\"use babel\"\n\nimport Mocha from 'mocha'\nimport fs from 'fs-plus'\nimport {assert} from 'chai'\n\nexport default function (testPaths) {\n global.assert = assert\n\n const mocha = new ...
javascript
chosen
[ { "from": "system", "value": "Add the apiKeyService to the frontend.\n" }, { "from": "human", "value": "/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the L...
javascript
chosen
[ { "from": "system", "value": "Add assertion in caller scope, argument value unchanged.\n" }, { "from": "human", "value": "var assert = require(\"assert\");\nvar should = require(\"should\");\nvar function_args = require('../function_args');\n\ndescribe('function_args', function(){\n\n describe(...
javascript
chosen
[ { "from": "system", "value": "Add missing option to tryCreatePlayer\n" }, { "from": "human", "value": "//= require asciinema-player\n\nfunction tryCreatePlayer(parentNode, asciicast, options) {\n function createPlayer() {\n asciinema_player.core.CreatePlayer(\n parentNode,\n asciic...
javascript
chosen
[ { "from": "system", "value": "Add styles to floating button item label\n" }, { "from": "human", "value": "'use strict'\n\nimport React, { Component } from 'react'\nimport ReactCSS from 'reactcss'\n\nimport colors from '../../styles/variables/colors'\nimport { spacing, sizing } from '../../styles...
javascript
chosen
[ { "from": "system", "value": "Create both admin test user and no permissions test user\n" }, { "from": "human", "value": "'use strict'\nprocess.env.NODE_ENV = 'testing'\n\nlet db = require('../api/db').db\nlet User = require('../api/db').User\nlet bcrypt = require('bcrypt')\nlet winston = requir...
javascript
chosen
[ { "from": "system", "value": "Add chapter 5, exercise 1\n" }, { "from": "human", "value": "let arrays = [[1, 2, 3], [4, 5], [6]];\n\nlet array = arrays.reduce((a, b) => a.concat(b), []);\nconsole.log(array);\n// → [1, 2, 3, 4, 5, 6]\n" }, { "from": "gpt", "value": "function flatten(a...
javascript
chosen
[ { "from": "system", "value": "Allow public access to default settings\n" }, { "from": "human", "value": "/*!\n * jQuery Sticky Footer v1.2.1\n *\n * Copyright 2014 miWebb and other contributors\n * Released under the MIT license\n */\n\n(function($) {\n\t$.fn.stickyFooter = function(options) {\n...
javascript
chosen
[ { "from": "system", "value": "Update wording when adding an interaction\n" }, { "from": "human", "value": "const { POLICY_FEEDBACK_PERMISSIONS } = require('../constants')\n\nmodule.exports = function ({\n returnLink,\n errors = [],\n permissions = [],\n}) {\n const options = [\n {\n ...
javascript
chosen
[ { "from": "system", "value": "Update date format to be more correct\n" }, { "from": "human", "value": "import {parse, format} from 'date-fns';\n\nexport function formatDate(startDate, endDate) {\n // If specific date is not defined yet. Meaning startDate is 2018-02 for instance\n if (startDate...
javascript
chosen
[ { "from": "system", "value": "Throw error if there's no match when discarding added lines\n" }, { "from": "human", "value": "export default function discardChangesInBuffer(buffer, filePatch, discardedLines) {\n // TODO: store of buffer for restoring in case of undo\n\n buffer.transact(() => {\...
javascript
chosen
[ { "from": "system", "value": "Fix bug where additional properties in objection models were not be omitted\n" }, { "from": "human", "value": "'use strict';\n\n// Exports\nexport default (BaseModel) => {\n class Model extends BaseModel {\n $toDatabaseJson() {\n const omit = th...
javascript
chosen
[ { "from": "system", "value": "Send latitude and longitude to API.\n" }, { "from": "human", "value": "var URL = 'https://evf2nv3589.execute-api.us-west-2.amazonaws.com/dev';\n\nfunction submitForm(e) {\n var data = {};\n data['foodname'] = $('#foodName').val();\n data['description'] = $(...
javascript
chosen
[ { "from": "system", "value": "Add children array to default component data\n" }, { "from": "human", "value": "const fs = require('fs');\nconst path = require('path');\n\nconst overrideRequiredComponentStyle = {\n position: 'absolute'\n};\n\nconst defaultRequiredComponentStyle = {\n width: '100...
javascript
chosen
[ { "from": "system", "value": "Clean up comments and extra spaces.\n" }, { "from": "human", "value": "function doConfig() {\n if (window.location.hostname === \"test.materialscommons.org\") {\n /*\n * test.materialscommons.org doesn't conform to the naming convention so\n ...
javascript
chosen
[ { "from": "system", "value": "Add spec for appending checkmark\n" }, { "from": "human", "value": "import React from \"react\"\nimport { shallow } from \"enzyme\"\nimport sinon from \"sinon\"\n\nimport GroupLabelInput from \"../../web/static/js/components/group_label_input\"\n\ndescribe(\"GroupLa...
javascript
chosen
[ { "from": "system", "value": "Deploy mock contracts only for test" }, { "from": "human", "value": "module.exports = function(deployer) {\n deployer.deploy(PullPaymentBid);\n deployer.deploy(BadArrayUse);\n deployer.deploy(ProofOfExistence);\n deployer.deploy(Bounty);\n deployer.deploy(Ownab...
javascript
chosen
[ { "from": "system", "value": "Add the new timeline fields to the javascript that helps with entering dates.\n" }, { "from": "human", "value": "/* Copyright 2013 the Melange authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in ...
javascript
chosen
[ { "from": "system", "value": "Add usage to urbandict if no term is given\n" }, { "from": "human", "value": "var urban = require('urban');\n\nvar elems = {\n\t'ud': ['definition'],\n\t'udexample': ['example'],\n\t'urbandict': ['definition', 'example']\n};\n\nmodule.exports.commands = ['ud', 'urba...
javascript
chosen
[ { "from": "system", "value": "Make simpleMDE setup js compatible with django admin' setting\n\nIn django admin, the jQuery available at `django.jQuery`.\nUse jQuery so the SimpleMDE is set up after the page is ready.\n" }, { "from": "human", "value": "(function (SimpleMDE) {\n\n var elementLi...
javascript
chosen
[ { "from": "system", "value": "Add put http method for elements\n" }, { "from": "human", "value": "angular.module('app', []).controller('AppCtrl', function ($scope, $http) {\n\t$scope.results = [];\n\n\t$scope.loadUsers = function() {\n\t\t$http.get('/elements')\n\t\t\t.success(function(data) {\n...
javascript
chosen
[ { "from": "system", "value": "Duplicate binding names are allowed in param lists\n" }, { "from": "human", "value": "import Term from \"./terms\";\nimport { CloneReducer } from \"shift-reducer\";\nimport { gensym } from \"./symbol\";\nimport { VarBindingTransform } from \"./transforms\";\n\nexpor...
javascript
chosen
[ { "from": "system", "value": "Define the menu size dynamically" }, { "from": "human", "value": "<!-- \nvar browser = '';\nvar version = '';\nvar entrance = '';\nvar cond = '';\n\n// BROWSER?\nif (browser == '') {\n\tif (navigator.appName.indexOf('Microsoft') != -1)\n\t\tbrowser...
javascript
chosen
[ { "from": "system", "value": "Create parent directories before writing a file\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n// TODO: Create parent directories if they don't exist when compiling\n\nconst fs = require('fs')\nconst path = require('path')\nconst compile = require('../src...
javascript
chosen
[ { "from": "system", "value": "Make commandline actually output json\n\nAllows this tool to be piped to json, eg like this:\n\n 870 grep -C 5 Unabs bewest-carelink.csv | mmcsv parse - \\\n | json -a -C deviceTime type subType joinKey | less\n" }, { "from": "human", "value": "var es = r...
javascript
chosen
[ { "from": "system", "value": "Allow jQuery version 1.11 and 2.1\n\nBoth RC1's of jQuery 1.11 and 2.1 have just been released.\r\n\r\n(I screwed up last PR)" }, { "from": "human", "value": "/**\n@module ember\n@submodule ember-views\n*/\n\nvar jQuery = (this && this.jQuery) || (Ember.imports && E...
javascript
chosen
[ { "from": "system", "value": "Add js method for showing checkboxes with materialize\n\n" }, { "from": "human", "value": "const main = {\n\n initialize: function() {\n $(document).ready(function(){\n $('.button-collapse').sideNav();\n })\n }\n};" }, { "from"...
javascript
chosen
[ { "from": "system", "value": "BF: Check request expiry when it's set into future\n\nThis change ensures that we do not fail in case of time skew between\nthe user and the server.\n\nFixes #160\n" }, { "from": "human", "value": "function checkRequestExpiry(timestamp) {\n // If timestamp is not...
javascript
chosen
[ { "from": "system", "value": "Fix missing default method for ref\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = function createRef (refKey, store, ops) {\n const ref = {}\n \n Object.keys(ops).forEach((opKey) => {\n ref[opKey] = (...args) => {\n return store.dispa...
javascript
chosen
[ { "from": "system", "value": "[Tests] end2end: Add beforeEach and afterEach to clear and check errors.log\n\nNow in cypress tests, beforeEach tests the lizmap errors.log file is cleared and afterEach tests the lizmap error.log should be empty.\n" }, { "from": "human", "value": "// **************...
javascript
chosen
[ { "from": "system", "value": "Fix GTFS trip ordering (api)\n" }, { "from": "human", "value": "const db = require('../db.js');\n\nconst cache = require('../utils/cache.js');\n\nasync function getTrips(id, coachOnly) {\n\t\n\treturn await cache.use('mnt-trips', id, () => db.query(`\n\t\tSELECT TIM...
javascript
chosen
[ { "from": "system", "value": "Load JSON blob and js configuration file\n" }, { "from": "human", "value": "var path = require('path');\n\nmodule.exports = {\n config: require(path.join(process.cwd(), './config/', (process.env.NODE_ENV || 'development') + '.json')),\n isDebug: ! process.env.NODE...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary require, thanks @fredj\n" }, { "from": "human", "value": "goog.require('goog.debug.Console');\ngoog.require('goog.debug.Logger');\ngoog.require('goog.debug.Logger.Level');\ngoog.require('ol.Collection');\ngoog.require('ol.Coordinate');\ngoog.requi...
javascript
chosen
[ { "from": "system", "value": "Add new preprint provider properties to model\n" }, { "from": "human", "value": "import DS from 'ember-data';\nimport OsfModel from 'ember-osf/models/osf-model';\n\nexport default OsfModel.extend({\n name: DS.attr('fixstring'),\n logoPath: DS.attr('string'),\n...
javascript
chosen
[ { "from": "system", "value": "Change indentation style to use tabs\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n\"use strict\";\n\nconst moment = require(\"moment\");\nconst sugar = require(\"sugar\");\nconst chalk = require(\"chalk\");\nconst exec = require(\"child_process\").exec;...
javascript
chosen
[ { "from": "system", "value": "Use node `path` as path resolver for webpack\n\nI am having this issue when using webpack to bundle my file and this is the error being thrown:\r\n```\r\nERROR in ./node_modules/mcrypt/index.js\r\nModule not found: Error: Can't resolve './build/Release/mcrypt' in '.......\\node...
javascript
chosen
[ { "from": "system", "value": "Remove highly secret personal information\n" }, { "from": "human", "value": "const context = require('./context-stub')\nconst dynamoDocStub = require('./dynamodb-doc-stub')\nconst proxyquire = require('proxyquire').noCallThru()\n\nfunction test (requirePath) {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add support for Meteor 1.0.4 with backward compatible\n" }, { "from": "human", "value": "var Future = Npm.require('fibers/future');\n\nvar originalOpen = MongoInternals.RemoteCollectionDriver.prototype.open;\nMongoInternals.RemoteCollectionDriver.prototype.open = fu...
javascript
chosen
[ { "from": "system", "value": "Add missing semicolon to express route handler\n" }, { "from": "human", "value": "var express = require('express');\nvar app = express();\n\napp.set('port', (process.env.PORT || 5000));\n\napp.use(express.static(__dirname + '/public'));\n\n// views is directory for ...
javascript
chosen
[ { "from": "system", "value": "Disable sequelize logging by default\n" }, { "from": "human", "value": "module.exports = {\n connect: function(Sequelize) {\n if (typeof Sequelize === 'undefined') {\n throw new Error(\n 'You must pass sequelize as an argument to the sequelize-heroku...
javascript
chosen
[ { "from": "system", "value": "Update array data for the second example" }, { "from": "human", "value": "export default function move (array, moveIndex, toIndex) {\n /* #move - Moves an array item from one position in an array to another.\n\n Note: This is a pure function so a new array will...
javascript
chosen
[ { "from": "system", "value": "Revert \"trying to figure out appveyor failure reason\"\n\nThis reverts commit 2b6f1b3922ce9177ce393b90228b6918967d8877.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n'use strict';\n\nvar spawn = require('child_process').spawn;\n\nif (process.send) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix unit test that fails on OS X.\n" }, { "from": "human", "value": "// Copyright (c) Rotorz Limited. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root.\n\n\n// Packages\nimport given from \"mocha-testdata\";\nimport shoul...
javascript
chosen
[ { "from": "system", "value": "Fix import for days with no records\n\n" }, { "from": "human", "value": "const moment = require('moment');\nconst util = require('../../core/util.js');\nconst _ = require('lodash');\nconst log = require('../../core/log');\n\nvar config = util.getConfig();\nvar dirs ...
javascript
chosen
[ { "from": "system", "value": "Move from props to state\n" }, { "from": "human", "value": "import PropTypes from 'prop-types';\nimport React from 'react';\n\nclass ApplicationPreviewContainer extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n previewUr...
javascript
chosen
[ { "from": "system", "value": "Tweak to limit to charge\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies.\n */\nvar mongoose = require('mongoose'),\n\tSchema = mongoose.Schema;\n\n/**\n * Device Schema\n */\nvar DeviceSchema = new Schema({\n\tname: {\n\t\ttype: Stri...
javascript
chosen
[ { "from": "system", "value": "Remove issue discussion started spec\n" }, { "from": "human", "value": "import Vue from 'vue';\nimport store from '~/notes/stores';\nimport issueDiscussion from '~/notes/components/issue_discussion.vue';\nimport { issueDataMock, discussionMock } from '../mock_data';...
javascript
chosen
[ { "from": "system", "value": "Delete message more verbose: title included\n" }, { "from": "human", "value": "$(function() {\n $('a.deleteShow').click(function(e) {\n e.preventDefault();\n var url = $(this).attr('href');\n var userConfig = {\n captionOk: 'Yes',\...
javascript
chosen
[ { "from": "system", "value": "Add new latest interaction date sort option\n" }, { "from": "human", "value": "const companySortForm = {\n method: 'get',\n class: 'c-collection__sort-form js-AutoSubmit',\n hideFormActions: true,\n hiddenFields: { custom: true },\n children: [\n {\n ma...
javascript
chosen
[ { "from": "system", "value": "fix(addon): Remove the frame-src definition as it is now obsolete.\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\"use strict\";\nconst defaults = {\n baseUrl: \"\",\n title: \"Loading...\",\n csp: \"on\"\n};\n\nfunction template(rawOptions) {\n const...
javascript
chosen
[ { "from": "system", "value": "Fix installing packages with blueprint\n" }, { "from": "human", "value": "/* global module */\n\nconst postCSSCompilingPackages = [\n { name: 'broccoli-funnel', target: '^1.1.0' },\n { name: 'broccoli-merge-trees',target: '^1.2.1' },\n { name: 'broccoli-postcss-s...
javascript
chosen
[ { "from": "system", "value": "Update endpoint that is targeted\n" }, { "from": "human", "value": "'use strict';\n\nvar request = require('superagent');\nvar glimpse = require('glimpse');\n\nmodule.exports = {\n triggerGetLastestSummaries: function () {\n request\n .get('/gli...
javascript
chosen
[ { "from": "system", "value": "Add space removing for form\n" }, { "from": "human", "value": "function login() {\n var firstName = document.getElementById(\"firstName\").value;\n var lastName = document.getElementById(\"lastName\").value\n\n var xhr = new XMLHttpRequest();\n xhr.open(\"POST\"...
javascript
chosen
[ { "from": "system", "value": "Use egal comparision in commonLeft\n" }, { "from": "human", "value": "'use strict';\n\nvar every = Array.prototype.every\n , call = Function.prototype.call\n , toArray = require('../../Object/to-array')\n , sortMethod = call.bind(require...
javascript
chosen
[ { "from": "system", "value": "Fix player stack: users were added multiple times\n" }, { "from": "human", "value": "var models = require('../models');\nvar GameController = require(\"./GameController\");\n\nvar playerQueue = [];\n\nexports.startGame = function(req, res) {\n\n var player1 = req.b...
javascript
chosen
[ { "from": "system", "value": "Load Discord token from `tokens.json`\n" }, { "from": "human", "value": "const Settings = require('./settings.json');\nconst Bot = require('./TheAwesomeBot.js');\n\nfunction start() {\n // check for the discord token\n const token = Settings.api_token || process.e...
javascript
chosen
[ { "from": "system", "value": "Remove script defer to see if it fixes travis visual regression tests\n" }, { "from": "human", "value": "var components = require('./components');\nvar javascript = require('../tasks/javascript');\nvar extend = require('extend');\n\n/**\n * Helper function for rende...
javascript
chosen
[ { "from": "system", "value": "Use cheap module eval source map\n" }, { "from": "human", "value": "const webpack = require('webpack');\nconst merge = require('webpack-merge');\nconst BrowserSyncPlugin = require('browser-sync-webpack-plugin');\nconst path = require('path');\nconst fs = require('fs...
javascript
chosen
[ { "from": "system", "value": "Include REDIRECT_URL to the prod config to avoid the node to resolve to itself and redirect to the good callback\n" }, { "from": "human", "value": "module.exports = {\n db: {\n uri: process.env.MONGOHQ_URL || process.env.MONGODB_URI || 'mongodb://' + (process.en...
javascript
chosen
[ { "from": "system", "value": "Use Object.assign instead of underscore\n" }, { "from": "human", "value": "module.exports = function bindSassMiddleware (keystone, app) {\n\t// the sass option can be a single path, or array of paths\n\t// when set, we configure the node-sass middleware\n\n\tvar sas...
javascript
chosen
[ { "from": "system", "value": "Remove rediger slug from edit cabin url\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport config from './config/environment';\n\nvar Router = Ember.Router.extend({\n location: config.locationType\n});\n\nRouter.map(function () {\n this.resource...
javascript
chosen
[ { "from": "system", "value": "Fix logic to handle multiple invalid file types\n" }, { "from": "human", "value": "'use strict';\n\nconst Hoek = require('hoek');\nconst Magic = require('file-type');\n\nconst internals = {};\n\ninternals.validate = function (payload, options, next) {\n\n Object....
javascript
chosen
[ { "from": "system", "value": "Add hide label back to columns component.\n" }, { "from": "human", "value": "export default [\n {\n key: 'labelPosition',\n ignore: true\n },\n {\n key: 'placeholder',\n ignore: true\n },\n {\n key: 'description',\n ignore: true\n },\n {\n ...
javascript
chosen
[ { "from": "system", "value": "Use PORT env var with 5000 fallback\n\nMakes more sense IMO since the example site uses PORT=3000 but not this generated website, and 5000 seems to be the default of `tux-scripts start`. This approach solves both issues really, since it allows the user to set their own port, or...
javascript
chosen
[ { "from": "system", "value": "Create a method to order objects by key name\n" }, { "from": "human", "value": "'use strict';\n\nconst chalk = require('chalk');\nconst validatePackageName = require('validate-npm-package-name');\n\n/**\n * Cleans the terminal\n * -----------------------------------...
javascript
chosen
[ { "from": "system", "value": "Add createdAt prop and status object to schema\n" }, { "from": "human", "value": "Keys = new Mongo.Collection(\"keys\");\n\nKeySchema = new SimpleSchema({\n keyID: {\n type: Number,\n label: \"Key ID\",\n min: 0\n },\n vCode: {\n type: String,\n la...
javascript
chosen