conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Handle 2 digit year DOBs\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular\n .module('core.formData')\n .factory('FormDataService', FormDataService);\n\n FormDataService.$inject = ['$sessionStorage', '_'];\n\n /* @ngInject */\n ...
javascript
chosen
[ { "from": "system", "value": "Hide section on demand for the overview page\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { hasPermission } from 'proton-shared/lib/helpers/permissions';\n\nimport LinkItem from './LinkItem';\n\nconst Sec...
javascript
chosen
[ { "from": "system", "value": "Set jQuery to noConflict mode for better compatability\n" }, { "from": "human", "value": "/* =============================================================\n * houdini.js v1.0.0\n * A simple collapse and expand widget.\n * Script by Chris Ferdinandi - http://gomaketh...
javascript
chosen
[ { "from": "system", "value": "Import: Fix some type issues in tests\n\nRemoves type warnings from J2CL JRE tests.\n\ncommit 9f949507a687e7f9d40aa1eae27958a1e69125ee\nAuthor: Goktug Gokdogan <goktug@google.com>\nDate: Thu Jun 8 15:44:52 2017 -0700\n\n Fix some type issues in tests\n\n Change-Id: I963...
javascript
chosen
[ { "from": "system", "value": "Remove empty line from event util\n" }, { "from": "human", "value": "export const getTouches = (event) => event.nativeEvent.touches;\n\n/*\n * Get angle\n *\n * Diff between current angle and initial angle\n *\n * @param {Object} initial event\n * @param {Object} st...
javascript
chosen
[ { "from": "system", "value": "[CLEANUP] Convert dasherize test over to new style\n" }, { "from": "human", "value": "import COMPONENT_NAME_SIMPLE_DASHERIZE_CACHE from '../../lib/system/dasherize-component-name';\n\nQUnit.module('dasherize-component-name', function() {\n function equals(input, ex...
javascript
chosen
[ { "from": "system", "value": "Make a simple test pass.\n" }, { "from": "human", "value": "\"use strict\";\n\nclass Client {\n constructor () {\n \n }\n}\n\nmodule.exports = Client;\n" }, { "from": "gpt", "value": "\"use strict\";\n\nclass Client {\n constructor (config) {\n ...
javascript
chosen
[ { "from": "human", "value": "Complete lesson 9 - alerts\n" }, { "from": "gpt", "value": "function Alerts() {\n\tvar self = Ti.UI.createWindow({\n\t\ttitle : 'Alerts',\n\t});\n\talert('say hello');\n\tvar alertButton = Ti.UI.createButton({\n\t\ttitle : 'Click Me for Alert',\n\t\tborderColor : 'Re...
javascript
chosen
[ { "from": "system", "value": "REMOVE unnecessary comment, bug is fixed\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { SyntaxHighlighter } from '@storybook/components';\n\n// XXX: is this a bug? should it be (props) => ?\nconst Code = ...
javascript
chosen
[ { "from": "system", "value": "Add title and company columns to seeds file\n" }, { "from": "human", "value": "'use strict';\n\nexports.seed = function(knex) {\n return knex('contacts').del()\n .then(() => {\n return knex('contacts').insert([{\n id: 1,\n first_name: 'bobby',...
javascript
chosen
[ { "from": "system", "value": "Update comments in message repo remote\n" }, { "from": "human", "value": "'use strict';\n\nvar request = require('superagent');\nvar glimpse = require('glimpse');\n\nmodule.exports = {\n triggerGetLastestSummaries: function() {\n // TODO: need to pull this...
javascript
chosen
[ { "from": "system", "value": "Make the settings of database and connect to database\n" }, { "from": "human", "value": "const mysql = require('mysql')\n\nmodule.exports = (dbSetting) => {\n let connection = mysql.createConnection({\n host: dbSetting.hostname,\n user: dbSetting.username,\n ...
javascript
chosen
[ { "from": "system", "value": "Disable logging if NODE_ENV === 'test'.\n" }, { "from": "human", "value": "const fs = require('fs')\nconst _ = require('lodash')\n\nlet isDisabled = false\n\nfunction buildMessage(obj) {\n if(typeof obj === 'string') {\n return obj + '\\r\\n'\n } else if(obj in...
javascript
chosen
[ { "from": "system", "value": "Add a size option to the ocConfirm service\n" }, { "from": "human", "value": "angular.module('orderCloud')\n .factory('ocConfirm', OrderCloudConfirmService)\n .controller('ConfirmModalCtrl', ConfirmModalController)\n;\n\nfunction OrderCloudConfirmService($uibM...
javascript
chosen
[ { "from": "system", "value": "Set first tab as active by default, fix undefined error\n" }, { "from": "human", "value": "/**\n * Toolkit JavaScript\n */\n\n// Tabs\nfunction Tabs (tab) {\n this.tabsItem = tab;\n\n this.displayTabs = function (active) {\n var tabsContent = this.tabsItem.quer...
javascript
chosen
[ { "from": "system", "value": "Include polyfills on browser tests\n\n" }, { "from": "human", "value": "const dotenv = require('dotenv');\nconst webpack = require('webpack');\n\ndotenv.load({\n silent: true,\n path: '../../.env'\n});\n\nmodule.exports = {\n entry: '!mocha-loader!./test.js',\n ...
javascript
chosen
[ { "from": "system", "value": "Fix AudioContext issue in Safari" }, { "from": "human", "value": "// Wrap browser AudioContext because we shouldn't create more than one\nconst AUDIO_CONTEXT = new AudioContext();\n\nmodule.exports = function () {\n return AUDIO_CONTEXT;\n};\n" }, { "from...
javascript
chosen
[ { "from": "system", "value": "Use short loader name, without '-loader'\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\n\n/**\n * This is the Webpack configuration file for production.\n */\nmodule.exports = {\n entry: path.join(__dirname, \"app...
javascript
chosen
[ { "from": "system", "value": "Stop using reserved JavaScript keyword `package`\n" }, { "from": "human", "value": "'use babel';\n\n\nexport function loadFile(path) {\n return window.nvim.command(`e ${path}`);\n}\n\nexport async function loadFileGetBufferContents(path) {\n await loadFile(pat...
javascript
chosen
[ { "from": "system", "value": "Add docstring to export investment project mock\n" }, { "from": "human", "value": "var investmentProjects = require('../../../fixtures/v3/search/investment-project.json')\n\nexports.investmentProjects = function (req, res) {\n const hasFilters = !!(\n req.body.e...
javascript
chosen
[ { "from": "system", "value": "Add Support for More Raw Data Fields\n" }, { "from": "human", "value": "module.exports= {\n\tviews: [{\n\t\t\"name\": \"Raw Match Data\",\n\t\t\"view\": \"matches\"\n\t}],\n\t\n\tmatches: function (mongoCollection, callback) {\n\t\tmongoCollection\n\t\t\t.find()\n\t...
javascript
chosen
[ { "from": "system", "value": "Add export of action constants\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\nexport { DataTablePageReducer } from './reducer';\nexport { COLUMN_TYPES, COLUMN_NAMES, COLUMN_KEYS } from './constants';\nexport ...
javascript
chosen
[ { "from": "system", "value": "Make in-repo-addon blueprint 'use strict'." }, { "from": "human", "value": "/*jshint node:true*/\nmodule.exports = {\n name: '<%= dasherizedModuleName %>',\n\n isDevelopingAddon: function() {\n return true;\n }\n};\n" }, { "from": "gpt", "value": "...
javascript
chosen
[ { "from": "system", "value": "Bring in visitedUsers set support\n" }, { "from": "human", "value": "// Routes for the views.\n\n'use strict';\n\nvar db = require('mano').db;\n\nmodule.exports = {\n\t'/': require('../view/users-table'),\n\t'new-user': require('../view/user-create'),\n\t'user/[0-9]...
javascript
chosen
[ { "from": "system", "value": "Use proper CSS class for pairing view\n" }, { "from": "human", "value": "module.exports = Backbone.View.extend({\n\n className: 'main_price main_wrap',\n\n initialize: function(){\n\n var self = this\n\n self.$el.html(ss.tmpl['main-pairing'].render()).append...
javascript
chosen
[ { "from": "system", "value": "Update feed-page-size given new feeds\n" }, { "from": "human", "value": "var app = require('connect')();\nvar createRepostGuard = require('./src/repost-guard');\nvar fs = require('fs');\nvar log = require('./src/util').log;\nvar path = require('path');\n\n// Keeping...
javascript
chosen
[ { "from": "system", "value": "Add NYT module and refacotr weather\n" }, { "from": "human", "value": "var express = require('express'),\n routes = require('./routes'),\n path = require('path'),\n weather = require('./routes/weather'),\n npr = require('./routes/npr'),\n nyt = requir...
javascript
chosen
[ { "from": "system", "value": "Add json and file handler\n" }, { "from": "human", "value": "var express = require('express');\n\nvar app = express();\n\napp.set('port',3000);\n\n\n\nvar server = app.listen(app.get('port'), function() {\n\tvar port = server.address().port;\n\tconsole.log('Magic ha...
javascript
chosen
[ { "from": "system", "value": "Revert \"Attempt to fix file upload issue\"\n\nThis reverts commit 88b247bdf20748cb2419331461b0208a1c73a2d5.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar express = require(\"express\");\nvar I18n = require(\"i18n-2\");\nvar config = require(\"./conf...
javascript
chosen
[ { "from": "system", "value": "Set port number to 80" }, { "from": "human", "value": "/* TODOs:\n * - validate query parameters\n */\n\nvar restify = require('restify'),\n server = restify.createServer()\n\nserver.use(restify.queryParser())\n\n// Number of sides, default is 6 \nvar sides = [4...
javascript
chosen
[ { "from": "system", "value": "Add comment docs for Box function\n" }, { "from": "human", "value": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint asi: true undef: true es5: true node: true browser: true devel: true\n forin: true latedef: false globalstrict: true */\n\n'use strict';\n\...
javascript
chosen
[ { "from": "system", "value": "Set exit code and signal\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\nvar replHistory = require('repl.history');\n\nvar Repl = require('repl'),\n spawnSync = require('child_process').spawnSync;\n\n\nif (process.argv.length == 2) {\n v...
javascript
chosen
[ { "from": "system", "value": "Make compatible with hydro 0.6\n" }, { "from": "human", "value": "/**\n * External dependencies.\n */\n\nvar Formatter = require('hydro-formatter');\n\n/**\n * Simple formatter.\n *\n * @constructor\n */\n\nvar Simple = Formatter.extend();\n\n/**\n * After all tests...
javascript
chosen
[ { "from": "system", "value": "Fix production build (use old webpack config syntax because webpack blocks)\n" }, { "from": "human", "value": "module.exports = function myVueLoader() {\n\n return () => ({\n\n module: {\n rules: [ {\n test: /\\.vue$/,\n ...
javascript
chosen
[ { "from": "system", "value": "Rename variable to conform to naming convention\n" }, { "from": "human", "value": "\"use strict\";\n\nvar request = require('request-promise');\n\nconst baseUrl = 'https://api.yelp.com/v3/';\n\nclass Yelpv3 {\n\n constructor(opts) {\n this.apiKey = opts.ap...
javascript
chosen
[ { "from": "system", "value": "Add defaults to all questions\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nconst { resolve } = require('path')\nconst { prompt } = require('inquirer')\nconst gulp = require('gulp')\nconst ejs = require('gulp-ejs')\n\ninit()\n\nfunction init () {\n cons...
javascript
chosen
[ { "from": "system", "value": "Fix request logger for use cases when childLogger middleware was not\nused.\n" }, { "from": "human", "value": "var uuid = require('node-uuid');\nvar bunyan = require('bunyan');\n\n\nmodule.exports = function(loggerInstance) {\n if (!loggerInstance) {\n var o...
javascript
chosen
[ { "from": "system", "value": "Add 'NewLine' to list of expected node types\n\nCloses #1" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = walkAST;\nfunction walkAST(ast, before, after) {\n function replace(replacement) {\n ast = replacement;\n }\n var result = before && be...
javascript
chosen
[ { "from": "system", "value": "Remove sendJson(), stringify non-string data\n" }, { "from": "human", "value": "module.exports = EventSender;\n\nfunction EventSender(httpResponse) {\n this.httpResponse = httpResponse;\n this.httpResponse.setHeader('Content-Type', 'text/event-stream');\n}\n\nEven...
javascript
chosen
[ { "from": "system", "value": "Check that the port is an integer number\n" }, { "from": "human", "value": "module.exports = (function() {\n function chimneypot(opts) {\n if (!opts || !isOptionsValid(opts)) {\n throw new Error(\"Required options: port, path, secret\");\n }\n }\n\n fu...
javascript
chosen
[ { "from": "system", "value": "Add information about date confirmed\n" }, { "from": "human", "value": "var Promise = require('bluebird');\nvar moment = require('moment');\n\nmodule.exports = {\n createOrSave: function(app, tournament) {\n if (!app.googleCalendar) {\n return Promise.rejec...
javascript
chosen
[ { "from": "system", "value": "Format user from clean start\n" }, { "from": "human", "value": "module.exports = function initialize(params) {\n const knex = params.knex;\n\n function userForSession(req) {\n if (!req.session.id) return Promise.resolve(null);\n return knex('sessions')\n ...
javascript
chosen
[ { "from": "system", "value": "Make production build exit the process normally\n\n" }, { "from": "human", "value": "const path = require('path');\r\nconst config = require('../config/server.env');\r\nconst nodeExternals = require('webpack-node-externals');\r\n\r\nfunction resolve(dir) {\r\n retu...
javascript
chosen
[ { "from": "system", "value": "Add debug log info to CD server.\n" }, { "from": "human", "value": "// Continuous delivery server\nconst { spawn } = require('child_process')\nconst { resolve } = require('path')\nconst { createServer } = require('http')\nconst { parse } = require('qs')\n\nconst hos...
javascript
chosen
[ { "from": "system", "value": "Extend example - add route returning desired status code\n" }, { "from": "human", "value": "/* eslint no-console: \"off\" */\n\nconst express = require('express');\n\nconst app = express();\n\napp.use(require('../index')({ path: '/' }));\napp.use(require('express-fa...
javascript
chosen
[ { "from": "human", "value": "Create simple profile component for dashboard\n" }, { "from": "gpt", "value": "import React from 'react';\n\nconst Profile = (props) => (\n <div className=\"profile\">\n <img className=\"profile-avatar\" src={props.profile.avatar} alt=\"avatar\"></img>\n <p cl...
javascript
chosen
[ { "from": "system", "value": "Add manual test task to prove this actually works\n" }, { "from": "human", "value": "var gulp = require(\"gulp\");\nvar ava = require(\"gulp-ava\");\nvar jscs = require(\"gulp-jscs\");\n\ngulp.task(\"lint\", function()\n{\n gulp.src(\"GulpFlow.js\")\n .pip...
javascript
chosen
[ { "from": "system", "value": "Add CEC tx command support\n" }, { "from": "human", "value": "var Houmio = require('./js/lib/houm/v2')\nvar Cec = require('./js/lib/cec/cec')\n\nHoumio.init({protocol: 'cec'}, function(events) {\n var powerCommands = events\n .filter(isCec)\n .filter(isWr...
javascript
chosen
[ { "from": "system", "value": "Fix gulp cannot build all files\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n concat = require('gulp-concat');\n jshint = require('gulp-jshint');\n uglify = require('gulp-uglify');\n rename = require('gulp-rename');\n amdOptimize = ...
javascript
chosen
[ { "from": "system", "value": "Remove host in default doc fetch URL\n\nThis host is unnecessary because it is equal to the current host, which\nis equivalent to not specifying it at all.\nIf using the webjar, then the doc endpoint in on the same server at\n/jsondoc, so \"/jsondoc\" is sufficient for the fetc...
javascript
chosen
[ { "from": "system", "value": "Use ceil not floor to get the edges\n" }, { "from": "human", "value": "import ROT from \"rot-js\";\nROT.Display.prototype.drawWorld = function(world, playerPos) {\n let curOpts = display.getOptions();\n let top = Math.floor(playerPos.y - curOpts.height / 2);\n le...
javascript
chosen
[ { "from": "system", "value": "Add minimize task to default\n" }, { "from": "human", "value": "//Import dependencies\nvar gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar uglify = require('gulp-uglify');\nvar rename = require('gulp-rename');\nvar header = require('gulp-header');...
javascript
chosen
[ { "from": "system", "value": "Apply lint to easy client\n" }, { "from": "human", "value": "var Http = require('http');\n\nclass EasyClient {\n constructor(options) {\n this.options = options\n this.postData = options.data;\n }\n\n static get(options) {\n }\n\n call(success) {\n var...
javascript
chosen
[ { "from": "system", "value": "Add workout url and slack name to user" }, { "from": "human", "value": "export default class User {\n constructor(params) {\n this.email = params.email;\n this.name = params.name;\n this.gravatar = params.gravatar;\n this.status = params.activity_status...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary checks for V2 tokens\n" }, { "from": "human", "value": "/* global btoa */\nconst V2TOKEN_ABORT_TIMEOUT = 3000\n\nexport function getAccessToken () {\n return new Promise(function (resolve, reject) {\n if (typeof window === 'undefined') {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove debug code accidentally checked in.\n" }, { "from": "human", "value": "compiler.tools.error = def(\n [\n ],\n\n function () {\n var die = function (message, code) {\n console.error(\"error: \" + message + \"\\n\");\n// process.exit(code || 1...
javascript
chosen
[ { "from": "system", "value": "ImageAdapter: Make last backslash optional when parsing HTML.\n" }, { "from": "human", "value": "ImageAdapter = {\n\tname: 'ImageAdapter',\n\n\thandles : [\n\t\t'image',\n\t\t'image_edit'\n\t],\n\n\ttoHTML: function(data) {\n\t\tvar file = data.file || '';\n\t\tretu...
javascript
chosen
[ { "from": "system", "value": "Update eslint with babel-eslint parser\n" }, { "from": "human", "value": "module.exports = {\n env: {\n browser: true,\n es6: true,\n },\n extends: [\n 'airbnb',\n 'plugin:import/errors',\n 'plugin:import/warnings'\n ],\n globals: {\n Atomics:...
javascript
chosen
[ { "from": "system", "value": "FIX: Update env to work with new rails\n\nUpdated rails version will not create endpoints that are publically\naccessible. Therefore, change environment to work with localhost.\n" }, { "from": "human", "value": "module.exports = {\n env: {\n options: {\n //...
javascript
chosen
[ { "from": "system", "value": "Remove the rest of the spinner js since no input\n" }, { "from": "human", "value": "$(document).ready(function() {\n // remove class if javascript is enabled\n $(\"body\").removeClass(\"no-js\");\n\n // to pop out videos so they play in the browser for users with...
javascript
chosen
[ { "from": "system", "value": "Rearrange look & feel of `eslint` configuration\n" }, { "from": "human", "value": "const { join } = require(\"path\");\nconst ESLintPresets = require(\"@manuth/eslint-plugin-typescript\");\n\nmodule.exports = {\n extends: [\n `plugin:${ESLintPresets.Plugin...
javascript
chosen
[ { "from": "system", "value": "Revert \"expand PATRIC color palette\"\n\nThis reverts commit cb1421727fd0a7c6a6365097cdd26a7a11b929f3.\n" }, { "from": "human", "value": "define([\n\t\"dojox/charting/SimpleTheme\",\n\t\"dojox/charting/themes/common\"\n], function(SimpleTheme, themes){\n\n\tthemes....
javascript
chosen
[ { "from": "system", "value": "Remove GS from internal header\n" }, { "from": "human", "value": "var fetch = require('node-fetch');\nvar FormData = require('form-data');\n\nmodule.exports = () => {\n const scriptURL = 'https://script.google.com/macros/s/AKfycbxavhMbZpTlCuRHdUauf2hkGcx4uHTZ2TpSx5...
javascript
chosen
[ { "from": "system", "value": "Remove margintop from restart button to keep it on screen\n" }, { "from": "human", "value": "import { StyleSheet, Dimensions } from 'react-native';\n\nexport default StyleSheet.create({\n button: {\n height: 45,\n borderRadius: 5,\n marginHorizontal: 5,\n ...
javascript
chosen
[ { "from": "system", "value": "Disable fires in the last 7 days on map\n" }, { "from": "human", "value": "import { fetchFireAlertsByGeostore } from 'services/analysis';\n\nimport {\n POLITICAL_BOUNDARIES_DATASET,\n FIRES_VIIRS_DATASET,\n} from 'data/datasets';\nimport {\n DISPUTED_POLITICAL_BO...
javascript
chosen
[ { "from": "system", "value": "Use date header for event timestamp, if available;\n" }, { "from": "human", "value": "\nvar buckets = require('./buckets');\nvar express = require('express');\nvar bodyParser = require('body-parser');\nvar app = express();\n\n// read the body of any content type as ...
javascript
chosen
[ { "from": "system", "value": "Remove colors from vue data\n" }, { "from": "human", "value": "import Vue from 'vue'\nimport VueFire from 'vuefire'\nimport App from './App'\nimport db from './firebaseDatabase'\n\nimport 'jquery-ui/jquery-ui.min.js'\n\nimport 'jquery.ns-autogrow'\n\nimport imagesLo...
javascript
chosen
[ { "from": "system", "value": "Add fetch polyfill to entry file\n" }, { "from": "human", "value": "import 'babel-polyfill'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport createStore from './store/createStore'\nimport AppContainer from './containers/AppContainer'\n// import f...
javascript
chosen
[ { "from": "system", "value": "Implement COMMIT and ROLLBACK actions\n" }, { "from": "human", "value": "import mobx from 'mobx';\nimport { stringify, parse } from 'jsan';\nimport { setValue } from './utils';\n\nexport const isMonitorAction = (store) => store.__isRemotedevAction === true;\n\nexpor...
javascript
chosen
[ { "from": "system", "value": "Make sure function has constructor\n" }, { "from": "human", "value": "'use strict';\n\n/*\n * Lots of things get wrapped in output(...args)\n * This function basically just makes sure the right stuffs\n * gets output\n */\nmodule.exports = function output(obj, ...ar...
javascript
chosen
[ { "from": "system", "value": "Add get all posts route\n" }, { "from": "human", "value": "import Job from './handlers/job'\nimport Home from './handlers/home'\nimport Github from './handlers/github'\nimport Ping from './handlers/ping'\nimport Post from './handlers/post'\n\nexport default [\n { m...
javascript
chosen
[ { "from": "system", "value": "Update PureComponent to extend React.PureComponent.\n" }, { "from": "human", "value": "/* eslint-disable no-unused-vars, class-methods-use-this */\nimport { Component } from 'react';\n\nclass ReactComponentUpdate extends Component {\n\tcomponentWillMount() {\n\t\tth...
javascript
chosen
[ { "from": "system", "value": "Fix default locale is lost\n\nhttps://github.com/rancher/rancher/issues/20790\n" }, { "from": "human", "value": "import { inject as service } from '@ember/service';\nimport { get } from '@ember/object';\nimport Helper from '@ember/component/helper';\n\nexport defaul...
javascript
chosen
[ { "from": "system", "value": "Use the new jspm API\n" }, { "from": "human", "value": "import jspm from 'jspm';\n\nimport * as paths from './paths';\nimport gulp from './_gulp';\n\n\nexport default (options) => {\n const builder = new jspm.Builder();\n\n return builder.buildStatic(paths.MAIN_SR...
javascript
chosen
[ { "from": "system", "value": "Add us capitals to seed file\n" }, { "from": "human", "value": "/* -*- mode: js2; js2-basic-offset: 2; indent-tabs-mode: nil -*- */\n/**\nThis file is provided to you under the Apache License,\nVersion 2.0 (the \"License\"); you may not use this file\nexcept in comp...
javascript
chosen
[ { "from": "system", "value": "Increase timeout in ember tests\n\nno issue\n- increases individual test timeout from 5sec to 15sec\n\nIt seems Travis is occasionally _very_ slow and will timeout on heavier acceptance tests resulting in random failures. Hopefully this will reduce the number of random test fai...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"import BS sources\"\"\n\nThis reverts commit 1bd13ac67152b33f974ce32402100a0f651c3091.\n" }, { "from": "human", "value": "/*\n * This is the main entry point.\n *\n * You can import other modules here, including external packages. When bundling usi...
javascript
chosen
[ { "from": "system", "value": "Add tests for GitHub username\n" }, { "from": "human", "value": "/*global describe, beforeEach, it*/\n'use strict';\n\nvar assert = require('assert');\nvar validator = require('../app/validator');\n\ndescribe('input validation', function () {\n describe('element ...
javascript
chosen
[ { "from": "system", "value": "Add js for aria-labelledby in conversations\n" }, { "from": "human", "value": "// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later\n\napp.views.ConversationsForm = Backbone.View.extend({\n\n events: {\n \"key...
javascript
chosen
[ { "from": "system", "value": "Use LTS endpoint on Lts explore page\n" }, { "from": "human", "value": "import { createAction } from 'redux-actions';\nimport { createThunkAction } from 'utils/redux';\nimport isEmpty from 'lodash/isEmpty';\n\n/* @tmpfix: remove usage of indcTransform */\nimport ind...
javascript
chosen
[ { "from": "system", "value": "Fix hound code style issues\n" }, { "from": "human", "value": "'use strict';\n\nimport chai from 'chai';\nimport {ObjectVector} from '../../lib.compiled/Generic/ObjectVector';\n\nsuite('Generic/ObjectVector', function() {\n var TestProto = () => {\n return 'test...
javascript
chosen
[ { "from": "system", "value": "Make sure we require the Query class and expose it as an export.\n" }, { "from": "human", "value": "exports.Client = require('./client');\r\nexports.Url = require('./url');\r\nexports.Version = require(__dirname + '/../package.json').version;" }, { "fro...
javascript
chosen
[ { "from": "system", "value": "Upgrade from v4 to v5" }, { "from": "human", "value": "/**\n * @author Hamza Waqas <hamzawaqas@live.com>\n * @since 1/14/14\n */\n\n(function() {\n\n var _ = require('lodash');\n\n var Main = function(apiKey) {\n var _services = ['name', 'search', 't...
javascript
chosen
[ { "from": "system", "value": "Add a couple more tests, use => style func declaration\n" }, { "from": "human", "value": "const path = require('path');\nvar Application = require('spectron').Application;\nvar assert = require('assert');\n\ndescribe('application launch', function() {\n this.timeou...
javascript
chosen
[ { "from": "system", "value": "Use the parent id object in the toString method\n" }, { "from": "human", "value": "var Deffy = require(\"deffy\")\n , Typpy = require(\"typpy\")\n ;\n\nvar SEPARATOR = \"_\";\n\nfunction SubElmId(type, name, parent) {\n\n if (Typpy(type, SubElm)) {\n par...
javascript
chosen
[ { "from": "system", "value": "Fix wrong-month bug, in the overwiew\n" }, { "from": "human", "value": "var CustomDate = function (date) {\n if(date){\n this.date = date;\n }\n else {\n this.date = new Date();\n }\n};\n\nCustomDate.prototype.getDay = function () {\n return...
javascript
chosen
[ { "from": "system", "value": "Remove redundant call to util.inspect.\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Run package tests.\n * (C) 2013 Alex Fernández.\n */\n\n// requires\nvar testing = require('testing');\nvar _prettyPrint = require('util').inspect;\n\n\n/**\n * Test t...
javascript
chosen
[ { "from": "system", "value": "Fix lint errors in test.\n" }, { "from": "human", "value": "var fs = require(\"fs\");\n\nvar FILE_NAME = \"test.txt\";\n\nexports.result = function result() {\n try {\n return fs.readFileSync(FILE_NAME, {encoding: \"utf8\"});\n }\n catch (err) {\n console.e...
javascript
chosen
[ { "from": "system", "value": "Improve sourcemaps support for buble\n" }, { "from": "human", "value": "const {transform} = require('buble');\nconst {EOL} = require('os');\n\nmodule.exports = function({source, filename, map: inputSourceMap}, options) {\n options = options || {};\n const defa...
javascript
chosen
[ { "from": "system", "value": "Add getThreshold utility to deal with 100%, 0.5 and 128\n" }, { "from": "human", "value": "/**\n * Converts a factor value to a number between 0 and 1\n * @param value\n */\nexport function getFactor(value) {\n if (typeof value === 'string') {\n const last...
javascript
chosen
[ { "from": "system", "value": "Fix error redirect login page\n" }, { "from": "human", "value": "'use strict'\n\nconst Hash = use('Hash');\nconst Admin = use('App/Model/Admin');\nclass AdminLoginController {\n\n * index (request, response) {\n const view = yield response.view('backend/Log...
javascript
chosen
[ { "from": "system", "value": "Change calls to Titanium to Ti" }, { "from": "human", "value": "var tray = Ti.UI.addTray('tray.png'),\n menu = Ti.UI.createMenu(),\n\n //Add some menu items\n menuItems = [\n\n Titanium.UI.createMenuItem('Change Icon', function(e) {\n //So...
javascript
chosen
[ { "from": "system", "value": "Revert \"temp fix for travis\"\n\nThis reverts commit 664cdc6786bcbbcf85a666ea46a9c8a91d3dbfce.\n" }, { "from": "human", "value": "module.exports = function (config) {\n config.set({\n basePath: '',\n frameworks: ['jasmine'],\n files: [\n 'js/lib/*.js...
javascript
chosen
[ { "from": "system", "value": "tests: Increase code coverage threshold to 95%.\n" }, { "from": "human", "value": "module.exports = {\n coveragePathIgnorePatterns: ['cli/src/Wrapper.tsx'],\n};\n" }, { "from": "gpt", "value": "module.exports = {\n coveragePathIgnorePatterns: ['cli/src...
javascript
chosen
[ { "from": "system", "value": "Add conditional get to the noditer example." }, { "from": "human", "value": "var Connect = require('./lib/connect');\n\nvar controlled = [\"/console/\", \"/files/\", \"/messages/\"];\n\nnew Connect.Server([\n // We want to log all http traffic\n {filter: \"log...
javascript
chosen
[ { "from": "system", "value": "Comment out default settings from dummy app\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically\...
javascript
chosen
[ { "from": "system", "value": "Add test extension to config\n" }, { "from": "human", "value": "module.exports = {\n\tinterpolate: /{{([\\s\\S]+?)}}/g,\n\tmodules: [\n\t\t{\n\t\t\ttype: 'service',\n\t\t\toutput: 'app/services/',\n\t\t\tfileTypes: '{js,test.js}'\n\t\t},\n\t\t{\n\t\t\ttype: 'filter'...
javascript
chosen
[ { "from": "system", "value": "Add support for mongo related environment variables\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n env: process.env.NODE_ENV,\n port: process.env.PORT || 3000,\n listen_host: process.env.LISTEN_HOST || '0.0.0.0',\n db: {\n name: 'nod...
javascript
chosen
[ { "from": "system", "value": "Add CLI instructions for using multiple packages.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\nvar gulp = require('gulp')\nrequire('../gulpfile');\n\nrequire('coa').Cmd() // main (top level) command declaration\n .name(process.argv[1]) // ...
javascript
chosen
[ { "from": "system", "value": "Fix the bug caused by Dropbox API v2\n" }, { "from": "human", "value": "var request = require('request');\n\nfunction dropboxImageDirectUrlParser(url, cb) {\n request({\n method: 'GET',\n uri: url,\n followRedirect: false\n }, function (error, response, b...
javascript
chosen