conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use SearchController on snippet chooser modal\n" }, { "from": "human", "value": "import $ from 'jquery';\n\nwindow.SNIPPET_CHOOSER_MODAL_ONLOAD_HANDLERS = {\n choose: function (modal) {\n function ajaxifyLinks(context) {\n $('a.snippet-choice', modal.body)....
javascript
chosen
[ { "from": "system", "value": "Load the braintree client on demand libs in admin\n\nLike in frontend we load the braintree client libs on demand and then initialize the hosted fields.\n" }, { "from": "human", "value": "//= require spree/braintree_hosted_form.js\n\n$(function() {\n var $paymentFo...
javascript
chosen
[ { "from": "system", "value": "Remove -, !, + and ~ from the slug too" }, { "from": "human", "value": "'use strict';\n\nvar diacritics = require('./diacritics');\n\nfunction nbSlug(name) {\n var diacriticsMap = {};\n\n for (var i = 0; i < diacritics.length; i++) {\n var letters = diacritics[...
javascript
chosen
[ { "from": "system", "value": "Set the role to button instead of tab\n" }, { "from": "human", "value": "import 'accordion/src/accordion.js';\n\n(function() {\n \"use strict\";\n\n document.querySelectorAll('.accordion').forEach(function(item) {\n new Accordion(item, {\n on...
javascript
chosen
[ { "from": "system", "value": "Make tasks a MongoDB collection.\n" }, { "from": "human", "value": "if (Meteor.isClient) {\n // This code only runs on the client\n Template.body.helpers({\n tasks: [\n { text: \"This is task 1\" },\n { text: \"This is task 2\" },\n { text: \"Thi...
javascript
chosen
[ { "from": "system", "value": "Replace <rootDir> prior to path.join().\n\nThis allows outputDirectory to be formatted like <rootDir>/../some/dir. In that case, path.join() assumes the .. cancels out the <rootDir>, which seems entirely reasonable. Unfortunately, it means the final value is some/dir, and that ...
javascript
chosen
[ { "from": "system", "value": "Change name of SSO token parameter from sso-token to ssoToken\n\nThis makes is consistent with the cookie-name that I am about to\nimplement. The spec for cookies says hyphens are OK in the name, but\nnot everyone's experience agrees: see\nhttps://stackoverflow.com/a/27235182\n...
javascript
chosen
[ { "from": "system", "value": "Set organization_notifications to [] if no notificarions are available\n" }, { "from": "human", "value": "export default function getCARTOData () {\n if (window.CartoConfig) {\n return window.CartoConfig.data;\n }\n\n return {\n user_data: window.user_data,...
javascript
chosen
[ { "from": "system", "value": "Add missing key to flags view to remove warning\n" }, { "from": "human", "value": "import React from 'react';\nimport { connect } from 'react-redux';\n\nimport admin from '../utils/admin';\n\nimport Concept from '../components/Concept';\n\nconst FlagView = React.cre...
javascript
chosen
[ { "from": "system", "value": "[change] Remove first year from footer\n" }, { "from": "human", "value": "import { format } from 'date-fns';\nimport React from 'react'\nimport { Navigation } from './blocks/Navigation'\nimport styles from './Main.css'\n\nconst socialLinks = [\n {\n to: 'h...
javascript
chosen
[ { "from": "system", "value": "Add 1D lerp(), inverseLerp(), and map().\n" }, { "from": "human", "value": "import THREE from 'three';\n\nexport function randomPointOnSphere( vector = new THREE.Vector3() ) {\n const theta = 2 * Math.PI * Math.random();\n const u = 2 * Math.random() - 1;\n const...
javascript
chosen
[ { "from": "system", "value": "Fix a typo (`e` -> `err`)" }, { "from": "human", "value": "module.exports = function(module, options){\n try{\n if(module[0] in {\".\":1}){\n module = process.cwd() + module.substr(1);\n }\n return require(module);\n }catch(e){ \n if (err.code !==...
javascript
chosen
[ { "from": "system", "value": ":white_check_mark: Add tests for actual FM\n" }, { "from": "human", "value": "import test from 'ava';\nimport {fromString, fromNull, fromStream} from '../helpers/pipe';\nimport fm from '../../lib/plugins/front-matter';\n\ntest('No Compile - null', t => {\n return f...
javascript
chosen
[ { "from": "system", "value": "Fix crash when dragging definitions\n\nI was accidentally updating the view key for a view, and the tracked view code\ncouldn't handle prop changes.\n" }, { "from": "human", "value": "/**\n * @flow\n */\n\nimport React, {\n Component,\n Text,\n View,\n} fro...
javascript
chosen
[ { "from": "system", "value": "Add scale() function for relative sizing\n" }, { "from": "human", "value": "draft.mixins.size = {\n // Get/set the element's width & height\n size(width, height) {\n return this.prop({\n width: draft.types.length(width),\n height: draft.types.length(h...
javascript
chosen
[ { "from": "system", "value": "Disable image grab event for background\n" }, { "from": "human", "value": "'use strict';\n\nvar fixBackground = function(){\n var backgroundImage = document.getElementById('page-background-img');\n if(window.innerHeight >= backgroundImage.height) {\n ba...
javascript
chosen
[ { "from": "system", "value": "Include handlebars module in build process\n" }, { "from": "human", "value": "define([\"handlebars-compiler\"], function (Handlebars) {\n var buildMap = {},\n templateExtension = \".hbs\";\n\n return {\n\n // http://requirejs.org/docs/plugins.html#apiload\...
javascript
chosen
[ { "from": "system", "value": "Fix babelLoaderMatcher for other npm install tool\n\nlike https://github.com/cnpm/npminstall\n" }, { "from": "human", "value": "const babelLoaderMatcher = function(rule) {\n return rule.loader && rule.loader.indexOf(\"/babel-loader/\") != -1;\n}\n\nconst getLoader ...
javascript
chosen
[ { "from": "system", "value": "chore(jest): Update testURL to accommodate JSDOM update\n\n- See https://github.com/jsdom/jsdom/issues/2304\n" }, { "from": "human", "value": "/* @flow */\nmodule.exports = {\n coverageDirectory: 'reports/coverage',\n coveragePathIgnorePatterns: [\n '/node_modu...
javascript
chosen
[ { "from": "system", "value": "Make the \"or Browse All\" button a link that takes you to /search route\n" }, { "from": "human", "value": "import React from 'react'\n\nconst Landing = React.createClass({\n render () {\n return (\n <div className='landing'>\n <h1>svideo</h1>\n ...
javascript
chosen
[ { "from": "system", "value": "Use data attribute instead of val()\n" }, { "from": "human", "value": "var EDSN_THRESHOLD = 30;\n\nvar EdsnSwitch = (function(){\n var editing;\n var validBaseLoads = /^(base_load|base_load_edsn)$/;\n\n EdsnSwitch.prototype = {\n enable: function(){\n if(...
javascript
chosen
[ { "from": "system", "value": "docs: Fix links on the site, again 🦐\n\nCloses #1650\n" }, { "from": "human", "value": "const visit = require('unist-util-visit');\nconst { kebabCase } = require('lodash');\n\nconst IGNORES = [\n\t'https://raw.githubusercontent.com/styleguidist/react-styleguidist/m...
javascript
chosen
[ { "from": "system", "value": "Check for badly formatted props\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = {\n description: \"A basic React component\",\n\n generateReplacements(args) {\n let propTypes = \"\";\n let defaultProps = \"\";\n\n if(ar...
javascript
chosen
[ { "from": "system", "value": "Add automatic assembly of env\n" }, { "from": "human", "value": "var vavaClass = require('./vava/class');\nvar vavaMethod = require('./vava/method');\nvar vavaType = require('./vava/type');\n\nexports.scope = require('./vava/scope');\n\n// TODO automate env assembly...
javascript
chosen
[ { "from": "system", "value": "Remove commented out code that was upsetting uglify\n" }, { "from": "human", "value": "/*global define*/\n/*jslint browser:true,white:true*/\ndefine([\n 'jquery',\n 'kb_common/html'\n], function ($, html) {\n 'use strict';\n // jQuery plugins that you ca...
javascript
chosen
[ { "from": "system", "value": "Fix error with resending response.\n" }, { "from": "human", "value": "var bodyParser = require('body-parser');\nvar express = require('express');\n\nvar database = require('../database');\nvar router = express.Router();\n\nrouter.get('/', function(req, res) {\n d...
javascript
chosen
[ { "from": "system", "value": "Remove paragraphs since they add unnecessary vertical padding." }, { "from": "human", "value": "var key = require('../utils/key');\nvar sync = require('synchronize');\nvar request = require('request');\nvar _ = require('underscore');\n\n\n// The API that returns the...
javascript
chosen
[ { "from": "system", "value": "Change data directory back to test data.\n" }, { "from": "human", "value": "'use strict';\n\nvar bowlingApp = angular.module('bowling', ['ngRoute']);\n\nbowlingApp.config(['$routeProvider',\n function($routeProvider) {\n $routeProvider.otherwise({\n ...
javascript
chosen
[ { "from": "system", "value": "Add link to geolocation example into sitemap\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n sitemap: {\n nodes: [\n {\n link: 'index',\n title: 'Home',\n children: null\n ...
javascript
chosen
[ { "from": "system", "value": "Make the sever.js work with zombie 2\n" }, { "from": "human", "value": "var net = require('net');\nvar zombie = require('zombie');\n\n// Defaults\nvar ping = 'pong'\nvar browser = null;\nvar ELEMENTS = [];\n\n//\n// Store global client states indexed by ZombieProxyC...
javascript
chosen
[ { "from": "system", "value": "Remove queue object from the task" }, { "from": "human", "value": "/**\n * Request adapter.\n *\n * @package cork\n * @author Andrew Sliwinski <andrew@diy.org>\n */\n\n/**\n * Dependencies\n */\nvar _ = require('lodash'),\n async = require('async'),\n ...
javascript
chosen
[ { "from": "system", "value": "Add 'config' as argument to rules' constructors\n" }, { "from": "human", "value": "/**\n * The core of BEM hint\n * ====================\n */\nvar vow = require('vow'),\n _ = require('lodash'),\n scan = require('./walk'),\n loadRules = require('./load-rules...
javascript
chosen
[ { "from": "system", "value": "Add js to perform url replacement\n" }, { "from": "human", "value": "$().ready(() => {\n loadContentSection().then(() =>{ \n $(\"#loader\").addClass(\"hide\");\n $(\"#real-body\").removeClass(\"hide\");\n $(\"#real-body\").addClass(\"body\");\n\n $(\".k...
javascript
chosen
[ { "from": "system", "value": "Update save methods strategy\n - Use anonymous function to save collection methods before overwrite\n" }, { "from": "human", "value": "'use strict';\n\nvar Mongoat = require('mongodb');\nvar utilsHelper = require('../helpers/utils-helper');\nvar connect = Mongoat.Mo...
javascript
chosen
[ { "from": "system", "value": "Fix bug accessing wrong schema instance\n" }, { "from": "human", "value": "var clone = require('clone'),\n mongoose = require('mongoose'),\n ObjectId = mongoose.Schema.Types.ObjectId;\n\nmodule.exports = function(schema, options) {\n options = options || {}...
javascript
chosen
[ { "from": "system", "value": "Change branding on default config.\n" }, { "from": "human", "value": "/* exported defaults */\n\n/* Magic Mirror\n * Config Defauls\n *\n * By Michael Teeuw http://michaelteeuw.nl\n * MIT Licensed.\n */\n\nvar defaults = {\n\tport: 8080,\n\n\tlanguage: \"en\",\n\tti...
javascript
chosen
[ { "from": "system", "value": "Fix mute on initial load\n" }, { "from": "human", "value": "function demo($interval, demo) {\n return {\n restrict: 'E',\n template: '<div class=demo-container></div>',\n link: function(scope, element) {\n demo.setContainer(element[0].children[0]);\n ...
javascript
chosen
[ { "from": "system", "value": "Add error handler to System.import promises\n" }, { "from": "human", "value": "/*\n * Copyright 2014 Workiva, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You m...
javascript
chosen
[ { "from": "system", "value": "[hide_input_all] Fix loading for either before or after notebook loads.\n" }, { "from": "human", "value": "// toggle display of all code cells' inputs\n\ndefine([\n 'jquery',\n 'base/js/namespace'\n], function(\n $,\n IPython\n) {\n \"use strict\";\n\...
javascript
chosen
[ { "from": "system", "value": "Add TODO for handling getOwnPropertyDescriptor support\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* FUNCTION: moveProperty( source, prop, target )\n*\tMoves a property from one object to another object.\n*\n* @param {Object} source - source object\n* @...
javascript
chosen
[ { "from": "system", "value": "Add .fitvids-responsive-iframe class for making iframes responsive\n" }, { "from": "human", "value": "jQuery( document ).ready( function( $ ) {\n\n // Your JavaScript goes here\n jQuery('#content').fitVids();\n});" }, { "from": "gpt", "value": "jQuery(...
javascript
chosen
[ { "from": "system", "value": "Use new function name for doc generator\n" }, { "from": "human", "value": "var geonames = require('geonames-stream');\nvar peliasConfig = require( 'pelias-config' ).generate();\nvar peliasAdminLookup = require( 'pelias-admin-lookup' );\nvar dbclient = require('pelia...
javascript
chosen
[ { "from": "system", "value": "Add more specificity to the CI \"check.\"\n" }, { "from": "human", "value": "/*\nCopyright (c) 2013, Yahoo! Inc. All rights reserved.\nCode licensed under the BSD License:\nhttp://yuilibrary.com/license/\n*/\n\nmodule.exports = function(grunt) {\n // The `artifac...
javascript
chosen
[ { "from": "system", "value": "Add event category descriptions + update style\n" }, { "from": "human", "value": "'use strict';\n\n// Setting up route\nangular.module('core.admin.routes').config(['$stateProvider',\n function ($stateProvider) {\n $stateProvider\n .state('admin', {\n ...
javascript
chosen
[ { "from": "system", "value": "Add skewness to beta prime namespace\n" }, { "from": "human", "value": "'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdli...
javascript
chosen
[ { "from": "system", "value": "Set classes for showing the lists horizontally" }, { "from": "human", "value": "import React from 'react';\nimport { List, ListSubHeader, ListCheckbox } from 'react-toolbox/lib/list';\n\nconst SponsorAffinities = () => {\n return (\n <div>\n <List sel...
javascript
chosen
[ { "from": "system", "value": ":lock: Fix permissions check in Entries query\n" }, { "from": "human", "value": "const { GraphQLList, GraphQLString } = require('graphql');\nconst mongoose = require('mongoose');\nconst { outputType } = require('../../types/Entries');\nconst getProjection = require(...
javascript
chosen
[ { "from": "system", "value": "Add actions for returning a book\n" }, { "from": "human", "value": "import axios from 'axios';\nimport { FETCHING_PROFILE, PROFILE_SUCCESS, PROFILE_FAILURE } from './types';\nimport { apiURL } from './userSignUp';\nimport setHeader from '../helpers/setheader';\n\nco...
javascript
chosen
[ { "from": "system", "value": "fix(docs): Fix template url for UI docs\n" }, { "from": "human", "value": "/**\n * This file is part of Superdesk.\n *\n * Copyright 2013, 2014 Sourcefabric z.u. and contributors.\n *\n * For the full copyright and license information, please see the\n * AUTHORS and...
javascript
chosen
[ { "from": "system", "value": "Fix no payment set by default error.\n" }, { "from": "human", "value": "exports.create = {\n\n\tSettings: [{\n\n\t\t\"site\": {\n\t\t\t\"name\": \"EStore Demo\"\n\t\t},\n \"payment.cod.active\": true\n\t}]\n\n};\n" }, { "from": "gpt", "val...
javascript
chosen
[ { "from": "system", "value": "Use `in` to detect if the query param has \"search\"\n" }, { "from": "human", "value": "import * as React from 'react'\nimport {State} from 'react-router'\n\nimport SearchButton from 'elements/searchButton'\nimport GraduationStatus from 'elements/graduationStatus'\n...
javascript
chosen
[ { "from": "system", "value": "Delete useless code. Added removeItem method\n" }, { "from": "human", "value": "// app.shoppingListService.js\n\n(function() {\n \"use strict\";\n\n angular.module(\"MyApp\")\n .service(\"ShoppingListService\", ShoppingListService);\n\n function ShoppingListSe...
javascript
chosen
[ { "from": "system", "value": "Use Date.now() if available since it's faster\n" }, { "from": "human", "value": "\"use strict\"\n\nmodule.exports = function(callback) {\n\t//60fps translates to 16.6ms, round it down since setTimeout requires int\n\tvar time = 16\n\tvar last = 0, pending = null\n\t...
javascript
chosen
[ { "from": "system", "value": "Remove extra space in message.\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n var headings = ['h6', 'h5', 'h4', 'h3', 'h2', 'h1'];\n var score = 0;\n var message = '';\n var sections = Array.prototype.slice.call(window.document.getElementsBy...
javascript
chosen
[ { "from": "system", "value": "Enable sourcemaps on production builds\n" }, { "from": "human", "value": "// Here is where you can define configuration overrides based on the execution environment.\n// Supply a key to the default export matching the NODE_ENV that you wish to target, and\n// the ba...
javascript
chosen
[ { "from": "system", "value": "Add try-catch block for obtaining canvas context\n" }, { "from": "human", "value": "// Game\ndefine([\n\t'stage',\n\t'models/ui',\n\t'utility'\n], function(Stage, UI, Utility) {\n\n\tconsole.log(\"game.js loaded\");\n\n\tvar Game = (function() {\n\t\t// Game canvas\...
javascript
chosen
[ { "from": "system", "value": "Add disabled to text input" }, { "from": "human", "value": "import React from 'react'\n\nexport default class Text extends React.Component {\n\n static propTypes = {\n onChange: React.PropTypes.func,\n value: React.PropTypes.string,\n fieldType: React.Prop...
javascript
chosen
[ { "from": "system", "value": "Fix a test on travis\n" }, { "from": "human", "value": "'use strict';\n\nconst { expect } = require('chai');\n\nconst SshTransport = require('./ssh');\n\ndescribe('SshTransport', () => {\n it('should not use a private key if password is specified', () => {\n con...
javascript
chosen
[ { "from": "system", "value": "Update typeahead source when different user entered\n" }, { "from": "human", "value": "// Github API call according to their json-p dox\nfunction callGHAPI(url, callback) {\n var apiRoot = \"https://api.github.com/\";\n var script = document.createElement(\"sc...
javascript
chosen
[ { "from": "system", "value": "Fix defaulting to events page, maybe....\n" }, { "from": "human", "value": "---\nlayout: null\n---\n$(document).ready(function () {\n $('a.events-button').click(function (e) {\n if ($('.panel-cover').hasClass('panel-cover--collapsed')) return\n currentWidth =...
javascript
chosen
[ { "from": "system", "value": "style(ESLint): Update code formatting to comply with our ESLint specification\n" }, { "from": "human", "value": "import React from 'react';\n\nexport default React.createClass({\n\n displayName: 'DataSetViewer',\n\n propTypes: {\n base: React.PropTypes....
javascript
chosen
[ { "from": "system", "value": "Remove max-width from guestbook capture\n" }, { "from": "human", "value": "/** @jsxImportSource theme-ui */\nimport { Box, Button } from 'theme-ui'\nimport Link from 'next/link'\nimport Sparkle from './sparkle'\nimport Spicy from './spicy'\n\n// email\n\nexport defa...
javascript
chosen
[ { "from": "system", "value": "Hide for your own account.\n" }, { "from": "human", "value": "import React from 'react';\nimport steem from 'steem'\n\nimport { Button } from 'semantic-ui-react'\n\nexport default class AccountFollow extends React.Component {\n constructor(props) {\n super(props...
javascript
chosen
[ { "from": "system", "value": "Fix ember-app-loader error on invalid modules\n" }, { "from": "human", "value": "const HarmonyExportExpressionDependency\n\t= require( \"webpack/lib/dependencies/HarmonyExportExpressionDependency\" );\nconst HarmonyExportSpecifierDependency\n\t= require( \"webpack/l...
javascript
chosen
[ { "from": "system", "value": "Switch to fade transition (performance issues)\n" }, { "from": "human", "value": "import 'babel-polyfill';\n\nrequire('normalize.css');\nrequire('reveal.js/css/reveal.css');\nrequire('reveal.js/css/theme/black.css');\nrequire('./index.css');\n\nimport reveal from 'r...
javascript
chosen
[ { "from": "system", "value": "Add the missing require for path module\n" }, { "from": "human", "value": "var fs = require('fs');\nvar mkdirp = require('mkdirp');\nvar existsSync = fs.existsSync || path.existsSync; // to support older nodes than 0.8\n\nvar CONFIG_FILE_NAME = 'config.json';\nvar C...
javascript
chosen
[ { "from": "system", "value": "Move method list to node client\n" }, { "from": "human", "value": "var RestClient = require('carbon-client')\nvar util = require('util')\nvar fibrous = require('fibrous');\n\n/******************************************************************************************...
javascript
chosen
[ { "from": "system", "value": "Fix up route to logs tab\n" }, { "from": "human", "value": "import React from 'react';\n\nimport TaskDetail from './TaskDetail';\n\nimport MesosStateStore from '../../../../../../src/js/stores/MesosStateStore';\nimport ServiceBreadcrumbs from '../../components/Servi...
javascript
chosen
[ { "from": "system", "value": "Use advertised API version for CFN.\n" }, { "from": "human", "value": "exports.init = function(genericAWSClient) {\n // Creates a CloudFormation API client\n var createCFNClient = function (accessKeyId, secretAccessKey, options) {\n options = options || {};\n\n...
javascript
chosen
[ { "from": "system", "value": "Load jquery from cdn instead of locally for menubar.\n" }, { "from": "human", "value": "if (typeof(Alchemy) === 'undefined') {\n var Alchemy = {};\n}\n\n// Load jQuery on demand. Use this if jQuery is not present.\n// Found on http://css-tricks.com/snippets/jquery/...
javascript
chosen
[ { "from": "system", "value": "Print out help menu when incorrect argument is given\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\n/* global require, process */\n\nvar program = require('commander'),\n\tfs = require('fs'),\n\tcwd = process.cwd(),\n\tcliPath = cwd + '/node_modules/wee-...
javascript
chosen
[ { "from": "system", "value": "Add strike-through for completed tasks\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react'\nimport ListItem from 'material-ui/lib/lists/list-item'\nimport Checkbox from 'material-ui/lib/checkbox'\nimport ActionDelete from 'material-ui/lib/svg...
javascript
chosen
[ { "from": "system", "value": "Add test to ensure mongodb is running.\n" }, { "from": "human", "value": "/* global require, describe, it */\n'use strict';\n\nvar expect = require('chai').expect;\nvar request = require('request');\n\nvar url = function(path) {\n return 'http://localhost:8000' + p...
javascript
chosen
[ { "from": "system", "value": "Verify that exception is raised if appropriate.\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n exports.init = function(params) {\n var fs = require('fs');\n var path = require('path');\n var service = params['service'];\n var shel...
javascript
chosen
[ { "from": "system", "value": "Check for is connected before ending\n" }, { "from": "human", "value": "/**\n DelveClient\n @description creates a singleton Delve client\n**/\n'use babel';\n\nconst DelveClient = require('delvejs');\n\nvar delveClient;\n\nconst connManager = {\n connect: functio...
javascript
chosen
[ { "from": "system", "value": "Refactor for abstractions and better control flow\n" }, { "from": "human", "value": "import {map} from \"ramda\"\n\nimport mergeResource from \"../mergeResource\"\n\nexport default function refreshResources (): Function {\n return function thunk (dispatch: ReduxDis...
javascript
chosen
[ { "from": "system", "value": "Add organizer Endpoint to API\n" }, { "from": "human", "value": "'use strict';\n\nvar mongoose = require('mongoose'),\n\tutils = require('../utils'),\n\tUser = mongoose.model('User'),\n\tApplication = mongoose.model('Application'),\n\tSimpleApiKey = mongoose.model('...
javascript
chosen
[ { "from": "system", "value": "Fix dashboard panel title when dashboard is undefined\n" }, { "from": "human", "value": "function maDashboardPanel($state) {\n return {\n restrict: 'E',\n scope: {\n collection: '&',\n entries: '&'\n },\n link: fu...
javascript
chosen
[ { "from": "system", "value": "Add unit test for Figshare ID in L1 presenter\n" }, { "from": "human", "value": "import parseL1ArticlePresenters from '../../../../lib/repository-mappers/figshare/parseL1ArticlePresenters';\n\nconst figshareL1Articles = require('./resources/figshareL1Articles.json'...
javascript
chosen
[ { "from": "system", "value": "Fix persistence issues not tracking the correct mutations\n" }, { "from": "human", "value": "import Vue from \"vue\";\nimport Vuex, {Store} from \"vuex\";\nimport state from \"./state\";\nimport * as mutations from \"./mutations\";\nimport * as getters from \"./gett...
javascript
chosen
[ { "from": "system", "value": "Add missing import ember to dummy app\n" }, { "from": "human", "value": "export default Ember.Controller.extend({\n actions: {\n collapseLeft: function() {\n this.get('leftChild').collapse();\n },\n collapseRight: function() {\n this.get('rightCh...
javascript
chosen
[ { "from": "system", "value": "[FEATURE] Load base config from file.\n" }, { "from": "human", "value": "var nconf = require('nconf');\n\nnconf\n .env();\n\nnconf.defaults({\n 'RIPPLE_REST_API': 'http://localhost:5990',\n 'DATABASE_URL': 'postgres://postgres:password@localhost:5432/ripple_gatew...
javascript
chosen
[ { "from": "system", "value": "Set default configuration for tests\n" }, { "from": "human", "value": "/* eslint-disable import/no-unassigned-import */\n\nimport 'raf/polyfill'\nimport 'mock-local-storage'\n\nimport {configure} from 'enzyme'\nimport Adapter from 'enzyme-adapter-react-16'\n\nconfig...
javascript
chosen
[ { "from": "system", "value": "Add missing customOnChange directive for the new background selector component\n" }, { "from": "human", "value": "import appModule from '../module.js';\n\n/**\n * @param {string} appBackgroundselectorTemplateUrl Url to backgroundselector template.\n * @return {angul...
javascript
chosen
[ { "from": "system", "value": "Disable unit test console logging\n" }, { "from": "human", "value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-file.html\n\nconst path = require('path');\n\nprocess.env.CHROME_BIN = require...
javascript
chosen
[ { "from": "system", "value": "Remove `autoDismiss` and add actions\n\n- `autoDismiss: false` can be done by making duration `null`\nin this case the snackbar won't dismiss until the button is clicked\non the snackbar item\n\n- Now we can dispatch actions rather than commit mutations directly.\nPer Vue 'best...
javascript
chosen
[ { "from": "system", "value": "Clear eslint error for non-js files.\n" }, { "from": "human", "value": "/* eslint no-use-before-define: 0 */\nimport _ from 'lodash';\nimport axios from 'axios';\n\nlet editor;\nlet monaco;\n\n// Worker always run and will never terminate\n// There is only one globa...
javascript
chosen
[ { "from": "system", "value": "Fix error \"connection error to wss://tracker.webtorrent.io?1fe16837ed\"\n" }, { "from": "human", "value": "global.WRTC = require('wrtc')\nglobal.WEBTORRENT_ANNOUNCE = [ 'wss://tracker.webtorrent.io' ]\n" }, { "from": "gpt", "value": "global.WRTC = requi...
javascript
chosen
[ { "from": "system", "value": "Change state name from 'profile' to 'user'\n" }, { "from": "human", "value": "angular\n .module('fitnessTracker', ['ui.router', 'templates', 'Devise'])\n .config(function($stateProvider, $urlRouterProvider) {\n $stateProvider\n .state('signup', {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix 'cache' variable doc comment\n\nThe comment referenced a non-existing function from during the\ndevelopment; the affected sentence is removed.\n" }, { "from": "human", "value": "/*jshint node: true */\n\nvar Promise = require(\"bluebird\");\nvar fs = require(\"f...
javascript
chosen
[ { "from": "system", "value": "Update breakpoint reducer to assign deeper queries object\n\n" }, { "from": "human", "value": "//@flow\n\nimport { updateObject } from \"../../reducers/utils\";\n\nexport default (\n state: { breakpoints: { main: string } },\n action: { type: string, newLayout: st...
javascript
chosen
[ { "from": "system", "value": "Update up to changes in es5-ext\n" }, { "from": "human", "value": "'use strict';\n\nvar Assert = require('test/assert').Assert\n , bindMethods = require('es5-ext/lib/Object/bind-methods').call\n , merge = require('es5-ext/lib/Object/plain/merge').call\n\n , neve...
javascript
chosen
[ { "from": "system", "value": "Fix katex rendering on firefox" }, { "from": "human", "value": "var updatePreviewTarget = function(data, status) {\n $('.spinner').hide();\n $('#preview-target').html(data);\n renderLatexExpressions();\n}\n\nvar renderLatexExpressions = function() {\n $('.latex-...
javascript
chosen
[ { "from": "system", "value": "Add shadow to non-feature project container\n" }, { "from": "human", "value": "import React from 'react'\n\nimport { Project } from './Project'\n\nconst Projects = ({ projects = [], feature }) => {\n if (!projects.length) return null\n\n const featuredProjects = p...
javascript
chosen
[ { "from": "system", "value": "Add missing semicolon, remove trailing whitespace.\n" }, { "from": "human", "value": "$(function() {\n\tyourCollection = new Models.ItemListings();\n\tfriendCollection = new Models.ItemListings();\n\tfeaturedCollection = new Models.ItemListings();\n\tpublicCollectio...
javascript
chosen
[ { "from": "system", "value": "Fix boolean logic related to showing delete button\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport style from './style';\nimport CommentItem from '../CommentItem';\n\nexport default class CommentList extends Component {\n compon...
javascript
chosen
[ { "from": "system", "value": "Sort to get determinist ordering\n" }, { "from": "human", "value": "var request = require('supertest');\nvar assert = require('assert');\nvar storageFactory = require('../lib/storage/storage-factory');\n\nvar storage = storageFactory.getStorageInstance('test');\nvar...
javascript
chosen
[ { "from": "system", "value": "Update munit dependency to 2.1.4\n" }, { "from": "human", "value": "Package.describe({\n name: \"practicalmeteor:loglevel\",\n summary: \"Simple logger with app and per-package log levels and line number preserving output.\",\n version: \"1.2.0_2\",\n git: \"htt...
javascript
chosen
[ { "from": "system", "value": "Allow --renovate-fork Cli flag for onboarding.\n\nFixes https://github.com/renovateapp/renovate/issues/1371.\n" }, { "from": "human", "value": "const { detectPackageFiles } = require('../../../../manager');\nconst { createOnboardingBranch } = require('./create');\nc...
javascript
chosen
[ { "from": "system", "value": "Fix paths for some mathjax extensions.\n" }, { "from": "human", "value": "MathJax.Hub.Config({\n \"tex2jax\": {\n inlineMath: [['$','$'], ['\\\\(','\\\\)']],\n processEscapes: true\n }\n});\nMathJax.Hub.Config({\n config: [\"MMLorHTML.js\"],\n jax: [\"inpu...
javascript
chosen