conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Patch to allow Ender packages to work with jsdom.env\n"
},
{
"from": "human",
"value": "var vm = require('vm');\n\nexports.javascript = function(element, code, filename) {\n var document = element.ownerDocument,\n window = document.parentWindow;\n\n if (windo... | javascript | chosen |
[
{
"from": "system",
"value": "Allow non-authservice to offer anonymous\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2017 Red Hat Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may ... | javascript | chosen |
[
{
"from": "system",
"value": "Clone defaults when creating new project\n\nFor obvious reasons.\n"
},
{
"from": "human",
"value": "var AppDispatcher = require('../dispatcher/AppDispatcher');\nvar ProjectConstants = require('../constants/ProjectConstants');\nvar defaults = require('../config').def... | javascript | chosen |
[
{
"from": "system",
"value": "Fix show last element from list\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nexport default class List extends React.Component {\n static propTypes = {\n items: React.PropTypes.array.isRequired,\n }\n\n render() {\n const i... | javascript | chosen |
[
{
"from": "system",
"value": "Drop PhantomJS and use Chrome for ember try tests.\n"
},
{
"from": "human",
"value": "/* eslint-env node */\nmodule.exports = {\n \"test_page\": \"tests/index.html?hidepassed\",\n \"disable_watching\": true,\n \"launch_in_ci\": [\n \"Chrome\"\n ],\n \"launch... | javascript | chosen |
[
{
"from": "system",
"value": "Add after step to clear cookies and local/session storage.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* eslint-disable no-var, prefer-arrow-callback */\nvar HttpBackend = require('httpbackend');\n\nvar CustomWorld = (function () {\n var chai = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Add logging to see what's up with appveyor.\n"
},
{
"from": "human",
"value": "import * as path from 'path';\nimport { transform } from 'babel-core';\nimport formatError from '../formatError';\n\nconst getError = (fn) => {\n try {\n fn();\n } catch (e) ... | javascript | chosen |
[
{
"from": "system",
"value": "Increase height of job row\n"
},
{
"from": "human",
"value": "// @flow\n\nimport React from 'react'\nimport {Column, Row} from '../../components/layout'\nimport {ListRow, Title} from '../../components/list'\nimport type {ThinJobType} from './types'\n\nexport class J... | javascript | chosen |
[
{
"from": "system",
"value": "Use forward slash for file paths\n"
},
{
"from": "human",
"value": "// Licensed under the Apache License, Version 2.0 (the “License”); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n//\n// http://www... | javascript | chosen |
[
{
"from": "system",
"value": "tracking: Fix in-flight collision of two related PRs\n\nUnfortunately, I forgot to rebase before renaming trackMixpanelEvent() and a PR\nadding a new trace point was already in-flight.\n\nMore precisely:\n - https://github.com/weaveworks/scope/pull/2861 renames trackMixpanelEv... | javascript | chosen |
[
{
"from": "system",
"value": "Add initial test for version string.\n"
},
{
"from": "human",
"value": "describe('<%= name %>', function () {\n\n});\n"
},
{
"from": "gpt",
"value": "import version from '../src/version';\n\ndescribe('<%= name %>', function () {\n it('version', function... | javascript | chosen |
[
{
"from": "system",
"value": "Remove leftovers after logic cleanup\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function () {\n\tvar set, iterator, result;\n\tif (typeof Set !== 'function') return false;\n\tif (String(Set.prototype) !== '[object Set]') return false;\n\tse... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct Backdrop options for user satisfaction.\n\nSort by \"_timestamp: ascending\" and provide a limit of 0. This gives\nus all available data, and works against live Backdrop data on preview.\n\nIt would be better to sort by \"_timestamp:descending\" and use a limit\nof ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable the serivce manager to call getRequestID on a specific service\n"
},
{
"from": "human",
"value": "import { ElasticSearchService } from \"../../configs/nuage/elasticsearch/index\"\nimport { VSDService } from \"../../configs/nuage/vsd/index\"\n\nlet config = {\... | javascript | chosen |
[
{
"from": "system",
"value": "Return empty array instead of null here\n"
},
{
"from": "human",
"value": "import getFormElementType from './getFormElementType';\n\nfunction selectValues(node) {\n\n let result = [];\n let index = node.selectedIndex;\n let option;\n let options = node.o... | javascript | chosen |
[
{
"from": "system",
"value": "Fix icon for time component"
},
{
"from": "human",
"value": "export default (iconset, name, spinning) => {\n if (iconset === 'fa') {\n switch (name) {\n case 'save':\n name = 'download';\n break;\n case 'zoom-in':\n name = 'search-... | javascript | chosen |
[
{
"from": "system",
"value": "Use new API in integration tests.\n"
},
{
"from": "human",
"value": "(function(){\n var window = this;\n\n // Utility object dom scripting normalization\n var DOM = {\n on: (function() {\n if(window.addEventListener) {\n return function(target, typ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the `number-leading-zero` rule from stylelint config\n\nBecause new version of `stylelint-config-uploadcare` contain this rule\nwith same value.\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports = {\n extends: 'stylelint-config-uploadcare',\n... | javascript | chosen |
[
{
"from": "system",
"value": "fix(UserSwitcher): Stop most of the logic from using entwine\n"
},
{
"from": "human",
"value": "(function($){\n\t$.entwine('userswitcher', function($){\n\n\t\t$('form.userswitcher select').entwine({\n\t\t\tonchange : function(){\n\t\t\t\tthis.parents('form:first').s... | javascript | chosen |
[
{
"from": "system",
"value": "Modify SelectLanguage to function declaration\n"
},
{
"from": "human",
"value": "const React = require('react')\nconst propTypes = require('prop-types')\n\nclass SelectLanguage extends React.Component {\n render () {\n const languages = ['All', 'Javascript', 'Py... | javascript | chosen |
[
{
"from": "system",
"value": "Add site footer to each documentation generator\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tac... | javascript | chosen |
[
{
"from": "system",
"value": "Add Persian terms for 'latitude', 'longitude' and 'boundary'\n"
},
{
"from": "human",
"value": "// ==========================================================================\n// DG.MapModel\n//\n// Author: William Finzer\n//\n// Copyri... | javascript | chosen |
[
{
"from": "system",
"value": "Use the globalization object we already collected.\n"
},
{
"from": "human",
"value": "function startModule() {\n // Get locale from phonegap\n var globalization = navigator.globalization;\n\n if (globalization) {\n navigator.globalization.getLocaleName(\n ... | javascript | chosen |
[
{
"from": "system",
"value": "FIX: Add correct runtimeCaching urls (external files like bootstrap)\n"
},
{
"from": "human",
"value": "module.exports = {\n navigateFallback: '/index.html',\n stripPrefix: 'dist',\n root: 'dist/',\n staticFileGlobs: [\n 'dist/index.html',\n 'dist/**.js',\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant color from gauge colors list\n"
},
{
"from": "human",
"value": "export const GAUGE_COLORS = [\n {\n hex: '#BF3D5E',\n text: 'Ruby',\n },\n {\n hex: '#DC4E58',\n text: 'Fire',\n },\n {\n hex: '#DC4E58',\n text: 'Fire',\n },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add usage example for getActions()\n"
},
{
"from": "human",
"value": "/**\n * Module dependencies.\n */\nvar _ = require('@sailshq/lodash');\n\n/**\n * Sails.prototype.getActions()\n *\n * Return a shallow clone of the loaded actions dictionary.\n *\n * @returns {di... | javascript | chosen |
[
{
"from": "system",
"value": "Add neighborhoods, NPUs, and categories.\n"
},
{
"from": "human",
"value": "var Model = require('ampersand-model');\n\nmodule.exports = Model.extend({\n props: {\n id: 'any',\n name: ['string', true, ''],\n description: ['string', true, ''],\n latlng: [... | javascript | chosen |
[
{
"from": "system",
"value": "Clarify relation between shim and bundled jquery\n"
},
{
"from": "human",
"value": "// Define an amd module called \"-jquery\" \n// which exposes jQuery bundeled with ember-cli-page-object.\n//\n// This mode is used when we deal with `jquery`-less apps.\n(function()... | javascript | chosen |
[
{
"from": "system",
"value": "Attach wait function to window\n"
},
{
"from": "human",
"value": "import $ from 'jquery';\nimport Modernizr from 'modernizr';\n\nconst utils = {};\n\nlet running = false;\n\n(function wait () {\n if (window.requestAnimationFrame) return window.requestAnimationFrame... | javascript | chosen |
[
{
"from": "system",
"value": "Fix not found content type in content manager routes\n"
},
{
"from": "human",
"value": "const _ = require('lodash');\n\nconst parseMultipartBody = require('../../utils/parse-multipart');\nconst uploadFiles = require('../../utils/upload-files');\n\nmodule.exports = a... | javascript | chosen |
[
{
"from": "system",
"value": "Use updates instead of saves which magically makes the script more reliable\n"
},
{
"from": "human",
"value": "'use strict'\n\nlet _ = require('underscore')\nlet mongoose = require('mongoose')\nlet winston = require('winston')\n\nlet Rat = require('../api/models/rat... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the observer on $destroy\n\nThanks @heavysixer!\n"
},
{
"from": "human",
"value": "angular.module('eee-c.angularBindPolymer', []).\ndirective('bindPolymer', function() {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n var a... | javascript | chosen |
[
{
"from": "system",
"value": "Fix comment in sort example\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { TacoTable, DataType, SortDirection, Formatters } from 'react-taco-table';\nimport cellLinesData from '../data/cell_lines.json';\n\n/**\n * An example demonstrating va... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Add protocol for src which has no protocol"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc function\n * @name cnodejs.filters:tabName\n * @description\n * # tabName\n * tab name filter of the cnodejs app\n */\n\nangular.module('cnodejs.filters... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sort of state chart\n\nref: https://github.com/eventbrite/britecharts/pull/409\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport * as d3Selection from 'd3-selection';\nimport DonutChart from 'britecharts/dist/umd/donut.min';\n\nexport default {\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix CWL staging callback url\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Development specific configuration\n// ==================================\nmodule.exports = {\n\n ip: '127.0.0.1',\n\n httpsPort: 4343,\n httpPort: 8085,\n\n url: 'https://localh... | javascript | chosen |
[
{
"from": "system",
"value": "Add url to the description field.\n\nSigned-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@stormz.me>\n"
},
{
"from": "human",
"value": "var icalendar = require('icalendar');\nvar _ = require('underscore');\n\nexports.generateIcal = function(curr... | javascript | chosen |
[
{
"from": "system",
"value": "Make a new connection per request\n"
},
{
"from": "human",
"value": "var mssql = require(\"mssql\");\n\nvar database = {\n query: function(connection, query, callback) {\n mssql.connect(connection, function(connectionError) {\n if(connectionError) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Prepend SVG icons with S3 bucket\n"
},
{
"from": "human",
"value": "var convert = require('convert');\nvar parse = require('color-parser');\n\nexports.segments = {\n stroke: function(display, segment) {\n if (!segment.focused) return;\n\n switch (segment.type... | javascript | chosen |
[
{
"from": "system",
"value": "Fix .remove method not removing values.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* property.js\n * Object to represent CSS properties.\n */\n\nconst Value = require('./value');\n\nmodule.exports = exports = Property;\n\nfunction Property(sel, values) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make JS compiler happy about OAUTH2_USE_OFFICEIAL_CLIENT_ID.\n\nReview URL: https://chromiumcodereview.appspot.com/10206007\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@133634 0039d316-1c4b-4281-b951-d872f2087c98\n"
},
{
"from": "human",
"value": "// Copy... | javascript | chosen |
[
{
"from": "system",
"value": "Change MENU to new loader format"
},
{
"from": "human",
"value": "define(['mac/roman'], function(macintoshRoman) {\n\n 'use strict';\n \n return function(resource) {\n var dv = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byteLeng... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor FefPopup to work with dynamic links\n"
},
{
"from": "human",
"value": "const DEFAULT_HEIGHT = 600,\n DEFAULT_WIDTH= 944,\n DEFAULT_MEDIA_QUERY = 'screen';\n\nexport function init() {\n $('.js-popup').each((index, elem) => {\n new FefPopup($(... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'map' to asset extensions\n\nOtherwise react will attempt to route it\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst config = {\n\n browserPort: 3000,\n UIPort: 3001,\n\n scripts: {\n src: './app/js/**/*.js',\n dest: './build/js/',\n test:... | javascript | chosen |
[
{
"from": "system",
"value": "Fix edit month in table cell\n"
},
{
"from": "human",
"value": "var CoreView = require('backbone/core-view');\n\nmodule.exports = CoreView.extend({\n className: 'CDB-Box-modal Table-editor',\n\n initialize: function () {\n this.listenTo(this.model, 'change:show... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spacing to meet guidelines\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Load modules\n\n\n// Declare internals\n\nconst internals = {};\n\n\nexports.method = function (value) {\n return true ? (value-1, value) : value+1; //Should return value\n};\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add players to dashboard container\n"
},
{
"from": "human",
"value": "import { connect } from 'react-redux'\n\nimport Dashboard from '../Dashboard'\n\nconst mapStateToProps = (state) => {\n return {\n userId: state.user.get('userId'),\n loggedIn: state.user.g... | javascript | chosen |
[
{
"from": "system",
"value": "Add body class to page.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/*\n * Application .run\n * \n * On a successful state change set the root scopes title property\n * used for the html <title> tag.\n * \n * Angular .run exicuted after the .config function.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix \"localStorage is not available\" error in test\n\nhttps://stackoverflow.com/q/51554366\nhttps://github.com/facebook/jest/issues/6766\n"
},
{
"from": "human",
"value": "require('babel-jest');\n\nmodule.exports = {\n roots: ['js'],\n moduleFileExtensions: ['js'... | javascript | chosen |
[
{
"from": "system",
"value": "Check if window.open succeed in DevToolsWindow\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { render } from 'react-dom';\nimport { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';\n\n/**\n * Puts Redux DevTools into a sepa... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Node.js from global environment\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n env: {\n es6: true,\n node: true,\n browser: true,\n },\n extends: 'eslint:recommended',\n parserOptions: {\n sourceType: 'module',\n e... | javascript | chosen |
[
{
"from": "system",
"value": "[bare-expo] Fix ios detox test hang\n\nSometimes the iOS detox tests fail with error `Interaction cannot continue because the desired element was not found.`\n\nThe `isVisible` check requires that at least %75 of the element is visible on the screen, which was not always the ca... | javascript | chosen |
[
{
"from": "system",
"value": "Fix syntax error, filter row log\n"
},
{
"from": "human",
"value": "var RSVP = require('rsvp'),\n utils = require('./lib'),\n GoogleSpreadsheet = require(\"google-spreadsheet\"),\n config = require('./config.js'),\n doc = new GoogleSpreadsheet(config['go... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with rice.text not placing the null byte in the appropriate location\n"
},
{
"from": "human",
"value": "var Chunk = require('./lib/chunk')\n , Decoder = require('./lib/decode')\n , Encoder = require('./lib/encode')\n\n\nmodule.exports = {\n decode: func... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'inspect' on the custom inspect functions.\n"
},
{
"from": "human",
"value": "require('autoreleasepool');\nmodule.exports = require('./build/default/bindings.node');\n\nvar Application = module.exports.Application\n , Item = module.exports.Item\n\nApplication.p... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify comment on 0 length strings\n"
},
{
"from": "human",
"value": "module.exports = function(value) {\n var length = value.length;\n\n // If `value` is an empty string, then it will have 0 caps and a length of 0,\n // which, when divided, will yield `NaN`. A... | javascript | chosen |
[
{
"from": "system",
"value": "Create a clone.\nThis allows multiple values to be set, and it doesn't conflict with the global object.\n"
},
{
"from": "human",
"value": "(function(fs, path){\n 'use strict';\n\n // Resources\n global.__objectCache = {};\n\n // Module\n module.exports = export... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path to configuration file\n"
},
{
"from": "human",
"value": "var fsExtra = require('fs-extra'),\n SnapshotCleaner = require('./lib/cleaner');\n\nfsExtra.readJSON('./config/config.json', function (error, config) {\n if (error) {\n throw error;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow overriding contentImage with `undefined`\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar notifier = require('node-notifier');\n\nvar WebpackNotifierPlugin = module.exports = function(options) {\n this.options = options || {};\n this.l... | javascript | chosen |
[
{
"from": "system",
"value": "Add memory session to bot\n"
},
{
"from": "human",
"value": "const Telegraf = require('telegraf');\n\nlet userManager = require('./user-manager');\n\n// Enter bot API Token on here or add as environment varialbe\nconst BOT_API_TOKEN = process.env.API_TOKEN || '';\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Tag all of exec now\n"
},
{
"from": "human",
"value": "const rp = require(\"request-promise\");\nconst fs = require(\"fs\");\n\nexports.run = async(client, msg, args) => {\n if(args.length < 1) return;\n\n try {\n fs.appendFileSync(\"bug_reports.log\",\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix case sensitivity in public key comparison\n"
},
{
"from": "human",
"value": "const prompt = require('prompt');\nconst { randomBytes } = require('crypto')\nconst ethutil = require('ethereumjs-util');\nconst secp256k1 = require('secp256k1');\n\nprompt.start();\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Reset require cache back it original state on each run to avoid caching."
},
{
"from": "human",
"value": "'use strict';\nvar path = require('path');\nvar gutil = require('gulp-util');\nvar through2 = require('through2');\nvar Mocha = require('mocha');\n\nmodule.expo... | javascript | chosen |
[
{
"from": "system",
"value": "Test for non empty string before assigning default\n"
},
{
"from": "human",
"value": "/*jslint node:true */\n\"use strict\";\n\nvar loaderUtils = require(\"loader-utils\");\n\nfunction StripBlockLoader(content) {\n var query = (this.query === '' ? {} : loaderUtil... | javascript | chosen |
[
{
"from": "system",
"value": "Read the dropzone post url from the Asgard global object\n"
},
{
"from": "human",
"value": "$( document ).ready(function() {\n Dropzone.autoDiscover = false;\n var myDropzone = new Dropzone(\".dropzone\", {\n url: '/api/file',\n autoProcessQueue:... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"[fix] don't count unactive meps for the display of the groups list\"\n\nThis reverts commit 3e316d65aad7ed36513aaac112a7df747882f3dc.\n\nForgot the do the migration ...\n"
},
{
"from": "human",
"value": "function(doc) {\n if(doc && doc.active && doc.activ... | javascript | chosen |
[
{
"from": "system",
"value": "Add getClass function. Return constructor from type.\n"
},
{
"from": "human",
"value": "import Bishop from './bishop';\nimport Gold from './gold';\nimport King from './king';\nimport Knight from './knight';\nimport Lance from './lance';\nimport NullPiece from './nul... | javascript | chosen |
[
{
"from": "system",
"value": "Fix raycasting for nested objects\n\nThe .on handler on a subunit selection fails to be called if applied to nested objects unless raycasting intersectObjects is set to true. Not sure if this will impact other parts of the demos, but seems to work in my local testing."
},
{... | javascript | chosen |
[
{
"from": "system",
"value": "Call super with arguments to safeguard against future changes\n"
},
{
"from": "human",
"value": "import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { storageFor } from '../../../../services/local-storage';\n\nexport default ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in error message\n"
},
{
"from": "human",
"value": "export default class VisComponent {\n constructor (el) {\n if (!el) {\n throw new Error('\"el\" is a required argument');\n }\n\n this.el = el;\n }\n\n render () {\n throw new Error('\"... | javascript | chosen |
[
{
"from": "system",
"value": "Move (back) to call-based jsonp\n"
},
{
"from": "human",
"value": "(function () { // eslint-disable-line no-undef\n const commands = [\n {\n Name: 'help',\n Info: 'Returns a help message to get you started with RemindMeBot.',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use more sane global for a non-bundled environment\n"
},
{
"from": "human",
"value": "import rootImport from 'rollup-plugin-root-import'\nimport nodeResolve from 'rollup-plugin-node-resolve'\nimport commonjs from 'rollup-plugin-commonjs'\nimport buble from... | javascript | chosen |
[
{
"from": "system",
"value": "Add strict mode to renderer side js\n"
},
{
"from": "human",
"value": "var ipc = require('ipc');\n\nipc.on('params', function(message) {\n var params = JSON.parse(message),\n webView = document.createElement('webview');\n\n webView.setAttribute('id', 'webView... | javascript | chosen |
[
{
"from": "system",
"value": "Fix slash-to-focus-on-search on Safari and Chrome.\n"
},
{
"from": "human",
"value": "define([\n\t'jquery' //requires jquery\n], function( $ ) {\n\n\tvar SearchForm = function(search_form) {\n\t\tthis.search_form = $(search_form); // the search form\n\t\tthis.init()... | javascript | chosen |
[
{
"from": "system",
"value": "Change to firefox for tests\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar http = require('http'),\n ecstatic = require('ecstatic');\n\nvar server = http.createServer(ecstatic({ root: __dirname + '/../dist' }));\n\nexports.config = {\n jasmineNodeOpts... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor - pull init code into a beforeEach block in people test\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('myApp.peopleList directive tests', function() {\n var $scope;\n\n beforeEach(module('myApp'));\n\n describe('peopleList directive', func... | javascript | chosen |
[
{
"from": "system",
"value": "Move to usage of child process\n"
},
{
"from": "human",
"value": "termApp.controller(\"mainController\", function($scope) {\n\tvar exec = require('executive');\n\tvar stream = require('stream');\n\n\tvar echoStream = new stream.Writable();\n\t$scope.command = \"\";\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix initial search results not working.\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport getWeatherData from '../../utils/apiUtils';\nimport Header from '../Header/Header';\nimport Welcome from '../Welcome/Welcome';\nimport Weathe... | javascript | chosen |
[
{
"from": "system",
"value": "Use === instead of ==\n"
},
{
"from": "human",
"value": "var platform = require('platform');\n\nmodule.exports = function xssFilter(options) {\n\n options = options || {};\n var setOnOldIE = options.setOnOldIE;\n\n return function xssFilter(req, res, next) {\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove paged specific options from scrolled media player\n\n* `fullscreenDuringPhonePlayback` is unused legacy.\n\n* `useSlimPlayerControlsDuringPhonePlayback` refers to paged widget\n types.\n"
},
{
"from": "human",
"value": "import {browser} from '../browser';\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Replace all usages of `created` with `added`\n"
},
{
"from": "human",
"value": "/** @babel */\n\nimport etch from 'etch'\n\nimport CommitPanelComponent from '../lib/commit-panel-component'\nimport FakeRepository from './fake-repository'\nimport SynchronousScheduler ... | javascript | chosen |
[
{
"from": "system",
"value": "Use test.end() instead of test.plan()\n\nJust more commonly used in our code\n"
},
{
"from": "human",
"value": "var tape = require( 'tape' );\n\nvar elasticsearchStream = require( '../../lib/streams/elasticsearchStream' );\n\ntape(\n 'importPipeline.createPeliasEla... | javascript | chosen |
[
{
"from": "system",
"value": "Remove variable declaration for service and just return the object.\n"
},
{
"from": "human",
"value": "Application.Services.factory('tags', [\"mcapi\",\n function tags(mcapi) {\n var service = {\n tags: [],\n\n createTag: function (ta... | javascript | chosen |
[
{
"from": "system",
"value": "Change the call of httpGet, now it will work with button\n"
},
{
"from": "human",
"value": "/**\n * Print the current url\n */\nchrome.tabs.query({ active: true, lastFocusedWindow: true}, \n function(array_of_Tabs) { // Since there can only be one active tab in o... | javascript | chosen |
[
{
"from": "system",
"value": "Add baseline for error baseline\n"
},
{
"from": "human",
"value": "//// [objectTypesWithOptionalProperties2.ts]\r\n// Illegal attempts to define optional methods\n\nvar a: {\n x()?: number; // error\n}\n\ninterface I {\n x()?: number; // error\n}\n\nclass C {\... | javascript | chosen |
[
{
"from": "system",
"value": "Support for screen resolution option\n"
},
{
"from": "human",
"value": "/**\n * Provides the --viewport option to set any device resolution and pixel density ratio.\n * If the user sets a viewport size as well as a device option (--phone, --tablet, ...),\n * we assu... | javascript | chosen |
[
{
"from": "system",
"value": "feat(client): Add syntax highlighting to challenge instructions\n"
},
{
"from": "human",
"value": "import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\n\nimport './challenge-description.css';\n\nconst propTypes = {\n description: PropTypes... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing app version in user-agent.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst {app} = require('electron').remote;\n\nconst os = require('os');\n\nlet instance = null;\n\nclass SystemUtil {\n\tconstructor() {\n\t\tif (instance) {\n\t\t\treturn inst... | javascript | chosen |
[
{
"from": "system",
"value": "Put getMaxPriority in a separate function.\n"
},
{
"from": "human",
"value": "define([\n 'angular'\n], function(angular) {\n 'use strict';\n\n angular.module('superdesk.menu', []).\n directive('sdMenu', function($route) {\n return {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow simple templates for labels.\n"
},
{
"from": "human",
"value": "/*\n Default label provider implementation\n*/\nclass DefaultLabelProvider {\n constructor(labels, lang) {\n this.lang = lang || 'en'\n this.labels = labels\n }\n\n getLabel(name) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change to jQuery noConflict mode\n"
},
{
"from": "human",
"value": "jQuery(document).ready(function($) {\n // The page is loaded.\n});"
},
{
"from": "gpt",
"value": "jQuery.noConflict();\n/*\njQuery(document).ready(function($) {\n // The page is loaded... | javascript | chosen |
[
{
"from": "system",
"value": "Add UJS support to activate element having data-autofocus attribute.\n"
},
{
"from": "human",
"value": "// Place your application-specific JavaScript functions and classes here\n// This file is automatically included by javascript_include_tag :defaults\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Remove previous functionality for hiding data in the path URL\n\n"
},
{
"from": "human",
"value": "(function(){\n 'use strict';\n\n angular.module('cla.controllers')\n .controller('SearchCtrl',\n ['$scope', '$state', '$location',\n function($scope, ... | javascript | chosen |
[
{
"from": "system",
"value": "Use findOneAndUpdate for PATCH request so new username will be saved\n"
},
{
"from": "human",
"value": "const express = require('express'),\n router = express.Router(),\n db = require('../models');\n\nrouter.get('/', function(req, res, next) {\n res.rende... | javascript | chosen |
[
{
"from": "system",
"value": "Update cron expression of audit email temporarily.\n"
},
{
"from": "human",
"value": "export default (app) => {\n app.jobs.schedule('send audit email', '0 16 * * 6', async () => {\n app.info('CRON: sending audit email - starting')\n\n const mailerConfig = app... | javascript | chosen |
[
{
"from": "system",
"value": "Add ajax post to the validate function.\n"
},
{
"from": "human",
"value": "$(window).ready(\n function () {\n $(\"#json-input\").linedtextarea();\n\n $(\"#json-input\").bind('paste', function() {\n // Need a timeout since paste event does... | javascript | chosen |
[
{
"from": "system",
"value": "Use flat serializer as default in serializer blueprint\n"
},
{
"from": "human",
"value": "import { Serializer } from 'denali';\n\nexport default Serializer.extends({\n\n attributes: [],\n\n relationships: {}\n\n});\n"
},
{
"from": "gpt",
"value": "impo... | javascript | chosen |
[
{
"from": "system",
"value": "Add BCH to Coinbase ticker"
},
{
"from": "human",
"value": "const _ = require('lodash/fp')\nconst axios = require('axios')\n\nconst BN = require('../../../bn')\n\nfunction getBuyPrice (obj) {\n const currencyPair = obj.currencyPair\n\n return axios({\n method: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add transitionTo stub to solve interaction error\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport React from 'react/addons';\n\nvar stubRouterContext = (Component, props, stubs) => {\n return React.createClass({\n childContextTypes: {\n ge... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce ghg emissions defaults function using constants\n"
},
{
"from": "human",
"value": "export const getGhgEmissionDefaults = (source, meta) => {\n const defaults = {};\n switch (source) {\n case 'CAIT':\n defaults.sector = meta.sector.find(\n s =... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.