conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add targetURI variable to make it easer to change the variable which controls the url which is pinged.\n"
},
{
"from": "human",
"value": "const child = require('child_process');\n\nconst forkCount = parseInt(process.argv[2]);\nconst forkCalls = parseInt(process.ar... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra args to findJsModulesFor\n"
},
{
"from": "human",
"value": "import path from 'path';\n\nimport Configuration from '../Configuration';\nimport FileUtils from '../FileUtils';\nimport ModuleFinder from '../ModuleFinder';\nimport findJsModulesFor from '../f... | javascript | chosen |
[
{
"from": "system",
"value": "Use provided alias when creating an application\n"
},
{
"from": "human",
"value": "var _ = require(\"lodash\");\nvar path = require(\"path\");\nvar Bacon = require(\"baconjs\");\nvar nodegit = require(\"nodegit\");\n\nvar Logger = require(\"../logger.js\");\n\nvar A... | javascript | chosen |
[
{
"from": "system",
"value": "Allow advanced graph on medium sized displays\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport GraphContainer from './components/GraphContainer'\nimport { connect } from 'react-redux'\nimport { PropTypes } from 'prop-types'\nimport { fetchInitial... | javascript | chosen |
[
{
"from": "system",
"value": "Fix redefinition of value on currency input\n"
},
{
"from": "human",
"value": "import FormControlsFfInputComponent from './ff-input';\nimport { arg } from 'ember-arg-types';\nimport { string } from 'prop-types';\nimport { action } from '@ember/object';\n\nexport def... | javascript | chosen |
[
{
"from": "system",
"value": "Add acceleration, leads to more natural movement when Ufo is clicked and falls\n"
},
{
"from": "human",
"value": "console.log(\"Helllo world\");\nvar virus = document.querySelector(\"div\");\nvirus.style.top = \"400px\";\nvar x = 1;\nvar y = 0;\nvar vy = 0;\nvar vel... | javascript | chosen |
[
{
"from": "system",
"value": "Add local storage for high scores\n"
},
{
"from": "human",
"value": "require('./style.scss')\n\nvar Game = require(\"./game\")\nvar canvas = document.getElementById('canvas')\nvar context = canvas.getContext('2d');\nvar game = new Game(canvas, context)\n\ngame.setup... | javascript | chosen |
[
{
"from": "system",
"value": "Handle and display guild list fetching errors\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { Link } from 'react-router-dom'\n\nimport './Guilds.scss'\nimport API from '../api'\nimport Guild from '../components/Guild'\n\nexport ... | javascript | chosen |
[
{
"from": "system",
"value": "Change rule from warning to off\n"
},
{
"from": "human",
"value": "/**\n * Created by AlexanderC on 9/15/15.\n */\n\n/* eslint no-unused-vars: 1 */\n\n'use strict';\n\nvar exports = module.exports = function(callback) {\n var microservice = this.microservice;\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Add execution of user script to renderer process\n"
},
{
"from": "human",
"value": "import safeEval from 'safe-eval';\nimport dir from 'node-dir';\nimport path from 'path';\nimport {ipcRenderer} from 'electron';\nconsole.log(__dirname);\nconsole.log(process.cwd());\... | javascript | chosen |
[
{
"from": "system",
"value": "Add active check in timeout\n\nFix #704.\n"
},
{
"from": "human",
"value": "const cls = {\n main: 'ps',\n element: {\n thumb: x => `ps__thumb-${x}`,\n rail: x => `ps__rail-${x}`,\n consuming: 'ps__child--consume',\n },\n state: {\n focus: 'ps--focus'... | javascript | chosen |
[
{
"from": "system",
"value": "Add preamble with settings for some famous web servers\n\nMakes it simple to configure the headers for the Apache and Nginx\nwithout reading it up on the net.\n\nOutput the headers with level 'ERROR' so that it's written out when\nusing the `--silent` option.\n"
},
{
"f... | javascript | chosen |
[
{
"from": "system",
"value": "Move `const imgs` from `render`\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\n\nimport VoudeOnibusPng from '../../img/voudeonibus.png'\nimport VoudeOnibusHorizontalPng from '../../img/voudeonibus-horizontal.png'\n\nexport default class... | javascript | chosen |
[
{
"from": "system",
"value": "Add logging statement for debugging Travis CI\n"
},
{
"from": "human",
"value": "import {exec} from 'node-promise-es6/child-process';\nimport fs from 'node-promise-es6/fs';\n\nasync function run() {\n const {linkDependencies = {}} = await fs.readJson('package.json'... | javascript | chosen |
[
{
"from": "system",
"value": "Remove scenarios we never use\n"
},
{
"from": "human",
"value": "/* eslint no-shadow: \"off\" */\nimport moment from 'moment';\n\nexport default function(server) {\n const user = server.create('user');\n const session = server.create('session');\n const offerings... | javascript | chosen |
[
{
"from": "system",
"value": "Fix small require JS error\n"
},
{
"from": "human",
"value": " //= require action_cable\n //= require_self\n //= require_tree ./channels\n\n (function() {\n this.App || (this.App = {});\n App.cable = ActionCable.createConsumer();\n }).call(this);\n"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak watch task configs: separate linting from help generation, and add the templates to the files that trigger help\ngeneration\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n jshint: {\n all: ['**/*.js', '!**/... | javascript | chosen |
[
{
"from": "system",
"value": "Use File Array Format for zip task\n\nTo build for individual platform, use humanized task name. For example, `grunt dist chrome`.\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function (grunt) {\n 'use strict';\n\n // Force use of... | javascript | chosen |
[
{
"from": "system",
"value": "Add all src and test files to watch\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n grunt.initConfig({\n jshint: {\n all: [\n 'src/*.js'\n ],\n options: {\n jshintrc: '.jshintrc'\n }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Fix a mistake, this should use the specified tweet time\"\n\nThis reverts commit 25d711124e330c784fb4d0ebba1d46fa58f82e7b."
},
{
"from": "human",
"value": "const TwitterPostBase = require('./TwitterPostBase');\nconst { captureGearScreenshot } = require('@/a... | javascript | chosen |
[
{
"from": "system",
"value": "Use json instead of string\n"
},
{
"from": "human",
"value": "'use strict';\nvar moment = require('moment');\n\nmodule.exports = function(app) {\n\n app.get('/:query', function(req, res) {\n var date = req.params.query;\n var unix = null;\n v... | javascript | chosen |
[
{
"from": "system",
"value": "Set timesync repeat to 1\n"
},
{
"from": "human",
"value": "class TimeSync {\n constructor() {\n this.ts = undefined;\n }\n\n init() {\n if (!this.ts) {\n this.ts = timesync.create({\n server: '/timesync',\n interval: 60000\n });\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change logic of where href is set for the root anchor\n"
},
{
"from": "human",
"value": "'use strict';\n\n// DEV TIME CODE\nif (FAKE_SERVER) {\n require('fake');\n}\n// DEV TIME CODE\n\nrequire('./index.scss');\n\nvar $ = require('$jquery');\nvar util = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Remove get from store instantiation\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n model: function() {\n return this.get('store').findAll('podcast');\n }\n});\n"
},
{
"from": "gpt",
"value": "i... | javascript | chosen |
[
{
"from": "system",
"value": "Disable crossing count in crossing reduction\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport cross from './cross';\nimport baryCenter from './bary-center';\n\nconst crossAll = (g, layers) => {\n let count = 0;\n for (let i = 1; i < layers.length; ++i) {... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment header for style points.\n"
},
{
"from": "human",
"value": "// Create a base snippet with the selected text\nscimoz = ko.views.manager.currentView.scimoz;\nvar snip =\n ko.projects.addSnippetFromText(scimoz.selText);\n//create a date to be used as a un... | javascript | chosen |
[
{
"from": "system",
"value": "Add method to return book in component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Link } from 'react-router-dom';\n\nconst BorrowedBooks = (props) => {\n const { books } = props;\n if (!books.length) {\n return (\n <div class... | javascript | chosen |
[
{
"from": "system",
"value": "Fix nav bar back style\n"
},
{
"from": "human",
"value": "import React from 'react-native'\nimport { Fonts, Metrics, Colors } from '../Themes/'\n\nconst NavigationStyle = React.StyleSheet.create({\n titleWrapper: {\n flex: 1,\n padding: Metrics.baseMargin,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Drop databases setup field, not needed since database name can be added to connection string.\n"
},
{
"from": "human",
"value": "/*jshint esnext: true */\nvar mongodb = require('mongodb');\n\n/**\n * Health check a mongodb resource.\n *\n * @param {Object} setup: ht... | javascript | chosen |
[
{
"from": "system",
"value": "Use named functions for better readability\n"
},
{
"from": "human",
"value": "angular\n\t.module('ngSharepoint')\n\t.provider('$sp', function() {\n\t\tvar siteUrl = '';\n\t\tvar connMode = 'JSOM'; //possible values: JSOM, REST\n\t\tvar token = false;\n\t\tvar autolo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug to allow to detect correctly native implementations\n"
},
{
"from": "human",
"value": "var RTCIceCandidate = mozRTCIceCandidate || webkitRTCIceCandidate || RTCIceCandidate;\nvar RTCPeerConnection = mozRTCPeerConnection || webkitRTCP... | javascript | chosen |
[
{
"from": "system",
"value": "Add guides and open source static pages\n"
},
{
"from": "human",
"value": "import axios from 'axios'\nimport { observable, action } from 'mobx'\n\nimport { API_URL } from '../constants'\n\nexport default class PagesStore {\n allowedPages = ['about', 'contacts', 'ho... | javascript | chosen |
[
{
"from": "system",
"value": "Remove expired OR closed alerts\n"
},
{
"from": "human",
"value": "// To remove expired alerts from the alerta database run this script from cron like so: \n// * * * * * /usr/bin/mongo --quiet monitoring /opt/alerta/sbin/removeExpiredAlerts.js\nnow = new Date();\ndb... | javascript | chosen |
[
{
"from": "system",
"value": "Fix history update to expired alerts cron\n"
},
{
"from": "human",
"value": "// To mark expired and old alerts in the alerta database run this script from cron like so:\n// * * * * * /usr/bin/mongo --quiet monitoring /opt/alerta/sbin/removeExpiredAlerts.js\nnow = ne... | javascript | chosen |
[
{
"from": "system",
"value": "Add blinky cursor upon page load\n"
},
{
"from": "human",
"value": "function recipeSearch(input) {\n $.ajax({\n url: \"/recipes\",\n data: input,\n }).done(function(recipeItemPartial) {\n $(recipeItemPartial).appendTo(\".main-searchbar\");\n });\n}\n\nva... | javascript | chosen |
[
{
"from": "system",
"value": "Set expiration time for JWT to 1 day\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst router = express.Router();\n\nconst mongoose = require('mongoose');\nconst User = require('../models/user.js');\n\nconst jwt = require('jsonwebtoken');... | javascript | chosen |
[
{
"from": "system",
"value": "Move clouds down a little\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\n\nexport const Content = ({ children, clouds }) => (\n <main>\n {children}\n\n <style jsx>{`\n @import 'colors';\n\n main {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Mark one person as having money\n"
},
{
"from": "human",
"value": "/* @flow */\n\nexport class Employee {\n name: string;\n balance: number;\n\n constructor(name: string) {\n\tthis.name = name;\n\tthis.balance = 0.0;\n }\n};\n\nexport class Snack {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a function to create a new user\n"
},
{
"from": "human",
"value": "const knex = require('../database')\n\nmodule.exports.findOne = (username) => new Promise((resolve, reject) => {\n knex('users').select().where({username})\n\n // success\n .then(user => {... | javascript | chosen |
[
{
"from": "system",
"value": "Add a bit more help text for Node v8+\n\nIn those versions, it doesn't give you the link to open the debugger (just a link to a help article on the Node website).\n"
},
{
"from": "human",
"value": "/**\n * Module dependencies\n */\n\nvar path = require('path');\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo when loading the SASL Handshake protocol\n"
},
{
"from": "human",
"value": "const requests = {\n Produce: require('./produce'),\n Fetch: {},\n Offsets: {},\n Metadata: require('./metadata'),\n LeaderAndIsr: {},\n StopReplica: {},\n UpdateMetadata: {}... | javascript | chosen |
[
{
"from": "system",
"value": "Add d3.local to D3 build\n"
},
{
"from": "human",
"value": "export {\n event,\n selection,\n select,\n selectAll\n} from \"d3-selection\";\n\nimport \"d3-transition\";\n\nexport {\n chord,\n ribbon\n} from \"d3-chord\";\n\nexport {\n scaleOrdinal,\n schemeCa... | javascript | chosen |
[
{
"from": "system",
"value": "Change rate to 10 seconds."
},
{
"from": "human",
"value": "// Status.js Front End\n// Developed by @gaarb\n\nvar APIUrl = \"https://api.garb.pw/status\"; // Setting the APIUrl.\n\nvar Banner = document.getElementById('banner');\nvar BannerMsg = document.getElementB... | javascript | chosen |
[
{
"from": "system",
"value": "Remove version property from Log4js\n"
},
{
"from": "human",
"value": "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Add CodeWithCopy component to module exports\n\nConnects to #1289\n\nchange-type: patch\n"
},
{
"from": "human",
"value": "import { default as Banner } from './components/Banner'\nimport { default as Button } from './components/Button'\nimport { default as DeleteBut... | javascript | chosen |
[
{
"from": "system",
"value": "Add book to table view after it gets added\n"
},
{
"from": "human",
"value": "var args = arguments[0] || {};\n\n// Access the existing books collection.\nvar myBooks = Alloy.Collections.books;\n\n// When window opens, focus the title field.\n$.addbook.addEventListen... | javascript | chosen |
[
{
"from": "system",
"value": "BM-306: Update app config to enable mocks\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'ember-bedspacemanagement',\n environment: environment,\n baseURL: '/',\n loca... | javascript | chosen |
[
{
"from": "system",
"value": "Fix signature generation for requests with payload\n\nAccording to the [documentation](https://rokka.io/documentation/guides/authentication.html), sha1 is needed around the body as well. Double-sha ;)"
},
{
"from": "human",
"value": "import sha1 from 'sha1';\n\nexpo... | javascript | chosen |
[
{
"from": "system",
"value": "CRM-2906: Refresh attachment grid after click on attachment link on email\n"
},
{
"from": "human",
"value": "/*jslint nomen: true*/\n/*global define*/\ndefine([\n 'jquery',\n 'underscore',\n 'orotranslation/js/translator',\n 'backbone',\n 'oroui/js/me... | javascript | chosen |
[
{
"from": "system",
"value": "Fix job timer during build.\n"
},
{
"from": "human",
"value": "/* eslint-disable no-console */\nconst writeLine = (line) => console.log(line);\n/* eslint-enable no-console */\n\nconst runTask = async (task) => {\n const startTime = Date.now();\n\n writeLine(`S... | javascript | chosen |
[
{
"from": "system",
"value": "Handle case when token is not valid\n"
},
{
"from": "human",
"value": "var jwt = require('jwt-simple');\nvar moment = require('moment');\nvar config = require('../../config/config');\n\nvar authMiddleware = {};\n\nauthMiddleware.ensureAuthenticated = function (req, ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix card rendering in dash\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport Registry from '../utils/Registry';\nimport BaseComponent from './BaseComponent';\nimport Card from './Card';\nimport { pick } from 'lodash';\n\n/**\n * @@... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneccesary webpack node_modules path adjustment\n"
},
{
"from": "human",
"value": "var path = require('path');\nconst webpack = require('webpack')\n\nconst baseConfig = module.exports = {\n context: path.resolve(__dirname, '../'),\n entry: {\n a... | javascript | chosen |
[
{
"from": "system",
"value": "Add resolve property to webpack config\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nconst projectRoot = path.resolve(__dirname, '../../../');\n\nmodule.exports = {\n // use inline sourcemap for karma-sourcemap-loader\n module: {\n loaders... | javascript | chosen |
[
{
"from": "system",
"value": "Set larger test stream length\n"
},
{
"from": "human",
"value": "var assert = require('assert')\nvar charStream = require('../app.js')\n\ndescribe('random-character-stream', function() {\n\n function getBuffer(charGen, size) {\n var buffer = ''\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Use npm view to get all nested dependencies\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar dependencies = require('../../package.json').dependencies;\nvar dependencyNames = Object.keys(dependencies);\nvar packages = dependencyNames.filter(function (d) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'clasification' in demo organization information\n"
},
{
"from": "human",
"value": "/*\n\n #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#\n This file is part of the Smart Developer Hub Project:\n http://www.smartdevel... | javascript | chosen |
[
{
"from": "system",
"value": "Add a comment to explain scanFolder\n"
},
{
"from": "human",
"value": "/* @flow */\n\nconst logger = require('../../logger')\nconst log = logger({\n component: 'scanFolder'\n})\n\n/*::\nimport type Buffer from './buffer'\nimport type { Producer } from './producer'\... | javascript | chosen |
[
{
"from": "system",
"value": "Use URI instead of query string\n"
},
{
"from": "human",
"value": "module.exports = function (context, req) {\n context.log('Node.js HTTP trigger function processed a request. Name=' + req.query.name);\n\n if (typeof req.query.name == 'undefined') {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ./node_modules/.bin not being in $PATH for Gulp\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { spawn } = require('child_process');\n\nconst PluginError = require('plugin-error');\n\n// Execute a shell command\nconst execCommand = function (command) ... | javascript | chosen |
[
{
"from": "system",
"value": "Delete flattenBoard prototype and initialize flattenBoard as a variable\n"
},
{
"from": "human",
"value": "// Game Controller\n// A checkers board has 64 squares like a chess board but it only uses 32 squares all the same color\n// Each player has 12 pieces and piec... | javascript | chosen |
[
{
"from": "system",
"value": "Check the unwated exception string case.\n"
},
{
"from": "human",
"value": "var assert = require('../lib/assertTheUnexpected');\nvar expect = require('unexpected');\n\ndescribe('assertTheUnexpected', function () {\n describe('deepEqual', function () {\n it('shou... | javascript | chosen |
[
{
"from": "system",
"value": "Remove bourbon options for new version\n"
},
{
"from": "human",
"value": "var gulp = require(\"gulp\");\nvar sass = require(\"gulp-sass\");\n\ngulp.task('sass', function () {\n gulp.src('src/hipster-grid-system.scss')\n .pipe(sass({\n // include... | javascript | chosen |
[
{
"from": "system",
"value": "Remove call to expandContentPanel action on slide edit URL/load\n"
},
{
"from": "human",
"value": "import {shortTitle} from '../../configs/general';\nimport slideIdTypeError from '../error/slideIdTypeError';\nimport { AllowedPattern } from '../error/util/allowedPatt... | javascript | chosen |
[
{
"from": "system",
"value": "Enable SSL by default in client used for testing\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar contentful = require('..');\nvar q = require('q');\n\nif (process.env.CONTENTFUL_ACCESS_TOKEN === undefined) {\n throw new ReferenceError('Environment variabl... | javascript | chosen |
[
{
"from": "system",
"value": "Remove other irrelevant steps from gulp serve.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\n\ngulp.task('watch', ['jade', 'wiredep', 'styles'], function () {\n gulp.watch('app/styles/**/*.sass', ['styles']);\n gulp.watch('app/sc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix loading asm.js code without running \"npm link nbind\".\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n// This script prints out the absolute path to the emcc wrapper script in\n// this directory. node-gyp make_global_settings CXX and LINK require\n//... | javascript | chosen |
[
{
"from": "system",
"value": "Fix syntax error (return outside function).\n\nNeed to fix this for code to be parsable by prettier.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n/*eslint no-console: 0*/\n\n'use strict';\n\nconst cli = require('../lib/support/cli'),\n sitespeed = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow duration to be provided as a string\n"
},
{
"from": "human",
"value": "/**\nA utility to attach a tooltip to a DOM element.\n\n@submodule utils\n@method renderTooltip\n@param {Element} domElement The DOM element, not jQuery element, to attach the tooltip to\n@... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in watch task\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar $ = require('gulp-load-plugins')();\n\nvar paths = {\n js: ['./gulpfile.js', './test/**/*.js'],\n scss: ['./stylesheets/_sass-lib.scss'],\n test: './t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for prerender, ensure window exists\n"
},
{
"from": "human",
"value": "var React = require('react');\nvar debounce = require('lodash/function/debounce');\n\nvar matchers = {};\n\nvar mediaChangeCallback;\n\nvar onMediaChange = function () {\n mediaChangeCallbac... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment as to why the filter is stateful\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar angular = require('angular');\n\nangular\n .module('mwl.calendar')\n .filter('calendarDate', function(calendarHelper, calendarConfig) {\n\n function calendarDat... | javascript | chosen |
[
{
"from": "system",
"value": "Change the false param to true.\n"
},
{
"from": "human",
"value": "describe(\"About Expects\", function() {\n\n //We shall contemplate truth by testing reality, via spec expectations. \n it(\"should expect true\", function() {\n expect(false).toBeTruthy(); //T... | javascript | chosen |
[
{
"from": "system",
"value": "Use the right comment style for jsdoc\n"
},
{
"from": "human",
"value": "// @flow\n\n/* Transform a Promise-returning function into a function that can optionally\n * take a callback as the last parameter instead.\n *\n * @param {Function} fn a functio... | javascript | chosen |
[
{
"from": "system",
"value": "Append content instead of replacing and clean up lint errors.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport config from '../config/environment';\n\nexport default Ember.View.extend({\n injectMarkup: function() {\n console.log(command);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the async deprecation error in node7\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst sysout = console.log;\nfunction toFile(log) {\n fs.appendFile(\"./latest.log\", log);\n}\nconst out = log => {\n sysout(log);\n toFile(log);\n};\nco... | javascript | chosen |
[
{
"from": "system",
"value": "Set testing to window if testing enabled\n"
},
{
"from": "human",
"value": "//\n// Copyright 2015 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": "Fix local development when redux tools unavailable\n"
},
{
"from": "human",
"value": "import hashHistory from 'react-router/lib/hashHistory';\nimport { routerMiddleware } from 'react-router-redux';\nimport Raven from 'raven-js';\nimport createRavenMiddleware from 'r... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure the challenge is loaded in the edit-contribution form too\n"
},
{
"from": "human",
"value": "import Ember from 'ember'\nimport AuthenticatedRouteMixin\n from 'ember-simple-auth/mixins/authenticated-route-mixin'\n\nconst { Route, inject } = Ember\n\nexport... | javascript | chosen |
[
{
"from": "system",
"value": "Allow example tree component to display any data structure\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Link } from 'react-router';\nimport Header from '../containers/Header';\nimport Visualizer from './Visualizer';\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with attr naming\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\n\nexport default DS.JSONSerializer.extend({\n attrs: {\n 'preparationType': 'prepTypeID',\n 'storage': 'storageID',\n 'individualsCount': 'Integer1'\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove not needed test from PageWrapper\n"
},
{
"from": "human",
"value": "import { shallow } from 'enzyme';\nimport React from 'react';\nimport Grid from 'react-bootstrap/lib/Grid';\n\nimport PageWrapper from './PageWrapper';\n\ndescribe('pages/PageWrapper', () => ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove eslint build error for e2e\n"
},
{
"from": "human",
"value": "require('material-design-lite/material.css')\nrequire('material-design-lite/material.js')\nimport Vue from 'vue'\n\nVue.config.debug = true\nlet test = location.hash.substring(1)\nlet appOptions = ... | javascript | chosen |
[
{
"from": "system",
"value": "Store coverage in coverage/ without browser name\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar CI = process.env.CI;\n\nmodule.exports = function(config) {\n config.set({\n frameworks: ['mocha', 'chai-sinon', 'browserify'],\n files: [\n './node_... | javascript | chosen |
[
{
"from": "system",
"value": "Switch unit test stubs to sinon-chrome-webextensions.min.js\n"
},
{
"from": "human",
"value": "const reporters = ['mocha', 'coverage']\nif (process.env.COVERALLS_REPO_TOKEN) {\n reporters.push('coveralls')\n}\n\nmodule.exports = function (config) {\n config.set({\... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments and refactor variable names.\n"
},
{
"from": "human",
"value": "var crypto = require('crypto');\n\nexports.randomValueHex = function(len) {\n return crypto.randomBytes(Math.ceil(len/2))\n .toString('hex') // convert to hexadecimal format\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use arguments instead of the spread operator\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst P = require('bluebird');\nconst redis = require('redis');\nconst HyperSwitch = require('hyperswitch');\n\nconst Redis = superclass => class extends superclass {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add loading of main process.\n"
},
{
"from": "human",
"value": "import loadPath from './loadPath';\n\nexport default plugin;\n\n/**\n * Fetch a plugin (much like \"require\")\n * @param {String} path - Path to plugin.\n * @return {Multi} The package that was request... | javascript | chosen |
[
{
"from": "system",
"value": "Fix eslint issue when running unit tests\n"
},
{
"from": "human",
"value": "import Vue from 'vue'{{#if_eq lintConfig \"airbnb\"}};{{/if_eq}}\nVue.config.productionTip = false{{#if_eq lintConfig \"airbnb\"}};{{/if_eq}}\n\n// Polyfill fn.bind() for PhantomJS\n/* eslin... | javascript | chosen |
[
{
"from": "system",
"value": "Add white space for readability, use for...of\n"
},
{
"from": "human",
"value": "import { setChildren } from './setchildren.js';\nimport { ensureEl } from './util.js';\nimport { unmount } from './unmount.js';\nimport { ListPool } from './listpool.js';\n\nexport cons... | javascript | chosen |
[
{
"from": "system",
"value": "Use jquery to add attributes\n"
},
{
"from": "human",
"value": "/* global $ _ requests sidebar */\n'use strict';\n// ==UserScript==\n// @name MusicBrainz: Shortcuts\n// @namespace mbz-joseffriedrich\n// @author Josef Friedrich\n// @version 1\n/... | javascript | chosen |
[
{
"from": "system",
"value": "Make it compatible with rc8\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'jagi:astronomy-timestamp-behavior',\n version: '2.0.0-rc.4',\n summary: 'Timestamp behavior for Meteor Astronomy',\n git: 'https://github.com/jagi/meteor-astronomy-timesta... | javascript | chosen |
[
{
"from": "system",
"value": "Add dependency on accounts-base API for client\n"
},
{
"from": "human",
"value": "Package.describe({\n \"summary\": \"Add feature flagging to Meteor\"\n});\n\nPackage.on_use(function (api) {\n api.use('coffeescript', ['server', 'client']);\n api.use(['deps'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to status console webpack\n\nResolves \"Error: Can't resolve 'fs'\" in the statusConsole build\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nmodule.exports = {\n entry: './src/index.js',\n output: {\n filename: 'main.js',\n path: pa... | javascript | chosen |
[
{
"from": "system",
"value": "[BACKLOG-18075] Fix for input box focus\n"
},
{
"from": "human",
"value": "/*!\n * Copyright 2017 Pentaho Corporation. 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 w... | javascript | chosen |
[
{
"from": "system",
"value": "Add environment properties: isDev, isTest, isProd\n"
},
{
"from": "human",
"value": "const env = process.env.NODE_ENV || 'development';\n\nconst config = {\n development: {\n server: {\n port: process.env.PORT || 3000,\n hostname: process.env.HOSTNAME ... | javascript | chosen |
[
{
"from": "system",
"value": "Update to new stats format\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar influx = require('influx')\nvar _ = require('lodash')\n\nvar defaults = {\n plugin: 'influx-stats-store',\n enabled: true,\n log_input: false,\n log_output: false,\n influx: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add new eslint 1.8.0 options\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n extends: 'rowno',\n env: { es6: true },\n rules: {\n // ES6\n 'arrow-parens': 1,\n 'arrow-spacing': [1, { before: true, after: true }]... | javascript | chosen |
[
{
"from": "system",
"value": "Update contact form required message\n"
},
{
"from": "human",
"value": "const contactFormSchema = {\n name: {\n messages: {\n required: 'Please enter your name',\n },\n },\n emailAddress: {\n messages: {\n required: 'Please enter your email add... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for empty array elements, like [1, , 3].\n"
},
{
"from": "human",
"value": "// [...elements]\nexports.ArrayExpression = (node, generator) => {\n generator.advance(\"[\");\n node.elements.forEach((elementNode, idx) => {\n if (idx !== 0) { generator.advance... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.