conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Disable TLS verification in tests\n\nThis is needed to run it inside the AEB network.\n" }, { "from": "human", "value": "// This file is executed before all specs and before all other handlers\n\n// Enable typescript compilation for .ts files\nrequire('ts-node/regis...
javascript
chosen
[ { "from": "system", "value": "Add test for changing ajax type\n" }, { "from": "human", "value": "var Uploader, file;\n\nmodule(\"Ember.Uploader\", {\n setup: function() {\n if (typeof WebKitBlobBuilder === \"undefined\") {\n file = new Blob(['test'], { type: 'text/plain' });\n } else...
javascript
chosen
[ { "from": "system", "value": "Add example webpackDevServer config override.\n\nAdd an example showing how to use the devServer field to provide an override function for creating the config for the webpackDevServer in development." }, { "from": "human", "value": "/* DEFAULT */\nmodule.exports = f...
javascript
chosen
[ { "from": "system", "value": "Add doc comments to thumbail.js" }, { "from": "human", "value": "import { getThumbnailPath } from '@vue-storefront/core/helpers'\n\nexport const thumbnail = {\n methods: {\n /**\n * Return thumbnail URL for specific base url and path\n * @param {string} ...
javascript
chosen
[ { "from": "system", "value": "Fix a invalid variable name\n" }, { "from": "human", "value": "module.exports = function blocklike(func){\n return function(){\n var args = Array.prototype.slice.apply(arguments);\n var callback = args[args.length - 1];\n if (typeof callback === 'function'...
javascript
chosen
[ { "from": "system", "value": "Fix a few unlikely issues with empty trade iterations (Binance)\n\n" }, { "from": "human", "value": "const moment = require('moment');\nconst util = require('../../core/util.js');\nconst _ = require('lodash');\nconst log = require('../../core/log');\n\nvar config = ...
javascript
chosen
[ { "from": "system", "value": "Fix utils to get selection entities [ci skip]\n" }, { "from": "human", "value": "import { Entity } from 'draft-js'\n\n\nconst getSelectionEntities = (editorState, entityType) => {\n // Selection cursor\n const targetSelection = editorState.getSelection()\n const ...
javascript
chosen
[ { "from": "system", "value": "Move matrix calcs from webglshadows\n" }, { "from": "human", "value": "import { LightShadow } from './LightShadow.js';\nimport { _Math } from '../math/Math.js';\nimport { PerspectiveCamera } from '../cameras/PerspectiveCamera.js';\n\n/**\n * @author mrdoob / http://...
javascript
chosen
[ { "from": "system", "value": "Stop Cucumber at the first error" }, { "from": "human", "value": "module.exports = {\n \"default\": \"--compiler ls:livescript -r features --strict --snippet-syntax node_modules/cucumber-snippets-livescript\"\n}\n" }, { "from": "gpt", "value": "module.e...
javascript
chosen
[ { "from": "system", "value": "Clean up the error pages.\n" }, { "from": "human", "value": "import ErrorStore from '../stores/ErrorStore'\nimport React from 'react'\n\nexport default class ErrorPage extends React.Component {\n\n constructor() {\n this.state = ErrorStore.getState()\n\n this...
javascript
chosen
[ { "from": "system", "value": "Add day 8 solution part 2\n\n" }, { "from": "human", "value": "// Part 1\nR={},document.body.innerText.split`\\n`.map(l=>l&&([x,a,y,,z,o,v]=l.split` `,R[x]=(R[x]|0)+y*(a[0]=='i'?1:-1)*eval((R[z]|0)+o+v))),Math.max(...Object.values(R))\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Add workaround for 2.12.x support\n" }, { "from": "human", "value": "function save() {\n this._super.apply(this, arguments);\n this._save();\n}\n\nfunction saveIfChanged(key) {\n this._super.apply(this, arguments);\n\n if (key !== '_isInitialContent') {\n thi...
javascript
chosen
[ { "from": "system", "value": "Allow more information for casting\n\nBy adding the column info to the castingStrategy call, we can have better control over casting as we know which type of data is being cast." }, { "from": "human", "value": "import { isArray } from 'lodash';\nimport strategies fr...
javascript
chosen
[ { "from": "system", "value": "Throw an error, not just a plain string\n" }, { "from": "human", "value": "\"use strict\";\n\nimport Guard from './Guard';\n\nclass EventContext {\n constructor(modelId, eventType, event) {\n Guard.isString(modelId, \"The modelId should be a string\");\n ...
javascript
chosen
[ { "from": "system", "value": "Send notifications from the verification\n" }, { "from": "human", "value": "const Notification = require('./Notification');\n\nasync function Verification( request, reply ) {\n console.log(request);\n // const notificationResult = await Notification({\n // stat...
javascript
chosen
[ { "from": "system", "value": "Use importNode to avoid issues cloning a template with custom elements in it.\n" }, { "from": "human", "value": "/*\n * A minimal set of helper functions to go on top of polymer-micro:\n *\n * 1. <template> instantiation\n * 2. Polymer-style automatic node findi...
javascript
chosen
[ { "from": "system", "value": "fix(app): Fix coverage folder for mocha\n" }, { "from": "human", "value": "'use strict';\nvar gulp = require('gulp');\nvar runSequence = require('run-sequence');\nvar mocha = require('gulp-mocha');\nvar istanbul = require('gulp-istanbul');\nvar gutil = require('gulp...
javascript
chosen
[ { "from": "system", "value": "Add React VR and Javascript ES6+ to skillset\n" }, { "from": "human", "value": "const PROFILE = {\n summary: `Den Temple is a Javascript Developer specializing in Web and Mobile Design. He has additional expertise with SEO consulting, API integration, and Machine L...
javascript
chosen
[ { "from": "system", "value": "Add Link Route component in the Home for example purpose.\n" }, { "from": "human", "value": "import React from 'react';\n\nfunction HomeView (props) {\n return (\n <div>\n <p>Hello {props.user.user || 'empty'}</p>\n </div>\n );\n}\n\ne...
javascript
chosen
[ { "from": "system", "value": "Make link to webpack context explanation permanent\n" }, { "from": "human", "value": "/* eslint-disable prefer-arrow-callback, func-names, class-methods-use-this */\nimport loader from 'graphql-tag/loader';\n\nexport default class GraphQLCompiler {\n processFilesFo...
javascript
chosen
[ { "from": "system", "value": "Add check for notiflist to redirect correctly to login\n" }, { "from": "human", "value": "import React from 'react'\nimport { checkAuth } from '../../api/utils'\nimport NotifListView from './components/NotifListView'\n\nexport default (store) => ({\n path : 'home',...
javascript
chosen
[ { "from": "system", "value": "Move issues out of comments and into GitHub issues.\n" }, { "from": "human", "value": "import { scaleLinear } from \"d3-scale\";\n\nvar scaleConstructors = {\n linear: scaleLinear\n // TODO support all scales https://github.com/datavis-tech/reactive-vis/issues/26\...
javascript
chosen
[ { "from": "system", "value": "Allow clicks on past calls only when call status is idle\n" }, { "from": "human", "value": "import React from 'react';\nimport _ from 'lodash';\nimport styled from 'styled-components';\nimport Paper from 'material-ui/Paper';\nimport { compose, withHandlers } from 'r...
javascript
chosen
[ { "from": "system", "value": "Fix warning when isolating bootstrap\n" }, { "from": "human", "value": "var fs = require('fs');\nvar postcss = require('postcss');\nvar prefixer = require('postcss-prefix-selector');\n\nvar css = fs.readFileSync('node_modules/bootstrap/dist/css/bootstrap.css', 'utf8...
javascript
chosen
[ { "from": "system", "value": "Change that was unintended to implement with the data was removed\n" }, { "from": "human", "value": "import { percentPovertyLevel, \n percentStateMedianIncome } from '../../../helpers/helperFunctions';\n\nfunction getHousingEligibility(client) {\n let percentP...
javascript
chosen
[ { "from": "system", "value": "Use KeyboardEvent.key instead of code\n" }, { "from": "human", "value": "\nimport { Mixin, InitialRender } from './ce';\nimport { triggerEvent } from './events';\nimport { DisableBehavior } from './disabled';\nimport { FocusableBehavior } from './focus';\n\n/**\n * ...
javascript
chosen
[ { "from": "system", "value": "Check if maxResults is defined\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = bestResults;\n\n/* we have 2 criteria to find the best results\n 1. best match per zone based on the bestOf parameter\n 2. maxResults : maximal number of results\n */...
javascript
chosen
[ { "from": "system", "value": "Add items to the list component after they are put into the DOM, such that the itemFocus finds the dom correctly when positioning itself\n" }, { "from": "human", "value": "jsio('from common.javascript import Class, bind');\njsio('import browser.events as events');\n...
javascript
chosen
[ { "from": "system", "value": "Add back a missing comment\n" }, { "from": "human", "value": "/**\n * grunt-inline-images\n * https://github.com/EE/grunt-inline-images\n *\n * Author Michał Gołębiowski <michal.golebiowski@laboratorium.ee>\n * Licensed under the MIT license.\n */\n\n'use strict';\n...
javascript
chosen
[ { "from": "system", "value": "Fix issue in item details route\n\n" }, { "from": "human", "value": "\nimport React, { Component } from 'react'\nimport { Router, Route, browserHistory, } from 'react-router'\nimport { Provider } from 'react-redux'\nimport configureStore from '../store/configure-sto...
javascript
chosen
[ { "from": "system", "value": "chore(gulp): Fix build behavior by returning streams.\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar jscs = require('gulp-jscs');\nvar jshint = require('gulp-jshint');\nvar gulpMocha = require('gulp-mocha');\n\nvar javascriptGlo...
javascript
chosen
[ { "from": "system", "value": "Remove last bits of gulp-bg\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar bg = require('gulp-bg');\nvar docs = require('./gulp/docs');\n\ngulp.task('docs', docs({\n cwd: __dirname,\n src: './src/docs',\n dest: './dist/docs'\n}));\n\ngulp.tas...
javascript
chosen
[ { "from": "system", "value": "Remove integration test, because it run too long in CI\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar path = require('path');\nvar fs = require('fs');\n\ngulp.task('cases', function () {\n var jsonify = require('./jsonify');\n var postcs...
javascript
chosen
[ { "from": "system", "value": "Add gulp build and serve tasks\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp'),\n iif = require('gulp-if'),\n sass = require('gulp-sass'),\n cssbeautify = require('gulp-cssbeautify'),\n del = require('del');\n\ngulp.task('b...
javascript
chosen
[ { "from": "system", "value": "Fix the focus jump in post.\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport ReactDisqusComments from 'react-disqus-comments';\n\nimport Page from '../Page';\n\nimport styles from './index.scss';\n\nconst setOverflow = ...
javascript
chosen
[ { "from": "system", "value": "Adjust gulp-eslint to fail on error\n" }, { "from": "human", "value": "const gulp = require('gulp');\nconst eslint = require('gulp-eslint');\nconst mocha = require('gulp-mocha');\nconst nodemon = require('gulp-nodemon');\n\nvar lintFiles = ['lib/**/*.js', 'models/**...
javascript
chosen
[ { "from": "system", "value": "Change JSXTransformer URL to non-fb link\n" }, { "from": "human", "value": "requirejs.config({\n \"baseUrl\": \"./\",\n \"paths\": {\n \"jquery\":\"bower_components/jquery/jquery.min\",\n \"jquery-ui\":\"bower_components/jquery-ui/ui/jquery-ui\",\n \"reac...
javascript
chosen
[ { "from": "system", "value": "Update to use dynamic ports\n" }, { "from": "human", "value": "/**\n * Firefox proxy settings implementation\n * TODO(salomegeo): rewrite it in typescript\n */\n\nvar prefsvc = require(\"sdk/preferences/service\");\n\nvar proxyConfig = function() {\n this.running_ ...
javascript
chosen
[ { "from": "system", "value": "Add debugger to stop at edge case point.\n" }, { "from": "human", "value": "if (typeof(messages) === \"undefined\") {\n var messages = {};\n}\nelse {\n console.error(\"There is already a global variable called \\\"messages\\\".\");\n}\n\nfunction aMsg(key, message...
javascript
chosen
[ { "from": "system", "value": "Transform fillRule attribute to fill-rule\n" }, { "from": "human", "value": "var DOMProperty = require('react/lib/DOMProperty');\n\nvar svgAttrs = ['dominant-baseline', 'shape-rendering', 'mask'];\n// hack for getting react to render svg attributes\nDOMProperty.inje...
javascript
chosen
[ { "from": "system", "value": "Set operator to 'and' for refinementLists\n" }, { "from": "human", "value": "let timerId\nexport let tndWidgets = {\n searchBox: {\n queryHook(query, refine) {\n clearTimeout(timerId);\n timerId = setTimeout(() => refine(query), 500);\n },\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Update to the lastmodified-tracking sample.\n" }, { "from": "human", "value": "/**\n * Copyright 2015 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with t...
javascript
chosen
[ { "from": "system", "value": "Enable chrome app feature flag" }, { "from": "human", "value": "const isStaging = () => process.env.SCRATCH_ENV === 'staging';\n\nconst flagInUrl = flag => {\n const url = (window.location && window.location.search) || '';\n return url.indexOf(`${flag}=true`) ...
javascript
chosen
[ { "from": "system", "value": "chore: Use exponential notation in integration test timeout setup\n" }, { "from": "human", "value": "\"use strict\";\n\n// allow CLI integration tests to run for awhile\njasmine.DEFAULT_TIMEOUT_INTERVAL = 300000;\n" }, { "from": "gpt", "value": "\"use st...
javascript
chosen
[ { "from": "system", "value": "Add support for multi-test meta tests.\n\nBasically I've built a teenytest to test teenytest\n\nGreat." }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar glob = require('glob')\nvar path = require('path')\nvar _ = require('lodash')\nvar async = require('asy...
javascript
chosen
[ { "from": "system", "value": "Add now navigates to Lists page\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\n\nimport { addNewList } from '../actions';\n\nclass ListEdit extends Co...
javascript
chosen
[ { "from": "system", "value": "Use properties where it makes sense\n" }, { "from": "human", "value": "import React from 'react';\n\nclass ApplicationPreviewContainer extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n previewUrl: 'http://localhost:800...
javascript
chosen
[ { "from": "system", "value": "Update the API to https as github does not all http\n" }, { "from": "human", "value": "(function(){\n var dataFactory = function($http){\n var url = \"http://gateway-a.watsonplatform.net/calls/text/TextGetEmotion\";\n var APIkey = \"4d395301e1cf0abc...
javascript
chosen
[ { "from": "system", "value": "Fix jshint issue in servicemgmt controllers\n" }, { "from": "human", "value": "(function (angular, _) {\n\n angular.module(\"mfl.service_mgmt.controllers.categories\", [\n \"mfl.service_mgmt.services\"\n ])\n\n .controller(\"mfl.service_mgmt.controll...
javascript
chosen
[ { "from": "system", "value": "Add require to test example.\n" }, { "from": "human", "value": "import test from 'ava';\nimport examplesLoader from '../loaders/examples.loader';\n\ntest('should return valid, parsable JS', t => {\n\tlet exampleMarkdown = `\n# header\n\n\t<div/>\n\ntext\n\n\\`\\`\\`...
javascript
chosen
[ { "from": "system", "value": "Remove `fonts` gulp task from default task\n\nDoesn't need to run every time.\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\n\ngulp.task('default', ['sass', 'fonts'], function () {\n\n});\n\ngulp.ta...
javascript
chosen
[ { "from": "system", "value": "Use Model.remoteMethod instead of loopback's fn.\n\nRework Todo model to define the remote method `stats` using the new\nmethod `Model.remoteMethod` instead of the deprecated\n`loopback.remoteMethod`.\n" }, { "from": "human", "value": "var loopback = require('loopba...
javascript
chosen
[ { "from": "system", "value": "Fix an issue with custom arrows example\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport createReactClass from 'create-react-class'\nimport Slider from '../src/slider'\n\nvar SampleNextArrow = createReactClass({\n render: function...
javascript
chosen
[ { "from": "system", "value": "Fix label on angular example's describe block\n\n[ci skip]" }, { "from": "human", "value": "'use strict';\n\nvar expect = require('chai').expect;\nvar sinon = require('sinon');\nvar sinonAsPromised = require('sinon-as-promised');\nvar angular ...
javascript
chosen
[ { "from": "system", "value": "Exclude directories during copy process\n" }, { "from": "human", "value": "module.exports = function( grunt ) {\n\n \"use strict\";\n\n var pkg = grunt.file.readJSON( \"package.json\" );\n\n grunt.initConfig( {\n\n pkg: pkg,\n\n clean: [ \"dis...
javascript
chosen
[ { "from": "system", "value": "Add settings for watch & load task\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n \"use strict\";\n\n var browserifyFiles = {\n \"./dist/build.js\": \"./src/*.js\"\n };\n\n grunt.initConfig({\n pkg: grunt.file.rea...
javascript
chosen
[ { "from": "system", "value": "Set ‘build’ as the default Grunt task\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\tgrunt.initConfig({\n\t\tbowerPkg: grunt.file.readJSON('bower.json'),\n\t\tkarma: {\n\t\t\tunit: {\n\t\t\t\tconfigFile: 'karma.conf.js',\n\t\t\t\tsingleRun:...
javascript
chosen
[ { "from": "system", "value": "Add db.js to jshint task\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n 'use strict';\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n all: [\n 'Gruntfile.js',\...
javascript
chosen
[ { "from": "system", "value": "fix: Modify css support check to work better with SSR\n" }, { "from": "human", "value": "export function cssSupports (property, value) {\n if (CSS) {\n return CSS.supports(property, value)\n }\n\n return toCamelCase(property) in document.body.style\n}\n\nexpor...
javascript
chosen
[ { "from": "system", "value": "Change artifact location to suite CircleCI\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.loadNpmTasks(\"grunt-mocha-test\");\n grunt.loadNpmTasks(\"grunt-mocha-istanbul\");\n\n var testOutputLocation = process.env.CIRCLE_TEST...
javascript
chosen
[ { "from": "system", "value": "Add clean and copy tasks for Grunt.\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n\n\tgrunt.initConfig({\n\n\t\tpkg: grunt.file.readJSON('package.json')\n\t});\n\n\tgrunt.registerTask('default', []);\n};" }, { "from": "gpt", "va...
javascript
chosen
[ { "from": "system", "value": "Add space between first and last names\n" }, { "from": "human", "value": "/**\n * Sustainable Solutions (NZ) Ltd. 2021\n * mSupply Mobile\n */\n\nimport Realm from 'realm';\n\nexport class MedicineAdministrator extends Realm.Object {\n get displayString() {\n re...
javascript
chosen
[ { "from": "system", "value": "Add js, coffee, yaml, json flags\n\nfixes #3\n" }, { "from": "human", "value": "/*\n * grunt-generate-configs\n * https://github.com/creynders/grunt-generate-configs\n *\n * Copyright (c) 2014 Camille Reynders\n * Licensed under the MIT license.\n */\n\n'use strict'...
javascript
chosen
[ { "from": "system", "value": "Update gulp file to lint more src\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar jscs = require('gulp-jscs');\n\ngulp.task('jshint', function() {\n return gulp.src('./lib/*.js')\n .pipe(jshint())\n ...
javascript
chosen
[ { "from": "system", "value": "Fix remaining gulp 3.x syntax\n" }, { "from": "human", "value": "// grab our gulp packages\nvar gulp = require(\"gulp\");\nvar gutil = require(\"gulp-util\");\nvar uglify = require(\"gulp-uglify\");\nvar rename = require(\"gulp-rename\");\nvar concat = require(\"gu...
javascript
chosen
[ { "from": "system", "value": "Remove the temp file after deployment.\n" }, { "from": "human", "value": "var fs = require('fs'),\n\tsys = require('sys'),\n exec = require('child_process').exec;\n\nvar deployer = exports.deployer = function (project, callback) {\n\tvar tempFile = __dirname + '/...
javascript
chosen
[ { "from": "system", "value": "Move the onClick from the wrapper to the status bullet\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nimport Box from '../box';\...
javascript
chosen
[ { "from": "system", "value": "Add placeholder abilities route callback.\n" }, { "from": "human", "value": "module.exports = function(app, settings) {\n app.get('/status.json', function(req, res) {\n res.send({ status: 'true' });\n });\n\n /**\n * Inspect fields\n */\n ...
javascript
chosen
[ { "from": "system", "value": "Allow use of argv for setting config options\n" }, { "from": "human", "value": "var nconf = require('nconf');\n\nvar config = nconf.file({\n\tfile: 'defaults.json',\n\tdir: __dirname,\n\tsearch: true\n}).env();\n\nObject.keys(config.get()).filter(function (key) {\n\...
javascript
chosen
[ { "from": "system", "value": "Fix bug reading out links\n" }, { "from": "human", "value": "import { h } from './vdom';\n\n\nexport const bold = {\n name: 'bold',\n selector: 'strong, b',\n vdom: children => <strong>{children}</strong>,\n};\n\n\nexport const italics = {\n name: 'italic',\n s...
javascript
chosen
[ { "from": "system", "value": "Update hook to try getting around the update issues on renaming files in use for windows\n" }, { "from": "human", "value": "module.exports.pre = function(version, packagePath) {\n\treturn Promise.resolve(true);\n};\n\nmodule.exports.post = function(version, packageP...
javascript
chosen
[ { "from": "system", "value": "Add layers to map options\n" }, { "from": "human", "value": "angular.module('anol.map')\n\n.provider('MapService', [function() {\n var _view;\n\n var buildMapConfig = function(layers, controls) {\n var map = new ol.Map(angular.extend({}, {\n ...
javascript
chosen
[ { "from": "system", "value": "Add semicolons and add temporary string for time remaining\n" }, { "from": "human", "value": "function addSkill() {\n $(\"#new_skill\").on(\"submit\", function (event) {\n event.preventDefault();\n var $target = $(event.target);\n console.log($target)\n ...
javascript
chosen
[ { "from": "system", "value": "Remove note that imageData is only available on Android\n\nChange-Id: I7109de343ecffa3e67993567239df2b6e8d637ba\n" }, { "from": "human", "value": "/*\n * Note: putImageData and getImageData is currently only supported on Android.\n */\n\nvar page = new tabris.Page({...
javascript
chosen
[ { "from": "system", "value": "Playground: Fix the playground shell-test by passing a context.\n\nChange-Id: If212f5f5041fab67fae6bd4bdb600324fd243ad3\n" }, { "from": "human", "value": "var veyron = require('veyron');\nvar context = veyron.context;\n\nveyron.init(function(err, rt){\n if (err) th...
javascript
chosen
[ { "from": "system", "value": "Change ready button to be a gradient to stand out\n" }, { "from": "human", "value": "import { Button } from './Widgets';\n\nexport default class Ready extends React.Component {\n ready(r) {\n ws.send({cmd: r ? 'ready' : 'not_ready'});\n }\n render() ...
javascript
chosen
[ { "from": "system", "value": "Use API key from Env when loading google maps script\n" }, { "from": "human", "value": "/* @flow */\nimport React from 'react';\nimport { GoogleMap } from 'react-google-maps';\nimport ScriptjsLoader from 'react-google-maps/lib/async/ScriptjsLoader';\nimport { latLon...
javascript
chosen
[ { "from": "system", "value": "Fix response status title helper test\n" }, { "from": "human", "value": "import { assert } from 'chai';\nimport getPetitionResponseStatusTitle from 'helpers/getPetitionResponseStatusTitle';\n\ndescribe('getPetitionsPageTitle', () => {\n it('returns the title for a ...
javascript
chosen
[ { "from": "system", "value": "Set default duration of user satisfaction graph to 30 days\n" }, { "from": "human", "value": "define([\n 'extensions/controllers/module',\n 'common/views/visualisations/completion_rate',\n 'common/collections/user-satisfaction'\n],\nfunction (ModuleController, Us...
javascript
chosen
[ { "from": "system", "value": "Rename edit prop and add default value\n" }, { "from": "human", "value": "import React from 'react';\n\nimport SchemaForm from './SchemaForm';\nimport SchemaFormUtil from '../utils/SchemaFormUtil';\n\nconst METHODS_TO_BIND = [\n 'handleFormChange',\n 'validateForm...
javascript
chosen
[ { "from": "system", "value": "Update LinkedIn PYMK script to work with new page\n\nAddresses https://greasyfork.org/en/forum/discussion/27748/missing-url\n" }, { "from": "human", "value": "// ==UserScript==\n// @name LinkedIn hide email contacts from \"People You May Know\"\n// @namespace ...
javascript
chosen
[ { "from": "system", "value": "Move active class from link to tab\n" }, { "from": "human", "value": "import classnames from 'classnames'\nimport Education from '../education/Education'\nimport Names from '../names/Names'\nimport React from 'react'\nimport {TabContent, TabPane, Nav, NavItem, NavLi...
javascript
chosen
[ { "from": "system", "value": "chore: Refactor classnames usage a little bit\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react'\nimport { Link } from 'react-router'\nimport classnames from 'classnames'\n\nimport Date from '../../components/Date'\nimport Tag from '../../co...
javascript
chosen
[ { "from": "system", "value": "Add `-rc.n` suffix to `rate-limit`.\n" }, { "from": "human", "value": "Package.describe({\n name: 'rate-limit',\n version: '1.0.8',\n // Brief, one-line summary of the package.\n summary: 'An algorithm for rate limiting anything',\n // URL to the Git repository...
javascript
chosen
[ { "from": "system", "value": "Change touchable customStyle to style\n" }, { "from": "human", "value": "import React from 'react';\nimport { Text, TouchableOpacity, TouchableNativeFeedback } from 'react-native';\nimport { platformAndroid } from '../../util/general';\n\nclass Touchable extends Rea...
javascript
chosen
[ { "from": "system", "value": "Modify createdAt and updatedAt field type to dateonly\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n up: (queryInterface, Sequelize) => {\n queryInterface.createTable('Documents', {\n id: {\n allowNull: false,\n autoI...
javascript
chosen
[ { "from": "system", "value": "Add test for filter change.\n" }, { "from": "human", "value": "import expect from 'expect';\nimport filter from '../src/filter';\n\ndescribe('filter', () => {\n it('should keep items the callback returns truthy for', () => {\n const array = [1, 2, 3, 4];\n co...
javascript
chosen
[ { "from": "system", "value": "Update KNEX setup file to point to the correct location of test seed data.\n" }, { "from": "human", "value": "// Update with your config settings.\n\nmodule.exports = {\n\n development: {\n client: 'pg',\n connection: 'postgres://localhost/happyhourpower',\n ...
javascript
chosen
[ { "from": "system", "value": "Remove request tokens from service responses\n\n" }, { "from": "human", "value": "const { authenticate } = require('@feathersjs/authentication');\n\nconst globalHooks = require('../../../hooks');\nconst { canRead } = require('../utils/filePermissionHelper');\n\n\nco...
javascript
chosen
[ { "from": "system", "value": "Kill off more github popups\n" }, { "from": "human", "value": "var css = '\\\n.pr-toolbar {\\\n position: static !important;\\\n}\\\n'\n\nvar style = document.createElement('style')\nstyle.appendChild(document.createTextNode(css))\ndocument.getElementsByTagName('...
javascript
chosen
[ { "from": "system", "value": "Fix syntax by adding missing parenthesis." }, { "from": "human", "value": "var jsdom = require('../../lib/jsdom');\nvar path = require('path');\n\nfunction again() {\n jsdom.env('<a class=\"testing\">test</a>', [\n path.resolve(__dirname, '../jquery-fixtures/jqu...
javascript
chosen
[ { "from": "system", "value": "Remove unused scene from unit test\n" }, { "from": "human", "value": "import { GltfLoader, Resource } from \"../../Source/Cesium.js\";\nimport { ModelExperimental } from \"../../Source/Cesium.js\";\nimport createScene from \"../createScene.js\";\n\ndescribe(\"Scene/...
javascript
chosen
[ { "from": "system", "value": "Use `package.name` in the app definition.\n" }, { "from": "human", "value": "// New Relic Server monitoring support\nif ( process.env.NEW_RELIC_ENABLED ) {\n require( \"newrelic\" );\n}\n\nconst restify = require('restify');\nconst applyRoutes = require('./routes')...
javascript
chosen
[ { "from": "system", "value": "Call of draw function has been corrected\n" }, { "from": "human", "value": "var game = {};\n\ngame.initialise = function() {\n common.require('draw');\n common.require('level');\n common.require('objects');\n common.require('userInterface');\n \n w...
javascript
chosen
[ { "from": "system", "value": "Load API request object into function app() and successfully log response.results to console\n" }, { "from": "human", "value": "alert(\"TEST\");\n" }, { "from": "gpt", "value": "//IIFE containing main tasks of page\n(function(){\n 'use strict';\n\n var...
javascript
chosen
[ { "from": "system", "value": "Fix errrors on Firefox when dismiss toaster\n" }, { "from": "human", "value": "/* global element, by */\n'use strict';\nvar common = require('../common/common');\nvar navigation = require('../common/navigation');\nvar genericForm = require('../generic_form/generic_f...
javascript
chosen
[ { "from": "system", "value": "Add hostname to avahi_pub advertisement method\n" }, { "from": "human", "value": "var serviceName = 'radiodan-http';\n\nif(process.platform === 'linux') {\n var avahi = require('avahi_pub');\n\n module.exports.advertise = function(radiodan, port) {\n radiodan.c...
javascript
chosen
[ { "from": "system", "value": "Check if tab’s url is defined before hibernating\n" }, { "from": "human", "value": "var performCommand = function(event) {\n\tif(event.command === 'hibernateTabs') {\n\t\tvar c = 0;\n\n\t\tvar xmlHttp = new XMLHttpRequest();\n\t\txmlHttp.open('GET', safari.extension...
javascript
chosen
[ { "from": "system", "value": "Add window.__PROMISE_INSTRUMENTATION__ flag to register RSVP.on callbacks\n" }, { "from": "human", "value": "import Promise from \"./rsvp/promise\";\nimport EventTarget from \"./rsvp/events\";\nimport denodeify from \"./rsvp/node\";\nimport all from \"./rsvp/all\";\...
javascript
chosen
[ { "from": "system", "value": "Add helper function to get average postition of eve\n" }, { "from": "human", "value": "import settings from './settings'\n\nmodule.exports = {\n findDistance: (pos1, pos2) => {\n return Math.sqrt(Math.pow(pos2.x - pos1.x, 2) + Math.pow(pos2.y - pos1.y, 2))\n },...
javascript
chosen