conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update CLI with new property names\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\nvar pkg = require('./package.json');\nvar klParkingSpots = require('./');\nvar argv = process.argv.slice(2);\n\nvar columnify = require('columnify')\n\nfuncti...
javascript
chosen
[ { "from": "system", "value": "Allow using \"test\" as and environment name\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n/*\n* SQL API loader\n* ===============\n*\n* node app [environment] \n*\n* environments: [development, test, production]\n*\n*/\nvar _ = require('underscore');\n\...
javascript
chosen
[ { "from": "system", "value": "Fix translation extraction.\nWas breaking because it only pulls from js and html. TS doesn't work. Changed to pull from the build files folder instead.\n" }, { "from": "human", "value": "var gulp = require( 'gulp' );\nvar plugins = require( 'gulp-load-plugins' )();\...
javascript
chosen
[ { "from": "system", "value": "REMOVE the error-throwing marko example story\n\nwhy would do do this to ourselves?\n" }, { "from": "human", "value": "import Hello from '../components/hello/index.marko';\n\nexport default {\n title: 'Main/Hello',\n parameters: {\n component: Hello,\n },\n};\...
javascript
chosen
[ { "from": "system", "value": "Move process event listeners to top. Add 'exit' listener.\n" }, { "from": "human", "value": "'use strict';\n\nvar express = require('express'),\n\tbodyParser = require('body-parser'),\n\tcookieParser = require('cookie-parser'),\n\ttimeout = require('connect-timeout'...
javascript
chosen
[ { "from": "system", "value": "Configure Enzyme for React 16.\n" }, { "from": "human", "value": "import { mount } from 'enzyme';\n\n/*\n\tSetup and takedown\n */\n\nfunction createMountNode ({ context, mountNodeId }) {\n\tconst internalmountNodeId = mountNodeId || 'mount-node';\n\tcontext.dom = d...
javascript
chosen
[ { "from": "system", "value": "Add historyApiFallback so it works with router out of the box" }, { "from": "human", "value": "var webpack = require('webpack');\nvar WebpackDevServer = require('webpack-dev-server');\nvar config = require('./webpack.config');\n\nnew WebpackDevServer(webpack(config)...
javascript
chosen
[ { "from": "system", "value": "Test on an Internet server\n" }, { "from": "human", "value": "\n\n// Constants\nvar constant = {};\n\nconstant.pageCount = 4;\nconstant.library = { // Canopé\n\tname: \"Canopé\",\n\tdatabase: \"http://localhost:81/torido/canope.php\",\n\tvideos: \"https://videos.re...
javascript
chosen
[ { "from": "system", "value": "Create assets dir in src\n" }, { "from": "human", "value": "// paths map\nvar path = {\n src: 'src',\n dest: 'build'\n};\n\n// set configs for plugins\nglobal['config'] = {\n src: path.src,\n dest: path.dest,\n tests: {\n src: path.src + '/js/tests/**/*'\n...
javascript
chosen
[ { "from": "system", "value": "Fix Firefox --headless config missing\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: ['Chrome'],\n launch_in_dev: ['Chrome'],\n browser_start_timeout: ...
javascript
chosen
[ { "from": "system", "value": "Set 'svg' as the default output format\n" }, { "from": "human", "value": "window[\"Viz\"] = function(src, format, engine) {\n if (typeof(engine) === 'undefined') {\n engine = 'dot';\n }\n var Module = {};\n Module[\"return\"] = \"\";\n Module[\"print\"] = fu...
javascript
chosen
[ { "from": "system", "value": "Use globals.json instead of conf.json\n" }, { "from": "human", "value": "// tpl - a general purpose template cli\n// (c) 2011 Paul Vorbach. Licensed under MIT.\n;(function() {\n\nvar fs = require('fs');\nvar path = require('path');\n\nvar append = require('append');...
javascript
chosen
[ { "from": "system", "value": "Fix creating new handler for each invocation\n" }, { "from": "human", "value": "'use strict'\n\nconst createHandler = require('./createHandler.js')\n\nmodule.exports = class HandlerRunner {\n constructor(funOptions, options) {\n this._handler = createHandler(fun...
javascript
chosen
[ { "from": "system", "value": "Define Pinentry propTypes in terms of PinentryRender\n" }, { "from": "human", "value": "'use strict'\n/* @flow */\n\nimport React from 'react'\nimport BaseComponent from '../base-component'\nimport PinentryRender from './pinentry-render'\n\nexport default class Pine...
javascript
chosen
[ { "from": "system", "value": "Delete overkill success checker\nRef syntax eror in growl notification\n" }, { "from": "human", "value": "(() => {\n\n 'use strict';\n\n angular\n .module('app')\n .controller('MainController', MainController);\n\n MainController.$inject = ['$...
javascript
chosen
[ { "from": "system", "value": "Fix for ticketId vs ticketID\n\nThis is what I get for not just pushing my change from my local repo to Github... My sincere apologies for that." }, { "from": "human", "value": "//SatisfactionRatings.js: Client for the zendesk API.\n\n\nvar util = require('u...
javascript
chosen
[ { "from": "system", "value": "Add dynamic naming based on watchlist\n\nSince ESTraits caches traits classes generated, this is necessary to avoid error\n" }, { "from": "human", "value": "import Immutable from 'immutable';\nimport value from 'object-path';\n\nexport const purender = ({raw}, ...va...
javascript
chosen
[ { "from": "system", "value": "[test] Add test for searching by name\n" }, { "from": "human", "value": "var assert = require('assert'),\n vows = require('vows'),\n AuthorizedKeys = require('../');\n\nvar testKey = { type: 'ssh-rsa', content: 'mykey', name: 'maciej' };\n\nvows.describe('auth...
javascript
chosen
[ { "from": "system", "value": "Remove an unused internal test comment\n" }, { "from": "human", "value": "import { Model, hasMany, belongsTo } from 'ember-cli-mirage';\n\nexport default Model.extend({\n taskGroups: hasMany('task-group'),\n jobSummary: belongsTo('job-summary'),\n jobScale: belon...
javascript
chosen
[ { "from": "system", "value": "Fix bad invariant import path\n\n" }, { "from": "human", "value": "/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @f...
javascript
chosen
[ { "from": "system", "value": "Update formatting for consistency and readability." }, { "from": "human", "value": "/**\n * Visually Hidden component, mainly used for screen-reader text.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (t...
javascript
chosen
[ { "from": "system", "value": "Enable the auto resize textarea plugin\n" }, { "from": "human", "value": "// Overwrite this file in your application /app/assets/javascripts/comfortable_mexican_sofa/admin/application.js\n//= require requirejs/require\n//= require require_config\n\nwindow.CMS.wysiwy...
javascript
chosen
[ { "from": "system", "value": "Call logout to clear authentication data when an unauthorised response is returned.\n\n\nFormer-commit-id: 4c9c5125183e5b12fe7aa22e1bdfd7d077db015a" }, { "from": "human", "value": "/**\n * Generic error handler method for ajax responses.\n * Apply your specific requ...
javascript
chosen
[ { "from": "system", "value": "Migrate Database into mongodb atlas\n" }, { "from": "human", "value": "const debug = require('debug')('ferreiro:setup:database')\nconst mongoose = require('mongoose')\nconst bluebird = require('bluebird')\n\nconst env = require('../env')\nconst mongoDB = env.MONGODB...
javascript
chosen
[ { "from": "system", "value": "Debug .vue files in browserify\n" }, { "from": "human", "value": "var elixir = require('laravel-elixir');\nrequire('laravel-elixir-vueify');\n\n/*\n |--------------------------------------------------------------------------\n | Elixir Asset Management\n |----------...
javascript
chosen
[ { "from": "system", "value": "Extend the status exposing duration\n" }, { "from": "human", "value": "'use strict';\n\nimport { StatsCollector } from './lib/stats';\n\nexport default function(RED) {\n\n class DeviceStatsNode {\n constructor(n) {\n RED.nodes.createNode(this, n);\n th...
javascript
chosen
[ { "from": "system", "value": "Add comments to mouse-position example\n" }, { "from": "human", "value": "var most = require('most');\n\nmodule.exports = function run() {\n\tvar el = document.body;\n\n\tmost.fromEvent('mousemove', document)\n\t\t.map(function(e) {\n\t\t\treturn e.clientX + ',' + e...
javascript
chosen
[ { "from": "system", "value": "Fix app initialization and use backbones navigate function for default route\n" }, { "from": "human", "value": "Andamio.Application = function (options) {\n _.extend(this, options);\n this.vent = _.extend({}, Backbone.Events);\n};\n\n_.extend(Andamio.Application.p...
javascript
chosen
[ { "from": "system", "value": "Add jasmineHtmlReporter included with angular-cli 11.0.2 but missing on update\n" }, { "from": "human", "value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-file.html\n\nmodule.exports = fun...
javascript
chosen
[ { "from": "system", "value": "Enable html alerts, increase timeout to 5 seconds.\n" }, { "from": "human", "value": "import React from 'react'\nimport Alert from 'react-s-alert';\n\nconst Layout = ({ children }) => (\n <div>\n {children}\n <Alert stack={{ limit: 3 }} position=\"top-left\" ...
javascript
chosen
[ { "from": "system", "value": "Add webpack no errors plugin\n" }, { "from": "human", "value": "const createConfig = require('hjs-webpack')\nconst configOptions = require('./webpack_config/config-options')\nconst config = createConfig(configOptions)\nconst BrowserSyncPlugin = require('browser-sync...
javascript
chosen
[ { "from": "system", "value": "Reset to the original content when ESCAPE key is down.\n" }, { "from": "human", "value": "$(function() {\n $(\"td\").dblclick(function() {\n var td = $(this), originalContent = td.text();\n\n td.addClass(\"cellEditing\");\n td.data(\"originalContent\", ori...
javascript
chosen
[ { "from": "system", "value": "Remove JS to not load hidden divs\n" }, { "from": "human", "value": "$(function () {\r\n $(\"img\").not(\":visible\").each(function () {\r\n $(this).data(\"src\", this.src);\r\n this.src = \"\";\r\n });\r\n\r\n var reveal = function (selector) {\r\...
javascript
chosen
[ { "from": "system", "value": "Refactor to maybe work this time\n" }, { "from": "human", "value": "'use strict';\n\nvar Slack = require('slack-client');\n\nvar token = '' || process.env.SLACK_API_TOKEN;\n\nvar slack = new Slack(token, true, true);\n\nslack.on('open', function () {\n console.log(...
javascript
chosen
[ { "from": "system", "value": "Fix init warning by calling super" }, { "from": "human", "value": "module.exports = {\n name: 'ember-restless',\n\n init: function(name) {\n this.treePaths['vendor'] = 'dist';\n },\n\n included: function(app) {\n this._super.included(app);\n\n var optio...
javascript
chosen
[ { "from": "system", "value": "Move property name to variable\n" }, { "from": "human", "value": "'use strict';\n\nvar MongoClient = require('mongodb').MongoClient;\n\nmodule.exports = function (uri, opts) {\n\tif (typeof uri !== 'string') {\n\t\tthrow new TypeError('Expected uri to be a string');...
javascript
chosen
[ { "from": "system", "value": "Move inspect function outside of constructor\n" }, { "from": "human", "value": "'use strict';\n\nvar v8StyleErrors = require('./lib/v8-style')()\nvar reformat = require('./lib/reformat')\n\nfunction ErrorMaker(name, ParentError) {\n function NewError(message) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add socket event : `name`\n" }, { "from": "human", "value": "var express = require('express');\nvar http = require('http');\nvar socket = require('socket.io');\nvar SamsungRemote = require('samsung-remote');\n\nvar app = express();\nvar port = process.env.PORT || 80...
javascript
chosen
[ { "from": "system", "value": "Remove redundant property definitions from gRenderer\n" }, { "from": "human", "value": "gRenderer = {\r\n frame: 0,\r\n canvas: document.getElementById('canvas'),\r\n context: this.canvas.getContext('2d'),\r\n render: function() {\r\n this.context.fillStyle =...
javascript
chosen
[ { "from": "system", "value": "Embed video in welcome page\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport Paper from 'material-ui/Paper';\n\nimport './index.css'\n\nconst style = {\n paper: {\n display: 'flex',\n float: 'right',\n margin: '2...
javascript
chosen
[ { "from": "system", "value": "Reduce cp-validations check to 3.0\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nvar VersionChecker = require('ember-cli-version-checker');\n\nmodule.exports = {\n name: 'ember-changeset-cp-validations',\n\n init: function() {\n i...
javascript
chosen
[ { "from": "system", "value": "Allow CORs on all routes\n" }, { "from": "human", "value": "\"use strict\";\n\nvar express = require('express');\nvar compress = require('compression')();\nvar errorHandler = require('errorhandler')({\n dumpExceptions: true,\n showStack: true\n});\nvar api = requi...
javascript
chosen
[ { "from": "system", "value": "Clean up spacing a bit\n" }, { "from": "human", "value": "'use strict';\n\nimport express from 'express';\nimport ip from 'ip';\n\nlet app = express();\nlet port = process.ENV_PORT || 9000;\n\nlet server = app.listen(port);\n\n\n\nlet options = {\n debug: tr...
javascript
chosen
[ { "from": "system", "value": "Use global replace for \"exports.some = some;\"\n" }, { "from": "human", "value": "'use strict';\n\nexports.onHandleCode = function onHandleCode(ev) {\n ev.data.code = ev.data.code\n .replace(/module\\s*\\.\\s*exports\\s*=\\s?/g,\n 'export default ')...
javascript
chosen
[ { "from": "system", "value": "Use stream.write() instead of console.log()\n" }, { "from": "human", "value": "'use strict';\n\nvar assign = require('object-assign');\nvar chalk = require('chalk');\nvar ProgressBar = require('progress');\n\n/**\n * Progress bar download plugin\n *\n * @param {Obje...
javascript
chosen
[ { "from": "system", "value": "Add Gluestick prefix to logging statements\n" }, { "from": "human", "value": "/*eslint-disable no-console*/\nconst logsColorScheme = require(\"./logsColorScheme\");\n\nfunction success(...args){\n console.log(...args.map(arg => logsColorScheme.success(arg)));\n}\n\...
javascript
chosen
[ { "from": "system", "value": "Unify 'onEventAppeared' and 'onEvent' signatures.\n\n`onEvent` has the signature `(subscription, event) => { }`. \r\n`onEventAppeared` should also be `(subscription, event) => {}` and not `(event) => {}`." }, { "from": "human", "value": "import connectionManager fro...
javascript
chosen
[ { "from": "system", "value": "Modify query to return vertex count\n" }, { "from": "human", "value": "'use strict';\n\nfunction prepareQuery(sql) {\n var affectedTableRegexCache = {\n bbox: /!bbox!/g,\n scale_denominator: /!scale_denominator!/g,\n pixel_width: /!pixel_width!/g,\n ...
javascript
chosen
[ { "from": "system", "value": "Convert column edit to react-modal\n" }, { "from": "human", "value": "import classnames from 'classnames';\nimport Form from './Item/Form';\nimport React, { Component } from 'react';\n\nclass EditColumn extends Component {\n constructor() {\n super();\n\n thi...
javascript
chosen
[ { "from": "system", "value": "Improve performance of task plotting.\n\nImplement shouldComponentUpdate() in the <TaskPlot> component.\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport { List } from 'immutable';\nimport Polyline from './Polyline';\nimport Marker...
javascript
chosen
[ { "from": "system", "value": "Fix Ajax user form fields with pre-set values\n\n`values[i].objectId` is only set for users added manually via the UI. For pre-existing usernames, only `values[i].value` exists.\n" }, { "from": "human", "value": "/**\n * Data handler for a user form builder field in...
javascript
chosen
[ { "from": "system", "value": "Set to broadcast val over a socket\n\nSet to broadcast val over a socket every second.\n" }, { "from": "human", "value": "'use strict';\n\nconst express = require('express');\nconst socketIO = require('socket.io');\nconst path = require('path');\n\nconst PORT = proc...
javascript
chosen
[ { "from": "system", "value": "Set buffer size to 10mb\n" }, { "from": "human", "value": "var DEBUG_PORT = 8000;\n\nvar express = require('express');\nvar sys = require('sys');\nvar exec = require('child_process').exec;\nvar app = express();\n\napp.use(express.bodyParser());\n\napp.get('/', funct...
javascript
chosen
[ { "from": "human", "value": "Add unit test to snapshot index route\n" }, { "from": "gpt", "value": "const { describe, it, before, after, beforeEach, expect, sinon } = require('../../../test-helper');\nconst Hapi = require('hapi');\n\nconst snapshotController = require('../../../../lib/applicatio...
javascript
chosen
[ { "from": "system", "value": "Add banana image and greeting class\n" }, { "from": "human", "value": "/**\n * Sample React Native App\n * https://github.com/facebook/react-native\n *\n * @format\n * @flow\n */\n\nimport React, {Component} from 'react';\nimport {Platform, StyleSheet, Text, View} f...
javascript
chosen
[ { "from": "system", "value": "Change gpio port number and blink interval.\n" }, { "from": "human", "value": "'use strict';\n\nwindow.addEventListener('load', function (){\n\n// WebGPIO LED Blink\n navigator.requestGPIOAccess().then(\n function(gpioAccess) {\n console.log(\"GPIO ready!...
javascript
chosen
[ { "from": "system", "value": "Add findStarting/EndingAt to native MarkerIndex\n\nThey’re just sugar methods on the prototype that delegate to\nfindStarting/EndingIn.\n" }, { "from": "human", "value": "import NativeMarkerIndex from '../../build/Release/marker_index'\n\nNativeMarkerIndex.prototype...
javascript
chosen
[ { "from": "system", "value": "Fix minor typos in comment block" }, { "from": "human", "value": "define(function() {\n /**\n * If the browsers follow the spec, then they would expose vendor-specific style as:\n * elem.style.WebkitBorderRadius\n * instead of something like the following, ...
javascript
chosen
[ { "from": "system", "value": "Add site footer to each documentation generator\n" }, { "from": "human", "value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar postcss = require('postcss')\nvar cssstats = require('cssst...
javascript
chosen
[ { "from": "system", "value": "Return new AppUtil instance from init call\n" }, { "from": "human", "value": "module.exports = new AppUtil();\n\nvar util = require(\"util\");\nvar FrameInputStream = require(\"./frame_input_stream\");\n\nfunction AppUtil(){\n \n}\n\nAppUtil.prototype.init = func...
javascript
chosen
[ { "from": "system", "value": "Set default workers to 10\n" }, { "from": "human", "value": "#!/usr/bin/env node\nvar prerender = require('./lib');\nprocess.env.PORT = process.env.PORT || 4000\n\nvar server = prerender({\n workers: process.env.PHANTOM_CLUSTER_NUM_WORKERS,\n iterations: proce...
javascript
chosen
[ { "from": "system", "value": "Revert \"attempt to address memory leak\"\n\nThis reverts commit e436dfd4e4f033bdc455af4707712b5ec12a0374.\n\nConflicts:\n\tsrc/js/rogue/display/screens/load.js\n" }, { "from": "human", "value": "\nimport { Screen } from '../screen';\n\nexport class LoadScreen exten...
javascript
chosen
[ { "from": "system", "value": "Add missing like count from my projects list query\n\nfbshipit-source-id: fede441\n" }, { "from": "human", "value": "import gql from 'graphql-tag';\nimport { graphql } from 'react-apollo';\n\nimport ProjectList from '../components/ProjectList';\n\nconst MyAppsQuery ...
javascript
chosen
[ { "from": "system", "value": "Switch to small gif image.\n" }, { "from": "human", "value": "import {assert} from 'chai';\n\nimport {jsdom} from 'jsdom';\n\nimport {ImageTransformer} from '../src/imagetransformer';\n\ndescribe('image transformer', function() {\n beforeEach(function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add develop and production task\n" }, { "from": "human", "value": "const {\n FuseBox,\n SVGPlugin,\n CSSPlugin,\n BabelPlugin,\n WebIndexPlugin,\n} = require(\"fuse-box\");\n\nconst path = require('path')\n\n\nlet fuse, app, vendor, isProduction;\n\n\nfuse = Fu...
javascript
chosen
[ { "from": "system", "value": "Refactor i18n normalize script to explicitly sort\n\nTo reduce any confusion about how translated keys are sorted,\nadd an explicit key sorting function in the stringify call.\n" }, { "from": "human", "value": "// @flow\n\nimport fs from 'fs'\nimport path from 'path...
javascript
chosen
[ { "from": "system", "value": "BAP-14398: Create controller actions with layout renderer for transition form\n- Updated JS for Transition Dialog\n- Updated Controllers\n" }, { "from": "human", "value": "define(function(require) {\n 'use strict';\n\n var TransitionDialogWidget;\n var Dial...
javascript
chosen
[ { "from": "system", "value": "Revert \"chore(general): expose flex grid row and column as separate components\"\n\nThis reverts commit 7b257071ba035f94571b4273d7d26185aeb775e7.\n" }, { "from": "human", "value": "// @flow\n\nexport { default as Col } from './Col';\nexport { default as Row } from ...
javascript
chosen
[ { "from": "system", "value": "Change method from `post` to `put`\n" }, { "from": "human", "value": "/*!\n * hackerone.reports.comment.create (https://github.com/xc0d3rz/hackerone)\n * Copyright 2016-2017 xc0d3rz(x.c0d3rz000@gmail.com)\n * Licensed under the MIT license\n */\n\n/**\n *\n * @param...
javascript
chosen
[ { "from": "system", "value": "Make it work when rendered in server\n\nLooks like `window` is not defined when pre-rendering the component on the server. This change allows the awesome `react-motion-ui-pack` to be used in isomorphic apps.\r\n\r\nI hope this is useful!" }, { "from": "human", "valu...
javascript
chosen
[ { "from": "system", "value": "Add options to marko compiler\n" }, { "from": "human", "value": "'use strict'; // eslint-disable-line\n\nconst compiler = require('marko/compiler');\n\nmodule.exports = {\n process(src, filePath) {\n return compiler.compileFile(filePath);\n },\n};\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Add comments\nComment out test sections of the work\n" }, { "from": "human", "value": "// Back-end\n\n// Front-end\n$(document).ready(function () {\n // Make about section clickable and open about overlay\n $(\".about\").on('click', function (event) {\n event...
javascript
chosen
[ { "from": "system", "value": "Media: Use time duration of test to measure the success\n\nSigned-off-by: Vaibhav Singh <c267fbcdc94c01eb807238c388b92f321583d99b@samsung.com>\n" }, { "from": "human", "value": "/* Global Includes */\nvar testCase = require('mocha').describe;\nvar pre = req...
javascript
chosen
[ { "from": "system", "value": "Disable routes require when command is 'init'\n" }, { "from": "human", "value": "import path from \"path\";\nimport chalk from \"chalk\";\nimport mergeOptions from \"./mergeOptions\"\nimport findOptionsInFiles from \"./findOptionsInFiles\"\nimport defaultOptions fro...
javascript
chosen
[ { "from": "system", "value": "perf: Use seen object pattern in unique check instead of double filtering\n" }, { "from": "human", "value": "// @flow\nimport {isEmpty, isArray, isNil, get, map, filter, includes} from \"lodash\";\n\nimport type {RuleOptions} from \"../types\";\n\nfunction duplicate...
javascript
chosen
[ { "from": "system", "value": "test(karma): Set tests to run on Crome Canary on CI\n" }, { "from": "human", "value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n var co...
javascript
chosen
[ { "from": "system", "value": "Fix Pickable issue in Google Chrome\n" }, { "from": "human", "value": "/**\n * @package assets\n */\n\n(function($) {\n\n\t/**\n\t * This plugin shows and hides elements based on the value of a select box. \n\t * If there is only one option, the select box will be h...
javascript
chosen
[ { "from": "system", "value": "Remove --disable-gpu flag when starting headless chrome\n\nThe `--disable-gpu` flag is [no longer\r\nnecessary](https://bugs.chromium.org/p/chromium/issues/detail?id=737678) and, at\r\nleast in some cases, is [causing\r\nissues](https://bugs.chromium.org/p/chromium/issues/detai...
javascript
chosen
[ { "from": "system", "value": "Enhance store for using redux-devtools\n" }, { "from": "human", "value": "import { createStore } from 'redux';\nimport Shogi from '../reducers';\n\nlet store = createStore(Shogi);\n\n// debug\nstore.subscribe(\n () => console.log(store.getState())\n);\n\nexport def...
javascript
chosen
[ { "from": "system", "value": "Use \"done\" helper to marke the process finished\n" }, { "from": "human", "value": "var chai = require('chai');\n\nchai.config.includeStack = true;\n\nglobal.expect = chai.expect;\nglobal.AssertionError = chai.AssertionError;\nglobal.Assertion = chai.Assertion;\ngl...
javascript
chosen
[ { "from": "system", "value": "Fix URI component decode part\n" }, { "from": "human", "value": "(function(env){\n \"use strict\";\n\n env.ddg_spice_expand_url = function(api_result) {\n\n\t // Get original query.\n var script = $('[src*=\"/js/spice/expand_url/\"]')[0],\n ...
javascript
chosen
[ { "from": "system", "value": "Revert \"todays hot fix fixed the need to fix the close button on the situation map.\"\n\nThis reverts commit 5cd479a829151669a2a579b5e42b36ab34f19625.\n" }, { "from": "human", "value": "window.addEventListener(\"load\", pageFullyLoaded, false);\n\n\nfunction pageFu...
javascript
chosen
[ { "from": "system", "value": "Fix unit test to temporarily pass Travis\n" }, { "from": "human", "value": "import documentFormatter from 'src/logic/documentPackager/documentFormatter';\nimport base64OfSimplePdf from './reference/base64OfSimplePdf';\n\ndescribe('DocumentFormatter', () => {\n desc...
javascript
chosen
[ { "from": "system", "value": "Change the if condition to check if ref is defined, rather than explicitly null or false.\n" }, { "from": "human", "value": "/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {objec...
javascript
chosen
[ { "from": "system", "value": "Add missing moment import to my session controller\n" }, { "from": "human", "value": "import Controller from '@ember/controller';\nimport { computed } from '@ember/object';\n\nexport default Controller.extend({\n isUpcoming: computed('model.endsAt', function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Update comment, use FBTest.getSelectedNodeBox as soon as FBTest 1.10b5 is out\n" }, { "from": "human", "value": "function runTest()\n{\n FBTest.sysout(\"issue5504.START\");\n\n FBTest.openNewTab(basePath + \"html/5504/issue5504.html\", function(win)\n {\n ...
javascript
chosen
[ { "from": "system", "value": "Update countdown timer to show minutes.\n" }, { "from": "human", "value": "'use strict'\n\nconst CountdownTimer = (props) => {\n\n const dayString = props.days\n const hourString = props.hours\n\n return (\n <span className=\"banner-timer-wrap\">\n <span ...
javascript
chosen
[ { "from": "system", "value": "Tweak layer list overflow settings to auto\n" }, { "from": "human", "value": "// gerber file output component\n'use strict'\n\nconst {h} = require('deku')\n\nconst GerberSettings = require('./gerber-settings')\nconst {LayerDefs} = require('../../layer/component')\n\...
javascript
chosen
[ { "from": "system", "value": "Use async patterns for set-region command.\n" }, { "from": "human", "value": "const {Command} = require('./index.js');\nconst {wotblitz: {default_region}} = require('../../blitzbot.json');\nconst options = {\n\targCount: 1,\n\tdescription: 'Update your personal defa...
javascript
chosen
[ { "from": "system", "value": "Add whitelisted pages which require google login." }, { "from": "human", "value": "// These URL paths will be transformed to CN mirrors.\nvar mirrors = {\n \"//developers.google.com\" : \"//developers.google.cn\",\n \"//firebase.google.com\" : \"//firebase.googl...
javascript
chosen
[ { "from": "system", "value": "Add step three to new sensor page\n" }, { "from": "human", "value": "import React from 'react';\nimport { View } from 'react-native';\n\nimport { Wizard } from '../../widgets';\n\nimport { NewSensorStepOne } from './NewSensorStepOne';\nimport { NewSensorStepTwo } fr...
javascript
chosen
[ { "from": "system", "value": "Modify cron for 2 hours\n" }, { "from": "human", "value": "'use strict';\n\nvar sync = require('./lib/sync.js');\nvar cron = require('cron');\n\nvar cronJob = cron.job(\"0 */5 * * * *\", function(){\n console.log(\"START!\");\n sync.synchronizeCrmToUmas();\n cons...
javascript
chosen
[ { "from": "system", "value": "Use proper $.on delegate binding.\nThis ensures anything added to the dom later (i.e. rows of the next page) get the events.\nAlso removed console.log call.\n" }, { "from": "human", "value": "//= require jquery\n//= require dataTables/jquery.dataTables\n//= require_...
javascript
chosen
[ { "from": "system", "value": "Fix FBTest: again the inline editor can be async on Mac\n" }, { "from": "human", "value": "function runTest()\n{\n FBTest.sysout(\"issue5755.START\");\n FBTest.openNewTab(basePath + \"html/5755/issue5755.html\", function (win)\n {\n FBTest.openFirebu...
javascript
chosen
[ { "from": "system", "value": "Fix time selection modal bug\n" }, { "from": "human", "value": "const $ = require('jquery');\nimport { getPlayer } from './player/player';\nimport { insertTimestamp, convertTimestampToSeconds, formatMilliseconds } from './timestamps';\n\nlet timeSelectionModalActive...
javascript
chosen
[ { "from": "system", "value": "Add form validation for spaces\n" }, { "from": "human", "value": "function validateJoin (username, email, password) {\n return validateUsername(username, \"join\") && validateEmail(email, \"join\") && validatePassword(password, \"join\");\n}\n\nfunction validateL...
javascript
chosen
[ { "from": "system", "value": "Use new enum type for abstractType\n" }, { "from": "human", "value": "import Abstract from './Abstract'\nimport { STRING, TEXT } from 'substance'\nimport { RICH_TEXT_ANNOS } from './modelConstants'\n\nexport default class CustomAbstract extends Abstract {\n static ...
javascript
chosen
[ { "from": "system", "value": "Add gridSettings when arethusaGrid is active\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.core').directive('arethusaGrid', [\n 'arethusaGrid',\n 'plugins',\n function(arethusaGrid, plugins) {\n return {\n restrict: 'A',\n...
javascript
chosen
[ { "from": "system", "value": "Add feature filter to routes\n" }, { "from": "human", "value": "var _ = require(\"lodash\")\nvar publicRoutes = require(\"./public\");\nvar authenticated = require(\"./authenticated\");\nvar routes = [];\n\npublicRoutes.concat(authenticated).forEach(function(route) ...
javascript
chosen
[ { "from": "system", "value": "Remove project id in URL\n" }, { "from": "human", "value": "var router = module.exports = new (require('koa-router'))();\n\nfunction *renderIndex(next) {\n this.locals.me = yield this.api.users('me').get();\n this.locals.projects = yield this.api.projects.get();\n...
javascript
chosen