conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make sure publisher is totally hidden in bookmarklet after post success\n" }, { "from": "human", "value": "app.views.Bookmarklet = Backbone.View.extend({\n separator: ' - ',\n\n initialize: function(opts) {\n // init a standalone publisher\n app.publisher = ...
javascript
chosen
[ { "from": "system", "value": "Remove explicit layout; too eager" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/data-visual';\n\nimport Stage from '../system/stage';\n\nexport default Ember.Component.extend({\n classNames: [ 'data-visual'...
javascript
chosen
[ { "from": "system", "value": "Enable menu access on hover and links from section titles\n" }, { "from": "human", "value": "$(document).ready(function () {\n $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function (event) {\n event.preventDefault();\n event.stopPropagation();\n ...
javascript
chosen
[ { "from": "system", "value": "Fix filter bugs for council list filter\n" }, { "from": "human", "value": "$(function() {\n $('#lga_filter').keyup(function(ev) {\n var list = $('#lga_list');\n var filter = $(this).val();\n\n if (filter === '') {\n // Show all when the filter is clea...
javascript
chosen
[ { "from": "system", "value": "Correct return handling for authentication middleware function\n" }, { "from": "human", "value": "const listenerUser = require ('./listenerUser');\nconst listenerApp = require ('./listenerApp');\n\n// Initialize routes.\nfunction init (app) {\n listenerUser.init ()...
javascript
chosen
[ { "from": "system", "value": "Refactor env in run command\n" }, { "from": "human", "value": "'use strict'\n\nvar path = require('path')\nvar async = require('async')\nvar config = require('./config')\nvar child_process = require('child_process')\n\nfunction runCmd (cwd, argv) {\n var scripts = ...
javascript
chosen
[ { "from": "system", "value": "Use body.innerText instead of textContent\n\n" }, { "from": "human", "value": "// Part 1\n[...document.body.textContent.trim()].reduce((s,c,i,a)=>(c==a[(i+1)%a.length])*c+s,0)\n\n// Part 2\n[...document.body.textContent.trim()].reduce((s,c,i,a)=>(l=>c==a[(i+l/2)%l])...
javascript
chosen
[ { "from": "system", "value": "CLI: Fix project template for web-components\n" }, { "from": "human", "value": "/* global window */\n\nimport {\n configure,\n addParameters,\n // setCustomElements,\n} from '@storybook/web-components';\n\n// import customElements from '../custom-elements.json';\...
javascript
chosen
[ { "from": "system", "value": "[quick-search-store] Add missing property, the facets (used for group counts)\n" }, { "from": "human", "value": "let SearchStore = require('../search-store');\n/**\n * Class standing for all advanced search information.\n * The state should be the complete state of ...
javascript
chosen
[ { "from": "system", "value": "feat: Add type test for promises\n" }, { "from": "human", "value": "describe(\"About Promises\", function () {\n\n describe(\"Asynchronous Flow\", function () {\n\n it(\"should understand promise declaration usage\", function () {\n \n });\n });\n});\n" ...
javascript
chosen
[ { "from": "system", "value": "lathe[cuboid}: Add BoxGeometry vertex colors helper.\n" }, { "from": "human", "value": "/* eslint-env es6 */\n/* global THREE */\nwindow.applyBoxVertexColors = (function() {\n 'use strict';\n\n return function vertexColors( geometry ) {\n const red = new THREE....
javascript
chosen
[ { "from": "system", "value": "Make script run on document start to help on dot flashes\n" }, { "from": "human", "value": "// ==UserScript==\n// @name Hide offline presence dot on old reddit\n// @namespace https://mathemaniac.org\n// @version 1.0\n// @description Hides the offlin...
javascript
chosen
[ { "from": "system", "value": "Make mocked admin password be a constant\n" }, { "from": "human", "value": "jest.mock('../../models/meeting');\njest.mock('../../utils');\nconst { emit, broadcast } = require('../../utils');\nconst { createGenfors } = require('../../models/meeting');\nconst { genera...
javascript
chosen
[ { "from": "system", "value": "Fix redirect to home when add hotel.\n" }, { "from": "human", "value": "\"use strict\";\r\n\r\nconst HotelData = require(\"../data\").hotel;\r\nconst UserData = require(\"../data\").users;\r\nconst breedsData = require(\"../data/models/breeds\");\r\n\r\nfunction loa...
javascript
chosen
[ { "from": "system", "value": "Add flag for new module loader.\n" }, { "from": "human", "value": "/*\n ___ usage ___ en_US ___\n usage: prolific syslog <options>\n\n -a, --application <string>\n The application name to display in the syslog record. Defaults to\n ...
javascript
chosen
[ { "from": "system", "value": "Switch out 'createModel' for 'extend'\n" }, { "from": "human", "value": "var Arrow = require('arrow');\n\nmodule.exports = Arrow.createModel('base', {\n\n connector: 'appc.redis',\n\n fields: { },\n\n expire: function expire(seconds, callback){\n ret...
javascript
chosen
[ { "from": "system", "value": "Hide last votes unless there is an active issue with public votes and\nuser has voted\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport css from './LastVotes.css';\nimpo...
javascript
chosen
[ { "from": "system", "value": "Set window size to desktop display dimensions\n\nSome tests were failing because the default window dimensions cause the site to display in \"mobile\" format, truncating some elements and causing tests to fail.\n" }, { "from": "human", "value": "var Mocha = require(...
javascript
chosen
[ { "from": "system", "value": "Fix to show task button\n" }, { "from": "human", "value": "PluginsAPI.Dashboard.addNewTaskButton(\n\t[\"cloudimport/build/ImportView.js\"],\n\tfunction(args, ImportView) {\n return React.createElement(ImportView, {\n onNewTaskAdded: args.onNewT...
javascript
chosen
[ { "from": "system", "value": "[take-002] Create User document after POST /me\n" }, { "from": "human", "value": "var express = require('express'),\n mongoose = require('mongoose'),\n app = express()\n\napp.set('port', process.env.PORT || 3000)\napp.set('mongodb-url', process.env.MONGODB_URL...
javascript
chosen
[ { "from": "system", "value": "Update node-notifier initialization as per the new version.\n" }, { "from": "human", "value": "var notifier = new require(\"node-notifier\")({});\nvar extend = require(\"extend\");\nvar path = require(\"path\");\nvar CFG = require(\"./config.js\");\nvar p...
javascript
chosen
[ { "from": "system", "value": "Remove file size and type descriptors.\n" }, { "from": "human", "value": "import React from 'react';\n\nexport default class FileDescription extends React.Component {\n\n render() {\n return <div className=\"file-description\">\n <span className=\"file-name...
javascript
chosen
[ { "from": "system", "value": "Add TODO for clear loading upon refresh\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2017 Bonnie Schulkin. All Rights Reserved.\n *\n * This file is part of BoxCharter.\n *\n * BoxCharter is free software: you can redistribute it and/or modify it under\n ...
javascript
chosen
[ { "from": "system", "value": "Attach metadata to the right function\n" }, { "from": "human", "value": "define(['../is', '../array/last', '../functional'], function(is, last, functional) {\n var map = functional.map;\n var filter = functional.filter;\n var forEach = functional.forEach;\n...
javascript
chosen
[ { "from": "system", "value": "Fix return in for loop instead of continue\n" }, { "from": "human", "value": "'use strict';\n\nconst createLifecyclesManager = db => {\n let subscribers = [];\n\n const lifecycleManager = {\n subscribe(subscriber) {\n // TODO: verify subscriber\n subs...
javascript
chosen
[ { "from": "system", "value": "Support color/font size in loading indicator\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport { space, width, height } from 'styled-system';\n\nimport {...
javascript
chosen
[ { "from": "system", "value": "Remove tests that are not relevant anymore.\n" }, { "from": "human", "value": "/**\n * Internal dependencies\n */\nimport { addAMPExtraProps } from '../';\n\ndescribe( 'addAMPExtraProps', () => {\n\tit( 'does not modify non-child blocks', () => {\n\t\tconst props = ...
javascript
chosen
[ { "from": "system", "value": "Remove interactivity from cc histogram\n" }, { "from": "human", "value": "export default class ChannelHistogramController {\n constructor() {\n 'ngInject';\n }\n\n $onInit() {\n this.histOptions = {\n chart: {\n type:...
javascript
chosen
[ { "from": "system", "value": "Add comment as to how important the call to render() is\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport { Link, IndexLink } from 'react-router';\n\nimport { Login } from 'auth';\nimport { ErrorHandler } from 'error';\nimport { re...
javascript
chosen
[ { "from": "system", "value": "Fix gulp nodemon commang for windows environments\n\noriginal fix by @mannro\n" }, { "from": "human", "value": "import bg from 'gulp-bg';\nimport eslint from 'gulp-eslint';\nimport gulp from 'gulp';\nimport runSequence from 'run-sequence';\nimport webpackBuild from ...
javascript
chosen
[ { "from": "system", "value": "Remove load event handler for browser console speaker notes plugin\n" }, { "from": "human", "value": "/**\r\n * Handles writting the notes to the browser console in synchronization with the reveal.js\r\n */\r\nvar ConsoleNotes = (function() {\r\n\r\n function log...
javascript
chosen
[ { "from": "system", "value": "Update bootstrap 4 config error class\n\nThe error class used in `error`, not `invalid`." }, { "from": "human", "value": "const ENV = {\n // ...\n \"ember-validated-form\": {\n label: {\n submit: \"Go for it!\"\n },\n css: {\n // bootstrap class...
javascript
chosen
[ { "from": "system", "value": "Fix typo which causes memory leak.\n" }, { "from": "human", "value": "define([\n 'jquery',\n 'var/eventStorage',\n 'prototype/var/EmojioneArea'\n],\nfunction($, eventStorage, EmojioneArea) {\n EmojioneArea.prototype.off = function(events, handler) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix --help examples to include '='\n\nFixes #9" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar argv = require('argv');\nvar polyjuice = require('./polyjuice');\n\nvar options = [\n {\n name: 'jshint',\n type: 'string',\n description: 'Defines t...
javascript
chosen
[ { "from": "system", "value": "Fix error caused by aliasing \"v\" to \"version\" on yargs\n" }, { "from": "human", "value": "'use strict';\n\nconst _ = require('lodash');\nconst updateNotifier = require('update-notifier');\n\n/**\n * Expose a CLI with given actions as subcommands\n *...
javascript
chosen
[ { "from": "system", "value": "Remove force as it may overwrite somthing unwanted.\n" }, { "from": "human", "value": "const spawn = require(\"./spawn\");\n\nmodule.exports = function(workDir, isDebug){\n function git() {\n var len = arguments.length;\n var args = new Array(len);\...
javascript
chosen
[ { "from": "system", "value": "Make dataNotFoundHook return if data not ready.\n" }, { "from": "human", "value": "Router.hooks = {\n dataNotFound: function (pause) {\n var data = this.data();\n var tmpl;\n\n if (data === null || typeof data === 'undefined') {\n tmpl = this.lookupPr...
javascript
chosen
[ { "from": "system", "value": "Test for heart-beat header handling\n" }, { "from": "human", "value": "\nvar Client = require('../index').Client;\nvar Transport = require('./mock/Transport');\nvar OutgoingFrameStream = require('./mock/OutgoingFrameStream');\nvar assert = require('assert');\n\ndesc...
javascript
chosen
[ { "from": "system", "value": "Whitelist font-size classes from prefixing\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Helper.helper(function ([prefix, ...classNames]) {\n var classString = '';\n\n classNames.forEach(function(name) {\n if (!name) retu...
javascript
chosen
[ { "from": "system", "value": "Fix typo in windows live mapping\n" }, { "from": "human", "value": "module.exports = profile => {\n\treturn {\n\t\tuid: profile.username || profile.id,\n\t\tmail: profile.emails && profile.emails[0] && profile.emails[0].value,\n\t\tcn: profile.displayName,\n\t\tdisp...
javascript
chosen
[ { "from": "system", "value": "Refactor repeated checking to a helper method.\n" }, { "from": "human", "value": "// Obtain ALL anchors on the page.\nvar links = document.links;\n\n// The previous/next urls if they exist.\nvar prev = findHref(\"prev\");\nvar next = findHref(\"next\");\n\n/**\n * F...
javascript
chosen
[ { "from": "system", "value": "Change list view to be a composite view\n" }, { "from": "human", "value": "app.module(\"ContentModule\", function(ContentModule, app){\n ContentModule.listTemplate = \"<div>List</div>\";\n ContentModule.showTemplate = \"<div>Show <%= id %></div>\";\n\n ContentM...
javascript
chosen
[ { "from": "system", "value": "Fix for a wrongly named variable introduced when cleaning up\n" }, { "from": "human", "value": "'use strict';\n\nfunction randomIntFromInterval(min,max){return Math.floor(Math.random()*(max-min+1)+min);};\n\nvar markovGenerator = {\n\torder: 2,\n\ttable:{},\n\tload:...
javascript
chosen
[ { "from": "system", "value": "Change config uglify task grunt\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n connect: {\n server: {\n options: {\n port: 8000,\n useAvailablePort: true,\n hostname: '*',\n ...
javascript
chosen
[ { "from": "system", "value": "Move setUrl functoin to parent\n" }, { "from": "human", "value": "import React from 'react'\nimport {Link} from 'react-router-dom'\n\nfunction setArticleUrl(title) {\n var sanitizedTitle = title.replace(/%/g, \"[percent]\")\n debugger\n return encodeURIComponent(...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"delete undefined properties from http config params\"\"\n\nThis reverts commit f2875d45257f892607df8a460b253cd35fb0900a.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('gc.ngHttpGetParamInterceptor', [\n 'gc.utils'\n]).factory(...
javascript
chosen
[ { "from": "system", "value": "Use the proper test code." }, { "from": "human", "value": "\"use strict\";\n\nvar exampleTests = require('../example-tests');\n\nfunction Controls(mochaRunner) {\n this._mochaRunner = mochaRunner;\n}\n\nControls.prototype = {\n connectButtons: function(passingButt...
javascript
chosen
[ { "from": "system", "value": "Update fetch source, add parameters\n" }, { "from": "human", "value": "import * as React from \"react\";\nimport {BuildSnapshot} from \"./BuildSnapshot\";\n\n/**\n * Container Component for BuildSnapshots.\n * \n * @param {*} props input property containing an array...
javascript
chosen
[ { "from": "system", "value": "Rename stockflux-search to stockflux-launcher in package.json and remove console.log\n" }, { "from": "human", "value": "import React, { useEffect, useState } from 'react';\nimport { OpenfinApiHelpers } from 'stockflux-core';\nimport Components from 'stockflux-compon...
javascript
chosen
[ { "from": "system", "value": "Remove uuid in constructor, since strong loop server will see null as value provided, there won't be any defaultFn called. Otherwise you can give uuid \"undefined\", it's OK.\n" }, { "from": "human", "value": "import CartBlogEditorCtrl from './base/cart-blog-editor....
javascript
chosen
[ { "from": "system", "value": "[CS] Add missing space in email template.\n" }, { "from": "human", "value": "var baseUrl = process.env.BASE_URI || \"localdocker:4000\";\n\nmodule.exports = {\n approveFeed: function(message, recipient, group) {\n return \"<p>\" + message[\"user\"][\"userName\"]...
javascript
chosen
[ { "from": "system", "value": "Update the description of the task.\n" }, { "from": "human", "value": "/*\n * grunt-autoprefixer\n * \n *\n * Copyright (c) 2013 Dmitry Nikitenko\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function (grunt) {\n\n var autoprefixer...
javascript
chosen
[ { "from": "system", "value": "Disable pushbullet because we don't use it anymore :D\n" }, { "from": "human", "value": "'use strict';\n\nlet telegram = require( './telegram.js' );\nlet urlchecker = require( './urlchecker.js' );\nlet github = require( './github.js' );\nlet rss = require( './rss.js...
javascript
chosen
[ { "from": "system", "value": "Add default route from / to /tasks\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n\nimport { Route, BrowserRouter as Router } from 'react-router-dom';\n\nimport MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';\nimport getMu...
javascript
chosen
[ { "from": "system", "value": "Remove unused var and console statements\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst ItemTarget = {\n hover(props, monitor, component) {\n const dragIndex = monitor.getItem().index;\n const hoverIn...
javascript
chosen
[ { "from": "system", "value": "Fix example and dynamically resize array\n" }, { "from": "human", "value": "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in complia...
javascript
chosen
[ { "from": "system", "value": "Enable touch use with jQuery element.\n" }, { "from": "human", "value": "$(\".up-button\").mousedown(function(){\n $.get(\"/movecam/moveUp\");\n}).mouseup(function(){\n $.get(\"/movecam/moveStop\");\n});\n\n$(\".left-button\").mousedown(function(){\n $.get(\"/mov...
javascript
chosen
[ { "from": "system", "value": "Fix bug with undefined window in web workers\n\nFixes #8\n" }, { "from": "human", "value": "var assert = require('nanoassert')\nvar randombytes = (function () {\n var QUOTA = 65536 // limit for QuotaExceededException\n var crypto = typeof window !== 'undefined' ? ...
javascript
chosen
[ { "from": "system", "value": "Set comp info boxes opened as default\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('konehuone.competitionInfos')\n\n.controller('CompetitionInfosCtrl', function ($scope, lodash, apiService) {\n var _ = lodash;\n\n // # Variables\n $sco...
javascript
chosen
[ { "from": "system", "value": "Fix typo from previous commit\n" }, { "from": "human", "value": "/*\n* Title module displaying title tag based on current view\n*/\nvar EngineJS_titleManager = {\n content: {},\n titleDefault: \"\",\n titleSuffix: \"\",\n init: function(content, titleDef...
javascript
chosen
[ { "from": "system", "value": "Update git url, formatting nits\n" }, { "from": "human", "value": "Package.describe({\n summary: \"Ravelry OAuth flow\",\n name: \"amschrader:ravelry\",\n git: \"git@github.com:amschrader/meteor-ravelry.git\",\n version: \"0.1.0\"\n});\n\nPackage.onTest(function...
javascript
chosen
[ { "from": "system", "value": "Refactor click link to use click element method\n" }, { "from": "human", "value": "module.exports = {\n validateAnchorText: validateAnchorText,\n click: click,\n};\n\n/**\n *\n * @param {WebdriverIO} browser Instance of web driver\n * @param {String} anchorText ...
javascript
chosen
[ { "from": "system", "value": "Clean up the lab10 code a bit.\n" }, { "from": "human", "value": "/**\n * Created by curtis on 3/28/16.\n */\nangular.module('clusterApp', [])\n .controller('MainCtrl', [\n '$scope',\n '$http',\n function($scope, $http) {\n var com...
javascript
chosen
[ { "from": "system", "value": "Implement service to fetch charity data from spreadsheet\n\nhttps://trello.com/c/wjthoHP0/28-user-sbat-view-the-charity-contributions-done-per-month-by-the-company\n" }, { "from": "human", "value": "class GetCharityData {\n\tgetData(){\n\t\tvar CHARITY_DATA = [\n\t\...
javascript
chosen
[ { "from": "system", "value": "Convert YouTube link to HTTPS\n" }, { "from": "human", "value": "const Request = require('sdk/request').Request;\nconst qs = require('sdk/querystring');\n\nconst baseURL = 'http://www.youtube.com/get_video_info';\n\nmodule.exports = getYouTubeUrl;\n\nfunction getYou...
javascript
chosen
[ { "from": "system", "value": "Add REDIS_URL to createClient as an argument\n" }, { "from": "human", "value": "const session = require('express-session');\nconst RedisStore = require('connect-redis')(session);\nconst redisClient = require('redis').createClient();\n\nmodule.exports.verify = (req, ...
javascript
chosen
[ { "from": "system", "value": "Fix error when updateImageAttributes dispatched\n\nAn uncaught error has been occurring when an image creator saves any\nchanges to image attributes:\n\n```\nUncaught TypeError: Cannot read property 'silent' of undefined\n```\n\nIt turns out that the HelpLinkStore is performing...
javascript
chosen
[ { "from": "system", "value": "Remove use of ipify.org service\n" }, { "from": "human", "value": "module.exports = function geoip (ip) {\n return (state, emitter) => {\n state.geoip = {\n ip: ip,\n isLoading: false\n }\n\n emitter.on('geoip:fetch', () => {\n if (state.geo...
javascript
chosen
[ { "from": "system", "value": "Load in `intl-messageformat` after Intl\n" }, { "from": "human", "value": "//Client-side JS goes here.\n(function () {\n var locale = APP.intl.locale,\n baseUrl = 'http://yui.yahooapis.com/combo?platform/intl/0.1.2/Intl.min.js&platform/intl/0.1.2/locale-d...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect injection of $scope for minification\n" }, { "from": "human", "value": "export default ['config', 'Core', function (config, Core) {\n return {\n template: require('components/layout/partials/panel-header.directive.html'),\n transclude:...
javascript
chosen
[ { "from": "system", "value": "Add deployment meta data to example app\n" }, { "from": "human", "value": "/*\n * Copyright 2015-2016 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licen...
javascript
chosen
[ { "from": "system", "value": "Fix some bugs with simple autocomplete" }, { "from": "human", "value": "\nvar SimpleAutoCompleteComponent = BaseComponent.extend({\n\n ph: undefined,\n completionCallback: undefined,\n\n update: function() {\n this.ph = $(\"#\" + this.htmlObject).empty...
javascript
chosen
[ { "from": "system", "value": "Fix jshint errors in transport\n" }, { "from": "human", "value": "'use strict';\n\nvar EventEmitter = require('events').EventEmitter;\nvar AbstractTransport = require('./abstract_transport.js');\nvar NetTransport = require('./net_transport.js');\nvar TlsTransport = ...
javascript
chosen
[ { "from": "system", "value": "Add chapter 12, exercise 3\n" }, { "from": "human", "value": "function skipSpace(string) {\n let toRemove = string.match(/^(?:\\s|#.*)*/);\n return string.slice(toRemove[0].length);\n}\n" }, { "from": "gpt", "value": "function skipSpace(string) {\n...
javascript
chosen
[ { "from": "system", "value": "Update test to include min and max of integer range\n" }, { "from": "human", "value": "var common = require(\"./common\")\n , odbc = require(\"../\")\n , db = new odbc.Database()\n , assert = require(\"assert\")\n , util = require('util')\n , count = 0\n ;\n \...
javascript
chosen
[ { "from": "system", "value": "Change view based on fixes in resourceful\n" }, { "from": "human", "value": "module.exports = function () {\n\n this.string('name', {\n required: true,\n minLength: 5\n });\n\n this.string('title', {\n required: true,\n minLength: 5\n });\n\n this.s...
javascript
chosen
[ { "from": "system", "value": "Fix change initiative section - Override GH section with DB specific one\n\nCTCTOWALTZ-706\n" }, { "from": "human", "value": "// extensions initialisation\n\nimport {registerComponents} from '../common/module-utils';\nimport {dynamicSections, dynamicSectionsByKind} ...
javascript
chosen
[ { "from": "system", "value": "Use Marionette.AppRouter for the Router.\n" }, { "from": "human", "value": "/*global BackboneWizard, Backbone*/\n\nBackboneWizard.Routers = BackboneWizard.Routers || {};\n\n(function () {\n 'use strict';\n\n BackboneWizard.Routers.WizardRouter = Backbone.Route...
javascript
chosen
[ { "from": "system", "value": "Disable district search + use contains filter for representatives.\n" }, { "from": "human", "value": "var HDO = HDO || {};\n\n(function (H, $) {\n H.representativeSelector = {\n init: function (opts) {\n var districtSelect, representativeSelect, representat...
javascript
chosen
[ { "from": "system", "value": "Remove state variable where it can be removed.\n" }, { "from": "human", "value": "import React from 'react';\nimport Accordion from 'react-bootstrap/Accordion';\nimport Card from 'react-bootstrap/Card';\nimport Activity from './activity';\nimport * as activityFns fr...
javascript
chosen
[ { "from": "system", "value": "Add comment to fix a bug\n" }, { "from": "human", "value": "import React from 'react';\nimport isEmpty from 'lodash/isEmpty';\nimport SingleUnitOnMap from './SingleUnitOnMap';\nimport {sortByCondition} from '../helpers';\n\nexport const UnitsOnMap = ({units, selecte...
javascript
chosen
[ { "from": "system", "value": "Reconfigure bindTo support into options.resolveContext\n" }, { "from": "human", "value": "'use strict';\n\nvar copy = require('es5-ext/object/copy')\n , map = require('es5-ext/object/map')\n , callable = require('es5-ext/object/valid-callable')\n ,...
javascript
chosen
[ { "from": "system", "value": "Use paypal strategy for testing.\n" }, { "from": "human", "value": "var express = require('express'),\n app = express(),\n kaching = require('kaching');\n\napp.set('views', __dirname);\napp.set('view engine', 'jade');\n\napp.use(express.logger('dev'));\napp.us...
javascript
chosen
[ { "from": "system", "value": "Remove --name feature as it's not working at the moment\n" }, { "from": "human", "value": "var program = require('commander');\n\nprogram\n .description('Generate random documents, numbers, names, address, etc.')\n .version('0.0.1')\n .option('-f, --cpf', '...
javascript
chosen
[ { "from": "system", "value": "Test line end carriages redo.\n" }, { "from": "human", "value": "\nimport moment from 'moment';\n\nimport { Paginator } from '@/lib/pagination';\nimport template from './outdated-queries.html';\n\nfunction OutdatedQueriesCtrl($scope, $http, $timeout) {\n $scope.aut...
javascript
chosen
[ { "from": "system", "value": "Add option for override default API key\n" }, { "from": "human", "value": "var program = require('commander');\nvar pkg = require('../package.json');\n\nprogram\n .version(pkg.version)\n .description('Gitter bot for evaluating expressions')\n .usage('<room-name>'...
javascript
chosen
[ { "from": "system", "value": "Use newer system for programatic runner\n" }, { "from": "human", "value": "var path = require('path');\nvar fs = require('fs');\n\nglobal.adapter = require('./adapter-a');\n\ndescribe('promises-tests', function () {\n var testsDir = path.join(path.dirname(require.r...
javascript
chosen
[ { "from": "system", "value": "Load babel-core/polyfill in the example (thanks to @DylanSale)\n" }, { "from": "human", "value": "var path = require('path');\n\nmodule.exports = {\n entry: path.resolve(__dirname, 'lib', 'client.js'),\n output: {\n filename: 'app.js',\n path: pa...
javascript
chosen
[ { "from": "system", "value": "Make routes follow JSON API standards\n" }, { "from": "human", "value": "const Debug = require('debug')('iot-home:server:hue')\n\nvar HueServer = {}\n\nfunction HueRoutes (server, middleware) {\n server.get('/hue/bridges', middleware.findBridge)\n server.get('/hue...
javascript
chosen
[ { "from": "system", "value": "Reset login form on setupController\n" }, { "from": "human", "value": "HB.SignInRoute = Ember.Route.extend({\n beforeModel: function() {\n if (this.get('currentUser.isSignedIn')) {\n this.transitionTo('dashboard');\n }\n }\n});\n" }, { "from": "...
javascript
chosen
[ { "from": "system", "value": "Change import paths to relative for files in ./app/pages/browser-warning/ folder\n" }, { "from": "human", "value": "import React from 'react';\n\nimport BrowserWarning from './BrowserWarning';\nimport { shallowWithIntl } from 'utils/testUtils';\n\ndescribe('pages/br...
javascript
chosen
[ { "from": "system", "value": "Revert \"try changing the blueprint\"\n\nThis reverts commit 9f6815ed2ef27ef7898fe5f2f444d2b5af1e816a.\n" }, { "from": "human", "value": "/*jshint node:true*/\nmodule.exports = {\n description: 'install the addon'// ,\n\n // locals: function(options) {\n // // ...
javascript
chosen
[ { "from": "system", "value": "Select profile with 1 element in the select\n" }, { "from": "human", "value": "let selectElm = document.getElementById(\"switchy-panel-select\");\nselectElm.onchange = function() {\n self.port.emit(\"changeProfile\", selectElm.value);\n}\n\nlet buttons = [ 'add', '...
javascript
chosen
[ { "from": "system", "value": "Clean up csrf helper functions\n" }, { "from": "human", "value": "$(document).ready(function() {\n init();\n $.ajaxSetup({\n crossDomain: false, // obviates need for sameOrigin test\n beforeSend: function(xhr, settings) {\n if (!csrfSafeMethod(settings....
javascript
chosen
[ { "from": "system", "value": "Enable tooltip freeze on samples.\n" }, { "from": "human", "value": "'use strict';\nvar React = require('react');\nvar Sortable = require('../views/Sortable');\nvar {deepPureRenderMixin} = require('../react-utils');\n\n// We skip the first column to keep 'samples' o...
javascript
chosen
[ { "from": "system", "value": "Fix an irrelevant export name :P\n" }, { "from": "human", "value": "export default class Routes {\n type;\n attributes = [];\n hasOnes = [];\n hasManys = [];\n\n constructor(type, model = null) {\n this.type = type;\n this.model = model;\n }\n\n attribu...
javascript
chosen
[ { "from": "system", "value": "Fix typo in requrie that breaks on case-sensitive FS\n" }, { "from": "human", "value": "var Game = require('./game');\nvar GameArtist = require('./artists/gameartist');\nvar EventDispatcher = require('./eventdispatcher');\nvar utils = require('./utils');\nvar EventL...
javascript
chosen
[ { "from": "system", "value": "Print devkit header and version info when tracing\n" }, { "from": "human", "value": "var base = require('jsio.base');\n\nGLOBAL.Class = base.Class;\nGLOBAL.merge = base.merge;\nGLOBAL.bind = base.bind;\n\n// catch SIGTERM and SIGINT so `exit` events properly trigger...
javascript
chosen
[ { "from": "system", "value": "Remove src/ from package.json in development\n" }, { "from": "human", "value": "const path = require('path');\n\nconst babelOptions = {\n presets: ['es2015', 'stage-0'],\n plugins: ['transform-decorators-legacy', 'transform-runtime']\n};\n\nexports.module = functi...
javascript
chosen
[ { "from": "system", "value": "Edit baseAdjust to ()=> and include css`` in styled components output\n\n" }, { "from": "human", "value": "//@flow\n\nexport function baseAdjust(n: number): string {\n return `\n padding-top: calc(${n}em / 16) !important;\n margin-bottom: calc(-${n}em / 1...
javascript
chosen