conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add logging for geolocation failure cases\n\nMight help people figure out why it's failing, like when trying to run\nthis on a desktop browser (with no wifi) or a laptop with wifi\ndisabled, and no IP-based geolocation available (e.g. behind corporate\nfirewall).\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix stream sending undefined as an x-auth-token\n"
},
{
"from": "human",
"value": "/*global Promise:true*/\n'use strict';\n\nvar EventSource = global.EventSource || require('eventsource')\n , Promise = require('rsvp').Promise\n ;\n\nvar _source;\n\nvar Streamable ... | javascript | chosen |
[
{
"from": "system",
"value": "Update server example to match client example\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport {connect} from 'react-redux';\nimport {Link} from 'react-router';\n\n@connect(state => ({ routerState: state.router }))\nexp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix expose Lodash global by default.\n"
},
{
"from": "human",
"value": "/**\n * Module dependencies.\n */\n\nvar _ = require('lodash');\nvar async = require('async');\n\n\n/**\n * exposeGlobals()\n *\n * Expose certain global variables\n * (if config says so)\n *\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct date format for datepicker\n"
},
{
"from": "human",
"value": "(function($) {\n $(document).ready(function() {\n $('.datepicker').datepicker();\n });\n})(jQuery);\n"
},
{
"from": "gpt",
"value": "(function($) {\n $(document).re... | javascript | chosen |
[
{
"from": "system",
"value": "Remove junk from bottom of file.\n"
},
{
"from": "human",
"value": "// https://gist.github.com/adamalbrecht/7226278\n\n// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being cal... | javascript | chosen |
[
{
"from": "system",
"value": "Rename db_util javascript object to DB.util\n"
},
{
"from": "human",
"value": "\n/* DistrictBuilder Javascript Utilities */\n\n/* DistrictBuilder Javascript Utilities used in multiple\n * Javascript files in the DistrictBuilder codebase.\n * \n * Instantiate db_util... | javascript | chosen |
[
{
"from": "system",
"value": "Add a width prop to thumbnails\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport classnames from 'classnames';\n\nfunction Thumbnail({ src, label, circle }) {\n const className = classnames('ui-thumbnail', {\n 'ui-thumbnail-circle': circle,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust områder request query params to only get published and DNT official områder\n"
},
{
"from": "human",
"value": "/**\n * GET home page\n */\n\nmodule.exports = function (app, options) {\n \"use strict\";\n\n var underscore = require('underscore');\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 'stdout maxBuffer exceeded' error when deploy to AWS\n"
},
{
"from": "human",
"value": "'use strict';\nvar exec = require('child_process').exec;\n\nexports.buildProduction = function (buildTool, err) {\n var buildCmd = 'mvn package -Pprod -DskipTests=true';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix datetime format string (use minutes instead of months)\n\n"
},
{
"from": "human",
"value": "import moment from \"moment\";\n\n\nexport const dateFormat = 'MMM D, YYYY';\nexport const datetimeFormat = 'MMM D, YYYY HH:MM';\n\nfunction getDateParamsFromString(dateS... | javascript | chosen |
[
{
"from": "system",
"value": "Enable storing multiple versions for the same multiline field\n"
},
{
"from": "human",
"value": "class DbConst {\n // no support for static contants, declare then after the class definition\n}\nDbConst.DB_NAME = \"FormHistoryControl\";\nDbConst.DB_VERSION = 1;\nD... | javascript | chosen |
[
{
"from": "system",
"value": "Move data from frontend_prefs to prefs and back during migration\n\n"
},
{
"from": "human",
"value": "export async function up(knex) {\n await knex.schema.table('users', (table) => {\n table.jsonb('preferences').defaultTo('{}').notNullable();\n });\n // Migrat... | javascript | chosen |
[
{
"from": "system",
"value": "Remove select2Options; render Chosen when AutoForm renders\n"
},
{
"from": "human",
"value": "Template.newActivity.created = function () {\n this.subscribe('allCurrentResidents');\n this.subscribe('allHomes');\n this.subscribe('allActivityTypes');\n this.subscri... | javascript | chosen |
[
{
"from": "system",
"value": "Update dropbox module api to take file, fileNAme & user\nconsider taking oauth_token rather than user?\n"
},
{
"from": "human",
"value": "'use strict';\nvar cp = require('child_process');\nvar child = cp.fork(__dirname + '/child.js');\nvar passport = require('passpo... | javascript | chosen |
[
{
"from": "system",
"value": "Use 127.0.0.1 for redis instead of localhost.\n"
},
{
"from": "human",
"value": "exports.conf = {\n nick: 'treslek',\n host: 'irc.freenode.net',\n ircOptions: {\n port: 6667,\n channels: ['##bullpeen'],\n userName: 'treslek',\n realName: 'treslek',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Test calling settings button state\n"
},
{
"from": "human",
"value": "import { getWrapper } from '../shared';\nimport NavigationBar from '../../src/components/NavigationBar';\nimport SettingsPanel from '../../src/components/SettingsPanel';\nimport CallingSettings fr... | javascript | chosen |
[
{
"from": "system",
"value": "Remove alerts when clicking link or button\n"
},
{
"from": "human",
"value": "\n(function(){\n var app = angular.module('runnersNotes',[]);\n\n app.controller('NoteController',['$http',function($http){\n var rn = this;\n rn.success = false;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change inline css to href"
},
{
"from": "human",
"value": "import React from 'react';\nimport Helmet from 'react-helmet';\nimport { prefixLink } from 'gatsby-helpers';\n\nconst BUILD_TIME = new Date().getTime();\n\nmodule.exports = React.createClass({\n displayName... | javascript | chosen |
[
{
"from": "system",
"value": "Add call to open development tools.\n\nThe Electron Quick Start made a call to open the development tools\nwindow. In my original implementation, I forgot this call.\n\nThis change reverses that omission.\n"
},
{
"from": "human",
"value": "var app = require('app'); ... | javascript | chosen |
[
{
"from": "system",
"value": "Update headers after sign_out response\n"
},
{
"from": "human",
"value": "import fetch from 'utils/fetch';\n\nimport { getSettings } from 'models/settings';\nimport parseResponse from 'utils/parseResponse';\nimport { updateHeaders } from 'a... | javascript | chosen |
[
{
"from": "system",
"value": "Read template str as UTF-8 string\n"
},
{
"from": "human",
"value": "var browserify = require('browserify');\nvar brfs = require('brfs');\nvar through = require('through');\n\nrequire('browserify/lib/builtins').fs = 'create-webfs.js'; // TODO: find a better way to r... | javascript | chosen |
[
{
"from": "system",
"value": "Make code more homogeneous. Follow styleguide like AirBnb's one\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar ClocketteApp = require('./ClocketteApp');\nvar React = require('react');\nvar Router = require('react-router');\nvar Route = Router.Route;\n\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow event handlers to be passed in\n"
},
{
"from": "human",
"value": "var $soloModal = null // Used when allowMultiple = false.\n\n// The public API.\nModal = {\n\t\n\tallowMultiple: false,\n\t\n\tshow: function(templateName, data, options){\n\t\t\n\t\tif($soloMod... | javascript | chosen |
[
{
"from": "system",
"value": "wdip-dot-reporter: Allow stdout to be overwritten from config\n"
},
{
"from": "human",
"value": "import chalk from 'chalk'\nimport WDIOReporter from 'wdio-reporter'\n\n/**\n * Initialize a new `Dot` matrix test reporter.\n */\nexport default class DotReporter extend... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Before hook from startpoint\n"
},
{
"from": "human",
"value": "const assert = require('assert')\nconst { Before, Given, When, Then } = require('@cucumber/cucumber')\nconst Shouty = require('../../lib/shouty')\nconst Coordinate = require('../../lib/coordinate'... | javascript | chosen |
[
{
"from": "system",
"value": "Add a fallback redirect in case an error occurs\n\nIn case something goes wrong while adding new minutes,\nthe user is now redirected to something that most\nlikely exists. Should be extended to redirect the\nuser to an error page that explains what happened.\nOr the meetingser... | javascript | chosen |
[
{
"from": "system",
"value": "Use escape() on the values before we add them to the Armory link field.\n"
},
{
"from": "human",
"value": "$(function() {\n $('#applicant_character_server').change(populateArmory);\n $('#applicant_character_name').change(populateArmory);\n});\n\nfunction popul... | javascript | chosen |
[
{
"from": "system",
"value": "Create local rule for experiment\n"
},
{
"from": "human",
"value": "import {\n YAHOO_SEARCH_EXISTING_USERS,\n YAHOO_SEARCH_NEW_USERS,\n} from './experimentConstants'\n\nconst features = {\n 'money-raised-exclamation-point': {\n defaultValue: false,\n rules:... | javascript | chosen |
[
{
"from": "system",
"value": "Change lodash to use guid generator (MIT licensed, Jeff Ward @ stackoverflow)\n"
},
{
"from": "human",
"value": "angular.module('ng.lodash', []).\n factory('_', function($window){\n $window._.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n ret... | javascript | chosen |
[
{
"from": "system",
"value": "Allow mysql host and database name to be configurable\n"
},
{
"from": "human",
"value": "/**\n * Created by ar on 7/16/15.\n */\n\nvar dbuser = \"root\";\nvar dbpass = \"root\";\nvar dbName=\"idservice\";\nvar host=\"localhost\";\n\nprocess.argv.forEach(function (va... | javascript | chosen |
[
{
"from": "system",
"value": "Remove useless require, as bubble also requires this lib\n"
},
{
"from": "human",
"value": "//= require jquery.prevent_scroll_propagation\n//= require bubble\n//= require_tree ./frontend\n//= require factlink.backbone\n//= require tour\n"
},
{
"from": "gpt",... | javascript | chosen |
[
{
"from": "system",
"value": "Add if for JPY amount\n"
},
{
"from": "human",
"value": "function format_money(currency, amount) {\n var symbol = format_money.map[currency];\n if (symbol === undefined) {\n return currency + ' ' + amount;\n }\n return symbol + amount;\n}\n\n// Ta... | javascript | chosen |
[
{
"from": "system",
"value": "[Tests] Add e2e test for history-list\n"
},
{
"from": "human",
"value": "module.exports = {\n 'palette is generated when random-palette button is clicked': function test(browser) {\n const devServer = browser.globals.devServerURL;\n\n browser\n .url(devS... | javascript | chosen |
[
{
"from": "system",
"value": "Use springs to animate tiles\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react'\nimport { COLS } from '../constants/Board'\n\nconst TILE_SIZE = 60\nconst basicStyles = {\n position: 'absolute',\n //flexGrow: 1,\n border: ... | javascript | chosen |
[
{
"from": "system",
"value": "Use ‘transformPropsIntoState’, the method was renamed.\n"
},
{
"from": "human",
"value": "import { assert } from 'chai';\nimport cloneDeep from 'lodash/cloneDeep';\n\nimport Attributes from '../Attributes';\nimport defaultTheme from '../../theme';\n\ndescribe('Attri... | javascript | chosen |
[
{
"from": "system",
"value": "Handle businessUnitId parameter in webhook\n"
},
{
"from": "human",
"value": "module.exports = (slackapp) => {\n slackapp.webserver.post('/incoming-webhooks/:teamId', (req, res) => {\n const events = req.body.events;\n if (!events) {\n slackapp.log('Bad ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug - not node\n"
},
{
"from": "human",
"value": "import Area from './templete'\nimport {\n getRangeAncestorElem,\n getRange,\n isSelectionInArea,\n createSelectionBaseNode,\n createRange\n} from 'utils/selection'\n\nconst sciprt = ({ options, widget, el, _... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing imports for enhancers\n"
},
{
"from": "human",
"value": "import pipe from '../pipe';\n\nexport const transformIn =\n transformer =>\n pipeline =>\n (stream, close) =>\n pipeline(transformer(stream), close);\n\nexport const transformOut =\... | javascript | chosen |
[
{
"from": "system",
"value": "Add correct edit counted quantity key value\n"
},
{
"from": "human",
"value": "/* eslint-disable import/prefer-default-export */\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nexport const ACTIONS = {\n // tableAction constants\n SORT_DAT... | javascript | chosen |
[
{
"from": "system",
"value": "Remove simple menu from menu list"
},
{
"from": "human",
"value": "import PropTypes from 'prop-types';\nimport React from 'react';\nimport List from '../List/List';\nimport ScaledComponent from './ScaledComponent';\nimport DelayedItems from './DelayedItems';\n\ncons... | javascript | chosen |
[
{
"from": "system",
"value": "Increase font size on scoreboard point labels\n\nMakes it much easier to read from further away\n\nSigned-off-by: Tyler Butters <51880522bf24185c8b28348ae172827853c5d662@gmail.com>\n"
},
{
"from": "human",
"value": "$(function () {\n\n var hc_scoreboard_series = ... | javascript | chosen |
[
{
"from": "system",
"value": "Stop propagation on file input click events, so we don't infinitely loop.\n"
},
{
"from": "human",
"value": "/* global angular: true, FileReader: true */\n\nangular.module('webPGQ.directives')\n .directive('openFile', function()\n {\n function link(scop... | javascript | chosen |
[
{
"from": "system",
"value": "Add examples of preference value\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 distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/... | javascript | chosen |
[
{
"from": "system",
"value": "Add frame flash on notification\n"
},
{
"from": "human",
"value": "import {remote} from 'electron'\n\nconst Notifier = {\n send(options) {\n const {title, body} = options\n const icon = 'resource/img/icon.png'\n const notification = new Notification(title,... | javascript | chosen |
[
{
"from": "system",
"value": "Change selector to ensure likes and favourites are not null\n"
},
{
"from": "human",
"value": "/*\n This file is a part of libertysoil.org website\n Copyright (C) 2015 Loki Education (Social Enterprise)\n\n This program is free software: you can redistribute it and... | javascript | chosen |
[
{
"from": "system",
"value": "Add omdb action creator and thunk async action\n"
},
{
"from": "human",
"value": "import { SET_SEARCH_TERM } from './actions'\n\nexport function setSearchTerm (searchTerm) {\n return { type: SET_SEARCH_TERM, searchTerm }\n}\n"
},
{
"from": "gpt",
"value... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Set Query on warehouse fields in Stock Settings\n"
},
{
"from": "human",
"value": "// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors\n// For license information, please see license.txt\n\nfrappe.ui.form.on('Stock Settings', {\n\trefresh: fun... | javascript | chosen |
[
{
"from": "system",
"value": "Fix turn change when coin doesn't fall on grid\n"
},
{
"from": "human",
"value": "var Game = function (options) {\n this.stage = options.stage;\n this.grid = options.grid;\n this.player = 0;\n}\n\nGame.prototype = {\n start: function(){\n this.addCurrentPlaye... | javascript | chosen |
[
{
"from": "system",
"value": "Remove .json suffix from run names"
},
{
"from": "human",
"value": "import BenchmarkRun from 'models/BenchmarkRun.js';\n\nimport DoingWorkSpinner from 'components/DoingWorkSpinner.jsx';\n\n//A non-ui class which cares about upload file, converting them to json and p... | javascript | chosen |
[
{
"from": "system",
"value": "Use nav options with getField\n"
},
{
"from": "human",
"value": "import * as React from 'react';\n\n/**\n * Main List Element to be displayed on the Navigation.\n *\n * @param {Object} props\n * @param {string} props.href hyperlink for the href attribute.\n * @param... | javascript | chosen |
[
{
"from": "system",
"value": "Remove auth hook from user\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst globalHooks = require('../../../hooks');\nconst hooks = require('feathers-hooks');\nconst auth = require('feathers-authentication').hooks;\n\nexports.before = {\n all: [\n globa... | javascript | chosen |
[
{
"from": "system",
"value": "Put async in right place\n"
},
{
"from": "human",
"value": "async registerElement('$variable_id', function () {\n try {\n await refreshString('$element_id', 'textContent', '$data_uri');\n } catch {\n }\n});\n"
},
{
"from": "gpt",
"value": "register... | javascript | chosen |
[
{
"from": "system",
"value": "Add last fermenter-command in status-display.\n"
},
{
"from": "human",
"value": "import Component from 'react-pure-render/component';\nimport R from 'ramda';\nimport React, { PropTypes } from 'react';\nimport { defineMessages, injectIntl, intlShape } from 'react-int... | javascript | chosen |
[
{
"from": "system",
"value": "Test for simple arithmetic functions\n"
},
{
"from": "human",
"value": "var λ = require('./lambada');\n\ndescribe('lambada', function () {\n it('should return a function', function () {\n expect(typeof λ).toBe('function');\n });\n});\n"
},
{
"fr... | javascript | chosen |
[
{
"from": "system",
"value": "Update view unit test to reflect new view"
},
{
"from": "human",
"value": "// ==========================================================================\n// Project: MySystem Unit Test\n// Copyright: ©2010 Concord Consortium\n// ===================================... | javascript | chosen |
[
{
"from": "system",
"value": "Use BlobBuilder (supported by Chrome for Android)\n"
},
{
"from": "human",
"value": "// Based on http://www.html5rocks.com/en/tutorials/workers/basics/\ndefine(function() {\n var URL = window.URL || window.webkitURL\n if (URL && Worker && Blob) {\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix callback parameter as optional"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar utils = require(\"../utils\");\nvar log = require(\"npmlog\");\n\nmodule.exports = function(defaultFuncs, api, ctx) {\n return function changeThreadEmoji(emoji, threadID, cal... | javascript | chosen |
[
{
"from": "system",
"value": "Update bnetServer argument to accept some shorthand\n"
},
{
"from": "human",
"value": "export const cardName = {\n key: 'cardName',\n prompt: 'what card are you searching for?\\n',\n type: 'string'\n}\n\nexport const soundKind = {\n key: 'soundKind',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add more links in footer\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport styled from '@emotion/styled';\n\nconst Content = styled.footer`\n text-align: center;\n color: rgba(0, 0, 0, 0.25);\n`;\n\nconst Paragraph = styled.p`\n margin-bottom:... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error when empty string\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $(\"#search-lots\").autocomplete({\n minLength: 2,\n source: \"/lots/search-ajax/\",\n focus: function( event, ui ) {\n $(\"#search-lot... | javascript | chosen |
[
{
"from": "system",
"value": "Change to targeting a public server\n"
},
{
"from": "human",
"value": "\nimport RNFS from 'react-native-fs';\n\n\nconst Constants = {\n API_PATH: 'http://localhost:3000',\n IMAGE_DIR: RNFS.DocumentDirectoryPath + '/images/',\n}\n\nexport default Constants;\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Remove feedme from list of parsers\n\nSpecifiying feedme will still work, however the it will not be tried in\nthe loop of parsers.\n"
},
{
"from": "human",
"value": "module.exports = {\n keys: ['FEEDPARSER', 'RSS_PARSER', 'FEEDME'],\n RSS_PARSER: require('./... | javascript | chosen |
[
{
"from": "system",
"value": "Add new action volume change\n"
},
{
"from": "human",
"value": "import { connect } from 'react-redux';\nimport Player from '../presentational/audio-player/Player';\nimport { togglePlay, changeCurrentSeconds, seekToSeconds, setDuration } from './../actions/player';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix var declaration for strict mode."
},
{
"from": "human",
"value": "$(document).ready(function(){\n\n function load_new_items(){\n sign = load_path.indexOf('?') >= 0 ? '&' : '?'\n $.get(load_path + sign + 'page=' + (++page_num), function(data, e) {\n i... | javascript | chosen |
[
{
"from": "system",
"value": "CHANGE path of the snapshots files into the regular `__snapshots__` folder\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport renderer from 'react-test-renderer';\nimport shallow from 'react-test-renderer/shallow';\nimport 'jest-specific-snapshot';\... | javascript | chosen |
[
{
"from": "system",
"value": "Update expected icon name in tests\n"
},
{
"from": "human",
"value": "const assert = require('assert');\n\nconst Account = require('../Contents/Scripts/account.js').Account;\nconst PullRequest = require('../Contents/Scripts/pull-request.js').PullRequest;\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Return router class, instead of instance\n"
},
{
"from": "human",
"value": "define([\n 'views/root',\n 'backbone'\n], function (RootView, Backbone) {\n return new (Backbone.Router.extend({\n routes: {\n\n }\n }));\n});\n"
},
{
"from": "gpt",
"v... | javascript | chosen |
[
{
"from": "system",
"value": "Allow pagination on edit pages.\n"
},
{
"from": "human",
"value": "//= require jquery.tokeninput\n\n$(document).ready(function(){\n $('input.token-input').tokenInput(function($input){\n var modelName = $input.data(\"model-name\");\n return \"/admin/autocomple... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve configuration file to absolute path before loading\n"
},
{
"from": "human",
"value": "var configFilePath = process.argv[2];\nvar config = {};\n\nif (configFilePath) {\n try {\n config = require(configFilePath);\n } catch(e) {\n console.log('Cannot lo... | javascript | chosen |
[
{
"from": "system",
"value": "Delete duplicate filler text in modal.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Button from 'react-bootstrap/Button';\n\nimport '../../styles/add-trip.css'\n\n\n/**\n * Component corresponding to add trips modal.\n */\nconst AddTrip = (p... | javascript | chosen |
[
{
"from": "system",
"value": "Improve code comments for undocumented API\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports = new AsyncState()\n\nfunction AsyncState () {\n var tracing\n var state = this\n\n try {\n tracing = require('tracing')\n } catch (e) {\n tracing ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Return JSON as string. yaml-loader should be chained with json-loader.\"\n\nThis reverts commit b05cba0dc659e1c60283224cdf558bc085061db7.\n"
},
{
"from": "human",
"value": "var yaml = require('js-yaml');\n\nmodule.exports = function (source) {\n this.cache... | javascript | chosen |
[
{
"from": "system",
"value": "Check if node is running on darwin before running a darwin only command\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar exec = require('child_process').exec;\nvar plist = require('simple-plist');\n\nmodule.exports = function(path, callback){\n exec('codesig... | javascript | chosen |
[
{
"from": "system",
"value": "Use \"id\" as default key if none provided\n"
},
{
"from": "human",
"value": "var Transform = require( 'stream' ).Transform;\n\nvar MyactStreamTransform = module.exports = function( keyProperty ) {\n Transform.call( this, { objectMode: true });\n\n this.keyPro... | javascript | chosen |
[
{
"from": "system",
"value": "Update copyright year to make tests pass\n"
},
{
"from": "human",
"value": "const test = require(\"ava\")\nconst header = require(\"../../lib/utils/\")\nconst themes = require(\"../../lib/themes\")\nconst pkg = require(\"../../package.json\")\n\nlet darkThemeHeader ... | javascript | chosen |
[
{
"from": "system",
"value": "Set defaults for tempo, division, sequence\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar EventEmitter = require('events').EventEmitter;\nvar inherits = require('util').inherits;\nvar NanoTimer = require('nanotimer');\n\nfunction StepSequencer(tempo, divisi... | javascript | chosen |
[
{
"from": "system",
"value": "Disable Animation on OptBox because of not so smooth movement\n"
},
{
"from": "human",
"value": "Kwf.onElementReady('.kwcStatisticsOptBox', function(el, config) {\n if (Kwf.Statistics.getDefaultOptValue() == 'out' && !Kwf.Statistics.issetUserOptValue()) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Quit app on window close\n"
},
{
"from": "human",
"value": "const {app, BrowserWindow, protocol} = require('electron')\n\nrequire('electron-debug')({ showDevTools: true, enable: true })\n\nvar path = require('path')\n\nvar main = null\n\napp.on('ready', function () ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix QUnit output for equal assertions\n\nDisplay a friendlier message than 'undefined' when an equal assertion fails."
},
{
"from": "human",
"value": "document.write('<div id=\"ember-testing-container\"><div id=\"ember-testing\"></div></div>');\n\nEmber.testing = tr... | javascript | chosen |
[
{
"from": "system",
"value": "Add callbacks for allow and block functions with a test call\n"
},
{
"from": "human",
"value": "var GLOBAL_DAILY_LIMIT = 50000;\nvar GLOBAL_HOURLY_LIMIT = 10000;\nvar USER_DAILY_LIMIT = 500;\nvar USER_HOURLY_LIMIT = 3;\n\nvar RateLimiter = require('./ratelimiter');\... | javascript | chosen |
[
{
"from": "system",
"value": "Add another log statement to example\n"
},
{
"from": "human",
"value": "var lib = require('phosphide/index');\n\n\nlib.listPlugins().then((plugins) => {\n console.log(plugins);\n lib.loadPlugin('foo').then(() => {\n console.log('foo finished loading');\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bot trying to parse message with lexicon prefix\n"
},
{
"from": "human",
"value": "const Gitter = require('./gitter');\nconst Lexicon = require('./lexicon');\n\nconst client = new Gitter();\n\nfunction listenAndReply(roomId) {\n client.readChatMessages(roomId, ... | javascript | chosen |
[
{
"from": "system",
"value": "Add options to exported types\n"
},
{
"from": "human",
"value": "export * from './lib/index.js'\n"
},
{
"from": "gpt",
"value": "/**\n * @typedef {import('./lib/index.js').StringifyEntitiesLightOptions} StringifyEntitiesLightOptions\n * @typedef {import(... | javascript | chosen |
[
{
"from": "system",
"value": "Use onSessionHandlers, also onError, onStateMachineError and onBeforeReplySent\n"
},
{
"from": "human",
"value": "'use strict';\n\nexports.register = function register(skill) {\n skill.onIntent('LaunchIntent', () => ({ reply: 'Intent.Launch', to: 'entry' }));\n sk... | javascript | chosen |
[
{
"from": "system",
"value": "Use URL as unique key for breadcrumb items\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport {Breadcrumb} from 'react-bootstrap'\nimport {IndexLinkContainer as Link} from 'react-router-bootstrap'\n\nexport default class Breadcrumbs extends React.C... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify how to determine if it's first slide\n"
},
{
"from": "human",
"value": "App.Slide = DS.Model.extend({\n url: 'banners',\n\n title: DS.attr('string'),\n body: DS.attr('string'),\n image: DS.attr('string'),\n imageBackground: DS.attr('string'),... | javascript | chosen |
[
{
"from": "system",
"value": "Fix settings with false defaults\n"
},
{
"from": "human",
"value": "(function()\n{\n angular\n .module('ionic.utils', [])\n .factory('localStorage', localStorage);\n\n localStorage.$inject = ['$window'];\n\n function localStorage($window)\n {\n return {... | javascript | chosen |
[
{
"from": "system",
"value": "BUGFIX: Fix JS not matching the updated controller path\n"
},
{
"from": "human",
"value": "Behaviour.register({\n\t'#Form_EditForm' : {\n\t\tgetPageFromServer : function(id) {\n\t\t\tstatusMessage(\"loading...\");\n\t\t\tvar requestURL = 'admin/_queued-jobs/showqueu... | javascript | chosen |
[
{
"from": "system",
"value": "Add Chrome browser definition with the extension loaded\n"
},
{
"from": "human",
"value": "process.env.NODE_ENV = 'test';\nconst path = require('path');\n\nvar webpackConfig = require(path.join(__dirname, './node_modules/react-scripts/config/webpack.config.dev.js'))... | javascript | chosen |
[
{
"from": "system",
"value": "Change routes and middlewares order\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst bodyParser = require('body-parser');\nconst cors = require('cors');\n\nconst app = express();\n\napp.use(bodyParser.json());\napp.use(cors());\napp.set(... | javascript | chosen |
[
{
"from": "system",
"value": "Put paths inside quotes so spaces don't need to be escaped\n"
},
{
"from": "human",
"value": "var sudo = require('sudo-prompt');\nvar cmdFnPath = require.resolve('cmd-fn');\n\nvar setName = sudo.setName;\n\nvar call = function(options, cb) {\n var cmd = process.exe... | javascript | chosen |
[
{
"from": "system",
"value": "Make them fail, so it is a real kata now :)."
},
{
"from": "human",
"value": "// 12: destructuring - object\n// To do: make all tests pass, leave the assert lines unchanged!\n\ndescribe('destructuring objects', () => {\n\n it('is simple', () => {\n const {x} = {... | javascript | chosen |
[
{
"from": "system",
"value": "[webcrypto] Remove a lingering usage of RSA-ES.\n\nTBR=jww\nBUG=372920,245025\n\nReview URL: https://codereview.chromium.org/344503003\n\ngit-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@176389 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n"
},
{
"from": "human",
"value... | javascript | chosen |
[
{
"from": "system",
"value": "Clean nodes before binding so we can have inner bindings\n"
},
{
"from": "human",
"value": "function only_on_page(name, fn) {\n if ($('body').data('page') === name) {\n fn();\n }\n}\n\nfunction init_on_page(name, fn) {\n $(document).on('turbolinks:load', funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add ball and paddle/world collision.\n"
},
{
"from": "human",
"value": "define(['phaser'], function(Phaser) {\n var state = new Phaser.State();\n var paddle;\n state.create = function() {\n paddle = state.add.sprite(400, 500, 'atlas', 'paddle');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Select specific request from redux state directly in connect\n\nThis prevents unneeded re-renders, because before it would rerender when\nanything in a project would change.\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport Request... | javascript | chosen |
[
{
"from": "system",
"value": "Add some more props to whitelist"
},
{
"from": "human",
"value": "\nconst whitelist = [\n 'style',\n 'className',\n 'role',\n 'id',\n 'autocomplete',\n 'size',\n];\n\nconst whitelistRegex = [/^aria-/, /^data-/, /^on[A-Z]\\w+/]\n\nexport function pick(props, co... | javascript | chosen |
[
{
"from": "system",
"value": "Add default page and perPage values to user likes\n"
},
{
"from": "human",
"value": "/* @flow */\n\nexport default function users(): Object {\n return {\n profile: (username: string) => {\n const url = `/users/${username}`;\n\n return this.request({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test prompt message when no fixture is selected\n"
},
{
"from": "human",
"value": "const React = window.React;\nimport RangeInputFixtures from './range-inputs';\nimport TextInputFixtures from './text-inputs';\nimport SelectFixtures from './selects';\nimport Text... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.