conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix error in expected TOC output\n" }, { "from": "human", "value": "/***************************************************************************\n * *\n * EXAMPLE1 ...
javascript
chosen
[ { "from": "system", "value": "Make new combined files disable the v1.0 warning (since the jax array is not set in these files)\n" }, { "from": "human", "value": "/*\n * %%% NAME %%%\n * \n * Copyright (c) 2010-11 Design Science, Inc.\n *\n * Part of the MathJax library.\n * See http://www.m...
javascript
chosen
[ { "from": "system", "value": "Fix Mongoose open() deprecation warning\n" }, { "from": "human", "value": "var mongoose = require('mongoose')\nvar config = require('config')\n\nmongoose.connect(config.db.url)\n" }, { "from": "gpt", "value": "var mongoose = require('mongoose')\nvar conf...
javascript
chosen
[ { "from": "system", "value": "Add 'use strict' for javascript's spec\n" }, { "from": "human", "value": "/**\n * Created by Victor Avendano on 1/10/15.\n * avenda@gmail.com\n */\n(function(){\n\n var mod = angular.module('routeScripts', ['ngRoute']);\n\n mod.directive('routeScripts', ['$roo...
javascript
chosen
[ { "from": "system", "value": "Fix bug where multiple chunks joined with an extra comma\n" }, { "from": "human", "value": "const fs = require('fs');\nconst debug = require('debug')('graph-wrangle:io');\nconst util = require('util');\n\nfunction loadGraphFromStdIn() {\n debug(`Reading graph from ...
javascript
chosen
[ { "from": "system", "value": "Create function for longest work\n" }, { "from": "human", "value": "// create an array of words with various lengths \n// use a function that counts character length for strings\n// iterate through this array with character count method\n// return the longest string...
javascript
chosen
[ { "from": "system", "value": "Add global text and link styling" }, { "from": "human", "value": "import Head from 'next/head';\n\nexport default () =>\n <header>\n <Head>\n <style global jsx>{`\n body {\n font-family: \"Helvetica Neue\", Arial, sans-serif;\n }\n ...
javascript
chosen
[ { "from": "system", "value": "Change \"Unread messages.\" to \"Jump to first unread message.\"\n\nAlso get rid of the \"up\" arrow so as not to indiciate direction. This is important because in future the RM will not be based on what has been paginated into the client (but instead RM will be handled server-...
javascript
chosen
[ { "from": "system", "value": "Fix gameday youtube not autoplaying\n" }, { "from": "human", "value": "import React from 'react'\nimport { webcastPropType } from '../../utils/webcastUtils'\n\nconst EmbedYoutube = (props) => {\n const src = `//www.youtube.com/embed/${props.webcast.channel}`\n ret...
javascript
chosen
[ { "from": "system", "value": "Set the file permission to public instead of private\n" }, { "from": "human", "value": "/* jshint loopfunc: true */\n'use strict';\n\n/**\n * @ngdoc function\n * @name bannerPreviewApp.controller:BannersEditCtrl\n * @description\n * # BannersEditCtrl\n * Controller ...
javascript
chosen
[ { "from": "system", "value": "Refactor and style datetime widget\n" }, { "from": "human", "value": "import { Component } from 'react'\nimport tinytime from 'tinytime'\n\nexport default class DateTime extends Component {\n static defaultProps = {\n interval: 10000\n }\n\n state = {\n dat...
javascript
chosen
[ { "from": "system", "value": "Add an endpoint for getting recordings\n" }, { "from": "human", "value": "'use strict';\n\nconst express = require('express');\nconst knex = require('knex');\nconst morgan = require('morgan');\n\n// Configuration\n\nconst DB_CONFIG = require('./knexfile');\nconst PO...
javascript
chosen
[ { "from": "system", "value": "Fix examples to reflect index move to modules\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\nvar webpack = require('webpack');\n\nfunction isDirectory(dir) {\n return fs.lstatSync(dir).isDirectory();\n}\n\nmodule.exports = ...
javascript
chosen
[ { "from": "system", "value": "Remove dynamic as it is currently not supported\n" }, { "from": "human", "value": "const async = require('./async')\n\nmodule.exports = (providers, cb) => {\n function setup(values) {\n const currentValues = values.reduce((pre, cur) => Object.assign(pre, cur), {...
javascript
chosen
[ { "from": "system", "value": "Disable \"trace@2\" for node 8\n" }, { "from": "human", "value": "/*!\n * trace-and-clarify-if-possible <https://github.com/nknapp/trace-and-clarify-if-possible>\n *\n * Copyright (c) 2016 Nils Knappmeier.\n * Released under the MIT license.\n */\n\n'use strict'\n\n...
javascript
chosen
[ { "from": "system", "value": "Add feature for setting and getting folder\n" }, { "from": "human", "value": "#!/usr/bin/env node\nconst init = require('./init');\nconst list = require('./list');\nconst newTodoMonth = require('./newTodoMonth');\nconst newTodo = require('./newTodo');\n\nconst argv ...
javascript
chosen
[ { "from": "system", "value": "feat: Add George as another \"user\"\n" }, { "from": "human", "value": "import { fromJS } from 'immutable';\nimport {\n CHANGE_USER,\n} from './constants';\n\nconst initialState = fromJS({\n currentUser: 1,\n users: [\n { userId: 1, name: 'Nico Greenarry' },\n...
javascript
chosen
[ { "from": "system", "value": "Uninstall `ember-cli-jshint` after addon installation\n" }, { "from": "human", "value": "module.exports = {\n name: 'ember-cli-eslint',\n\n normalizeEntityName: function() {\n // this prevents an error when the entityName is\n // not specified (since that do...
javascript
chosen
[ { "from": "system", "value": "Fix missing filePath in Error and PluginError.\n\nfile.contents = … somehow resets file.path on error so we have to store\nit. Also, React Error does not specify fileName, so add it if missing.\n" }, { "from": "human", "value": "'use strict';\nvar path = require('pa...
javascript
chosen
[ { "from": "system", "value": "Allow passing new messages for same locale\n" }, { "from": "human", "value": "import { Component, Children } from 'react'\nimport PropTypes from 'prop-types'\nimport Polyglot from 'node-polyglot'\n\n// Provider root component\nexport default class I18n extends Compo...
javascript
chosen
[ { "from": "system", "value": "Correct formatting bug when version contains pipe\n" }, { "from": "human", "value": "'use strict';\n\nvar cvss = require('cvss');\n\nmodule.exports = function (err, data, pkgPath) {\n\tif (err) {\n\t\treturn 'Debug output: ' + JSON.stringify(Buffer.isBuffer(data) ? ...
javascript
chosen
[ { "from": "system", "value": "Add route that catches 404's\n" }, { "from": "human", "value": "import React from \"react\";\nimport {IndexRedirect, Route} from \"react-router\";\n\nimport Admin from \"app/layouts/Admin\";\nimport users from \"app/users/routes\";\n\n\nexport default (\n <Route ...
javascript
chosen
[ { "from": "system", "value": "Use default parameter to fix null pointer exceptions\n" }, { "from": "human", "value": "export function reject(array, callback) {\n const results = [];\n array.forEach(itemInArray => {\n if (!callback(itemInArray)) {\n results.push(itemInArray);\n }\n ...
javascript
chosen
[ { "from": "system", "value": "Sort entries in the main list\n" }, { "from": "human", "value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0...
javascript
chosen
[ { "from": "system", "value": "Use the native process.nextTick when available.\n" }, { "from": "human", "value": "'use strict';\nmodule.exports = nextTick;\n\nfunction nextTick(fn) {\n var args = new Array(arguments.length - 1);\n var i = 0;\n while (i < args.length) {\n args[i++] = argumen...
javascript
chosen
[ { "from": "system", "value": "Add in the http module\n" }, { "from": "human", "value": "var config = require(\"../../shared/config\");\n\nvar observableModule = require(\"data/observable\");\n\nfunction User() {}\nUser.prototype = new observableModule.Observable();\nUser.prototype.login = functi...
javascript
chosen
[ { "from": "system", "value": "Use multiline regex to get the SSID\n" }, { "from": "human", "value": "'use strict';\n\nvar exec = require('child_process').exec;\n\nfunction filter(stdout, str) {\n\tvar regex = new RegExp(str);\n\n\tstdout = stdout.split('\\n').filter(function (el) {\n\t\treturn r...
javascript
chosen
[ { "from": "system", "value": "Format endless durations with Present\n" }, { "from": "human", "value": "function formatDuration(startYear, endYear, years) {\n if (startYear) {\n if (startYear === endYear) {\n return \"\" + startYear;\n }\n var duration = startYear + \"&ndash;\";\n ...
javascript
chosen
[ { "from": "system", "value": "Add Level constants to User Model\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar UserSchema = new Schema(\n{\n lastName : String,\n firstName : String,\n username : String,\n email...
javascript
chosen
[ { "from": "system", "value": "Read textures from WebGL correctly encoding floats\n" }, { "from": "human", "value": "// Read texture into Float array\n//\n// args:\n// r -- registration object\n// t -- texture to read\n// w -- width of buffer\n// h -- height of buffer\n\n\nfunction re...
javascript
chosen
[ { "from": "system", "value": "Test with alert showing interval\n" }, { "from": "human", "value": "var audio = document.getElementById(\"chris\");\n\nfunction pauseChris() {\n\tif (audio.currentTime >= 331000) {\n\t\taudio.pause();\n\t}\n}\n\nfunction playChris() {\n\taudio.currentTime = 952;\n\t...
javascript
chosen
[ { "from": "system", "value": "_s: Fix element for left arrow key code\n\nPrevious one was deprecated\n" }, { "from": "human", "value": "jQuery( document ).ready( function( $ ) {\n\t$( document ).keydown( function( e ) {\n\t\tvar url = false;\n\t\tif ( e.which === 37 ) { // Left arrow key code\n...
javascript
chosen
[ { "from": "system", "value": "Fix safari not showing login screen when server down\n" }, { "from": "human", "value": "define(\n [\n 'service/serviceBase'\n ],\n function (ServiceBase) {\n 'use strict';\n\n function UserService() {\n ServiceBase.call(this)...
javascript
chosen
[ { "from": "system", "value": "Edit copies of notes, rather than the objects from the sidebar.\n" }, { "from": "human", "value": "(function() {\n angular.module('notely')\n .service('NotesService', NotesService);\n\n NotesService.$inject = ['$http'];\n function NotesService($http) {\n va...
javascript
chosen
[ { "from": "system", "value": "Disable automatic header numbering for now\n" }, { "from": "human", "value": "function Structure()\n{\n this.outline = null;\n}\n\nStructure.prototype.numberHeadings = function()\n{\n var sectionNumbers = [0,0,0,0,0,0];\n for (var child = document.body.firs...
javascript
chosen
[ { "from": "system", "value": "Add header to petition response\n" }, { "from": "human", "value": "import React from 'react';\nimport styles from './petition-response.scss';\nimport settings from 'settings';\nimport Heading2 from 'components/Heading2';\nimport Paragraph from 'components/Paragraph'...
javascript
chosen
[ { "from": "system", "value": "Add auto-renew functionality to 10minutemail\n" }, { "from": "human", "value": "let element = document.getElementById('addyForm:addressSelect')\nif (element) {\n chrome.runtime.sendMessage({\n type: 'found',\n value: element.value\n })\n}\n" }, { "fr...
javascript
chosen
[ { "from": "system", "value": "Use named function syntax, more white space. Factor out myRender.\n" }, { "from": "human", "value": "import { select, local } from \"d3-selection\";\nvar myLocal = local(),\n noop = function (){};\n\nexport default function (tagName, className){\n var create = n...
javascript
chosen
[ { "from": "system", "value": "Change from IDs to pl-js- classes\n" }, { "from": "human", "value": "/*!\n * Simple Layout Rendering for Pattern Lab\n *\n * Copyright (c) 2014 Dave Olsen, http://dmolsen.com\n * Licensed under the MIT license\n */\n\ntry {\n \n /* load pattern nav */\n var templ...
javascript
chosen
[ { "from": "system", "value": "[bugfix][ORANGE-293] Fix zero mount for doses\n" }, { "from": "human", "value": "(function () {\n \"use strict\";\n\n angular\n .module('orange')\n .directive('onlyNumbers', onlyNumbers);\n\n function onlyNumbers() {\n return {\n ...
javascript
chosen
[ { "from": "system", "value": "Add name and size properties to File type\n" }, { "from": "human", "value": "'use strict';\n\nvar Filename = require('../string/string-line/filename')\n , Url = require('../string/string-line/url');\n\nmodule.exports = require('dbjs').create('File', function (...
javascript
chosen
[ { "from": "system", "value": "Change forum title for demo\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n\n\t// The title of the forum.\n\t// TODO: Preload this value in the index.html payload from Laravel config.\n\tforumTitle: 'Ninete...
javascript
chosen
[ { "from": "system", "value": "Use proper async handling so that multiple tests are called sequentially and a callback is fired when completed\n" }, { "from": "human", "value": "module.exports = function( grunt ) {\n\n // Create a new multi task.\n grunt.registerMultiTask( 'casperjs', 'This...
javascript
chosen
[ { "from": "system", "value": "Fix path to the plugin\n\nNode 0.12 throws an error: Cannot find module '.'\nhttps://travis-ci.org/maltsev/gulp-htmlnano/jobs/103625617\n" }, { "from": "human", "value": "import expect from 'expect';\nimport File from 'vinyl';\nimport es from 'event-stream';\nimport...
javascript
chosen
[ { "from": "system", "value": "Use PORT env var if exists, or fallback to port 3000.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\nvar express = require('express')\n , app = express();\nvar kiss = require('kiss.io'),\n io = kiss();\n\nvar main = io.na...
javascript
chosen
[ { "from": "system", "value": "Set up basic crud routes in connected db.\n" }, { "from": "human", "value": "var express = require('express');\nvar app = express();\nvar mongoose = require('mongoose');\nvar morgan = require('morgan');\nvar bodyParser = require('body-parser');\nvar methodOverride =...
javascript
chosen
[ { "from": "system", "value": "Set JSON as content type in response for GET method.\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar express = require('express');\nvar db\t = require('./config/db');\n\nvar app = express();\n\nmongoose.connect(db.url);\n\nvar conn = mong...
javascript
chosen
[ { "from": "system", "value": "Format JavaScript files with Prettier: scripts/draft-js/__github__/src/stubs\n\nReviewed By: lordrecneps\n\nDifferential Revision: D26975674\n\nfbshipit-source-id: 521d9a7630618e22edb920f37669adf39f892132\n" }, { "from": "human", "value": "/**\n * Copyright (c) Face...
javascript
chosen
[ { "from": "system", "value": "Fix saving repo shared as a string\n" }, { "from": "human", "value": "'use strict';\n\nvar sf = require('sf');\nvar fs = require('fs');\n\nmodule.exports = function (app) {\n app.post('/apiv1/repo/shared', postShared);\n\n function postShared(req, res, next) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix more CSRF issues on login after 401s\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular\n .module('sentryApp')\n .factory('authExpiredInterceptor', authExpiredInterceptor);\n\n authExpiredInterceptor.$inject = ['$...
javascript
chosen
[ { "from": "system", "value": "Disable source maps for now\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar browserSync = require('browser-sync');\nvar sass = require('gulp-sass');\nvar sourcemaps = require('gulp-sourcemaps');\nvar handleErrors = require('../lib/handleErrors');...
javascript
chosen
[ { "from": "system", "value": "Update form with values altered on the server side.\n" }, { "from": "human", "value": "(function() {\n angular.module('notely.notes', [\n 'ui.router'\n ])\n .config(notesConfig);\n\n notesConfig['$inject'] = ['$stateProvider'];\n function notesConfig($stateP...
javascript
chosen
[ { "from": "system", "value": "Split out tests into infrastructure, unit, and dom manipulation" }, { "from": "human", "value": "/*globals\n $versions, test, equal, ok\n*/\n\n/*jshint\n bitwise: true, browser: true, curly: true, eqeqeq: true, forin: true, immed: true, indent: 2, jquery: true, ma...
javascript
chosen
[ { "from": "system", "value": "Fix child not found error\n" }, { "from": "human", "value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. *...
javascript
chosen
[ { "from": "system", "value": "Add CORS support to the webpack-dev-server\n\nTo prevent issues with the loading of fonts and scripts from the\nlocalhost:8080 origin through the page served from rails at the\nlocalhost:3000 origin.\n" }, { "from": "human", "value": "'use strict';\n\nvar path = ...
javascript
chosen
[ { "from": "system", "value": "Allow only 2s timeout for PhantomJS\n" }, { "from": "human", "value": "/*\n * Usage: phantomjs capture.js [width] [height] [url] [output]\n */\n\nvar system = require('system');\nvar args = system.args;\n\nif (args.length === 5) {\n var width = args[1];\n var heig...
javascript
chosen
[ { "from": "system", "value": "Remove static HTML display for late bus\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport 'whatwg-fetch'\nimport * as bs from 'react-bootstrap'\n\nimport TopNav from './components/TopNav'\nimport BusList from './components/BusList'...
javascript
chosen
[ { "from": "system", "value": "Use path.join for Windows path compat instead of doing it manually)\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nif (!process.env.DEBUG) {\n process.env.DEBUG = \"phenomic:*\"\n}\n\n// still in src/, handy to play\nif (\n __filename.endsWith(\"src/bin...
javascript
chosen
[ { "from": "system", "value": "Use context.unload instead of controller.unload\n" }, { "from": "human", "value": "var TextInput, TextArea\n\n(function() {\n var factory = function(tag) {\n return {\n controller: function(args) {\n var oldValue,\n element,\n c...
javascript
chosen
[ { "from": "system", "value": "Disable Chrome flag to get CircleCI working again\n" }, { "from": "human", "value": "module.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: [\n 'Chrome'\n ],\n launch_in_dev: [\n 'Chrome'\n ],\n browser_...
javascript
chosen
[ { "from": "system", "value": "Fix test for Node 4 (requires strict mode)\n" }, { "from": "human", "value": "module.exports = () => {\n // This isn't an example, this is just an extra test that td.js is\n // working as part of the project's build\n class Person {\n age () {}\n }\n class ...
javascript
chosen
[ { "from": "system", "value": "Include payload on message received event\n" }, { "from": "human", "value": "'use strict';\n\nconst serverEvents = require('../../chat_server_events');\nconst socketHub = require('../socket_hub');\n\nmodule.exports = (message) => {\n console.log(`${message.sender.n...
javascript
chosen
[ { "from": "system", "value": "Test publication with journals list\n" }, { "from": "human", "value": "var FormData = require('form-data')\n\nmodule.exports = function (title) {\n var form = new FormData()\n form.append('name', 'Kyle E. Mitchell')\n form.append('affiliation', 'BioBricks Foundat...
javascript
chosen
[ { "from": "system", "value": "Add city and current temp.\n" }, { "from": "human", "value": "import React, { Component} from 'react';\n\nconst CurrentWeatherCard = ({ weatherData }) => {\n if(!weatherData.length) {\n return(\n <section>\n Please Enter a State and City\n </sec...
javascript
chosen
[ { "from": "system", "value": "Create reducer: Simplify action passing logic\n" }, { "from": "human", "value": "import { Iterable, fromJS } from 'immutable';\n\nconst defaultArgs = {\n initialState: {}\n};\n\n/**\n * Create reducer\n * @description Shorthand function to create a new reducer. By ...
javascript
chosen
[ { "from": "system", "value": "Remove statusCode variable from service.js test assertions\n" }, { "from": "human", "value": "'use strict';\n\nconst express = require('express');\nconst expect = require('expect');\nconst request = require('supertest');\nconst config = require('../src/config');\nco...
javascript
chosen
[ { "from": "system", "value": "[minor] Undo damage from git add .\n" }, { "from": "human", "value": "/*\n * config.js: Configuration information for your Rackspace Cloud account\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENSE\n *\n */\n \nvar Config = function () {\n\n};\n \nConfig.prototype = {...
javascript
chosen
[ { "from": "system", "value": "Use shortcut instead of an ID as a key.\n" }, { "from": "human", "value": "import './Gallery.scss';\nimport React, { Component, PropTypes } from 'react';\nimport Image from './Image.react';\nimport map from 'lodash/collection/map';\nimport AssetSchema from '../schem...
javascript
chosen
[ { "from": "system", "value": "Update up to changes in memoizee\n" }, { "from": "human", "value": "'use strict';\n\nvar noop = require('es5-ext/lib/Function/noop')\n , extend = require('es5-ext/lib/Object/extend')\n , memoize = require('memoizee')\n , ee = require('event-emitt...
javascript
chosen
[ { "from": "system", "value": "Add reference from Content to Resource table\n" }, { "from": "human", "value": "export async function up(knex) {\n await knex.schema.createTable('Content', (table) => {\n table.increments()\n table.uuid('resourceId').notNullable()\n table.string('name', 32...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary code to limit table width\n\nWith the recent changes to tables, this is no longer necessary.\n" }, { "from": "human", "value": "foam.CLASS({\n package: 'foam.nanos.logger',\n name: 'LogMessageController',\n extends: 'foam.comics.DAOController',...
javascript
chosen
[ { "from": "system", "value": "Fix icon classNames sometimes containing \"undefined\"\n" }, { "from": "human", "value": "import React from 'react';\n\n/**\n * Represents an icon that receives a 'type' prop indicating how it should look\n * as well as an optional 'active' prop indicating whether i...
javascript
chosen
[ { "from": "system", "value": "Fix logic error in request handler\n\nWas rejecting in simple mode if the response was a valid status code,\ninstead of when it wasn't.\n" }, { "from": "human", "value": "var Promise = require('bluebird'),\n request = require('request');\n\nfunction rp(options) {...
javascript
chosen
[ { "from": "system", "value": "Make the timeout more reasonable\n" }, { "from": "human", "value": "require('seneca')()\n .use(require('../'), {\n workers:[\n { type: 'tcp', port: 9000 }, // same options you would pass normally to a transport\n { type: 'tcp', port: 9001 }\n ]\n ...
javascript
chosen
[ { "from": "system", "value": "Remove accidental bogus drillbit test\n" }, { "from": "human", "value": "describe(\"Avoid OOM loading res images (lh 2313)\",\n{\n\ttest_images: function() {\n\t\tvar win = Ti.UI.createWindow();\n\t\twin.open();\n\t\tvar tv = Ti.UI.createTableView();\n\t\tvar i = 0;...
javascript
chosen
[ { "from": "system", "value": "Change trezor-connect to http protocol;\n" }, { "from": "human", "value": "window.TREZOR_CHROME_URL = './bower_components/trezor-connect/chrome/wrapper.html';\nwindow.__TREZOR_CONNECT_SRC = 'https://localhost:8088/';\n" }, { "from": "gpt", "value": "wind...
javascript
chosen
[ { "from": "system", "value": "Change to cinder API v2\n\nAs some API only support by v2 (ex: updateVolume)\n" }, { "from": "human", "value": "/*\n * index.js: Openstack cinder (blockstorage) client\n *\n * (C) 2014 Rackspace\n * Ken Perkins\n * MIT LICENSE\n *\n */\n\nvar util = require('ut...
javascript
chosen
[ { "from": "system", "value": "Add a dev mode so that watching rebuilds is quick without minification\n" }, { "from": "human", "value": "const path = require('path')\nconst babelConfig = require('./babel.config')\nconst bubleConfig = require('./buble.config')\nconst BabelMinify = require(\"babel-...
javascript
chosen
[ { "from": "system", "value": "Make webpack output normal and min builds\n" }, { "from": "human", "value": "var webpack = require('webpack');\n\nvar config = {\n context: __dirname + '/src',\n\n entry: {\n railsRanger: './rails-ranger.js',\n },\n\n output: {\n path: __dirname + '/dist',...
javascript
chosen
[ { "from": "system", "value": "Fix bad require of local component\n" }, { "from": "human", "value": "var React = require('react');\nvar PostStore = require('PostStore');\nvar actions = require('actions');\n\nvar About = React.createClass({\n render: function() {\n return (\n ...
javascript
chosen
[ { "from": "system", "value": "Return proper result for Q012\n" }, { "from": "human", "value": "'use strict';\n\nvar Transmittal = require('../models/transmittal');\n\nmodule.exports = {\n isValidTimestamp: function(activityYear, respondentID, timestamp, callback) {\n Transmittal.findOn...
javascript
chosen
[ { "from": "system", "value": "Fix accidental clobbering of item variable" }, { "from": "human", "value": "define(['mac/roman'], function(macintoshRoman) {\n\n 'use strict';\n \n return function(item) {\n return item.getBytes().then(function(bytes) {\n var dv = new DataView(bytes.buffe...
javascript
chosen
[ { "from": "system", "value": "Add test alert on page load\n" }, { "from": "human", "value": "\r\n$(document).ready(function () {\r\n\tmixpanel.track(\"Page loaded\");\r\n});\r\n\r\n\r\n\r\n\r\n" }, { "from": "gpt", "value": "\r\n$(document).ready(function () {\r\n\talert('page loaded...
javascript
chosen
[ { "from": "system", "value": "Set jQuery global so bootstrap can load\n" }, { "from": "human", "value": "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// TODO: REMOVE ALL JQUERY FROM THE CODEBASE\nvar $;\nif (typeof window !== 'undefin...
javascript
chosen
[ { "from": "system", "value": "Handle deprecated system method enrollEntities\n\n" }, { "from": "human", "value": "beforeEach(function () {\n jasmine.addMatchers({\n toBeInSystem() {\n return {\n compare(actual, expected) {\n const entity = actual;\n const system...
javascript
chosen
[ { "from": "system", "value": "[native] Replace now-missing thread create icon\n\nhttps://github.com/oblador/react-native-vector-icons/issues/823\n\nIonIcons removed `ios-create-outline` for some reason\n" }, { "from": "human", "value": "// @flow\n\nimport type { Navigate } from '../navigation/ro...
javascript
chosen
[ { "from": "system", "value": "Upgrade uglify-es to version 3.0.28.\n\nSame bump as done in https://github.com/meteor/meteor/commit/87181a68e853f142fc6f04d321d6cfa7a8140543 but for `uglify-es` instead of `uglify-js`, the switch made by meteor/meteor#8698." }, { "from": "human", "value": "Package....
javascript
chosen
[ { "from": "system", "value": "Handle wildcards in iframe source\n" }, { "from": "human", "value": "define([\n 'base/js/namespace'\n], function(\n Jupyter\n) {\n function load_handle_save_notebook_extension() {\n window.addEventListener(\"message\", (event) => {\n const...
javascript
chosen
[ { "from": "system", "value": "Fix non-root page not loading in production express\n" }, { "from": "human", "value": "const express = require('express');\r\nconst path = require('path');\r\n\r\nconst app = express();\r\n\r\nconst publicPath = path.join(__dirname, './public');\r\n\r\napp.enable('t...
javascript
chosen
[ { "from": "system", "value": "Update text to \"Hello World\"" }, { "from": "human", "value": "var express = require('express');\nvar app = express();\n\napp.get('/', function(req, res){\n res.send('Hello Rollbar!');\n});\n\napp.listen(80);\n" }, { "from": "gpt", "value": "var expres...
javascript
chosen
[ { "from": "system", "value": "Correct module import, add carriage return for serial com\n" }, { "from": "human", "value": "var Datas = require('../datas');\n\nvar datas = new Datas({\n forecast: 'myAPIKey',//Replace with user API key from https://developer.forecast.io/\n});\n\n\n// définir co...
javascript
chosen
[ { "from": "system", "value": "Handle error & alert message.\n" }, { "from": "human", "value": "(function(){\n\n window.onerror = function(msg, file, line) {\n var xhr = new XMLHttpRequest();\n xhr.open(\"POST\", '/log', true);\n xhr.setRequestHeader('Content-Type', 'application/json');...
javascript
chosen
[ { "from": "system", "value": "Convert repository to ES6 syntax\n" }, { "from": "human", "value": "const Errors = use('core/errors');\n\nconst RepositoryPrototype = require('./repositoryPrototype');\nconst DB = require('./db');\n\n\nconst Repositori...
javascript
chosen
[ { "from": "system", "value": "Create variable for tracking finished QA set\n" }, { "from": "human", "value": "var questions = [\n Q1 = {\n\t\tquestion: \"What does HTML means?\",\n\t\tanswer: \"HyperText Markup Language\"\n },\n Q2 = {\n\t\tquestion: \"What does CSS means?\",\n\t\tanswer: \"C...
javascript
chosen
[ { "from": "system", "value": "Fix issue when use text search and count\n" }, { "from": "human", "value": "/*\n** Module dependencies\n*/\nvar mongoose = require('mongoose');\nvar Record = mongoose.model('Record');\nvar async = require('async');\n\nexports.search = function(req, res, next) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add new Google Analytics code with correct URL.\n" }, { "from": "human", "value": "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\nm=s.getElementsByTagName(...
javascript
chosen
[ { "from": "system", "value": "Support multi syntax for CSS formatting\n" }, { "from": "human", "value": "import fs from \"fs\"\nimport gulp from \"gulp\"\nimport postcss from \"postcss\"\nimport stylelint from \"gulp-stylelint\"\nimport stylefmt from \"stylefmt\"\n\nimport { getGitFiles } from \...
javascript
chosen
[ { "from": "system", "value": "Add legacyNamespace: false option by default\n" }, { "from": "human", "value": "(function() {\n \n if (process.env.INFLUXDB_HOST !== undefined) {\n var host = process.env.INFLUXDB_HOST;\n } else if (process.env.INFLUXDB_MASTER_SERVICE_HOST !== undefined) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add comments on what to use for this component.\n" }, { "from": "human", "value": "/**\n * Created by sbardian on 5/18/17.\n */\n\nimport React from 'react';\n\nexport default class MultipleQuestionWrapper extends React.Component {\n render () {\n // TODO: take ...
javascript
chosen
[ { "from": "system", "value": "Move ngModal to body to allow to breakout relative positioning\n" }, { "from": "human", "value": "\nangular.module('ngModal', [])\n\n /**\n * ng-modal Directive\n *\n * Loads the picker modal.\n * All modal content should be placed within this dir...
javascript
chosen