conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "tests/route-addon: Use alternative blueprint test helpers\n" }, { "from": "human", "value": "'use strict';\n\nvar setupTestHooks = require('ember-cli-blueprint-test-helpers/lib/helpers/setup');\nvar BlueprintHelpers = require('ember-cli-blueprint-test-helpers/...
javascript
chosen
[ { "from": "system", "value": "Change lat/lng type to Number\n" }, { "from": "human", "value": "'use strict';\n\nvar mongoose = require('mongoose'),\n Schema = mongoose.Schema;\n\nvar photoSchema = new Schema({\n description: {\n type: String\n },\n submitted: {\n type: Date\n },\n da...
javascript
chosen
[ { "from": "system", "value": "Add a few cache URLs\n" }, { "from": "human", "value": "// JavaScript Document\n\n// Scripts written by YOURNAME @ YOURCOMPANY\n\n// no service worker for previews\nself.addEventListener(\"fetch\", (event) => {\n if (event.request.url.match(/preview=true/)) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use ColorPropType to validate color prop\n" }, { "from": "human", "value": "/**\n * https://github.com/facebook/react-native/blob/master/Libraries/Components/ActivityIndicator/ActivityIndicator.js\n */\nimport React from 'react';\nimport NativeMethodsMixin from '../...
javascript
chosen
[ { "from": "system", "value": "Remove the double periods from Paginators\n\n[Finishes: #120400891](https://www.pivotaltracker.com/story/show/120400891)" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react'\nimport { loadUserAvatars } from '../../actions/user'\nimpor...
javascript
chosen
[ { "from": "system", "value": "Update cordova-plugin-splashscreen from 4.1.0 to 5.0.3.\n\nIncluded by mobile-experience > launch-screen.\n" }, { "from": "human", "value": "Package.describe({\n // XXX We currently hard-code the \"launch-screen\" package in the\n // build tool. If this package is...
javascript
chosen
[ { "from": "system", "value": ":fire: Remove unnecessary fs specs from npm package\n" }, { "from": "human", "value": "'use babel'\n\nimport Path from 'path'\nimport { exists, versionFromRange, getManifestPath } from '../lib/helpers'\nconst { it } = require(process.env.SPEC_HELPER_SCRIPT)\nconst r...
javascript
chosen
[ { "from": "system", "value": "Test of sha passwords (meteor accounts)\n" }, { "from": "human", "value": "import bcrypt from 'bcryptjs';\n\nconst hashPassword = async (password) => {\n const salt = await bcrypt.genSalt(10);\n const hash = await bcrypt.hash(password, salt);\n return hash;\n};\n...
javascript
chosen
[ { "from": "system", "value": "Set audit job to Tuesday.\n" }, { "from": "human", "value": "export default (app) => {\n app.jobs.schedule('send audit email', '0 16 * * 5', async () => {\n app.info('CRON: sending audit email - starting')\n\n const mailerConfig = app.get('mailer')\n\n con...
javascript
chosen
[ { "from": "system", "value": "Use title string instead of case prefix\n" }, { "from": "human", "value": "const nudged = require('../../index')\nconst unit = nudged.estimators.I\n\nmodule.exports = (ts) => {\n ts.test('case: happy', (t) => {\n t.deepEqual(unit(), {\n a: 1,\n b: 0,\n...
javascript
chosen
[ { "from": "system", "value": "Add X-XSS-Protection header absence test\n" }, { "from": "human", "value": "const frisby = require('frisby')\n\nconst URL = 'http://localhost:3000'\n\ndescribe('HTTP', function () {\n it('response must contain CORS header allowing all origins', function (done) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add short alias for start command\n" }, { "from": "human", "value": "var program = require('commander')\nvar runner = require('./runner')\nvar json = require('../../package.json')\n\nprogram\n .version(json.version)\n\nprogram\n .command('new <name>')\n .descript...
javascript
chosen
[ { "from": "system", "value": "FIX Linter error (end of line)\n" }, { "from": "human", "value": "/*\n * Copyright 2013 Telefonica Investigación y Desarrollo, S.A.U\n *\n * This file is part of fiware-orion-pep\n *\n * fiware-orion-pep is free software: you can redistribute it and/or\n * modify it...
javascript
chosen
[ { "from": "system", "value": "Support nodeunit and other node-like environments\n\nFixes #338\n" }, { "from": "human", "value": "// Expose Raven to the world\nif (typeof define === 'function' && define.amd) {\n // AMD\n window.Raven = Raven;\n define('raven', [], function() {\n ret...
javascript
chosen
[ { "from": "system", "value": "Use inquirer as constant name\n" }, { "from": "human", "value": "const Configstore = require('configstore');\nconst Promise = require('promise');\nconst inq = require('inquirer');\nconst pkg = require('../../../../package.json');\nconst prompts = require('./setup-pr...
javascript
chosen
[ { "from": "system", "value": "Update eBay script to handle https\n" }, { "from": "human", "value": "// ==UserScript==\n// @name eBay - Hilight Items With Bids\n// @namespace http://mathemaniac.org\n// @include http://*.ebay.*/*\n// @grant none\n// @version 2.3.3\n//...
javascript
chosen
[ { "from": "system", "value": "Fix path pattern to include all source files\n" }, { "from": "human", "value": "// I would prefer to use plain bash scripts, however I am\n// currently using a Windows OS and Git Bash (MINGW) doesn't\n// support all the commands found in *nix (CYGWIN).\nrequire('she...
javascript
chosen
[ { "from": "system", "value": "Remove phraseapp token from tests\n" }, { "from": "human", "value": "'use strict';\n\nvar phrase = require('../');\nvar assert = require('assert');\nvar fs = require('fs');\nvar _ = require('lodash');\n\ndescribe('gulp phrase test suite', function() {\n\n //set t...
javascript
chosen
[ { "from": "system", "value": "Add sprite manager to track all sprites in one place\n" }, { "from": "human", "value": "function Sprite(url, srcPos, width, height, animRate, animSeq) {\n this.url = url;\n this.srcPos = srcPos;\n this.width = width;\n this.height = height;\n this.ani...
javascript
chosen
[ { "from": "system", "value": "Add keyboard shortcut key support for voice search for Mac\n" }, { "from": "human", "value": "//open command bar\nMousetrap.bindGlobal(['shift+up'], function(e) {\n document.getElementById('light').style.display='block';\n return false;\n});\n\n//close command bar...
javascript
chosen
[ { "from": "system", "value": "Remove ember-ajax from install blueprint" }, { "from": "human", "value": "/* eslint-env node */\n'use strict';\n\nmodule.exports = {\n description: 'Adds addons, packages and bower packages for ember-l10n',\n normalizeEntityName() {\n // leave empty for main bl...
javascript
chosen
[ { "from": "system", "value": "Add event for close menu when click on cross image" }, { "from": "human", "value": "$(document).ready(function() {\n\n BVB.init();\n\n $(document).on(\"click\", \"#menu a\", function() {\n href = $(this).attr(\"href\");\n window.location.hash = href;\n });\...
javascript
chosen
[ { "from": "system", "value": "Clear message after a given time\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.core').directive('currentMessage', [\n 'notifier',\n function(notifier) {\n return {\n restrict: 'A',\n link: function(scope, element, attr...
javascript
chosen
[ { "from": "system", "value": "Improve logout handling when no token is found\n" }, { "from": "human", "value": "import chalk from 'chalk'\nimport got from 'got'\nimport getUserConfig from '../../util/getUserConfig'\n\nconst baseUrl = 'https://api.sanity.io/v1'\nconst logoutUrl = `${baseUrl}/auth...
javascript
chosen
[ { "from": "system", "value": "Update test to check for new adsense markup.\n" }, { "from": "human", "value": "/**\n * WordPress dependencies\n */\nimport { createURL } from '@wordpress/e2e-test-utils';\n\n/**\n * Asserts the URL at the given path contains an AdSense tag.\n *\n * @since 1.10.0\n ...
javascript
chosen
[ { "from": "system", "value": "Make sortProperties an optional config attribute\n" }, { "from": "human", "value": "import Em from 'ember';\nimport Row from 'llama-table/controllers/row';\nimport { makeArray } from 'llama-table/computed';\nvar computed = Em.computed;\nvar map = computed.map;\nvar ...
javascript
chosen
[ { "from": "system", "value": "Remove dependency lint exception for ember-modifier\n\nThis isn't needed anymore as everything is in sync now.\n" }, { "from": "human", "value": "/* eslint-env node */\n'use strict';\n\nmodule.exports = {\n allowedVersions: {\n 'ember-in-element-polyfill': '*',\...
javascript
chosen
[ { "from": "system", "value": "Add spies for Chai assertion library\n" }, { "from": "human", "value": "import jsdom from 'jsdom';\nimport chai from 'chai';\nimport chaiImmutable from 'chai-immutable';\nimport ignoreStyles from 'ignore-styles';\n\nglobal.document = jsdom.jsdom('<!doctype html><htm...
javascript
chosen
[ { "from": "system", "value": "Add version parameter to CORE\n" }, { "from": "human", "value": "// This is the core script of the SkyX engine. It will be served by the extension's main server.\n// This architecture will allow us not only to update extensions, but to update the SkyX core remotely....
javascript
chosen
[ { "from": "system", "value": "Use date as formatting type\n\nDate is a formatting type instead of a real one. This seems to work.\n" }, { "from": "human", "value": "'use strict';\n\n\nmodule.exports = {\n 'required': [\n 'sender',\n 'receiver',\n 'items',\n 'due',\...
javascript
chosen
[ { "from": "system", "value": "fix: Remove misleading and unnecessary comments" }, { "from": "human", "value": "angular.module('snap')\n .factory('snapRemote', ['$q', function($q) {\n 'use strict';\n\n // Provide direct access to the snapper object and a few convenience methods\n // for...
javascript
chosen
[ { "from": "system", "value": "Add CardContainerView's page show style detection\n" }, { "from": "human", "value": "var CardContainerView = Ember.View.extend({\n\tclassNames: ['card-container'],\n\ttemplateName: 'card_container',\n});\n\nexport default CardContainerView;" }, { "from": "gp...
javascript
chosen
[ { "from": "system", "value": "Send notification to client if their job dies\n" }, { "from": "human", "value": "const config = require('../../config.js');\nconst {job, logger} = config;\nconst utils = require('../../utils');\n\nmodule.exports = {\n //finds users in the waiting list not in the ...
javascript
chosen
[ { "from": "system", "value": "Fix numberField so that it accepts defaultValue: 0\n" }, { "from": "human", "value": "const Types = require('./types');\nconst field = require('./field');\n\nfunction numberField(id, args) {\n const isRequired = !!(args && args.isRequired === true);\n const isLis...
javascript
chosen
[ { "from": "system", "value": "Apply the empty promise to the promise class" }, { "from": "human", "value": "PromiseAllSync = {\n extend: function(PromiseClass) {\n PromiseClass.allSync = function(collection, fn, unfn) {\n var stack = [];\n return collection.reduce(function(promise,...
javascript
chosen
[ { "from": "system", "value": "Rename Function Based on Feedback\n" }, { "from": "human", "value": "import * as containers from \"./container-view-builder\";\nimport * as url from \"url\";\nimport { fetch } from \"jsua\";\n\nexport function linkViewBuilder(node) {\n var view = document.createEle...
javascript
chosen
[ { "from": "system", "value": "Use request.defaults() to simplify testing\n" }, { "from": "human", "value": "const app = require('../app');\nconst request = require('request-promise-native');\nconst seeds = require('../lib/seeds');\nconst seedData = require('./seedData');\n\ndescribe('app', () =>...
javascript
chosen
[ { "from": "system", "value": "Move labels to api for future translation\n" }, { "from": "human", "value": "'use strict';\n\nvar D3 = require('d3');\nvar Queries = require('../../helpers/queries');\nvar Utils = require('../../helpers/utils');\nvar OverviewParser = require('../../helpers/overview_...
javascript
chosen
[ { "from": "system", "value": "Improve image size replacement regex\n" }, { "from": "human", "value": "// Define search and replace terms for image src link\nlet search = /s[0-9]+/g;\nlet replace = 's512';\n\nfunction getProfileImageContainer() {\n // Get profile image containers\n return $...
javascript
chosen
[ { "from": "system", "value": "Resolve mode does not support some of the syntax\n" }, { "from": "human", "value": "var createEditor;\r\nvar author;\r\n\r\nfunction injectCreate(id) {\r\n $(\"#\" + id).load(\"create/html/createHTML\", function() {\r\n injectCreateEditor();\r\n\t\t\r\n\t/...
javascript
chosen
[ { "from": "system", "value": "Add git path defualt value\n" }, { "from": "human", "value": "/**\n * Creo le variabili globali necessarie per il corretto funzionamento di\n * Chronos.\n *\n * Created by amantova on 21/02/16.\n */\n\n// Ogni plugin dovra' specificare in questa variabile il suo nom...
javascript
chosen
[ { "from": "system", "value": "Use glob to find lib\n" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(grunt) {\n \"use strict\";\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json')\n , jshint: {\n all: [\n \"Gruntfile...
javascript
chosen
[ { "from": "system", "value": "Undo accidental restriction of test suite\n" }, { "from": "human", "value": "var should = require('should');\nvar webdriverio = require('webdriverio');\nvar selenium = require('selenium-standalone');\nvar fs = require('fs');\nvar path = require('path');\n\nvar clien...
javascript
chosen
[ { "from": "system", "value": "Update ENS test using global\n" }, { "from": "human", "value": "/*global contract, config, it, assert, before*/\nconst Resolver = require('Embark/contracts/Resolver');\n\nconst namehash = require('eth-ens-namehash');\nconst address = '0x38ac14a9B6a7c8F9C46e480407418...
javascript
chosen
[ { "from": "system", "value": "Move module.eexports to a function so we can setup passport for dropbox\n" }, { "from": "human", "value": "'use strict';\nvar cp = require('child_process');\nvar child = cp.fork(__dirname + '/child.js');\n\nmodule.exports = {\n\n saveBin: function(bin, user) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use spaces instead of tabs\n" }, { "from": "human", "value": "app.factory('stocks', ['$http', function($http) {\n\treturn {\n\t\tstocks: [],\n\t\tgetAll: function() {\n\t\t\tvar self = this;\n\t\t\treturn $http.get('http://localhost:3000/stocks')\n\t\t\t\t.success(f...
javascript
chosen
[ { "from": "system", "value": "Remove hard coded value left by accident\n" }, { "from": "human", "value": "\"use strict\";\nlet db = require('./db');\n\nfunction generateStub(length) {\n let result = \"\"\n for(let i = 0; i < length; i++) {\n let value = Math.round(Math.random() * 36)\n i...
javascript
chosen
[ { "from": "system", "value": "Fix end to end tests after password profile modifications\n" }, { "from": "human", "value": "var assert = require(\"assert\");\n\nmodule.exports = {\n \"User set saved profile\": function(browser) {\n browser\n .url(browser.launch_url)\n .waitForElemen...
javascript
chosen
[ { "from": "system", "value": "Add routing for checkout states\n" }, { "from": "human", "value": "SpreeStore.module('StoreApp',function(StoreApp, SpreeStore, Backbone,Marionette,$,_){\n StoreApp.Router = Marionette.AppRouter.extend({\n appRoutes: {\n \"products\": \"listProducts\",\n ...
javascript
chosen
[ { "from": "system", "value": "Remove console.log which isn't needed\n\nAuditors: da39a3ee5e6b4b0d3255bfef95601890afd80709@kjozwiak\n" }, { "from": "human", "value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distribut...
javascript
chosen
[ { "from": "system", "value": "Update cors proxy port number\n" }, { "from": "human", "value": "'use strict';\n\n\n// Declare app level module which depends on filters, and services\nangular.module('myApp.configuration', [])\n .factory('CORS_PROXY_CFG',function(){\n return {\n enabled: t...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary moduleDirectories for resolveLoader\n" }, { "from": "human", "value": "import path from 'path';\nimport webpack from 'webpack';\n\nexport default {\n entry: path.resolve(__dirname, 'src/index.jsx'),\n output: {\n path: path.join(__dir...
javascript
chosen
[ { "from": "system", "value": "Enable HTTPS for localhost dev\n" }, { "from": "human", "value": "const gulp = require('gulp'),\n browserSync = require('browser-sync').get('PGR2015'),\n inject = require('gulp-inject'),\n modRewrite = require('connect-modrewrite'),\n wiredep = require('...
javascript
chosen
[ { "from": "system", "value": "Set lat and lng values\n" }, { "from": "human", "value": "\n $(document).ready(function() {\n $(\"#id_place\")\n .geocomplete({\n map: \"#map_location\",\n mapOptions: {\n zoom: 10\n },\n markerOptions: {\n drag...
javascript
chosen
[ { "from": "system", "value": "Fix siteIdChanged being triggered twice.\n\n" }, { "from": "human", "value": "import { routerStateReducer } from 'redux-router';\nimport * as types from '../types';\n\nexport default () => (state = {}, action) => {\n if (action.type === types.SITE_ID_CHANGED) retur...
javascript
chosen
[ { "from": "system", "value": "Refactor featureMember to reuse featureCollection\n" }, { "from": "human", "value": "/**\nBackend service\n\nThis module defines endpoints and access functions the features app REST service\n*/\n\n/* window.fetch polyfill */\nimport 'whatwg-fetch';\nimport restful, ...
javascript
chosen
[ { "from": "system", "value": "Return 'pass' when outside board size\n" }, { "from": "human", "value": "var Tuple = require('tuple-w')\n\nexports.Command = require('./command.js')\nexports.Response = require('./response.js')\nexports.Controller = require('./controller.js')\n\nvar alpha = 'abcdefg...
javascript
chosen
[ { "from": "system", "value": "[FEATURE] Add ripple_rest process to bin/gateway start cli command.\n" }, { "from": "human", "value": "\nvar exec = require('child_process').exec;\n\nvar processes = {\n webapp: 'processes/webapp',\n deposits: 'processes/deposits',\n outgoing: 'processes/outgoing...
javascript
chosen
[ { "from": "system", "value": "Set up Travis test environment (cont.)\n\nAdds the `--no-sandbox` flag to the headless Chrome to see\nif that causes Chrome to exit on Travis CI (instead of\nrunning forever).\n" }, { "from": "human", "value": "// Karma configuration file, see link for more informat...
javascript
chosen
[ { "from": "system", "value": "Fix layer model serialize method to use new organization\n" }, { "from": "human", "value": "cinema.models.LayerModel = Backbone.Model.extend({\n\n constructor: function (defaults, options) {\n Backbone.Model.call(this, {}, options);\n if (typeof def...
javascript
chosen
[ { "from": "system", "value": "Use stamen tiles and set middle point.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar React = require('react');\n\nvar LeafletMap = require('react-leaflet').Map;\nvar Marker = require('react-leaflet').Marker;\nvar Popup = require('react-leaflet').Popup;\n...
javascript
chosen
[ { "from": "system", "value": "Add dependency on keypress event" }, { "from": "human", "value": "/*\n---\n \nscript: Shortcuts.js\n \ndescription: Add command key listeners to the widget\n \nlicense: Public domain (http://unlicense.org).\n\nauthors: Yaroslaff Fedin\n \nrequires:\n - Ext/Shortcut...
javascript
chosen
[ { "from": "system", "value": "Add logs to trello micro service\n" }, { "from": "human", "value": "'use strict';\n\nimport { port } from './config/config';\nimport app from './app';\n\nimport getLogger from './libs/winston';\n\nimport { db } from './config/database';\n\nconst log = getLogger(modu...
javascript
chosen
[ { "from": "system", "value": "Use env vars on default config\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = {\n\n twitter: {\n consumer_key: \"\",\n consumer_secret: \"\",\n access_token: \"\",\n access_token_secret: \"\"\n },\n\n timezone: \"Asia/Tokyo\",\...
javascript
chosen
[ { "from": "system", "value": "Fix a bug in BufferUtils\n" }, { "from": "human", "value": "'use strict';\n\nconst VAL32 = 0xFFFFFFFF;\n\nclass BufferUtils {\n\n static readUInt64BE(buffer, offset) {\n let hi = buffer.readUInt32BE(offset);\n let value = buffer.readUInt32BE(offset ...
javascript
chosen
[ { "from": "system", "value": ":art: Rename ChangedFile methods to `getNewName` and `getOldName`\n" }, { "from": "human", "value": "/** @babel */\n\nexport default class ChangedFile {\n constructor (oldName, newName, status, hunks) {\n this.newName = newName\n this.oldName = oldName\n t...
javascript
chosen
[ { "from": "system", "value": "Reset registry modal step on each open\n\nThe modal was persisting the selection state between multiple\nclosing and openings of the modal. This now resets the selection\nstate.\n\nrancher/rancher#27339\n" }, { "from": "human", "value": "import { inject as service }...
javascript
chosen
[ { "from": "system", "value": "[DASH-2278] Change \"Installed Sockets\" to \"My Sockets\"\n" }, { "from": "human", "value": "import React from 'react';\nimport Reflux from 'reflux';\nimport Helmet from 'react-helmet';\n\nimport Actions from './CustomSocketsActions';\nimport Store from './CustomSo...
javascript
chosen
[ { "from": "system", "value": "Fix constraint problem for real. Another sequelize bug\n" }, { "from": "human", "value": "import BSDClient from '../../bsd-instance';\n\nexport default function(sequelize, DataTypes) {\n let GCBSDGroup = sequelize.define('GCBSDGroup', {\n query: {\n type: D...
javascript
chosen
[ { "from": "system", "value": "Make _options prop from lambda context not enumerable\n" }, { "from": "human", "value": "/**\n * Created by CCristi <ccovali@mitocgroup.com> on 12/10/15.\n */\n\n'use strict';\n\nexport class Context {\n /**\n * @param {Object} options\n */\n constructor(optio...
javascript
chosen
[ { "from": "system", "value": "Add className to join component\n" }, { "from": "human", "value": "const Join = () => {\n return (\n <div>\n <h1>Bli med i linjeforeningen!</h1>\n <p>Alle informatikere er med i linjeforeningen. Gå videre til <a href=\"https://online.ntnu.no/\">hovedsi...
javascript
chosen
[ { "from": "system", "value": "Simplify arguments passed to exec.\n" }, { "from": "human", "value": "var gulp = require(\"gulp\");\nvar CFG = require(\"./utils/config.js\");\nvar $ = require(\"gulp-load-plugins\")();\nvar exec = require(\"child_process\").exec;\nvar path = require(\...
javascript
chosen
[ { "from": "system", "value": "Fix prop returning class instead of value of prop\n" }, { "from": "human", "value": "import React from 'react'\nimport { StackNavigator } from 'react-navigation'\nimport Home from './stateless/screens/Home'\nimport ReposList from './stateless/screens/ReposList'\n// ...
javascript
chosen
[ { "from": "system", "value": "Revert \"Increase default timeout for yahoo geocoder.\"\n\nThis reverts commit 5a6b778f82ee02b25d400fb9eca9f129cc4f46a6.\n" }, { "from": "human", "value": "var YAHOO = require('../../../../src/geo/geocoder/yahoo-geocoder');\n\ndescribe('geo/geocoder/yahoo-geocoder',...
javascript
chosen
[ { "from": "system", "value": "Use full path to api in stead of relatieve path\n\nAt this moment a relative path is used (../../../), for the cde saikuWidget. But the preview of the dashboard and the 'normal' view are on a different directory level, so one of them needs an extra ../ Fixed by using the full p...
javascript
chosen
[ { "from": "system", "value": "Add Pinentry dumb component demo to sheet\n" }, { "from": "human", "value": "export default {\n}\n" }, { "from": "gpt", "value": "// @flow\n\nimport Pinentry from './index.render'\nimport type {DumbComponentMap} from '../constants/types/more'\nimport typ...
javascript
chosen
[ { "from": "system", "value": "Fix parent position when walking child nodes\n\nThe child node needs to know its parent's absolute position in order to\ndetermine its own absolute position. Previously, the parent's relative position\n(in relation to its own parent) has been passed. This leads to wrong\npositi...
javascript
chosen
[ { "from": "system", "value": "Update to fade out the welcome log in message\n" }, { "from": "human", "value": "/* $This file is distributed under the terms of the license in /doc/license.txt$ */\n\n$(document).ready(function(){\n\n // login form is hidden by default; use JavaScript to reveal\...
javascript
chosen
[ { "from": "system", "value": "chore: Replace NotFound route component with Error404 component\n" }, { "from": "human", "value": "'use strict';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Router, Route, IndexRoute, hashHistory, browserHistory } from 'react-router'\n\n...
javascript
chosen
[ { "from": "system", "value": "Make HelloWorld app look better\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies.\n */\n//process.env.NODE_ENV = \"production\";\nlet Arrow = require('../..');\n\nlet application = new Arrow();\n\nglobal.Arrow = application;\n\n\n//app...
javascript
chosen
[ { "from": "human", "value": "Add a $routeProvider and the $locationProvider\n\nSetup all of the routes, and set up the route provider as well as the\nlocation provider and set it to HTML 5 mode.\n" }, { "from": "gpt", "value": "app.config(['$routeProvider', '$locationProvider', function($routePr...
javascript
chosen
[ { "from": "system", "value": "Append Ctrl to controller name" }, { "from": "human", "value": "app.config(function($stateProvider){\n $stateProvider.state('explorerState', {\n url: '/',\n templateUrl: './app/explorer/explorer.html',\n controller: 'Explorer'\n })\n})\n" }, { "fr...
javascript
chosen
[ { "from": "system", "value": "[fix] Fix a typo in an import\n" }, { "from": "human", "value": "import { expect } from 'chai'\nimport { h, render, rerender } from 'preact'\nimport App from '../app/components/app'\n\n// describe('App', () => {\n// let scratch\n\n// before( () => {\n// ...
javascript
chosen
[ { "from": "system", "value": "Configure shity webpack to lint the code exactly before babel would run.\n" }, { "from": "human", "value": "/**\n * ReactCompass - a carefully crafted Compass component for React.\n *\n * Copyright (c) 2016 Bohdan Shtepan\n * http://modern-dev.com/\n *\n * Licensed ...
javascript
chosen
[ { "from": "system", "value": "Update hashing to match eagel eye\n" }, { "from": "human", "value": "\nvar passport = require('passport')\nvar util = require('util')\nvar crypto = require('crypto')\nvar db = require('mongo-promise')\ndb.shortcut('clients')\n\nfunction ClientKeyStrategy() { \n thi...
javascript
chosen
[ { "from": "system", "value": "Test a less excessive number of firefox versions by default\n" }, { "from": "human", "value": "'use strict';\n\nexports.filterPlatforms = filterPlatforms;\nfunction filterPlatforms(platform) {\n var browser = platform.browserName;\n var version = platform.version;...
javascript
chosen
[ { "from": "system", "value": "Revert to rethinkdb instead of personal path\n" }, { "from": "human", "value": "module.exports = {\n debug: false,\n //TODO Switch to 'rethinkdb' before pushing\n cmd: '/home/michel/projects/rethinkdb-all/rethinkdb/build/debug/rethinkdb',//'rethinkdb';\n dataDir...
javascript
chosen
[ { "from": "system", "value": "Add dependency lint exception for ember-compatibility-helpers\n\nThese versions seem to do the same thing, once a final version of this\nlibrary is released we can update upstream if necessary.\n" }, { "from": "human", "value": "/* eslint-env node */\n'use strict';\...
javascript
chosen
[ { "from": "system", "value": "Update root reducer to wrap around combined reducer\n" }, { "from": "human", "value": "import {combineReducers} from \"redux\";\n\nimport entitiesReducer from \"./entitiesReducer\";\nimport tabReducer from \"features/tabs/tabReducer\";\nimport unitInfoReducer from \...
javascript
chosen
[ { "from": "system", "value": "Change default persister to memory\n" }, { "from": "human", "value": "// @flow\r\n\r\nimport Persister from '../../units/urb-persister-cassandra/graphql/PersisterCassandra'\r\n\r\n\r\nconst defaultPersister = new Persister( )\r\nexport default defaultPersister" },...
javascript
chosen
[ { "from": "system", "value": "Fix hoisting mistake in the example\n" }, { "from": "human", "value": "\nexpress = require(\"express\");\ncim = require(\"../index\");\n\nvar console = cim(\"APP\");\n\napp = express();\n\napp.listen(8080, function(){\n console.log(\"now listening on port %d\", 808...
javascript
chosen
[ { "from": "system", "value": "Fix broken Teaser author logic\n" }, { "from": "human", "value": "import getPetitionAuthor from 'helpers/getPetitionAuthor';\nimport getPetitionMetrics from './petitionMetrics';\n\nexport default (petition = {}) => {\n if (!petition || !petition.id) {\n return {...
javascript
chosen
[ { "from": "system", "value": "Change components to bower_components for bower 1.0.0\n\nReferences #1\n" }, { "from": "human", "value": "// Karma configuration\n\n// base path, that will be used to resolve files and exclude\nbasePath = '';\n\n// list of files / patterns to load in the browser\nfi...
javascript
chosen
[ { "from": "system", "value": "Use HTTP protocol by default.\n" }, { "from": "human", "value": "exports = module.exports = function() {\n var Client = require('./internals/client');\n \n var client = new Client();\n return client;\n}\n\n\nexports['@provides'] = 'io.modulate.www.Client';\nexpo...
javascript
chosen
[ { "from": "system", "value": "Use message as param name\n" }, { "from": "human", "value": "/**\n Errors\n @description defines custom errors used for the middleware\n @exports {class} APIError\n**/\n\n/**\n @class APIError\n @desc given when API response gives error outside of 200 range\n ...
javascript
chosen
[ { "from": "system", "value": "Exclude PegJS grammar from code coverage\n" }, { "from": "human", "value": "export default {\n testEnvironment: 'jsdom',\n // Display coverage summary below file-by-file coverage breakdown\n coverageReporters: ['clover', 'json', 'lcov', 'html', 'text', 'text-summ...
javascript
chosen
[ { "from": "system", "value": "Change rollup to extend d3\n" }, { "from": "human", "value": "import resolve from \"rollup-plugin-node-resolve\";\nimport commonjs from \"rollup-plugin-commonjs\";\n\nexport default {\n input: \"index.js\",\n output: {\n file: \"dist/d3-dag.js\",\n format: \...
javascript
chosen
[ { "from": "system", "value": "Add CM templates for tabris.js animation props\n\nAdd convenience templates for the animation properties object.\n" }, { "from": "human", "value": "(function() {\n var templates = {\n \"name\": \"javascript\",\n \"context\": \"javascript\",\n \"templates\"...
javascript
chosen
[ { "from": "system", "value": "Add subtitle field to marker seed\n" }, { "from": "human", "value": "const BPromise = require('bluebird');\nconst markers = require('../data/markers.json');\nvar util = require('../src/util/seeds');\n\nexports.seed = function(knex, Promise) {\n return BPromise.map(...
javascript
chosen
[ { "from": "system", "value": "Put sourceMappingURL on a newline\n\nFirefox and IE expect the url to be on its own line and not at the end of an existing line.\n" }, { "from": "human", "value": "var path = require(\"path\");\n\nmodule.exports = function(bundle){\n\tif(bundle.source.map) {\n\t\tva...
javascript
chosen