conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update upload bike docs to use lower case primitives\n"
},
{
"from": "human",
"value": "const assert = require('assert')\nconst fs = require('fs')\n\n/**\n * Upload bike to s3\n * @param {Object} s3 Client for s3\n * @param {Object} config\n * @param {String} config... | javascript | chosen |
[
{
"from": "system",
"value": "Add notes for implementing a scrobbling queue\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst request = require('../../util/request');\n\nlet controller = {};\nlet dataString = \"hello\";\nlet options = {\n hostname: 'ws.audioscrobbler.com',\n path: '/2.... | javascript | chosen |
[
{
"from": "system",
"value": "Watch library changes in gulp\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst paths = require('../../paths');\nconst browserSync = require('browser-sync').get('bs-proxy');\n\n// Monitor sass, js and view code for changes and trigger\n// rebui... | javascript | chosen |
[
{
"from": "system",
"value": "Use pkg utility in test utils as well, because DRY\n"
},
{
"from": "human",
"value": "import { dirname } from 'path'\nimport readPkg from 'read-package-json'\nimport deferred from 'thenify'\n\nexport const pkgRoot = dirname(require.resolve('../../package.json'))\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix slave labor required by\n"
},
{
"from": "human",
"value": "module.exports = {\n name: \"slave_labor\",\n title: \"Slave Labor\",\n description: \"During Upkeep, you can increase one City AV by 1. \\\nThe maximum AV of a City is 2, unless otherwise noted... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 'calling set on destroyed object' error in dummy app under Fastboot\n"
},
{
"from": "human",
"value": "import Controller from '@ember/controller';\nimport RSVP from 'rsvp';\nimport { later, scheduleOnce } from '@ember/runloop';\n\nexport default Controller.exten... | javascript | chosen |
[
{
"from": "system",
"value": "Add js to make priority lists work\n"
},
{
"from": "human",
"value": "//= require_tree .\n\njQuery(function($) {\n\n \"use strict\";\n\n $('.js-collapsible-collection').each(function(){\n new GOVUK.CollapsibleCollection({$el:$(this)});\n })\n\n $('.govspeak')... | javascript | chosen |
[
{
"from": "system",
"value": "Test if retrieved object needs parsing"
},
{
"from": "human",
"value": "function checkForLocalStorage() {\n var hasWebStorage = false;\n \n if(typeof(Storage) !== \"undefined\") {\n \tconsole.log(\"local storage supported\");\n \thasWebStorage = true;... | javascript | chosen |
[
{
"from": "system",
"value": "Define the various SCIM 2 message URNs as constants.\n"
},
{
"from": "human",
"value": "module.exports = {\n SCIM_MEDIA_TYPE: 'application/scim+json'\n};"
},
{
"from": "gpt",
"value": "module.exports = {\n SCIM_MEDIA_TYPE: 'application/scim+json',\n S... | javascript | chosen |
[
{
"from": "system",
"value": "Put session_timeout back to 60 minutes.\n"
},
{
"from": "human",
"value": "/************************************\n * \n * Copyright (c) 2013 AnsibleWorks, Inc.\n *\n * config.js\n *\n * Gobal configuration variables for controlling application behavior.\n *\n */\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix shareVolume for image upload\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst co = require('../common');\n\nmodule.exports = {\n 'deck': {\n uri: (!co.isEmpty(process.env.SERVICE_URL_DECK)) ? process.env.SERVICE_URL_DECK : 'http://deckservice'\n },... | javascript | chosen |
[
{
"from": "system",
"value": "message: Add Error and Warning functions\n"
},
{
"from": "human",
"value": "// -------------------------------------------------\n// ------------- MessageHandler --------------------\n// -------------------------------------------------\n\n\"use strict\";\n\nfunctio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Ember version check to determine Glimmer.\n\nThe original check does not work properly for Ember < 2.10. Example `2.6 >= 2.10` gives `true`.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst emberMajorMinorVersion = Ember.VERSION.match(/(\\d... | javascript | chosen |
[
{
"from": "system",
"value": "Implement signup and login outline and password text input\n"
},
{
"from": "human",
"value": "import Exponent from 'exponent';\nimport React from 'react';\nimport {\n StyleSheet,\n Text,\n View,\n TextInput,\n TouchableHighlight\n} from 'react-native';\n\nclass... | javascript | chosen |
[
{
"from": "system",
"value": "REMOVE unneeded babel/preset in override\n"
},
{
"from": "human",
"value": "module.exports = {\n presets: [\n ['@babel/preset-env', { shippedProposals: true, useBuiltIns: 'usage' }],\n '@babel/preset-react',\n '@babel/preset-flow',\n ],\n plugins: [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove class expression test because it is not working correctly.\n\nBUG=None\n\nReview URL: https://codereview.appspot.com/6723043\n"
},
{
"from": "human",
"value": "class Point {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n}\n\nclass A {\n clas... | javascript | chosen |
[
{
"from": "system",
"value": "Change don't device orientation lock at the time of run\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular.module('sensors.components')\n .controller('MenuController', MenuController);\n\n function MenuController($scope, $window, menu... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Improve wording and add comment for realm switching.\"\n"
},
{
"from": "human",
"value": "'use strict';\nconst {remote} = require('electron');\n\ndocument.getElementById('close-button').addEventListener('click', function (e) {\n let window = remote.getC... | javascript | chosen |
[
{
"from": "system",
"value": "Load analytics.js after the entire app\n"
},
{
"from": "human",
"value": "//= require jquery.js\n//= require jquery_ujs\n//= require jquery.remotipart\n//= require turbolinks\n//= require jquery.pjax\n//= require foundation\n//= require dropzone\n//= require numeral... | javascript | chosen |
[
{
"from": "system",
"value": "Remove needless loading of highcharts/highstock\n\nfix https://github.com/coderdojo-japan/coderdojo.jp/issues/299\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing AdminLTE javascript import\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/java... | javascript | chosen |
[
{
"from": "system",
"value": "Add hiveDefaults to default Oozie properties for all workflows.\n"
},
{
"from": "human",
"value": "var CELOS_USER = \"celos\";\n\nvar CELOS_DEFAULT_OOZIE = \"http://oozie002.ny7.collective-media.net:11000/oozie\";\n\nvar CELOS_DEFAULT_HDFS = \"hdfs://nameservice1\";... | javascript | chosen |
[
{
"from": "system",
"value": "Drop messages instead of buffering\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar stream = require(\"stream\"),\n util = require(\"util\");\n\n// TODO write this up as \"how to merge readable streams\"\nvar InfinitePassThrough = function() {\n stream.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded value for campaign 'Days Left'\n"
},
{
"from": "human",
"value": "'use strict';\nangular.module('campaign').filter('daysflt', function() {\n return function days(value) {\n var filteredDay;\n console.log(value);\n if(value.hoursLeft) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change AWS IoT topic name to sync with backend repo\n\nNo longer using hypens in topic name\n"
},
{
"from": "human",
"value": "import * as types from './mutation-types'\n\nimport IoT from '../../aws/iot'\n\nexport const iotClosed = ({ commit }) => commit(types.IOT_C... | javascript | chosen |
[
{
"from": "system",
"value": "[input-date] Add the options from the doamin.\n"
},
{
"from": "human",
"value": "var jQuery = require('jquery');\n//Dependencies.\n////http://www.daterangepicker.com/#ex2\nvar builder = require('focus').component.builder;\nvar React = require('react');\nvar inputTex... | javascript | chosen |
[
{
"from": "system",
"value": "Put the color black for the canvas border\n"
},
{
"from": "human",
"value": "(function ()\n{\n\t'use strict';\n\tangular\n\t\t.module('PLMApp')\n\t\t.factory('BaseballSecondView', BaseballSecondView);\n\n\tfunction BaseballSecondView()\n\t{\n\t\tvar ctx;\n\t\tvar ca... | javascript | chosen |
[
{
"from": "system",
"value": "Sort posts by submitted timestamp.\n\nchapter7-8\n"
},
{
"from": "human",
"value": "Template.postsList.helpers({\n posts: function() {\n return Posts.find();\n }\n});"
},
{
"from": "gpt",
"value": "Template.postsList.helpers({\n posts: function() {... | javascript | chosen |
[
{
"from": "system",
"value": "Improve to handle better all the possible cases\n\nAdd more fields that it will handle and doesn't break the JS"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name Anchor tags in Central\n// @namespace http://central.tri.be/\n// @version 0.1... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug where the pointer was being returned instead of the wrapped instance.\n"
},
{
"from": "human",
"value": "var core = require('./core')\n , id = require('./id')\n , classCache = {}\n\nvar proto = exports.proto = Object.create(id.proto);\n\nexports.getClass... | javascript | chosen |
[
{
"from": "system",
"value": "Update badge button inline styles"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst BadgeButton = ({label, url}) =>\n <a href={url} type=\"application/hal+json\">\n <span\n style={{\n fontSize: '0... | javascript | chosen |
[
{
"from": "system",
"value": "Make tests fail if jshint does not pass correctly\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar concat = require('gulp-concat');\nvar rename = require('gulp-rename');\nvar uglify = require('gulp-uglify');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Allow cross Domain on prod config\n"
},
{
"from": "human",
"value": "import webpack from 'webpack';\nimport compression from 'compression';\n\nconst config = require('../../webpack/webpack.config.babel');\nconst compiler = webpack(config);\n\nconst bundleStart = Dat... | javascript | chosen |
[
{
"from": "system",
"value": "Write sourcemaps to a separate file.\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n mocha = require('gulp-mocha'),\n eslint = require('gulp-eslint'),\n babel = require('gulp-babel'),\n sourcemaps = require('gulp-sourcemaps');\n\nrequire... | javascript | chosen |
[
{
"from": "system",
"value": "Rename gulp 'dist' target to 'release'.\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar rename = require('gulp-rename');\nvar browserify = require('browserify');\nvar source = require('vinyl-source-stream');\nvar buffer = require('vinyl-buffer');... | javascript | chosen |
[
{
"from": "system",
"value": "Add helvetica as a class using tachyons\n\nAs much as possible let's use the class that\ncomes with tachyons.\nThat way it will be more managable\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nclass Nav extends React.Component {\n componentDidMount... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for dropped language name\n"
},
{
"from": "human",
"value": "const test = require('tap').test;\nconst TextToSpeech = require('../../src/extensions/scratch3_text2speech/index.js');\n\nconst fakeStage = {\n textToSpeechLanguage: null\n};\n\nconst fakeRunti... | javascript | chosen |
[
{
"from": "system",
"value": "Set the version number for a new tag.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* Services */\n\n// Demonstrate how to register services\n// In this case it is a simple value service.\n\n// While this is here as a trivial example, I've been using it to\n/... | javascript | chosen |
[
{
"from": "system",
"value": "Allow --config and --rippled arguments\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar nconf = require('nconf');\n\n\n/** Load Configuration according to the following hierarchy \n * (where items higher on the list take precedence)\n *\n * 1. Co... | javascript | chosen |
[
{
"from": "system",
"value": "Change anchorLink (smooth-scroll) function to onJElementReady\n- use the anchor tag directly\n"
},
{
"from": "human",
"value": "Kwf.onContentReady(function linkTagIntern(el){\n var links = $(el).find('a');\n\n if(links && links.length) {\n $.each(links,... | javascript | chosen |
[
{
"from": "system",
"value": "Replace tag ids with display name\n\nThe ids for contributors, funders and publishers\nare used to filter the search results page. However,\nthe tag that gets displayed should show the name of\nthe contributor/funder/publisher instead of the id\nused for filtering.\n\nMake a re... | javascript | chosen |
[
{
"from": "system",
"value": "Update testing harness to support *.ts files.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\n\nconst runInlineTest = require('jscodeshift/dist/testUtils').runInlineTest;\nconst EmberQUnitTransform = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove method that maintain’s scroll parity\n\nSince we don’t anticipate placeholder textboxes ever scrolling in the future,\nthis can be removed.\n"
},
{
"from": "human",
"value": "(function(Modules) {\n \"use strict\";\n\n if (\n !('oninput' in document.creat... | javascript | chosen |
[
{
"from": "system",
"value": "Disable estimate warning for locked accounts\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { FormattedNumber } from 'react-intl';\n\nimport { makeSelectInjected } fr... | javascript | chosen |
[
{
"from": "system",
"value": "Enable rtl for proper localizations\n"
},
{
"from": "human",
"value": "/* Hebrew translation for the jQuery Timepicker Addon */\n/* Written by Lior Lapid */\n(function($) {\n\t$.timepicker.regional[\"he\"] = {\n\t\ttimeOnlyTitle: \"בחירת זמן\",\n\t\ttimeText: \"שעה\... | javascript | chosen |
[
{
"from": "system",
"value": "Include show page, add, and delete routes\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst app = express();\nconst bodyParser = require('body-parser');\nconst methodOverride = require('method-override');\n\napp.set('view engine', 'pug');... | javascript | chosen |
[
{
"from": "system",
"value": "Attach mouse coordinate update to \"mousemove\" event\n"
},
{
"from": "human",
"value": "var GameInputFactory = function (canvas) {\n\n var pressedKeys = {};\n var mousePos = {};\n\n function setKey(event, status) {\n var code = event.keyCode;\n var key;\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Change if...else statement to switch for better code organization\n"
},
{
"from": "human",
"value": "(function () {\n angular\n .module(\"ng-geocoder\")\n .factory(\"ngGeocoderService\", ngGeocoderService);\n\n ngGeocoderService.$inject = [\"$q\"];\n\n func... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error causing PhantomJS to eat RAM\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/java... | javascript | chosen |
[
{
"from": "system",
"value": "Set site id for production and staging environments\n"
},
{
"from": "human",
"value": "define(['piwik'], function(){\n\n var _paq = _paq || [];\n _paq.push([\"trackPageView\"]);\n _paq.push([\"enableLinkTracking\"]);\n \n (function() {\n var u=\"http://estati... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with turbolinks and foundation\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/ja... | javascript | chosen |
[
{
"from": "system",
"value": "Add bootstrap-sprockets require to app.js.\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/... | javascript | chosen |
[
{
"from": "system",
"value": "[fixed] Tag helper code should have used jqLite API.\n"
},
{
"from": "human",
"value": "/* global angular */\n(function() {\n angular.module(\"googlechart\")\n .factory(\"agcScriptTagHelper\", agcScriptTagHelperFactory);\n\n agcScriptTagHelperFactory.$i... | javascript | chosen |
[
{
"from": "system",
"value": "ExpandURL: Move to group 'base' and enable \"More at ...\"\n"
},
{
"from": "human",
"value": "(function(env){ \n env.ddg_spice_expand_url = function(api_response) {\n \"use strict\";\n\n // Get the orignal query.\n var query = DDG.get_quer... | javascript | chosen |
[
{
"from": "system",
"value": "Change comment for server blueprint to include correct information\n\nThe comments stated that one has to create js files in\n`server/routes` when the script actually includes all files from\n`server/mocks` with 'mocks' being the correct wording.\n"
},
{
"from": "human"... | javascript | chosen |
[
{
"from": "system",
"value": "Use -dev seed everywhere for now\n"
},
{
"from": "human",
"value": "const config = require('./src/utils/config');\n\nconst COMMON_ENV = {\n ...config.db,\n\n // Use a single connection to execute migrations.\n pool: {\n min: 1,\n max: 1,\n },\n migrations... | javascript | chosen |
[
{
"from": "system",
"value": "Remove style that was breaking deployment\n"
},
{
"from": "human",
"value": "import 'select2';\nimport 'select2/dist/css/select2.css';\nimport 'select2-bootstrap-theme/dist/select2-bootstrap.css';\n\nTemplate.newActivity.created = function () {\n this.subscribe('al... | javascript | chosen |
[
{
"from": "system",
"value": "Include phones in default org object\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\n\nimport { fetchOrganization } from '../../core/firebaseRestAPI'\nimport { authenticate } from '../../lib/session'\nimport { uuid } from '../../lib/uuid... | javascript | chosen |
[
{
"from": "system",
"value": "Fix multiple players score page\n"
},
{
"from": "human",
"value": "class ScoreController {\n constructor($scope, $state, $window, SocketService, VibrateService) {\n 'ngInject';\n\n this.$window = $window;\n this.$state = $state;\n this.SocketService = S... | javascript | chosen |
[
{
"from": "system",
"value": "Add raw option (even if ignored by esprima 1.1.x)\n"
},
{
"from": "human",
"value": "/**\n * power-assert - Empower your assertions\n *\n * https://github.com/twada/power-assert\n *\n * Copyright (c) 2013-2014 Takuto Wada\n * Licensed under the MIT license.\n * ht... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for expense_account reports.\n"
},
{
"from": "human",
"value": "\nangular.module('gnucash-reports-view.reports.category', ['gnucash-reports-view.reports.base',\n 'nvd3'])\n .config(['ReportsMana... | javascript | chosen |
[
{
"from": "system",
"value": "Change conditional rendering and this bindings\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport FeedbackLink from '../components/FeedbackLink.js'\n\nclass FeedbackSection extends React.Component {\n constructor(props) {\n super(props)\n th... | javascript | chosen |
[
{
"from": "system",
"value": "Rename `subProcess` to `subprocess` missing parts\n\n"
},
{
"from": "human",
"value": "//TODO we might need to filter on the language, but for now english seems to be\n//the only language available\n/**\n * Builds the query that retrieve the GSBPM overlook\n */\ncon... | javascript | chosen |
[
{
"from": "system",
"value": "Remove 3rd coord in JS WKT serializer\n\nConflicts:\n\n\tmapentity/static/mapentity/Leaflet.label\n"
},
{
"from": "human",
"value": "L.Util.getWKT = function(layer) {\n coord2str = function (obj) {\n if(obj.lng) return obj.lng + ' ' + obj.lat + ' 0.0';\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use links to load the css files\n"
},
{
"from": "human",
"value": "command: 'echo \"\"',\nrefreshFrequency: 3600000,\n\nstyle: [\n\t'@import \"/common/base.css\"',\n\t'@import \"/common/fira/fira.css\"',\n].join('\\n'),\n\nrender: function(output) {\n\treturn ''\n},... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug with setVersion and setPlatform\n\nI noticed that the platform wasn't being set when running the app and that version was only being set in the snowflake.js by calling set instead of dispatch."
},
{
"from": "human",
"value": "/**\n * # authReducer.js\n * \... | javascript | chosen |
[
{
"from": "system",
"value": "Add m2ts video container support\n"
},
{
"from": "human",
"value": "const mediaExtensions = {\n audio: [\n '.aac', '.aif', '.aiff', '.asf', '.dff', '.dsf', '.flac', '.m2a',\n '.m2a', '.m4a', '.mpc', '.m4b', '.mka', '.mp2', '.mp3', '.mpc', '.oga',\n '.ogg',... | javascript | chosen |
[
{
"from": "system",
"value": "Change the backend homepage title.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\nrouter.get('/', function(req, res, next) {\n res.json({ appName: 'Highpine REST API v1' });\n});\n\nmodule.exports = router;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use tabIndex instead of tabindex\n\nSummary:\nThere is a little bit of dogscience here, but I believe JSX is wanting\n`tabIndex` instead of `tabindex`. We have `tabindex` as an attribute in\nour Algolia search; changing it to `tabIndex` removes the warning.\n\n**Before**\n\n<im... | javascript | chosen |
[
{
"from": "system",
"value": "Add stat update packet code\n"
},
{
"from": "human",
"value": "module.exports = {\n // Packet constants\n PLAYER_START: \"1\",\n PLAYER_ADD: \"2\",\n PLAYER_ANGLE: \"2\",\n PLAYER_UPDATE: \"3\",\n PLAYER_ATTACK :\"4\",\n LEADERBOAD: \"5\",\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove fin API object from article window\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport * as PropTypes from 'prop-types';\n\nimport styles from './NewsItem.module.css';\n\nconst handleNewsItemClick = (link) => {\n const winOption = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make prices data optional in funds row component\n"
},
{
"from": "human",
"value": "import React, { useState, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nimport { gainShape } from '~client/prop-types/page... | javascript | chosen |
[
{
"from": "system",
"value": "Fix quotes in test description for linting\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { module, test } from 'qunit';\nimport startApp from '../helpers/start-app';\n\nconst { run } = Ember;\n\nlet application;\n\nfunction getCssProperty(ele... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional matchers to test to assert text output\n"
},
{
"from": "human",
"value": "import { test } from 'qunit';\nimport moduleForAcceptance from '../../tests/helpers/module-for-acceptance';\n\nmoduleForAcceptance('Acceptance | application');\n\ntest('enabled ... | javascript | chosen |
[
{
"from": "system",
"value": "Add loading todos via `/graphql` query\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n console.log('There is jQuery');\n});"
},
{
"from": "gpt",
"value": "var loadTodos = function() {\n $.ajax({\n url: \"/graphql?query={todoList{... | javascript | chosen |
[
{
"from": "system",
"value": "Fix extension path of apollo-client-devtools in packaged app\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport { BrowserWindow } from 'electron';\n\nexport default async () => {\n if (process.env.NODE_ENV === 'development') {\n const installer ... | javascript | chosen |
[
{
"from": "system",
"value": "Add name variable and JSDoc header for the job template\n"
},
{
"from": "human",
"value": "module.exports = function(config, dependencies, job_callback) {\n var text = \"Hello World!\";\n\n // first parameter is error (if any). Second parameter is the job resu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in test description"
},
{
"from": "human",
"value": "\"use strict\";\nconst { assert } = require(\"chai\");\nconst { describe, it } = require(\"mocha-sugar-free\");\n\nconst { JSDOM, VirtualConsole } = require(\"../..\");\n\ndescribe(\"API: virtual console ... | javascript | chosen |
[
{
"from": "system",
"value": "Convert performance example to bare minimum phaser 3 game to suppress build errors\n"
},
{
"from": "human",
"value": "// Phaser 2 wasn't intended to be used with npm modules. See webpack config for how these libs are\n// exposed. These need to be imported here so th... | javascript | chosen |
[
{
"from": "system",
"value": "Update up to changes in es5-ext\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar toUint = require('es5-ext/number/to-uint')\n , maxValue = require('./max-value');\n\nmodule.exports = function (value) {\n\tvalue = toUint(value);\n\tif (value > maxValue) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Handle missing source maps in a safer fashion\n"
},
{
"from": "human",
"value": "import {Instrumenter} from 'istanbul';\nimport convertSourceMap from 'convert-source-map';\n\n// Customized from istanbul-instrument-loader to support\n// source maps properly.\nmodule.... | javascript | chosen |
[
{
"from": "system",
"value": "Update client out from appointmentItem\n"
},
{
"from": "human",
"value": "var Mystique = require('mystique');\n\nvar AppointmentItemTransformer = Mystique.Transformer.extend({\n resourceName: 'appointmentItem',\n mapOut: function(appointmentItem) {\n return {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Update Pretender version to ~0.10.1\n\nChanges from version 0.9 include better synchronous xhr support, some fixes for content-type header and event firing on `passthrough`'d requests, better error messages.\r\n\r\nSee the changes from Pretender 0.10.0 -> 0.10.1 [here](https://... | javascript | chosen |
[
{
"from": "system",
"value": "Add start-maximized to chrome options\n"
},
{
"from": "human",
"value": "module.exports = {\n baseURL: 'http://localhost:9000',\n browser: 'chrome',\n driverCapabilities: {\n \"chromeOptions\": {\n \"binary\": \"/Applications/Google Chrome... | javascript | chosen |
[
{
"from": "system",
"value": "Remove analysis if it does not complete in 12hrs\n"
},
{
"from": "human",
"value": "(function(){\n\n angular\n .module('linguine.analysis')\n .controller('AnalysisIndexController', AnalysisIndexController);\n\n function AnalysisIndexController ($scope, $http... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust javascript for updated html structure\n"
},
{
"from": "human",
"value": "var loadTodos = function() {\n $.ajax({\n url: \"/graphql?query={todoList{id,text,done}}\",\n context: document.body\n }).done(function(data) {\n console.log(data);\n var d... | javascript | chosen |
[
{
"from": "system",
"value": "Apply Buble to build locale\n"
},
{
"from": "human",
"value": "import fs from 'fs'\nimport path from 'path'\nimport {rollup} from 'rollup'\nimport uglify from 'rollup-plugin-uglify'\nimport chalk from 'chalk'\n\nasync function build () {\n console.log(chalk.cyan('B... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests to match ember-test-helpers 0.3.0.\n"
},
{
"from": "human",
"value": "import { describeModule, it } from 'ember-mocha';\nimport { setResolverRegistry } from 'tests/test-support/resolver';\n\nwindow.expect = chai.expect;\n\nfunction setupRegistry() {\n set... | javascript | chosen |
[
{
"from": "system",
"value": "Fix scoping of dollar symbol and only change icon of selected item on publish/unpublish\n"
},
{
"from": "human",
"value": "var $ = django.jQuery;\n$(function() {\n $('input:checkbox.publish-checkbox').change(function() {\n if ($(this).is(':checked')) {\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Save file name as hash to avoid errors\n"
},
{
"from": "human",
"value": "const { ALLOWED_CSV_FIELD_PATHS } = require('./constants')\n\nconst getAllowedCSVFieldPaths = fieldPaths => {\n const allowed = fieldPaths.reduce((agg, x) => (\n ALLOWED_CSV_FIELD_PATHS.in... | javascript | chosen |
[
{
"from": "system",
"value": "Add pointerLock() custom element support.\n\nIncrease readability.\n"
},
{
"from": "human",
"value": "import THREE from 'three';\n\nexport default function pointerLock( controls ) {\n const hasPointerLock = 'pointerLockElement' in document ||\n 'mozPointerLockEl... | javascript | chosen |
[
{
"from": "system",
"value": "Change login request to post\n"
},
{
"from": "human",
"value": "const LOGIN_URL = '/login'\n\nexport const USER_LOGIN_FAIL = 'USER_LOGIN_FAIL';\nexport const USER_LOGIN_SUCCESS = 'USER_LOGIN_SUCCESS';\nexport const USER_LOGOUT = 'USER_LOGOUT';\n\nlet userLogInSucces... | javascript | chosen |
[
{
"from": "system",
"value": "Convert dashed itemKeys to camel cased\n"
},
{
"from": "human",
"value": "export default class ComponentExtensionItemSelectorToMembers {\n itemSelectorToMembers() {\n\n let selector = this.options.itemSelector || '[data-js-item]';\n let domItemsInSu... | javascript | chosen |
[
{
"from": "system",
"value": "Add inline style for header image component"
},
{
"from": "human",
"value": "import React from 'react';\n \nclass HeaderImg extends React.Component {\n render() {\n return (\n <div className=\"header-img\">\n <img className=\"imgix-fluid\" data-src=\... | javascript | chosen |
[
{
"from": "system",
"value": "Return Postcode.find's callback to prevent next being called twice\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst ScottishPostcode = require(\"../models/scottish_postcode\");\nconst Postcode = require(\"../models/postcode\");\nconst Pc = require(\"postc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix routing to /bolt to / in tests\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('Routing', function () {\n var $route;\n beforeEach(module('bolt'));\n\n beforeEach(inject(function ($injector) {\n $route = $injector.get('$route');\n }));\n\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Use const instead of var\n"
},
{
"from": "human",
"value": "var EnhancedPullRequest = {\n _callbacks: [],\n\n /**\n * Loads the given callback and registers it to reload on pjax requests.\n *\n * @param {Function} callback - function to execute\n */\n loa... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Only ask for public privileges\"\n\nThis reverts commit 47b95cb58a00364fd3146c10e12ba4b93ed45f60.\n"
},
{
"from": "human",
"value": "import * as ACTION_TYPES from '../constants/action_types'\n\nfunction extractToken(hash, oldToken) {\n const match = hash.m... | javascript | chosen |
[
{
"from": "system",
"value": "Set node env + strip our CLI arguments\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst chalk = require(\"chalk\");\nconst cli = require(\"../cli/cli\");\n\nconsole.log(``);\nconsole.log(`${chalk.black(chalk.bgYellow(\" ~~~~~~~~~~ \"))}`);\nconsole.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove import of non-existent module\n"
},
{
"from": "human",
"value": "import { observable, action, runInAction } from 'mobx'\nimport axios from 'axios'\nimport OrderModel from '../models/OrderModel';\n\nclass AppState {\n @observable authenticated = false;\n @ob... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.