conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "[search-header] Rewrite mixin in order to call runSearhc.\n" }, { "from": "human", "value": "\n// Mixins\nlet i18nMixin =require('../../../../common/i18n').mixin;\nlet searchBehaviour = require('../../common/search-mixin').mixin;\nvar searchWrappedAction = require('...
javascript
chosen
[ { "from": "system", "value": "Add class \"js\" to html element\n" }, { "from": "human", "value": "/**\n * main.js\n *\n * Only runs in modern browsers via feature detection\n */\n\nif('querySelector' in document && 'localStorage' in window && 'addEventListener' in window) {\n \n \n \n}" }, ...
javascript
chosen
[ { "from": "system", "value": "Add WebSocket to main Graphalyzer component\n" }, { "from": "human", "value": "'use strict';\n\nvar React = require('react');\nvar ReactDOM = require('react-dom');\nvar GraphPanel = require('./GraphPanel.js');\nvar SearchPanel = require('./SearchPanel.js');\nvar Nod...
javascript
chosen
[ { "from": "system", "value": "Use original source for debugging main process\n" }, { "from": "human", "value": "import path from 'path';\nimport merge from 'webpack-merge';\nimport CleanWebpackPlugin from 'clean-webpack-plugin';\n\nimport CommonConfig from './webpack.common';\n\nlet config = {\n...
javascript
chosen
[ { "from": "system", "value": "Add markers in log files\n" }, { "from": "human", "value": "/** @babel */\n\nimport { CompositeDisposable, Disposable } from 'atom'\n\nexport default class MarkerManager extends Disposable {\n disposables = new CompositeDisposable()\n\n constructor (editor) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add helper for home page content\n" }, { "from": "human", "value": "fs = require('fs');\n\nmodule.exports = {\n publicClasses: function(context, options) {\n 'use strict';\n var ret = \"\";\n\n for(var i=0; i < context.length; i++) {\n ...
javascript
chosen
[ { "from": "system", "value": ":new: Add resolve.root support to getRootDirectory helper in motion-webpack-npm\n" }, { "from": "human", "value": "/* @flow */\n\nconst MODULE_EXTRACTION_REGEX = /^(\\w[^\\/\\\\]+)/\n\nexport function extractModuleName(moduleName: string): ?string {\n if (moduleNam...
javascript
chosen
[ { "from": "system", "value": "Add Twitter user API keys\n" }, { "from": "human", "value": "'use strict'\n\nvar apiKeys = {\n newsApiKey: '',\n twitter_consumer_key: '',\n twitter_consumer_secret: '',\n twitter_bearer_token: ''\n}\n\nmodule.exports = apiKeys\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Add period to multi-sentence rebase locally message\n\nSee https://gitlab.com/gitlab-org/gitlab-ce/issues/38251\n" }, { "from": "human", "value": "import statusIcon from '../mr_widget_status_icon';\n\nexport default {\n name: 'MRWidgetConflicts',\n props: {\n m...
javascript
chosen
[ { "from": "system", "value": "Update default value of mode" }, { "from": "human", "value": "/*\r\n Toast notification popup jQuery plugin\r\n (c) 2016 Nupin Mathew <nupindev@gmail.com>\r\n License: MIT\r\n*/\r\n$(function () {\r\n /*Method to show a toast notification like popup with a messag...
javascript
chosen
[ { "from": "system", "value": "Fix error with data being passed to redirect method\n\nThis fixes a bug where the title was being passed to the wrong\nmethod which caused the redirect to error.\n" }, { "from": "human", "value": "const router = require('express').Router()\n\nconst { getProjectDetai...
javascript
chosen
[ { "from": "system", "value": "Fix '\"i\" is not defined'\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\nvar css = require('css');\n\nmodule.exports = CssFile;\n\nfunction CssFile(dir) {\n this.path = path.resolve(dir);\n\n var content = fs.readFileSync...
javascript
chosen
[ { "from": "system", "value": "Remove jQuery usage to read meta config.\n" }, { "from": "human", "value": "/* jshint ignore:start */\n\ntry {\n var metaName = prefix + '/config/environment';\n var rawConfig = Ember['default'].$('meta[name=\"' + metaName + '\"]').attr('content');\n var config =...
javascript
chosen
[ { "from": "system", "value": "Add 'active' class bindings for component that is added when Aviary Editor is launched and removed with Aviary's 'onClose' callback" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n aviaryApiClient: null, // in...
javascript
chosen
[ { "from": "system", "value": "Add temporary fix for odd outlook for ios user agent\n" }, { "from": "human", "value": "// Check mobile platform\n\n$(document).ready(function () {\n if (Framework7.prototype.device.ios) {\n // Redirect to iOS page\n var iosPaneUrl = new URI('Mobile...
javascript
chosen
[ { "from": "system", "value": "Add our ruby dark color to the colors constant\n" }, { "from": "human", "value": "export const colors = {\n NEUTRAL_LIGHTEST: '#fff',\n NEUTRAL_LIGHT: '#f7f7fa',\n NEUTRAL: '#e4e4e6',\n NEUTRAL_DARK: '#c0c0c4',\n NEUTRAL_DARKEST: '#82828c',\n TEAL_LIGHTEST: '#...
javascript
chosen
[ { "from": "system", "value": "Fix options reference and moduleOptions typo\n\n\r\nReferenceError: options is not defined\r\n at Module.nuxtBootstrapVue (/home/rich/Projects/da-lee/node_modules/@nuxtjs/bootstrap-vue/index.js:10:63)\r\n at /home/rich/Projects/da-lee/node_modules/nuxt/dist/nuxt.js:1784:2...
javascript
chosen
[ { "from": "system", "value": "Add autocomplete on page load\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/javascripts, ...
javascript
chosen
[ { "from": "system", "value": "Make the HTML Editor component monitor every node insertion for HTML WYSIWYG widgets. This is so that we can insert new editors at runtime and they will automatically be enabled.\n" }, { "from": "human", "value": "$(document).ready(function() {\n // setup html edit...
javascript
chosen
[ { "from": "system", "value": "Send AJAX HIGH-LEVEL get request" }, { "from": "human", "value": "$(document).ready(function() {\n $(\"a.load_reviews\").on(\"click\", function(e){\n//Send AJAX LOW-LEVEL get request\n $.ajax({\n method: \"GET\",\n url: this.href\n }).done(function(response...
javascript
chosen
[ { "from": "system", "value": "Disable wrapInEval for standalone builds.\n" }, { "from": "human", "value": "/* jshint node: true */\n\nvar mergeTrees = require('broccoli-merge-trees');\nvar pickFiles = require('broccoli-static-compiler');\nvar compileES6 = require('broccoli-es6-concatenator');\nv...
javascript
chosen
[ { "from": "system", "value": "Fix after latest update from launchpad\n\nAfter the latest update from lauchpad (August/2016) the\nhtml pre block for the abap instructtions already contained\nthe class language-abap, which prevented our code from\nrunning as this was a condition we checked to prevent\nrunning...
javascript
chosen
[ { "from": "system", "value": "Add onDayClick to CSS modules example\n\nhttps://gitter.im/gpbl/react-day-picker?at=58f6670e69a692963ec1cd53\n" }, { "from": "human", "value": "import React from 'react';\nimport DayPicker from '../../../src';\n\nimport styles from '../styles/cssmodules.css';\n\nexp...
javascript
chosen
[ { "from": "system", "value": "feat(razzle): Support for not released plugins in razzle.config.js\n" }, { "from": "human", "value": "'use strict';\n\nconst resolve = require('resolve');\n\nfunction loadPlugin(plugin, paths) {\n if (typeof plugin === 'string') {\n // Apply the plugin with defa...
javascript
chosen
[ { "from": "system", "value": "Make use of ES6 default param values on topHitsAggregation\n" }, { "from": "human", "value": "/**\n * Internal counter for added top hits aggregations.\n * @type {Number}\n */\nlet count = 0;\n\n/**\n * Construct a Top hits aggregation.\n *\n * @param {Object} opts...
javascript
chosen
[ { "from": "system", "value": "Use the original object instead of array\n" }, { "from": "human", "value": "/**\n * Export javascript style and css style vendor prefixes.\n * Based on \"transform\" support test.\n */\n\nimport isBrowser from 'is-browser'\n\nlet js = ''\nlet css = ''\n\n// We shoul...
javascript
chosen
[ { "from": "system", "value": "Add header and help text\n" }, { "from": "human", "value": "/* eslint no-console: off */\nimport build from \"./scripts/build\"\nimport start from \"./scripts/start\"\nimport bootstrap from \"./scripts/bootstrap\"\n\nconst ARGSPOS_SCRIPT = 2\nconst ARGSPOS_ARGUMENTS...
javascript
chosen
[ { "from": "system", "value": "Migrate worker_main/ to import cross-module\n\nBug: 1006759\nChange-Id: I3b35181af88d569b2d7f803150b9bf147d037510\nReviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019554\nReviewed-by: Paul Lewis <8915f5d5c39a08c5a3e8a8d7314756e4580816f9@chr...
javascript
chosen
[ { "from": "system", "value": "Use es6 module syntax to import jquery\n\n" }, { "from": "human", "value": "$j(document).ready(function () {\n 'use strict';\n if (window.location.pathname.indexOf('lunchtransactions.html') === -1) {\n var newLaunchBox = $j('#ptgNewLaunchBox');\n\n /...
javascript
chosen
[ { "from": "system", "value": "Remove DB code for pathways\n" }, { "from": "human", "value": "const uuid = require('uuid');\nconst express = require('express');\nconst router = express.Router();\nconst Promise = require('bluebird');\nconst logger = require('../../logger');\n\nconst { getPathwayJs...
javascript
chosen
[ { "from": "system", "value": "Add an option to use a Redis credentials url" }, { "from": "human", "value": "/*\n * syndicate-g\n * https://github.com/petarov/syndicate-g\n *\n * The MIT License (MIT)\n * Copyright (c) 2013 Petar Petrov\n */\n\"use strict\";\n\nvar _ = require('underscore')._;\nv...
javascript
chosen
[ { "from": "system", "value": "Support for devDeps in NPM and safer parsing\n" }, { "from": "human", "value": "/*jshint strict:true, trailing:false, unused:true, node:true */\n'use strict';\n\nvar npm = function(str) {\n var deps = JSON.parse(str).dependencies;\n return Object.keys(deps)\n .re...
javascript
chosen
[ { "from": "system", "value": "Rename _getK() to be more descriptive\n" }, { "from": "human", "value": "(function($){\n \"use strict\";\n\n var url = \"http://devitconf.org/\";\n\n var devit = {\n\n init: function () {\n devit.getSocialCounts();\n devit.setCurrentYear();\n },\n...
javascript
chosen
[ { "from": "system", "value": "EPMRPP-38388: Fix project url on events page\n" }, { "from": "human", "value": "import { takeEvery, all, put, select } from 'redux-saga/effects';\nimport { fetchDataAction } from 'controllers/fetch';\nimport { activeProjectSelector } from 'controllers/user';\nimport...
javascript
chosen
[ { "from": "system", "value": "Reorganize this file a little bit.\n" }, { "from": "human", "value": "exports.get = function get (obj, key) {\n for (var i in obj) if (i.toLowerCase() === key.toLowerCase()) return obj[i];\n return undefined;\n};\nexports.set = function set (obj, key, val) {\n fo...
javascript
chosen
[ { "from": "system", "value": "Reduce scope of event broadcast\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @ngdoc function\n * @name websocketTesterApp.controller:MainCtrl\n * @description\n * # MainCtrl\n * Controller of the websocketTesterApp\n */\nangular.module('websocketTeste...
javascript
chosen
[ { "from": "system", "value": "Add maximum extent value to quantiles for legend\n" }, { "from": "human", "value": "// for use with `d3-playbooks-riot-components`\n\nexport default ({\n data,\n yCol,\n getColor\n}, {getLabel}) => {\n if (!getLabel) getLabel = q => Math.round(q)\n return getCo...
javascript
chosen
[ { "from": "system", "value": "Change attractors to all be the same initial size. This avoids the issue\nwhen spawning a large amount of attractors in manually.\n" }, { "from": "human", "value": "import * as constants from \"./constants\";\n\nlet initNum = 1;\nfunction Attractor(game, center) {\n...
javascript
chosen
[ { "from": "system", "value": "Make window scroll to bottom after each message received\n" }, { "from": "human", "value": "/*\n This is the client side JavaScript.\n This is a VERY basic client. It is little more than the 'hello world' of chatrooms!\n \n Good improvements would be:\n to pre...
javascript
chosen
[ { "from": "system", "value": "Add event-statistics-general model to event serializer test\n" }, { "from": "human", "value": "import { moduleForModel, test } from 'ember-qunit';\n\nmoduleForModel('event', 'Unit | Serializer | event', {\n needs: [\n 'serializer:event',\n 'serializer:user',\...
javascript
chosen
[ { "from": "system", "value": "Add back info about covered methods for Reply plugin\n" }, { "from": "human", "value": "(function($) {\n\nvar plugin = \"Echo.StreamServer.Controls.Stream.Item.Plugins.Reply\";\n\nEcho.Tests.module(plugin, {\n\t\"meta\": {\n\t\t\"className\": plugin\n\t}\n});\n\nEch...
javascript
chosen
[ { "from": "system", "value": "Rename task callbacks to match Gulp standards\n" }, { "from": "human", "value": "/* jshint bitwise: true,\n curly: true,\n eqeqeq: true,\n esversion: 6,\n forin: true,\n freeze: true,\n latedef: nofunc,\n ...
javascript
chosen
[ { "from": "system", "value": "Add ts 1.5 commented declaration\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n ts = require('gulp-typescript'),\n sourcemaps = require('gulp-sourcemaps'),\n del = require('del'),\n shell = require('gulp-shell');\n\ngulp.task('ts', ['cl...
javascript
chosen
[ { "from": "system", "value": "Add connect task fo dev web server\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar del = require('del');\nvar ts = require('gulp-typescript');\nvar mocha = require('gulp-mocha');\n\nvar tsProject = ts.createProject('tsconfig.json');\n\ngulp.task(...
javascript
chosen
[ { "from": "system", "value": "Make test task run the test parts in sequence\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar tsc = require('gulp-tsc');\nvar tape = require('gulp-tape');\nvar tapSpec = require('tap-spec');\nvar del = require('del');\n\ngulp.task(\"test:clean\",...
javascript
chosen
[ { "from": "system", "value": "Make patterns into regular expressions.\n" }, { "from": "human", "value": "'use strict';\n\nvar EventEmitter = require('events').EventEmitter;\nvar mixin = require('merge-descriptors');\n\nfunction Command() {\n this.actions = [];\n\n mixin(this, EventEmitter.prot...
javascript
chosen
[ { "from": "system", "value": "Add ability to toggle sound\n" }, { "from": "human", "value": "var CompositeDisposable, Synesthesia;\n\nCompositeDisposable = require('atom').CompositeDisposable;\nvar T = require('timbre');\n\nmodule.exports = Synesthesia = {\n activate: function() {\n this.sub...
javascript
chosen
[ { "from": "system", "value": "Change event from window load to dom ready.\n" }, { "from": "human", "value": "(function( $ ) {\n\tfunction setHeaderHeight() {\n\t\t$( '#screen-fill' ).css( 'height', $( window ).height() - 50 );\n\t}\n\n\t$( window ).load( setHeaderHeight );\n\t$( window ).resize(...
javascript
chosen
[ { "from": "system", "value": "Fix prop routing for login path through success\n\nIn both the login (KEX) flow for provisioning and the signup (rpc)\npath, we end up at shared/login/signup/success. But it needs to\nuse state from the store in the success path (this was working),\nand route tree state receiv...
javascript
chosen
[ { "from": "system", "value": "Add require jquery that got lost in the merge\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/asse...
javascript
chosen
[ { "from": "system", "value": "Use javascript to prevent confusion when using the back button after changing date\n" }, { "from": "human", "value": "'use strict';\n\n/*jslint\n browser: true\n*/\n\nvar divs = document.getElementsByTagName('div'),\n i;\n\nfunction fancify(div) {\n var ths...
javascript
chosen
[ { "from": "system", "value": "Change WebSocket URL to server's domain address\n" }, { "from": "human", "value": "var canvas = new fabric.Canvas('draughts-canvas');\ncanvas.setBackgroundColor(\"#ffffff\");\nvar mousePos;\nvar board;\nvar Color = net.brehaut.Color; //TODO move to bower\nvar hoverA...
javascript
chosen
[ { "from": "system", "value": "Handle the empty er folder and blank ER case properly.\n" }, { "from": "human", "value": "var JSONDumper = function() {\n\tthis.onBrowserLog = function(browser, log, type) {\n\t\tif( type != \"dump\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar objectMerge = require( 'objec...
javascript
chosen
[ { "from": "system", "value": "Change to include company field\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\nvar cors = require('./cors');\nvar HttpError = require('./errors').HttpError;\nvar db = require('../libs/db');\n\nrouter.use(cors);\...
javascript
chosen
[ { "from": "system", "value": "Add async attribute back to the install script\n" }, { "from": "human", "value": "import React from \"react\";\n\nconst Template = ({ children }) => (\n <html lang=\"en\">\n\n <head>\n <meta charSet=\"utf-8\" />\n <meta httpEquiv=\"X-UA-Compatible\" co...
javascript
chosen
[ { "from": "system", "value": "Handle the case that bs-console doesn't exist.\n" }, { "from": "human", "value": "Console = {}\n\nConsole.puts = function(str, no_newline) {\n var text = (str + (no_newline ? \"\" : \"\\n\")).escapeHTML();\n span = document.createElement(\"span\");\n span.i...
javascript
chosen
[ { "from": "system", "value": "Add sound id to matrix\n" }, { "from": "human", "value": "define('soundMatrixConstants', function () {\n 'use strict';\n\n var matrix = [\n [false, false, false, false, false, false, false, false],\n [false, false, false, false, false, false, fal...
javascript
chosen
[ { "from": "system", "value": "Make sure that the return value is a boolean\n" }, { "from": "human", "value": "JARS.internal('ConfigTransforms/CheckCircularDeps', function() {\n 'use strict';\n\n /**\n * @memberof JARS.internals.ConfigTransforms\n *\n * @param {boolean} value\n ...
javascript
chosen
[ { "from": "system", "value": "Fix app title link not working with ‘source’ query paremeter\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nimport OsfAgnosticAuthControllerMixin from 'ember-osf/mixins/osf-agnostic-auth-controller';\n\nimport {\n getAuthUrl\n} from 'ember-osf/u...
javascript
chosen
[ { "from": "system", "value": "Exclude AppCache js test on Firefox\n" }, { "from": "human", "value": "({\n /**\n * Verify the correct AppCache events are received and are in the right order, without an error event. This case\n * covers when we have not seen the page before and must do...
javascript
chosen
[ { "from": "system", "value": "Include the dyno identifier, if available, in the metric key\n" }, { "from": "human", "value": "var Graphite = require('graphite');\nvar Measured = require('measured');\n\nvar reportInterval = 5000;\nvar graphiteHost = process.env.GRAPHITE_HOST || null;\nvar graphit...
javascript
chosen
[ { "from": "system", "value": "Change in catalog service to add items to SQS queue (id, body)\n" }, { "from": "human", "value": "/* eslint-disable no-unused-vars */\nclass Service {\n constructor (options) {\n this.options = options || {};\n }\n\n find (params) {\n console.log('params ==...
javascript
chosen
[ { "from": "system", "value": "Add blank line at the end\n" }, { "from": "human", "value": "'use strict'\n\nexports.config = {\n directConnect: true,\n\n allScriptsTimeout: 80000,\n\n specs: [\n 'test/e2e/*.js'\n ],\n\n capabilities: {\n 'browserName': 'chrome'\n },\n\n baseUrl: 'htt...
javascript
chosen
[ { "from": "system", "value": "Remove unused code from CORS middleware\n" }, { "from": "human", "value": "/* Copyright © 2015 PointSource, LLC. All rights reserved. */\n/*\n * Use the node-cors library to enable CORS on all express.js apps and endpoints.\n *\n * All config options are passed dire...
javascript
chosen
[ { "from": "system", "value": "Fix a typo in function call\n" }, { "from": "human", "value": "/**\n * A rate-limiting Throttle model, by IP address\n *\n */\nvar mongoose = require('mongoose')\nvar ipRegex = require('ip-regex')\nvar Schema = mongoose.Schema\nmongoose.Promise = global.Promise\n/**...
javascript
chosen
[ { "from": "system", "value": "Add isNew function to determine if user is on news section\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport { NavLink } from 'react-router-dom';\nimport './Side...
javascript
chosen
[ { "from": "system", "value": "Add durability to card stats.\n" }, { "from": "human", "value": "var HSCard = function(card) {\n this.id = card.id;\n this.cost = card.cost;\n this.attack = card.attack;\n this.health = card.health;\n this.quality = card.quality;\n this.name = card.name;\n th...
javascript
chosen
[ { "from": "system", "value": "Fix case on phone brick label\n" }, { "from": "human", "value": "module.exports = {\n className: 'phone',\n template: require('./index.html'),\n data: {\n name: 'phone',\n icon: '/images/blocks_phone.png',\n attributes: {\n n...
javascript
chosen
[ { "from": "system", "value": "Fix determine target reference stage\n" }, { "from": "human", "value": "'use strict';\n\nlet angular = require('angular');\n\nmodule.exports = angular.module('spinnaker.pipelines.stage.determineTargetReferenceStage', [])\n .config(function(pipelineConfigProvider) ...
javascript
chosen
[ { "from": "system", "value": "Remove from inventory on select\n" }, { "from": "human", "value": "var play = require('../engine/play');\nvar Player = function(game, name) {\n this.name = name;\n this.inventory = null;\n this.chosen = false;\n}\n\nPlayer.prototype.populateInventory = function (...
javascript
chosen
[ { "from": "system", "value": "Fix argument for repeat block\n" }, { "from": "human", "value": "function Scratch3ControlBlocks(runtime) {\n /**\n * The runtime instantiating this block package.\n * @type {Runtime}\n */\n this.runtime = runtime;\n}\n\n/**\n * Retrieve the block p...
javascript
chosen
[ { "from": "system", "value": "feat(map): Make route overlay url configurable\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react'\nimport { connect } from 'react-redux'\nimport { TileLayer } from 'react-leaflet'\n\nclass RoutesOverlay extends Component {\n stat...
javascript
chosen
[ { "from": "system", "value": "Add even better check for undefined str parameter\n" }, { "from": "human", "value": "import express from 'express';\nimport ip from 'ip';\n\nimport leftpad from './left-pad';\n\nconst app = express();\nconst port = process.env.PORT || 3000;\n\napp.get('/', (re...
javascript
chosen
[ { "from": "system", "value": "Fix indexing in active tickets\n" }, { "from": "human", "value": "import { Template } from 'meteor/templating';\n\nimport '/imports/ui/components/ticket/ticket.js';\n\nimport './queue-table.html';\n\nTemplate.QueueTable.helpers({\n noActiveTickets(queue) {\n ret...
javascript
chosen
[ { "from": "system", "value": "Add combo editor tests\nAdd tests for adding and deleting a task from the combo task.\n" }, { "from": "human", "value": "import { shallow, mount } from 'enzyme';\nimport React from 'react';\nimport assert from 'assert';\nimport ComboEditor from './editor';\nimport {...
javascript
chosen
[ { "from": "system", "value": "Increase unit tests code coverage controller location\n" }, { "from": "human", "value": "'use strict';\n\nimport chai, { expect } from 'chai';\nimport sinon from 'sinon';\nimport { default as sinonChai } from 'sinon-chai';\nimport 'sinon-as-promised';\n\nrequire('.....
javascript
chosen
[ { "from": "system", "value": "Test the alerting system on pages new\n" }, { "from": "human", "value": "/*****************************************************************************/\n/* PagesNew: Event Handlers and Helpersss .js*/\n/**************************************************************...
javascript
chosen
[ { "from": "system", "value": "Declare environment as a variable\n" }, { "from": "human", "value": "var siteUrl = 'http://example.org';\n\ncasper.test.setUp(function globalSetUp() {\n phantom.clearCookies();\n});\n" }, { "from": "gpt", "value": "var\n siteUrl = 'http://example.o...
javascript
chosen
[ { "from": "system", "value": "Move message handling out of core\n" }, { "from": "human", "value": "import queryString from 'query-string'\nimport events from '../core/events'\nimport * as constants from '../constants'\nimport { actions } from '../store/actions'\nimport ReconnectingWebSocket from...
javascript
chosen
[ { "from": "system", "value": "Remove unused templates from DOM instead of hiding\n" }, { "from": "human", "value": "$( document ).on('turbolinks:load', function() {\r\n\tif ($('#desktopTest').is(':hidden')) {\r\n\t \t$('.desktop').attr(\"hidden\", true);\r\n\t\t} else {\r\n\t\t\t\t$('.mobile'...
javascript
chosen
[ { "from": "system", "value": "Add missing package name for usage of SelectionUtils in a sample\n" }, { "from": "human", "value": "/* Check if OS name is Windows and if wireless connection is available */\nif (org.ow2.proactive.scripting.helper.selection.SelectionUtils.checkOSName(\"windows\") &&...
javascript
chosen
[ { "from": "system", "value": "Use `execFile` instead of `exec`\n" }, { "from": "human", "value": "import {exec} from 'child_process';\n\nimport semver from 'semver';\n\nconst {major, minor, patch} = semver.parse(atom.appVersion);\nconst atomVersion = `${major}.${minor}.${patch}`;\nconst required...
javascript
chosen
[ { "from": "system", "value": "Add to list of ignored yellowbox warnings\n" }, { "from": "human", "value": "// @flow\n\nimport {AppRegistry, YellowBox} from 'react-native'\nimport App from './app'\n\nYellowBox.ignoreWarnings([\n\t'Failed prop type: Invalid prop `containerTagName` of type `object`...
javascript
chosen
[ { "from": "system", "value": "Fix for failure to serialize jQuery event object.\n" }, { "from": "human", "value": "window.onerror = function(message, url, line) {\n $.ajax('/api/Error', {\n data: {\n message: message,\n url: url,\n line: line\n }...
javascript
chosen
[ { "from": "system", "value": "Change test to only run once\n" }, { "from": "human", "value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n config.set({\n baseP...
javascript
chosen
[ { "from": "system", "value": "Improve handling of missing settings file\n\nWrites whatever the empty _settings variable is, so that entities such as recentMaps can be included\n" }, { "from": "human", "value": "const fs = require('fs-extra'),\n Path = require('path');\n\nvar _settings = { // ...
javascript
chosen
[ { "from": "system", "value": "Add --only and --except options for which git file types to look for\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict'\n\nconst join = require('path').join\nconst minimist = require('minimist')\nconst GitAddAndCommit = require(join(__dirname, '../...
javascript
chosen
[ { "from": "system", "value": "Replace custom union code with lodash union\n" }, { "from": "human", "value": "/* @flow */\n\nimport mergeWith from \"lodash/mergeWith\";\n\nexport default function (dest?: Object, src?: Object): ?Object {\n if (!dest || !src) return;\n\n return mergeWith(dest, sr...
javascript
chosen
[ { "from": "system", "value": "Add 'today' translation for Bahasa\n" }, { "from": "human", "value": "/**\n * Bahasa translation for bootstrap-datetimepicker\n * Azwar Akbar <azwar.akbar@gmail.com>\n */\n;(function($){\n\t$.fn.datetimepicker.dates['id'] = {\n\t\tdays: [\"Minggu\", \"Senin\", \"Sel...
javascript
chosen
[ { "from": "system", "value": "Fix a bug in Node.js\n" }, { "from": "human", "value": "/**\n * util-events.js - The minimal events support\n */\n\nvar events = data.events = {}\n\n// Bind event\nseajs.on = function(name, callback) {\n var list = events[name] || (events[name] = [])\n list.push(c...
javascript
chosen
[ { "from": "system", "value": "Switch parameter order in .then to the correct order\n" }, { "from": "human", "value": "/**\n * Bootstrap\n * (sails.config.bootstrap)\n *\n * An asynchronous bootstrap function that runs before your Sails app gets lifted.\n * This gives you an opportunity to set up...
javascript
chosen
[ { "from": "system", "value": "Add new test domains for our test google suite instances" }, { "from": "human", "value": "function (user, context, callback) {\n if (!user) {\n // If the user is not presented (i.e. a rule deleted it), just go on, since authenticate will always fail.\n return...
javascript
chosen
[ { "from": "system", "value": "Fix bug in building rendering\n" }, { "from": "human", "value": "import colors from '../colors';\n\nexport const initialState = {\n rendering: {\n wall: {},\n flatRoof: {},\n brickRoof: {},\n field: {}\n }\n}\n\nconst materialInstan...
javascript
chosen
[ { "from": "system", "value": "Remove the navigator.platform info from my poor man’s error tracking script.\n" }, { "from": "human", "value": "/* global ga */\n\nvar errorTracking = (function() {\n\n 'use strict';\n\n // http://blog.gospodarets.com/track_javascript_angularjs_and_jquery_errors_w...
javascript
chosen
[ { "from": "system", "value": "Add two functions to io_rpc_brower.js\n - convStrToIntArr\n Convert string to integer array\n Used for mapping char* in C/C++ to JS\n Example: convStrToIntArr(\"hello\")\n - convIntArrToStr\n convert integer array to string\n" }, { "from": "human", "value": ...
javascript
chosen
[ { "from": "system", "value": "Set publish and trashed state\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n function RelatedLinksAppController($scope) {\n var vm = this;\n\n vm.relations = $scope.model.viewModel; \n var currentVariant = _.fin...
javascript
chosen
[ { "from": "system", "value": "Add check for silent authentication\n\nFor issue #225" }, { "from": "human", "value": "/**\n * @title Slack Notification on User Signup\n * @overview Slack notification on user signup.\n * @gallery true\n * @category webhook\n *\n * This rule sends a message to a sl...
javascript
chosen
[ { "from": "system", "value": "Handle when container is undefined.\n" }, { "from": "human", "value": "(function() {\n var clientid;\n jive.tile.onOpen(function(config, options, other, container ) {\n osapi.jive.corev3.systemExtProps.get({}).execute(function (resp) {\n if( ...
javascript
chosen
[ { "from": "system", "value": "Fix sku generation not updating list grid properly\n" }, { "from": "human", "value": "(function($, BLCAdmin) {\n \n // Add utility functions for products to the BLCAdmin object\n BLCAdmin.product = {\n \n refreshSkusGrid : function($contai...
javascript
chosen
[ { "from": "system", "value": "Fix html not updating references\n" }, { "from": "human", "value": "var gulp = require('gulp');\n\n// 5) Update asset references in HTML\ngulp.task('update-html', function () {\n\tvar config = require('../../config'),\n\t\tpath = require('path'),\n\t\trevReplace = r...
javascript
chosen