conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add createMiddlware to top level jsdoc\n" }, { "from": "human", "value": "/**\n * Redux middleware for calling an API\n * @module redux-api-middleware\n * @requires lodash.isplainobject\n * @exports {string} RSAA\n * @exports {function} isRSAA\n * @exports {function...
javascript
chosen
[ { "from": "system", "value": "Fix add live room condition.\n" }, { "from": "human", "value": "import SocketIO from 'socket.io';\nimport { createClient } from 'redis';\n\nimport { redisUrl } from './config';\n\nconst io = SocketIO();\n\nio.use((socket, next) => {\n return next();\n});\n\nio.of('...
javascript
chosen
[ { "from": "system", "value": "Rename redisSubscriber to redisCommentSubscriber for individual subscribers.\n" }, { "from": "human", "value": "import SocketIO from 'socket.io';\nimport { createClient } from 'redis';\n\nimport { redisUrl } from './config';\n\nconst io = SocketIO();\n\nio.use((sock...
javascript
chosen
[ { "from": "system", "value": "Fix rainbow and staging :boom:" }, { "from": "human", "value": "import thunk from 'redux-thunk'\nimport createLogger from 'redux-logger'\nimport { browserHistory } from 'react-router'\nimport { syncHistory } from 'redux-simple-router'\nimport { combineReducers, comp...
javascript
chosen
[ { "from": "system", "value": "Fix conditional usage of hooks error" }, { "from": "human", "value": "import { useContext } from 'react';\nimport { getI18n, getHasUsedI18nextProvider, I18nContext } from './context';\n\nexport function useSSR(initialI18nStore, initialLanguage, props = {}) {\n cons...
javascript
chosen
[ { "from": "system", "value": "Use turbolinks event handler instead of document ready.\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory...
javascript
chosen
[ { "from": "system", "value": "Modify to work with Turbolinks\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts,...
javascript
chosen
[ { "from": "system", "value": "Fix fake db service API\n" }, { "from": "human", "value": "'use strict';\n\nfunction FakeDatabaseService() {\n\n}\n\nmodule.exports = FakeDatabaseService;\n\nFakeDatabaseService.prototype = {\n run: function(query, callback) {\n return callback(null, {});\...
javascript
chosen
[ { "from": "system", "value": "Build source maps with rollup" }, { "from": "human", "value": "import babel from '@rollup/plugin-babel';\n\nexport default {\n input: 'src/index.js',\n output: [\n { file: 'lib/index.cjs.js', format: 'cjs', exports: 'default' },\n { file: 'lib/index.esm.js',...
javascript
chosen
[ { "from": "system", "value": "Add Default Value For Timepicker When Focus\n" }, { "from": "human", "value": "let React = require(\"react\")\nlet cx = require(\"classnames\")\nlet {Focusable} = require(\"frig\").HigherOrderComponents\nlet popup = React.createFactory(require(\"./timepicker_popup\"...
javascript
chosen
[ { "from": "system", "value": "Add tests for test modifier\n" }, { "from": "human", "value": "var assertionModifiers = require('../src/modifiers/assertions');\nvar assert = require('assert');\nvar fs = require('fs');\nvar noOfData = 1;\n\nvar oneToTenArray = [];\nfor(var i = 1; i <= noOfData; i++...
javascript
chosen
[ { "from": "system", "value": "Fix bug in media player keys ubuntu\n" }, { "from": "human", "value": "import DBus from 'dbus';\n\ntry {\n const dbus = new DBus();\n const session = dbus.getBus('session');\n\n session.getInterface('org.gnome.SettingsDaemon', '/org/gnome/SettingsDaemon/MediaKeys...
javascript
chosen
[ { "from": "system", "value": "Fix bug where APP_SHELL_TEMPLATE was not overwritten\n" }, { "from": "human", "value": "// MODULES //\n\nimport React from 'react';\nimport ReactDOMServer from 'react-dom/server';\nimport fs from 'fs';\nimport path, { join } from 'path';\nimport httpServer from '@st...
javascript
chosen
[ { "from": "system", "value": "Update image model to match new image database layout\n\n" }, { "from": "human", "value": "import cuid from 'cuid';\nimport {storage} from '@/config/firebase';\n\nexport default function Image(img = {}) {\n this.file = img.file || null;\n this.downloadURL = img.do...
javascript
chosen
[ { "from": "system", "value": "Add fields `archived` and `description`\n\nSee #9\n" }, { "from": "human", "value": "/**\n* Show model\n* @module models/Show\n*/\n\n/**\n* Show model - create and export the database model for shows\n* including all assosiations and classmethods assiciated with thi...
javascript
chosen
[ { "from": "system", "value": "Add valid length unit tests\n" }, { "from": "human", "value": "/* eslint-env browser, mocha */\n/* global expect, sinon, units */\n/* eslint no-unused-expressions: 0 */\n\n'use strict';\n\ndescribe('units', function() {\n it('should be defined as an object', functi...
javascript
chosen
[ { "from": "system", "value": "Save tweets to local database\n" }, { "from": "human", "value": "var database = Ti.Database.install('twitter.sqlite', 'twitter');\n\n/* PUBLIC */\n\nexports.loadStoredTweets = function () {\n\t\n\tvar tweets = [];\n\n\t// LOAD TWEETS FROM DATABASE HERE\n\t\n\treturn...
javascript
chosen
[ { "from": "system", "value": "Fix production webpack for static pages\n" }, { "from": "human", "value": "const HtmlWebpackPlugin = require('html-webpack-plugin');\nconst path = require('path');\nconst webpackFiles = require('../lib/build/files/webpack_files');\nconst Package = require('./../pack...
javascript
chosen
[ { "from": "system", "value": "Add Chapter 04, exercise 2\n" }, { "from": "human", "value": "function reverseArray(arr) {\n var revArr = [];\n for (var i = 0; i < arr.length; ++i)\n revArr.unshift(arr[i]);\n return revArr;\n}\n\nfunction reverseArrayInPlace(arr) {\n for (var i ...
javascript
chosen
[ { "from": "system", "value": "Add in one more test case\n" }, { "from": "human", "value": "const path = require('path');\nconst expect = require('chai').expect;\nconst findPlugins = require('../src/findPlugins');\nconst mock = require('mock-require');\n\nconst pjsonPath = path.join(process.cwd()...
javascript
chosen
[ { "from": "system", "value": "Use this.log instead of console.warn in default generator\n" }, { "from": "human", "value": "var generators = require('yeoman-generator');\n\nmodule.exports = generators.Base.extend({\n warn: function() {\n console.warn('The default generator for react-generator...
javascript
chosen
[ { "from": "system", "value": "Add more bubble sort tests\n" }, { "from": "human", "value": "var assert = require(\"assert\");\nvar ll = require('../algos/bubblesort');\nvar BubbleSorter = ll.BubbleSorter;\n\ndescribe('BubbleSort', function() {\n describe('sort standard array', function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Refactor services to use a function with a clear name instead of arrow function for parsing the response to JSON.\n" }, { "from": "human", "value": "import 'whatwg-fetch';\n\nconst apiBaseURL = 'http://localhost:1337';\n\nexport const bookshelfApi = {\n getBooks() ...
javascript
chosen
[ { "from": "system", "value": "Define emit event to open filter\n" }, { "from": "human", "value": "angular.module(\"proBebe.controllers\")\n.controller(\"AppCtrl\", function($scope, storage, messageHandler, Profile, ScrollPositions) {\n\n $scope.$on('$ionicView.enter', init);\n\n var profile;\n...
javascript
chosen
[ { "from": "system", "value": "Add route for retrieving languages\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\n\nvar po2json = require('po2json');\n\nmodule.exports = function (router) {\n\n router.get('/data', function (req, res) {\n var locale = (res.loca...
javascript
chosen
[ { "from": "system", "value": "Add the large input test case.\n" }, { "from": "human", "value": "define(['chai',\n 'mocha',\n 'projecteuler/001/multiples_of_three_and_five'],\n function(chai,\n unusedMocha,\n multiplesOfThreeAndFive) {\n 'use str...
javascript
chosen
[ { "from": "system", "value": "ADD fail condition when users migrate partially to triconfig also for presets.js\n" }, { "from": "human", "value": "import path from 'path';\nimport serverRequire from '../utils/server-require';\n\nexport default function loadCustomPresets({ configDir }) {\n const ...
javascript
chosen
[ { "from": "system", "value": "Set session and status scope variables through JSON data.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('classBrowserUHApp.offeredclass', ['ngRoute'])\n\n.config(['$routeProvider', function($routeProvider) {\n $routeProvider.when('/offeredcla...
javascript
chosen
[ { "from": "system", "value": "Fix to make autocomplete field trust server results\n" }, { "from": "human", "value": "$(document).ready(function() {\n $(\"#searchfield\").typeahead({\n minLength: 3,\n source: function(query, process) {\n $.post('/quicksearch', { q: que...
javascript
chosen
[ { "from": "system", "value": "Add temporary fix for Comment.replies serialization\n" }, { "from": "human", "value": "import OsfSerializer from './osf-serializer';\n\nexport default OsfSerializer.extend({\n serialize(snapshot, options) { // jshint ignore:line\n // Add relationships fie...
javascript
chosen
[ { "from": "system", "value": "Disable package asset from store\n" }, { "from": "human", "value": "app.dependencies = ['store-common'];\napp.server = function(ctx) {\n    return {\n        endpoints: {\n            pages: [{\n                title: 'Publisher | Servicex Page',\n                ur...
javascript
chosen
[ { "from": "system", "value": "Test whether the LMLayerWorker can be instantiated.\n" }, { "from": "human", "value": "var assert = require('chai').assert;\n\nvar worker = require('../../worker');\n\ndescribe('Dummy worker', function() {\n describe('#hello()', function() {\n it('should return ...
javascript
chosen
[ { "from": "system", "value": "Enable enumrator for Wemos (Make way programme)\n" }, { "from": "human", "value": "export const flagOrgs = {\n ENUMERATORS: new Set([43, 42]),\n NUFFIC: new Set([4531, 5255, 5722]),\n AKVO_USERS: new Set([42])\n}\n\nexport const shouldShowFlag = (orgs, orgSet) =>...
javascript
chosen
[ { "from": "system", "value": "Change dist folder to match after move\n" }, { "from": "human", "value": "/**\n * Created by v0n000p on 2/19/17.\n */\nconst path = require('path');\nconst webpack = require('webpack');\nconst isProduction = (process.env.NODE_ENV === 'production');\n\nconsole.log('i...
javascript
chosen
[ { "from": "system", "value": "Set webpack mode to silence warning\n" }, { "from": "human", "value": "var webpack = require('webpack');\nvar path = require('path');\nvar fs = require('fs');\n\nvar nodeModules = {};\n\n// This is to filter out node_modules as we don't want them\n// to be made part...
javascript
chosen
[ { "from": "system", "value": "Fix library import on webpack\n" }, { "from": "human", "value": "var webpack = require('webpack');\n\nvar config = {\n context: __dirname + '/src',\n\n entry: {\n 'rails-ranger': './rails-ranger.js',\n 'rails-ranger.min': './rails-ranger.js'\n },\n\n d...
javascript
chosen
[ { "from": "system", "value": "refactor: Reset input values in controller when clear button clicked\n\n" }, { "from": "human", "value": "import Ember from 'ember';\n// import $ from 'jquery';\n\nexport default Ember.Component.extend({\n expense: {\n sum: null,\n category: '',\n name: ''...
javascript
chosen
[ { "from": "system", "value": "Add minified and non-minified umd build\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\nconst BabiliPlugin = require('babili-webpack-plugin');\n\nmodule.exports = {\n entry: path.resolve(__dirname, 'src/index...
javascript
chosen
[ { "from": "system", "value": "Fix webrtc drag handle style\n\n" }, { "from": "human", "value": "/**\n*\n* DragHandle\n*\n*/\n\nimport React from 'react';\n\nimport IconButton from 'material-ui/IconButton';\nimport DragHandleIcon from 'material-ui/svg-icons/editor/drag-handle';\n\nconst style = {...
javascript
chosen
[ { "from": "system", "value": "Fix 'addEventListener' used before it was defined\n\nIn JavaScript, prior to ES6, variable and function declarations are hoisted to the top of a scope,\nso it's possible to use identifiers before their formal declarations in code.\n\nThis can be confusing and some believe it is...
javascript
chosen
[ { "from": "system", "value": "Remove unused visitor role handing from code.\n" }, { "from": "human", "value": "import { callController } from '../../util/apiConnection';\n\nexport const getAvailableRoles = () => {\n const route = '/roles/available';\n const prefix = 'AVAILABLEROLES_GET_ALL...
javascript
chosen
[ { "from": "system", "value": "Add a human-readable message to StateChange\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.core').factory('StateChange', [\n '$parse',\n function($parse) {\n function getToken(state, tokenOrId) {\n if (angular.isObject(token...
javascript
chosen
[ { "from": "system", "value": "Return wifi as network status.\n" }, { "from": "human", "value": "/*\n *\n */\n\nvar cordova = require('cordova');\nvar execProxy = require('cordova/exec/proxy');\n\nmodule.exports = function (success, fail, service, action, args) {\n if ((service === 'Device') && ...
javascript
chosen
[ { "from": "system", "value": "Fix argument order in example code" }, { "from": "human", "value": "'use strict';\n\nvar atan2 = require( './../lib' );\n\nvar x;\nvar y;\nvar i;\n\nfor ( i = 0; i < 100; i++ ) {\n\tx = Math.random() * 100;\n\ty = Math.random() * 100;\n\tconsole.log( 'x: %d, \\t y: ...
javascript
chosen
[ { "from": "system", "value": "Fix the file extensions for the bundles\n" }, { "from": "human", "value": "const path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = [{\n entry: path.join(__dirname, 'src', 'Flatline.ts'),\n output: {\n path: path.join(__dir...
javascript
chosen
[ { "from": "system", "value": "Exclude react-transition-group from umd bundle\n" }, { "from": "human", "value": "/* eslint-disable */\nconst webpack = require('webpack');\n\nmodule.exports = {\n mode: process.env.NODE_ENV || 'production',\n devtool: 'source-map',\n entry: './src/index.js',\n ...
javascript
chosen
[ { "from": "system", "value": "Add try catch to execution errors" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar nodeFS = require('fs');\n\nvar filename = '{test.wasm}';\nvar ret = nodeFS['readFileSync'](filename);\n\nfunction instantiate(bytes, imports) {\n return WebAssembly.compil...
javascript
chosen
[ { "from": "system", "value": "Change Ti.Platform.name to Ti.Platform.osname in Anvil for Tizen calls\n" }, { "from": "human", "value": "/*\n * Appcelerator Titanium Mobile\n * Copyright (c) 2011-2012 by Appcelerator, Inc. All Rights Reserved.\n * Licensed under the terms of the Apache Public Lic...
javascript
chosen
[ { "from": "system", "value": "Use the `message` attribute if present when creating a GraphQLError\n" }, { "from": "human", "value": "import raven from 'raven'\nimport {GraphQLError} from 'graphql/error'\n\nimport {parseQueryError} from 'src/server/db/errors'\nimport {getPlayerById} from 'src/ser...
javascript
chosen
[ { "from": "system", "value": "Update Configuration of GeneticAlgorithm Constructor\n" }, { "from": "human", "value": "var geneticAlgorithmConstructor = require('geneticalgorithm')\nvar mutationModule = require('./MutationModule')\nvar crossoverModule = require('./CrossoverModule')\nvar fitnessM...
javascript
chosen
[ { "from": "system", "value": "Remove config parameter from mathJaxUrl.\n" }, { "from": "human", "value": "// Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved.\n// \n// Redistribution and use in source and binary forms, with or without modification, \n// are per...
javascript
chosen
[ { "from": "system", "value": "Introduce dev mode for cm.logger\n" }, { "from": "human", "value": "var Logger = require('./vendor/src/logger');\nvar Recorder = require('./handlers/recorder');\n\nvar consoleHandler = Logger.createDefaultHandler();\nvar logRecorder = new Recorder();\n\n/**\n * @ret...
javascript
chosen
[ { "from": "system", "value": "Remove 'travis' and 'appveyor' properties on the build-config\n\nSince they're not used anywhere\n\nSigned-off-by: Victor Porof <7d8eebacd0931807085fa6b9af29638ed74e0886@mozilla.com>\n" }, { "from": "human", "value": "// Any copyright is dedicated to the Public Doma...
javascript
chosen
[ { "from": "system", "value": "Change wording to make it less redundant\n" }, { "from": "human", "value": "import React from 'react';\nimport '../scss/_recipeContainer.scss';\n\nimport RecipeEntry from '../../client/components/RecipeEntry.js';\nimport RecipeListEntry from '../../client/components...
javascript
chosen
[ { "from": "system", "value": "Fix IE < 9's idea that &nbsp; isn't whitespace.\n" }, { "from": "human", "value": "/*\n * jquery.textnodes\n *\n *\n * Copyright (c) 2014 Mark Florian\n * Licensed under the MIT license.\n */\n\n(function($) {\n\n var rNonWhiteSpace = /\\S/;\n\n function getChildT...
javascript
chosen
[ { "from": "system", "value": "Fix relative path test on windows\n" }, { "from": "human", "value": "var fork = require('child_process').fork\nvar path = require('path')\nvar grabStdio = require('../grab-stdio')\n\nmodule.exports = {\n 'loads scripts from a relative path': function (done) {\n ...
javascript
chosen
[ { "from": "system", "value": "Revert \"Hide browse menu entry\"\n\nThis reverts commit 864f5a136c74b98ab1943e125bbb78c79c763f86.\n" }, { "from": "human", "value": "import React from 'react';\n\nimport './NavMenu.css';\n\nexport default function NavMenu({ currentPage, setCurrentPage }) {\n const...
javascript
chosen
[ { "from": "system", "value": "Disable video recording in Cypress\n" }, { "from": "human", "value": "const { defineConfig } = require('cypress')\n\nmodule.exports = defineConfig({\n e2e: {\n // We've imported your old cypress plugins here.\n // You may want to clean this up later by import...
javascript
chosen
[ { "from": "system", "value": "Add test case for binary search tree program\n" }, { "from": "human", "value": "// Program that creates a binary search tree: each node has up to two children, and all left descendants of a node is less than or equal to the node and all right descendants are greater...
javascript
chosen
[ { "from": "system", "value": "Add creator_type and creator_distinct_id in payload\n" }, { "from": "human", "value": "var uuid = require(\"uuid\");\nvar Dialog = require(\"../dialog\");\n\nmodule.exports = function(apiToken, botId) {\n this.apiToken = apiToken;\n this.botId = botId;\n\n this.i...
javascript
chosen
[ { "from": "system", "value": "karma-mocha: Increase the timeout to 10s in an attempt to avoid random failures\n" }, { "from": "human", "value": "module.exports = function(config) {\n config.set({\n frameworks: ['mocha'],\n\n exclude: ['build/test/external.spec.js'],\n\n files: [\n ...
javascript
chosen
[ { "from": "system", "value": "Remove reference to deleted file\n" }, { "from": "human", "value": "/*jslint browser: true, undef: true *//*global Ext*/\nExt.define('SlateAdmin.proxy.API', {\n extend: 'Emergence.proxy.API',\n alias: 'proxy.slateapi',\n\n config: {\n include: null\n...
javascript
chosen
[ { "from": "system", "value": "Demo: Put radio buttons within <label> element\n" }, { "from": "human", "value": "'use strict'\n\nclass HelloMessage2 extends Cape.Component {\n constructor(name) {\n super()\n this.names = [ 'alice', 'bob', 'charlie' ]\n this.name = name\n }\n\n render(...
javascript
chosen
[ { "from": "system", "value": "Add some commented code to play with a different fs." }, { "from": "human", "value": "/*******************************************************************************\n * @license\n * Copyright (c) 2013 VMware, Inc. All Rights Reserved.\n * THIS FILE IS PROVIDED UND...
javascript
chosen
[ { "from": "system", "value": "Add initial support for value filtering\n" }, { "from": "human", "value": "// @flow\n\nimport { reduxForm, SubmissionError } from 'redux-form';\nimport { handleSubmissionError } from './utils';\n\ntype Props = {\n onSubmitFail: any => any,\n onSubmit: any => Promi...
javascript
chosen
[ { "from": "system", "value": "Add one more test for Windows paths in harmonizeRelativePath\n" }, { "from": "human", "value": "const readDir = require('../readDir.js')\n\ndescribe('readDir.js', () => {\n describe('fileArrayToObject', () => {\n it('transforms an array to an object', () => {\n ...
javascript
chosen
[ { "from": "system", "value": "Update vanilla JavaScript template to use factory API\n\nChange-Id: Id749e798a355e16e8dc597bb977de33e6de52f67\n" }, { "from": "human", "value": "const {Button, TextView, contentView} = require('tabris');\n\nnew Button({\n centerX: true, top: 100,\n text: 'Show mes...
javascript
chosen
[ { "from": "system", "value": "Add expectation on Error output\n" }, { "from": "human", "value": "var request = require('supertest');\nvar JSONAPIValidator = require('jsonapi-validator').Validator;\n\nvalidateJSONapi = function(res) {\n var validator = new JSONAPIValidator();\n\n validator.vali...
javascript
chosen
[ { "from": "system", "value": "Use global classes for easier testing\n" }, { "from": "human", "value": "// Webpack config to serve the JSX component with bundled styles\n\nimport path from 'path';\n\nconst demoPath = path.join(__dirname, './demo');\nconst sourcePath = path.join(__dirname, './src'...
javascript
chosen
[ { "from": "system", "value": "canvas-animation: Add distance/circleContains functions to Utils.\n" }, { "from": "human", "value": "/*globals define*/\ndefine(function() {\n 'use strict';\n\n var PI2 = 2 * Math.PI;\n\n var DEG_TO_RAD = Math.PI / 180,\n RAD_TO_DEG = 180 / Math.PI;\n\n fun...
javascript
chosen
[ { "from": "system", "value": "Update generate metadata id script for draw\n\nNow it reads from the same metadata.json file, instead of reading\nfilenames from disk, because the files are spread across folders\n" }, { "from": "human", "value": "var fs = require('fs');\n\nvar ids = [];\nvar dir = ...
javascript
chosen
[ { "from": "system", "value": "Use destructuring assignment to improve readability\n" }, { "from": "human", "value": "const dataviews = require('./');\n\nmodule.exports = class DataviewFactory {\n static get dataviews() {\n return Object.keys(dataviews).reduce((allDataviews, dataviewCla...
javascript
chosen
[ { "from": "system", "value": "Fix ESLint errors. Towards UIU-372\n" }, { "from": "human", "value": "export default [\n { \"id\": \"002\", \"desc\": \"Email\" },\n { \"id\": \"001\", \"desc\": \"Mail (Primary Address)\" },\n { \"id\": \"003\", \"desc\": \"Text message\" },\n];\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Use the function in dendrogram\n" }, { "from": "human", "value": "import * as utility from './utility.js'\n\n/**\n * the function to submit form via ajax in dendrogram\n * @returns {void} - nothing is returned from this function.\n */\nfunction generateDendrogram ()...
javascript
chosen
[ { "from": "system", "value": "Exclude node_modules from example source maps\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n entry: path.join(__dirname, './docs/index.ts'),\n output: {\n path: path.join(__dirname, './d...
javascript
chosen
[ { "from": "system", "value": "Fix javascript file ordering in manifest\n" }, { "from": "human", "value": "//= require jquery\n//= require jquery.ui.all\n//= require jquery_ujs\n//= require jquery-fileupload\n//= require twitter/bootstrap\n//= require select2\n//= require shadowbox\n//= require m...
javascript
chosen
[ { "from": "system", "value": "Add loading message to submit button\n" }, { "from": "human", "value": "'use strict'\n\nimport React, { Component } from 'react'\nimport ReactCSS from 'reactcss'\n\nimport colors from '../../assets/styles/variables/colors'\n\nclass ComposerFormSubmit extends Compone...
javascript
chosen
[ { "from": "system", "value": "Add Amazon Kinesis and Amazon CloudWatch to default hosted build.\n\nFixes #229\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\n\nvar root = path.join(__dirname, 'aws-sdk');\nif (!fs.existsSync(root)) {\n root = path.join(__...
javascript
chosen
[ { "from": "system", "value": "Remove actions from each lemma\n" }, { "from": "human", "value": "\"use strict\";\n\nimport h from \"yasmf-h\";\nimport el from \"$LIB/templates/el\";\nimport L from \"$APP/localization/localization\";\n\nimport glyph from \"$WIDGETS/glyph\";\nimport list from \"$WI...
javascript
chosen
[ { "from": "system", "value": "Insert CSS during config phase\n" }, { "from": "human", "value": "var fs = require('fs');\nvar classes = require('bespoke-classes');\nvar insertCss = require('insert-css');\n\nmodule.exports = function() {\n return function(deck) {\n classes()(deck);\n var cs...
javascript
chosen
[ { "from": "system", "value": "Use a less invasive approach to store TransitionEvent support\n" }, { "from": "human", "value": "/**\n * Mediate those wretched vendor prefixes for onTransitionEnd.\n *\n * Older browsers only supported the event with prefixed names (Opera being\n * the worst offend...
javascript
chosen
[ { "from": "system", "value": "Add routing link on /\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport SetPage from '../components/SetPage';\n\n\nexport default class Pollard extends Component {\n render() {\n return (\n <div className=\"container\">\n\...
javascript
chosen
[ { "from": "system", "value": "Configure review controller to handle new menu location return data\n" }, { "from": "human", "value": "(function() {\n var ReviewMenuCtrl = function($scope, Menu) {\n var reviewMenu = this\n\n reviewMenu.locate = window.currLocation.coords;\n\n LocationDat...
javascript
chosen
[ { "from": "system", "value": "Add minimized version of updated script.\n" }, { "from": "human", "value": "melange.templates.inherit(function(){});\n" }, { "from": "gpt", "value": "melange.templates.inherit(function(e,f){function c(){this.widget=jQuery(b.widget_template()).appendTo(b....
javascript
chosen
[ { "from": "system", "value": "Use color suggested by @xavijam" }, { "from": "human", "value": "module.exports = {\n COLORS: [\n '#7F3C8D',\n '#11A579',\n '#3969AC',\n '#E73F74',\n '#80BA5A',\n '#E68310',\n '#008695',\n '#CF1C90',\n '#f97b72',\n '#A5AA99'\n ],\n\n ...
javascript
chosen
[ { "from": "system", "value": "Remove extraneous console.log added by Calhoun.\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\n\n\n/**\nCommand-line interface (CLI) for HackMyResume.\n@license MIT. See LICENSE.md for details.\n@module index.js\n*/\n\n\n\ntry {\n\n require('./cli/main'...
javascript
chosen
[ { "from": "system", "value": "Remove side-effects from main bundle\n" }, { "from": "human", "value": "/**\n * Base module.\n * @module base\n */\n\nimport './init-dom'\n\nimport './polyfills'\n\nimport features from './features'\nimport utils from './utils'\nimport eventHub from './eventHub'\n\n...
javascript
chosen
[ { "from": "system", "value": "Add comment and random reply function\n" }, { "from": "human", "value": "function verifiyKeyword(keywordList, content) {\n\n\tfor (var i = 0; i < keywordList.length; i++){\n\n\t\tvar keyword = Object.keys(keywordList[i])[0];\n\n\t\tvar re = new RegExp(keyword, \"gi\...
javascript
chosen
[ { "from": "system", "value": "Put new activity at the top of the array.\n" }, { "from": "human", "value": "\"use strict\";\n\n(function () {\n angular\n .module(\"argo\")\n .factory(\"activityService\", activityService);\n\n activityService.$inject = [\"$http\", \"$q\", \"ses...
javascript
chosen
[ { "from": "system", "value": "Revert to test run with full CPUs\n" }, { "from": "human", "value": "/* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) fo...
javascript
chosen
[ { "from": "system", "value": "Add newline to end of Pug generated HTML.\n" }, { "from": "human", "value": "/*\n\n ___ usage ___ en_US ___\n node highlight.bin.js <options> [sockets directory, sockets directory...]\n\n options:\n\n --help display help mess...
javascript
chosen
[ { "from": "system", "value": "Load connectors before saving operator\n" }, { "from": "human", "value": "/* global App */\n\nApp.OperatorController = Ember.ObjectController.extend({ \n fullType: function() {\n return this.get('package') + '::' + this.get('type');\n }.property('type', 'packa...
javascript
chosen
[ { "from": "system", "value": "Make Draftail document rendering logic sturdier\n" }, { "from": "human", "value": "import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport Icon from '../../Icon/Icon';\n\nimport TooltipEntity from '../decorators/TooltipEntity';\n\nconst documentIco...
javascript
chosen
[ { "from": "system", "value": "Make travis happy & make my need for semicolons happy ;)\n" }, { "from": "human", "value": "var util = require(\"util\")\n , EventEmitter = require(\"events\").EventEmitter\n\nmodule.exports = (function() {\n var CustomEventEmitter = function(fct) {\n t...
javascript
chosen
[ { "from": "system", "value": "ember: Generalize regex for meta tag config replacement\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nconst fs = require('fs');\nconst newConfig = require('./config.json');\n\nconst filename = '/code/dist/index.html';\nconst page = fs.readFileSync(filena...
javascript
chosen
[ { "from": "system", "value": "Update key shortcut for new signature" }, { "from": "human", "value": "$(document).ready(function() {\n $(document).keyup(function(e) {\n var tag = e.target.tagName.toLowerCase();\n if (tag != 'input' && tag != 'textarea' && tag != 'select' && !e.ct...
javascript
chosen
[ { "from": "system", "value": "Allow non staff users to see the users page\n" }, { "from": "human", "value": "import Route from '@ember/routing/route'\nimport StaffRouteMixin from 'timed/mixins/staff-route'\n\nexport default Route.extend(StaffRouteMixin, {})\n" }, { "from": "gpt", "va...
javascript
chosen
[ { "from": "human", "value": "Create js objects for game track and players. Test Mousetrap keyboard-binding functionality\n" }, { "from": "gpt", "value": "function Game(){\n this.$track = $('#racetrack');\n}\n\nfunction Player(track){\n this.$track = track;\n this.$player = $('.player');\n t...
javascript
chosen
[ { "from": "system", "value": "Add XYZ layer tiling code for tiles\n" }, { "from": "human", "value": "/* app.js */\n\n//= require OpenLayers\n\n/*globals $,OpenLayers,otm*/\n/*jslint indent: 4, white: true */\n\nvar app = (function ($,L,config) {\n \"use strict\";\n return {\n create...
javascript
chosen
[ { "from": "system", "value": "Fix failing async generator function test.\n" }, { "from": "human", "value": "function ag() { var __await = {}; return _es6now.asyncGen(__await, function*() {\n\n (yield (__await.value = x, __await));\n yield y;\n yield (yield (__await.value = foo, __await)...
javascript
chosen