conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update joint example to include trackingid\n" }, { "from": "human", "value": "var myCanvas = null;\n\n// Declare kinectron \nvar kinectron = null;\n\nfunction setup() {\n myCanvas = createCanvas(512, 424);\n background(0);\n noStroke();\n\n // Define and create ...
javascript
chosen
[ { "from": "system", "value": "Fix the encode url for the browser in InfoPackage\n\n" }, { "from": "human", "value": "import got from 'got'\nimport semver from 'semver'\nimport querystring from 'querystring'\nimport validate from 'validate-npm-package-name'\n\nconst exp = /^((@[^@\\/]+)\\/)?([^@\...
javascript
chosen
[ { "from": "system", "value": "Revert \"bootstrap file changed to reflect new kernel\"\n" }, { "from": "human", "value": "// Copyright 2015, EMC, Inc.\n\n'use strict';\n\nmodule.exports = {\n friendlyName: 'Bootstrap Ubuntu',\n injectableName: 'Task.Linux.Bootstrap.Ubuntu',\n implementsT...
javascript
chosen
[ { "from": "system", "value": "Convert Link to a class Component\n" }, { "from": "human", "value": "import h from \"inferno-hyperscript\";\n\nconst handleClick = fn => e => {\n // Verify left button.\n if (e.button !== 0) {\n return;\n }\n\n if (e.metaKey || e.ctrlKey || e.shif...
javascript
chosen
[ { "from": "system", "value": "Concatenate all subdirs, not just mixins\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n concat: {\n dist: {\n src: ['lib/osteo.js', 'lib/*.js', 'lib/mixins/*.js'],\n dest: 'osteo.js'\n }\n ...
javascript
chosen
[ { "from": "system", "value": "Fix Keyboard unit test for stupid, stupid IE 11.\n" }, { "from": "human", "value": "import { assert } from 'chai';\nimport Keyboard from '../src/Keyboard';\n\n\nclass KeyboardTest extends Keyboard(HTMLElement) {\n keydown(event) {\n if (super.keydown) { super.ke...
javascript
chosen
[ { "from": "system", "value": "Fix delayed stream test to always check\n" }, { "from": "human", "value": "var common = require('../common');\nvar assert = common.assert;\nvar CombinedStream = common.CombinedStream;\nvar fs = require('fs');\n\nvar FILE1 = common.dir.fixture + '/file1.txt';\nvar FI...
javascript
chosen
[ { "from": "system", "value": "Add CJK property name test\n" }, { "from": "human", "value": "/*\n * Lexer UTF-8 support.\n */\n\n/*===\näö\n变量\n1 number\n2 number\n3 number\n===*/\n\n// These chars are in UTF-8 format in the source file\nprint('äö');\nprint('变量');\n\n/* Note: smjs fails the test...
javascript
chosen
[ { "from": "system", "value": "Use typeof to type check registration\n" }, { "from": "human", "value": "/**\n * Store\n * Used to provide default values for a store configuration\n */\n\nexports.reduce = function (stores, state, transformer, initial) {\n return stores.reduce(function(next, item)...
javascript
chosen
[ { "from": "system", "value": "Add truffle org to permission checking\n" }, { "from": "human", "value": "const { execSync } = require(\"child_process\");\n\nconst getPkgPermissions = userOrOrg => {\n const bufferResponse = execSync(`npm access ls-packages ${userOrOrg}`);\n const stringResponse ...
javascript
chosen
[ { "from": "system", "value": "Clean up babylon bundle to allow it to be re-bundled - fixes T6930\n" }, { "from": "human", "value": "require(\"./_util\").updateMain(\"index.js\");\nrequire(\"child_process\").execSync(__dirname + \"/../../../node_modules/.bin/browserify -s babylon -e \" + __dirnam...
javascript
chosen
[ { "from": "system", "value": "Implement cursor movement with keyboard.\n" }, { "from": "human", "value": "import 'babel-polyfill';\nimport $ from 'jquery';\nimport PatternEditor from './pattern_editor';\n\nimport { state } from './state';\n\n\n$('body').keydown((event) => {\n state.set({\n c...
javascript
chosen
[ { "from": "system", "value": "Delete request ids when we're done with them; refactor\n" }, { "from": "human", "value": "import { _ERROR } from 'constants'\nconst pendingIds = {} // requestIDs to timeoutIDs\nlet nextRequestID = 0\n\nexport default function createSocketMiddleware (socket, prefix) ...
javascript
chosen
[ { "from": "system", "value": "Make stories a little more consistent\n" }, { "from": "human", "value": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { action } from '@storybook/addon-actions';\nimport { checkA11y } from 'storybook-addon-a11y';\nimport { withIn...
javascript
chosen
[ { "from": "system", "value": "Update just to recheck travis build" }, { "from": "human", "value": "/*global describe, it, sinon */\n\ndefine([ 'js/app' ], function(main) {\n 'use strict';\n\n describe('Main', function() {\n describe('Main init', function() {\n it('should be main equal ...
javascript
chosen
[ { "from": "system", "value": "fix: Fix ServerErrors returning `undefined` as reason.\n" }, { "from": "human", "value": "class ServerError extends Error {\n constructor ({ statusCode, reason, error }, query) {\n super(`Cubic-client encountered an error while requesting ${query}: ${statusCode}...
javascript
chosen
[ { "from": "system", "value": "[DDW-165] Add UTC offset to Daedalus logs, Remove logging output from the web console\n" }, { "from": "human", "value": "import path from 'path';\nimport { ipcMain } from 'electron';\nimport Log from 'electron-log';\nimport { daedalusLogger } from './remoteLog';\nim...
javascript
chosen
[ { "from": "system", "value": "Fix Transaction belongsTo order inverseOf declaration\n" }, { "from": "human", "value": "Occasion.Modules.push(function(library) {\n library.Transaction = class Transaction extends library.Base {};\n\n library.Transaction.className = 'Transaction';\n library.Tran...
javascript
chosen
[ { "from": "system", "value": "Use runtime permutation to disable on NodeJS.\n" }, { "from": "human", "value": "var suite = new core.test.Suite(\"BOM/Text\");\n\nsuite.test(\"Basics\", function() \n{\n this.identical(typeof core.bom.Text.measure(\"hello world\"), \"object\");\n this.identical(t...
javascript
chosen
[ { "from": "system", "value": "Fix copy/pasting error in comment\n" }, { "from": "human", "value": "\"use strict\";\n\n/**\n * Takes a method and transforms it into a function by binding this to the first argument\n * passed to the resulting function.\n *\n * `this` gets bound to null when the me...
javascript
chosen
[ { "from": "system", "value": "Change unused 'let' to 'const'\n" }, { "from": "human", "value": "export const updateElementInWorkspace = (workspace, payload) => {\n const { selectionState } = workspace\n\n if(!selectionState.dragStarted) {\n return workspace\n }\n\n const { currentMousePos...
javascript
chosen
[ { "from": "system", "value": "Refactor @listeningTo to use dependency cache\n" }, { "from": "human", "value": "import React, {Component, PropTypes} from 'react';\nimport lodash from 'lodash';\n\nexport function listeningTo(storeNames, getter) {\n return decorator;\n\n function decorator(Ch...
javascript
chosen
[ { "from": "system", "value": "Stop loading spinner from appearing at the top\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n\tclassNames: ['loading-indicator'],\n\n\tlayout: Ember.Handlebars.compile(' '),\n\tsize: 'small',\n\n\tdidI...
javascript
chosen
[ { "from": "system", "value": "Add new test to help identify keycode issues.\n" }, { "from": "human", "value": "var test = require('tape');\nvar robot = require('..');\n\n//TODO: Need tests for keyToggle, typeString, typeStringDelayed, and setKeyboardDelay.\n\ntest('Tap a key.', function(t) \n{\n...
javascript
chosen
[ { "from": "system", "value": "Fix path cert and key\n" }, { "from": "human", "value": "\"strict\"\n\nimport fs from \"fs\"\n\nif (fs.existsSync(__dirname + \"/../../.env\")) {\n require(\"dotenv\").config({path: __dirname + \"/../../.env\"})\n}\n\nconst config = {\n\tcrt: process.env.CERTIFICAT...
javascript
chosen
[ { "from": "system", "value": "Set ready to true whether we have a function or not.\n" }, { "from": "human", "value": "/**\n * WithRegistrySetup component.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may n...
javascript
chosen
[ { "from": "system", "value": "Test adapted to current semantics: Trying to write a constant does not throw an error. It is just ignored." }, { "from": "human", "value": "//const test\n\nconst a = 5;\nconst b = a * 4;\n\nassert (a==5, \"a==5\");\nassert (b==20, \"b==20\");\n\nexpectError (\"const...
javascript
chosen
[ { "from": "system", "value": "Add crawling to get links for courses\n" }, { "from": "human", "value": "const express = require('express');\nconst router = express.Router();\nconst properties = require('../config/properties');\n\nconst request = require('request');\nconst cheerio = require('chee...
javascript
chosen
[ { "from": "system", "value": "Fix hot loading for code split case\n" }, { "from": "human", "value": "import 'react';\nimport 'purecss';\nimport './main.css';\nimport { component } from './component';\n\nlet demoComponent = component();\n\ndocument.body.appendChild(demoComponent);\n\n// HMR inter...
javascript
chosen
[ { "from": "system", "value": "Fix invalid case of Rx(lower case, in fact) reference\n" }, { "from": "human", "value": "'use strict';\nvar Rx = require('Rx');\nvar applyToDOM = require('./render-dom');\nvar makeInteractions = require('./interactions').makeInteractions;\n\nfunction makeGet(interac...
javascript
chosen
[ { "from": "system", "value": "Mark table cell by data-line\n" }, { "from": "human", "value": "Object.prototype._is_nil = function (name) {\n const obj = this; // e.g document\n if (obj && obj.$attr) {\n return obj.$attr(name)['$nil?']();\n }\n return true;\n};\n\nasciidoctor.E...
javascript
chosen
[ { "from": "system", "value": "Add missing Everex Token and Ripple\n" }, { "from": "human", "value": "const Lang = imports.lang;\n\nconst Local = imports.misc.extensionUtils.getCurrentExtension();\nconst BaseProvider = Local.imports.BaseProvider;\n\n\nconst Api = new Lang.Class({\n Name: 'BXinTH...
javascript
chosen
[ { "from": "system", "value": "Delete unused res in dispatch/then function\n\n" }, { "from": "human", "value": "// this component is depreciated and is now in Newsletter module\nexport default {\n name: 'MyNewsletter',\n data () {\n return {\n user: {\n isSubscribed: false\n ...
javascript
chosen
[ { "from": "system", "value": "Switch Workbox strategy from StaleWhileRevalidate to NetworkFirst\n" }, { "from": "human", "value": "importScripts('https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js');\n\nworkbox.core.skipWaiting();\nworkbox.precaching.precacheAndRoute([]);\nw...
javascript
chosen
[ { "from": "system", "value": "Create x variable in LocalStorage\n" }, { "from": "human", "value": "function something()\n{\n\tvar x = window.localStorage.getitem('aaa');\n\twindow.localStorage.setItem('aaa', 555);\n}" }, { "from": "gpt", "value": "function something()\n{\n\tvar x = w...
javascript
chosen
[ { "from": "system", "value": "Unify numbers in Go with variants\n" }, { "from": "human", "value": "/*\nLanguage: Go\nAuthor: Stephan Kountso aka StepLg <steplg@gmail.com>\nContributors: Evgeny Stepanischev <imbolk@gmail.com>\nDescription: Google go language (golang). For info about language see ...
javascript
chosen
[ { "from": "system", "value": "Use [chunkhash] instead of [hash] by default\n\n[hash] gives all packs the same hash, e.g.\n\n```\nCompiled digests for all packs in /Users/schpet/code/rails-webpack-testing/minification-test/public/packs/digests.json:\n{\"application\":\"application-2a726f371dbd0b903b72.js\",\...
javascript
chosen
[ { "from": "system", "value": "Remove default export in favor of only named exports\n" }, { "from": "human", "value": "import testSaga from './testSaga';\nimport expectSaga from './expectSaga';\n\nexport default testSaga;\nexport { testSaga, expectSaga };\nexport * as matchers from './expectSaga/...
javascript
chosen
[ { "from": "system", "value": "ENYO-3043: Make Spotlight a hard dependency.\n\nEnyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>\n" }, { "from": "human", "value": "var\n\tkind = require('enyo/kind'),\n\tplatform = require('enyo/platform');\n\nvar\n\tSampleList = require('./strawman/Sample...
javascript
chosen
[ { "from": "system", "value": "Use SIGINT instead of SIGHUP to kill child\n\n`kill(\"SIGHUP\")` does not work on Windows:\r\n\r\nError: kill ENOSYS\r\n at exports._errnoException (util.js:870:11)\r\n at ChildProcess.kill (internal/child_process.js:374:13)\r\n at Worker.terminate (C:\\Users\\xkr47\\p...
javascript
chosen
[ { "from": "system", "value": "Remove getPreData and getPostData from exported methods\n\nThey (the two methods) were needed only for plugins.\nAs plugins now get them from argument (object, properties) in\ncreateExtensions method, it had become unnecessary to expose them.\n" }, { "from": "human", ...
javascript
chosen
[ { "from": "system", "value": "Add full stop to docs\n" }, { "from": "human", "value": "/**\n * @author Richard Davey <rich@photonstorm.com>\n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\n/...
javascript
chosen
[ { "from": "system", "value": "Fix double callback invocation bug.\n" }, { "from": "human", "value": "var util = require('../util');\nvar load = require('./load');\nvar read = require('./read');\n\nmodule.exports = util\n .keys(read.formats)\n .reduce(function(out, type) {\n out[type] = func...
javascript
chosen
[ { "from": "system", "value": "Hide ugly underline on app title\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router';\nimport MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';\nimport A...
javascript
chosen
[ { "from": "system", "value": "Fix error in template context\n" }, { "from": "human", "value": "'use strict';\nvar yeoman = require('yeoman-generator');\nvar chalk = require('chalk');\nvar yosay = require('yosay');\n\nmodule.exports = yeoman.Base.extend({\n prompting: function () {\n va...
javascript
chosen
[ { "from": "system", "value": "Add remove global code from MobileAppSettinngs\n" }, { "from": "human", "value": "import { Settings } from 'react-native-database';\n\nimport { SETTINGS_KEYS } from './index';\nimport { MILLISECONDS_PER_DAY } from '../database/utilities';\nimport { setCurrentLanguag...
javascript
chosen
[ { "from": "system", "value": "Use the update function's time argument in the hello example.\n" }, { "from": "human", "value": "var Gesso = require('gesso');\n\nvar game = new Gesso();\nvar t = 0;\nvar x;\n\ngame.update(function () {\n t += 1;\n var center = (game.width - 300) / 2;\n x = cente...
javascript
chosen
[ { "from": "system", "value": "Use call checker to ensure both writeFile calls go through before killing the mock\n" }, { "from": "human", "value": "var should = require('should');\nvar sinon = require('sinon');\n\nvar tasks = require('../tasks.js');\n\nvar fs = require('fs');\n\nvar dataKeys = {...
javascript
chosen
[ { "from": "system", "value": "Fix issue with default values — just implement in getters\n" }, { "from": "human", "value": "const Sequelize = require('sequelize');\n\nmodule.exports = {\n JSONType: (fieldName, {defaultValue = '{}'} = {}) => ({\n type: Sequelize.TEXT,\n defaultValue,\n g...
javascript
chosen
[ { "from": "system", "value": "Add test for 100 width\n" }, { "from": "human", "value": "describe(\"Process Bar\", function () {\n\tvar bar;\n\n\tbeforeEach(function () {\n\t\tjasmine.clock().install();\n\t\tbar = new EchoesWorks.bar();\n\t});\n\n\tafterEach(function () {\n\t\tjasmine.clock().uni...
javascript
chosen
[ { "from": "system", "value": "Fix debug plugin to simulate notifications more reliably\n" }, { "from": "human", "value": "enabled(){\n this.isDebugging = false;\n \n this.onKeyDown = (e) => {\n // ==========================\n // F4 key - toggle debug mode\n // =======================...
javascript
chosen
[ { "from": "system", "value": "Remove padding on editor rows\n" }, { "from": "human", "value": "/* eslint-disable react/forbid-prop-types */\n/* eslint-disable arrow-body-style */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Text } from 'react-native';\n\nimport { Fl...
javascript
chosen
[ { "from": "system", "value": "Remove extra bind from NoteForm submit button\n\nAlready bound in the view events hash\n" }, { "from": "human", "value": "var NoteForm = FormView.extend({\n\n tagName: 'div',\n\n initialize: function() {\n\t // Supply the model with a reference to it's own view o...
javascript
chosen
[ { "from": "system", "value": "Enforce other tasks to ran after init" }, { "from": "human", "value": "/*\n * grunt-browser-sync\n * https://github.com/shakyshane/grunt-browser-sync\n *\n * Copyright (c) 2013 Shane Osbourne\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.export...
javascript
chosen
[ { "from": "system", "value": "Add uglify (minification) to the build task.\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n\n\tgrunt.initConfig({\n\n\t\tpkg: grunt.file.readJSON('package.json'),\n\n\t\tclean: {\n\t\t\tbuild: {\n\t\t\t\tsrc: \"build\"\n\t\t\t}\n\t\t},\n\n\...
javascript
chosen
[ { "from": "system", "value": "Add jshint expr=true rule for tests\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n 'use strict';\n\n grunt.loadNpmTasks('grunt-contrib-jshint');\n grunt.loadNpmTasks('grunt-contrib-uglify');\n grunt.loadNpmTasks('grunt-shell');\n\n grun...
javascript
chosen
[ { "from": "system", "value": "Reduce required numbers to match current coverage\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfil...
javascript
chosen
[ { "from": "system", "value": "Add bower to default grunt task.\n" }, { "from": "human", "value": "module.exports = function(grunt){\n require('load-grunt-tasks')(grunt);\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n coffee: {\n default: {\n...
javascript
chosen
[ { "from": "system", "value": "Fix import and position setting\n" }, { "from": "human", "value": "/**\n * CG Space Invaders\n * CG45179 16'17\n *\n * @author: Rui Ventura ( ist181045 )\n * @author: Diogo Freitas ( ist181586 )\n * @author: Sara Azinhal ( ist181700 )\n */\n\nimport { Object3D } fro...
javascript
chosen
[ { "from": "system", "value": "Fix the path using 'path.join()'\n" }, { "from": "human", "value": "/* eslint-disable */\nimport express from 'express';\nimport bodyParser from 'body-parser';\nimport mongoose from 'mongoose';\nimport graphqlHTTP from 'express-graphql';\nimport schema from './graph...
javascript
chosen
[ { "from": "system", "value": "Remove dead code and add test for startbyte != 0\n\nSome dead code was hanging around in dns-query-test; kill it.\nAlso add a test to ensure that deserializing a DnsQuery from\na ByteArray respects the given byte offset into this array.\n" }, { "from": "human", "val...
javascript
chosen
[ { "from": "system", "value": "Add 'getDescriptor' to meta properties\n" }, { "from": "human", "value": "'use strict';\n\nvar primitiveSet = require('es5-ext/object/primitive-set');\n\nmodule.exports = primitiveSet('constructor', 'clear', 'database', 'delete',\n\t'entries', 'forEach', 'has', 'key...
javascript
chosen
[ { "from": "system", "value": "Fix mock to update both cursor and selection\n" }, { "from": "human", "value": "import { Point } from \"../lib/point.js\";\nimport { ITextEditor } from \"../lib/text-editor.js\";\n\n// This is a mock class of the ITextEditor interface\nexport class TextEditor extend...
javascript
chosen
[ { "from": "system", "value": "Enable dummy promise return until verifyContactExists actually works\n" }, { "from": "human", "value": "var Q = require('q');\n\n/**\n * Confirms that the supplied ID is a valid number.\n * @param {string} id String to confirm is a valid integer\n * @returns {Q.prom...
javascript
chosen
[ { "from": "system", "value": "Switch port to match README.md" }, { "from": "human", "value": "const webpack = require('webpack');\nconst WebpackDevServer = require('webpack-dev-server');\nconst config = require('./webpack.config');\n\nnew WebpackDevServer(webpack(config), {\n publicPath: config...
javascript
chosen
[ { "from": "system", "value": "Add functions to format the appended HTML post ajax request to post a new skill\n" }, { "from": "human", "value": "function addSkill() {\n $(\"#new_skill\").on(\"submit\", function (event) {\n event.preventDefault();\n var $target = $(event.target);\n if (...
javascript
chosen
[ { "from": "system", "value": "Remove newline at end of file\n" }, { "from": "human", "value": "var trexApp = angular.module('trexApp',\n ['ngRoute', 'trexControllers', 'trexFilters']);\n\ntrexApp.config(['$routeProvider',\n function($routeProvider) {\n $routeProvider.\n ...
javascript
chosen
[ { "from": "system", "value": "Fix Pref Selection schedule reference\n" }, { "from": "human", "value": "import React, { Component} from 'react';\nimport { inject, observer } from 'mobx-react';\n\nimport TextRow from '../fields/TextRow';\nimport CheckRow from '../fields/CheckRow';\nimport CheckVal...
javascript
chosen
[ { "from": "system", "value": "Update JS regex to strip trigger words" }, { "from": "human", "value": "(function(env){\n \"use strict\";\n\n env.ddg_spice_gifs = function (api_result) {\n\n if (!api_result || !api_result.data || !api_result.data.length){\n return Spice.fai...
javascript
chosen
[ { "from": "system", "value": "Fix question's 'formValuesToRequest' to handle create & update\n" }, { "from": "human", "value": "// 1. We should deal with the fact that nullable GraphQL fields can be null in responses\n// and set them to be empty strings. Same applies for any other optional pr...
javascript
chosen
[ { "from": "system", "value": "Update to Redux 1.0 RC" }, { "from": "human", "value": "import isPromise from './isPromise';\n\nexport default function promiseMiddleware(next) {\n return action => {\n if (!isPromise(action.payload)) {\n return next(action);\n }\n\n const { types } =...
javascript
chosen
[ { "from": "system", "value": "Use version to detect invalid seajs\n" }, { "from": "human", "value": "/**\n * SeaJS v@VERSION | seajs.org/LICENSE.md\n */\n(function(global, undefined) {\n\n// Can't do this because several apps including ASP.NET trace\n// the stack via arguments.caller.callee and ...
javascript
chosen
[ { "from": "system", "value": "Add better output messages to schema tests.\n" }, { "from": "human", "value": "var tape = require('tape'),\n vega = require('../'), // eslint-disable-line no-unused-vars\n tv4 = require('tv4'),\n fs = require('fs'),\n schema = require('../build/vega-sche...
javascript
chosen
[ { "from": "system", "value": "Fix jshint error with npm update\n" }, { "from": "human", "value": "var tools = require(\"./testtools\");\nvar expect = tools.expect;\nvar assert = tools.assert;\n\ndescribe(\"sanity check\", function() {\n describe(\"expect tests\", function() {\n it(\"should p...
javascript
chosen
[ { "from": "system", "value": "Update consolidate dataset task settings\n" }, { "from": "human", "value": "const Promise = require('bluebird');\nconst { jobs } = require('../kue');\nconst defaults = require('lodash/object/defaults');\n\nconst taskOptions = {\n 'process-record': { removeOnCompl...
javascript
chosen
[ { "from": "system", "value": "Add checkmark on login message\n" }, { "from": "human", "value": "const Discord = require('discord.js'),\n client = new Discord.Client;\n\nclient.run = ctx => {\n client.on('ready', () => {\n if (client.user.bot) {\n client.destroy();\n } else {\n ...
javascript
chosen
[ { "from": "system", "value": "Trim whitespace from url input\n" }, { "from": "human", "value": "if (Meteor.isClient) {\n // This code only runs on the client\n Template.body.helpers({\n giblets: [\n { text: \"This is task 1\" },\n { text: \"This is task 2\" },\n { text: \"Thi...
javascript
chosen
[ { "from": "system", "value": "Update vers to new loader format" }, { "from": "human", "value": "define(['mac/roman'], function(macintoshRoman) {\n\n 'use strict';\n \n return function(resource) {\n resource.dataObject = {\n major: resource.data[0],\n minor: resource.data[1],\n ...
javascript
chosen
[ { "from": "system", "value": "Improve display check for party data/creation\n\nSee #2203. This is still not quite right (it should be whether the\ntarget party has PUBLIC), but the UI has no way to check that at the\nmoment, so this covers the most common case.\n" }, { "from": "human", "value":...
javascript
chosen
[ { "from": "system", "value": "Fix hot reducer loading in examples/real-world\n" }, { "from": "human", "value": "import { createStore, applyMiddleware, compose } from 'redux'\nimport createLogger from 'redux-logger'\nimport saga from 'redux-saga'\nimport DevTools from '../containers/DevTools'\nim...
javascript
chosen
[ { "from": "system", "value": "Set liveness to 0 when broker tells us we are disconnected\n" }, { "from": "human", "value": "module.exports = function() {\n var dataBuffer = Array.prototype.slice.call(arguments),\n data,\n self = this;\n\n data = dataBuffer.map(function(d) {\n retu...
javascript
chosen
[ { "from": "system", "value": "Exclude data from the deploy for now\n" }, { "from": "human", "value": "'use strict';\n\n\nmodule.exports = function compress(grunt) {\n // Load task\n grunt.loadNpmTasks('grunt-contrib-compress');\n\n return {\n 'hmda-edit-check-api': {\n ...
javascript
chosen
[ { "from": "system", "value": "Add a keyboard shortcut (Ctrl-R) to reverse\n" }, { "from": "human", "value": "// ==UserScript==\n// @name GMail Oldest First\n// @namespace https://blog.jverkamp.com/\n// @version 0.2\n// @description Display emails in Gmail oldest first (per page)...
javascript
chosen
[ { "from": "system", "value": "Return to user list once user is created." }, { "from": "human", "value": "minispade.register('controllers', function() {\n\n RiakCsControl.ApplicationController = Ember.Controller.extend();\n\n RiakCsControl.CreateUserController = Ember.ObjectController.extend({\...
javascript
chosen
[ { "from": "system", "value": "Set the bLazy offset to 500px\n" }, { "from": "human", "value": "render(\"contacts\");\nrender(\"projects\");\n\nfunction render(template) {\n var source = document.getElementById(template + \"-template\").innerHTML;\n var destination = document.querySelector(...
javascript
chosen
[ { "from": "system", "value": "Revert \"perfetto-ui: Fix deprecated warning\"\n\nThis reverts commit f59bbaae2522e01308f59046c8577999283c281a.\n\nReason for revert: Breaks ui build.\n\nChange-Id: I9a5b10a1ebb448bf472d27f5d985248c750e157c\n" }, { "from": "human", "value": "import commonjs from 'ro...
javascript
chosen
[ { "from": "system", "value": "Delete localStorage data after use\n" }, { "from": "human", "value": "/* eslint-disable no-native-reassign */\n/* global addToPage, setTitle, showLoadingIndicator, useTheme, useFontFamily */\n\n// Makes regular text have the regular text size\ndocument.body.style.fo...
javascript
chosen
[ { "from": "system", "value": "Add missing semicolons and a new line\n" }, { "from": "human", "value": "import React from 'react'\nimport ReactDOM from 'react-dom'\n\nclass App extends React.Component {\n render() {\n return (\n <div>Sample App</div>\n );\n }\n}\n\nReactDOM.render(\n...
javascript
chosen
[ { "from": "system", "value": "Move short line names to object\n" }, { "from": "human", "value": "const {getNativeInteger} = require(\"./helpers\");\n\nclass Route {\n constructor(attributes) {\n this.attributes = attributes;\n }\n\n route() {\n var route;\n switch ((route = this.rout...
javascript
chosen
[ { "from": "system", "value": "Change command paramater to context\n\nThe context word is more relevant because when no command is specified the context is 'global'\n" }, { "from": "human", "value": "// Module dependencies.\nvar fs = require('fs');\nvar path = require('path');\nvar _ = require('u...
javascript
chosen
[ { "from": "system", "value": "Change discover page layout a little\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport {\n View,\n ScrollView,\n} from 'react-native';\nimport _ from 'lodash'\nimport { observer } from 'mobx-react/native'\n\nimport { BarMapView }...
javascript
chosen
[ { "from": "system", "value": "Add some core smoke tests\n" }, { "from": "human", "value": "\ndescribe(\"Core Bliss\", function () {\n \"use strict\";\n\n beforeEach(function () {\n fixture.setBase('tests/fixtures')\n this.fixture = fixture.load('core.html');\n document.body.innerHTML ...
javascript
chosen
[ { "from": "system", "value": "Use 'utf8', which Node uses, instead of 'utf-8'.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\n/** Load modules. */\nvar fs = require('fs'),\n path = require('path');\n\n/** Resolve program params. */\nvar args = process.argv.slice(proc...
javascript
chosen
[ { "from": "system", "value": "Fix test errors caused by upgrade in Chai dependency\n\nSee https://github.com/chaijs/type-detect/issues/98.\n" }, { "from": "human", "value": "const { JSDOM } = require('jsdom');\n\nconst jsdom = new JSDOM('<!DOCTYPE html><html><body></body></html>');\nconst { wind...
javascript
chosen
[ { "from": "system", "value": "Use our own assert method to test for float values.\n\n* close returns true if the value is close enough to the expected.\n" }, { "from": "human", "value": "QUnit.module( \"FrequencyMap tests\" );\nQUnit.test( \"constructor test\", function( assert ) {\n var fm =...
javascript
chosen
[ { "from": "system", "value": "[TASK] Set the 'findNestedDependencies' flag for the r.js optimizer to true\n" }, { "from": "human", "value": "/**\n * Grunt-Contrib-RequireJS\n * @description Optimize RequireJS projects using r.js.\n * @docs https://github.com/gruntjs/grunt-contrib-requirejs\n*/\n...
javascript
chosen
[ { "from": "system", "value": "Fix compliance test where the member type is unset\n" }, { "from": "human", "value": "import _Any from \"./any\"\nimport _Core from \"./core\"\nimport _Union from \"./union\"\n/**\n * An map of strings to some types.\n */\nexport default class _AssociativeArray exte...
javascript
chosen
[ { "from": "system", "value": "Fix brownie points not showing on react pages\n" }, { "from": "human", "value": "import { Observable } from 'rx';\nimport { handleError, setUser, fetchUser } from './types';\n\nexport default ({ services }) => ({ dispatch }) => next => {\n return function getUserSa...
javascript
chosen
[ { "from": "system", "value": "Add reviewKey to reviewKeys array on Parse for user that is reviewed on Parse\n" }, { "from": "human", "value": "\n// Use Parse.Cloud.define to define as many cloud functions as you want.\n// For example:\n\nParse.Cloud.define(\"hello\", function(request, response) ...
javascript
chosen
[ { "from": "system", "value": "Fix for randomly failing Welcome page tests\n\nChange-Id: Icfa3aefc8753a3300b6e8e17850685a59bee1c0a\n" }, { "from": "human", "value": "/*\n * Copyright 2015 Mirantis, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n * not use ...
javascript
chosen