conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Revert \"Quick patch to constantly update currently playing song without requiring user interaction\"\n" }, { "from": "human", "value": "/** ngInject **/\nfunction StationListCtrl($scope, $interval, EventBus, PvlService) {\n let vm = this;\n\n vm.imgUrls = {};\n ...
javascript
chosen
[ { "from": "system", "value": "Remove code that did not fix google search pagination issue.\n" }, { "from": "human", "value": "google.load('search', '1', {style : google.loader.themes.V2_DEFAULT});\ngoogle.setOnLoadCallback(function() {\n var customSearchOptions = {};\n var customSearchCont...
javascript
chosen
[ { "from": "system", "value": "Store windows lib in different repo\n" }, { "from": "human", "value": "var download = require('./download').download;\nvar path = require('path');\nvar fs = require('fs');\n\nvar TAR_URL = 'https://github.com/nteract/zmq-prebuilt/releases/download/win-libzmq-4.1.5-v...
javascript
chosen
[ { "from": "system", "value": "Fix iOS and Android touch events\n" }, { "from": "human", "value": "/* OutsideClickable only accepts one top-level child */\nimport React, { Component, Children, cloneElement } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport PropTypes from \"prop-types\...
javascript
chosen
[ { "from": "system", "value": "[Chore] Add ESLint config to preferences\n" }, { "from": "human", "value": "pref(\"extensions.rspamd-spamness.header\", \"x-spamd-result\");\npref(\"extensions.rspamd-spamness.display.column\", 0);\npref(\"extensions.rspamd-spamness.display.messageScore\", true);\np...
javascript
chosen
[ { "from": "system", "value": "[UPDATE] Return Toggle Todo Object Assign\n" }, { "from": "human", "value": "/*\n * Avoiding Object Mutations.\n *\n * @author: Francisco Maria Calisto\n *\n */\n\nconst toggleTodo = (todo) => {\n\n return {\n\n id: todo.id,\n text: todo.text,\n ...
javascript
chosen
[ { "from": "system", "value": "Fix PluginRegistry error (missing global.require)\n" }, { "from": "human", "value": "// @flow\nimport path from 'path';\nimport PluginRegistory from '../../src/services/plugin-registory'\n\ndescribe('PluginRegistory', () => {\n it('exporting: PluginFeatures', () ...
javascript
chosen
[ { "from": "system", "value": "Check for the entry kind\n" }, { "from": "human", "value": "const fs = require('fs');\nconst process = require('process');\nconst assert = require('assert');\nconst buffer = fs.readFileSync(process.argv[2]);\n\nlet m = new WebAssembly.Module(buffer);\nlet list = Web...
javascript
chosen
[ { "from": "system", "value": "Add element to defaultProps and assign 'a' to it\n" }, { "from": "human", "value": "import React, { Fragment, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nclass Link extends Pur...
javascript
chosen
[ { "from": "system", "value": "Use `babel-compiler` 7.x for compatibility with Meteor 1.6.1\n" }, { "from": "human", "value": "Package.describe({\n name: 'svelte:core',\n version: '1.40.1_1',\n summary: 'Svelte compiler core',\n git: 'https://github.com/meteor-svelte/meteor-svelte.git'\n});\n...
javascript
chosen
[ { "from": "system", "value": "Check for missing config file name\n\n" }, { "from": "human", "value": "\n'use strict';\n\nconst path = require('path');\n\nmodule.exports = (() => {\n // const akasha = require('../index');\n const Command = require('cmnd').Command;\n \n class CopyAsset...
javascript
chosen
[ { "from": "system", "value": "Make the tests more reader friendly\n" }, { "from": "human", "value": "var testCase = require('nodeunit').testCase,\n\tparser = require('../language/parser'),\n\ttokenizer = require('../language/tokenizer')\n\ntest('TextLiteral', '\"hello world\"', static(\"hello wo...
javascript
chosen
[ { "from": "system", "value": "Make less use async mode in the browser\n\nThis makes less use async mode in the browser. We were already doing\nthis for our less requests, but now we also set it before less executes,\n\t otherwise it tries to do some weird display: none stuff. Fixes https://github.com/donej...
javascript
chosen
[ { "from": "system", "value": ":unamused: Clean up old test assertions\n" }, { "from": "human", "value": "import test from 'ava';\nimport plugin from '../lib/forms';\n\nconst formResponse = {\n body: {\n 'service-name': 'Foo Service One',\n 'service-desciption': 'Foo service lorem ipsum de...
javascript
chosen
[ { "from": "system", "value": "Build a common mixin method.\n" }, { "from": "human", "value": "var path = require('path');\nvar fs = require('fs');\nvar _ = require('underscore');\nvar debug = require('debug')('carcass:Index');\n\nmodule.exports = function(obj) {\n\n // Register every file in ...
javascript
chosen
[ { "from": "system", "value": "[test] Update tests to use optional options API\n" }, { "from": "human", "value": "/*\n * literal-test.js: Tests for the nconf literal store.\n *\n * (C) 2011, Charlie Robbins\n *\n */\n\nvar vows = require('vows'),\n assert = require('assert'),\n helpers = re...
javascript
chosen
[ { "from": "system", "value": "Fix bug: if the reds subscriber quit, members who still in the room cannot receive the messages.\n" }, { "from": "human", "value": "import SocketIO from 'socket.io';\nimport { createClient } from 'redis';\n\nimport { redisUrl } from './config';\n\nconst io = SocketI...
javascript
chosen
[ { "from": "system", "value": "Add RTDB flush method using platform SDK methods.\n" }, { "from": "human", "value": "\n\nexport async function onDocumentReady() {\n\n //[START rtdb_emulator_connect]\n let firebaseConfig = {\n // Point to the RTDB emulator running on localhost.\n // Here we...
javascript
chosen
[ { "from": "system", "value": "Fix bug where supersamples would not run without a supersamples.opt file\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\nvar cjson = require('cjson');\nvar _ = require('lodash');\n\nvar data = null;\n\nvar OPTS_FILE =...
javascript
chosen
[ { "from": "system", "value": "Fix error in some situations with iframes\n\nWhen using popper in an iframe, if the elements are created in the code's global context and added to the iframe, exceptions are thrown because prototypeOf does not accurately assess which nodes are Elements or HTMLElements.\r\n\r\nT...
javascript
chosen
[ { "from": "system", "value": "Use new service. Implement getRepos\n" }, { "from": "human", "value": "// app.menuCategoriesController.js\n\n(function() {\n \"use strict\";\n\n angular.module(\"MenuCategoriesApp\")\n .controller(\"MenuCategoriesController\", MenuCategoriesController);\n\n Me...
javascript
chosen
[ { "from": "system", "value": "Fix FK nullability on interaction table\n" }, { "from": "human", "value": "'use strict';\nmodule.exports = {\n up: (queryInterface, Sequelize) => {\n return queryInterface.createTable('DiscordInteractions', {\n id: {\n primaryKey: true,\n type...
javascript
chosen
[ { "from": "system", "value": "Make things gray and black so it doesn't kill my\u0010 browser\n" }, { "from": "human", "value": "function hallwayType1(length) {\n var space = new THREE.Group();\n space.add(makeArrowHelper(0,0,0,0,1,0));\n // Lighting\n for (var i = -length/2; i <= length/2; i...
javascript
chosen
[ { "from": "system", "value": "Add back customer list payment methods\n" }, { "from": "human", "value": "'use strict';\n\nvar FusebillResource = require('../FusebillResource');\nvar utils = require('../utils');\nvar fusebillMethod = FusebillResource.method;\n\nmodule.exports = FusebillResource.ex...
javascript
chosen
[ { "from": "system", "value": "Add css classes for heading levels.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar TextView = require('../text/text_view');\n\n// Substance.Heading.View\n// ==========================================================================\n\nvar HeadingView = fu...
javascript
chosen
[ { "from": "system", "value": "Move our router object to the Reitti namespace.\n" }, { "from": "human", "value": "\"use strict\";\n\nrequire.config({\n shim: {\n backbone: {\n deps: ['underscore', 'jquery'],\n exports: 'Backbone'\n },\n underscore: {\n exports: '_'\n }...
javascript
chosen
[ { "from": "system", "value": "Add detail to exclusion reasoning\n" }, { "from": "human", "value": "exports.files = {\n javascripts: {\n joinTo: {\n 'fateOfAllFools.js': /^(?!test)/\n }\n },\n stylesheets: {\n joinTo: 'fateOfAllFools.css'\n }\n};\n\n// Tests are handled by Karma...
javascript
chosen
[ { "from": "system", "value": "Remove dependency on JQuery for binding/triggering hashchange/pushstate events\n" }, { "from": "human", "value": "/**\n * model/fancy/location.js\n */\n\nfunction changePathGen (method) {\n return function changePath(path) {\n root.history[method + 'State'...
javascript
chosen
[ { "from": "system", "value": "Remove trailing slash in GitLab url\n\nSigned-off-by: kfei <1da1ad03e627cea4baf20871022464fcc6a4b2c4@kfei.net>\n" }, { "from": "human", "value": "app\n\n.factory(\"gitlab\",\n [\"$http\", \"$q\", \"Config\",\n function($http, $q, Config) {\n\n funct...
javascript
chosen
[ { "from": "system", "value": "Fix ember data \"fetchById\" deprecation\n" }, { "from": "human", "value": "import IdProxy from '../utils/idproxy';\nimport ProjectedModelRoute from '../routes/base/projected-model-route';\n\nexport default ProjectedModelRoute.extend({\n model: function(params, tra...
javascript
chosen
[ { "from": "system", "value": "Update test: Adjust assertions to removal of cardinality checks\n" }, { "from": "human", "value": "var vCard = require( '..' )\nvar fs = require( 'fs' )\nvar assert = require( 'assert' )\n\nsuite( 'vCard', function() {\n \n suite( 'Character Sets', function() {\n ...
javascript
chosen
[ { "from": "system", "value": ":white_check_mark: Test for inclusion of icon data.\n" }, { "from": "human", "value": "const minecraftItems = require('../')\nconst tap = require('tap')\n\nconst testItem = (test, item, name) => {\n test.type(item, 'object')\n test.equal(item.name, name)\n test.e...
javascript
chosen
[ { "from": "system", "value": "Change the template for account linking\n" }, { "from": "human", "value": "// import { getDocument } from './lib/couchdb';\n// getDocument('3cfc9a96341c0e24')\n// .then(d => console.log(d))\n// .catch(d => console.log(d))\n\nexport default (bot) => {\n return a...
javascript
chosen
[ { "from": "system", "value": "Sort subscription list by date\n" }, { "from": "human", "value": "define([\n 'backbone', 'handlebars', 'moment',\n 'connect/collections/Subscriptions',\n 'connect/views/SubscriptionListItemView',\n 'text!connect/templates/subscriptionList.handlebars'\n], functio...
javascript
chosen
[ { "from": "system", "value": "Remove duplicate test, fix duplicate test\n" }, { "from": "human", "value": "import transformCss from '../..'\n\nit('textShadow with all values', () => {\n expect(transformCss([['text-shadow', '10px 20px 30px red']])).toEqual({\n textShadowOffset: { width: 10, h...
javascript
chosen
[ { "from": "system", "value": "Add minor note about future changes\n" }, { "from": "human", "value": "// @flow\n\nimport { expect } from \"chai\";\n\nimport {\n\tGame,\n\tGameDescriptor,\n\tDefaultDeck\n} from \"stormtide-core\";\n\nimport type {\n\tPlayerDescriptor\n} from \"stormtide-core\";\n\...
javascript
chosen
[ { "from": "system", "value": "Remove obsolete paragraph from ObjectController comments\n" }, { "from": "human", "value": "require('ember-runtime/system/object_proxy');\nrequire('ember-runtime/controllers/controller');\n\n/**\n@module ember\n@submodule ember-runtime\n*/\n\n/**\n `Ember.ObjectCon...
javascript
chosen
[ { "from": "system", "value": "Use inventory class instead of plain object\n" }, { "from": "human", "value": "import Phaser from 'phaser';\n\nimport frames from '../../sprite-frames';\n\nimport update from './update';\n\nexport default class extends Phaser.Sprite {\n constructor({ game, x, y }) ...
javascript
chosen
[ { "from": "system", "value": "Update NavLinks: use gatsby-link to avoid code chunks necessary for pages not being loaded.\n" }, { "from": "human", "value": "import React from 'react'\nimport { NavLink } from 'react-router-dom'\n\nimport styles from './navigation.module.styl'\n\nexport default ({...
javascript
chosen
[ { "from": "system", "value": "Use the recommended config from ember-template-lint.\n" }, { "from": "human", "value": "/* jshint node:true */\n'use strict';\n\nmodule.exports = {\n 'bare-strings': true,\n 'block-indentation': 2,\n 'html-comments': true,\n 'nested-interactive': true,\n 'lint-...
javascript
chosen
[ { "from": "system", "value": "Use typeof for checking globals.\n" }, { "from": "human", "value": "module.exports = WebSocket || MozWebSocket || window.WebSocket || window.MozWebSocket\n" }, { "from": "gpt", "value": "\nvar ws = null\n\nif (typeof WebSocket !== 'undefined') {\n ws = ...
javascript
chosen
[ { "from": "system", "value": "Correct encoding for key import\n\nThe armor was getting mashed on transmission\n" }, { "from": "human", "value": "var KeyImporterController = function() {\n\t\n\tthis.sendArmor = function() {\n\t\tarmorContainer = $('#import-armor');\n\t\tdata = \"armor=\"+armorCon...
javascript
chosen
[ { "from": "system", "value": "Remove sessions from seasionType model\n\nNo longer part of the API\n" }, { "from": "human", "value": "import DS from 'ember-data';\n\nexport default DS.Model.extend({\n title: DS.attr('string'),\n sessionTypeCssClass: DS.attr('string'),\n assessment: DS.attr('bo...
javascript
chosen
[ { "from": "system", "value": "Improve output message and lint\n" }, { "from": "human", "value": "require('./check-versions')();\n\nvar config = require('../config');\nif (!process.env.NODE_ENV) {\n process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV);\n}\n\nvar webpack = require('webpack'...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded check if there is a server\n" }, { "from": "human", "value": "\"use strict\";\n\n// Serves the imprint for the application\n\nmodule.exports = 'controllers/imprint';\nvar dependencies = [];\n\nangular.module(module.exports, dependencies)\n .contro...
javascript
chosen
[ { "from": "system", "value": "Change JS parser to only look for 200 success code not the actual \"OK\".\n\nOddly, in production, Chrome returns request.status as 'parsererror'\nrather than \"OK\", which is what we get when running against a dev server.\nThe 'parseerror' is actually fairly reasonable -- we s...
javascript
chosen
[ { "from": "system", "value": "Support Both js and jsx or ts and tsx\n\n" }, { "from": "human", "value": "module.exports = {\n stories: ['../stories/**/*.stories.js'],\n addons: ['@storybook/addon-actions', '@storybook/addon-links'],\n};\n" }, { "from": "gpt", "value": "module.expor...
javascript
chosen
[ { "from": "system", "value": "Fix typo on error handling conditional\n" }, { "from": "human", "value": "// Parse CloudCode\nParse.Cloud.beforeSave(Parse.Installation, function(request, response) {\n Parse.Cloud.useMasterKey();\n \n var androidId = request.object.get(\"androidId\");\n if (andr...
javascript
chosen
[ { "from": "system", "value": "Fix a bug which causes that JPEG lossless images cannot be decompressed in Safari\n" }, { "from": "human", "value": "\"use strict\";\n(function (cornerstoneWADOImageLoader) {\n\n function decodeJPEGLossless(imageFrame, pixelData) {\n // check to make sure codec ...
javascript
chosen
[ { "from": "system", "value": "web: Fix script directory that's passed to locateFile\n" }, { "from": "human", "value": "var TreeSitter = function() {\n var initPromise;\n class Parser {\n constructor() {\n this.initialize();\n }\n\n initialize() {\n throw new Error(\"cannot c...
javascript
chosen
[ { "from": "system", "value": "Set metadata as UI title only when someone changes it\n" }, { "from": "human", "value": "'use strict';\n\n/*global Wodo*/\n\nangular.module('manticoreApp')\n.controller('TitleEditorCtrl', function ($scope, $timeout) {\n function handleTitleChanged(changes) {\n ...
javascript
chosen
[ { "from": "system", "value": "Update coding styles in webpack loaders\n" }, { "from": "human", "value": "function extsToRegExp (exts) {\n\t return new RegExp('\\\\.(' + exts.map(function (ext) {\n\t\t return ext.replace(/\\./g, '\\\\.')\n\t}).join('|') + ')(\\\\?.*)?$')\n}\n\nm...
javascript
chosen
[ { "from": "system", "value": "Remove change fn from nestedMenuCollection\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.relation').directive('nestedMenuCollection', function() {\n return {\n restrict: 'A',\n replace: 'true',\n scope: {\n current: '=...
javascript
chosen
[ { "from": "system", "value": "Add notifications for comment create processing [WAL-1036].\n" }, { "from": "human", "value": "import template from './issue-comments-form.html';\n\nclass IssueCommentsFormController {\n // @ngInject\n constructor($rootScope, issueCommentsService) {\n this.$roo...
javascript
chosen
[ { "from": "system", "value": "Repair removed figshare checks for action buttons\n" }, { "from": "human", "value": "var m = require('mithril');\n\nvar Fangorn = require('fangorn');\n\n\n// Although this is empty it should stay here. Fangorn is going to look for figshare in it's config file. \nFan...
javascript
chosen
[ { "from": "system", "value": "Improve fetchOne to only return 1 result\n\nInspired by meteor's findOne" }, { "from": "human", "value": "import createGraph from './lib/createGraph.js';\nimport prepareForProcess from './lib/prepareForProcess.js';\nimport hypernova from './hypernova/hypernova.js';\...
javascript
chosen
[ { "from": "system", "value": "Use new Account model to create admin user\n" }, { "from": "human", "value": "'use strict';\nvar installed=true;\nmodule.exports = function (app) {\n if (!installed) {\n var User = app.models.User;\n var Role = app.models.Role;\n var RoleMapp...
javascript
chosen
[ { "from": "system", "value": "Add function body around ref assignment\n" }, { "from": "human", "value": "import md from 'components/md'\n\nconst Refs = () => md`\n ## Refs\n\n Passing a \\`ref\\` prop to a styled component will give you an instance of\n the \\`StyledComponent\\` wrapper, but ...
javascript
chosen
[ { "from": "system", "value": "Fix error update widget action\n" }, { "from": "human", "value": "import { createAction } from './create-action'\nimport * as t from '../action-types'\n\nimport AuthSelectors from '~authenticate/redux/selectors'\nimport Selectors from '../selectors'\n\nexport defaul...
javascript
chosen
[ { "from": "system", "value": "Remove duplicate draft saving features at Location Entries Creation\n" }, { "from": "human", "value": "var ui = require('tresdb-ui');\nvar emitter = require('component-emitter');\nvar template = require('./template.ejs');\nvar FormView = require('../../../Entry/Form...
javascript
chosen
[ { "from": "system", "value": "Add spec for reject by index\n" }, { "from": "human", "value": "import { expect } from 'chai';\nimport u from '../lib';\n\ndescribe('u.reject', () => {\n it('freezes the result', () => {\n expect(Object.isFrozen(u.reject('a', []))).to.be.true;\n });\n});\n" }...
javascript
chosen
[ { "from": "system", "value": "Migrate deprecated jest testUrl to testEnvironmentOptions.url\n" }, { "from": "human", "value": "// For a detailed explanation regarding each configuration property, visit:\n// https://jestjs.io/docs/en/configuration.html\n\nmodule.exports = {\n roots: [\"<rootDir>...
javascript
chosen
[ { "from": "system", "value": "Update dom methods to avoid illegal invocation error.\n" }, { "from": "human", "value": "const path = (props, obj) => {\n let nested = obj;\n const properties = typeof props === 'string' ? props.split('.') : props;\n\n for (let i = 0; i < properties.length; i++) ...
javascript
chosen
[ { "from": "system", "value": "Create a gulp test target\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar uglify = require('gulp-uglify');\nvar rename = require('gulp-rename');\nvar template = require('gulp-template');\n\nvar bower = requir...
javascript
chosen
[ { "from": "system", "value": "Remove invalid argument of channel.info method\n" }, { "from": "human", "value": ".import \"../applicationShared.js\" as Globals\n\nfunction workerOnMessage(messageObject) {\n if(messageObject.apiMethod === 'channels.history') {\n addMessagesToModel(messag...
javascript
chosen
[ { "from": "system", "value": "Use explicit targets for babel-preset-env\n\nThis reduces bundle size by 5 KiB.\n" }, { "from": "human", "value": "const babelifyConfig = {\n presets: [\n ['@babel/preset-env', {\n 'useBuiltIns': 'entry',\n }],\n ],\n extensions: '....
javascript
chosen
[ { "from": "system", "value": "Fix an occurence of 'chromium' that didn't get changed to 'chrome'\n\nReview URL: http://codereview.chromium.org/115049\n\ngit-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@15486 4ff67af0-8c30-449e-8e8b-ad334ec8d88c\n" }, { "from": "human", "value": "find();\r\n...
javascript
chosen
[ { "from": "system", "value": "Improve handling of large objects in pre-jekyll processes (cont'd)\n\nReduce grants arrays across all profiles. Goal is to reduce memory spikes when Jekyll attempts to sort the grants array during build time.\n" }, { "from": "human", "value": "/**\n * Splits the agg...
javascript
chosen
[ { "from": "system", "value": "Add support for otf fonts\n" }, { "from": "human", "value": "const path = require('path');\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\n\nmodule.exports = {\n entry: './app/src/app.js',\n output: {\n path: path.resolve(__dirname, 'build')...
javascript
chosen
[ { "from": "system", "value": "Set the default port to 3001 so it doesn't conflict with the default 3000 of express-rest-api-example.\n" }, { "from": "human", "value": "var compression = require(\"compression\");\nvar express = require(\"express\");\nvar handlebars = require(\"express-handle...
javascript
chosen
[ { "from": "system", "value": "Move splash screen farther afield on click.\n" }, { "from": "human", "value": "#pragma strict\n\nprivate var _gameManager : GameManager;\nprivate var _isTriggered = false;\n\nfunction Start() {\n _gameManager = GameManager.Instance();\n}\n\nfunction Update() {\n\n}...
javascript
chosen
[ { "from": "system", "value": "Tweak padding on summary text\n" }, { "from": "human", "value": "(function() {\n window.shared || (window.shared = {});\n var dom = window.shared.ReactHelpers.dom;\n var createEl = window.shared.ReactHelpers.createEl;\n var merge = window.shared.ReactHelpers.mer...
javascript
chosen
[ { "from": "system", "value": "BAP-8615: Modify frontend component to load proper filters for both enum and dictionary types\n" }, { "from": "human", "value": "define(function() {\n 'use strict';\n\n var moduleNameTemplate = 'oro/filter/{{type}}-filter';\n var types = {\n stri...
javascript
chosen
[ { "from": "system", "value": "Fix AMD and CommonJS were mixed up\n" }, { "from": "human", "value": "/**\n * Disproperty: Disposable properties.\n * Copyright (c) 2015 Vladislav Zarakovsky\n * MIT license https://github.com/vlazar/disproperty/blob/master/LICENSE\n */\n(function(root) {\n\n funct...
javascript
chosen
[ { "from": "system", "value": "Return model when finishing updating model\n" }, { "from": "human", "value": "var\n _ = require('underscore'),\n async = require('async'),\n curry = require('curry'),\n Dependency = require('../models').Dependency,\n compHelper = require...
javascript
chosen
[ { "from": "system", "value": "Fix rule number parameter check\n\nA parameter validation of rule number must be effective in preventing\nOS command execution.\n" }, { "from": "human", "value": "(function() {\n\t\n\tvar rule = data.rules[parseInt(request.param.num, 10)] || null;\n\t\n\tif (rule ==...
javascript
chosen
[ { "from": "human", "value": "Add JS class to html element\n" }, { "from": "gpt", "value": "/**\n * main.js\n *\n * Only runs in modern browsers via feature detection\n * Requires support for querySelector, classList and addEventListener\n */\n\nif('querySelector' in document && 'classList' in do...
javascript
chosen
[ { "from": "system", "value": "Disable sourcemaps in production, by default\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n\n 'browserPort' : 3000,\n 'UIPort' : 3001,\n 'serverPort' : 3002,\n\n 'styles': {\n 'src' : 'app/styles/**/*.scss',\n 'dest': 'bu...
javascript
chosen
[ { "from": "system", "value": "Allow async loading of sections\n" }, { "from": "human", "value": "import DS from \"ember-data\";\n\nexport default DS.Model.extend({\n page: DS.belongsTo('page'),\n section: DS.belongsTo('section'),\n sequence: DS.belongsTo('sequence'),\n title: DS.attr('string...
javascript
chosen
[ { "from": "system", "value": "Revert \"recieving store and sessions services\"\n\nThis reverts commit 185961492fca2d78bc8d8372c7d08aae08d2a166.\n" }, { "from": "human", "value": "import Engine from 'ember-engines/engine';\nimport Resolver from 'ember-resolver';\nimport loadInitializers from 'emb...
javascript
chosen
[ { "from": "system", "value": "Fix who can access reports state\n" }, { "from": "human", "value": "ReportsController.$inject = [ '$rootScope', 'TbUtils', 'reports' ];\n\nfunction ReportsController ($rootScope, TbUtils, reports) {\n\tvar vm = this;\n\n\tvm.reports = [\n\t\t{ title: 'Reporte de Cos...
javascript
chosen
[ { "from": "system", "value": "Fix using of `store` initializer\n\n`store` initializer was added to keep backwards compatibility since\nember-data 2.5.0\n" }, { "from": "human", "value": "import Syncer from '../syncer';\n\nexport function initialize(application) {\n application.register('syncer:...
javascript
chosen
[ { "from": "system", "value": "Implement Create a Campaign Model Setting Dynamically\n" }, { "from": "human", "value": "var configuration = require('../../../config/configuration.json')\nvar utility = require('../../../public/method/utility')\n\nmodule.exports = {\n setCampaignSettingModel: func...
javascript
chosen
[ { "from": "system", "value": "Test again when TestudocParser is recreated\n" }, { "from": "human", "value": "import gulp from 'gulp';\nimport {build} from './build';\nimport {test} from './test';\nimport {makeParser, fixParser} from './parse';\n\nconst allSrcGlob = [\n 'src/**/*.js',\n '!src/s...
javascript
chosen
[ { "from": "system", "value": "Fix JS task to be async. Should fix travis.\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\n\nvar config = require('./_config.js');\nvar paths = config.paths;\nvar $ = config.plugins;\n\nvar source = require('vinyl-source-stream');\n...
javascript
chosen
[ { "from": "system", "value": "Include all the fields of a wargaming error.\n" }, { "from": "human", "value": "var api = require('../config/api.json');\nvar appId = process.env.APPLICATION_ID;\nvar https = require('https');\nvar querystring = require('querystring');\n\nmodule.exports = function r...
javascript
chosen
[ { "from": "system", "value": "Fix router lookup to avoid deprecations in ember >= 2\n" }, { "from": "human", "value": "import Em from 'ember';\n\nfunction _getNormalisedRootUrl(router) {\n let rootURL = router.rootURL;\n if(rootURL.charAt(rootURL.length - 1) !== '/') {\n rootURL = rootURL +...
javascript
chosen
[ { "from": "system", "value": "Change active tags button layout.\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport { Button, ButtonGroup } from 'react-bootstrap';\n\nexport default class ActiveTags extends Component {\n removeTag(tag) {\n const { ...
javascript
chosen
[ { "from": "system", "value": "Hide Jumbotron on movie details page.\n\n" }, { "from": "human", "value": "/**\n * Poster v0.1.0\n * A React webapp to list upcoming movies and maintain a watchlist, powered by TMDb\n *\n * Author: Kushal Pandya <kushalspandya@gmail.com> (https://doublslash.com)\n *...
javascript
chosen
[ { "from": "system", "value": "Add check to not add messages twice\n" }, { "from": "human", "value": "/**\n * @class Denkmal_Component_MessageList_All\n * @extends Denkmal_Component_MessageList_Abstract\n */\nvar Denkmal_Component_MessageList_All = Denkmal_Component_MessageList_Abstract.extend({\...
javascript
chosen
[ { "from": "system", "value": "Fix problem if it takes long to valdiate\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n classNames: ['error-messages'],\n didInsertElement: function () {\n this._super();\n Ember.run.next(function()...
javascript
chosen
[ { "from": "system", "value": "[minor] Use ~ operator to check for -1\n\nThis is mainly a style change as other expressjs modules use this.\nPerformance is mostly indifferent.\nHowever, this tests specifically for -1.\n" }, { "from": "human", "value": "module.exports = compressible\n\ncompressibl...
javascript
chosen
[ { "from": "system", "value": "Update Relay to send cookies\n" }, { "from": "human", "value": "/**\n * Bootstrap\n * Client entry point\n * @flow\n */\n\n// Polyfills\nimport 'babel/polyfill'\n\n// Modules\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { Router } from 'react...
javascript
chosen
[ { "from": "system", "value": "Add caching of proxy requests in dev server\n" }, { "from": "human", "value": "import express from 'express';\nimport http from 'http';\nimport {renderFile} from 'ejs';\nimport request from 'superagent';\n\nvar app = express();\n\nvar FRIGG_API = process.env.FRIGG_A...
javascript
chosen
[ { "from": "system", "value": "[preview] Set subscription to null after unsubscribe\n" }, { "from": "human", "value": "import React, {PropTypes} from 'react'\nimport observeForPreview from './observeForPreview'\nimport shallowEquals from 'shallow-equals'\n\nexport default class PreviewMaterialize...
javascript
chosen
[ { "from": "system", "value": "Add info inside TPC check iframe attribute for curious eyes\n" }, { "from": "human", "value": "/* globals self, bufferpm, chrome */\n// buffer-tpc-check.js\n// (c) 2013 Sunil Sadasivan\n// Check if third party cookies are disabled\n//\n\n;(function () {\n\n if (...
javascript
chosen
[ { "from": "system", "value": "Add notify to actor service\n" }, { "from": "human", "value": "'use strict'\n\n\nclass Response {\n constructor(messenger, msg) {\n this.messenger = messenger\n this.queue = msg.properties.replyTo\n this.corr = msg.properties.correlationId\n }\n\n send (...
javascript
chosen
[ { "from": "system", "value": "Add action for setting kontaktinfo by group id\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n});\n" }, { "from": "gpt", "value": "import Ember from 'ember';\n\nexport default Ember.Component.ext...
javascript
chosen
[ { "from": "system", "value": "Comment out reserved action types\n" }, { "from": "human", "value": "export default {\n REQUEST_IDLE: 'REQUEST_IDLE',\n REQUEST_PENDING: 'REQUEST_PENDING',\n REQUEST_FAILED: 'REQUEST_FAILED',\n REQUEST_SUCCEEDED: 'REQUEST_SUCCEEDED',\n UPDATE_RESOURCES: 'UPDATE...
javascript
chosen
[ { "from": "system", "value": "Fix output filepath in non-ES2015 bundles\n" }, { "from": "human", "value": "const template = ({env, format, esEdition}) => `${env}.${format}.${esEdition}.js`;\nconst formats = ['es', 'cjs'];\n\nmodule.exports = {\n template,\n formats,\n};\n" }, { "from":...
javascript
chosen