conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add the Accept header to all API calls\n"
},
{
"from": "human",
"value": "import Vuex from 'vuex'\nimport axios from 'axios'\nimport VueAxios from 'vue-axios'\nimport HalJsonVuex from 'hal-json-vuex'\nimport lang from './lang'\n\nclass StorePlugin {\n install (Vue,... | javascript | chosen |
[
{
"from": "system",
"value": "Expand the review if the user's at least entered a rating.\n"
},
{
"from": "human",
"value": "import template from './item-review.html';\nimport './item-review.scss';\n\nfunction ItemReviewController($rootScope, dimSettingsService) {\n 'ngInject';\n\n const vm = t... | javascript | chosen |
[
{
"from": "system",
"value": "Copy space separeted title and url to clipboard\n"
},
{
"from": "human",
"value": "function copyToClipboard(str){\n 'use strict';\n\n // Copy str to clipboard\n var textArea = document.createElement('textarea');\n document.body.appendChild(textArea);\n textArea... | javascript | chosen |
[
{
"from": "system",
"value": "Switch back to using innerText\n\nI thought innerHTML might preserve spaces better, but the encoding is\nactually working fine without innerText\n"
},
{
"from": "human",
"value": "document.addEventListener('DOMContentLoaded', function() {\n\tgetSource();\n});\n\nfun... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for browsers without datepicker for input types of date\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n // There is no default option for setting readonly a field with django-bootstrap4\n $('#id_mother_tongue').prop('readonly', ... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce bottom padding on alert panel\n"
},
{
"from": "human",
"value": "var classNames = require('classnames');\nvar React = require('react');\n\nvar Panel = require('./Panel');\n\nvar AlertPanel = React.createClass({\n\n displayName: 'AlertPanel',\n\n defaultProp... | javascript | chosen |
[
{
"from": "system",
"value": "fix(server): Install only available for linux\n"
},
{
"from": "human",
"value": "var p = require('path')\n , helper = require('../helpers/promise')\n , scripts_path = p.resolve(__dirname, '../../scripts')\n\nmodule.exports = {\n client: function(client) {\n re... | javascript | chosen |
[
{
"from": "system",
"value": "Make command block actually do something\n"
},
{
"from": "human",
"value": "(function(ext) {\n // Cleanup function when the extension is unloaded\n ext._shutdown = function() {};\n\n // Status reporting code\n // Use this to report missing hardware, plug... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor: Use ES6 syntax of default parameter value\n"
},
{
"from": "human",
"value": "import { flow, curry, get, mapValues } from 'lodash/fp'\nimport { bind } from 'lodash'\n\nconst _bindSelector = curry((selectionName, selector) =>\n flow(\n get(selectionName)... | javascript | chosen |
[
{
"from": "system",
"value": "Use dotenv to access env vars with process env\n"
},
{
"from": "human",
"value": "import mongoose from 'mongoose';\n\nconst uri = `mongodb://${process.env.MONGO_USERNAME}:${process.env\n .MONGO_PASSWORD}@${process.env.MONGO_ADDRESS}`;\n\nmongoose.Promise = global.P... | javascript | chosen |
[
{
"from": "system",
"value": "Update for live preview refactor\n"
},
{
"from": "human",
"value": "/*global twemoji, s9e*/\n\nimport { override } from 'flarum/extend';\nimport app from 'flarum/app';\nimport Post from 'flarum/models/Post';\nimport Formatter from 'flarum/utils/Formatter';\n\napp.in... | javascript | chosen |
[
{
"from": "system",
"value": "Remove JavaScript code for initializing tooltips (they aren't used anymore)\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $(\".tooltip-link\").tooltip( {placement: \"right\"} );\n});\n\nif($(\".email\").length){\n // variables, which will be ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Panes for the display only component also\n"
},
{
"from": "human",
"value": "/** A layer for an adjust speed modification */\nimport React from 'react'\n\nimport colors from 'lib/constants/colors'\n\nimport PatternLayer from './pattern-layer'\nimport HopLayer fr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix teams screen throwing error and not loading\n\n\nFormer-commit-id: cfd3266412adf3acb59b8cd4fd96725b8d95d218"
},
{
"from": "human",
"value": "function viewTeams() {\n\n getTeams(\n success = function (data) {\n populateTeamsTable(data.teams);... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Adding Nightly System Add-ons to the ignore list\"\n\nThis reverts commit 7aa255b4fa5ed7c5815eb5a1ba1432ce0b53453a.\n"
},
{
"from": "human",
"value": "// Tracking categories.\nexport const VIDEO_CATEGORY = 'Discovery Video';\nexport const NAVIGATION_CATEGOR... | javascript | chosen |
[
{
"from": "system",
"value": "Fix token/ url and remember to actually export the router...\n"
},
{
"from": "human",
"value": "import express from 'express';\nimport jwt from 'jsonwebtoken';\n\nconst router = express.Router(); // eslint-disable-line new-cap\n\nrouter.post('/token', (req, res) => ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for home directory on Windows\n"
},
{
"from": "human",
"value": "var fs = require('fs')\n , path = require('path')\n\nfunction read(dir) {\n var f = path.resolve(dir, '.node-dev.json')\n return fs.existsSync(f) ? JSON.parse(fs.readFileSync(f)) : {}\n}\n\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace of the content in workspace id\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Requirements\nvar User = module.parent.require('./user'),\n winston = module.parent.require('winston'),\n watsonDev = require('watson-developer-cloud'),\n\n// Metho... | javascript | chosen |
[
{
"from": "system",
"value": "Remove margin, full bleed image (headerimg comp)"
},
{
"from": "human",
"value": "import React from 'react';\n \nclass HeaderImg extends React.Component {\n render() {\n const style = {\n width: '98%',\n height: '500px',\n clear: 'both',\n ma... | javascript | chosen |
[
{
"from": "system",
"value": "Use the production backend in production"
},
{
"from": "human",
"value": "const _Environments = {\n production: { API_URL: 'https://dev-api.vets.gov', BASE_URL: 'https://www.vets.gov' },\n staging: { API_URL: 'https://staging-api.vets.gov', BASE_URL: 'https://stag... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"I don't think this hurts?\"\n\nThis reverts commit 2e7ffb040e281792a578d8d44ba922531ceff16a.\n\nConflicts:\n\tjs/init.js\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar canvas;\nvar context;\n\n$(document).ready(function(){\n\t$(\"<canvas/>\").attr(... | javascript | chosen |
[
{
"from": "system",
"value": "Add eventlistener for nav links to toggle active class\n"
},
{
"from": "human",
"value": "var bindEvents = function() {\n\tsmoothScroll.init();\n\n\tdocument.querySelector('.mobile-menu-toggle').addEventListener('click', function(event) {\n\t\tevent.preventDefault()... | javascript | chosen |
[
{
"from": "system",
"value": "Increase pageSize to 100 (which is the current prismic.io maximum)\n"
},
{
"from": "human",
"value": "const Prismic = require('prismic.io');\n\nmodule.exports = {\n getAll(apiEndpoint) {\n return Prismic.api(apiEndpoint).then(api => (\n api.query(null, { la... | javascript | chosen |
[
{
"from": "system",
"value": "Write to stderr if there is not '<!-- TOC -->' comment in md\n"
},
{
"from": "human",
"value": "/**\n * Logs which are used in 'cli.js'\n */\nmodule.exports = {\n successInsertMsg: function () {\n console.log('The TOC was ' + 'successfully'.bold.green + ' ... | javascript | chosen |
[
{
"from": "system",
"value": "Add splix to spam watcher\n"
},
{
"from": "human",
"value": "import BaseWatcher from './BaseWatcher';\n\n/**\n * This checks for people spamming links.\n */\nclass LinkSpamWatcher extends BaseWatcher {\n constructor(bot) {\n super(bot);\n }\n\n usesB... | javascript | chosen |
[
{
"from": "system",
"value": "Return emoji object in search results\n"
},
{
"from": "human",
"value": "import lunr from 'lunr'\nimport data from '../../data'\n\nvar emoticonsList = []\n\nvar index = lunr(function() {\n this.pipeline.reset()\n\n this.field('short_name', { boost: 2 })\n this.fi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix relative paths for spa\n"
},
{
"from": "human",
"value": "var path = require('path'),\n fs = require('fs');\n\n\nfunction FileUrlMapper(options) {\n this.base = options.directory;\n this.spa = options.spa;\n}\n\nFileUrlMapper.prototype.hasTrailingSlash =... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error when showing content app in media section\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n function RelatedLinksAppController($scope) {\n var vm = this;\n\n vm.relations = $scope.model.viewModel; \n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Move calling the action into a separate function so it can be subclassed (for async)\n"
},
{
"from": "human",
"value": "(function () {\n \"use strict\";\n\n var ActionQueue = window.ActionQueue = function () {\n var self = this instanceof ActionQueue ? ... | javascript | chosen |
[
{
"from": "system",
"value": "CSRA-000: Reset timers back to default\n"
},
{
"from": "human",
"value": "/* eslint-disable class-methods-use-this */\nclass BasePage {\n\n get mainHeading() { return browser.getText('h1'); }\n waitForMainHeadingWithDataId(id) {\n browser.waitForVisible(`[data-... | javascript | chosen |
[
{
"from": "system",
"value": "Set collected css classes on set operators\n"
},
{
"from": "human",
"value": "var RoundNode = require(\"./RoundNode\");\n\nmodule.exports = (function () {\n\n\tvar radius = 40;\n\n\tvar o = function (graph) {\n\t\tRoundNode.apply(this, arguments);\n\n\t\tvar that = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add vars & disable auto pausing\n"
},
{
"from": "human",
"value": "/*\n * boot.js\n * Sets up game and loads preloader assets\n */\n\n/* Sets a global object to hold all the states of the game */\nYINS = {\n\n\t/* declare global variables, these will persist a... | javascript | chosen |
[
{
"from": "system",
"value": "Change service root for apphourbor.\n"
},
{
"from": "human",
"value": "/// <reference path=\"controller.js\" />\n/// <reference path=\"dataAccess.js\" />\n(function () {\n var serviceRoot = \"http://localhost:16502/api/\";\n \n var persister = Chat.persist... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ceiling in other file\n"
},
{
"from": "human",
"value": "function redistributeCollagePics()\n{\n var $pictures = jQuery('.carousel-panel-collage-wrapper').contents();\n jQuery('.carousel-panel-collage-wrapper').parent().remove();\n var $container = jQue... | javascript | chosen |
[
{
"from": "system",
"value": "Handle just parse errors in provider\n\nPreviously all errors were reported as JSON parse errors.\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2014-2015 Fabian Tollenaar <fabian@starting-point.nl>\n *\n * Licensed under the Apache License, Version 2.0 (the \"... | javascript | chosen |
[
{
"from": "system",
"value": "Update main api endpoint tests\n"
},
{
"from": "human",
"value": "/*global describe:false, it:false, beforeEach:false, afterEach:false, request:false, mock:false*/\n\n'use strict';\n\ndescribe('/', function () {\n\n it('should say \"hello\"', function (done) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix invalid export syntax (ooops)\n"
},
{
"from": "human",
"value": "// When creating events, name them with all CAPS separated with underscores.\n// Example: AMAZING_MAP_CREATED\n//\n// The value of the event should be a very short description on when the event\n//... | javascript | chosen |
[
{
"from": "system",
"value": "Add aif/aiff, spx (Speex) & mpc (Musepack) as audio file extensions.\nRemove clashing .mp4 extension (with video) from audio.\n"
},
{
"from": "human",
"value": "const mediaExtensions = {\n audio: [\n '.aac', '.asf', '.flac', '.m2a', '.m4a', '.m4b', '.mp2', '.mp4... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate the tests for the alert service to vlui\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('Directive: alertMessages', function() {\n\n // load the directive's module\n beforeEach(module('polestar'));\n\n var element,\n scope;\n\n beforeEach... | javascript | chosen |
[
{
"from": "system",
"value": "Update dashboard current width when window is resized (eg: when table orientation changes).\n"
},
{
"from": "human",
"value": "/**\n * Mycockpit Directive\n */\n(function() {\n 'use strict';\n\n angular\n .module('dashboard')\n .directive('dashbo... | javascript | chosen |
[
{
"from": "system",
"value": "[Employee] Add callback function to text button\n\nThis calls the native api to send some text message to the selected\nemployee.\n\nSigned-off-by: Andre Loureiro <89b413c9cb95df28b97ff74e34cd65b0c0b16f96@gmail.com>\n"
},
{
"from": "human",
"value": "import React, {... | javascript | chosen |
[
{
"from": "system",
"value": "Change id query parameter to route parameter\n"
},
{
"from": "human",
"value": "'use strict'\r\n\r\n\r\nmodule.exports = (function(){\r\n /**\r\n * Import modules\r\n */\r\n const footballDb = require('./../db/footballDb')\r\n /**\r\n * football... | javascript | chosen |
[
{
"from": "system",
"value": "Change slider scroll count to 3 instead of 5\n"
},
{
"from": "human",
"value": "$(function() {\n //tabs\n\t$('ul.tabs li').click(function(){\n\t\tvar tab_id = $(this).attr('data-tab');\n\n\t\t$('ul.tabs li').removeClass('current');\n\t\t$('.tab-content').removeClas... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve typescript files *before* resolving javascript files.\n"
},
{
"from": "human",
"value": "module.exports = function() {\n\treturn {\n\t\tbail: true,\n\t\tmodule: {\n\t\t\tloaders: [\n\t\t\t\t{\n\t\t\t\t\ttest: /\\.ts$/,\n\t\t\t\t\texclude: /node_modules/,\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify object in ChatServer constructor.\n"
},
{
"from": "human",
"value": "import connect from 'connect';\nimport faker from 'faker';\nimport path from 'path';\nimport serveStatic from 'serve-static';\nimport uuid from 'node-uuid';\nimport {Server as WebSocketSer... | javascript | chosen |
[
{
"from": "system",
"value": "[Enhancement] Change port and ip for azure host\n"
},
{
"from": "human",
"value": "var network = function () {\n this.port = 8080;\n this.ip = \"127.0.0.1\";\n};\n\nmodule.exports = new network();"
},
{
"from": "gpt",
"value": "var network = functi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix debug build test failure\n\nNot really a bug here, v8 seems overzealous with this CHECK failure\n"
},
{
"from": "human",
"value": "let ivm = require('isolated-vm');\nlet isolate = new ivm.Isolate;\n\nfunction makeContext() {\n\tlet context = isolate.createContex... | javascript | chosen |
[
{
"from": "system",
"value": "Improve mongo logging, so we only log unexpected disconnects.\n\nThis cleans things up a bit so normal shutdown doesn't spew mongo\ndisconnect errors.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar logger = require('./logger'),\n mongoose = require('mong... | javascript | chosen |
[
{
"from": "system",
"value": "Fix duplicate log chats bug\n"
},
{
"from": "human",
"value": "module.exports = {\n steamID: \"\",\n steamNick: \"\",\n steamError: \"\",\n reconnectTries: 0,\n connected: false,\n away: false,\n lastInvite: \"\",\n lastChat: \"\",\n ghost... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Implement recommendation for json:api v1 error response\n"
},
{
"from": "human",
"value": "const HTTPStatus = require('http-status-codes');\n\n// eslint-disable-next-line no-unused-vars\nfunction handleErrorResponse(err, req, res, next) {\n const responseObje... | javascript | chosen |
[
{
"from": "system",
"value": "Sort items by votes annd created at\n"
},
{
"from": "human",
"value": "import { connect } from \"react-redux\"\n\nimport * as trackActions from '../actions/trackActions'\nimport * as playlistActions from '../actions/playlistActions'\n\nimport VideoFeed from './Video... | javascript | chosen |
[
{
"from": "system",
"value": "Add settings support for tmdb keys\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Load requirements\nconst parser = require('parse-torrent-name');\n\n// Create promise to resolve with dataset\nmodule.exports = function(filename) {\n return new Promise((reso... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken build in IE11\n\nDon't use array.includes, it is not supported in IE11\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar assert = require(\"@sinonjs/referee\").assert;\nvar createSet = require(\"./create-set\");\n\ndescribe(\"createSet\", function... | javascript | chosen |
[
{
"from": "system",
"value": "Fix image file path at generated html file.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\nconst os = require('os');\nconst marked = require('marked');\nconst ECT = require('ect');\n\nfunction md2html(fi... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for a new shared fixture step definition\n\nThis creates a new step definition for navigating to fixtures directly\nrather than via search.\n"
},
{
"from": "human",
"value": "const { get } = require('lodash')\nconst { client } = require('nightwatch-cucum... | javascript | chosen |
[
{
"from": "system",
"value": "Read files with NodeJS script\n"
},
{
"from": "human",
"value": "var path = '../data/snippets';\n\n// TODO list this folder\n"
},
{
"from": "gpt",
"value": "var fs = require('fs');\nvar os = require('os');\n\nvar path = '../data/snippets';\n\nvar folders... | javascript | chosen |
[
{
"from": "system",
"value": "Update depedencies and version number\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"Reactive bootstrap modals for meteor\",\n version: \"1.0.4\",\n git: \"https://github.com/jchristman/reactive-modal.git\",\n name: \"jchristman:reactive-moda... | javascript | chosen |
[
{
"from": "system",
"value": "Revert to default logger for i18n\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Load our requirements\nconst i18n = require('i18n'),\n path = require('path'),\n logger = require('../log');\n\n// Variables\nlet localeDir = path.resolve('./locales')... | javascript | chosen |
[
{
"from": "system",
"value": "Remove cwd option to standard-engine\n"
},
{
"from": "human",
"value": "var eslint = require('eslint')\nvar path = require('path')\nvar pkg = require('./package.json')\n\nmodule.exports = {\n bugs: pkg.bugs.url,\n cmd: 'standard',\n cwd: __dirname,\n eslint: esl... | javascript | chosen |
[
{
"from": "system",
"value": "Make Course draggable\nWhen dropped, it returns {clbid: <it's clbid>}\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport * as _ from 'lodash'\nimport * as React from 'react'\nimport * as humanize from 'humanize-plus'\n\nvar Course = React.createClass({\n\tre... | javascript | chosen |
[
{
"from": "system",
"value": "Add barcode to Ticket db structure\n"
},
{
"from": "human",
"value": "//////////////////////////////\n// Handles the Ticket model //\n//////////////////////////////\n\n'use strict';\n\nmodule.exports = function (sequelize, DataTypes) {\n var Ticket = sequelize.de... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug when locale isn't English.\n"
},
{
"from": "human",
"value": "/**\n * @copyright Copyright (c) 2012-2015 2amigOS! Consulting Group LLC\n * @link http://2amigos.us\n * @license http://www.opensource.org/licenses/bsd-license.php New BSD License\n */\nif (typeo... | javascript | chosen |
[
{
"from": "system",
"value": "Update New Relic library to 1.3.0\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"meteor sql bindings for server-side calls\"\n});\n\nNpm.depends({ \"newrelic\": \"1.0.1\" });\n\nPackage.on_use(function(api) {\n if (api.export) api.export('newre... | javascript | chosen |
[
{
"from": "system",
"value": "Add a system to update service worker\n\nsw.js\n"
},
{
"from": "human",
"value": "this.addEventListener('install', function(event) {\n event.waitUntil(\n caches.open('learn-memory').then(function(cache) {\n return cache.addAll([\n '/',\n '/sty... | javascript | chosen |
[
{
"from": "system",
"value": "Fix infinite recursion on server\n"
},
{
"from": "human",
"value": "class Player {\n\n constructor({ socket }) {\n // The identifier for this player, unique on a per-room level\n this.id = Date.now();\n // The current socket assocuat\n this.socket = soc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error clearing site customizations\n"
},
{
"from": "human",
"value": "function initSettings() {\n var globalSettings = getGlobalSettings();\n if (globalSettings['hw_accel']) {\n $('hw_accel').value = globalSettings['hw_accel'];\n }\n}\n\nfunction onForget(... | javascript | chosen |
[
{
"from": "system",
"value": ":rotating_light: Remove unused reference to React\n"
},
{
"from": "human",
"value": "\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport _ from 'lodash'\nimport { compose, getContext, mapProps, withHandlers } from 'recompose'\n\nexport const conn... | javascript | chosen |
[
{
"from": "system",
"value": "Remove underscore dependency; cleanup whitespace\n"
},
{
"from": "human",
"value": "Package.describe({\n\tsummary: \"Methods to create admin role and add first admin user.\",\n version: \"0.1.0\",\n\tname: \"brylie:first-admin\",\n git: \"https://github.com/brylie... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dependency on jquery autosize\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'nimblenotes:typed.js',\n version: '0.0.1',\n summary: 'Typed.js v1.1.1',\n git: 'https://github.com/NimbleNotes/nimblenotes-packages',\n documentation:... | javascript | chosen |
[
{
"from": "system",
"value": "Fix resource loader file path being relative to running script. Use current directory global instead.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs'), files = fs.readdirSync('./lib/resources');\nvar resources = {}, resource, i = 0, l = fil... | javascript | chosen |
[
{
"from": "system",
"value": "Upgrade jade from 1.1.5 to 1.2.0\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"Jade template language for Meteor\"\n});\n\nPackage._transitional_registerBuildPlugin({\n name: \"compileJade\",\n use: [\n \"underscore\",\n \"html-tools\",... | javascript | chosen |
[
{
"from": "system",
"value": "Update price change indicator code to be more readable\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport classes from \"./ShortSGonksRow.module.css\";\n\nconst ShortSGonksRow = (props) => {\n console.log(props);\n const getDiffIndicator = ()... | javascript | chosen |
[
{
"from": "system",
"value": "Fix persistence in private tabs\n"
},
{
"from": "human",
"value": "import localForage from 'localforage';\nimport { withClientState } from 'apollo-link-state';\nimport { DialerInfo } from './queries';\nimport { CONFERENCE_PHONE_NUMBER } from '../config';\n\nlet defa... | javascript | chosen |
[
{
"from": "system",
"value": "Add currency symbols and displayPrice virtual\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Category = require('./category');\n\nvar productSchema = {\n name: {\n type: String,\n required: true\n },\n pictures: [{\n type: St... | javascript | chosen |
[
{
"from": "system",
"value": "Print stack traces from failed `meteor {node,npm}` commands.\n"
},
{
"from": "human",
"value": "// Note that this file is required before we install our Babel hooks in\n// ../tool-env/install-babel.js, so we can't use ES2015+ syntax here.\n\nvar win32Extensions = {\... | javascript | chosen |
[
{
"from": "system",
"value": "Disable minificiation when preprocessing is enabled\n"
},
{
"from": "human",
"value": "import * as t from 'babel-types'\nimport { useMinify } from '../utils/options'\nimport { isStyled, isHelper } from '../utils/detectors'\n\nconst minify = (linebreak) => {\n const... | javascript | chosen |
[
{
"from": "system",
"value": "Add doc string to utility method getAdjustedStyle\n"
},
{
"from": "human",
"value": "/* eslint-disable import/prefer-default-export */\nexport const getAdjustedStyle = (style, width, isLastCell) => {\n if (width && isLastCell) return { ...style, flex: width, border... | javascript | chosen |
[
{
"from": "system",
"value": "Move table name literal out of query\n"
},
{
"from": "human",
"value": "var mysql = require('mysql');\nvar connectionParams = require('../../config/connectionParams');\nfunction getConnection() {\n var connection = mysql.createConnection(connectionParams);\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Change band name to all caps\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport './App.css';\nimport './index.css';\nimport Rowbox from './components/Rowbox';\nimport IconRow from './components/IconRow';\n\nclass App extends Compone... | javascript | chosen |
[
{
"from": "system",
"value": "Validate arguments, make resultSelector optional, only apply key selectors once\n\nValidate arguments, make resultSelector optional, only apply key selectors once."
},
{
"from": "human",
"value": "(function () {\n\t'use strict';\n\n\tArray.prototype.innerJoin = func... | javascript | chosen |
[
{
"from": "system",
"value": "Use request instead of raw jquery ajax\n"
},
{
"from": "human",
"value": "var account = require('./account');\n\nexports.getInEverySystem = function (geom, callback) {\n\n var params = {\n geometry: geom,\n };\n\n $.ajax({\n url: '/api/geometry',\n metho... | javascript | chosen |
[
{
"from": "system",
"value": "Allow script run from any folder\n"
},
{
"from": "human",
"value": "var Promise = require('bluebird');\nvar fs = Promise.promisifyAll(require('fs'));\n\nvar piwik = require('./piwik');\nvar mongodb = require('./mongodb');\n\nfunction dateDaysAgo(nb_days) {\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Test promises instead of promiseList.\n"
},
{
"from": "human",
"value": "var assert = require(\"assert\");\nvar {defer, promiseList} = require(\"ringo/promise\");\n\nexports.testPromiseList = function() {\n var d1 = defer(), d2 = defer(), d3 = defer();\n var l... | javascript | chosen |
[
{
"from": "system",
"value": "Use webhook URL that should be available from anywhere\n\n(with working Internet connection)\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\n\nconst chai = require('chai')\nconst expect = cha... | javascript | chosen |
[
{
"from": "system",
"value": "Use protractor sauceBuild parameter to mass the build number to Sauce\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar specs = JSON.parse(fs.readFileSync('tests/end2end/specs.json'));\n\nvar browser_capabilities = JSON.parse(process.env.SELENIUM_BROWS... | javascript | chosen |
[
{
"from": "system",
"value": "Store colgroup in ui hash\n"
},
{
"from": "human",
"value": "define(['underscore', 'backbone.marionette', './LessonView'],\n function(_, Marionette, LessonView) {\n 'use strict';\n\n return Marionette.CollectionView.extend({\n el: $('#timetable'),\n childVi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem with anonymous function in production mode\n"
},
{
"from": "human",
"value": "// scripts app\nvar app;\n(function(){\n\t\"use strict\";\n\tapp = new ElecionesApp();\n\tconsole.log(app);\n\t// load mapa\n\t$.get(\"img/mapaBA_SVG.txt\", function(mapa){\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment that externals RegExp does work\n"
},
{
"from": "human",
"value": "var api = require(\"./webpack.config.defaults\")\n .entry(\"./src/server.js\")\n // @TODO Auto-installed deps aren't in node_modules (yet),\n // so let's see if this is a problem or no... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tooltips when lazy loading\n"
},
{
"from": "human",
"value": "\n$(document).ready(function() {\n $(\"[data-toggle=tooldesc]\").data('container', 'body').tooltip({placement: 'bottom', trigger: 'manual'});\n $(\"[data-toggle=tooltip], [data-toggle=tooltips] *\")... | javascript | chosen |
[
{
"from": "system",
"value": "Disable cities other than AKL for testing\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports = [\n {\n name: 'auckland',\n id: 1\n },\n {\n name: 'wellington',\n id: 15\n },\n {\n name: 'waikato',\n id: 14\n }\n]\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for Cannot read property 'excludeFinished' of null\n"
},
{
"from": "human",
"value": "angular.module('14all', ['ui.bootstrap','ngAnimate',\n 'auth',\n /* Modules */\n 'manga','movie','serie','anime','game','book',\n '14all.templates'])\n .config([... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mirage to only use default scenario when not testing\n"
},
{
"from": "human",
"value": "/* eslint global-require: off, import/no-mutable-exports: off */\nimport merge from 'lodash/merge';\nimport flow from 'lodash/flow';\n\nconst environment = process.env.NODE_E... | javascript | chosen |
[
{
"from": "system",
"value": "Update time now 10 seconds.\n"
},
{
"from": "human",
"value": "function updateMeters()\n{\n\tx_cpu_usage(updateCPU);\n\tx_mem_usage(updateMemory);\n\tx_get_uptime(updateUptime);\n\tx_get_pfstate(updateState);\n\n\twindow.setTimeout('updateMeters()', 1500);\n}\n\nfun... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ESLint errors and warnings\n"
},
{
"from": "human",
"value": "import { createReducer } from 'redux-act';\n\nimport {\n queryEntities,\n queryEntitySetEntities,\n fetchEntity,\n createEntity,\n updateEntity,\n deleteEntity,\n} from 'actions';\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Fix can merge check for column merge\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\nvar cdb = require('cartodb.js');\nvar ChooseKeyColumnsModel = require('./choose_key_columns_model');\n\nmodule.exports = cdb.core.Model.extend({\n\n defaults: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Make it so that you can upgrade a specific source.\n"
},
{
"from": "human",
"value": "var async = require(\"async\");\nvar mongoose = require(\"mongoose\");\nrequire(\"ukiyoe-models\")(mongoose);\n\nvar ExtractedImage = mongoose.model(\"ExtractedImage\");\n\nmongoos... | javascript | chosen |
[
{
"from": "system",
"value": "Put back the authentication to pass Travis CI tests\n"
},
{
"from": "human",
"value": "// Load environment variables\nif (process.env.NODE_ENV === 'development') {\n require('dotenv').config({ path: './env/development.env' });\n}\n\nvar express = require('express')... | javascript | chosen |
[
{
"from": "system",
"value": "Add a PatchFile test for parsing file extensions.\n"
},
{
"from": "human",
"value": "\ndescribe(\"PatchFile should\", function() {\n it(\"only parse positive or zero delta numbers\", function() {\n var file = new PatchFile();\n\n expect(file.added).... | javascript | chosen |
[
{
"from": "system",
"value": "Change the default error message\n\nMake the default error message souund a bit friendlier.\n"
},
{
"from": "human",
"value": "// Copyright (c) Martin Costello, 2017. All rights reserved.\n// Licensed under the Apache 2.0 license. See the LICENSE file in the project... | javascript | chosen |
[
{
"from": "system",
"value": "Remove From...To... tags including all content\n"
},
{
"from": "human",
"value": "function filterF(i, el) {\n var pattern = /(From|To|Sent|Subject|Cc|Date):/i;\n return el.textContent.match(pattern);\n}\n\n// convert From...To... blocks into one-liners\nvar matche... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.