conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add mode config based on MIN env variable\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport MiniCssExtractPlugin from 'mini-css-extract-plugin';\n\nconst sourcePath = path.join(__dirname, './src');\nconst distPath = path.join(__dirname, './dist');\... | javascript | chosen |
[
{
"from": "system",
"value": "Manipulation: Check state lost if the name is set for Android 4.0-4.3\n\nRefs gh-1820\nCloses gh-1841\n"
},
{
"from": "human",
"value": "define([\n\t\"../var/support\"\n], function( support ) {\n\n(function() {\n\tvar fragment = document.createDocumentFragment(),\n\... | javascript | chosen |
[
{
"from": "human",
"value": "Add test for add contact (at the moment is failing)\n"
},
{
"from": "gpt",
"value": "describe('Address Book', function() {\n\tit('should be able to add a contact', function() {\n\t\tvar addressB = new addressBook(),\n\t\t\tthisContact = new Contact();\n\t\taddressB.a... | javascript | chosen |
[
{
"from": "system",
"value": "Update status results in React app\n\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nclass IssueList extends Component {\n constructor() {\n super();\n this.renderIssue = this.renderIssue.bind(this);\n }\n\n renderIssue(issue... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for input from stdin and output to stdout\n"
},
{
"from": "human",
"value": "const {convert} = require('stencila-convert')\n\nmodule.exports = cli => {\n cli\n .command('convert', 'Convert files or folders to other formats')\n\n .argument('<input>', 'In... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite JS compilation task to make use of Webpack\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst pump = require('pump');\nconst rename = require('gulp-rename');\nconst sass = require('gulp-sass');\nconst webpack = require('webpack-stream');... | javascript | chosen |
[
{
"from": "system",
"value": "Add proper file path name\n"
},
{
"from": "human",
"value": "/**\n * ImageController\n *\n * @description :: Server-side logic for managing Images\n * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers\n */\n\nvar cloudinary = require('clou... | javascript | chosen |
[
{
"from": "system",
"value": "Fix backup view if spending password actived\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $timeout, $stateParams, $ionicModal) {\n\n $scope.walletId = $stat... | javascript | chosen |
[
{
"from": "system",
"value": "Change header static content to API data\n"
},
{
"from": "human",
"value": "import './Header.css';\nimport React from 'react';\nimport profile from '../profile.json';\n\nexport default class Header extends React.Component {\n constructor(props) {\n super(props);... | javascript | chosen |
[
{
"from": "system",
"value": "Fix textarea / label association\n"
},
{
"from": "human",
"value": "var html = require('choo/html')\nvar picoModal = require('picomodal')\nvar _ = require('../util')\n\nmodule.exports = function (props, emit) {\n var moves = _.chunksOf(2, props.game.game.moveHistor... | javascript | chosen |
[
{
"from": "system",
"value": "Enforce column constraints similar to form validation\n\n(fixes #844)\n"
},
{
"from": "human",
"value": "/* jslint node: true */\nmodule.exports = (sequelize, { INTEGER, STRING, BOOLEAN, DATE }) => {\n const Recycle = sequelize.define('Recycle', {\n quantity: IN... | javascript | chosen |
[
{
"from": "system",
"value": "Use session middleware before mounting grant\n"
},
{
"from": "human",
"value": "\nvar koa = require('koa')\n , router = require('koa-router')\n , mount = require('koa-mount')\n , bodyParser = require('koa-bodyparser')\n , koaqs = require('koa-qs')\n , session =... | javascript | chosen |
[
{
"from": "system",
"value": "Change events name to adapt to client\n"
},
{
"from": "human",
"value": "var Watcher = require('large-watcher');\n\n\nmodule.exports = function(codebox) {\n var events = codebox.events;\n\n codebox.logger.log(\"Starting the file watcher\");\n\n codebox.work... | javascript | chosen |
[
{
"from": "system",
"value": "Convert init and end to use promises\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar webdriverio = require('webdriverio');\nvar options = {\n desiredCapabilities: {\n browserName: 'phantomjs'\n }\n};\nvar client = webdriverio.remote(options);\n\nbefor... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up fixtures on exit too."
},
{
"from": "human",
"value": "Object.freeze(Object.prototype);\nrequire.paths.unshift('../lib');\nglobal.assert = require('assert');\nglobal.fs = require('fs');\nglobal.Step = require('step');\nglobal.nStore = require('nstore');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add JS bindings to suggestions\n"
},
{
"from": "human",
"value": "// This script contains the code necessary to make requests to the python API,\n// as well as a more general function which is also used to fetch the README\n// for rendering.\n\n\n//Make a synchronou... | javascript | chosen |
[
{
"from": "system",
"value": "Build script: Support specifying the output file\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in... | javascript | chosen |
[
{
"from": "system",
"value": "Add `public` property to Sauce Labs example's `desiredCapabilities`.\n"
},
{
"from": "human",
"value": "var webdriverio = require('../../index'),\n client = webdriverio.remote({\n desiredCapabilities: {\n browserName: 'chrome',\n vers... | javascript | chosen |
[
{
"from": "system",
"value": "Add startup port/ip console log\n"
},
{
"from": "human",
"value": "#!/bin/env node\nvar express = require('express')\n , stylus = require('stylus')\n , nib = require('nib')\nvar util = require('util')\nvar fs = require(\"fs\")\nvar server = express()\n\n\nfunction... | javascript | chosen |
[
{
"from": "system",
"value": "Enable source maps for prod\n"
},
{
"from": "human",
"value": "const config = require(\"./webpack.config\");\nconst webpack = require(\"webpack\");\n\nconst cdnUrl = process.env.CDN_URL || \"/\";\n\nconfig.plugins = (config.plugins || []).concat([\n new webpack.Def... | javascript | chosen |
[
{
"from": "system",
"value": "Implement express routes using app.get combining directory and filename location\n"
},
{
"from": "human",
"value": "// import necessary packages\n// path fs and express\n\n// create app\n// instantiate var app equal to express()\n\n// define view engine\n// app.set ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix model schema type to only return `type` property\n"
},
{
"from": "human",
"value": "class ModelSchema {\n\tconstructor(model, query) {\n\t\tthis.model = model\n\t\tthis.query = query || 'default'\n\t}\n\n\tget type() {\n\t\treturn this.model.describe()\n\t}\n\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove fact from list once used\n"
},
{
"from": "human",
"value": "var AWS = require(\"aws-sdk\");\nAWS.config.update({region: 'us-east-1'});\n\nexports.handler = function(event, context) {\n var s3 = new AWS.S3();\n var params = {Bucket: 'cat-assets', Key: 'c... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to clear the answers\n"
},
{
"from": "human",
"value": "/*\nIn the general preferences you should put something like:\nrequire(['TrackOptions'], function(TrackOptions) {\n TrackOptions('massOptions');\n})\n*/\n\ndefine([], function () {\n function watchA... | javascript | chosen |
[
{
"from": "system",
"value": "Support configuration via query params\n"
},
{
"from": "human",
"value": "var ngAnnotate = require('ng-annotate');\nvar utils = require('loader-utils');\nvar SourceMapConsumer = require('source-map').SourceMapConsumer;\nvar SourceMapGenerator = require('source-map')... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing use strict statements\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\nvar loaderUtils = require('loader-utils');\n\nmodule.exports = function (source) {\n 'use strict';\n if (this.cacheable) {\n this.cacheable();\n }\n var allLoader... | javascript | chosen |
[
{
"from": "system",
"value": "Mark the close map dialog button with role button\n\nBug: T308320\nChange-Id: I429ec8a081614d90e2b82e5e31918b9e61ca602d\n"
},
{
"from": "human",
"value": "/**\n * # Control to close the full screen dialog.\n *\n * See [L.Control](https://www.mapbox.com/mapbox.js/api... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"SCSS source file path change\"\n\nThis reverts commit b16498c2df129a6eff0c03ea97cbf588874fc99c.\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar sass = require('node-sass');\n\nsass.render({\n file: '../styles/main.scss',\n outputStyle:... | javascript | chosen |
[
{
"from": "system",
"value": "Fix where the test harness gets its Tokenizer\n"
},
{
"from": "human",
"value": "var stream = require('stream');\nvar util = require('util');\nvar Tokenizer = require('./lib/ConfluenceTokenizer.js');\n\nvar debug = true;\n\nfunction Stringify() {\n stream.T... | javascript | chosen |
[
{
"from": "system",
"value": "[docs] Fix small coding style issue\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {Tabs, Tab} from 'material-ui/Tabs';\n\nconst styles = {\n headline: {\n fontSize: 24,\n paddingTop: 16,\n marginBottom: 12,\n fontWeight: 400,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 2FA token selector, ensuring token is cleared after invalid token\n"
},
{
"from": "human",
"value": "$(function() {\n load($('form.login'));\n});\n\nfunction load($f) {\n $f.submit(function() {\n $f.find('.submit').attr('disabled', true);\n $.ajax({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Configure stylelint to pick up hard-coded colors\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: '@wagtail/stylelint-config-wagtail',\n rules: {\n 'scss/at-rule-no-unknown': [\n true,\n {\n ignoreAtRules: [\n 'tailwind... | javascript | chosen |
[
{
"from": "system",
"value": "Update blood death knight for soft mitigation check split damage schools.\n"
},
{
"from": "human",
"value": "import CoreMitigationCheck from 'parser/shared/modules/MitigationCheck';\nimport SPELLS from 'common/SPELLS';\n\n\nclass MitigationCheck extends CoreMitigati... | javascript | chosen |
[
{
"from": "system",
"value": "Add wrapping modulators for js and rename amd.\n"
},
{
"from": "human",
"value": "compiler.mode.compile = def(\n [\n compiler.bootstrap.generator,\n compiler.compile.compiler,\n compiler.compile.configurator\n ],\n\n function (generator, compiler, config... | javascript | chosen |
[
{
"from": "system",
"value": "Create mongo schema and prepare routes generator\n"
},
{
"from": "human",
"value": "/**\n * Module dependencies.\n */\n\nvar fs = require('fs');\nvar mongoose = require('mongoose');\n\n/**\n * Application prototype.\n */\n\nvar res = Resources.prototype;\n\n/**\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Use non-reducible displayName property of 'connect' container\n"
},
{
"from": "human",
"value": "export function getRouteName(route) {\n const component = route.component;\n\n if (component.name === 'Connect') {\n const wrapped = component.WrappedComponent;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a minor formatting issue\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport Promise from 'bluebird';\n\nexport function ensureArray(value) {\n if (!_.isUndefined(value)) {\n return [].concat(value);\n }\n}\n\nexport function chainThenables(t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix minor issue in router events\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = routingEvents;\n\n/* @ngInject */\nfunction routingEvents($rootScope, $log) {\n\n var notFoundDeregistration = $rootScope.$on('$stateNotFound', function (event, un... | javascript | chosen |
[
{
"from": "system",
"value": "Add `--reset` to lockfile update instruction\n"
},
{
"from": "human",
"value": "/* eslint-disable no-console */\nconst shell = require('shelljs');\n\n// exit with code 1 if there are some changed files\nif (shell.exec('git status --porcelain').stdout.trim() !== '') ... | javascript | chosen |
[
{
"from": "system",
"value": "Add auth0 management service to user controller\n"
},
{
"from": "human",
"value": "const users = require('collections-online/lib/controllers/users');\nconst kbhStatsApi = require('../services/kbh-billeder-stats-api');\n\nusers.renderProfile = async (req, res) => {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Allow map filename to be defined in options\n"
},
{
"from": "human",
"value": "/*\n * grunt-assets-map\n * https://github.com/Peterbyte/grunt-assets-map\n *\n * Copyright (c) 2015 Peter Bouquet\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar fs = re... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"lets try with firefox\"\n\nThis reverts commit 8bcd8d6d41561d53ac66e371785a2608ba2ba266.\n"
},
{
"from": "human",
"value": "var config = {\n allScriptsTimeout: 11000,\n\n specs: [\n 'e2e/**/*.js'\n ],\n\n capabilities: {\n 'browserName': 'firefox'... | javascript | chosen |
[
{
"from": "system",
"value": "Add user active flag checking\n"
},
{
"from": "human",
"value": "import { Strategy } from 'passport-local';\nimport bcrypt from '../bcrypt';\nimport models from '../../models';\n\nconst strategy = new Strategy('local', (username, password, done) =>\n models.user.fi... | javascript | chosen |
[
{
"from": "system",
"value": "Update seed script to use specific ids for branches\n"
},
{
"from": "human",
"value": "'use strict';\nvar Branch = require('../../src/backend/models').Branch;\nvar Group = require('../../src/backend/models').Group;\nvar uuid = require('node-uuid');\n\nvar newBranch;... | javascript | chosen |
[
{
"from": "system",
"value": "Use fat arrow function for more concise code\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst promisify = require('promisify-node')\nconst ghissues = promisify('ghissues')\nconst semverRegex = require('semver-regex')\n\nconst logger = require('../logging').l... | javascript | chosen |
[
{
"from": "system",
"value": "[DEV] Return only \"operators\" without the leading `$` in order to make them less harmful if you want to log them or even store them in a database.\n"
},
{
"from": "human",
"value": "var mongoOperators = require('./operators');\nvar operatorRegEx = new RegExp(/(\\$... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude Nockful tests in Node.js < 8.\n"
},
{
"from": "human",
"value": "const nockfulTests = ['iteration'];\n\nfunction createProject(displayName, testRegex, rest) {\n return Object.assign({}, rest, {\n testEnvironment: 'node',\n setupFilesAfterEnv: ['jest-b... | javascript | chosen |
[
{
"from": "system",
"value": "Fix quoteWidth bug; minor cleanup"
},
{
"from": "human",
"value": "$(function(){\n // vars for testimonials carousel\n var $txtcarousel = $('#testimonial-list');\n var txtcount = $txtcarousel.children().length;\n var quoteWidth = $('.carousel-wrap li').get(0).cs... | javascript | chosen |
[
{
"from": "system",
"value": "Add xhrInterceptor.spec to specs exports\n"
},
{
"from": "human",
"value": "export { databaseSpec } from './database_spec';\nexport { routerSpec } from './router_spec';\nexport { serverSpec } from './server_spec';\nexport { responseSpec } from './response_spec';\nex... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the patch package to be compatible with Yarn.\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst path = require('path');\n\nfunction patch(packageJson, depName, hostPackageName) {\n if (packageJson[depName] && packageJson[depName][hostPackageNa... | javascript | chosen |
[
{
"from": "system",
"value": "Remove event listeners at end of level\n"
},
{
"from": "human",
"value": "function runLevel(level, Display) {\n\tlet display = new Display(document.body, level);\n\tlet state = State.start(level);\n\tlet ending = 1;\n\tlet suspended = false;\n\n\treturn new Promise(... | javascript | chosen |
[
{
"from": "system",
"value": "Increase readability of card.group method\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar extend = require('xtend/mutable');\n\nfunction CardType (name, config) {\n extend(this, {name: name}, config);\n}\n\nCardType.prototype.luhn = true;\n\nCardType.protot... | javascript | chosen |
[
{
"from": "system",
"value": "Use IRB to run code\n"
},
{
"from": "human",
"value": "var app = require('http').createServer(),\n io = require('socket.io').listen(app),\n exec = require('child_process').execFile;\n\nvar tones = io.of('/ruby').on('connection', function(socket) {\n socket.... | javascript | chosen |
[
{
"from": "system",
"value": "Add get request with anonymous function that returns formatted timestamp from url param\n"
},
{
"from": "human",
"value": "\n/**\n * @description a string as a parameter, passed through the url, is checked to see whether that string contains either a\n * unix times... | javascript | chosen |
[
{
"from": "system",
"value": "Change development and production ports\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar connect = require('connect');\nvar serveStatic = require('serve-static');\n\nvar port = process.env.NODE_ENV === 'development' ? 6001 : 3000;\n\nconnect()\n .use(serveSta... | javascript | chosen |
[
{
"from": "system",
"value": "Use timeout (bleh) to handle exec($0) order\n"
},
{
"from": "human",
"value": "var app = require('http').createServer(),\n io = require('socket.io').listen(app),\n spawn = require('child_process').spawn,\n fs = require('fs');\n\nvar tones = io.of('/ruby').o... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Add erpnext website theme import\n"
},
{
"from": "human",
"value": "// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors\n// MIT License. See license.txt\n\nfrappe.ui.form.on('Website Theme', {\n\tapply_custom_theme(frm) {\n\t\tlet custom_theme... | javascript | chosen |
[
{
"from": "system",
"value": "Use the slash module to support windows pathes\n"
},
{
"from": "human",
"value": "export default function() {\n class BabelRootImportHelper {\n\n root = global.rootPath || process.cwd()\n\n transformRelativeToRootPath(importPath, rootPathSuffix, rootPathPrefi... | javascript | chosen |
[
{
"from": "system",
"value": "[minor] Use the defaultExt setting in `ecstatic`.\n"
},
{
"from": "human",
"value": "var union = require('union'),\n ecstatic = require('ecstatic');\n\nvar is2014 = /2014\\./;\n\n//\n// ### redirect(res)\n// World's simplest redirect function\n//\nfunction red... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor code using latest syntax\n"
},
{
"from": "human",
"value": "module.exports = (sequelize, DataTypes) => {\n const Group = sequelize.define('Group', {\n name: {\n type: DataTypes.STRING,\n allowNull: false,\n },\n description: {\n typ... | javascript | chosen |
[
{
"from": "system",
"value": "Use a query param to determine the number of items to render.\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n var dummyData = require('../dummy-data');\n\n module.exports = {\n route: {\n path: '/poi',\n me... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate info command to post http method\n"
},
{
"from": "human",
"value": "var version = require(\"../actions/version\");\nvar request = require(\"request\");\n\nvar info = function(host){\n url = host+JSON.stringify(version.action);\n \n request(url, function(er... | javascript | chosen |
[
{
"from": "system",
"value": "Make use of Keen addons for event data\n"
},
{
"from": "human",
"value": "const KeenTracking = require('keen-tracking');\n\nconst client = new KeenTracking({\n projectId: process.env.KEEN_PROJECT_ID,\n writeKey: process.env.KEEN_WRITE_KEY\n});\n\nmodule.exports = ... | javascript | chosen |
[
{
"from": "system",
"value": "Clear timeout when door opened\n"
},
{
"from": "human",
"value": "const log = require('./logger.js').create('LOCK DRIVER');\n\nclass LockDriver {\n constructor(lock, sensor){\n this.lock = lock;\n this.sensor = sensor;\n this.sensor.on('close... | javascript | chosen |
[
{
"from": "system",
"value": "Allow canary build to fail for now (embroider compatibility issue)\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst getChannelURL = require('ember-source-channel-url');\n\nmodule.exports = async function () {\n return {\n useYarn: true,\n scenarios: ... | javascript | chosen |
[
{
"from": "system",
"value": "Update form binding for migration\n"
},
{
"from": "human",
"value": "/* eslint-disable require-jsdoc,max-len */\nimport 'whatwg-fetch';\n\nfunction migrate(username, password) {\n const formData = new FormData();\n formData.append('username', username);\n formDat... | javascript | chosen |
[
{
"from": "system",
"value": "Remove object to array converter\n"
},
{
"from": "human",
"value": "import { ActionTypes } from '../config/constants';\nimport { ref } from '../config/constants';\n\nexport const addItem = payload => {\n\treturn {\n\t\ttype: ActionTypes.BUDGETS_ADD_ITEM,\n\t\tpayloa... | javascript | chosen |
[
{
"from": "system",
"value": "Use License in esling config file\n\nThe .eslintrc.js file needs a license so I added one.\n\nChange-Id: I212e78b42c0c75f1b58d59712702e83f2cd4d14c\n"
},
{
"from": "human",
"value": "module.exports = {\n \"extends\": [\"eslint:recommended\", \"google\"],\n \"env\":... | javascript | chosen |
[
{
"from": "system",
"value": "Disable rules we don't currently follow\n\nWe're inheriting a lot of rules from the ilios ember default that we\ndon't currently support here. We'll get to them in time, but disable\nthem for now.\n"
},
{
"from": "human",
"value": "module.exports = {\n root: true,\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with components controller\n\nThe controller was resetting the family key if it didn't match the\nprevious which meant some components were being lost. It should\nhave just been checking for the existence of that key before\nsetting a new empty array.\n\nThis change f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove uncaught exception handlers from dependencies\n"
},
{
"from": "human",
"value": "var opus = require(\"./opus-js/opus\");\nvar resampler = require(\"./opus-js/resampler\");\n\nmodule.exports.Opus = opus.Opus;\nmodule.exports.OpusApplication = opus.OpusApplicat... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in help message.\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2015, Facility for Rare Isotope Beams\n *\n */\n\n(function() {\n\n\tfunction hideCompareButton() {\n\t\t$('.compare-button').addClass('hidden');\n\t};\n\n\tfunction showCompareButton(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix in-app links inside noscript contexts\n\nSummary:\nThese were rendering without `href`, which made them unclickable. See\ncomments in this patch for explanation of the root cause and fix.\n\nTest Plan:\nVisit `/skills` in a text-based browser like `lynx` or a graphical\nbro... | javascript | chosen |
[
{
"from": "system",
"value": "Add get and post helpers, token handling to api helper\n"
},
{
"from": "human",
"value": "'use strict';\n\n/*\n * Abstration layer for various RESTful API calls\n */\n\nvar apihandler = angular.module('apihandler', []);\n\napihandler.factory('apiFactory', function (... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Change calculateReserves minimum value to zero\"\n\nThis reverts commit d84468b7631cf9c08d1f9d185f59f36c79d16d68.\n"
},
{
"from": "human",
"value": "import {\n fromPairs,\n head,\n last,\n max,\n mapObjIndexed,\n sortBy,\n toPairs,\n} f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix redirect issue when registering\n"
},
{
"from": "human",
"value": "function UserRegisterCtrl(\n $scope, $state, UserService, CurrentUserService,\n) {\n var vm = this;\n\n vm.register = register;\n\n function register(user) {\n UserService.register(user).t... | javascript | chosen |
[
{
"from": "system",
"value": "Add shebang line. Change startup banner\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar compression = require('compression');\n\nvar app = express();\napp.use(compression());\napp.set('view engine', 'ejs');\n\napp.get('/', function (req, re... | javascript | chosen |
[
{
"from": "system",
"value": "Add browser history with history module\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport ReactDOM from 'react-dom'\nimport createStore from './store/createStore'\nimport AppContainer from './containers/AppContainer'\n\nconst store = createStore(i... | javascript | chosen |
[
{
"from": "system",
"value": "docs(slotting): Add comment describing why so many arguments are being passed to createTreeWalker().\n"
},
{
"from": "human",
"value": "import isRootNode from './is-root-node';\nimport isSlotNode from './is-slot-node';\n\nexport default function(root) {\n const wal... | javascript | chosen |
[
{
"from": "system",
"value": "Add toJson option to verify PDF\n"
},
{
"from": "human",
"value": "import multihash from 'multihashes';\nimport bs58 from 'bs58';\nimport invertHash from 'invert-hash';\nimport objectPath from 'object-path';\nimport readFromPDF from './readFromPDF';\nimport hashPDF ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console.log from snapshot tab navigation JS\n\nChange-Id: I77a3a70b647234701c723b4902e434a0e87287bb\n"
},
{
"from": "human",
"value": "(function() {\n var navSelector = '.snapshot-diff-image .nav'\n\n $(document).on('click', navSelector + ' a', function(e) ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for handling of zero-length declaration blocks\n"
},
{
"from": "human",
"value": "/*! Parker v0.0.0 - MIT license */\n\n'use strict';\n\nvar _ = require('underscore');\n\nfunction CssRule(raw) {\n this.raw = raw;\n}\n\nCssRule.prototype.getSelectors = functio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix makeCancelable promise Unhandled rejection warning\n"
},
{
"from": "human",
"value": "export function makeCancelable(promise) {\n let hasCanceled_ = false;\n\n const wrappedPromise = new Promise((resolve, reject) => {\n promise.then((val) =>\n hasCance... | javascript | chosen |
[
{
"from": "system",
"value": "Fix AOS detection in MutationObserver\n"
},
{
"from": "human",
"value": "let callback = () => {};\n\nfunction ready(selector, fn) {\n const doc = window.document;\n const MutationObserver =\n window.MutationObserver ||\n window.WebKitMutationObserver ||\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add spec for partial caching issue\n"
},
{
"from": "human",
"value": "var assert = require(\"assert\");\nvar vows = require(\"vows\");\nvar Writer = require(\"./../mustache\").Writer;\n\nvows.describe(\"Mustache.Writer\").addBatch({\n \"A Writer\": {\n topic: fu... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused code for codacity analysis\n"
},
{
"from": "human",
"value": "//test/dom-extractor-spec.js\nvar domextractor = require(\"../src/dom-extractor\");\n\ndescribe(\"extractor fetcher\", function() {\n\tit(\"should handle empty parameter\", function() {\n\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix next activities on start date and not end date\n"
},
{
"from": "human",
"value": "(function ($) {\n 'use strict';\n\n setNextActivities();\n function setNextActivities() {\n\n $.ajax({\n url: \"/next_activities\"\n }).done(funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add border line around snake 'rings'\n"
},
{
"from": "human",
"value": "class Screen {\n constructor(squares, squareSize, context) {\n this.height = squares * squareSize;\n this.width = this.height;\n this.squares = squares;\n this.squareSize = squareSi... | javascript | chosen |
[
{
"from": "system",
"value": "Allow Ember to detect the extension\n"
},
{
"from": "human",
"value": "window.addEventListener('message', function(event) {\n if (event.data === 'debugger-client') {\n var port = event.ports[0];\n listenToPort(port);\n } else if (event.data.type) {\n chro... | javascript | chosen |
[
{
"from": "system",
"value": "Fix build failure due to git-rev.json opening nonexistent directory.\n"
},
{
"from": "human",
"value": "'use strict';\r\n\r\nconst fs = require('fs');\r\nconst gitRev = require('git-rev');\r\nconst path = require('path');\r\n\r\nmodule.exports = class WebpackEmitGit... | javascript | chosen |
[
{
"from": "system",
"value": "Deal with decimal, currently 5 digits to appear after the decimal point\n"
},
{
"from": "human",
"value": "var num;\nvar num_str;\nvar result = '';\n\n// check args\nif (process.argv.length < 3) { // sample value\n num = Math.floor(Math.random() * 1000000000) + 1;\... | javascript | chosen |
[
{
"from": "system",
"value": "Test case for Constructor use a matrix as the parameter\n"
},
{
"from": "human",
"value": "var assert = require('chai').assert;\nvar GOL = require('../lib/gol-engine.js');\n\ndescribe('Test GOL constructor & methods', function() {\n it('Test Constructor, getCols() ... | javascript | chosen |
[
{
"from": "system",
"value": "Add import fields to Movie\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose')\n\nvar classification = {\n author: String,\n buyer: {_id: mongoose.Schema.Types.ObjectId, name: String},\n billing: {_id: mongoose.Schema.Types.ObjectId, name: Strin... | javascript | chosen |
[
{
"from": "system",
"value": "Remove coverage report (it's empty anyway).\n"
},
{
"from": "human",
"value": "module.exports = function( config ) {\r\n\t'use strict';\r\n\r\n\tconfig.set( {\r\n\t\tautoWatch: false,\r\n\t\tbasePath: '../../',\r\n\t\tbrowsers: ['PhantomJS', 'Firefox', 'Chrome'],\r\... | javascript | chosen |
[
{
"from": "system",
"value": "Set knob min range to 0 instead of 1\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { number, select } from '@storybook/addon-knobs/react';\nimport { Box, TextBody } from '../components';\n\nconst... | javascript | chosen |
[
{
"from": "system",
"value": "Add getters for width, height, context and canvas\n"
},
{
"from": "human",
"value": "var methodNames = ['fill', 'stroke', 'save', 'restore', 'lineTo', 'moveTo', 'arc', 'translate', 'rotate', 'rect', 'beginPath', 'closePath', 'clearRect'];\nvar setterNames = ['fillSt... | javascript | chosen |
[
{
"from": "system",
"value": "Update spectator mode by default\n"
},
{
"from": "human",
"value": "module.exports = {\n debugMode: false,\n spectatorMode: true,\n trailerMode: false,\n\n offColor: 0x2e2d38,\n bouncersColor: 0x9E3F36,\n bulrushesColor: 0x39b620,\n flyersColor: 0xC9CC1E,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add @api stable annotation to ol.Size\n"
},
{
"from": "human",
"value": "goog.provide('ol.Size');\ngoog.provide('ol.size');\n\n\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array.<number>}\n * @api\n */\nol.Size;\n\n\n/**\n * Co... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify state setting internally (lose immutability)\n"
},
{
"from": "human",
"value": "import { select, local } from \"d3-selection\";\nvar stateLocal = local(),\n renderLocal = local(),\n noop = function (){};\n\nexport default function (tagName, className)... | javascript | chosen |
[
{
"from": "system",
"value": "Remove matrix prefix for sanitization\n"
},
{
"from": "human",
"value": "'use strict';\n\nclass Common {\n\n static sanitizeNickname(nickname) {\n return nickname.replace(/[^a-z]/ig, '').toLowerCase();\n }\n\n static avoidHighlighting(nickname) {\n ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.