conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Update to non-case API params\n"
},
{
"from": "human",
"value": "import moment from 'moment'\nimport textTable from 'text-table'\n\nconst find = (apiWrapper) => (search, options) => {\n const {\n startDate,\n endDate,\n businessunitids\n } = options\n re... | javascript | chosen |
[
{
"from": "system",
"value": "Gather names of modules that use action-names\n\nAt present, we then immeduately discard that information, since we\nonly return the array of _keys_ of the `allActions` register. But we\nmay change the API of `stripes.allActions` down the line to return the\nwhole register.\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for workchat composer cursor jumping\n\nSummary:\nAs figured out in T47552048, the issue of cursor jumping is happening because the draft editor's selection state is not in the correct state. After digging in, I discovered that the draft editor manages this state through th... | javascript | chosen |
[
{
"from": "system",
"value": "Add unit tests for compose and apply\n"
},
{
"from": "human",
"value": "/** @license MIT License (c) copyright 2016 original author or authors */\n\nimport {describe, it} from 'mocha';\nimport assert from 'assert';\n\nimport { id } from '../src/function';\n\ndescrib... | javascript | chosen |
[
{
"from": "system",
"value": "Handle 401 api errors and logout.\n"
},
{
"from": "human",
"value": "function handleApiError(response) {\n\n if(!response || response.status === 200)\n return;\n\n if(response.status === 403) {\n logout();\n }\n else {\n console.log('Error: ' + response... | javascript | chosen |
[
{
"from": "system",
"value": "Increase number of updated repos\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst StorageHandler = require('../lib/storage-handler');\nconst router = express.Router();\nconst storageHandler = new StorageHandler();\n\nconst REPO_KEY = 'RE... | javascript | chosen |
[
{
"from": "system",
"value": "Update env config with db_user and db_password fields\n"
},
{
"from": "human",
"value": "module.exports = {\n APP_NAME: 'app-name',\n PROTOCOL: 'http://',\n HOST: '127.0.0.1',\n PORT: 3030\n}"
},
{
"from": "gpt",
"value": "module.exports = {\n APP_N... | javascript | chosen |
[
{
"from": "system",
"value": "Update isWPError function to use isPlainObject.\n"
},
{
"from": "human",
"value": "/**\n * WP Error Utilities.\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 fi... | javascript | chosen |
[
{
"from": "system",
"value": "Allow triggering of event at any time.\n"
},
{
"from": "human",
"value": "$(window).ready(function() {\n\n\t$('.centerHorizontal').css('marginLeft', - + $('.centerHorizontal').width()/2);\n\t$('.centerVertical').css('marginTop', - + $('.centerVertical').height()/2);... | javascript | chosen |
[
{
"from": "system",
"value": "Update wrapper to include resolver\n"
},
{
"from": "human",
"value": "module.exports = {\n 'tokens': require('./tokens'),\n 'parser': require('./parser')\n};\n"
},
{
"from": "gpt",
"value": "module.exports = {\n 'tokens': require('./tokens'),\n 'pars... | javascript | chosen |
[
{
"from": "system",
"value": "Remove statusbar command from default menu\n"
},
{
"from": "human",
"value": "module.exports = [\n {\n id: \"application\",\n caption: \"Codebox\",\n items: [\n {\n caption: \"Settings\",\n command: \"... | javascript | chosen |
[
{
"from": "system",
"value": "Add authorized route checking middleware\n\nNOTE: Not integrated yet, will be integrated once session adding middleware is in place\n"
},
{
"from": "human",
"value": "let session = require('../../database/models/session');\n\nlet isAuthorizedForRoute = (req, res, ne... | javascript | chosen |
[
{
"from": "system",
"value": "[Net] Use remote matchmaking service (burningtomato.com:2013)\n"
},
{
"from": "human",
"value": "var Settings = {\n TileSize: 32,\n\n DebugCollision: false,\n DebugSkipBootLogo: true,\n\n MatchmakingUri: 'http://localhost:2013'\n};"
},
{
"from": ... | javascript | chosen |
[
{
"from": "system",
"value": "Update karma browserstack reporter to mocha\n"
},
{
"from": "human",
"value": "const base = require('./karma.base.conf');\n\nmodule.exports = Object.assign(base, {\n\tbrowserDisconnectTimeout: 10000,\n\tbrowserDisconnectTolerance: 1,\n\tbrowserNoActivityTimeout: 300... | javascript | chosen |
[
{
"from": "system",
"value": "Create chart set api updated\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc function\n * @name eagleeye.controller:ChartSetCreationController\n * @description\n * # ChartSetCreationController\n * Controller of the eagleeye\n */\nangular.module('e... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lint errors in 'ag services' base\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Promise = require('es6-promise').Promise;\n\nvar Command = require('../../cli/command');\n\nvar services = require('../../services');\n\nmodule.exports = new Command(\n 's... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded switchOff function from forgot view\n"
},
{
"from": "human",
"value": "/*\n * Module dependencies.\n */\n\nvar template = require('./forgot-form');\nvar t = require('t');\nvar FormView = require('form-view');\nvar page = require('page');\n\n/**\n * E... | javascript | chosen |
[
{
"from": "system",
"value": "Use no more than 1 process.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nvar app = require('./server/app'),\n http = require('http'),\n cluster = require('cluster'),\n numCPU = require('os').cpus().length,\n i = 0;\n\nif (cluster.isMaster){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add network-information plugin. Related to GH-885\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar fs = require('fs-extra');\nvar async = require('async');\nvar exec = require('child_process').exec;\nvar colors = require('colors');\n\nfunction doExec(te... | javascript | chosen |
[
{
"from": "system",
"value": "Fix version check in light of shelljs changes\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n/* eslint-disable strict */\n/* eslint-disable no-console */\n/* eslint-disable prefer-template */\n\n'use strict';\n\n// A simple check that node + npm versions\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove arrow functions\n... to support older versions of node\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar isObject = require('is-object')\nvar startsWith = require('starts-with')\n\nvar startsWithPrefix = (prefix, key) => {\n return startsWith(key, prefi... | javascript | chosen |
[
{
"from": "system",
"value": "Change to previous Char format\n"
},
{
"from": "human",
"value": "const bleno = require('bleno')\n\nconst TestCharacteristic = require('./characteristics/test')\nconst LightCharacteristic = require('./characteristics/light')\nconst AntiTheftCharacteristic = require(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix large stylesheet browser test\n"
},
{
"from": "human",
"value": "test('stylesheet_large.php', function (assert, document) {\n var h1 = document.getElementsByTagName('h1')[0];\n var cs = document.defaultView.getComputedStyle(h1, null);\n var done = asser... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to use method calls rather than direct def calls.\n"
},
{
"from": "human",
"value": "module.exports = (function() {\n\n var def = require('./def');\n var util = require('./util');\n\n var guard_undef = util.guard_undef;\n\n var Message = def.type(functi... | javascript | chosen |
[
{
"from": "system",
"value": "Change to try and trigger webhook\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar path = require('path');\nvar bodyParser = require('body-parser');\n\nvar port = 3000;\n\nvar app = express();\napp.use(bodyParser.json());\napp.use(bodyParser... | javascript | chosen |
[
{
"from": "system",
"value": "Fix loop limits, add per layer options in test mapconfig Factory\n"
},
{
"from": "human",
"value": "function getVectorMapConfig(opts) {\n return {\n buffersize: {\n mvt: 1\n },\n layers: _generateLayers(opts),\n };\n}\n\nfunctio... | javascript | chosen |
[
{
"from": "system",
"value": "Add attributeBindings for W3 permitted attributes\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Component.extend(Ember.Evented, {\n tagName: 'input',\n type: 'file',\n attributeBindings: ['type', 'multiple', 'accept'],\n m... | javascript | chosen |
[
{
"from": "system",
"value": "Increase max line length to 120 symbols\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: [\n 'eslint-config-airbnb-base',\n ],\n\n parser: 'babel-eslint',\n\n parserOptions: {\n ecmaVersion: 6,\n },\n\n rules: {\n // Airbnb rules overr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix toString on codeable concept"
},
{
"from": "human",
"value": "import CodeableConcept from 'ember-fhir-adapter/models/codeable-concept';\n\nlet IECodeableConcept = CodeableConcept.extend({\n hasCode: function(code){\n let matchedCodes = this.get('coding').map... | javascript | chosen |
[
{
"from": "system",
"value": "Implement workaround for faulty fromWei() in production build.\n"
},
{
"from": "human",
"value": "import moment from 'moment'\nimport 'moment-duration-format'\n\nexport function BigNumWeiToDisplayString(bignum, unit='ether') {\n return window.web3.fromWei(big... | javascript | chosen |
[
{
"from": "system",
"value": "Fix config file hashing on app start\n"
},
{
"from": "human",
"value": "/* global rm, mkdir, exec, ls*/\nrequire('shelljs/global');\nvar fs = require('fs');\nvar ms = require('ms');\n\nvar start = new Date();\n\nconsole.log('Building config...');\nexec('webpack --en... | javascript | chosen |
[
{
"from": "system",
"value": "Add components to entry file\n"
},
{
"from": "human",
"value": "// Test\n"
},
{
"from": "gpt",
"value": "import { Datepicker } from './datepicker/datepicker'\nimport { Apptmnt } from './apptmnt/apptmnt'\n\nconst components = [\n Datepicker,\n Apptm... | javascript | chosen |
[
{
"from": "system",
"value": "Add `style` method for custom style\n"
},
{
"from": "human",
"value": "const colors = ['red', 'blue', 'green']\n\n// Stringify styles\nfunction stringify(obj) {\n return Object.keys(obj)\n .map(key => {\n return `${key}:${obj[key]}`\n })\n .join(';')\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove text from the 'sticky' header\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport {animateScroll} from \"react-scroll\";\nimport {Sticky} from \"react-sticky\";\n\nexport default class StickyHeader extends React.Component {\n constructor(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix theme lookup in OTU form module\n\nWas causing application crash."
},
{
"from": "human",
"value": "import React from \"react\";\nimport styled from \"styled-components\";\nimport { ModalBody, ModalFooter, Input, InputError, InputGroup, InputLabel, SaveButton } f... | javascript | chosen |
[
{
"from": "system",
"value": "Use environment variable for config.database.dbName.\n"
},
{
"from": "human",
"value": "const env = process.env\nconst config = {\n token: {\n secret: env.ARROW_TOKEN_SECRET\n },\n database: {\n host: env.ARROW_DATABASE_HOST,\n port: env.ARROW_DATABASE_P... | javascript | chosen |
[
{
"from": "system",
"value": "Fix finalize for safari, firefox.\n"
},
{
"from": "human",
"value": "function makePostRequest(url, data) {\n console.log(url);\n console.log(data);\n var jForm = $('<form></form>');\n jForm.attr('action', url);\n jForm.attr('method', 'post');\n for... | javascript | chosen |
[
{
"from": "system",
"value": "Add copyright notice to test case\n"
},
{
"from": "human",
"value": "function opt() {\r\n for (let i = 0; i < 100; i++) {\r\n let j = i - 2;\r\n switch (i) {\r\n case 2:\r\n case 4:\r\n case 6:\r\n case 8:... | javascript | chosen |
[
{
"from": "system",
"value": "Allow phishing expression usage from NodeJS\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('ddsCommon').constant('phishingExpressions', [\n]);\n"
},
{
"from": "gpt",
"value": "(function() {\n'use strict';\n\nvar phishingExpressions = ... | javascript | chosen |
[
{
"from": "system",
"value": "Call logout to clear authentication data when an unauthorised response is returned.\n"
},
{
"from": "human",
"value": "/**\n * Generic error handler method for ajax responses.\n * Apply your specific requirements for an error response and then call this method to ta... | javascript | chosen |
[
{
"from": "system",
"value": "Add sentence to API response\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\nvar indico = require('indico.io');\nindico.apiKey = '';\n\nvar logError = function(err) { console.log(err); }\n\n/* GET */\n/*\n * R... | javascript | chosen |
[
{
"from": "system",
"value": "Fix AttachmentsAPI unable to be resolved\n"
},
{
"from": "human",
"value": "import AttachmentsAPI from 'api/attachments';\nimport actionTypes from '../constants';\n\nexport default function destroy(questionId, attachmentId) {\n return (dispatch) => {\n dispatch(... | javascript | chosen |
[
{
"from": "system",
"value": "Remove experimental test - accidentally committed\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { shallow } from \"enzyme\";\nimport * as actions from \"../../actions/fuelSavingsActions\";\nimport ConnectedFuelSavingsPage, { FuelSavingsPage... | javascript | chosen |
[
{
"from": "system",
"value": "Store the config file as a const... for now\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n(function() {\n console.log(\"Hello from Dependument!\");\n})();\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env node\n\n(function() {\n const CONFIG_... | javascript | chosen |
[
{
"from": "system",
"value": "Use presence/realtime subdomains in matchmaker\n"
},
{
"from": "human",
"value": "module.exports = {\n services: [\n {\n url: 'http://localhost:9870',\n type: 'presence'\n },\n {\n url: 'http://localhost:9871'... | javascript | chosen |
[
{
"from": "system",
"value": "Remove trailing comma in advanced example\n"
},
{
"from": "human",
"value": "import Lists from '../actions/lists'\nimport contrast from '../../lib/contrast'\n\nexport default {\n\n getInitialState() {\n return []\n },\n\n register() {\n return {\n [... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for multiline object destructing\n"
},
{
"from": "human",
"value": "/* eslint-disable */\n\n\n// input: property access\na['a'];\na[a];\na[b()];\na[b[c[0]]];\n'abc'[1];\n// output:\na['a'];\na[a];\na[b()];\na[b[c[0]]];\n'abc'[1];\n\n// input: declaration\n/... | javascript | chosen |
[
{
"from": "system",
"value": "Use env var for API URL when adding bookmarks\n"
},
{
"from": "human",
"value": ";(function(){\n 'use strict';\n var modalCtrl = function($scope, $uibModalInstance, $http, messageParts){\n $scope.modalTitle = messageParts.title;\n $scope.modalHea... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in word generator\n"
},
{
"from": "human",
"value": "class Dice extends React.Component {\n constructor() {\n super();\n this.state = {\n words: this.parseInput(decodeURIComponent(location.search.substring(5))),\n div: document.createElement... | javascript | chosen |
[
{
"from": "system",
"value": "Update format for group members view\n"
},
{
"from": "human",
"value": "import _ from 'lodash'\nimport React from 'react'\nimport {connect} from 'react-redux'\nimport {compose, withHandlers, withProps, withState} from 'recompose'\n\nimport GroupMembersList from './G... | javascript | chosen |
[
{
"from": "system",
"value": "Add a wrapper into SL4A JS API to close WebView\n"
},
{
"from": "human",
"value": "var Android = function() { \n this._callbacks = [], \n this._id = 0, \n this._call = function(method, params) { \n this._id += 1; \n var request = JSON.stringify({'id': this.... | javascript | chosen |
[
{
"from": "system",
"value": "Update breakpoint action to pass query object\n\n"
},
{
"from": "human",
"value": "//@flow\n\nexport default (component: string, newLayout: string) => ({\n type: \"CHANGE_MAIN_LAYOUT\",\n component,\n newLayout\n});\n"
},
{
"from": "gpt",
"value": "//... | javascript | chosen |
[
{
"from": "system",
"value": "Add default value for this.replies. Complete addReply\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nclass TopicReplyCounter {\n constructor(topicId, replies) {\n this.topicId = topicId;\n this.replies = replies;\n this.replyCount = this.replies.len... | javascript | chosen |
[
{
"from": "system",
"value": "Add site footer to each documentation generator\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tac... | javascript | chosen |
[
{
"from": "system",
"value": "Remove use of spread operator\n\nThis is a temporary fix for the fact that the\nbabel plugin for the spread operator calls a\nfunction called `_iterableToArray` which assumes\nthe JavaScript runtime supports Symbols.\n\nIE11 doesn't support Symbols so this causes an\nerror when... | javascript | chosen |
[
{
"from": "system",
"value": "Define event in the open file dialog callback\n\nThe `event` definition was missing and an error was being thrown.\r\nNow verifying the repository works well."
},
{
"from": "human",
"value": "var app = require('app')\nvar BrowserWindow = require('browser-window')\nv... | javascript | chosen |
[
{
"from": "system",
"value": "Change symbols generation and checks"
},
{
"from": "human",
"value": "var LOCK = false;\n\nfunction print(text, nextAction) {\n if (text) {\n LOCK = true;\n var display = document.getElementById(\"display\");\n display.innerHTML = display.inn... | javascript | chosen |
[
{
"from": "system",
"value": "Return accessDenied return value to routes\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\n// Pre-loading user roles minimizes the number of HTTP\n// requests we have to make later when checking a user's ability\n// to read/manage/etc a stack\nfunct... | javascript | chosen |
[
{
"from": "system",
"value": "Add showImport variable in base config.\n\n– SAAS-379\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('ncsaas')\n .constant('ENV', {\n // general config\n name: '',\n apiEndpoint: 'http://localhost:8080/',\n\n // auth config\n goog... | javascript | chosen |
[
{
"from": "system",
"value": "Add backwards compatability for Adobe Lightroom\n\nBecause it was renamed it may result in unexpected errors --> breaking \nchanges.\n\nThis is a temporary solution to circumvent the problem. This can be \nremoved once some other breaking changes are also present and a major \n... | javascript | chosen |
[
{
"from": "system",
"value": "Use arrows functions as action creators\n"
},
{
"from": "human",
"value": "\nexport function addTodo (text) {\n return {type: 'ADD_TODO', text: text, completed: false, id: Date.now()}\n}\n\nexport function updateTodo (todo, updates) {\n return {type: 'UPDATE_TODO'... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor code using es6 syntax\n"
},
{
"from": "human",
"value": "'use strict';\nmodule.exports = function(sequelize, DataTypes) {\n var User = sequelize.define('User', {\n username: DataTypes.STRING,\n password: DataTypes.STRING,\n email: DataTypes.STRING... | javascript | chosen |
[
{
"from": "system",
"value": "Fix app server start event to log the correct port"
},
{
"from": "human",
"value": "import path from 'path';\nimport express from 'express';\nimport settings from 'server/settings';\n\nimport mainRoute from './routes/main';\n\nconst app = express();\n\nconst port = ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable parsing of more modules\n\nThis was failing due to having a `git@` URL in the `repository` field\n\nhttps://github.com/sveltejs/svelte-loader/blob/d4e2c2025e8cf0cf448d61a5f5206d6e77ee0d9a/package.json#L35\n"
},
{
"from": "human",
"value": "// This can't be re... | javascript | chosen |
[
{
"from": "system",
"value": "Move the propTypes as a static property."
},
{
"from": "human",
"value": "import React from 'react';\n\nimport KataGroups from './katagroups';\nimport Katas from './katas.js';\nimport Kata from './kata.js';\n\nexport default class Page extends React.Component {\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Remove FluxibleContext from exports since it is internal\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2014, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nmodule.exports = require('./lib/Flux... | javascript | chosen |
[
{
"from": "system",
"value": "Add the current working directory for the user scripts to the main process. Preparation for possible handling of require\n"
},
{
"from": "human",
"value": "import safeEval from 'safe-eval';\nimport dir from 'node-dir';\nimport path from 'path';\nimport {ipcRenderer}... | javascript | chosen |
[
{
"from": "system",
"value": "Allow passing in the node binary path on init\n\n"
},
{
"from": "human",
"value": "import initialize from './initialize';\nimport register from './register';\nimport unregister from './unregister';\nimport { core } from './commands/lfsCommands';\nimport { loadGitatt... | javascript | chosen |
[
{
"from": "system",
"value": "Add setup current input function\n"
},
{
"from": "human",
"value": "import detectIt from 'detect-it';\nimport addListener from 'the-listener';\n\nfunction setupCurrentInput() {\n\n}\n\n(() => {\n const body = document.querySelector('body');\n if (body) setupCurren... | javascript | chosen |
[
{
"from": "human",
"value": "Implement core scraping logic: scrape name, status, online status, secondary profile info.\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nconst co = require('co');\nconst fs = require('fs');\nconst cheerio = require('cheerio');\n\nconst CONFIG = require('./config.... | javascript | chosen |
[
{
"from": "system",
"value": "Move app into its own file.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n// import App from './components/app.jsx';\n\nclass App extends React.Component {\n render () {\n return (\n <h1>{\"JIM\"}</h1>\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update state when commands context changed\n"
},
{
"from": "human",
"value": "var Model = codebox.require(\"hr.model\");\nvar Collection = codebox.require(\"hr.collection\");\nvar _ = codebox.require(\"hr.utils\");\nvar commands = codebox.require(\"core/commands\");... | javascript | chosen |
[
{
"from": "system",
"value": "Make comment style consistent with the code base\n"
},
{
"from": "human",
"value": "// Tracking categories.\nexport const VIDEO_CATEGORY = 'Discovery Video';\nexport const NAVIGATION_CATEGORY = 'Discovery Navigation';\n\n// Action types.\nexport const DISCO_RESULTS ... | javascript | chosen |
[
{
"from": "system",
"value": "Add more documentation for easier testing\n"
},
{
"from": "human",
"value": "//If occation is food, set minimum value to 90 minutes\n\n//Formtastic initialises sulten_reservation_reservation_duration selectoren with :collector\n$(\"#sulten_reservation_reservation_ty... | javascript | chosen |
[
{
"from": "system",
"value": "Add logging to debug failure on Travis CI\n"
},
{
"from": "human",
"value": "import {exec} from 'node-promise-es6/child-process';\nimport fs from 'node-promise-es6/fs';\n\nasync function run() {\n const {linkDependencies = {}} = await fs.readJson('package.json');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Test eager attribute and children\n"
},
{
"from": "human",
"value": "function render() {\n return (<root>\n <div class=\"my-class\"></div>\n <div class={\"my-class\"}></div>\n <div class={myClass}></div>\n <div class={props.myClass}></div>\n <div pro... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic bootstrap styling for table in dummy app\n"
},
{
"from": "human",
"value": "/*jshint node:true*/\n/* global require, module */\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n var app = new EmberA... | javascript | chosen |
[
{
"from": "system",
"value": "Make new style editor and inspector work\n\nChange-Id: I115da3f3ca3efa4f4cc846debac4734a4c1569a6\nReviewed-on: https://robertou.com/gerrit/306\nTested-by: Jenkins CI\nReviewed-by: Kyle Zentner <f75b86e3af539008d20a21b76724217a6a08bb10@pioneers.berkeley.edu>\n"
},
{
"fro... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with map activating\n"
},
{
"from": "human",
"value": "(function () {\n $(document).foundation();\n\n smoothScroll.init({\n speed: 500,\n offset: 50\n });\n\n $('section.place .row.embed').on('click', function () {\n $(this).find('iframe').css... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spelling of variable name.\n"
},
{
"from": "human",
"value": "/*\n * grunt-strip-comments\n * https://github.com/kkemple/grunt-strip-comments\n *\n * Copyright (c) 2013 Kurtis Kemple\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = f... | javascript | chosen |
[
{
"from": "system",
"value": "Move returning promise up to test if it resolves messaging issue\n"
},
{
"from": "human",
"value": "const { exec } = require('child_process');\nconst EventEmitter = require('events');\n\nclass Execute extends EventEmitter {\n constructor(options) {\n super();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add input file name on error\n\nThis commit adds the name of the potential output file which is not written\nbecause there are no characters saved and thus the output does not differ from\nthe input file.\n"
},
{
"from": "human",
"value": "/*\n * grunt-contrib-htmlm... | javascript | chosen |
[
{
"from": "system",
"value": "Complete test for heading IDs\n"
},
{
"from": "human",
"value": "var mock = require('./mock');\n\ndescribe('Page', function() {\n var book;\n\n before(function() {\n return mock.setupDefaultBook({\n 'heading.md': '# Hello\\n\\n## World'\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use load in order to have correct path\n"
},
{
"from": "human",
"value": "'use strict';\n/*\nload('rgb8.png').then(function (a) {\n var b = a.clone().invert();\n setLeft(a);\n setRight(b);\n});\n*/\n\n/*load('rgb8.png').then(function (a) {\n setLeft(a);\... | javascript | chosen |
[
{
"from": "system",
"value": "Rename the DB from mydb to rose\n"
},
{
"from": "human",
"value": "var debug = require('debug')('rose');\nvar mongoose = require('mongoose');\n\nvar mongoURI = process.env.MONGOLAB_URI || 'mongodb://localhost/mydb';\ndebug('Connecting to MongoDB at ' + mongoURI + '.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue that was blocking incoming connections in production.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\n\nvar rootPath = path.normalize(__dirname + '/../../..');\n\nmodule.exports = {\n root: rootPath,\n port: process.env.P... | javascript | chosen |
[
{
"from": "system",
"value": "Check before calling a function\n"
},
{
"from": "human",
"value": "module.exports = {\n add: add,\n get: get,\n isSupported: isSupported\n};\n\nvar rules = {};\n\n// Functions should return the string to be appended to a key to find the pluralized\n// form ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix failing Class tests in IE11\n\nThese were introduced in https://github.com/sinonjs/samsam/pull/38\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction getClassName(value) {\n return value.constructor ? value.constructor.name : null;\n}\n\nmodule.exp... | javascript | chosen |
[
{
"from": "system",
"value": "Add logic to handle vertical screens\n"
},
{
"from": "human",
"value": "function setCarouselSize() {\n var wWidth = $(window).width();\n var wHeight = $(window).height();\n \n if (wHeight > wWidth) {\n var containerHeight = wHeight * $('.img-carto... | javascript | chosen |
[
{
"from": "system",
"value": "Update to use US English\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar helpers = require('../helpers'),\n yaml = require('js-yaml'),\n fs = require('fs'),\n path = require('path');\n\nvar properties = yaml.safeLoad(fs.readFileSync(path.join(__dirn... | javascript | chosen |
[
{
"from": "system",
"value": "Switch from phantomjs to headless chrome\n"
},
{
"from": "human",
"value": "/* eslint-env node */\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: ['PhantomJS'],\n launch_in_dev: ['Chrome'],\n};\n"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for Argument setter.\n"
},
{
"from": "human",
"value": "\ndefine(\n[\n 'chai',\n 'fixtures',\n 'argumenta/widgets/Argument',\n 'argumenta/widgets/Base'\n],\nfunction(chai, fixtures, Argument, Base) {\n\n var assert = chai.assert;\n\n descr... | javascript | chosen |
[
{
"from": "system",
"value": "Write faster query for seeding users\n"
},
{
"from": "human",
"value": "import { Accounts } from 'meteor/accounts-base';\n\nconst seedUsers = () => {\n const userCount = Meteor.users.find().count();\n\n if (userCount === 0) {\n Accounts.createUser({\n user... | javascript | chosen |
[
{
"from": "system",
"value": "Add location and arrays for notifications\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\nvar bcrypt = require('bcrypt');\n\nvar SALT_WORK_FACTOR = 10;\n\nvar UserSchema = new Schema({\n \"email\": { type: Stri... | javascript | chosen |
[
{
"from": "system",
"value": "Add an option to create just the module file\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst program = require(\"commander\");\nconst _ = require(\"lodash\");\nconst utils = require(\"./utils\");\nvar dest = \"\";\n\nprogram\n .usage(\"<module-nam... | javascript | chosen |
[
{
"from": "system",
"value": "Fix copy paste error on new mixin\n"
},
{
"from": "human",
"value": "\"use strict\";\r\n/**\r\n * Since only a single constructor is being exported as module.exports this comment isn't documented.\r\n * The class and module are the same thing, the contructor comment... | javascript | chosen |
[
{
"from": "system",
"value": "Allow the use of arrow functions in Node"
},
{
"from": "human",
"value": "module.exports = {\n \"extends\": \"chiton/configurations/default\",\n \"env\": {\n \"node\": true\n },\n \"rules\": {\n \"callback-return\": 2,\n \"handle-callback-err\": 2,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add const winner to improve readability\n"
},
{
"from": "human",
"value": "import { filter, head } from 'ramda';\nimport { emptyValue } from './constants';\nimport getPosition from './getPosition';\n\nconst positionsToCheck = [\n [0, 1, 2],\n [3, 4, 5],\n [6, 7, ... | javascript | chosen |
[
{
"from": "system",
"value": "Use longer class name in development\n"
},
{
"from": "human",
"value": "const webpack = require('webpack')\nconst MiniCssExtractPlugin = require('mini-css-extract-plugin')\nconst {ENV} = require('./paths')\n\nconst cssLoader = {\n loader: 'css-loader',\n options: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix use of 'const' to redefine existing variable in tests.\n"
},
{
"from": "human",
"value": "const request = require('./request')\n\nmodule.exports = requestPromise\n\nfunction requestPromise(opts) {\n return new Promise(function(resolve, reject) {\n request(op... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.