conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Modify example to perform deeper JSON-stringifys\n" }, { "from": "human", "value": "/*jshint node:true */\n\"use strict\";\n\nvar fs = require(\"fs\"),\n util = require(\"util\"),\n mp3Parser = require(__dirname + \"/../mp3-parser\"),\n pathToMp3 = process....
javascript
chosen
[ { "from": "system", "value": "Remove deprecated sinon sandbox call.\n" }, { "from": "human", "value": "import sinon from 'sinon';\n\nbeforeEach(function() {\n this.sinon = sinon.sandbox.create();\n});\n\nafterEach(function() {\n this.sinon.restore();\n});\n" }, { "from": "gpt", "va...
javascript
chosen
[ { "from": "system", "value": "Fix duplicate download url, and fix unspecified key problem\n" }, { "from": "human", "value": "import React, {PureComponent, PropTypes} from 'react'\nimport {connect} from 'react-redux'\nimport {parse} from 'url'\n\nimport ButtonItem from './button-item'\n\nfunction...
javascript
chosen
[ { "from": "system", "value": "Use correct method to load Redux dev tools middleware\n" }, { "from": "human", "value": "import React from 'react';\nimport { render } from 'react-dom';\nimport { compose, createStore, applyMiddleware } from 'redux';\nimport { Provider } from 'react-redux';\nimport ...
javascript
chosen
[ { "from": "system", "value": "Remove monkey patch no longer needed with csv-stream-0.2.0\n" }, { "from": "human", "value": "const csv_stream = require('csv-stream');\nconst EOL = require('os').EOL;\n\n// this CSV parser assumes that:\n// - the first line contains column names\n// - the delimiter...
javascript
chosen
[ { "from": "system", "value": "Use cast_id instead of id.\n\nThis seems to get rid of duplicate keys for the 'casts' tab of a Movie. Before, Guardians of the Galaxy Vol 2 would have duplicate keys.\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport {\n\tText,\n\t...
javascript
chosen
[ { "from": "system", "value": "Fix vertical layout visibility update\n" }, { "from": "human", "value": "// @flow\nimport { helpers } from 'utils';\nimport LayoutBehavior from './behaviors/LayoutBehavior';\n\nconst classes = {\n CLASS_NAME: 'layout__vertical-layout',\n ITEM: 'layout__vertica...
javascript
chosen
[ { "from": "system", "value": "Make containers use class syntax\n\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react'\nimport { connect } from 'react-redux'\n\nimport { incrementCounter, decrementCounter, incrementCounterAsync } from '../../actions/counter'\n\nimport {} fr...
javascript
chosen
[ { "from": "system", "value": "Add a throbber for \"sending sub request\" in UserCard\n" }, { "from": "human", "value": "import * as ActionTypes from '../action-types';\nimport * as ActionHelpers from '../action-helpers';\n\nconst {request, response, fail} = ActionHelpers;\n\nexport default funct...
javascript
chosen
[ { "from": "system", "value": "Fix displaying quotes in followups list\n" }, { "from": "human", "value": "angular.module('codebrag.common.directives')\n\n .directive('reactionMessageSummary', function() {\n\n return {\n restrict: 'E',\n template: '<span>{{reactionM...
javascript
chosen
[ { "from": "system", "value": "[native] Fix bug where Lifecycle listener subscription wasn't being torn down properly\n" }, { "from": "human", "value": "// @flow\n\nimport * as React from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport {\n backgroundActionType,\n foregroundAction...
javascript
chosen
[ { "from": "system", "value": "Add sorting by fissure tier\n\nThis sorts the fissures in the list in ascending order according to tier, starting with Lith and ending with Axi." }, { "from": "human", "value": "'use strict';\n\nconst Command = require('../../Command.js');\nconst FissureEmbed = requ...
javascript
chosen
[ { "from": "system", "value": "Set max players to total amount of members in server\n" }, { "from": "human", "value": "const Core = require('./core');\n\nclass Discord extends Core {\n constructor() {\n super();\n this.dnsResolver = { resolve: function(address) {return {address: address} }...
javascript
chosen
[ { "from": "system", "value": "Allow protocols to be null." }, { "from": "human", "value": "import Ember from 'ember';\nimport md5 from 'md5';\n\nexport default Ember.Component.extend({\n tagName: 'img',\n attributeBindings: ['src', 'alt', 'title'],\n classNames: ['gravatar-image'],\n size: 2...
javascript
chosen
[ { "from": "system", "value": "Add visual editor template to Peer Review on Provide Feedback step\n" }, { "from": "human", "value": "export default assignment => ([\n {\n title: 'Read the article',\n content: 'Read the article and complete the Peer Review Exercise. This will help prepare y...
javascript
chosen
[ { "from": "system", "value": "Clean up and fix grammar.\n" }, { "from": "human", "value": "/*\n * Copyright 2015 the Mimu Authors (Dan Bornstein et alia).\n * Licensed AS IS and WITHOUT WARRANTY under the Apache License,\n * Version 2.0. Details: <http://www.apache.org/licenses/LICENSE-2.0>\n */...
javascript
chosen
[ { "from": "system", "value": "Store songs, artists, and albums as objects\n\nAdd 'favorite' bool as property of each object\n" }, { "from": "human", "value": "'use strict';\n\n/* Controllers */\n\nangular.module('myApp.controllers', [])\n .controller('HomeController', ['$scope', function($scope...
javascript
chosen
[ { "from": "system", "value": "Remove css hover from nav items - moved to Highlight comp\n\n" }, { "from": "human", "value": "//@flow\n\nimport styled, { css } from \"styled-components\";\n\nexport const Ul = styled.ul`\n ${({ theme }: { theme: Theme }) => css`\n\n padding: 0 0 0 ${theme.scal...
javascript
chosen
[ { "from": "system", "value": "Fix rate itunes not being hidden on production build (to be enabled later)\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport config from '../config/environment';\n\nexport default Ember.Controller.extend({\n\n cordova: Ember.inject.service(),\n ...
javascript
chosen
[ { "from": "system", "value": "Add migration creation logic to MM.create()\n" }, { "from": "human", "value": "\"use strict\";\n\nvar fs = require('fs'),\n path = require('path');\n\t \nexports.up = function(migrationName) {\n};\n\nexports.down = function(migrationName) {\n};\n\nexports.crea...
javascript
chosen
[ { "from": "system", "value": "Update options to be option that makes sense\n" }, { "from": "human", "value": "/* jslint node: true */\n'use strict';\n\nvar _ = require( 'lodash' );\nvar Q = require( 'q' );\nvar dust = require( './dustjsExtended' );\nvar Joi = require( 'joi' );\n\nfunction Templa...
javascript
chosen
[ { "from": "system", "value": "Remove references to Reactotron in the comments\n" }, { "from": "human", "value": "import { call } from 'redux-saga/effects'\nimport { Actions as NavigationActions, ActionConst } from 'react-native-router-flux'\nimport { merge } from 'ramda'\n\n// Process OPEN_SCREE...
javascript
chosen
[ { "from": "system", "value": "Fix this janky script and autoformat.\n" }, { "from": "human", "value": "$(document).ready(function() {\n $('a.menu').click(function() {\n $('.site-header nav').slideToggle(100);\n return false;\n });\n\n $(window).resize(function(){\n var w = $(window)....
javascript
chosen
[ { "from": "system", "value": "Remove duplicated `export default` statement" }, { "from": "human", "value": "import createRouter from 'router5';\nimport loggerPlugin from 'router5/plugins/logger';\nimport listenersPlugin from 'router5/plugins/listeners';\nimport browserPlugin from 'router5/plugin...
javascript
chosen
[ { "from": "system", "value": "Put knockout, bootstrap and jquery examples into separate requirejs modules\n" }, { "from": "human", "value": "//Load common code that includes config\nrequire(['./require.config'], function (common) {\n require([\n 'jquery', \n 'bootstrap',\n 'knockout',\...
javascript
chosen
[ { "from": "system", "value": "Add auth flow onEnter states\n" }, { "from": "human", "value": "angular.module('smartCampUZApp', ['ui.router', 'base64', 'angular-jwt'])\n\n .config(function ($stateProvider, $urlRouterProvider) {\n $stateProvider\n\n //starter screen\n ...
javascript
chosen
[ { "from": "system", "value": "Fix connecting to LE device not working on Linux\n" }, { "from": "human", "value": "'use strict';\n\nconst hardwareModules = new Set([\n require('./triones'),\n]);\n\nfunction createFor(peripheral) {\n for (let module of hardwareModules) {\n if (module....
javascript
chosen
[ { "from": "system", "value": "Add e2e test case for create file/folder\n" }, { "from": "human", "value": "function createDoc(browser, docType) {\n const devServer = browser.globals.devServerURL;\n\n browser.url(`${devServer}/`);\n browser.expect.element('#app').to.be.visible.before(5000);\n\n...
javascript
chosen
[ { "from": "system", "value": "Update User model to match with Auth0 data\n" }, { "from": "human", "value": "var mongoose = require('mongoose')\n\nvar userSchema = new mongoose.Schema({\n id: { type: String, index: { unique: true } },\n twitter_id: String,\n twitter_credentials: mongoose.Schem...
javascript
chosen
[ { "from": "system", "value": "Test ensuring setDelimiters requires an object.\n" }, { "from": "human", "value": "define(function(require, exports, module) {\n \"use strict\";\n\n var combyne = require(\"../../lib/index\");\n\n describe(\"Delimiters\", function() {\n it(\"can be changed on ...
javascript
chosen
[ { "from": "system", "value": "fix(widget-message-meet): Fix proptype error with info list separator\n" }, { "from": "human", "value": "import React, {PropTypes} from 'react';\nimport classNames from 'classnames';\n\nimport styles from './styles.css';\n\nfunction ListSeparator(props) {\n const m...
javascript
chosen
[ { "from": "system", "value": "Use `notify` not `resolve` with `watchHeading`\n" }, { "from": "human", "value": "angular.module('ngCordova.plugins.deviceOrientation', [])\n\n.factory('$cordovaDeviceOrientation', ['$q', function($q) {\n\n return {\n watchHeading: function(options) {\n var...
javascript
chosen
[ { "from": "system", "value": "Read port number for target site from JSON config\n" }, { "from": "human", "value": "\n/**\n * Module dependencies.\n */\n\nvar express = require('express');\nvar routes = require('./routes');\nvar http = require('http');\nvar path = require('path');\n\nvar app = ex...
javascript
chosen
[ { "from": "system", "value": "Adjust route to add result_id, not _id...\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\nvar mongoose = require('../models/mongoose');\nconst config = require('../config');\n\n// Redis\nconst Redis = require...
javascript
chosen
[ { "from": "system", "value": "Remove es6-enum as peer dependency\n" }, { "from": "human", "value": "import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';\n\ncheckNpmVersions({\n 'es6-enum': '1.x',\n express: '4.x',\n helmet: '3.x',\n i18next: '6.0.x',\n 'i18next-node-remote...
javascript
chosen
[ { "from": "system", "value": "Set the focus highlight correctly if an element has focus while the page is being loaded.\n\nSigned-off-by: Daniel Greenfeld <8363115a959be51f40dc0f39f5da6050bb507aa3@gmail.com>" }, { "from": "human", "value": "jQuery.fn.uniform = function(settings) {\n settings = ...
javascript
chosen
[ { "from": "system", "value": "Remove link preview from !debug\n" }, { "from": "human", "value": "const Command = require('../Command');\n\nconst messages = {\n success: 'I am currently operating off commit `{key}`.\\nGitHub: https://github.com/Shotbow/ChatBot/commit/{key}',\n error: 'I do ...
javascript
chosen
[ { "from": "system", "value": "Add setOnChange that allows a controller to set a function to call when the currentTask changes.\n" }, { "from": "human", "value": "class CurrentTask {\n constructor() {\n this.currentTask = null;\n }\n\n get() {\n return this.currentTask;\n ...
javascript
chosen
[ { "from": "system", "value": "Fix JS bug on thumbnail" }, { "from": "human", "value": "\n$(document).ready(function() {\n\n // Init action when user select sildeshow to see\n $('.slideshow-item').on('click', function(event) {\n\n // Cancel event\n global.cancelEvent(event);\n...
javascript
chosen
[ { "from": "system", "value": "Remove redundant created on value\n" }, { "from": "human", "value": "'use strict';\n\nconst collectionValidator = require('../validators/collection'),\n repo = require('../repositories/collection'),\n restify = require('restify');\n\nmodule.exports = {\n post: (r...
javascript
chosen
[ { "from": "system", "value": "Document rationale for the discrepancy from lodash.reduce signature\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Utility method to permit Array#reduce-like operations over objects\n *\n * This is likely to be slightly more inefficient than using lodas...
javascript
chosen
[ { "from": "system", "value": "Move the hint message to the callback" }, { "from": "human", "value": "const micro = require('micro');\nconst fs = require('fs');\nconst path = require('path');\n\nconst document = path.join(__dirname, 'index.html');\nconst html = fs.readFileSync(document);\n\nconst...
javascript
chosen
[ { "from": "system", "value": "Remove border on Read button\n" }, { "from": "human", "value": "// @flow\n/**\n * Part of GDL gdl-frontend.\n * Copyright (C) 2017 GDL\n *\n * See LICENSE\n */\n\nimport styled from 'styled-components';\n\n// TODO: Fix text-shadow\nconst Button = styled.button`\n c...
javascript
chosen
[ { "from": "system", "value": "Use owner_id if owner_name of playlist doesn't exist\n" }, { "from": "human", "value": "import url from 'url';\nimport {\n formatOpenURL,\n parse,\n} from 'spotify-uri';\n\nexport const getCountryParam = (urlString) => {\n const parsed = url.parse(urlString);\n ...
javascript
chosen
[ { "from": "system", "value": "Add auto sanitize for nesting depth\n" }, { "from": "human", "value": "/**\n * Copyright 2015 Ethan Smith\n */\n\nvar Backbone = require('backbone'),\n AmountEntryCollection = require('./AmountEntryCollection');\n\nvar SummaryModel = Backbone.Model.extend({\n d...
javascript
chosen
[ { "from": "system", "value": "Fix date picker template syntax to match the latest style.\n\ngit-svn-id: a346edc3f722475ad04b72d65977aa35d4befd55@542 3a26569e-5468-0410-bb2f-b495330926e5\n" }, { "from": "human", "value": "/*\n * Copyright 2010 55 Minutes (http://www.55minutes.com)\n *\n * License...
javascript
chosen
[ { "from": "system", "value": "Create module should not expose babel properties\n" }, { "from": "human", "value": "import isEmpty from 'lodash/lang/isEmpty';\r\n\r\nexport default function createModule({ stores, actions, getters }) {\r\n return (name, target, reactor) => {\r\n if (!isEmpty(st...
javascript
chosen
[ { "from": "system", "value": "Fix bottom modal taking whole screen\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2016\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Keyboard, StyleSheet, View } from 'react-native'...
javascript
chosen
[ { "from": "system", "value": "Make factory export read only\n" }, { "from": "human", "value": "'use strict';\n\n// EXPORTS //\n\nmodule.exports = require( './evalrational.js' );\nmodule.exports.factory = require( './factory.js' );\n" }, { "from": "gpt", "value": "'use strict';\n\n// ...
javascript
chosen
[ { "from": "system", "value": "Return defined custom element constructor\n" }, { "from": "human", "value": "import { applyMiddleware } from \"./middleware\";\nimport connectedCallback from \"./connectedCallback\";\nimport attributeChangedCallback from \"./attributeChangedCallback\";\nimport proxy...
javascript
chosen
[ { "from": "system", "value": "Fix custom HTTP server test\n" }, { "from": "human", "value": "var createServer = require('http').createServer\nvar BaseServer = require('../../base-server')\n\nvar app = new BaseServer({\n env: 'development',\n uniqName: 'server',\n subprotocol: [2, 5],\n suppo...
javascript
chosen
[ { "from": "system", "value": "Fix the CSS selector in the modified source page.\n" }, { "from": "human", "value": "var casper = require('casper').create({verbose: true});\nvar id = casper.cli.args[0];\nvar password = casper.cli.args[1];\nvar sourceNumber = casper.cli.args[2];\n\ncasper.start('ht...
javascript
chosen
[ { "from": "system", "value": "Remove boxes template from home view\n" }, { "from": "human", "value": "define([\n 'Backbone',\n\n //Views\n 'app/views/projectsView',\n\n //Templates\n 'text!templates/home/boxesTemplate.html'\n], function(\n \n Backbone,\n\n projectsView,\n\n //Template\n...
javascript
chosen
[ { "from": "system", "value": "Add throwing new error in base hash method\n" }, { "from": "human", "value": "/**\n * BaseHash class\n * @constructor\n */\nfunction BaseHash(options) {\n if (!(options.data)) {\n throw new Error('You need provide data');\n }\n\n this.setData(options...
javascript
chosen
[ { "from": "system", "value": "Update EntityContentRevisions to use es6 class.\n" }, { "from": "human", "value": "/*\nThis file is part of the Juju GUI, which lets users view and manage Juju\nenvironments within a graphical interface (https://launchpad.net/juju-gui).\nCopyright (C) 2015 Canonical...
javascript
chosen
[ { "from": "system", "value": "Mark invariant as an external module\n" }, { "from": "human", "value": "import resolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\nimport babel from 'rollup-plugin-babel';\nimport pkg from './package.json';\n\nexport default [...
javascript
chosen
[ { "from": "system", "value": "Update Added Command Line options for worker and broker controller\n\nUpdate Added Command Line options for worker and broker controller" }, { "from": "human", "value": "var argv = require('minimist')(process.argv.slice(2));\nvar SocketCluster = require('socketclust...
javascript
chosen
[ { "from": "system", "value": "Fix 3 char hex support\n" }, { "from": "human", "value": "/**\n * Convert string array to int array and returns it sorted.\n */\nfunction sortIntArray(arr) {\n var intArr = arr.map(Number);\n return intArr.sort(function(a, b) {\n return a - b; \n });\n}\n\n/**...
javascript
chosen
[ { "from": "system", "value": "Add newline at end of generated JSON files\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nconst {readFile, writeFile} = require('fs')\n\n\nfunction updateDependencies(template, dependencies, packageJson)\n{\n const PKG = require(`../templates/${template}...
javascript
chosen
[ { "from": "system", "value": "Add comment about borschik usage\n" }, { "from": "human", "value": "'use strict';\n\nvar BORSCHIK_CSS_TECH = require('borschik/lib/techs/css'),\n Q = require('q');\n\nexports.API_VER = 2;\n\nexports.techMixin = {\n\n getBuildResultChunk : function(relPath) {\n...
javascript
chosen
[ { "from": "system", "value": "Fix for new tag button with Turbolinks\n" }, { "from": "human", "value": "// Place all the behaviors and hooks related to the matching controller here.\n// All this logic will automatically be available in application.js.\n// You can use CoffeeScript in this file: h...
javascript
chosen
[ { "from": "system", "value": "Handle multiple connections and connection reset\n" }, { "from": "human", "value": "var net = require(\"net\");\nvar express = require(\"express\");\nvar bodyParser = require(\"body-parser\");\nvar config = require('./config');\n\nvar app = express();\napp.use(bodyP...
javascript
chosen
[ { "from": "system", "value": "Support nested popovers by keeping track of which is the top one\n" }, { "from": "human", "value": "'use strict';\n\nimport OnClickOutside from 'react-onclickoutside';\n\n// this feels a little silly, but we have this component ONLY so that we can add the OnClickOut...
javascript
chosen
[ { "from": "system", "value": "Fix broken relative route check logic.\n\nhref.slice(root.length) returns the href _without_ the root. We want the href without the fragments." }, { "from": "human", "value": "require([\n // Application.\n \"app\",\n\n // Main Router.\n \"router\"\n],\n\nfunctio...
javascript
chosen
[ { "from": "system", "value": "Create controller method to handle web sockets subscriptions.\n" }, { "from": "human", "value": "/**\n * ChatController\n *\n * @description :: Server-side logic for managing chats\n * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers\n */...
javascript
chosen
[ { "from": "system", "value": "Fix reload page when scrolling upwards\n" }, { "from": "human", "value": "import angular from 'angular';\n\nexport default function maDatagridInfinitePagination($window, $document) {\n\n var windowElement = angular.element($window);\n var offset = 100,\n ...
javascript
chosen
[ { "from": "system", "value": "Change from setTimeout to setInterval\n" }, { "from": "human", "value": "function autosave () {\n var $url = $('.edit_snippet')[0].action;\n var $data = $('.edit_snippet').serialize();\n $.ajax({\n type: \"PATCH\",\n url: $url,\n data: $data,\n dataTy...
javascript
chosen
[ { "from": "system", "value": "Add some more docs to the distinct test." }, { "from": "human", "value": "var test = require('./tape');\nvar insert = require('./insert');\n\ninsert('distinct', [{\n goodbye:'world',\n hello:'space'\n}], function(db, t, done) {\n db.a.distinct('goodbye',{hello:'s...
javascript
chosen
[ { "from": "system", "value": "Enable next button when option is picked.\n" }, { "from": "human", "value": "// Muestra la pregunta con el data attribute 'numero' y esconde las demas.\nfunction mostrarPregunta(numero){\n $('fieldset.pregunta').show()\n $('fieldset.pregunta:not([data-numero=' + n...
javascript
chosen
[ { "from": "system", "value": "Add possibility to set true color for layer\n" }, { "from": "human", "value": "class Layer\n{\n constructor(name, colorNumber, lineTypeName)\n {\n this.name = name;\n this.colorNumber = colorNumber;\n this.lineTypeName = lineTypeName;\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded test from example\n\n" }, { "from": "human", "value": "var assert = require('assert');\ndescribe('Array', function() {\n describe('#indexOf()', function() {\n it('should return -1 when the value is not present', function() {\n as...
javascript
chosen
[ { "from": "system", "value": "Fix allow rules (admin check)\n" }, { "from": "human", "value": "ActivityTypes = new Mongo.Collection('activityTypes');\n\nvar ActivityTypesSchema = new SimpleSchema({\n name: {\n type: String\n }\n});\n\nActivityTypes.allow({\n insert () {\n // Get current...
javascript
chosen
[ { "from": "system", "value": "Fix lookup for username to try to use the db value\n" }, { "from": "human", "value": "exports.names = ['reload'];\nexports.hidden = true;\nexports.enabled = true;\nexports.cdAll = 60;\nexports.cdUser = 60;\nexports.cdStaff = 60;\nexports.minRole = PERMISSIONS.MANAGE...
javascript
chosen
[ { "from": "system", "value": "Add rtfeldman to user list.\n" }, { "from": "human", "value": "module.exports = {\n users: [ // ADD YOUR USERNAME AT THE TOP\n 'gwillen',\n 'isaaczafuta',\n 'bluetidepro',\n 'julbaxter',\n 'eik3',\n 'crandles',\n '...
javascript
chosen
[ { "from": "system", "value": "Create schema for Product Model.\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies.\n */\nvar mongoose = require('mongoose'),\n\tSchema = mongoose.Schema;\n\n/**\n * Product Schema\n */\nvar ProductSchema = new Schema({\n\t// Product mo...
javascript
chosen
[ { "from": "system", "value": "Fix typo in log message\n" }, { "from": "human", "value": "'use strict';\n\nconst winston = require('winston');\nconst Twitter = require('twitter');\nconst cache = require('./cache');\nconst parse = require('./parse');\nconst uniq = require('uniq');\n\nconst searchT...
javascript
chosen
[ { "from": "system", "value": "Fix some var names and ES6 syntax\n" }, { "from": "human", "value": "import 'babel-polyfill';\n\n// Default config values.\nconst defaultConfig = {\n loggingFunction: () => true,\n};\n\n// Config used by the module.\nconst config = {};\n\n// Private function.\nco...
javascript
chosen
[ { "from": "system", "value": "Change the direction of the scrolling\n" }, { "from": "human", "value": "console.log(\"Initializing the runway handlers.\");\nvar runway = document.querySelector('.widget-runway-tray-wrapper');\n\nvar initialMousePosition = null;\nvar initialScrollLeft = null;\n\nru...
javascript
chosen
[ { "from": "system", "value": "Update EEA Form Build Info Comments/Source\n" }, { "from": "human", "value": "'use strict';\n\napp.component(\"eeaFormBuild\", {\n\ttemplate: '<div style=\"line-height: 10px;color: #f0f0f0;\">Build date: {{$ctrl.date}}<br>{{$ctrl.diff}} ago<br>by {{$ctrl.user}}</di...
javascript
chosen
[ { "from": "system", "value": "Create models.bus for bus scoping\n" }, { "from": "human", "value": "/* eslint-disable no-var */\n\nexports.attachment = require('./attachment')\nexports.attachments = require('./attachments')\nexports.comment = require('./comment')\nexports.comments = require('./co...
javascript
chosen
[ { "from": "system", "value": "Add tweets to the tweets table.\n" }, { "from": "human", "value": "function processTweet(tweet) {\n console.log(tweet);\n}\n\nfunction startNoisyClient(keyword) {\n NoisyClient.setup(keyword);\n \n NoisyClient.addOnTweetFunction(function (tweet) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add dependency to jest transform\n" }, { "from": "human", "value": "module.exports = {\n setupFilesAfterEnv: ['./rtl.setup.js'],\n verbose: true,\n moduleDirectories: ['node_modules'],\n transform: {\n '^.+\\\\.(js|tsx?)$': '<rootDir>/jest.transfo...
javascript
chosen
[ { "from": "system", "value": "Refresh angular controllers after login\n" }, { "from": "human", "value": "/// <reference path=\"../Services/AccountService.js\" />\n(function () {\n 'use strict';\n\n angular\n .module('GVA.Common')\n .controller('AccountLoginController', Accou...
javascript
chosen
[ { "from": "system", "value": "Remove setTimeout on version checker\n\nThat was just for testing.\n" }, { "from": "human", "value": "$(document).ready(function() {\n\tsetTimeout(function() {\n\t\tvar updateChecker = $('#update-checker');\n\t\tvar updateCheckerBody = updateChecker.find('.panel-bod...
javascript
chosen
[ { "from": "system", "value": "Save back to compendium bug\n" }, { "from": "human", "value": "function updateContent(collectionId, path, content, redirectToPath) {\n postContent(collectionId, path, content,\n success = function (response) {\n //console.log(\"Updating completed \" + respo...
javascript
chosen
[ { "from": "system", "value": "Fix login JS files not being output to right dir\n" }, { "from": "human", "value": "var browserify = require('browserify');\nvar watchify = require('watchify');\nvar source = require('vinyl-source-stream');\nvar gulp = require('gulp');\nvar uglify = require('gulp-ug...
javascript
chosen
[ { "from": "system", "value": "Fix issue with 'gulp.watch' tracking too many files. Damn you 'node_modules'...\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar gutil = require('gulp-util');\nvar mocha = require('gulp-mocha');\n\ngulp.task('test', function() {\...
javascript
chosen
[ { "from": "system", "value": "Add higher order component for cursor\n" }, { "from": "human", "value": "var Fynx = require('fynx');\nvar Immutable = require('immutable');\n\nvar cursor;\n\nconst store = function(obj) {\n if (obj)\n cursor = Fynx.createCursorStore(Immutable.fromJS(obj));\n el...
javascript
chosen
[ { "from": "system", "value": "Use alias instead of stub module for meteor/package imports.\n\nAliases are lighter weight than stub module functions, and easier for the\ndynamic import(...) dependency traversal logic to understand.\n" }, { "from": "human", "value": "function install(name, mainMod...
javascript
chosen
[ { "from": "system", "value": "Change order of checks, include catch for DM\n" }, { "from": "human", "value": "const MIN_MEMBERS = 3; // Minimum amount of MEMBERS that must be in a guild.\nconst BOT_RATIO = 70; // The percentage of Members that are Bots in a guild must be less than this.\n\nexpor...
javascript
chosen
[ { "from": "system", "value": "Make autofocusing a configurable option that you can pass into the form\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport FormSubmissionClassNameMixin from 'ember-easy-form-extensions/mixins/components/form-submission-class-name';\n\nconst { comp...
javascript
chosen
[ { "from": "system", "value": "Add trailing comma to satisfy linter\n" }, { "from": "human", "value": "const pgp = require('pg-promise')()\n\nconst dbName = 'vinyl'\nconst connectionString = process.env.DATABASE_URL || `postgres://localhost:5432/${dbName}`\nconst db = pgp(connectionString)\n\ncon...
javascript
chosen
[ { "from": "system", "value": "Save room when adding message\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n loggedIn: Ember.computed.alias('session.isConnected'),\n currentRoom: null,\n\tactions: {\n\t\tsendMessage: function () {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unused argument to internal destroyInstance\n" }, { "from": "human", "value": "import { select, local } from \"d3-selection\";\nvar instanceLocal = local(),\n noop = function (){};\n\nexport default function (tagName, className){\n var create = noop,\n ...
javascript
chosen
[ { "from": "system", "value": "Change ordering of palette for nicer display\n" }, { "from": "human", "value": "export const palette = {\n primary: {\n white: '#ffffff',\n lightCyan: '#55ffff',\n lightMagenta: '#ff55ff',\n black: '#000000',\n },\n secondary: {\n yellow: '#ffff55'...
javascript
chosen
[ { "from": "system", "value": "Improve error handling on front page\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\nvar moment = require('moment');\nvar models = require('../models');\n\n/* GET home page. */\nrouter.get('/', function(req, res)...
javascript
chosen
[ { "from": "system", "value": "Change welcome message from express to IC.js.\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function(req, res) {\n res.render('index', { title: 'Express' });\n});\n\nmod...
javascript
chosen
[ { "from": "system", "value": "feat: Add defKeys as second argument for mutators\n" }, { "from": "human", "value": "import _ from 'lodash'\n\nlet protoMutators = {}\nlet defsKeys = {}\n\nexport const filterByKeys = (defsKeys, candidate) => {\n const keys = _.intersection(defsKeys, _.keys(candida...
javascript
chosen
[ { "from": "system", "value": "Make the statsd container quiet.\n" }, { "from": "human", "value": "(function () {\n \"use strict\";\n return {\n // Production configuration\n //\"backends\": [\"./backends/repeater\"],\n //\"flushInterval\": 10000,\n\n // Developm...
javascript
chosen
[ { "from": "system", "value": "Move article retrieval from Channel views\n" }, { "from": "human", "value": "import React, {Component} from 'react'\nimport {connect} from 'react-redux';\nimport {Switch, Route} from 'react-router-dom';\n\nimport ChannelShow from './ChannelShow'\nimport ChannelIndex...
javascript
chosen