conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "test: Enable long stack traces for testing\n" }, { "from": "human", "value": "/**\n * Created by Aaron on 7/6/2015.\n */\n\nimport assert from 'assert';\n\nexport function runTests( build, tests ) {\n assert( build === 'compat' || build === 'modern', 'Only modern...
javascript
chosen
[ { "from": "system", "value": "Add possibility to set 'auth: false' in the routes.\n" }, { "from": "human", "value": "export class AuthFilterValueConverter {\n toView(routes, isAuthenticated) {\n console.log(isAuthenticated);\n if (isAuthenticated)\n return routes;\n\n return route...
javascript
chosen
[ { "from": "system", "value": "Change jquery selector for js\n" }, { "from": "human", "value": "$(document).ready(function() {\n $(\".new_comment\").submit(function(event){\n event.preventDefault();\n var type = $('#comment_commentable_type').val()\n var type_id = $('#comment_commentable_id...
javascript
chosen
[ { "from": "system", "value": "Fix export names for stream methods in browser package\n" }, { "from": "human", "value": "const noSupport = () => {\n throw new Error('Streaming functions not supported in browsers')\n}\n\nmodule.exports = {\n getProductStream: noSupport,\n getStoreStream: noSupp...
javascript
chosen
[ { "from": "system", "value": "Remove array check on variable that is always array\n" }, { "from": "human", "value": "'use strict';\n\nconst util = require('hexo-util');\nconst Pattern = util.Pattern;\nconst _ = require('lodash');\n\nfunction i18nLocalsFilter(locals) {\n const i18n = this.theme....
javascript
chosen
[ { "from": "system", "value": "Put comment text back as commented\n" }, { "from": "human", "value": "(function(ext) {\n // Cleanup function when the extension is unloaded\n ext._shutdown = function() {};\n\n // Status reporting code\n // Use this to report missing hardware, plugin or ...
javascript
chosen
[ { "from": "system", "value": "Switch node sortkey on Workload page.\n\nThe node sortkey was displayname instead of node.sortName which\ncaused sorting to behave strangely.\n\nI switched the sortkeys and added more to the sortkey array to\nhelp provide a more stable sort.\n\nrancher/rancher#21218\n" }, {...
javascript
chosen
[ { "from": "system", "value": "Clear field on focus when no value\n" }, { "from": "human", "value": "var $ = require('jquery');\n\n(function() {\n var filterSymbol = function(value) {\n return value.replace(/[^\\d.]/g, '');\n };\n\n $(document).on('focus', '.jsCurrency', function() {\n...
javascript
chosen
[ { "from": "system", "value": "Fix key events for chrome\n" }, { "from": "human", "value": "$(function() {\n\n $('#manual').click(function() {\n $.get('/api/training/alone', function(data) {\n location.href = \"/\" + data.game.id + \"?token=\" + data.token + '&playUrl=' + encodeURICompon...
javascript
chosen
[ { "from": "system", "value": "blueprints/mixin-test: Use `options.entity-name` for test description\n" }, { "from": "human", "value": "'use strict';\n\nconst testInfo = require('ember-cli-test-info');\nconst useTestFrameworkDetector = require('../test-framework-detector');\n\nmodule.exports = us...
javascript
chosen
[ { "from": "system", "value": "Add more detail to error throwing spec\n" }, { "from": "human", "value": "describe(\"Implement queue with two stacks\", function() {\n const Queue = new QueueTwoStacks(); \n Queue.enqueue(1);\n Queue.enqueue(2);\n Queue.enqueue(3);\n\n describe(\"enqueue()\", f...
javascript
chosen
[ { "from": "system", "value": "Update site variables for v1.0.0\n" }, { "from": "human", "value": "// The buildInfo constant is generated by sbt. Do not edit directly.\nconst buildInfo = { organization: \"is.cir\", coreModuleName: \"ciris\", latestVersion: \"1.0.0-SNAPSHOT\", scalaPublishVersions...
javascript
chosen
[ { "from": "system", "value": "Add better notes of when things aren't working.\n" }, { "from": "human", "value": "var ChunkTypes = require('./ChunkTypes');\nvar DataRequestType = require('./io/DataRequestType');\nvar Promise = require('bluebird');\nvar Ranges = require('./utils/Ranges');\n\nvar _...
javascript
chosen
[ { "from": "system", "value": "Add uploading true or false\n\nAdd uploading true or false. Use handlebar helper to show used if uploading" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.View.extend({\n tagName: 'input',\n name: 'file',\n attributeBindings: [...
javascript
chosen
[ { "from": "system", "value": "Fix Like button and correct the high res album art\n" }, { "from": "human", "value": "controller = new BasicController({\n supports: {\n playpause: true,\n next: true,\n previous: true,\n favorite: true\n },\n playStateSelector: '.playControl',\n pla...
javascript
chosen
[ { "from": "system", "value": "feat: Refresh materialize hooks on if url path is trains\n\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Controller.extend({\n indexedDbPromised: Ember.inject.service('indexed-db'),\n init () {\n ...
javascript
chosen
[ { "from": "system", "value": "Use kebab-case for CSS classes\n" }, { "from": "human", "value": "import {h} from '@cycle/dom';\nimport Rx from 'rx';\n\nimport gameScore from './game-score';\n\nexport default function ScorePanel(responses) {\n const url = 'https://nhl-score-api.herokuapp.com/api/...
javascript
chosen
[ { "from": "system", "value": "Fix matching in the filter\n\nI got it backwards :/\n" }, { "from": "human", "value": "/**\n * This filtering plugin will allow matching of module names in either\n * form of 'Foo::Bar', or 'Foo-Bar'.\n *\n * Based on dataTables.filter.phoneNumber.js\n *\n * @summar...
javascript
chosen
[ { "from": "system", "value": "Hide the ''load more'' button while loading.\n" }, { "from": "human", "value": "'use strict';\n\n// Initiate masonry & infinite scroll on relevant pages\n$(function() {\n\n var $container = $('#masonry-container');\n\n $container.imagesLoaded(function(){\n ...
javascript
chosen
[ { "from": "system", "value": "Add timing values to config\n" }, { "from": "human", "value": "export default {\n // Bot config\n bot: {\n nick: '',\n userName: '',\n realName: '',\n password: ''\n },\n\n // Server config\n server: {\n address: 'ir...
javascript
chosen
[ { "from": "system", "value": "Make Grunt use the correct paths for sassing.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // 1. All configuration goes here \n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n /*\n concat: { ...
javascript
chosen
[ { "from": "system", "value": "Use the TEST_DATABASE_URL for the test database connections\n" }, { "from": "human", "value": "\nconst databaseName = 'transcriptus'\nconst pathToDatabase = `${__dirname}/database`\n\nmodule.exports = {\n development: {\n client: 'pg',\n connection: \"postgre...
javascript
chosen
[ { "from": "system", "value": "Fix update to work with nodemon.\n" }, { "from": "human", "value": "// github.js\n// aoneill - 12/24/16\n\nvar child = require('child_process'),\n GithubWebHook = require('express-github-webhook'),\n process = require('process'),\n _ = require('underscore')...
javascript
chosen
[ { "from": "system", "value": "Add Underrot / Tol Dagor trinkets\n" }, { "from": "human", "value": "// Items only found in dungeons\n\nimport ITEM_QUALITIES from 'common/ITEM_QUALITIES';\n\nexport default {\n // Group by instance (with comments)\n\n // Quests.............. upscaled in beta\n E...
javascript
chosen
[ { "from": "system", "value": "Change `getOptimizerByDeviceAddress` to return `null` if unknown.\n" }, { "from": "human", "value": "/*! resol-vbus | Copyright (c) 2013-2014, Daniel Wippermann | MIT license */\n'use strict';\n\n\n\nvar _ = require('lodash');\nvar Q = require('q');\n\n\n\nvar optim...
javascript
chosen
[ { "from": "system", "value": ":guitar: Make posts insertable/editable by members\n" }, { "from": "human", "value": "import { Posts } from 'meteor/example-forum';\n\n/*\nLet's assign a color to each post (why? cause we want to, that's why).\nWe'll do that by adding a custom field to the Posts col...
javascript
chosen
[ { "from": "system", "value": "Maintain references to stores on Flux object\n" }, { "from": "human", "value": "var Dispatcher = require(\"./dispatcher\");\n\nvar Flux = function(stores, actions) {\n var dispatcher = new Dispatcher(stores),\n dispatchBinder = {\n dispatch: function(ty...
javascript
chosen
[ { "from": "system", "value": "Add player color to the welcome\n" }, { "from": "human", "value": "const $ = require('jquery');\nconst board = require('./board');\nconst Piece = require('./piece');\n\nfunction Game(players, board) {\n this.players = players;\n this.turn = 0;\n this.winner...
javascript
chosen
[ { "from": "system", "value": "Make use of existing config and override if values provided\n" }, { "from": "human", "value": "var _ = require('underscore');\n\n//returns the process object with the passed data for pagination and sorting\nvar buildQueryConfig = function(req, config) {\n\n\tvar sor...
javascript
chosen
[ { "from": "system", "value": "Split methods for connecting as student or teacher.\n" }, { "from": "human", "value": "module.exports = function(options) {\n var url = options.url;\n\n var faye = require('faye');\n var teacher = new faye.Client(url);\n var student = new faye.Client(url);\n\...
javascript
chosen
[ { "from": "system", "value": "Refactor dramas controller for authorization\n" }, { "from": "human", "value": "(function(){\n'use strict';\n\nangular\n .module('secondLead')\n\n .controller('DramasCtrl', [\n 'DramaModel',\n 'Gridster',\n 'ListModel',\n 'Restangular',\n 'UserModel...
javascript
chosen
[ { "from": "system", "value": "Sort roles directly by name\n" }, { "from": "human", "value": "const db = require('../lib/database');\nconst messageHelpers = require('../lib/message_helpers');\nconst Table = require('ascii-table');\nconst textHelpers = require('../lib/text_helpers');\n\nmodule.exp...
javascript
chosen
[ { "from": "system", "value": "Fix cache not updating bug\n" }, { "from": "human", "value": "chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {\n\tif (tab.url.indexOf('https://store.playstation.com') === 0) {\n\t\tchrome.storage.local.get(function(cache) {\n\t\t\tif (!(cache &&...
javascript
chosen
[ { "from": "system", "value": "Check jQuery version only if jQuery is available\n" }, { "from": "human", "value": "import $ from 'jquery'\nimport Alert from './alert'\nimport Button from './button'\nimport Carousel from './carousel'\nimport Collapse from './collapse'\nimport Dropdown from './drop...
javascript
chosen
[ { "from": "system", "value": "fix: Correct type of last_commit id\n" }, { "from": "human", "value": "const mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\n\nmodule.exports = {\n name: 'MergeRequest',\n schema: new Schema({\n merge_request: {\n id: Number,\n url: ...
javascript
chosen
[ { "from": "system", "value": "[Core] Add scheduler for running unfinish transaction\n" }, { "from": "human", "value": "var transactionData = require('../models/transactionData.js');\nvar sqsHelper = require('../helpers/aws/sqsHelper.js');\nvar schedule = require('node-schedule');\n\nvar job = sc...
javascript
chosen
[ { "from": "system", "value": "Add support for deleting relationship\n" }, { "from": "human", "value": "import { decamelize } from 'humps';\n\nfunction serializeRelationships(resources = []) {\n return resources.map((resource) => serializeRelationship(resource));\n}\n\nfunction serializeRelation...
javascript
chosen
[ { "from": "system", "value": "Add comment to services global\n" }, { "from": "human", "value": "require('dotenv').load()\n\nglobal.env = (name, def = null) => {\n\tconst val = process.env[name]\n\tif (val == null) {\n\t\treturn def\n\t}\n\treturn val\n}\n\nglobal.service = {\n\tget logger() {\n\...
javascript
chosen
[ { "from": "system", "value": "Fix bug introduced during refactor\n\nPreviously, the helper was loaded before the modules, which is also\nunderstandably necessary for any test suites that use a \nrequire.extensions registration hook (eg `require('babel-core/register)`" }, { "from": "human", "valu...
javascript
chosen
[ { "from": "system", "value": "Rename variable Competitors -> Competitor\n" }, { "from": "human", "value": "var bookshelf = require('bookshelf'),\n config = require('../config'),\n\n db = bookshelf.initialize(config.db);\n\nvar _toJSON = db.Model.prototype.toJSON;\n\ndb.Model.prot...
javascript
chosen
[ { "from": "system", "value": "Fix log plugin breaking standalone" }, { "from": "human", "value": "define(function(require, exports, module) {\n main.consumes = [\n \"Plugin\", \"dialog.error\"\n ];\n main.provides = [\"readonly\"];\n return main;\n\n function main(options, ...
javascript
chosen
[ { "from": "system", "value": "Remove production node environment plugin from webpack\n" }, { "from": "human", "value": "const webpack = require('webpack');\n\nmodule.exports = {\n context: __dirname,\n entry: './index.js',\n output: {\n path: __dirname + '/__build__',\n filename: 'bundl...
javascript
chosen
[ { "from": "system", "value": "Add support to multiple selections when inserting text\n" }, { "from": "human", "value": "import { commands, window } from 'vscode'\nimport { extensionCommands } from './commands'\n\nexport const activate = (context) => {\n extensionCommands.map(cmd => {\n conte...
javascript
chosen
[ { "from": "system", "value": "Set timestamps flag true for user schema\n" }, { "from": "human", "value": "var bcrypt = require('bcrypt-nodejs');\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar userSchema = new Schema({\n name: String,\n email: { type: String, unique:...
javascript
chosen
[ { "from": "system", "value": "Use localhost as redirect hostname for social auth on Android\n" }, { "from": "human", "value": "import url from 'url';\nimport { Constants } from 'expo';\n\nexport default function buildRedirectUrlForMobile(authType) {\n const { protocol, hostname, port } = url.pa...
javascript
chosen
[ { "from": "system", "value": "Refactor react-counter example to \"redux style\"\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\n\nclass Counter extends Component {\n constructor() {\n super();\n this.state = { counter: 0 };\n \n this.incremen...
javascript
chosen
[ { "from": "system", "value": "Correct CC img being mislinked on subpages.\n" }, { "from": "human", "value": "/**\n * Small config file to define website-related constants\n */\nmodule.exports = {\n author: 'Severin Fürbringer',\n name: `Personal Site by Severin Fürbringer`,\n brand: 'SF',\n ...
javascript
chosen
[ { "from": "system", "value": "Rename the CLI sass script and add minify script.\n\nIf the user decides to add more functionality it is better to have a generic name like \"styles\" so the sub scribts can have names like \"styles:minify\", \"styles:lint\" and the user can add tings like \"scripts:minify\".\...
javascript
chosen
[ { "from": "system", "value": "Refactor pairing internals into functions for readability\n" }, { "from": "human", "value": "var uuid = require('uuid/v1')\n\nvar requests = new Set()\n\nfunction getRequest () {\n var reqs = Array.from(requests.values())\n if (reqs.length > 0) {\n var req = re...
javascript
chosen
[ { "from": "system", "value": "Add function for logging out\n" }, { "from": "human", "value": "// Copyright 2019 Google 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 may obtain a copy of t...
javascript
chosen
[ { "from": "system", "value": "Enable new configuration view for pods\n" }, { "from": "human", "value": "import React from 'react';\n\nimport Pod from '../../structs/Pod';\nimport PodSpecView from './PodSpecView';\n\nclass PodConfigurationTabView extends React.Component {\n render() {\n let s...
javascript
chosen
[ { "from": "system", "value": "Change hard-coded email for admin users\n" }, { "from": "human", "value": "import { setClient } from '../actions'\n\n/**\n * Ehhhhhhhhhhhhhh... Needs a little more cleanup, but in general\n * we kinda dumbly trust a user from localStorage if there is no user\n * in ...
javascript
chosen
[ { "from": "system", "value": "Use $location.url() instead of $location.path() to remove url params.\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module(\"hikeio\").\n\tfactory(\"navigation\", [\"$location\", function($location) {\n\t\tvar NavigationService = function() {\n\t\t};...
javascript
chosen
[ { "from": "system", "value": "Enable Bootstrap Select when AutoForm loads\n" }, { "from": "human", "value": "Template.newActivity.created = function () {\n this.subscribe('allCurrentResidents');\n this.subscribe('allHomes');\n this.subscribe('allActivityTypes');\n this.subscribe('allRolesExc...
javascript
chosen
[ { "from": "system", "value": "Update component state even when not editing\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { Creatable } from 'react-select'\nimport R from 'ramda'\n\nclass TagSelect extends Component {\n state = {\n multi: true,\n ...
javascript
chosen
[ { "from": "system", "value": "Rename attribute: body -> content\n" }, { "from": "human", "value": "var marked = require('marked')\n\nmodule.exports = function parser(contents) {\n return {\n meta: extractMetaMatter(contents),\n body: marked(contents.toString('utf-8')),\n }\n}\n\nfunction...
javascript
chosen
[ { "from": "system", "value": "Update triangle validate check at main script\n" }, { "from": "human", "value": "$(window).ready(function(){\n $('#triangle-calculator').submit(function(e){\n e.preventDefault();\n //\n // Code start here\n //\n var triangleType...
javascript
chosen
[ { "from": "system", "value": "Add update to description field to use FormLabel component\n" }, { "from": "human", "value": "/* eslint-disable react/prop-types */\n/* eslint-disable react/destructuring-assignment */\n/* eslint-disable no-console */\nimport React from 'react';\nimport { Text, View...
javascript
chosen
[ { "from": "system", "value": "Remove up/down buttons from unselected items\n" }, { "from": "human", "value": "var React = require('react');\nvar Actions = require('../actions');\nvar Constants = require('../constants');\n\nvar Item = React.createClass({\n render: function(){\n var actionButt...
javascript
chosen
[ { "from": "system", "value": "feat(form): Include maxBikeTime with default general settings\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react'\nimport { connect } from 'react-redux'\n\nimport DropdownSelector from './dropdown-selector'\nimport queryParams from...
javascript
chosen
[ { "from": "system", "value": "Remove itsoffset from avconv parameters w/@sigvef\n\nIt turns out that itsoffset is not interpreted in the same way by all\ncodecs/players etc.\n\nWithout really understanding everything about avconv, testing with\nmultiple renders and watching videos played back in slow motion...
javascript
chosen
[ { "from": "system", "value": "Add more methods and Refactor code\n\nConstructor now accept first argument as paragraph parent. Also create a reference from its parent.\n\nparseWords now pass a sentence rather than sentenceId.\n\nparent() method get paragraph parent from a sentence.\n\nThis commit also intro...
javascript
chosen
[ { "from": "system", "value": "Fix running SET command in sqlite\n" }, { "from": "human", "value": "var fixtures = require('node-require-directory')(__dirname);\n\nexports.load = function(specificFixtures) {\n return exports.unload().then(function() {\n if (typeof specificFixtures === 'string...
javascript
chosen
[ { "from": "system", "value": "Use utility to test if a value is a plain object\n" }, { "from": "human", "value": "'use strict';\n\n// MODULES //\n\nvar debug = require( 'debug' )( 'licenses:pkg:repo' );\nvar prefix = require( './stdlib.js' );\nvar isObject = require( prefix+'@stdlib/utils/is-obj...
javascript
chosen
[ { "from": "system", "value": "Use the right device orientation property in example\n" }, { "from": "human", "value": "import Map from '../src/ol/Map.js';\nimport View from '../src/ol/View.js';\nimport TileLayer from '../src/ol/layer/Tile.js';\nimport {toRadians} from '../src/ol/math.js';\nimport...
javascript
chosen
[ { "from": "system", "value": "ADD api for reading queryParams in client-api\n" }, { "from": "human", "value": "import ClientApi, { defaultDecorateStory } from './client_api';\nimport StoryStore, { splitPath } from './story_store';\nimport ConfigApi from './config_api';\nimport subscriptionsStore...
javascript
chosen
[ { "from": "system", "value": "Remove references to src/images folder\n" }, { "from": "human", "value": "module.exports = {\n siteMetadata: {\n title: `Gatsby Default Starter`,\n description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships ...
javascript
chosen
[ { "from": "system", "value": "Update test to use new function.\n" }, { "from": "human", "value": "const test = require('tap').test;\nconst path = require('path');\nconst VirtualMachine = require('../../src/index');\nconst sb3 = require('../../src/serialization/sb3');\nconst extract = require('.....
javascript
chosen
[ { "from": "system", "value": "Allow SEED in Chat for persistent identity\n" }, { "from": "human", "value": "'use strict';\n\n// Settings\nconst PORT = process.env.PORT;\nconst SEED = process.env.SEED;\n\n// Fabric Types\nconst CLI = require('../types/cli');\nconst settings = {\n seed: SEED,\n ...
javascript
chosen
[ { "from": "system", "value": "Add support for Array type targetPath\n" }, { "from": "human", "value": "/*\n * Grunt Task File\n * ---------------\n *\n * Task: dependo\n * Description: Generate graph for CommonJS or AMD module dependencies.\n *\n */\n\n'use strict';\n\nmodule.exports = function ...
javascript
chosen
[ { "from": "system", "value": "Change default port to 80\n" }, { "from": "human", "value": "import http from 'http';\nimport express from 'express';\nimport cors from 'cors';\nimport bodyParser from 'body-parser';\nimport db from './db';\nimport middleware from './middleware';\nimport api from '....
javascript
chosen
[ { "from": "system", "value": "Improve exception logging within Angular.\n" }, { "from": "human", "value": "'use strict';\n\ndefine(['angular/map/app', 'angular/tags/app', 'angular/status/app'], function(map, tags, status) {\n map.addListener(function() {\n console.log('Map module ready.');\n...
javascript
chosen
[ { "from": "system", "value": "Update aux comments for start+end" }, { "from": "human", "value": "/* eslint-disable object-shorthand */\nmodule.exports = {\n // We need to make sure that the transpiler hit the linoleum source since we are\n // not building to npm or simliar.\n ignore: function...
javascript
chosen
[ { "from": "system", "value": "Fix compatibility with Node.js v4.x\n\nThe callback for the `message` event on the cluster is invoked\nwithout the `worker` argument in Node.js v4.x.\n\nThis commit fixes the issue by using the `message` event that is\nemitted on the workers.\n" }, { "from": "human", ...
javascript
chosen
[ { "from": "system", "value": "Fix TrackingEvent class name for JSDoc\n" }, { "from": "human", "value": "/**\n * Represents a tracking event configuration.\n *\n * @class TrackingEvents\n * @author Tim De Pauw <tim.depauw@zentrick.com>\n * @copyright © 2016 Zentrick nv\n */\nexport class Tracking...
javascript
chosen
[ { "from": "system", "value": "Use arrow function to define rendering methods\n" }, { "from": "human", "value": "import renderer from './mixins/renderer'\nimport rules from './mixins/rules'\n\nexport default function(md, target, opts = {}) {\n const options = { incrementalizeDefaultRules: true, ...
javascript
chosen
[ { "from": "system", "value": "Load next page shortly before hitting the bottom\n\nThis improves the user experience by loading in the next entries shortly before him getting to the bottom. It makes the scrolling more smooth without a break in between.\n\nIt also fixes an error on my browser that scrolling n...
javascript
chosen
[ { "from": "system", "value": "Add after step to clear cookies and local/session storage.\n" }, { "from": "human", "value": "'use strict';\r\n\r\n/* eslint-disable no-var, prefer-arrow-callback */\r\nvar HttpBackend = require('httpbackend');\r\n\r\nvar CustomWorld = (function () {\r\n var chai...
javascript
chosen
[ { "from": "system", "value": "Fix path in browser test helper\n" }, { "from": "human", "value": "'use strict';\n\nconst User = require('../../../server/models/user.js');\n\nexports.command = function(options = {}) {\n let browser = this;\n\n browser\n .perform(function(client, done)...
javascript
chosen
[ { "from": "system", "value": "Remove vertical padding from nav button style\n" }, { "from": "human", "value": "/**\n * @flow\n * A collection of common styles for navbar buttons\n */\n\nimport {StyleSheet, Platform} from 'react-native'\nimport * as c from '../colors'\n\nexport const commonStyles...
javascript
chosen
[ { "from": "system", "value": "Add search icon to AppBar.\n" }, { "from": "human", "value": "const React = require('react')\nconst { connect } = require('react-redux')\nconst RequestsContainer = require('./requests')\nconst SidebarContainer = require('./sidebar')\nconst AppBar = require('material...
javascript
chosen
[ { "from": "system", "value": "Split big numbers in duration humanization\n" }, { "from": "human", "value": "/**\n * @module timed\n * @submodule timed-utils\n * @public\n */\n\nconst { floor } = Math\n\n/**\n * Converts a moment duration into a string with hours minutes and optionally\n * second...
javascript
chosen
[ { "from": "system", "value": "Add a note about our TOUCH_PRESS issue\n" }, { "from": "human", "value": "import { getters, state } from './../../../store/index.js';\nimport getActiveToolsForElement from './../../../store/getActiveToolsForElement.js';\n\nexport default function (customFunction, ev...
javascript
chosen
[ { "from": "system", "value": "Test for getting a random rant\n" }, { "from": "human", "value": "import test from 'ava';\nimport * as api from '../source/api';\n\ntest('get a single rant', t => {\n\n return api.getRant(33434).then(rant => {\n t.truthy(typeof rant === 'object');\n });...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"Fix plotline getting removed when children present\"\"\n\nThis reverts commit 8df9abb705e05391a592a379b9ddbc6d27b3d1cf.\n" }, { "from": "human", "value": "import React, { useRef, useEffect, useState } from 'react';\nimport uuid from 'uuid/v4';\nimp...
javascript
chosen
[ { "from": "system", "value": "Allow formatter to be overridden.\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n var _ = require('lodash');\n\n var NpmSlack = function(opts) {\n this._npm = opts.npm;\n this._slack = opts.slack;\n this._npmPackages = opts.npmPackag...
javascript
chosen
[ { "from": "system", "value": "Fix animation speed of lighted spinning textured cube\n" }, { "from": "human", "value": "(function() {\n\n window.samples.lighted_spinning_textured_cube = {\n\n initialize: function(canvas) {\n var scene = new THREE.Scene();\n\n var camera = new THREE....
javascript
chosen
[ { "from": "system", "value": "Unwind the done callback as well\n" }, { "from": "human", "value": "export function loopAsync(turns, work, callback) {\n let currentTurn = 0, isDone = false\n let sync = false, hasNext = false\n\n function done() {\n isDone = true\n callback.apply(this, arg...
javascript
chosen
[ { "from": "system", "value": "Test(BabelConfig): Support plugin without any options\n" }, { "from": "human", "value": "/**\n * TESTS RUNNER: LOOKUP BABEL CONFIGURATION\n * ========================================\n */\n/* eslint-env mocha */\nimport path from 'path';\nimport { expect, assert } f...
javascript
chosen
[ { "from": "system", "value": "Add a bodyclass after cookie was accept\n" }, { "from": "human", "value": "var $ = require('jQuery');\nvar onReady = require('kwf/on-ready');\nvar cookieOpt = require('kwf/cookie-opt');\n\nonReady.onRender('.kwcClass', function (el, config) {\n if (!cookieOpt.isS...
javascript
chosen
[ { "from": "system", "value": "Remove eof double line-break in service test\n" }, { "from": "human", "value": "import { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('service:flashes', 'Unit | Service | flashes', {\n // Specify the other units that are required for this test.\n // needs: [...
javascript
chosen
[ { "from": "system", "value": "Update helper link when libraries are not found\n" }, { "from": "human", "value": "// debugger;\n\n;(function(Agent){\n\n debug.log(\"Backbone agent is starting...\");\n console.log('Marionette Inspector: window.__agent = ', this);\n Agent.sendAppComponentReport(...
javascript
chosen
[ { "from": "system", "value": "Add content security policy, set default locale\n" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'leibniz-frontend',\n environment: environment,\n baseURL: '/',\n i18n: ...
javascript
chosen
[ { "from": "system", "value": "Add non-recursive version of helper function nth\n" }, { "from": "human", "value": "// Write a function arrayToList that builds up a data structure like the previous one when given [1, 2, 3] as argument, and write a listToArray function that produces an array from a...
javascript
chosen
[ { "from": "system", "value": "Clean up GitHub user HTML\n" }, { "from": "human", "value": "function userTemplate(user) {\n var buffer = [];\n buffer.push('<a href=\"' + user.html_url + '\">');\n buffer.push('<h1>' + user.login + '</h1></a>');\n buffer.push('<img src=\"' + user.avatar_url + '...
javascript
chosen
[ { "from": "system", "value": "Change id format for uploaded data\n" }, { "from": "human", "value": "// Convert data for upload\nvar fs = require('fs');\nvar moment = require('moment');\n\nvar argv = require('yargs')\n .usage('Usage: $0 <JSON file> <datastream name>')\n .demand(2)\n .argv;\n\n...
javascript
chosen
[ { "from": "system", "value": "Refactor `requireStrictEqualityOperators` to handle new token structure\n" }, { "from": "human", "value": "var utils = require('../utils')\n\nmodule.exports = function () {}\n\nmodule.exports.prototype =\n { name: 'requireStrictEqualityOperators'\n\n , configure: ...
javascript
chosen
[ { "from": "system", "value": "Add test coverage for testing main complex sent types from full sumo\nparse\n" }, { "from": "human", "value": "var chai = require('chai'),\n expect = chai.expect,\n fs = require('fs'),\n path = require('path'),\n jKif = require('../src/jkif'),\n ast =...
javascript
chosen
[ { "from": "system", "value": "Remove event listeners after transitioning away\n" }, { "from": "human", "value": "import Ember from 'ember'\nimport Authenticated from 'ember-simple-auth/mixins/authenticated-route-mixin'\n\nconst { get, set } = Ember\n\nexport default Ember.Route.extend(Authentica...
javascript
chosen
[ { "from": "system", "value": "Format message, stack to match original\n\nAdd new line at beginning of stack\nPass the original stack to original Meteor._debug\n" }, { "from": "human", "value": "var originalMeteorDebug = Meteor._debug;\n\nMeteor._debug = function(message, stack) {\n if(!window.z...
javascript
chosen