conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Fix REPL script require path\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar repl = require('repl');\nvar program = require('commander');\nvar defaults = require('./defaults.js');\nvar protocol = require('../lib/protocol.json');\nvar Chrome = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Use gulp local for self test"
},
{
"from": "human",
"value": "var Gulp = require('gulp'),\n\n Linoleum = require('linoleum');\n\nvar $jsFiles = Linoleum.jsFiles;\nLinoleum.jsFiles = function() {\n return $jsFiles().concat('tasks/*.js', 'index.js');\n};\n\nrequir... | javascript | chosen |
[
{
"from": "system",
"value": "Make the REPL prompt fancier\n"
},
{
"from": "human",
"value": "/* jshint node:true */\n/*\n$> node example/repl.js\nS>\n\n */\n\nvar sphero = require('../lib/sphero');\nvar repl = require('repl');\n\nvar context = repl.start('S> ').context;\ncontext.dev = '/dev/cu.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix saving old version of ejs for noConflict\n\nUse root vs exports because exports is undefined.\n"
},
{
"from": "human",
"value": "(function () {\n\n var \n\n // save reference to global object\n // `window` in browser\n // `exports` on server\n root ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove log and sort imported functions\n"
},
{
"from": "human",
"value": "import { mori, datascript } from 'datascript-mori';\nimport { byTimeStamp } from '../ui-data/sort';\nconst { core } = datascript;\nconst { parse , count, reverse, take, map, nth, hashMap, sor... | javascript | chosen |
[
{
"from": "system",
"value": "Disable refresh when a refresh is already in progress\n"
},
{
"from": "human",
"value": "// Includes\nvar add = require('./add.js');\nvar get = require('./get.js');\n\n// Define\nmodule.exports = function (cache, type, index, callbacks) {\n var got = get(cache, typ... | javascript | chosen |
[
{
"from": "system",
"value": "Add lodash dependency. Still needed for _.without\n"
},
{
"from": "human",
"value": "import Observable from '../util/Observable';\n\nexport default class MetaControl extends Observable {\n\n constructor() {\n super();\n this._registry = [];\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add the check that would've saved me 30 minutes just now.\n"
},
{
"from": "human",
"value": "\nmodule.exports = chain;\n\n// steps, cb\n// Each step is either:\n// [fn, arg, arg, arg] or\n// [obj, \"method\", arg, arg, arg]\n// The eventual cb passed to chain is res... | javascript | chosen |
[
{
"from": "system",
"value": "Use this.app instead of app and set tagName to article.\n"
},
{
"from": "human",
"value": "module.exports = {\n\tevents: {\n\t\t'click button.delete': 'delete',\n\t\t'click button.edit': 'edit',\n\t},\n\t\n\tinitialize: function() {\n\t\tthis.listenTo(this.model, 's... | javascript | chosen |
[
{
"from": "system",
"value": "Disable eslint for webpack global\n"
},
{
"from": "human",
"value": "/*global __webpack_public_path__*/\n/*exported __webpack_public_path__*/\nrequire(\"match-media/matchMedia.js\");\nrequire(\"match-media/matchMedia.addListener.js\");\nrequire(\"babel-polyfill\");... | javascript | chosen |
[
{
"from": "system",
"value": ":new: Implement rule detection in getConfig\n"
},
{
"from": "human",
"value": "'use babel'\n\n/* @flow */\n\nimport Path from 'path'\nimport type {Ucompiler$Config} from '../types'\nimport {read} from './common'\nimport {CONFIG_FILE_NAME} from '../defaults'\n\nexpor... | javascript | chosen |
[
{
"from": "system",
"value": "chore(package): Remove version information from CLI\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\"use strict\";\n\nconst commander = require('commander');\nconst pkg = require('../package.json');\n\ncommander\n .version(pkg.version)\n .command('start [... | javascript | chosen |
[
{
"from": "system",
"value": "Allow 'cache-path' key to be passed to cefclient.\n"
},
{
"from": "human",
"value": "var spawn = require('child_process').spawn;\nvar path = require('path');\n\nmodule.exports = function (options) {\n options = options || {};\n options.url = options.url || 'ht... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reducer for removing category threshold\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\n\nimport {\n ADD_CATEGORY_THRESHOLD,\n REMOVE_CATEGORY_THRESHOLD,\n SET_GLOBAL_THRESHOLD,\n RESET_ADD_THRESHOLD_FORM,\n} from '../constants/ActionTypes';\n\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Update required properties for RCTCircleView\n\nOn React Native 0.19 these added properties were required."
},
{
"from": "human",
"value": "var { requireNativeComponent, PropTypes } = require('react-native');\n\nvar iface = {\n name: 'CircleView',\n propTypes:... | javascript | chosen |
[
{
"from": "system",
"value": "Add Quit button to menu\n"
},
{
"from": "human",
"value": "// Electron entrypoint\n'use strict';\nconst electron = require('electron');\nconst app = electron.app;\nconst BrowserWindow = electron.BrowserWindow;\nconst Menu = electron.Menu;\n\nlet template = [\n {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove topicId function, define at creation\n"
},
{
"from": "human",
"value": "var amqp = require('amqplib'),\n Q = require('q'),\n utils = require('../utils');\n\n\n/*\n Connect to message queue\n*/\nfunction connect(waitForConnection) {\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Switch search radius back to 150\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst boom = require('boom');\nconst express = require('express');\nconst knex = require('../knex');\nconst { camelizeKeys, decamelizeKeys } = require('humps');\nconst jwt = require... | javascript | chosen |
[
{
"from": "system",
"value": "Fix: Remove commented code form release process\n"
},
{
"from": "human",
"value": "/* global target */\n\n\"use strict\";\n\nrequire(\"shelljs/make\");\n\nfunction release(type){\n exec(\"echo Bumping up the version\");\n exec(\"npm version \" + type);\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Define a default task for gulp\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar replace = require('gulp-replace');\nvar sass = require('gulp-sass')\n\ngulp.task('sass', function(){\n return gulp.src('./src/main.scss')\n .pipe(sass({outpu... | javascript | chosen |
[
{
"from": "system",
"value": "Make the panel icon sensitive to keyboard and mouse\n"
},
{
"from": "human",
"value": "// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-\n\nconst Lang = imports.lang;\nconst St = imports.gi.St;\nconst Main = imports.ui.main;\nconst PanelMenu = imports.u... | javascript | chosen |
[
{
"from": "system",
"value": "Make settings a plugin global.\n"
},
{
"from": "human",
"value": "(function ($) {\n var defaults = {\n };\n var slides = [];\n var root, header, footer;\n var current = 0;\n var invisible = \"slides-invisible\";\n\n function initslides (element,... | javascript | chosen |
[
{
"from": "system",
"value": "Add Relay Plural Note In First Test Query\n"
},
{
"from": "human",
"value": "import Relay from 'react-relay';\nimport IndexComponent from './IndexComponent';\n\nexport default Relay.createContainer(IndexComponent, {\n fragments: {\n users: () => Relay.QL`\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add default empty title string\n"
},
{
"from": "human",
"value": "import State from \"ampersand-state\";\n\nconst StatModel = State.extend({\n\tprops: {\n\t\ttitle: {\n\t\t\ttype: \"string\"\n\t\t},\n\t\tdata: {\n\t\t\ttype: \"object\"\n\t\t},\n\t\ttall: {\n\t\t\tty... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor and improve the REPL script\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar repl = require('repl');\nvar util = require('util');\nvar program = require('commander');\nvar fs = require('fs');\nvar Chrome = require('../');\n\nprogram\n .optio... | javascript | chosen |
[
{
"from": "system",
"value": "Add OK button to the \"invalid answer\" dialog\n"
},
{
"from": "human",
"value": "(function () {\n \n this.sparks.ui = {};\n \n sparks.ui.alert = function (title, msg) {\n var e = $('<div>' + msg + '</div>').attr('title', title);\n e.dialog... | javascript | chosen |
[
{
"from": "system",
"value": "[WEB-585] Fix border style for sticky table headers\n"
},
{
"from": "human",
"value": "export default ({ borders, colors, fonts, fontSizes, shadows }) => {\n const defaultStyles = {\n color: colors.text.primary,\n fontFamily: fonts.default,\n fontSize: `${... | javascript | chosen |
[
{
"from": "system",
"value": "Set up the production environment of heap analytics instead of development\n"
},
{
"from": "human",
"value": "window.heap = window.heap || [], heap.load = function(t, e) {\n window.heap.appid = t, window.heap.config = e;\n var a = document.createElement(\"scri... | javascript | chosen |
[
{
"from": "system",
"value": "Remove cases and parties import\n"
},
{
"from": "human",
"value": "/* @flow */\n/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license ... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out french and tetum options as translations aren't there\n"
},
{
"from": "human",
"value": "export { authStrings } from './authStrings';\nexport { buttonStrings } from './buttonStrings';\nexport { modalStrings } from './modalStrings';\nexport { navStrings }... | javascript | chosen |
[
{
"from": "system",
"value": "Set server IP Address to '0.0.0.0' to work on Heroku.\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst path = require('path');\nconst chalk = require('chalk');\nconst initServer = require('./initServer');\n\nconst app = express();\nconst... | javascript | chosen |
[
{
"from": "system",
"value": "Fix up reference to moved module.\n"
},
{
"from": "human",
"value": "compiler.modulator.compiled = def(\n [\n ephox.bolt.kernel.modulator.compiled,\n compiler.tools.io\n ],\n\n function (delegate, io) {\n var create = function () {\n var instance = ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spelling in help text\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\"use strict\";\n\nvar backup = require(\"../lib/backup\");\nvar ArgumentParser = require('argparse').ArgumentParser;\nvar pkg = require('../package.json');\n\nfunction main(argv) {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Set html of the message displayed to user, instead of text.\n"
},
{
"from": "human",
"value": "$('form#submit-repo').submit(\n function(evt){\n evt.preventDefault();\n\n var status = $('#status');\n var repo = $('label[for=\"repo_name\"]').text() + $('inpu... | javascript | chosen |
[
{
"from": "human",
"value": "Add skeleton of integration script\n\nSigned-off-by: Jiří Janoušek <2a48236b6dcae98c8c0e90f4673742773ee17d91@gmail.com>\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2014 Jiří Janoušek <janousek.jiri@gmail.com>\n *\n * Redistribution and use in source and binary ... | javascript | chosen |
[
{
"from": "system",
"value": "Make collapse button respond better to repeated clicks\n"
},
{
"from": "human",
"value": "$(function () {\n $('[data-toggle=\"tooltip\"]').tooltip();\n});\n\n$(function () {\n $(\".collapse-button\").click(function () {\n $(\".collapse-button\").toggleC... | javascript | chosen |
[
{
"from": "system",
"value": "Deal with document in node\n"
},
{
"from": "human",
"value": "define([\n '../ThirdParty/Uri',\n './defaultValue',\n './defined',\n './DeveloperError'\n ], function(\n Uri,\n defaultValue,\n defined,\n Develo... | javascript | chosen |
[
{
"from": "system",
"value": "Update path to include version\n"
},
{
"from": "human",
"value": "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with t... | javascript | chosen |
[
{
"from": "system",
"value": "Improve internal flow of code / increase efficiency\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar mime = require('mime');\n\nmodule.exports = function(app, routes) {\n\t// loop through routes\n\tfor (var index in routes) {\n\t\t// route: index, fil... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a brace syntax error\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name TwitchEmote4Facebook\n// @description adds the Twitch emotes to the facebook chat\n// @homepage https://github.com/Kiniamaro/TwitchEmote4Facebook\n// @version 0.1.0\n// @include ... | javascript | chosen |
[
{
"from": "system",
"value": "Change slice test to use host object\n\nThese renditions must be able to work with host objects"
},
{
"from": "human",
"value": "/*global canCall */\n\n/*\nDescription:\nCutting edge, relies on `Array.prototype.slice`\n*/\n\n/*\nAuthor:\nDavid Mark\n*/\n\nvar toArra... | javascript | chosen |
[
{
"from": "system",
"value": "Add new files in gulp\n"
},
{
"from": "human",
"value": "const polyfill = require('babel-polyfill');\nconst gulp = require('gulp');\nconst rename = require('gulp-rename');\nconst babel = require('gulp-babel');\nconst concat = require('gulp-concat-sourcemap');\nconst... | javascript | chosen |
[
{
"from": "system",
"value": "Fix passing tasks as arguments in CLI\n"
},
{
"from": "human",
"value": "'use strict';\n\n// exit cleanly on Ctrl + C\nprocess.on('SIGINT', () => {\n process.exit(0);\n});\n\n// modules > 3rd party\nconst _ = require('lodash');\n\n// modules > gulp\nconst gulp = re... | javascript | chosen |
[
{
"from": "system",
"value": "Correct the gulp watch declaration\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst babel = require('gulp-babel');\n\nconst srcDir = './src';\nconst buildDir = './lib';\n\ngulp.task('babelify', () => {\n return gulp.src(`${srcDir}/**/*.js`)\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use systemConfig to set jquery meta\n\nThis updates the `system-config` dep to use the new systemConfig feature\nof system-npm to set config, that way you don't have to specify an exact\nversion/path.\n"
},
{
"from": "human",
"value": "\"format cjs\";\n\nvar MySyste... | javascript | chosen |
[
{
"from": "system",
"value": "Fix build (travis breaks correctly \\o/)\n"
},
{
"from": "human",
"value": "var options = require(\"minimist\")(process.argv.slice(2))\n , defaults = {\n plumber : true\n }\n// set some defaults options depending on some flags\nif (options.production) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix argument in cron job\n"
},
{
"from": "human",
"value": "const CronJob = require('cron').CronJob;\nconst Database = require('./database.js');\nconst database = Object.create(Database).init();\n\nconst MillisecondsInOneDay = 24*60*60*1000;\nconst Days = 1;\n\nmodu... | javascript | chosen |
[
{
"from": "system",
"value": "Update url for accessing API\n"
},
{
"from": "human",
"value": "import * as types from './ActionTypes'\nimport axios from 'axios'\n\nexport function addPattern(name, pattern) {\n return {\n type: types.ADD_PATTERN,\n name: name,\n pattern: pattern\n }\n}\... | javascript | chosen |
[
{
"from": "system",
"value": "Change back to use hashbang so that project at least work for now.\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Start by defining the main module and adding the module dependencies.\nangular.module(ApplicationConfiguration.applicationModuleName,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set the GCM API key using an environment variable\n"
},
{
"from": "human",
"value": "var webPush = require('web-push');\n\nvar endpoint;\n\nmodule.exports = function(app, route) {\n app.post(route + 'register', function(req) {\n endpoint = req.body.endpoint;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Check warnings when compiling Elm\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar elm = require('gulp-elm');\nvar watch = require('gulp-watch');\nvar uglify = require('gulp-uglify');\nvar rename = require('gulp-rename');\n\ngulp.task('elm', fun... | javascript | chosen |
[
{
"from": "system",
"value": "Add livereload to gulp setup\n"
},
{
"from": "human",
"value": "var gulp = require('gulp')\nvar exec = require('child_process').exec\n\ngulp.task('make', function() {\n exec('make', function(err, stdout, stderr) {\n console.log(stdout);\n console.l... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for Dram remote address info\n"
},
{
"from": "human",
"value": "import { expect } from 'chai'\n\nimport DatagramPlugin from '../../src/plugin/dgram'\n\n/** @test {DatagramPlugin} */\ndescribe('DatagramPlugin', () => {\n let plugin\n\n before(() => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make once in hour as minimal interval for OpenStack backup schedule.\n"
},
{
"from": "human",
"value": "const actionFieldCrontab = {\n template: '<cron-selection ng-model=\"$ctrl.model[$ctrl.field.name]\"></cron-selection>',\n bindings: {\n model: '<',\n fie... | javascript | chosen |
[
{
"from": "system",
"value": "Fix failing tests in ember 1.10"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport config from './config/environment';\n\nvar Router = Ember.Router.extend({\n location: config.locationType\n});\n\nexport default Router.map(function() {\n this.rout... | javascript | chosen |
[
{
"from": "system",
"value": "Add AV, AV.URL() clarifying comments\n"
},
{
"from": "human",
"value": "/////////////////////////////////////////////////////////////\n// init.js: Utility functions, Root Object definition //\n// //\n// In... | javascript | chosen |
[
{
"from": "system",
"value": "Make links go to internal page\n"
},
{
"from": "human",
"value": "var maxLength = 20;\nvar pendingRequest = undefined;\n\nfunction updateResults() {\n var query = $(\"#query\").val();\n if (pendingRequest) {\n pendingRequest.abort();\n }\n pendingRequest = $.... | javascript | chosen |
[
{
"from": "system",
"value": "Clean dist dir before starting generate\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\r\n babel = require('gulp-babel'),\r\n runSequence = require('run-sequence'),\r\n rename = require('gulp-rename'),\r\n del = require('del'),\r\n exec = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Add cache-busting filename to home page bg image\n"
},
{
"from": "human",
"value": "var elixir = require('laravel-elixir');\n\n/*\n |--------------------------------------------------------------------------\n | Elixir Asset Management\n |---------------------------... | javascript | chosen |
[
{
"from": "system",
"value": "Update gulp watch to not croak on error\n"
},
{
"from": "human",
"value": "var del = require('del');\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar postcss = require('gulp-postcss')\nvar autoprefixer = require('autoprefixer-core');\nvar cssmin =... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments to gulp sass task\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar autoprefixer = require('gulp-autoprefixer');\nvar plumber = require('gulp-plumber');\n\nvar BROWSERS = [\n \"> 5%\",\n \"ie > 0\",\... | javascript | chosen |
[
{
"from": "system",
"value": "Integrate front end with deontology model.1\n"
},
{
"from": "human",
"value": "module.exports = function(question, callback) { \n\n\n\tvar apiai = require('apiai');\n\tvar app = apiai(\"76ccb7c7acea4a6884834f6687475222\", \"8b3e68f16ac6430cb8c40d49c315aa7a\");\n\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing return type to Blame.file"
},
{
"from": "human",
"value": "var NodeGit = require(\"../\");\nvar normalizeOptions = NodeGit.Utils.normalizeOptions;\nvar Blame = NodeGit.Blame;\n\nvar _file = Blame.file;\n\n/**\n * Retrieve the blame of a file\n *\n * @asy... | javascript | chosen |
[
{
"from": "system",
"value": "Add \"production\" target for gulp for production use\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n connect = require('gulp-connect'),\n proxy = require('http-proxy-middleware');\n\ngulp.task('connect', function () {\n connect.server({\n por... | javascript | chosen |
[
{
"from": "system",
"value": "Remove gulp generation of declaration files\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar tsc = require('gulp-tsc');\nvar _ = require('lodash');\nvar shell = require('gulp-shell');\n\nvar options = {\n module : 'amd',\n target ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dirty hack for keeping watch running on errors\n"
},
{
"from": "human",
"value": "var gulp = require('gulp')\nvar shell = require('./')\n\nvar paths = {\n js: ['*.js', 'test/*.js']\n}\n\ngulp.task('test', shell.task('mocha -R spec -r should'))\n\ngulp.task(... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor dynamic config using smaller function that can be intercepted by alamid-plugin\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar path = require(\"path\"),\n argv = require('minimist')(process.argv.slice(2));\n\nfunction readDynamicConfig(basePath... | javascript | chosen |
[
{
"from": "system",
"value": "Fix code for updated thunkify dep\n"
},
{
"from": "human",
"value": "var thunkify = require('thunkify');\nvar Client = require('easymongo');\n\nvar methods = [\n 'find',\n 'findOne',\n 'findById',\n 'save',\n 'update',\n 'remove',\n 'removeById',\n 'count'\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add a watch gulp function\n"
},
{
"from": "human",
"value": "const { src, dest, watch, series } = require(\"gulp\");\nconst sass = require(\"gulp-sass\");\nconst autoPrefixer = require(\"gulp-autoprefixer\");\nconst htmlmin = require(\"gulp-htmlmin\");\nconst pretti... | javascript | chosen |
[
{
"from": "system",
"value": "Add ls as an alias to the list command.\n"
},
{
"from": "human",
"value": "var abbrev = require('abbrev');\nvar mout = require('mout');\nvar commands = require('./commands');\nvar PackageRepository = require('./core/PackageRepository');\n\nvar abbreviations = abbrev... | javascript | chosen |
[
{
"from": "system",
"value": "Clean expo-cli build folder in `gulp clean`\n\nfbshipit-source-id: dc6ab70\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst gulp = require('gulp');\nconst babel = require('gulp-babel');\nconst changed = require('gulp-changed');\nconst plumber ... | javascript | chosen |
[
{
"from": "system",
"value": "[Build] Write source maps out to a separate directory\n\nRather than inlining them, write them to build/sourcemaps\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar babel = require('gulp-babel');\nvar coffee = require('gulp-coffee');\nvar sourcemap... | javascript | chosen |
[
{
"from": "system",
"value": "Add protected routes and 404 route\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Router, Route, Switch } from 'react-router-dom';\nimport { hot } from 'react-hot-loader';\nimport SignUpPage from './SignUp/SignUpPage';\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "[core] Check if @sanity/cli has dataset edit capabilities before using it\n"
},
{
"from": "human",
"value": "export default {\n name: 'visibility',\n group: 'dataset',\n signature: 'get/set [dataset] [mode]',\n description: 'Set visibility of a dataset',\n // e... | javascript | chosen |
[
{
"from": "system",
"value": "Add NamedModulesPlugin to webpack config\n"
},
{
"from": "human",
"value": "const webpack = require('webpack')\nconst path = require('path')\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');... | javascript | chosen |
[
{
"from": "system",
"value": "Add semicolon to allow concatenation \n\nThe anonymous function syntax causes errors when this file gets concatenated with other files that are stingy with their semicolons, as happens in ``tests/a1-package-stubs.js`` with other community stubs with different semicolon conventi... | javascript | chosen |
[
{
"from": "system",
"value": "Change default 'tint' to 'normal' to solve console warning\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react';\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\n\nimport Box from '../box';\nimport theme from './theme.cs... | javascript | chosen |
[
{
"from": "system",
"value": "Add default async filter in split chunks\n\nUsing all chunks was causing conflict order issues in the css extraction\n"
},
{
"from": "human",
"value": "const os = require('os');\nconst TerserPlugin = require('terser-webpack-plugin');\nconst CssMinimizerPlugin = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove hook that is obsolete with openapi validation\n\n"
},
{
"from": "human",
"value": "const { authenticate } = require('@feathersjs/authentication');\nconst { iff, keepQuery, isProvider, disallow } = require('feathers-hooks-common');\n\nconst { populateCurrentSc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for watching changes on navigation shopping cart item amount when same item is added multiple times\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('webshop')\n .component('navigation', {\n templateUrl: 'navigation/navigation.template.html... | javascript | chosen |
[
{
"from": "system",
"value": "Check the warning \"type\" correctly for SSL warnings\n\nAfter some refactoring work, the SSL warning JS code was no longer\nchecking the warning \"type\" correctly. This CL fixes that.\n\nBUG=418851\n\nReview URL: https://codereview.chromium.org/616743002\n\nCr-Commit-Position... | javascript | chosen |
[
{
"from": "system",
"value": "Update gulp watch to recurse though sub directories\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar phpunit = require('gulp-phpunit');\nvar watch = require('gulp-watch');\n\ngulp.task('phpunit', function(cb) {\n var options = {\n debug... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional test case ideas to build out later\n\nAlso, preparing to move user.Test.js up a level to flatten structure\n"
},
{
"from": "human",
"value": "var User = require('../../../api/models/User.js');\nvar Sails = require('sails').Sails;\nvar sinon = require(... | javascript | chosen |
[
{
"from": "system",
"value": "Append font stylesheet before appending element\n"
},
{
"from": "human",
"value": "var stylesheet,\n Fonts,\n Styles,\n Picker;\n\n$(function(){\n\n WFP.Stylesheet = stylesheet = new Stylesheet;\n WFP.Fonts = Fonts;\n WFP.Styles = Styles = new Styl... | javascript | chosen |
[
{
"from": "system",
"value": "Upgrade to new router syntax\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport SanityVision from './SanityVision'\nimport {createRoute} from 'part:@sanity/base/router'\n\nexport default {\n router: createRoute('/*'),\n name: 'Vision',\n icon: f... | javascript | chosen |
[
{
"from": "system",
"value": "Modify the query to search for movie theaters only\n"
},
{
"from": "human",
"value": "require('isomorphic-fetch')\nconst qs = require('querystring')\n\nlet [client_id, client_secret] = process.env.FOURSQUARE_PARAMS.split(';')\nlet params = {\n client_id,\n client_... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicate key from mandragora config\n\nLooks like this was just an accident."
},
{
"from": "human",
"value": "var mandragora = require(\"mandragora-bucket/index.js\"),\n gulp = require(\"gulp\"),\n less = require(\"gulp-less\");\n\n\nmandragora(gulp, {... | javascript | chosen |
[
{
"from": "system",
"value": "Add `lint` to `build` task\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar $ = require('gulp-load-plugins')();\nvar browserify = require('browserify');\nvar del = require('del');\nvar sourceStream = require('vinyl-source-stream')... | javascript | chosen |
[
{
"from": "system",
"value": "Remove counter data when it's removed\n"
},
{
"from": "human",
"value": "\nimport React from \"react\";\nimport {connectLean} from \"../src/lean\";\nimport {range} from \"lodash/fp\";\n\nimport Counter from \"./Counter\";\n\nvar DynamicCounters = ({counterCount, sco... | javascript | chosen |
[
{
"from": "system",
"value": "Replace the `document.body` with `this.body`\n"
},
{
"from": "human",
"value": ";(function($, win, doc, undefined) {\n 'use strict';\n\n var $win = $(win);\n var $doc = $(doc);\n\n // Enable CSS active pseudo styles in Mobile Safari\n $doc.on({\n touchstart:... | javascript | chosen |
[
{
"from": "system",
"value": "Add get short messages solution\n"
},
{
"from": "human",
"value": "function getShortMessages(messages) {\n // SOLUTION GOES HERE\n}\n\nmodule.exports = getShortMessages\n"
},
{
"from": "gpt",
"value": "function getShortMessages(messages) {\n return mes... | javascript | chosen |
[
{
"from": "system",
"value": "Rename built embed js file\n"
},
{
"from": "human",
"value": "({\n appDir: \"../\",\n baseUrl: \"js/\",\n include: \"main\",\n wrap: true,\n dir: \"../../winamp2-js-prod\",\n optimizeCss: \"standard\",\n removeCombined: true,\n modules: [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set up the variable names\n"
},
{
"from": "human",
"value": "var getMongoPodLabels = function() {\n return process.env.LL_MONGO_POD_LABELS || false;\n};\n\nvar getMongoPodLabelCollection = function() {\n var podLabels = getMongoPodLabels();\n if (!podLabels) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable source maps because of issues with Stylus.\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\nvar autoprefixer = require('autoprefixer');\n\nmodule.exports = {\n\tdevtool: 'cheap-module-source-map',\n\n\tentry:... | javascript | chosen |
[
{
"from": "system",
"value": "Rename to mqtt topic transaction to transactionValue\n"
},
{
"from": "human",
"value": "module.exports = {\n port: 8080,\n\n database: {\n type: 'SQLITE',\n options: {\n filename: 'data.sqlite'\n }\n },\n\n mqtt: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add new code for pingPongType\n"
},
{
"from": "human",
"value": "var pingPong = function(i) {\n if (isPingPong) {\n if (i % 15 === 0) {\n return \"pingpong\";\n } else if (i % 3 === 0) {\n return \"ping\";\n } else if (i % 5 === 0) {\n retur... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify by making root element initially an array\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar xmlWrite = require('./xmlWrite');\n\nvar attributePrefix = '@';\n\nfunction traverse(obj,parent) {\n\nvar result = [];\n\n\tvar array = Array.isArray(obj);\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix karma basePath option so coverage can be displayed in IntelliJ\n"
},
{
"from": "human",
"value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-file.html\n\nmodule.exports = function (confi... | javascript | chosen |
[
{
"from": "system",
"value": "Hide Households link if not authenticated\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport {\n Link\n} from 'react-router-dom'\nimport { connect } from 'react-redux'\n\nclass Nav extends Component {\n handleLogout = () => this.pr... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"support for preact 7\"\n\nThis reverts commit 3d72ee045e2d89ba591f02d08c292afcdd393989.\n"
},
{
"from": "human",
"value": "import splat from \"./splat\";\nimport formatDeclarations from \"./formatDeclarations\";\n\nexport default function createRenderer(bac... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.