conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use mongoClient for connecting to mongoDB\n"
},
{
"from": "human",
"value": "const db = require('mongoose');\nconst config = require('../config/default.js');\n\nif (process.env.NODE_ENV === 'test') {\n config.db.name = 'test_db';\n config.db.username = 'test_u... | javascript | chosen |
[
{
"from": "system",
"value": "Add dot to special chars\n\nOOP? :o\n"
},
{
"from": "human",
"value": "var allExports = {};\n\nvar defineConstant = function(name) {\n allExports[name] = name;\n};\n\ndefineConstant('BOOLEAN_PRIM');\ndefineConstant('FUNCTION_CALL');\ndefineConstant('FUNCTION_PRIM')... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor according to styles doc\n"
},
{
"from": "human",
"value": "module.exports = Select;\n\nfunction Select() {}\n\nSelect.prototype.view = __dirname + '/views';\nSelect.prototype.style = __dirname + '/styles';\nSelect.prototype.name = 'select';\nSelect.prototyp... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude ids from filter search\n"
},
{
"from": "human",
"value": "/**\n * Client class that talks to bugzilla\n */\n\nconst BZ_DOMAIN = \"https://bugzilla.mozilla.org\";\nconst REST_BUG = \"/rest/bug\";\n\nexport default {\n getBugs: function(bugIds) {\n if (!A... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor general banner function to react component\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nconst GeneralBanner = (props) => {\n const bannerClassName = `general-banner alert ${props.banner.statusColor}`\n \n return (\n <div c... | javascript | chosen |
[
{
"from": "system",
"value": "Configure client-side init to use a Redux store initialized with data arrived from the server.\n"
},
{
"from": "human",
"value": "import { Meteor } from 'meteor/meteor'\nimport { render } from 'react-dom'\n\nimport { renderRoutes } from './routes.jsx'\n\nMeteor.star... | javascript | chosen |
[
{
"from": "system",
"value": "Add body class to all html pages.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/*\n * Application .run\n * \n * On a successful state change set the root scopes title property\n * used for the html <title> tag.\n * \n * Angular .run exicuted after the .config... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reading of package versions\n"
},
{
"from": "human",
"value": "const fs = require('fs')\nconst path = require('path')\n\nconst cache = {}\n\nmodule.exports = function(packageName) {\n if (packageName in cache) {\n return cache[packageName]\n }\n\n try {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Twitter data source to factory\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst yamlConfig = require('node-yaml-config');\nconst Todoist = require(path.resolve(__dirname, 'todoist.js'));\nconst Poloniex = require(path.resolve(__dirname, 'p... | javascript | chosen |
[
{
"from": "system",
"value": "Print the dynamically modified HTML from the page\n"
},
{
"from": "human",
"value": "'use strict';\n\nrequire( '../libs/google-cloud-print' );\nvar ua = navigator.userAgent.toLowerCase(),\n isAndroid = ua.indexOf( 'android' ) > -1;\n\n/**\n * Print the current sc... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to get list of objects having only userNames\n"
},
{
"from": "human",
"value": "const sqlite3 = require('sqlite3').verbose()\nconst dbName = 'chat.sqlite'\nconst db = new sqlite3.Database(dbName)\ndb.serialize(() => {\n const sql = `\n CREATE TABLE IF... | javascript | chosen |
[
{
"from": "system",
"value": "UI: Use custom block-slots for changeableset\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { get, set } from '@ember/object';\nimport SlotsMixin from 'ember-block-slots';\nimport WithListeners from 'consul-ui/mixins/with-listen... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue fetching characters with strange characters in their names\n"
},
{
"from": "human",
"value": "import request from 'request-promise-native';\n\nconst availableRegions = [\n 'eu',\n 'us',\n 'tw',\n 'kr',\n];\n\nexport function fetchCharacter(region, real... | javascript | chosen |
[
{
"from": "system",
"value": "Change route to be /delivery-receipt\n"
},
{
"from": "human",
"value": "const express = require('express')\nconst bodyParser = require('body-parser')\n\nconst app = express()\nconst port = process.env.PORT || 5000\n\napp.use(bodyParser.json())\n\napp\n .route('/rec... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Undo Button initialize issue\n\nhttps://github.com/draft-js-plugins/draft-js-plugins/issues/718"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { EditorState } from 'draft-js';\nimport union... | javascript | chosen |
[
{
"from": "system",
"value": "Add empty lines for readability\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Fréchet distributed pseudorandom numbers.\n*\n* @module @stdlib/math/base/random/frechet\n*\n* @example\n* var frechet = require( '@stdlib/math/base/random/frechet' );\n*\n* v... | javascript | chosen |
[
{
"from": "system",
"value": "Make readonly attributes to boolean methods\n"
},
{
"from": "human",
"value": "function Entry(key, ttlInMilliSeconds, cache) {\n if (!key)\n throw new Error('invalid cache key');\n\n if (!ttlInMilliSeconds)\n throw new Error('invalid TTL');\n\n if (!cache)\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix expected quotes around 'const'\n"
},
{
"from": "human",
"value": "import {test} from '../utils'\nimport {RuleTester} from 'eslint'\nimport rule from 'rules/no-mutable-exports'\n\nconst ruleTester = new RuleTester()\n\nruleTester.run('no-mutable-exports', rule, {... | javascript | chosen |
[
{
"from": "system",
"value": "Expand Keys enum to include the escape key.\n\nKey values reference: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values\n\nRELNOTES: KeyboardEvent.key now includes escape key.\n\n-------------\nCreated by MOE: https://github.com/google/moe\nMOE_MIGRAT... | javascript | chosen |
[
{
"from": "system",
"value": "Test case to verify creation of api documentation web page\n"
},
{
"from": "human",
"value": "/////////////////////\n// gulp-node-slate //\n/////////////////////\n\n// Run:\n// $ cd gulp-node-slate\n// $ npm update\n// $ npm run mocha\n\nvar assert = requi... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite simplebar-react to work with new experimental code\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport 'simplebar';\n\nexport default function SimpleBar({ children, ...options }) {\n return (\n <div ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix observable base for objectsSet\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar setPrototypeOf = require('es5-ext/object/set-prototype-of')\n , d = require('d/d')\n , PrimitiveSet = require('observable-set/create-read-only')(\n\trequir... | javascript | chosen |
[
{
"from": "system",
"value": "Fix selector not using get\n"
},
{
"from": "human",
"value": "import { takeLatest } from 'redux-saga';\nimport { call, put, select, take } from 'redux-saga/effects';\nimport { NOT_CONNECTED, CREATING_ACCOUNT, CONNECTED_CREATING_ACCOUNT } from '../messages';\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Set default state back to null\n"
},
{
"from": "human",
"value": "const knex = require('knex');\nconst cfg = require('../config');\n\nconst db = knex(cfg.db);\n\nmodule.exports = {\n async createUser(telegramId) {\n return db('user')\n .insert({ telegram_id: ... | javascript | chosen |
[
{
"from": "system",
"value": "Set default value for `viewportConfig`.\n\nPrevents an error when `viewportConfig` is not defined in the app's\nconfig.\n"
},
{
"from": "human",
"value": "import config from '../config/environment';\n\nexport function initialize(_container, application) {\n const {... | javascript | chosen |
[
{
"from": "system",
"value": "Add null fields to action-item-distribution config for consistency\n"
},
{
"from": "human",
"value": "export default {\n \"prime-directive\": {\n alert: null,\n confirmationMessage: \"Are you sure want to proceed to the Idea Generation stage? This will commen... | javascript | chosen |
[
{
"from": "system",
"value": "Load pagedown_custom.js a bit later so it can use translations\n"
},
{
"from": "human",
"value": "// Pagedown customizations\n//= require ./pagedown_custom.js\n\n// The rest of the externals\n//= require_tree ./external\n\n//= require ./discourse/helpers/i18n_helper... | javascript | chosen |
[
{
"from": "system",
"value": "Return 'present' for future dates\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport moment from 'moment';\n\nconst dateFormat = 'MMM YYYY';\nconst calendarFormat = {\n sameDay: '[Present]',\n sameElse: dateFormat,\n};\n\nconst Re... | javascript | chosen |
[
{
"from": "system",
"value": "Add namespace for scrolling event\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n style: Ember.computed('layer.settings.values.color', function(){\n return Ember.String.htmlSafe('color: ' + (this.g... | javascript | chosen |
[
{
"from": "system",
"value": "Change argument name in Stack() to fix uglify bug.\n"
},
{
"from": "human",
"value": "var ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\n\n\nfunction guessFunctionName(url, line) {\n return UNKNOWN_FUNCTION;\n}\n\nfunction gatherC... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude the project name when requiring files\n"
},
{
"from": "human",
"value": "/* globals jQuery,QUnit */\n\njQuery(document).ready(function() {\n var TestLoader = require('ember-cli/test-loader')['default'];\n TestLoader.prototype.shouldLoadModule = function(mo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 'isPlaying' to reflect 'playing' instead of 'primary' URI\n\n## Issue\n4959: Deleting MD from downloads list causes spinning icon to run forever\n\n5077: player doesn't close when video deleted\n"
},
{
"from": "human",
"value": "import { connect } from 'react-re... | javascript | chosen |
[
{
"from": "system",
"value": "Set moment default timezone to London\n"
},
{
"from": "human",
"value": "// Custom moment-timezone data that only includes Europe/London timezone\n\nimport data from './data.json';\nimport moment from 'moment-timezone/moment-timezone';\n\nmoment.tz.load(data);\n\nex... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary browser restrictions on tests:\nRequest, Rest, and Cache\n"
},
{
"from": "human",
"value": "define([\n\t'./Store',\n\t'./Model',\n\t'./objectQueryEngine',\n\t'./Memory',\n\t// TODO: Examing the following has!host-browser checks to see if the tests... | javascript | chosen |
[
{
"from": "system",
"value": "Update rotate function with basic transformation\n"
},
{
"from": "human",
"value": "var Tetrinimo = function(args) {\n this.element = args.element;\n var shape = args.shape;\n\n this.blocks = shape.map(function(block) {\n return {x: new Number(block.x), y: new... | javascript | chosen |
[
{
"from": "system",
"value": "Update tag for search on StackOverflow\n\nSince the emberjs tag has been renamed to ember.js. A search for the \"old\" tag doesn't return any results...\n"
},
{
"from": "human",
"value": "require('dashboard/core');\n\nDashboard.DataSource = Ember.Object.extend({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Check for data; if none on hand, reroute back to home\n"
},
{
"from": "human",
"value": "'use strict';\n// update\n\nvar Backbone = require('backbone');\nvar $ = require('jquery');\nBackbone.$ = $;\n\nmodule.exports = function() {\n\tvar MapView = require('../views/... | javascript | chosen |
[
{
"from": "system",
"value": "Switch REM to MORT due to reverse split issues\n"
},
{
"from": "human",
"value": "const tickers = {\n equities: ['SPY', 'VEU', 'SHY'],\n credit: ['LQD', 'JNK', 'SHY'],\n realEstate: ['VNQ', 'REM', 'SHY'],\n econ: ['GLD', 'TLT', 'SHY'],\n all: [{ symbol: 'SPY', ... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Fix a dead lock in App.lock\n"
},
{
"from": "human",
"value": "(function(target) {\n 'use strict'\n function ajax(Url, Method, Contents) {\n return new Promise(function(resolve, reject) {\n const XHR = new XMLHttpRequest()\n XHR.open(Method, Url... | javascript | chosen |
[
{
"from": "system",
"value": "Add next/route mock to storybook\nso that elements with <Link> can be put in storybook\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { addDecorator } from '@storybook/react';\nimport { ThemeProvider } from '@material-ui/core/styles';\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "[WEB-589] Storybook: Use more granular list of devices in viewports addon\n"
},
{
"from": "human",
"value": "import './global.css';\nimport './fonts.css';\n"
},
{
"from": "gpt",
"value": "import { addParameters } from '@storybook/react';\nimport { INITIA... | javascript | chosen |
[
{
"from": "system",
"value": "Remove no-param-reassign rule from es6 rules (still disabled)\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n extends: 'ryansobol/core',\n parser: 'babel-eslint',\n\n env: {\n es6: true,\n node: true\n },\n\n ecmaFeatures: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary model biding in accounts list view.\n"
},
{
"from": "human",
"value": "module.exports = Zeppelin.View.extend({\n el: 'ol.accounts__list',\n\n name: 'AccountsList',\n\n template: require('templates/accounts-list'),\n\n bindings: {\n 'model c... | javascript | chosen |
[
{
"from": "system",
"value": "Connect to the FULLPORTFOLIODEMO Data Set\n"
},
{
"from": "human",
"value": "/*\nCopyright 2014 Weswit s.r.l.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obt... | javascript | chosen |
[
{
"from": "system",
"value": "Update team page header on load\n"
},
{
"from": "human",
"value": "function retrieveGetParameters(){\n let parameters = {}\n window.location.search\n .substring(1) //Remove '?' at beginning\n .split('&') ... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude fetch errors from tracking (based on error code).\n"
},
{
"from": "human",
"value": "/**\n * Cache data.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for clock_seq increase if the clock is set backwards\n"
},
{
"from": "human",
"value": "var uuid = require('../uuid');\n\nvar today = new Date().getTime();\nvar tenhoursago = new Date(today - 10*3600*1000).getTime();\n\nfunction compare(ids) {\n console.lo... | javascript | chosen |
[
{
"from": "system",
"value": "Convert Syslog to ES6 class.\n\nCloses #993.\n"
},
{
"from": "human",
"value": "var coalesce = require('extant')\n\nvar FACILITY = require('prolific.facility')\nvar LEVEL = require('prolific.level')\n\nfunction Processor (configuration) {\n this._application = co... | javascript | chosen |
[
{
"from": "system",
"value": "Change list collection view to <ol>\n\nMore applicable semantic meaning\n"
},
{
"from": "human",
"value": "define([\n 'marionette',\n 'app',\n 'hbs!modules/repository/list/templates/item'\n], function(Marionette, app, tmplRepositoryItem) {\n\n var Repository = a... | javascript | chosen |
[
{
"from": "system",
"value": "Add simple dim effect (opacity to 0.1) when refreshing calendar via AJAX.\n\nChange-Id: I917956f740361ce64485629a328b53505b0d01f8\n"
},
{
"from": "human",
"value": "/**\n * yiicalendar.js\n *\n * Part of YiiCalendar extension for Yii 1.x (based on ecalendarview exte... | javascript | chosen |
[
{
"from": "system",
"value": "Fix import in Github reducer\n"
},
{
"from": "human",
"value": "export const DISPLAY_REPOS = 'DISPLAY_REPOS';\n\nexport function repos(state = [], action) {\n switch (action.type) {\n case DISPLAY_REPOS:\n return action.repos;\n default:\n return st... | javascript | chosen |
[
{
"from": "system",
"value": "Add a check to see if we're using the same noun or verb, and lookup a new one if true.\n"
},
{
"from": "human",
"value": "\nvar butter = (function($){\n var verbs = null;\n var nouns = null;\n\n /**\n * SHOW ME WHAT YOU GOT\n */\n function onPurp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix unique mixin to not have a global counter.\n"
},
{
"from": "human",
"value": "// @flow\n\nimport { generateName } from './util/with-unique';\n\nexport const withUnique = (\n Base?: Class<HTMLElement> = HTMLElement\n): Class<HTMLElement> =>\n class extends Base... | javascript | chosen |
[
{
"from": "system",
"value": "Use English for UI by default\n"
},
{
"from": "human",
"value": "import React, { Component } from \"react\";\n\nimport Quiz from \"./Quiz\";\n\nimport \"./App.css\";\nimport questions from \"./questions.json\";\nimport strings from \"./strings.json\";\n\n\nclass Lan... | javascript | chosen |
[
{
"from": "system",
"value": "Rename the key for the \"Locked\" badge tooltip\n\n- Shortens the key name for consistency with `badge:` namespace.\n- Revised YAML to follow.\n"
},
{
"from": "human",
"value": "import { extend } from 'flarum/extend';\nimport Discussion from 'flarum/models/Discussio... | javascript | chosen |
[
{
"from": "system",
"value": "Use const keyword in test\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs');\n\nfunction read(filename) {\n return fs.readFileSync(filename, {'encoding': 'utf8'});\n}\n\nexports.cname = {\n 'build': function(test) {\n var actual = read(... | javascript | chosen |
[
{
"from": "system",
"value": "Remove ssl dep in tests\n"
},
{
"from": "human",
"value": "var caf_core = require('caf_core');\nvar caf_comp = caf_core.caf_components;\nvar caf_platform = caf_core.caf_platform;\n\nvar np = require('../../index.js');\n\nexports.load = function($, spec, name, modul... | javascript | chosen |
[
{
"from": "system",
"value": "Allow more time for karma as well\n"
},
{
"from": "human",
"value": "module.exports = function (config) {\n config.set({\n frameworks: ['browserify', 'mocha'],\n reporters: ['mocha'],\n preprocessors: { 'build/karma.js': ['browserify'] },\n browserify: ... | javascript | chosen |
[
{
"from": "system",
"value": "Break out in-progress data validation\n"
},
{
"from": "human",
"value": "var should = require('should');\nvar sinon = require('sinon');\n\nvar tasks = require('../tasks.js');\n\nvar fs = require('fs');\n\ndescribe('execSaveResults', function() {\n it('should fire a... | javascript | chosen |
[
{
"from": "system",
"value": "Check new-style, not old-style permission names in settings\n\nShould finally fix UIU-130.\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport React from 'react';\nimport Settings from '@folio/stripes-components/lib/Settings';\n\nimport PermissionSets... | javascript | chosen |
[
{
"from": "system",
"value": "Make it usable as a plugin or a standalone module\n"
},
{
"from": "human",
"value": "/*\n * grunt-build-info\n * https://github.com/r3b/grunt-build-info\n *\n * Copyright (c) 2014 ryan bridges\n * Licensed under the APLv2 license.\n */\n\n'use strict';\nvar getConfi... | javascript | chosen |
[
{
"from": "system",
"value": "Add angularJS functionality - fixes\n"
},
{
"from": "human",
"value": "var app = angular.module('realtime');\n\napp.controller('realtimeController', ['$scope', 'RealtimeService', function ($scope, RealtimeService) {\n\n $scope.notesCollection = [];\n \... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Create locale dir if doesn't exist\n"
},
{
"from": "human",
"value": "const fs = require('fs')\nconst path = require('path')\nconst chalk = require('chalk')\nconst program = require('commander')\nconst getConfig = require('lingui-conf').default\nconst plurals =... | javascript | chosen |
[
{
"from": "system",
"value": "Add note about cloudflare caching\n"
},
{
"from": "human",
"value": "const webpack = require(\"webpack\");\nconst merge = require(\"webpack-merge\");\nconst workboxPlugin = require(\"workbox-webpack-plugin\");\nconst common = require(\"./webpack.common.js\");\n\ncon... | javascript | chosen |
[
{
"from": "system",
"value": "Allow selecting metrics in URL hash"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\t/*\n\t * Draw charts\n\t */\n\n\t/* Radar chart */\n\tvar radar_ctx = $(\"#radar\").get(0).getContext(\"2d\");\n\t// radar_data is filled in the template\n\tvar my... | javascript | chosen |
[
{
"from": "system",
"value": "Save additional confs in documentStore\n"
},
{
"from": "human",
"value": "'use strict';\nangular.module('arethusa.core').service('documentStore', function () {\n var self = this;\n this.store = {};\n this.reset = function () {\n this.store = {};\n };\n this.... | javascript | chosen |
[
{
"from": "system",
"value": "Stop progress indicator when route errors.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport ProgressIndicator from 'klondike/progress-indicator';\n\nexport default Ember.Mixin.create({\n actions: {\n loading: function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary 'done' calls from tests.\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar Browser = require(\"zombie\");\nvar expect = require(\"chai\").expect;\nvar Lurker = require(\"../lib/lurker\");\n\ndescribe(\"The lurker plugin\", function () {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix CI tests to be more explicit, ignore dates\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst {expect} = require(\"chai\");\n\nbefore(() => {\n browser.url(\"/login\");\n\n browser.setCookie({\n name: \"user_session\",\n value: process.env.USER_... | javascript | chosen |
[
{
"from": "system",
"value": "Check update against right property\n"
},
{
"from": "human",
"value": "module.exports = function(sugar, models, assert) {\n return function updateMultipleAuthors(cb) {\n var firstAuthor = {name: 'foo'};\n var secondAuthor = {name: 'bar'};\n v... | javascript | chosen |
[
{
"from": "system",
"value": "Remove use of findIndex to keep IE compatibility.\n"
},
{
"from": "human",
"value": "const directive = {\n instances: []\n}\n\ndirective.onEvent = function (event) {\n directive.instances.forEach(({ el, fn }) => {\n if (event.target !== el && !el.contains(event... | javascript | chosen |
[
{
"from": "system",
"value": "Test out editing code in the browser.\n\ngit-svn-id: abd770af2affaf62930f25b244f6edafe8ddae5b@217 164481a5-15cb-f69f-4b93-856c5b7754c5\n"
},
{
"from": "human",
"value": "// Copyright 2010 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Ve... | javascript | chosen |
[
{
"from": "system",
"value": "Remove reference to reject() that no longer exists\n"
},
{
"from": "human",
"value": "var copy = require('ncp').ncp;\n\nrequire('land-registry-elements').then(function(assetPath) {\n\n var destPath = 'service/static/assets';\n\n copy(assetPath, destPath, function(... | javascript | chosen |
[
{
"from": "system",
"value": "Add cpu usage in stats\n"
},
{
"from": "human",
"value": "'use strict';\n\nrequire('require');\nrequire('prototype_creep_startup_tasks');\nrequire('prototype_creep_move');\nrequire('prototype_roomPosition');\nrequire('prototype_room_init');\nrequire('prototype_room_... | javascript | chosen |
[
{
"from": "system",
"value": "Modify match rules for activating extension or not\n"
},
{
"from": "human",
"value": "chrome.runtime.onInstalled.addListener(function() {\n chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {\n chrome.declarativeContent.onPageChanged.addR... | javascript | chosen |
[
{
"from": "system",
"value": "Make blog posts table more responsive\n"
},
{
"from": "human",
"value": "import {personEntityName} from \"./person\"\n\nexport const blogPostEntityName = \"blogPosts\";\n\nexport default (nga) => {\n const personEntity = nga.entity(personEntityName);\n const entit... | javascript | chosen |
[
{
"from": "system",
"value": "Disable `babel-plugin-minify-dead-code-elimination` until it stabilizes.\n"
},
{
"from": "human",
"value": "import { transformFromAst } from \"babel-core\";\nimport * as t from \"babel-types\";\n\n\nconst babiliPreset = require.resolve(\"babel-preset-babili\");\n\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Return errors as object for high abstraction if-statements\n"
},
{
"from": "human",
"value": "// @flow\n\nimport fetch from 'node-fetch'\nimport {GITHUB_API_BASE_URL, getHeaders} from './utils'\nimport {GithubRequestParams} from './entities'\n\nexport function creat... | javascript | chosen |
[
{
"from": "system",
"value": "Fix docs and label and use more intuitive function name\n"
},
{
"from": "human",
"value": "'use strict';\n\n/*!\n * Dependencies\n */\n\nvar debug = require('debug')('ooyala:thumbnails')\n\n/**\n * TODO: There is a size limit on what can be sent, no idea what that l... | javascript | chosen |
[
{
"from": "system",
"value": "Set default values for date and amount\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Grid, Input, Button, Segment } from 'semantic-ui-react'\nimport RecipientInfo from './RecipientInfo'\nimport DatePicker from 'react-datepick... | javascript | chosen |
[
{
"from": "system",
"value": "FIX: Handle reserved characters in the search string\n\nPreviously, \"C++\" would become \"C\" due to the lack of encoding/escaping\n"
},
{
"from": "human",
"value": "chrome.omnibox.onInputEntered.addListener(\n\tfunction(searchText) {\n\t\tvar docSubdir = localStor... | javascript | chosen |
[
{
"from": "system",
"value": "Use util.log in uncaughtExpcetion handler.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar util = require(\"util\"),\n express = require(\"express\"),\n routes = require(\"./routes\"),\n plugin = require(\"./plugin\");\n\nvar app = express(),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set up db, required email and password in models.js\n"
},
{
"from": "human",
"value": "const mongoose = require('mongoose');\nconst bcrypt = require('bcrypt');\nconst jwt = require('jsonwebtoken');\n\nvar userSchema = new mongoose.Schema({\n email: String,\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Fix content security policy error with blanket\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'component-integration-tests',\n environment: environment,\n baseURL: '/',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing `await` to outer iterator `next` call.\n\nCloses #46.\n"
},
{
"from": "human",
"value": "module.exports = function (paginator, twiddle) {\n const outer = paginator[Symbol.asyncIterator]()\n return {\n [Symbol.asyncIterator]: function () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update Url for Owncloud >= 5.X\n"
},
{
"from": "human",
"value": "function ownArticle(id) {\n try {\n\tvar query = \"?op=pluginhandler&plugin=owncloud&method=getOwnCloud&id=\" + param_escape(id);\n\t\n\tconsole.log(query);\n\t\n\tvar d = new Date();\n\tvar ts = d... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing spaces before braces"
},
{
"from": "human",
"value": "const fs = require('fs')\nconst models = require('../models/index')\nconst insecurity = require('../lib/insecurity')\nconst request = require('request')\n\nmodule.exports = function profileImageUrlUpl... | javascript | chosen |
[
{
"from": "system",
"value": "WIP: Move to JS and Refactoring\n"
},
{
"from": "human",
"value": "(function() {\n \"use strict\";\n\n var _;\n\n var host = process.argv[2];\n var port = process.argv[3];\n\n if (!host || !port) {\n logger.log(\"Usage: app.js host port\");\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix example for language option"
},
{
"from": "human",
"value": "/*!\n * apiai\n * Copyright(c) 2015 http://api.ai/\n * Apache 2.0 Licensed\n */\n\n'use strict';\n\n// var apiai = require(\"../module/apiai\");\nvar apiai = require(\"apiai\");\n\nvar app = apiai(\"YO... | javascript | chosen |
[
{
"from": "system",
"value": "Append the /primus url if required\n"
},
{
"from": "human",
"value": "module.exports = require('messenger-ws')(typeof window != 'undefined' ? location.origin : 'http://localhost:3000');\n"
},
{
"from": "gpt",
"value": "var url = typeof window != 'undefin... | javascript | chosen |
[
{
"from": "system",
"value": ":new: Make server use the lowercase listen\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar Cluster = require('cluster');\nvar Port = Number(process.argv[2]);\nif(Cluster.isMaster){\n if(Port !== Port){\n console.error(\"Please specify a port to listen on... | javascript | chosen |
[
{
"from": "system",
"value": "Set undefined parameters to 0\n"
},
{
"from": "human",
"value": "/**\n * Creates a new 2 dimensional Vector.\n * \n * @constructor\n * @this {Circle}\n * @param {number} x The x value of the new vector.\n * @param {number} y The y value of the new vector.\n */\nfunc... | javascript | chosen |
[
{
"from": "system",
"value": "Add CSP headers to get rid of console warnings"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'hyperchannel',\n environment: environment,\n baseURL: '/',\n locationType:... | javascript | chosen |
[
{
"from": "system",
"value": "[examples] Use Index instead of App"
},
{
"from": "human",
"value": "// @flow\n\nimport React, { Component } from 'react';\nimport Button from 'material-ui/Button';\nimport Dialog, {\n DialogTitle,\n DialogContent,\n DialogContentText,\n DialogActions,\n} from '... | javascript | chosen |
[
{
"from": "system",
"value": "Clone root props before sending them to widget\n"
},
{
"from": "human",
"value": "var Fresh = {\n mixins: {},\n widgets: {},\n getWidgetByName: function(widgetName) {\n return this.widgets[widgetName];\n },\n start: function(rootProps, container) {\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable drag and drop event for document\n"
},
{
"from": "human",
"value": "'use strict';\r\n\r\nfunction init() {\r\n // Drag and Drop holder.\r\n const holder = document.getElementById('holder');\r\n // Placehold text in holder.\r\n const dragText = do... | javascript | chosen |
[
{
"from": "system",
"value": "Add proper fields for the form.\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\nvar WidgetsFormBaseSchema = require('./widgets-form-base-schema-model');\n\nmodule.exports = WidgetsFormBaseSchema.extend({\n\n initialize: function (attrs, opts) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Include newline after text in http body.\n"
},
{
"from": "human",
"value": "var child_process = require('child_process');\nvar express = require('express');\n\nmodule.exports = function (ref, action) {\n \n // create express instance\n var hookshot = express();\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a fatal typo after module rename.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst logger = require('heroku-logger');\nconst db = require('./db');\nconst staticHttpServer = require('./staticHttpServer');\nconst createWsServer = require('./createWsServer... | javascript | chosen |
[
{
"from": "system",
"value": "Add group id, now required for fifo\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst AWS = require('aws-sdk');\n\nmodule.exports = {};\nmodule.exports.generic = generic;\nmodule.exports.minuteAggregation = minuteAggregation;\n\nfunction generic(queue, body)... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.