conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make contains() actually work in IE8\n\nSummary: IE8 doesn't have indexOf on arrays!\n\nReviewers: emily\n\nReviewed By: emily\n\nDifferential Revision: http://phabricator.khanacademy.org/D3052\n"
},
{
"from": "human",
"value": "function contains(list, elem) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to about me section\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport {Link} from 'react-router-dom';\nimport { LinkContainer } from 'react-router-bootstrap';\n\nexport default class Footer extends React.Component {\n constructor(props) ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Webpack global scope issue\n\nIn webpack 4 (Angular 8) the `_global = ...` will return undefined causing \"Cannot read property WebSocket of undefined\""
},
{
"from": "human",
"value": "var _global = (function() { return this; })();\nvar NativeWebSocket = _globa... | javascript | chosen |
[
{
"from": "system",
"value": "Use post verb instead of get for querying V1\n\nThis stopped working in the last couple of weeks.\n"
},
{
"from": "human",
"value": "var request = require('superagent');\nvar secrets = require('./load-secrets')('../client_secrets');\nvar serverBaseUri = secrets.v1Se... | javascript | chosen |
[
{
"from": "system",
"value": "Set correct Turbasen User Agent env var\n"
},
{
"from": "human",
"value": "var app = require('express').Router();\n\nprocess.env.NTB_API_USERAGENT = 'Hytteadmin/' + require('../package.json');\nvar turbasen = require('turbasen-auth');\n\napp.get('/', function(req, r... | javascript | chosen |
[
{
"from": "system",
"value": "Complete long form solution, refactored solution still in works\n"
},
{
"from": "human",
"value": "// Problem: Check whether a given year is a leap year or not.\n\n// Input: A year\n// Output: A boolean value of whether the year is a leap year or not\n\n// Pseudocod... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused moment lib form job run test\n"
},
{
"from": "human",
"value": "let moment = require('moment');\n\nlet JobRun = require('../JobRun');\nlet JobTaskList = require('../JobTaskList');\n\ndescribe('JobRun', function () {\n\n describe('#getDateCreated', fun... | javascript | chosen |
[
{
"from": "system",
"value": "Add beat 2 video and description\n"
},
{
"from": "human",
"value": "module.exports = [\n {\n \"direct\": \"https://d24kjznqej0s8a.cloudfront.net/2016/encryption_campaign/moz.final.3.emailpartner_1\",\n \"social\": \"https://d24kjznqej0s8a.cloudfro... | javascript | chosen |
[
{
"from": "system",
"value": "Build page refresh if in progress\n"
},
{
"from": "human",
"value": "import ReactDOM from 'react-dom';\nimport React from 'react';\nimport {build as fetchBuild, buildLog as fetchBuildLog,cancelBuild as cancelBuildApi} from './../api/Api.jsx';\nimport Build from './.... | javascript | chosen |
[
{
"from": "system",
"value": "Add frontend_build to coverage report\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst apiSpecAliases = require('../frontend_build/src/apiSpecExportTools').coreAliases();\n\nconst moduleNameMapper = {\n '^testUtils$': path.resolve(__dirname, ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow filling content of a blob from file path\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n/**\n * Jit hash-object\n */\nvar program = require('commander'),\n Blob = require('./common/blob');\n\nprogram\n // TODO\n .option('-t <type>', 'object typ... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'smif version' to label\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\nimport { connect } from 'react-redux'\nimport { Link, Router } from 'react-router-dom'\n\nimport { fetchSmifDetails } from ... | javascript | chosen |
[
{
"from": "system",
"value": "Add proxyGet for /doc urls.\n"
},
{
"from": "human",
"value": "let express = require('express')\nlet bodyParser = require('body-parser')\nlet request = require('request')\n\nlet remote = process.argv[2]\nlet app = express()\napp.use(bodyParser.json())\n\nlet proxyRe... | javascript | chosen |
[
{
"from": "system",
"value": "Include only necessary part of lib\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'labs-community-portal',\n environment,\n rootURL: '/',\n locationType: ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable more core “ES6” rules"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n 'env': {\n 'es6': true,\n },\n 'ecmaFeatures': {\n 'modules': true,\n },\n 'rules': {\n // Require let or const instead of var\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add slightly more relevant content to the help div\n"
},
{
"from": "human",
"value": "// create div\nvar sievehelpdiv = d3.select(\".title\").append(\"div\")\n\t.attr(\"id\", \"sievehelpdiv\")\n\t.classed(\"hidden\", true);\n\n// add div content\nsievehelpdiv.append... | javascript | chosen |
[
{
"from": "system",
"value": "Set image sizes based on settings\n\n * modified slidethis.js\n"
},
{
"from": "human",
"value": "/* SlideThis\n\nCopyright (c) 2013 Liam Keene\nAvailable under the MIT License\n*/\n(function($) {\n $.fn.slidethis = function(options) {\n\n // Default settin... | javascript | chosen |
[
{
"from": "system",
"value": "Fix adding Node ID bug\n"
},
{
"from": "human",
"value": "define([\"./frame\"], function (Frame) {\n \"use strict\";\n\n var Graph = function () {\n this._nodeIds = {};\n this._nodes = [];\n this.edges = [];\n };\n\n Graph.prototype.... | javascript | chosen |
[
{
"from": "system",
"value": "Check number of arguments instead of val existence\n"
},
{
"from": "human",
"value": "var extend = require('extend');\n\n\nvar Plom = function(options) {\n this.options = options || {};\n this.data = this.options.data || {};\n}\n\nPlom.extend = function(object) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add .clear() method to Keyv\n"
},
{
"from": "human",
"value": "'use strict';\n\nclass Keyv {\n\tconstructor(opts) {\n\t\tthis.opts = opts || {};\n\t\tthis.opts.store = this.opts.store || new Map();\n\t}\n\n\tget(key) {\n\t\tconst store = this.opts.store;\n\t\treturn... | javascript | chosen |
[
{
"from": "system",
"value": "Remove empty meta objects from action\n"
},
{
"from": "human",
"value": "import isPromise from './isPromise';\n\nconst defaultTypes = ['PENDING', 'FULFILLED', 'REJECTED']\n\nexport default function promiseMiddleware(config={}) {\n const promiseTypes = config.promis... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Tumblr a bit (though not complete)\n"
},
{
"from": "human",
"value": "var inspect = require('eyes').inspector();\nvar awssum = require('awssum');\nvar oauth = awssum.load('oauth');\nvar tumblrService = awssum.load('tumblr/tumblr');\n\nvar env = process.env;\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure it works when unlinking\n"
},
{
"from": "human",
"value": "module.exports = function removeSharedLibraries(project, libraries) {\n if (!libraries.length) {\n return;\n }\n\n const target = project.getFirstTarget().uuid;\n\n for (var name of librarie... | javascript | chosen |
[
{
"from": "system",
"value": "Add a getLine primitive to browser js\n\nMaking console apps to run in the browser is likely a minority taste.\nBut prompt works for input as it's synchronous.\n"
},
{
"from": "human",
"value": "var i$putStr = function(s) {\n console.log(s);\n};\n\nvar i$systemInfo... | javascript | chosen |
[
{
"from": "system",
"value": "Optimize pending order screen load\n"
},
{
"from": "human",
"value": "function openerp_pos_ncf_widgets(instance, module) { //module is instance.point_of_sale\n var QWeb = instance.web.qweb;\n var _t = instance.web._t;\n\n module.PosWidget = module.PosWidget... | javascript | chosen |
[
{
"from": "system",
"value": "Save one request at feed managing.\n"
},
{
"from": "human",
"value": "angular.module('caco.feed.crtl')\n .controller('FeedManageCrtl', function ($rootScope, $scope, $stateParams, $location, Feeds, FeedREST, FeedUrlLookupREST) {\n $rootScope.module = 'feed'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix incorrect option causing crash on logout\n"
},
{
"from": "human",
"value": "import chalk from 'chalk'\nimport getUserConfig from '../../util/getUserConfig'\n\nexport default {\n name: 'logout',\n signature: 'logout',\n description: 'Logs out of the Sanity.io ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve click feedback transition, extend to menus\n"
},
{
"from": "human",
"value": "/*\n * Author: CM\n * Dependencies: jquery.transit.js\n */\n(function($) {\n\n $.clickDecorators.feedback = {\n isApplicable: function($element) {\n return $element.is('.b... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing space before link\n"
},
{
"from": "human",
"value": "/*globals $, GOVUK, suchi */\n/*jslint\n white: true,\n browser: true */\n\n$(function() {\n \"use strict\";\n function browserWarning() {\n var container = $('<div id=\"global-browser-prompt\"></... | javascript | chosen |
[
{
"from": "system",
"value": "Modify text about Typed js\n"
},
{
"from": "human",
"value": "// var txtTarget = $('.main_cover');\n// var txt = txtTarget.html() || '';\n// var leng = txt.length || 0;\n// var timer = '';\n// var cnt = 0;\n\n// $(window).load(function () {\n// if (txtTarget) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Use process.nextTick instead of setTimeout if available\n"
},
{
"from": "human",
"value": "// Wraps any value with promise. Not very useful on its own, used internally\n// by deferred.js\n\n'use strict';\n\nvar curry = require('es5-ext/lib/Function/curry').cal... | javascript | chosen |
[
{
"from": "system",
"value": "Add optional callback to `reload` method in helpers hook\n"
},
{
"from": "human",
"value": "var path = require('path');\n\nvar loadHelpers = require('./load-helpers');\n\nmodule.exports = function(sails) {\n\n return {\n\n /**\n * Before any hooks have begun... | javascript | chosen |
[
{
"from": "system",
"value": "Add navigation links in the navbar\n\nhttps://trello.com/c/azIVrWVs/17-leaderboard\n\nWhile the user always landed at the add entry page, there was\nno way to go to the leaderboard without adding an entry.\n\n- Add a 'Cancel' link in the add entry page\n- Link this to the leade... | javascript | chosen |
[
{
"from": "system",
"value": "Remove options in update-downloaded dialog\n\nCalling quitAndInstall() explicitly caused an error to occur. Instead\nthe user now has to quit the application manually in order to trigger\nthe installation of the update.\n\nThis may be related to\nhttps://github.com/electron-use... | javascript | chosen |
[
{
"from": "system",
"value": "Make injectionPointRegexp more bundler friendly\n"
},
{
"from": "human",
"value": "/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix failing test following strict cli opt addition\n"
},
{
"from": "human",
"value": "jest.dontMock('fs');\njest.dontMock('path');\njest.dontMock(SRC_DIRECTORY + '/cliopts');\n\ndescribe('cliopts.getCLIOptions', () =>\n{\n\n it('Should get the correct CLI options f... | javascript | chosen |
[
{
"from": "system",
"value": "Add description to adapter generator\n"
},
{
"from": "human",
"value": "import { Base } from 'yeoman-generator';\nimport generatorArguments from './arguments';\nimport generatorOptions from './options';\nimport generatorSteps from './steps';\n\nexport default class ... | javascript | chosen |
[
{
"from": "system",
"value": "Set map type to satellite\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport GoogleMapReact from 'google-map-react';\nimport './Harta.css';\n\nconst Participant = ({ text, color }) => {\n return (\n <div\n style={color}\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add fields to Destination model\n"
},
{
"from": "human",
"value": "// npm dependencies\nconst mongoose = require('mongoose');\n\n// Defines Destination model\nlet Destination = mongoose.model('Destination', {\n\timg: {\n\t\ttype: String\n\t},\n\ttitle: {\n\t\ttype: ... | javascript | chosen |
[
{
"from": "system",
"value": "Debug mode for redis (commented out).\n"
},
{
"from": "human",
"value": "// Global registry for our Redis connection.\n// Use this instead of passing around a single 'client' handle.\n// Also allows us to select a database within Redis.\nvar redis = require(\"redis\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix if inbound state in none\n"
},
{
"from": "human",
"value": "import { Map } from 'immutable';\n\nexport const lastStateInit = new Map();\n\nexport function stateIterator(state, callback) {\n return state.forEach(callback);\n}\n\nexport function stateGetter(state... | javascript | chosen |
[
{
"from": "system",
"value": "Add example of ES5 create class component\n"
},
{
"from": "human",
"value": "/* eslint-disable no-console */\nconsole.log('hi');\n"
},
{
"from": "gpt",
"value": "/* eslint-disable no-console */\nconsole.log('hi');\n// Old ES5 way of creating a Class Comp... | javascript | chosen |
[
{
"from": "system",
"value": "Bring `readSource` transform up-to-date with Interlock API.\n"
},
{
"from": "human",
"value": "export default function (opts = {}) {\n const isJsonFile = opts.filter || /\\.json$/;\n return (override, transform) => {\n transform(\"readSource\", function (source... | javascript | chosen |
[
{
"from": "system",
"value": "Add default state to handleAction's return fn\n"
},
{
"from": "human",
"value": "function isFunction (obj) {\n return !!(obj && obj.constructor && obj.call && obj.apply)\n}\n\nfunction createActionHandler (ignore) {\n // redux-ignore higher order reducer\n return... | javascript | chosen |
[
{
"from": "system",
"value": "Check config for auth before asking user for auth\n\nFixes #75\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar db = require(\"./lib/firebase\"),\n routes = require(\"./routes\");\n\n// Don't actually want the exports, just want it bundled\nrequire(\... | javascript | chosen |
[
{
"from": "system",
"value": "Add tiny bit of validation to check if the request is a GitHub request or not\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst childProcess = require('child-process-promise');\nconst express = require('express');\nconst path = require('path');\nconst fs = r... | javascript | chosen |
[
{
"from": "system",
"value": "Remove DOMContentLoaded event listener after it's used\n"
},
{
"from": "human",
"value": "import detectIt from 'detect-it';\nimport addListener from 'the-listener';\n\nfunction setupCurrentInput() {\n const body = document.querySelector('body');\n let currentInput... | javascript | chosen |
[
{
"from": "system",
"value": "Check if SMART_CONFIG_DIR env var exists\n"
},
{
"from": "human",
"value": "import convict from 'convict';\nimport path from 'path';\nimport fs from 'fs';\n\n// check and load convict schema\nconst schemaFile = path.join(process.env.SMART_CONFIG_DIR, 'schema'));\ntr... | javascript | chosen |
[
{
"from": "system",
"value": ":new: Add support for non-common file paths\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst callsite = require('sb-callsite')\nconst nameRegex = /[\\\\\\/]packages[\\\\\\/]([^\\\\\\/]+)[\\\\\\/]/\n\nexport function guessFromFilePath(filePath) {\n const mat... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Do not export anything to global environment.\"\n\nThis reverts commit 1e852aad0dec9cdf935b3511ea8e2d4dfbf1826d.\n"
},
{
"from": "human",
"value": "import Stack from './stack';\nimport Card from './card';\n\nexport {\n Stack,\n Card\n};\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Create second level dovument with the html URL interface\n"
},
{
"from": "human",
"value": "// @flow\n\n// The argument is a full url. The function returns the last two elements of the\n// domain.\nexport const secondLevelDomain = (url:string): string => {\n if (ur... | javascript | chosen |
[
{
"from": "system",
"value": "Update help for the registry option, which is now a URI.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar updater = require('update-notifier'),\n\tpkg = require('../package.json');\n\nupdater({pkg: pkg}).notify();\n\nvar yargs = require('yargs')\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Add Order.construct form helper method\n"
},
{
"from": "human",
"value": "Occasion.Modules.push(function(library) {\n library.Order = class Order extends library.Base {};\n\n library.Order.className = 'Order';\n library.Order.queryName = 'orders';\n\n library.Or... | javascript | chosen |
[
{
"from": "system",
"value": "Put auth middleware further down the chain\n\nThis is because otherwise it wouldn't catch the requester events\n"
},
{
"from": "human",
"value": "import thunk from 'redux-thunk'\nimport createLogger from 'redux-logger'\nimport { browserHistory } from 'react-router'\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove empty calls to success() and error() in LastScreenController\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('core').controller('LastScreenController', ['$scope', 'TrialData', '$http',\n function($scope, TrialData, $http) {\n $htt... | javascript | chosen |
[
{
"from": "system",
"value": "Use a Symbol for storing the prop cache where available.\n"
},
{
"from": "human",
"value": "// render modes\nexport const NO_RENDER = { render: false };\nexport const SYNC_RENDER = { renderSync: true };\nexport const DOM_RENDER = { build: true };\n\nexport const EMP... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Google Analytics with the recommended snippet\n"
},
{
"from": "human",
"value": "<!-- Google Analytics -->\n<script>\nwindow.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;\nga('create', 'UA-1687066-2', 'auto');\nga('send', 'pageview');... | javascript | chosen |
[
{
"from": "system",
"value": "Test that mounted heads change the title correctly\n"
},
{
"from": "human",
"value": "var assert = chai.assert,\n html = React.DOM.html,\n title = React.DOM.title,\n FrozenHead = ReactFrozenHead;\n\nvar page = function (pageTitle) {\n return (\n h... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate away from componentWillMount in declarative bootstrap container\n"
},
{
"from": "human",
"value": "/* eslint-disable no-underscore-dangle */\n\nimport PropTypes from 'prop-types';\nimport { Component } from 'react';\nimport bootstrap from 'bootstrap';\n\n/**... | javascript | chosen |
[
{
"from": "system",
"value": "Use const and let keywords\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar minimatch = require('minimatch');\n\nmodule.exports = function(env, callback) {\n function list(contents) {\n var entries = [];\n\n for (var key in contents._) {\n if (con... | javascript | chosen |
[
{
"from": "system",
"value": "Send context for on event listeners\n"
},
{
"from": "human",
"value": "console.log('background.js');\n\n\nconfig.background = true;\n\n\n/**\n * Create an app with the config and accounts\n */\napp = new App({\n model: config,\n collection: accounts,\n});\n\n\n/**... | javascript | chosen |
[
{
"from": "system",
"value": "Update ValueLink To Use Timepicker's ValueLink\n\nUpdate ValueLink to use the Timepicker's Valuelink in order to update\nthe text in the Timepicker's Popup\n"
},
{
"from": "human",
"value": "let React = require(\"react\")\nlet cx = require(\"classnames\")\nlet popup... | javascript | chosen |
[
{
"from": "system",
"value": "Add logic to check signature.\n"
},
{
"from": "human",
"value": "module.exports = {\n checkToken (ctx) {\n let requestBody = ctx.request.query\n console.log(requestBody)\n // 微信加密签名,signature结合了开发者填写的token参数和请求中的timestamp参数、nonce参数。\n let signature = re... | javascript | chosen |
[
{
"from": "system",
"value": "TST: Remove tmp folder at end of tests\n"
},
{
"from": "human",
"value": "describe( 'esbeautifier', function () {\n var expand = require( 'glob-expand' );\n var path = require( 'path' );\n\n var exec = require( '../lib/exec' );\n var read = function ( file ) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Improve logging for HTTP debug mode\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar expect = require('chai').expect;\n\nvar Fabric = require('../');\nvar server = new Fabric.HTTP();\n\ndescribe('HTTP', function () {\n before(function (done) ... | javascript | chosen |
[
{
"from": "system",
"value": "[test] Use single quotes for consistency.\n"
},
{
"from": "human",
"value": "var expect = require(\"expect.js\"),\n qrcode = require('./../lib/main'),\n sinon = require(\"sinon\");\n\ndescribe('in the main module', function() {\n describe(\"the generate met... | javascript | chosen |
[
{
"from": "system",
"value": "Change LineIO class to emit via nextTick()\n"
},
{
"from": "human",
"value": "\"use strict\";\n//handy routines for line-oriented communications protocols\nvar events=require(\"events\");\nvar util=require(\"util\");\n\n\nfunction LineIO(myconn) //inherits-from...\n... | javascript | chosen |
[
{
"from": "system",
"value": "Test for interaction with search using moenzyme mount\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\n\nconst { expect } = require('chai')\nconst React = require('react')\nconst Search = require('../js/Search')\nconst ShowCard = require('../js/ShowCard')\... | javascript | chosen |
[
{
"from": "system",
"value": "Check response headers for tags\n"
},
{
"from": "human",
"value": "var onHeaders = require('on-headers');\n\nmodule.exports = cacheTagMw;\n\nfunction cacheTagMw(req, res, next) {\n\tonHeaders(res, function() {\n\t\tif (res.statusCode >= 200 && res.statusCode < 300) ... | javascript | chosen |
[
{
"from": "system",
"value": "Test shallow render of <App/>\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\n\nxit('renders without crashing', () => {\n const div = document.createElement('div');\n ReactDOM.render(<... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for os is not defined ReferenceError\n"
},
{
"from": "human",
"value": "\n\n\nexports.onWindows = function() {\n return os.platform() === 'win32';\n}\n"
},
{
"from": "gpt",
"value": "\nvar os = require('os');\n\nexports.onWindows = function() {\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Clear everything up for sample - didn't save on previous commit\n"
},
{
"from": "human",
"value": "(function() {\r\n 'use strict';\r\n\r\n angular.module('Directives')\r\n .service('dropdownService', dropdownService);\r\n\r\n dropdownService.$inject ... | javascript | chosen |
[
{
"from": "system",
"value": "Test sending a notification with a token that doesn\\'t exist\n"
},
{
"from": "human",
"value": "var mercurius = require('../index.js');\nvar request = require('supertest');\nvar assert = require('assert');\n\ndescribe('mercurius', function() {\n before(function() ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix authenticator - refresh was broken\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport Authenticator from 'simple-auth-oauth2/authenticators/oauth2';\nimport ENV from '../config/environment';\n\nexport default Authenticator.extend({\n makeRe... | javascript | chosen |
[
{
"from": "system",
"value": "Add default settings for weboob-installed/weboob-log.\n"
},
{
"from": "human",
"value": "module.exports = {\n duplicateThreshold: 24\n}\n"
},
{
"from": "gpt",
"value": "module.exports = {\n 'weboob-installed': 'false',\n 'weboob-log': 'no log',\... | javascript | chosen |
[
{
"from": "system",
"value": "Test that booklet page count always multiple of 4\n"
},
{
"from": "human",
"value": "import orderPagesBooklet from '../orderPagesBooklet';\n\nconst makePage = function () {\n return { element: document.createElement('div') };\n};\n\ntest('Orders 8', () => {\n cons... | javascript | chosen |
[
{
"from": "system",
"value": "Add response status code check\n"
},
{
"from": "human",
"value": "import request from 'requisition'\n\n/**\n * Description: Makes an asynchronous HTTP call to the parliament RSS feed xml and returns the content (XML).\n * \n * @return {string} The string specifying... | javascript | chosen |
[
{
"from": "system",
"value": "Fix main step change detection\n"
},
{
"from": "human",
"value": "angular.module('facette.ui.pane', [])\n\n.directive('ngPane', function() {\n return {\n restrict: 'A',\n scope: {},\n controller: 'PaneController'\n };\n})\n\n.controller('P... | javascript | chosen |
[
{
"from": "system",
"value": "Change expected value for Select component"
},
{
"from": "human",
"value": "define([], function () {\n\n return {\n 'select': $('select').append('<option>Value</option><option>Value</option>');\n };\n});\n"
},
{
"from": "gpt",
"value": "defi... | javascript | chosen |
[
{
"from": "system",
"value": "Set ttl to 1hr, refresh_ttl to 5hrs, and ttl for forgot password to 24hr\n"
},
{
"from": "human",
"value": "export const URL = 'http://pth.mi-squared.com';\n// export const URL = 'http://localhost:7771';\n"
},
{
"from": "gpt",
"value": "// export const U... | javascript | chosen |
[
{
"from": "system",
"value": "Use css class instead of direct formatting\n\nIn order to preserve the hover effect on the table, use a css class to\nhighlight table rows with active projects.\n"
},
{
"from": "human",
"value": "name: Dashboard - Highlight active projects (Compact View only)\ndescr... | javascript | chosen |
[
{
"from": "system",
"value": "Check that we have a current model in Filter.Thematic\n\nThis filter can get invoked on app start up\n(by Selection.AllSets) even though there is no\ncurrent model in the history store yet. Obviously\nin this case, it can't filter using the current model\nso in that situation w... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug with trailing commas in postcode filter\n"
},
{
"from": "human",
"value": "module.exports = (req, res, next) => {\n const postcode = req.body.uk_postcode\n req.body.uk_postcode = postcode && postcode.split(',')\n next()\n}\n"
},
{
"from": "gpt",... | javascript | chosen |
[
{
"from": "system",
"value": "Make error logs less verbose\n"
},
{
"from": "human",
"value": "module.exports = {\n ELASTICSEARCH_URL: 'http://localhost:62223', // Shared by api-server and CLI evaluation script\n ELASTIC_LOG_LEVEL: 'trace',\n};\n"
},
{
"from": "gpt",
"value": "modul... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for more flexible url pattern\n"
},
{
"from": "human",
"value": "var Backbone = require('backbone');\nvar url = require('url');\n\n\"use strict\";\n\nexports.HistoryUpdate = Backbone.View.extend({\n\n initialize : function () {\n console.log('History... | javascript | chosen |
[
{
"from": "system",
"value": "Remove referencing Backbone.Model's attributes internal structure\n\nWe should *never* use `attributes` as it violates the contract Models:\n\nhttp://backbonejs.org/#Model-attributes\n\nThe contract of a Backbone.Model is that you access the properties held\nin it via `.get('at... | javascript | chosen |
[
{
"from": "system",
"value": "Set `connected` to `true` on `Messenger`.\n\nMaking `Messenger` more pseudo-`process`y by adding a `connected` flag\nan setting it to `true`. This property is set to `true` on `process`\nwhen Node.js IPC's `process.send` function is present and the IPC pipe\nis open. I assume t... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Add angular to document directly\"\n\nThis reverts commit 09212f1a5b650856cab67ffa080830f1505a3944.\n"
},
{
"from": "human",
"value": "import test from 'ava';\nimport jsdom from 'jsdom';\nimport fs from 'fs';\n\n\ntest.before(t => {\n // Angular dependenci... | javascript | chosen |
[
{
"from": "system",
"value": "Add stateParams to controller functions\n"
},
{
"from": "human",
"value": "var app = angular.module(\"browseApp.mainctrls\", []);\n\napp.controller(\"header\", function($scope){\n// $scope.header = \"Welcome to Fey Anthology!\";\n});\n\n\n/*\n* Main controller fo... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust initial state of user\n"
},
{
"from": "human",
"value": "import actionTypes from '../constants/actionTypes';\n\nexport default (state = {}, action) => {\n switch (action.type) {\n case actionTypes.LOGIN_USER: {\n return {\n token: action.token... | javascript | chosen |
[
{
"from": "system",
"value": "Allow save, remove, validate methods execution in multiple environments\n"
},
{
"from": "human",
"value": "function isEnvironment(environment) {\n if (environment === 'client' && !Meteor.isClient) {\n return false;\n }\n else if (environment === 'server' && !M... | javascript | chosen |
[
{
"from": "system",
"value": "Swap query/refresh button spots on list screen\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport {Box} from \"adminlte\";\n\nimport LinkedListGroup from \"app/components/LinkedListGroup\";\nimport Pagination from \"app/components/Pagination\";\... | javascript | chosen |
[
{
"from": "system",
"value": "Update mm control for new style\n"
},
{
"from": "human",
"value": "wax = wax || {};\nwax.mm = wax.mm || {};\n\nwax.mm.interaction = function() {\n var dirty = false, _grid;\n\n function grid() {\n var zoomLayer = map.getLayerAt(0)\n .levels[M... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to Bocoup's hosted browserify-cdn.\n\nResolves #220\n"
},
{
"from": "human",
"value": "//\n// moduleBundler\n// Adds support for 'require' calls in Gistbooks\n//\n\nimport * as bb from 'backbone';\nimport * as _ from 'underscore';\nimport * as detective from ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix production URL to GraphQL API is relative URL used\n"
},
{
"from": "human",
"value": "import url from 'url';\n\nexport const isApiExternal = !!url.parse(__API_URL__).protocol;\nexport const apiUrl = !isApiExternal\n ? `${window.location.protocol}//${window.loca... | javascript | chosen |
[
{
"from": "system",
"value": "BAP-457: Delete user error\n- fix bug\n"
},
{
"from": "human",
"value": "/**\n * Delete action with confirm dialog, triggers REST DELETE request\n *\n * @class OroApp.DatagridActionDelete\n * @extends OroApp.DatagridAction\n */\nOroApp.DatagridActionDelete = OroAp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix scroll to top when using the menu\n"
},
{
"from": "human",
"value": "import { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { withRouter } from 'react-router';\n\nconst EXCEPTIONS = [\n 'table',\n 'mitigation',\n 'adaptation',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add option to generate JSON file\n"
},
{
"from": "human",
"value": "var async = require( \"async\" );\nvar cta = require( \"./chicago-cta\" );\n\nvar main = function() {\n\n var tasks = [ cta.bus.getRoutes, cta.bus.getDirections, cta.bus.getStops ];\n\n async.... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak Onionoo instance object check to follow consistent pattern\n"
},
{
"from": "human",
"value": "import test from 'ava'\nimport Onionoo from '../'\n\ntest('Onionoo is a function', t => {\n t.is(typeof Onionoo, 'function')\n})\n\ntest('Onionoo cannot be invoked w... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JSCS of generated model files\n"
},
{
"from": "human",
"value": "import { Model as <%= className %>Mixin<%if (projections) {%>, defineProjections<%}%> } from '../mixins/regenerated/models/<%= name %>';\nimport <%if(parentModelName) {%><%= parentClassName %>Model... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.