conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Move it to the right.\n"
},
{
"from": "human",
"value": "(function() {\n\n var a = ['red', 'blue', 'green', 'purple'];\n\n window.addEventListener('click', function(e) {\n e.preventDefault();\n\n document.body.className = a[Math.round(Math.random() * (a.leng... | javascript | chosen |
[
{
"from": "system",
"value": "Replace directive to flex container\n"
},
{
"from": "human",
"value": "import template from './poll.template.html!text'\nimport controller from './pollController'\nimport './poll.css!'\n\nexport default class pollsListDirective {\n constructor() {\n this.restric... | javascript | chosen |
[
{
"from": "system",
"value": "Support editable packages with Pipfile.\nRemove editableFlag from .serverless/requirements.txt when using Pipfile.\n"
},
{
"from": "human",
"value": "const fse = require('fs-extra');\nconst path = require('path');\nconst { spawnSync } = require('child_process');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Set hardcoded data to search action handler to find specific problem from store and log name to console\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n model: function() {\n return this.store.findAll('proble... | javascript | chosen |
[
{
"from": "system",
"value": "Hide source input from create dialog\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { injectIntl } from 'react-intl';\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@... | javascript | chosen |
[
{
"from": "system",
"value": "Update test case to include getAllEvents function\n"
},
{
"from": "human",
"value": "describe('teamform-app module', function() {\n\n beforeEach(module('teamform-app'));\n\n var $controller;\n\n beforeAll(function() {\n window.onbeforeunload = () => 'Oh no!';\... | javascript | chosen |
[
{
"from": "system",
"value": "Set Crafty.tiled as default export\n"
},
{
"from": "human",
"value": "/* @flow */\n/* global Crafty */\nimport Loader from './loader';\nimport Renderer from './renderer';\n\nCrafty.tiled = {\n fetch() {},\n render(url: string): Promise<void> {\n const loader = ... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up and fix validation behaviour\n\nRewrite validation\r\nClean up deprecated code"
},
{
"from": "human",
"value": "//Dependencies.\nlet {isEmpty, isFunction} = require('lodash/lang');\nlet assign = require('object-assign');\n\n/**\n* Validate each field of the... | javascript | chosen |
[
{
"from": "system",
"value": "Fix indentation of main convert function\n"
},
{
"from": "human",
"value": "Emoji = {};\n\nEmoji.baseImagePath = '/packages/davidfrancisco_twemoji/img/';\n\nEmoji.convert = function (str) {\n if (typeof str !== 'string') {\n return '';\n }\n\n return... | javascript | chosen |
[
{
"from": "system",
"value": "Add simple server for deployment\n"
},
{
"from": "human",
"value": "//express server here"
},
{
"from": "gpt",
"value": "//express server here\n\nvar express = require('express');\nvar app = express();\n\napp.get('/', function (req, res) {\n res.send('H... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak irc mock to create a new spy per instance of an irc client\n"
},
{
"from": "human",
"value": "/*\n * Mock replacement for 'irc'.\n */\n\"use strict\";\nvar generatedClients = {};\n\nfunction Client(addr, nick, opts) {\n generatedClients[addr+nick] = this;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix desktop notifications when changing wallpaper is invoked\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n/* jshint node: true */\n\n'use strict';\n\nvar timer, pattern, interval;\nvar rotate = require('./rotate-wallpaper');\n\nprocess.on('message', fun... | javascript | chosen |
[
{
"from": "system",
"value": "Handle amount not already being a number\n"
},
{
"from": "human",
"value": "function play(type) {\n var sounds = {\n 'yes' : 'Pop',\n 'no' : 'Basso',\n 'maybe' : 'Bottle',\n };\n if (window.fluid) {\n window.fluid.playSound(sounds[type]);\n }\n}\n\n$... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the response dest from `msg.from` User to `msg.chat` Chat.\n"
},
{
"from": "human",
"value": "const TelegramBot = require( 'node-telegram-bot-api' );\nconst CONFIG = require( './src/config' );\nconst message = require( './src/message' );\nconst dice = require( '... | javascript | chosen |
[
{
"from": "system",
"value": "Extend middleware to accept array.\n"
},
{
"from": "human",
"value": "module.exports = function actionListenerMiddleware () {\n\n var listeners = Array.prototype.slice.call(arguments);\n\n var actionListeners = listeners.reduce((result, listener) => {\n Object.... | javascript | chosen |
[
{
"from": "system",
"value": "Change message for Error if necessary\n"
},
{
"from": "human",
"value": "function ErrorMaker(name, ParentError) {\n var NewError = function NewError(message) {\n if (!(this instanceof NewError))\n return new NewError(message)\n\n // get stack\n var er... | javascript | chosen |
[
{
"from": "system",
"value": "Use file instead of module.resource\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar chalk = require('chalk');\nvar path = require('path');\n\nfunction WebpackKarmaDieHardPlugin(options) {\n if (typeof(options) === \"undefined\") {\n options = {};\n }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use image instead of thumbnail\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { browserHistory } from 'react-router'\n\nexport default class extends Component {\n render() {\n const {album, albumNum, index, imageHeight} = thi... | javascript | chosen |
[
{
"from": "system",
"value": "Add Log to debug error\n"
},
{
"from": "human",
"value": "/**\n * @file This is a tweetable quotes tag plugin for the Hexo static site generator.\n * @copyright Chathu Vishwajith 2015-2016\n * @author Chathu Vishwajith\n * @license MIT\n */\nconst path = require('pa... | javascript | chosen |
[
{
"from": "system",
"value": "Update Criteron to be self contained\n"
},
{
"from": "human",
"value": "import React, {PureComponent} from 'react';\nimport {Card, CardContent} from '@material-ui/core';\nimport SubjectPreference from './SubjectPreference';\nimport TimePreference from './TimePrefere... | javascript | chosen |
[
{
"from": "system",
"value": "Add app name as papertrail hostname.\n"
},
{
"from": "human",
"value": "const winston = require('winston');\nrequire('winston-papertrail').Papertrail;\nconst {PAPERTRAIL_HOST, PAPERTRAIL_PORT} = process.env;\n\nif (PAPERTRAIL_HOST && PAPERTRAIL_PORT) {\n const wins... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor code to improve bundle size\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports = trimLines\n\nvar ws = /[ \\t]*\\n+[ \\t]*/g\nvar newline = '\\n'\n\nfunction trimLines(value) {\n return String(value).replace(ws, newline)\n}\n"
},
{
"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix inaccuracy caused by imprecision\n"
},
{
"from": "human",
"value": "var EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n\nmodule.exports = fps\n\n// Try use performance.now(), otherwise try\n// +new Date.\nvar now = (\n (funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'images' object to the client.\n"
},
{
"from": "human",
"value": "var apiUrls = require('./lib/utils/apis.js');\n\nexports.createClient = function(options) {\n var options = {\n accessToken: options.accessToken,\n apiUrls: apiUrls\n };\n return {\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix variable in state change\n"
},
{
"from": "human",
"value": "angular.module('billett.admin').controller('AdminPaymentgroupNewController', function ($state, $stateParams, $location, AdminEventgroup, AdminPaymentgroup, Page) {\n var ctrl = this;\n\n console.l... | javascript | chosen |
[
{
"from": "system",
"value": "Add react version of 16.0 in base eslint config so we don't get a warning on the repos using the config about not specifying the react version, hopefully eslint-plugin-react will allow us to specify the 'latest' here soon\n"
},
{
"from": "human",
"value": "var rules... | javascript | chosen |
[
{
"from": "system",
"value": "Allow opting-out of FullCalendar Scheduler.\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-fullcalendar',\n\n included: function(app) {\n\n app.import(app.bowerDirectory + '/fullcalendar/dist/fullc... | javascript | chosen |
[
{
"from": "system",
"value": "Return error if no items could be fetched\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar cheerio = require('cheerio');\nvar got = require('got');\n\n/**\n * w3counter API\n *\n * @param {String} type\n * @param {Function} cb\n * @api public\n */\n\nmodule.e... | javascript | chosen |
[
{
"from": "system",
"value": "Add output file path to final log\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs');\nvar split = require('split');\nvar argv = require('minimist')(process.argv.slice(2));\n\nif (!argv.hasOwnProperty('input')) {\n console.log('Usage: node... | javascript | chosen |
[
{
"from": "system",
"value": "Use `'html'` as output format\n\nPer jstransformers/jstransformer#3.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar swig = require('swig');\n\nexports.name = 'swig';\nexports.outputFormat = 'xml';\nexports.render = function (str, options) {\n var template ... | javascript | chosen |
[
{
"from": "system",
"value": "Add possibility to open comment form by clicking anywhere in the diff line\n"
},
{
"from": "human",
"value": "angular.module('codebrag.commits.comments')\n\n .directive('commentable', function($compile, events) {\n var template = $('#inlineCommentForm').ht... | javascript | chosen |
[
{
"from": "system",
"value": "[master] Add a grunt dev task for css only, without js\n"
},
{
"from": "human",
"value": "'use strict()';\n\nvar config= {\n port: 3000\n};\n\nmodule.exports = function(grunt) {\n\n // Load grunt tasks automatically\n require('load-grunt-tasks')(grunt);\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add newline at the end of file\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n less: {\n production: {\n options: {\n compress: true,\n yuicompress: true,\n cleancss: true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Split copy tasks to fix the failing test\n\nSplitting the build:copy tasks into two smaller tasks, one to copy the\nscss and one to copy components ensures that the files to be copied to\nthe public and fractal directories are available when the tests run.\n"
},
{
"from... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typos in Hungarian translation\n\nSome words in the translation were mistyped like \"vasámap\" which should be \"vasárnap\" (means Sunday)."
},
{
"from": "human",
"value": "// Hungarian\n\njQuery.extend( jQuery.fn.pickadate.defaults, {\n monthsFull: [ 'január... | javascript | chosen |
[
{
"from": "system",
"value": "Set grunt task \"compass\" as the default task"
},
{
"from": "human",
"value": "/*jshint strict:true, browser:true, jquery:true, devel:true, curly:true, eqeqeq:true, immed:true, latedef:true, plusplus:true, undef:true, unused:true, laxbreak:true, nonew:false */\n/*g... | javascript | chosen |
[
{
"from": "system",
"value": "Update gruntfile tasks for changes to source.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n 'use strict';\n\n var host = grunt.option('host') || 'localhost';\n\n grunt.loadNpmTasks('grunt-contrib');\n grunt.loadNpmTasks('grunt-karma')... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the issue that volume page breaks\n"
},
{
"from": "human",
"value": "import Mixin from '@ember/object/mixin';\nimport { get, set, computed } from '@ember/object';\n\nexport default Mixin.create({\n\n // Inputs from component caller\n volume: null,\n edit... | javascript | chosen |
[
{
"from": "system",
"value": "Update to depend on kadira:router-ssr\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'kadira:react-layout',\n summary: 'Layout Manager for React with SSR Support',\n version: '1.1.0',\n git: 'https://github.com/kadirahq/meteor-react-layout.git'\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lame mistake to export ReactLayout\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'kadira:react-layout',\n summary: 'Layout Manager for React with SSR Support',\n version: '1.0.0',\n git: 'https://github.com/kadirahq/meteor-react-layout.git'\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded parm and test\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: 'Meteor package to wrap TopoJSON: An extension to GeoJSON that encodes topology'\n});\n\nPackage.on_use(function(api, where) {\n if (api.export) {\n api.export('topoj... | javascript | chosen |
[
{
"from": "system",
"value": "Fix arango keys in PUT bodies\n"
},
{
"from": "human",
"value": "const config = require('../config');\nconst db = require('../db');\nconst aql = require('arangojs').aql;\n\nconst collection = db.collection(config.get('arangodb:collections:putBodies:name'));\n\n// Ca... | javascript | chosen |
[
{
"from": "system",
"value": "Fix syntax error in selector\n"
},
{
"from": "human",
"value": "window.addEventListener('load', function() {\n document.querySelectorAll(\"link[rel=import][href$='.svg'\").forEach(function(link) {\n link.addEventListener('load', function() {\n var url = new... | javascript | chosen |
[
{
"from": "system",
"value": "Use a domain.Descriptor instead of one from grpclib\n"
},
{
"from": "human",
"value": "import * as actions from '../actions';\n\n\nconst proto = (state = { descriptor: null, filename: null }, action) => {\n switch (action.type) {\n case actions.PROTO.LOAD:\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused injected $interval service\n"
},
{
"from": "human",
"value": "angular.module(\"hyperContentFor\", [])\n .value(\"HYPER_CONTENT_FOR_IDS\", { })\n\n .directive(\"hyperContent\", function () {\n return {\n scope: { \"for\": \"@\" },\n\n res... | javascript | chosen |
[
{
"from": "system",
"value": "Create function to get user feed\n"
},
{
"from": "human",
"value": "({\n init: function() {\n debugger;\n this.urlChanged();\n },\n\n feedUrl: \"\",\n\n urlChanged: function() {\n chrome.storage.onChanged.addListener(function(changes, namespace) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Support input streams for service uploads\n"
},
{
"from": "human",
"value": "import Multipart from 'multi-part'\n\nexport default function toForm (fields, callback) {\n let called = false\n try {\n const form = new Multipart()\n for (const key of Object.keys... | javascript | chosen |
[
{
"from": "system",
"value": "Progressbar: Use new has/lacksClasses assertions for all class checks\n"
},
{
"from": "human",
"value": "(function( $ ) {\n\nmodule( \"progressbar: methods\" );\n\ntest( \"destroy\", function() {\n\texpect( 1 );\n\tdomEqual( \"#progressbar\", function() {\n\t\t$( \"... | javascript | chosen |
[
{
"from": "system",
"value": "Remove survey room after finishing, but wait 10secs\n"
},
{
"from": "human",
"value": "export default class {\n constructor (controller, bot) {\n this.controller = controller\n this.bot = bot\n }\n\n conductUserSurvey = async (personEmail, survey, recordAn... | javascript | chosen |
[
{
"from": "system",
"value": "Set proper file perms for newly created directories.\n"
},
{
"from": "human",
"value": "var app = require('server'),\n fs = require('fs');\n\n/**\n * Bootstrap the application - ensure that directories\n * exist, etc\n */\nfunction bootstrap() {\n try {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove commented out code block\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar dashboardApp = angular.module('dashboardApp', [\n 'dashboardControllers'\n ]\n);\n/*\n.config(['$routeProvider',\n function($routeProvider) {\n console.log(\"app config... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Fix a reference in watch\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\"use strict\"\nlet FSWatcher = require('../lib/watcher')\nlet Minimist = require('minimist')\nlet Options = Minimist(process.argv.slice(2))\nlet FS = require('fs')\ntry {\n Opti... | javascript | chosen |
[
{
"from": "system",
"value": "Add router and remove quotes\n"
},
{
"from": "human",
"value": "//= require \"./ChangeListener\"\n//= require \"./Base\"\n//= require \"./Instance\"\n//= require \"./definitions\"\n"
},
{
"from": "gpt",
"value": "//= require ./ChangeListener\n//= require... | javascript | chosen |
[
{
"from": "system",
"value": "Isolate component and add logout functionaliry\n"
},
{
"from": "human",
"value": "import React from 'react';\n// Components used\nimport { Navbar, Nav, NavItem } from 'react-bootstrap';\nimport { NavLink } from 'react-router-dom';\nimport { LinkContainer } from 'rea... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the webpack putting files into dist/ by mistake\n"
},
{
"from": "human",
"value": "require('dotenv').config();\nconst webpack = require('webpack');\n// I don't really like doing it this way but it works for a limited number\n// of configuration options.\nconst s... | javascript | chosen |
[
{
"from": "system",
"value": "Test script is now more testable\n"
},
{
"from": "human",
"value": "(function(d){\n\n d([], function(){\n return {\n script: 'script.js',\n identity: function(x) { return x; }\n };\n });\n\n})( define || function(){} );\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Add authentication tests for all endpoints\n"
},
{
"from": "human",
"value": "var request = require('supertest');\nvar should = require('should');\nvar Account = require('../app/data/AccountModel');\nvar appUnderTest = require('../server');\n\ndescribe('Authenticati... | javascript | chosen |
[
{
"from": "system",
"value": "Use the styles alias for CSS files\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport React from 'react/addons';\n\nconst ReactTransitionGroup = React.addons.TransitionGroup;\n\n// CSS\nrequire('../../styles/normalize.css');\nrequire('../../styles/main.css')... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused `ADMIN_REFRESH_TIMEOUT' JS variable\n"
},
{
"from": "human",
"value": "\n/* Admin */\n\nvar ADMIN_PANES = {},\n ADMIN_FIELD_TIMEOUT = null,\n ADMIN_REFRESH_TIMEOUT = null;\n"
},
{
"from": "gpt",
"value": "\n/* Admin */\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change User ID to use the JSON (hex) representation throughout the site\n"
},
{
"from": "human",
"value": "var wompt = require(\"./includes\");\n\nfunction MetaUser(doc){\n\tvar me = this;\n\tthis.clients = new wompt.ClientPool();\n\tthis.doc = doc;\n\tthis.visible ... | javascript | chosen |
[
{
"from": "system",
"value": "Add descriptions to GremlinScript tests\n"
},
{
"from": "human",
"value": "var GremlinScript = require('../src/gremlinscript');\n\ndescribe('GremlinScript', function() {\n it('should append script', function() {\n var gremlin = new GremlinScript();\n gremlin.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove url & http modules\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar fs = require('fs'),\n url = require('url'),\n http = require('http'),\n prompt = require('prompt'),\n pecanApp = require('commander'),\n peca... | javascript | chosen |
[
{
"from": "system",
"value": "Hide enable link when dtenable is set\n"
},
{
"from": "human",
"value": "/* eslint-disable no-console */\n// <nowiki>\n(function() {\n\n\tvar updateLinks = function() {\n\t\t$('a').each(function(i, e) {\n\t\t\tvar shorthref = e.getAttribute('href') || '';\n\t\t\tif ... | javascript | chosen |
[
{
"from": "system",
"value": "feat(no-unused-vars): Allow unused arguments prefixed with _\n"
},
{
"from": "human",
"value": "module.exports = {\n rules: {\n 'quote-props': [2, 'as-needed', {keywords: true}],\n 'array-bracket-spacing': [2, 'never'],\n 'vars-on-top': 0,\n 'no-param-r... | javascript | chosen |
[
{
"from": "system",
"value": "Set window.location.href so that it is picked up on componentDidMount.\n"
},
{
"from": "human",
"value": "'use strict';\n\njest.autoMockOff();\njest.mock('jquery');\n\n// Fixes https://github.com/facebook/jest/issues/78\njest.dontMock('react');\njest.dontMock('under... | javascript | chosen |
[
{
"from": "system",
"value": "Add route and use new filter middlewares\n"
},
{
"from": "human",
"value": "/**\n * @file routes.js\n */\nconst express = require('express'),\n storage = require('node-persist')\n\nconst categorize = require('./middlewares').categorize,\n validateGroup = require(... | javascript | chosen |
[
{
"from": "system",
"value": "Add animation to toggle presentation video block\n"
},
{
"from": "human",
"value": "(function(){\n generateHTML();\n\n $(document).ready(function(){\n $('a.node.expanded').each(expandListToggle);\n $('.my-name').fadeIn(\"slow\");\n $('.headlogolinks a').h... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Remove dead nodes on enter not exit\n"
},
{
"from": "human",
"value": "// @flow\n\nimport * as t from '@babel/types'\n\n// Empty out bodies of falsy parts of if/else statements\n// to avoid requiring modules that aren't needed aka\n// if (process.env.NODE_ENV ... | javascript | chosen |
[
{
"from": "system",
"value": "Change redirection from change password page to login\n"
},
{
"from": "human",
"value": "/**\n * 403 Forbidden Network Error Interceptor\n *\n * This interceptor redirects to login page when\n * any 403 session expired error is returned in any of the\n * network req... | javascript | chosen |
[
{
"from": "system",
"value": "Fix maybe_sv, 0 is a valid digit\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n'use strict';\n\nvar sv2bts = require('./').sv2bts;\nvar bts2sv = require('./').bts2sv;\nvar n2sv = require('./').n2sv;\nvar sv2n = require('./').sv2n;\nvar bts2n = require('bal... | javascript | chosen |
[
{
"from": "system",
"value": "Change taxonomy table to taxonomy_vocabulary\n"
},
{
"from": "human",
"value": "\nexports.seed = function(knex, Promise) {\n // Deletes ALL existing entries\n return knex('taxonomy').del()\n .then(function () {\n // Inserts seed entries\n return knex(... | javascript | chosen |
[
{
"from": "system",
"value": "Add firstAamcMethod to sessionType model\n\nThis has been added to the frontend since the extraction happened.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport DS from 'ember-data';\n\nconst { String:EmberString, computed } = Ember;\nconst { Mod... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error handling in cli tool.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n/**\n * @license\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file exc... | javascript | chosen |
[
{
"from": "system",
"value": "Add timestamp to wikipedia queries\n"
},
{
"from": "human",
"value": "/**\n * Created by codaphillips on 4/18/15.\n */\n(function() {\n angular.module('wikiMiner.services.query_api', ['ngResource'])\n .factory('query_api', ['$resource', function($resource)... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to make more wrapper based.\n"
},
{
"from": "human",
"value": "/**\n * The basic content data type.\n */\n\nconst lodash = require('lodash')\n\n// Basic content data type.\nconst contentTemplate = {\n // If truthy there is an error.\n error: {\n // Err... | javascript | chosen |
[
{
"from": "system",
"value": "Add checks for null and streaming files\n"
},
{
"from": "human",
"value": "var es = require('event-stream');\nvar stylus = require('stylus');\nvar gutil = require('gulp-util');\nvar path = require('path');\n\nmodule.exports = function (options) {\n var opts = optio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix an eslint warning about a missing trailing comma\n"
},
{
"from": "human",
"value": "import pegjs from 'pegjs';\nimport loaderUtils from 'loader-utils';\n\nexport default function loader(source) {\n if (this.cacheable) {\n this.cacheable();\n }\n\n const qu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem with port number\n"
},
{
"from": "human",
"value": "'use strict';\nvar http = require(\"http\");\nvar port = '8089';\n\nmodule.exports = {\n start: function(bundles){\n http.createServer(function(request, response) {\n response.writeHead(200, {'... | javascript | chosen |
[
{
"from": "system",
"value": "Remove reference to validate. Added verbose flag\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst glob = require('glob-all');\nconst fs = require('fs');\nconst mime = require('mime-types');\n\n\nconst globOpts = {\n nodir: true\n};\n\n\nclass Assets {\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Add option object with width/height options\n"
},
{
"from": "human",
"value": "// Return Promise\nconst imageMerge = (sources = []) => new Promise(resolve => {\n\t// Load sources\n\tconst images = sources.map(source => new Promise(resolve => {\n\t\t// Convert string... | javascript | chosen |
[
{
"from": "system",
"value": "Implement sleep for push endpoint\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst path = require('path');\nconst config = require('./config');\nconst Koa = require('koa');\nconst Router = require('koa-router');\nconst serve = require('koa-static');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add version to api url\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst shows = require('./routes/shows');\n\nconst app = express();\n\napp.get('/shows', shows.findAll);\napp.get('/shows/:channelId', shows.findByChannel);\n\napp.listen(4... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error when applying `post` with null receiver\n"
},
{
"from": "human",
"value": "/**\n * @file routes.js\n * @author vitor cortez\n */\n\nvar express = require('express'),\n\tstorage = require('node-persist');\n\nvar categorize = require('./middlewares').categ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove obsolete meta and timestamp field\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst Store = require('orbit-db-store')\nconst CounterIndex = require('./CounterIndex')\n\nclass CounterStore extends Store {\n constructor(ipfs, id, dbname, options = {}) {... | javascript | chosen |
[
{
"from": "system",
"value": "Use const/let instead of var\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar peg = require('pegjs');\n\nclass PegJsPlugin {\n\n constructor(config) {\n this.config = config.plugins.pegjs;\n // The output of the below peg.generate() function must be a ... | javascript | chosen |
[
{
"from": "system",
"value": "Correct a mistake from 1ae32f5\n"
},
{
"from": "human",
"value": "var jsdom = require(\"jsdom\");\n\nfunction assign (destination, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n destination[key] = source[key];\n }\n }\n\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix returning pointer to factory class\n"
},
{
"from": "human",
"value": "var StorageFactory = require('./lib/StorageFactory');\n\nmodule.exports = new StorageFactory();\nmodule.exports.Factory = new StorageFactory();\n"
},
{
"from": "gpt",
"value": "var... | javascript | chosen |
[
{
"from": "system",
"value": "Add externalUrl to all resources\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-respond',\n contentFor: function(type, config) {\n if (type === 'head-footer') {\n var output = '<script s... | javascript | chosen |
[
{
"from": "system",
"value": "Add trailing new line to compiled output"
},
{
"from": "human",
"value": "'use strict';\n\nvar to5 = require('6to5');\nvar anymatch = require('anymatch');\n\nfunction ES6to5Compiler(config) {\n if (!config) config = {};\n var options = config.plugins && config.plu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the checks for hooking redux devtools extension in dev mode\n\nA missing check for the presence of the redux devtools extension compose\nhook function was preventing the app from loading when the extension\nwas not installed on the browser and the app is running for the web... | javascript | chosen |
[
{
"from": "system",
"value": "Add defaultConfig for nwb 0.5.0\n"
},
{
"from": "human",
"value": "module.exports = {\n cssPreprocessors: {\n sass: {\n test: /\\.scss$/,\n loader: require.resolve('sass-loader')\n }\n }\n}\n"
},
{
"from": "gpt",
"value": "module.export... | javascript | chosen |
[
{
"from": "system",
"value": "Add a `data` Object in the definition of a Seat.\n"
},
{
"from": "human",
"value": "/* @flow */\n\n/**\n * The data binding between the state of a seat and the graphic\n * representation of a seat.\n */\nexport type SeatData = {\n id: number,\n x: number,\n y: nu... | javascript | chosen |
[
{
"from": "system",
"value": "Restructure svgo options to own variable\n"
},
{
"from": "human",
"value": "var svg = require('svgo');\nvar loaderUtils = require('loader-utils');\nvar compiler = require('vue-template-compiler');\n\nmodule.exports = function (content) {\n var options = loaderUtils... | javascript | chosen |
[
{
"from": "system",
"value": "Use project for monkey patch, instead of assuming NPM structure.\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nvar VersionChecker = require('ember-cli-version-checker');\n\nmodule.exports = {\n name: 'ember-resolver',\n\n init: funct... | javascript | chosen |
[
{
"from": "system",
"value": "Fix CORS for list response\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nrequire('async-to-gen/register')\nconst restify = require('restify');\n\nvar server = restify.createServer();\n\nserver.use(restify.CORS({\n credentials: true\n}));\n\n\nserver.use(r... | javascript | chosen |
[
{
"from": "system",
"value": "Use let instead of var when checking plugins\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar rollup = require('rollup')\n\nexports.name = 'rollup'\nexports.inputFormats = ['js']\nexports.outputFormat = 'js'\n\nexports.renderFileAsync = function (filename, opt... | javascript | chosen |
[
{
"from": "system",
"value": "Support in-addon and in-engine options\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n name: require('./package').name,\n\n options: {\n autoImport: {\n webpack: {\n module: {\n rules: [\n /* fixes issue ... | javascript | chosen |
[
{
"from": "system",
"value": "Test runner infinite counter fix\n"
},
{
"from": "human",
"value": "new BrowserDb({\n db:\"saveDb\",\n collections:[\"one\", \"two\", \"three\"]\n}, function (error, browserDb) {\n\n module(\"Save\");\n\n asyncTest(\"Save an object\", 3, function () {\n brows... | javascript | chosen |
[
{
"from": "system",
"value": "Set maxAge for React library files.\n"
},
{
"from": "human",
"value": "const path = require('path');\n\n// Serves React and ReactDOM library.\n\nmodule.exports = function(app) {\n\n // TODO https://expressjs.com/en/api.html#res.sendFile\n\n app.get('/js/react/... | javascript | chosen |
[
{
"from": "system",
"value": "Fix REPL so it no longer removes read chars from user input\n\n* Node's REPL no longer sends the prompt and newline.\n* Thanks, Chris!"
},
{
"from": "human",
"value": "var repl = require(\"repl\");\nvar littleLisp = require(\"./littlelisp\").littleLisp;\n\nrepl.star... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.