conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Make the buffer radio be big enough to change points visually\n"
},
{
"from": "human",
"value": "var AddAnalysisOptionModel = require('./add-analysis-option-model');\n\nmodule.exports = function (analysisDefinitionNodeModel) {\n var models = [];\n\n var areaOfInfl... | javascript | chosen |
[
{
"from": "system",
"value": "Add index on userid to transaction database\n"
},
{
"from": "human",
"value": "var seq = require('seq');\nvar args = require('yargs').argv;\n\nvar Factory = require('./lib/database/Factory');\nvar config = require('./lib/configuration');\n\nvar fileName = args.filen... | javascript | chosen |
[
{
"from": "system",
"value": "ui: Use ViewPlaceholder instead of custom code\n\nInstead of using a custom View with custom styles use the\nViewPlaceholder component.\n"
},
{
"from": "human",
"value": "/* @flow */\nimport React, { PureComponent } from 'react';\nimport { View, StyleSheet } from 'r... | javascript | chosen |
[
{
"from": "system",
"value": "[layout] Remove the application mode and route\n"
},
{
"from": "human",
"value": "//Needed components\nvar Header = require('../header').component;\nvar Cartridge = require('../cartridge').component;\nvar ContentBar = require('../content-bar').component;\nvar Bar = ... | javascript | chosen |
[
{
"from": "system",
"value": "Call super in beforeModel hook\n\nUse super to call the application routes beforeModel hook so the\nApplicationRouteMixin works.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport ApplicationRouteMixin from 'simple-auth/mixins/application-route-mi... | javascript | chosen |
[
{
"from": "system",
"value": "Clone the default page data for every package to prevent problems with async tasks\n"
},
{
"from": "human",
"value": "const buildBaseCss = require(`./build/base-css.js`);\nconst buildBaseHtml = require(`./build/base-html.js`);\nconst buildPackageCss = require(`./bui... | javascript | chosen |
[
{
"from": "system",
"value": "Delete a function to save LOC\n"
},
{
"from": "human",
"value": "function calcWidth(name) {\n return 225 + name.length * 6.305555555555555;\n}\n\nWebApp.connectHandlers.use(\"/package\", function(request, response) {\n var url = `https://atmospherejs.com/a/package... | javascript | chosen |
[
{
"from": "system",
"value": "Add reccomendation comment to make sure local DB testing changes dont get pulled\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar mongoose = require('mongoose');\n\nvar app = express();\n\n// connect to mongo database named \"bolt\"\n// unco... | javascript | chosen |
[
{
"from": "system",
"value": "Change desktop resolution to 1280x960"
},
{
"from": "human",
"value": "const express = require('express');\nconst router = express.Router();\nconst puppeteer = require('puppeteer');\n\n\nrouter.get('/', function (req, res, next) {\n puppeteer.launch().then(async br... | javascript | chosen |
[
{
"from": "system",
"value": "Use _.extend instead of Object.assign\n"
},
{
"from": "human",
"value": "var fs = require('fs');\n\nvar archiver = require('./archiver');\nvar createServiceFile = require('./service');\nvar createSpecFile = require('./spec');\nvar files = require('./files');\n\nfunc... | javascript | chosen |
[
{
"from": "system",
"value": "Add initial route provider for DNT Connect signon\n"
},
{
"from": "human",
"value": "\n/*\n * GET home page.\n */\n\n\nmodule.exports = function (app, options) {\n \"use strict\";\n\n /*\n GET list of routes (index page)\n */\n var getIndex = fun... | javascript | chosen |
[
{
"from": "system",
"value": "Improve performance: smaller scope, optimization\n\nChange addEventListener to focus only on the large web chat in Facebook\n(id = webMessengerRecentMessages). Also add this event listener only\nafter the entire page has loaded to prevent a flurry of runs.\n\nConflicts:\n\tback... | javascript | chosen |
[
{
"from": "system",
"value": "Remove birdinc from team list"
},
{
"from": "human",
"value": "const map = {\n //steemit\n ned: 'steemit',\n justinw: 'steemit',\n elipowell: 'steemit',\n vandeberg: 'steemit',\n birdinc: 'steemit',\n gerbino: 'steemit',\n andrarchy: 'steemit... | javascript | chosen |
[
{
"from": "system",
"value": "wip(weapons): Add elements to the menu\n\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport weapons from './weapons.json';\nimport './style.css';\n\nclass Weapons extends Component {\n render() {\n return (\n <h1>Weapons</h... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Critical CSS Destination Path\n\n"
},
{
"from": "human",
"value": "/**\n * Critical CSS\n * @description Generate Inline CSS for the Above the fold optimization\n */\n\nimport kc from '../../config.json'\nimport gulp from 'gulp'\nimport critical from 'critical'\... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out console to merge.\n"
},
{
"from": "human",
"value": "// execute dependencies immediately on file parse\n\nnrj(\"/js/mapbox/mapbox-1.5.2.js\",1);\nnrc(\"/js/mapbox/mapbox-1.5.2.css\",1);\n\n\n// the plugin callback by another name\nvar ddg_spice_maps_plac... | javascript | chosen |
[
{
"from": "system",
"value": "Fix eslint shorthand function assignment\n"
},
{
"from": "human",
"value": "const getType = require('../typeResolver');\n\nmodule.exports = {\n isCoerced: function(value, typeDescriptor) {\n return value instanceof getType(typeDescriptor);\n },\n coerce(value,... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor private variable declaration to constructor\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst\n Animation = require('./animation'),\n eventBus = require('./event-bus');\n\nconst\n pacmanNormalColor = 0xffff00,\n pacmanFrighten... | javascript | chosen |
[
{
"from": "system",
"value": "Add some delay to the dev api to better represent reality\n"
},
{
"from": "human",
"value": "// To use it create some files under `routes/`\n// e.g. `server/routes/ember-hamsters.js`\n//\n// module.exports = function(app) {\n// app.get('/ember-hamsters', function(... | javascript | chosen |
[
{
"from": "system",
"value": "Add minimized version of updated script.\n"
},
{
"from": "human",
"value": "(function(){melange.template.survey=function(){};melange.template.survey.prototype=new melange.templates._baseTemplate;melange.template.survey.prototype.constructor=melange.template.survey;m... | javascript | chosen |
[
{
"from": "system",
"value": "Set a minimum zoom compatible with most viewports\n\nfixes #512 on github\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar _ZOOM = {\n NEIGHBORHOOD: 16,\n MIN: 0,\n MAX: 19\n};\n\nmodule.exports = {\n ZOOM: Object.freeze ? Object.freeze(_ZOOM) :... | javascript | chosen |
[
{
"from": "system",
"value": "Add a wait to get authorize response before initial trade page\n"
},
{
"from": "human",
"value": "import { configure } from 'mobx';\nimport React from 'react';\nimport { render } from 'react-dom';\nimport Client from '_c... | javascript | chosen |
[
{
"from": "system",
"value": "fix(shape): Simplify logic where calculates coordinates\n"
},
{
"from": "human",
"value": "import Shape from 'kittik-shape-basic';\n\n/**\n * Implements rectangle shape with text support.\n *\n * @since 1.0.0\n * @version 1.0.0\n */\nexport default class Rectangle e... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor of bard identifier names\n"
},
{
"from": "human",
"value": "export const GAMES = {\n 'board1': {\n 'words': ['one', 'two', 'three'],\n 'board': [\n ['o', 'n', 'e', '-', '-', '-'],\n ['t', 'w', 'o', '-', '-', '-'],\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add reporter and notifications setup\n"
},
{
"from": "human",
"value": "const Report = require('./Report');\nconst Hipchat = require('./Hipchat');\n\nfunction Reporter( request, reply ) {\n console.log(request.query);\n return reply({});\n}\n\nmodule.exports = Rep... | javascript | chosen |
[
{
"from": "system",
"value": "Use simple array for added index in MemoryStore\n"
},
{
"from": "human",
"value": "var SortedArray = require('sorted-array')\n\nvar compareTime = require('./compare-time')\n\nfunction compareCreated (a, b) {\n return compareTime(b[1].created, a[1].created)\n}\n\nfu... | javascript | chosen |
[
{
"from": "system",
"value": "Update to new v1 endpoint\n\nWe're moving to a versioned API endpoint. Thanks!"
},
{
"from": "human",
"value": "'use strict';\n\nvar request = require('request');\nvar symbols = require('log-symbols');\n\nmodule.exports = function(domain, callback){\n var path = 'h... | javascript | chosen |
[
{
"from": "system",
"value": "Add the ability for the port to be set by environment variables\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst express = require('express');\nconst app = express();\nconst bodyParser = require('body-parser');\nconst morgan = require('morgan'... | javascript | chosen |
[
{
"from": "system",
"value": "Add include to be ignored\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: 'stylelint-config-standard',\n plugins: ['stylelint-order', 'stylelint-scss'],\n rules: {\n 'at-rule-empty-line-before': [\n 'always',\n {\n except: ['i... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce redundancy with opts object\n"
},
{
"from": "human",
"value": "var fs = require('fs');\n\nvar Jafar = function(opts) {\n var that = this;\n\n if (!opts.json || (typeof(opts.json) !== 'object' && typeof(opts.json) !== 'string')) {\n throw new Erro... | javascript | chosen |
[
{
"from": "system",
"value": "Check if `stream` is a function\n"
},
{
"from": "human",
"value": "'use strict';\nvar isStream = require('is-stream');\nvar matchCondition = require('match-condition');\nvar peekStream = require('peek-stream');\nvar through = require('through2');\n\nmodule.exports =... | javascript | chosen |
[
{
"from": "system",
"value": "Add inline annotation to config\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular\n .module('weatherApp', ['ngRoute'])\n .config(config);\n\n function config($routeProvider) {\n $routeProvider\n .wh... | javascript | chosen |
[
{
"from": "system",
"value": "Fix example to use the right module name\n"
},
{
"from": "human",
"value": "var zmqbus = require('../lib/index.js');\r\n\r\n/* simple quote sender/reader.\r\n Run multiple processes to send/receive cluster-wide.\r\n*/\r\n\r\nvar node = zmqbus.createNode();\r\nnode... | javascript | chosen |
[
{
"from": "system",
"value": "Add npm modules and set up middleware\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst express = require('express');\n\n// Constants\nconst PORT = 8080;\n\n// App\nconst app = express();\napp.get('/', function (req, res) {\n res.send('Hello world\\n');\n})... | javascript | chosen |
[
{
"from": "system",
"value": "Change default action of path '/', send index.html file.\n"
},
{
"from": "human",
"value": "module.exports = function(server) {\n // Install a `/` route that returns server status\n var router = server.loopback.Router();\n router.get('/', server.loopback.status()... | javascript | chosen |
[
{
"from": "system",
"value": "Add parameters to /signin (POST) request header\n"
},
{
"from": "human",
"value": "function proceedSignin() {\n 'use strict';\n\n event.preventDefault();\n\n var emailField = document.getElementById('email'),\n passwordField = document.getElementById... | javascript | chosen |
[
{
"from": "system",
"value": "Fix VNC console connection to Windows VMs and Ctrl-Alt-Del button\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1464152\n"
},
{
"from": "human",
"value": "//= require jquery\n//= require novnc-rails\n//= require_tree ../locale\n//= require gettext/all\n\n$(function... | javascript | chosen |
[
{
"from": "system",
"value": "Use variables instead of params\n"
},
{
"from": "human",
"value": "<openfisca>\n\t<p>la variable\n\t<input required type=\"text\" name=\"query\" placeholder=\"al.R1.taux1\" value={ opts.value } onchange={ getDescription }>\n\tdans Openfisca ({ description })</p>\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make event sorting stable and deterministic\n"
},
{
"from": "human",
"value": "import moment from 'moment-timezone';\nimport { Frontpage } from 'app/actions/ActionTypes';\nimport { fetching } from 'app/utils/createEntityReducer';\nimport { sortBy } from 'lodash';\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Change Notification API when extension updated\n"
},
{
"from": "human",
"value": "const updateNotification = () => {\n document.addEventListener('DOMContentLoaded', () => {\n if (Notification.permission !== 'granted') {\n Notification.requestPer... | javascript | chosen |
[
{
"from": "system",
"value": "Bring back the IO polyfill.\n"
},
{
"from": "human",
"value": "import { anchorate } from \"anchorate\";\n\nconst subRoutes = [\"/\", \"/team\", \"/work\", \"/contact\"];\n\nconst isHomeRoute = route => subRoutes.indexOf(route) !== -1;\n\nexports.onRouteUpdate = prop... | javascript | chosen |
[
{
"from": "system",
"value": "Add reformatted (EN) verse references to dump\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar readline = require('readline');\nvar bcv_parser = require('bible-passage-reference-parser/js/tr_bcv_parser').bcv_parser;\nvar bcv = new bcv_parser();\n\nbcv.s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix on List View issues\n"
},
{
"from": "human",
"value": "import {ToolViewport} from '../Tools';\nimport styled from 'styled-components';\nexport default styled(ToolViewport)`\n background-color: none;\n padding: 0 10px 0 50px;\n position: relative;\n\n &::befo... | javascript | chosen |
[
{
"from": "system",
"value": "Check for identifier in BlockAdBlock source before deleteing\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name blockblockadblock\n// @namespace Mechazawa\n// @include https://blockadblock.com/*\n// @version 1\n// @grant none\n// @... | javascript | chosen |
[
{
"from": "system",
"value": "Set Autoprefixer's targets to 'last 1 version\n"
},
{
"from": "human",
"value": "const postcssImport = require('postcss-import');\nconst nesting = require('postcss-nesting');\nconst autoprefixer = require('autoprefixer');\nconst csswring = require('csswring');\n\nmo... | javascript | chosen |
[
{
"from": "system",
"value": "Stop executing when minify throws\n\nFixes #16\n"
},
{
"from": "human",
"value": "/*\n * grunt-contrib-htmlmin\n * http://gruntjs.com/\n *\n * Copyright (c) 2012 Sindre Sorhus, contributors\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove .only from test case\n"
},
{
"from": "human",
"value": "var should = require('should');\n\nvar QueryCompiler = require('../lib/compiler');\ndescribe('QueryCompiler', function () {\n describe.only('compile', function () {\n it('compile ne null query', func... | javascript | chosen |
[
{
"from": "system",
"value": "Update test: Add decoding test\n"
},
{
"from": "human",
"value": "var polyline = require( '..' )\nvar assert = require( 'assert' )\n\nsuite( 'Google Polyline Example', function() {\n\n test( 'encode', function() {\n\n var points = [\n [ 38.5, -120.2 ],\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments and pseudocode to sort function\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n// Program that sorts a stack such that smallest items are on top\n\n// create Stack class\nfunction Stack() {\n\tthis.top = null;\n}\n\n// push value into stack\nStac... | javascript | chosen |
[
{
"from": "system",
"value": "Add back missing comment rule\n\nPrettier doesn't enforce anything in regards to comments\n"
},
{
"from": "human",
"value": "module.exports = {\n\tplugins: [\n\t\t\"filenames\",\n\t\t\"prettier\"\n\t],\n\trules: {\n\t\t// ERRORS\n\n\t\t// No more bikeshedding on sty... | javascript | chosen |
[
{
"from": "system",
"value": "Change http back to https\n"
},
{
"from": "human",
"value": "var server = io.connect('http://'+window.location.host);\n$('#name').on('submit', function(e){\n e.preventDefault();\n $(this).hide();\n $('#chat_form').show();\n var name = $('#name_input').val()\n s... | javascript | chosen |
[
{
"from": "system",
"value": "Use ES6 spread forf rest of the props\n\nIn reference to #247\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport { Text, StyleSheet, Platform } from 'react-native';\nimport fonts from '../config/fonts';\nimport normalize from '../he... | javascript | chosen |
[
{
"from": "system",
"value": "Define scripts in a array instead of inline\n"
},
{
"from": "human",
"value": "angular\n .module('ngSharepoint', [])\n .run(function($sp, $spLoader) {\n if ($sp.getAutoload()) {\n if ($sp.getConnectionMode() === 'JSOM') {\n $sp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test to wait for output\n"
},
{
"from": "human",
"value": "var assert = require(\"assert\");\nvar spawn = require('child_process').spawn;\n\n\ndescribe('Start docker container', function () {\n it('should show M2 preamble', function (done) {\n // ssh l... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Disable $q unhandled rejection exceptions\"\n\nThis reverts commit abe7f7f7e646781fff0ddc242223da84e0bc38a3.\n\nUsing Promise is wrong with angular,\nwe should get all unhandled rejection errors,\nand fix them.\n"
},
{
"from": "human",
"value": "import { Ro... | javascript | chosen |
[
{
"from": "system",
"value": "Reset query parameter for page when hitting search\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n\n init () {\n this._super(...arguments);\n this.set(\"query\", this.get(\"parameters\").que... | javascript | chosen |
[
{
"from": "system",
"value": "Use proper type checking and transform function\n\nAs per Brians requests\n"
},
{
"from": "human",
"value": "var es = require(\"../es\");\n\nfunction Negate(transform, node) {\n var expr = transform(node.expr);\n if (typeof node.expr.data === \"number\") {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Edit task gulp.build: typescript build\n"
},
{
"from": "human",
"value": "'use strict'\nvar gulp = require('gulp');\nvar tsc = require('gulp-typescript');\n\ngulp.task('copy', function () {\n\n gulp.src('src/html/**')\n .pipe(gulp.dest('dest/html'));\n});\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix gulp-istanbul 0.5.0 doesn't generate lcov file.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar $ = require('gulp-load-plugins')();\nvar rirmaf = require('rimraf');\n\nvar lib = 'lib/**/*.js';\n\ngulp.task('coverage', functio... | javascript | chosen |
[
{
"from": "system",
"value": "Improve build task to run test before\n"
},
{
"from": "human",
"value": "///\nvar pkg = require(\"./package.json\")\n , gulp = require(\"gulp\")\n , plumber = require(\"gulp-plumber\")\n\n///\n// Lint JS\n///\nvar jshint = require(\"gulp-jshint\")\n , jsonFiles =... | javascript | chosen |
[
{
"from": "system",
"value": "Add \"lib\" to typescript defs\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar gulpTypescript = require('gulp-typescript');\nvar typescript = require('typescript');\nvar header = require('gulp-header');\nvar merge = require('merge2');\nvar pkg = ... | javascript | chosen |
[
{
"from": "system",
"value": "Make it easier to change the output module format\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\n//var browserify = require('browserify');\nvar webpack = require('webpack');\nvar source = require('vinyl-source-stream');\nvar buffer = require('vinyl-... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mocha implementation in test 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'],... | javascript | chosen |
[
{
"from": "system",
"value": "Fix nodemailer relying on unavailable secrets\n\n"
},
{
"from": "human",
"value": "const randexp = require('randexp');\nconst promisify = require(\"es6-promisify\");\nconst nodemailer = require('nodemailer');\n\nmodule.exports = function(app) {\n\n\tclass MailServic... | javascript | chosen |
[
{
"from": "system",
"value": "refactor: Rewrite pickDownloads as Ramda function\n"
},
{
"from": "human",
"value": "import R from 'ramda';\nimport { NpmConfig, httpsGetPromise } from './helpers';\n\nconst addVersionProp = (val, key, obj) => obj[key] = { 'version': removeCaret(val) };\nconst remov... | javascript | chosen |
[
{
"from": "system",
"value": "Copy over a promise version of spawn and delay\n"
},
{
"from": "human",
"value": "import {Observable} from 'rx';\n\nexport function asyncMap(array, selector, maxConcurrency=4) {\n return Observable.from(array)\n .map((k) =>\n Observable.defer(() =>\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix buildXML() call for extension w/o update_url\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar path = require('path');\n\n/**\n * Initializes the crx autoupdate grunt helper\n *\n * @param {grunt} grunt\n * @returns {{buildXML: Function, build: Function}... | javascript | chosen |
[
{
"from": "system",
"value": "Check if correct settings are available\n"
},
{
"from": "human",
"value": "var apiKey = Meteor.settings.public.streamApiKey,\n apiAppId = Meteor.settings.public.streamApiAppId;\n\nvar settings = _.clone(Config);\n\nsettings['apiKey'] = apiKey;\nsettings['apiAppId... | javascript | chosen |
[
{
"from": "system",
"value": "Add forgotten dot in addDays JSDoc block\n"
},
{
"from": "human",
"value": "var parse = require('./parse')\n\n/**\n * @category Day Helpers\n * @summary Get the day of the month\n *\n * Add the specified number of days to the given date.\n *\n * @param {Date|String|... | javascript | chosen |
[
{
"from": "system",
"value": "Add response to sensor stream API handler\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\nvar sqlite3 = require('sqlite3').verbose();\nvar db = new sqlite3.Database('/home/pi/homeauto/backend/temp.db');\n\n/* G... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for '| cmd' as log name for piping\n\nCreate a child process as described by the log parameter following the\nleading '|' and write all log events to that process's stdin stream.\n\nThe command name supports %p and %w replacement for per-worker logging.\n\nIf per-wo... | javascript | chosen |
[
{
"from": "system",
"value": "Use only fixtures we need\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst expect = require('chai').expect;\nconst findAssets = require('../src/config/findAssets');\nconst mockFs = require('mock-fs');\nconst dependencies = require('./fixtures/... | javascript | chosen |
[
{
"from": "system",
"value": "Add assertions for error logging\n"
},
{
"from": "human",
"value": "(function () {\n\n 'use strict';\n\n var reverseUrl, $route;\n var routeMock = {};\n\n routeMock.routes = {\n '/testRoute1/': {\n controller: 'TestController1',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace noop w/ t.pass to assert call\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst test = require('tape')\nconst proxyquire = require('proxyquire')\n\ntest('fetch', function (t) {\n t.plan(3)\n\n const fetch = proxyquire('./fetch', {\n 'simple-get':... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor root route test for readability.\n"
},
{
"from": "human",
"value": "import co from 'co';\nimport test from 'blue-tape';\nimport agent from 'promisify-supertest';\n\nimport createApplication from '../src';\n\nconst setup = () => {\n return agent(createAppli... | javascript | chosen |
[
{
"from": "system",
"value": "Add test specs for interpolations.\n"
},
{
"from": "human",
"value": "const \n\tr = require('../'),\n\texpect = require('chai').expect;\n\ndescribe('RemoveTabs', function(){\n\tit('should have not tabs.', function(){\n\t\tvar tests = [\nr`\t\t\tremove\n\t\t\ttabs`,\... | javascript | chosen |
[
{
"from": "system",
"value": "Send source information on virtual account opening\n"
},
{
"from": "human",
"value": "var VirtualAccOpeningData = (function(){\n \"use strict\";\n\n function getDetails(password, residence, verificationCode){\n var req = {\n new_accou... | javascript | chosen |
[
{
"from": "system",
"value": "Fix PropValidator test to work with Vue in production mode\n\nPropValidator are only used in dev mode so the test should be ignored\nwhen running Vue in production mode.\n"
},
{
"from": "human",
"value": "import {expect} from 'chai'\nimport chai from 'chai'\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix usedNumber bring resetted back to empty\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar fs = require('fs')\nvar max = process.argv[2]\n\nplayGame()\n\nfunction playGame() {\n var usedNumbers = []\n var number = getRandomNumber(max)\n\n while (!i... | javascript | chosen |
[
{
"from": "system",
"value": "Fix breaking unit tests due to missing mock of scrollIntoView function\n\n\nFormer-commit-id: fe6fd28df36626f4bb8efab9ba4a8c6c42cb2f5e\nFormer-commit-id: ddf9c74bc8fa09ec14d3ec518ac7da745cfe3731\nFormer-commit-id: d14b02918458ccf1d54bb4bcf50faa0b4d487eef"
},
{
"from": "... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test for travis execution context\n"
},
{
"from": "human",
"value": "/*eslint-env mocha */\n'use strict';\n\nconst assert = require('assert');\nconst icli = require('../../packages/cli/src/bin/myrmex');\nconst showStdout = !!process.env.MYRMEX_SHOW_STDOUT;\n\nde... | javascript | chosen |
[
{
"from": "system",
"value": "Update default background color & formatting updates\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes, View, Image } from 'react-native';\nimport Icon from './Icon';\nimport { ICON_NAME } from './config';\n\nexport default class Avatar extends... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic test coverage of toArrayBuffer function\n"
},
{
"from": "human",
"value": "/* vim: ts=4:sw=4\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * th... | javascript | chosen |
[
{
"from": "system",
"value": "Add implement CanvasDrawer witch draw player and disc\n"
},
{
"from": "human",
"value": "var CanvasDrawer = (function () {\n var CanvasDrawer = function (params) {\n\n };\n\n CanvasDrawer.prototype = {\n drawPlayer: {\n value: function (pl... | javascript | chosen |
[
{
"from": "system",
"value": "Include defaultValue in getPageStartTime function.\n\nChange-Id: Ib25db9f76263ffcb907f1c04edb90e1c2c65e4cf\n"
},
{
"from": "human",
"value": "const {hasAdRequestPath, isImplTag} = require('./resource-classification');\nconst {URL} = require('url');\n\n/**\n * Return... | javascript | chosen |
[
{
"from": "system",
"value": "Fix @typedef name to be dot-separated.\n"
},
{
"from": "human",
"value": "steal('can/util', function (can) {\n\t/**\n\t * @typedef {{bind:function():*,unbind:function():*}} can/util/bind\n\t *\n\t * Provides mixin-able bind and unbind methods. `bind()` calls `this._... | javascript | chosen |
[
{
"from": "system",
"value": "Fix crash on unknown light name\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst _ = require('lodash');\nconst log = require('./log');\n\nlet nameToId = {};\n\nlet mapper = {\n /**\n * Add light name to identifier mapping.\n *\n * @param {string} i... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust API to be more \"React-like\"\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n\n// Ref: http://docopt.org/\n\n/*\n\nChain commands\nPositional arguments\nNamed arguments\nRequired arguments\nLimit arguments options\nSet option type (e.g. string, numb... | javascript | chosen |
[
{
"from": "system",
"value": "Update coverage's minimum acceptable thresholds\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport gulp from 'gulp';\nimport babel from 'gulp-babel';\nimport istanbul from 'gulp-istanbul';\nimport mocha from 'gulp-mocha';\n\ngulp.task('pre-test', () => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the unneeded lodash require\n\n"
},
{
"from": "human",
"value": "const syrup = require('../../');\nconst _ = require('lodash');\n\nsyrup.scenario('array', `${__dirname}/test-array`);\nsyrup.scenario('object', `${__dirname}/test-object`);\nsyrup.scenario('save... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor date in Byline to use string\n"
},
{
"from": "human",
"value": "/** \n* ByLine.js\n* Description: view component that makes up a news item preview\n* Modules: React and React Native Modules\n* Dependencies: styles.js SmallText\n* Author: Tiffany Tse\n*... | javascript | chosen |
[
{
"from": "system",
"value": "Add link for domains section\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { c } from 'ttag';\nimport {\n useEventManager,\n useOrganization,\n useDomains,\n SubTitle,\n Alert,\n PrimaryButton,\n Button,\n Block,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude forms partial as well.\n"
},
{
"from": "human",
"value": "// Check SCSS for code quality\nmodule.exports = function(grunt) {\n grunt.config('scsslint', {\n allFiles: [\n 'scss/**/*.scss',\n ],\n options: {\n bund... | javascript | chosen |
[
{
"from": "system",
"value": "Change config of production server\n"
},
{
"from": "human",
"value": "require('dotenv').config();\n\nmodule.exports = {\n\n development: {\n client: 'postgresql',\n connection: {\n host : process.env.DB_HOST,\n user : process.env.DB_USER,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix initial viewMode parsing typo\n"
},
{
"from": "human",
"value": "import { history, document } from 'global';\nimport qs from 'qs';\nimport { toId } from '@storybook/router/utils';\n\nexport function pathToId(path) {\n const match = (path || '').match(/^\\/story... | javascript | chosen |
[
{
"from": "human",
"value": "Add sonar scanner client script\n"
},
{
"from": "gpt",
"value": "const {\n spawn\n} = require(\"child_process\");\n\nconst options = {\n sources: function (path) {\n return `-Dsonar.sources=\"${path}\"`;\n },\n projectName: function (name) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use containsLocation() for URL handler processing\n"
},
{
"from": "human",
"value": "// Converts a query string parameter for a line or column number\n// to a zero-based line or column number for the Atom API.\nfunction getLineColNumber (numStr) {\n const num = par... | javascript | chosen |
[
{
"from": "system",
"value": "Add a comment regarding unused action"
},
{
"from": "human",
"value": "'use strict';\n\nvar AppDispatcher = require('../dispatcher/AppDispatcher'),\n ActionTypes = require('../constants/ActionTypes'),\n RepoAPI = require('../utils/RepoAPI'),\n StarredReposB... | javascript | chosen |
[
{
"from": "system",
"value": "Use new namespaced auth API methods\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport Base from 'simple-auth/authenticators/base';\nimport ENV from 'wordset/config/environment';\n\nexport default Base.extend({\n restore: function(properties) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix invalid state error by instantiating new XHR with each request\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar events = [];\nvar requestInterval = 5000;\n\nwindow.addEventListener('click', function(e) {\n e = event || window.event;\n\n events.push(... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.