conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add test for failing assignment to super setter.\n"
},
{
"from": "human",
"value": "class Base {\n get sound() {\n return 'I am a ' + this.type + '.';\n }\n}\n\nclass Animal extends Base {}\n\nclass Cat extends Animal {\n get type() { return 'cat'; }\n\n get ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a function for notifying DataModels about ID changes\n"
},
{
"from": "human",
"value": "var datastore = require('../lib/environment').datastore,\n util = require('util');\n\nmodule.exports = DataModel;\n\nfunction DataModel() {\n}\n\nDataModel.prototype.save ... | javascript | chosen |
[
{
"from": "system",
"value": "Change sb schema and add comments\n"
},
{
"from": "human",
"value": "const Realm = require('realm');\n\nconst schema = {\n schema: [\n { name: 'Alert',\n properties: {\n slug: 'string',\n long: 'float',\n lat: 'float'\n }\n }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Support Scale Different Option on Bind-scale\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nconst {isArray} = Ember;\nconst {keys} = Object;\n\nexport function e3BindScale(params) {\n let [scale, key] = params;\n if(scale) {\n var resultScale = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add empty style parameter check\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport EditFormController from 'ember-flexberry/controllers/edit-form';\n\nexport default EditFormController.extend({\n /**\n Defaul style of modal context.\n\n @pr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo that caused ReferenceError"
},
{
"from": "human",
"value": "var Zopfli = require('./lib/zopfli');\n\nexports.createGzip = function(options) {\n return new Zopfli('gzip', options);\n};\n\nexports.createZlib = function(options) {\n return new Zopfli('zlib',... | javascript | chosen |
[
{
"from": "system",
"value": "Fix user names listed in conversations including an additional comma under some circumstances\n"
},
{
"from": "human",
"value": "var View = require('../../lib/view.js');\n\nvar ConversationView = View.extend({\n template: require('./show.ractive'),\n eventNames: [... | javascript | chosen |
[
{
"from": "system",
"value": "Add complex regexp matching for patches.\n"
},
{
"from": "human",
"value": "\nfunction parsePatch(x) {\n\n let reg = /(add|merge|remove)\\s([\\/[a-z0-9]+)(?:\\s([0-9]+|\\[[a-z0-9\\-]+\\]|\\'[a-z0-9]+\\'|\\\"[a-z0-9]+\\\"|{[a-z\\s0-9{}\"':,]+}))?/gi\n\n let found\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use a instead of as input to inspect\n"
},
{
"from": "human",
"value": "var num = 0;\nmodule.exports.inspect = (i) => {\n console.log('INSPECTOR #', ++num);\n console.log(i);\n return i;\n};\n\nconst pluckUser = module.exports.pluckUser = (user) =>\n ({\n id:... | javascript | chosen |
[
{
"from": "system",
"value": "AEIV-175: Integrate column management with grid view functionality\n\n - fixed review issues\n"
},
{
"from": "human",
"value": "define(function(require) {\n 'use strict';\n\n var ColumnManagerItemView;\n var $ = require('jquery');\n var BaseView = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Use callback instead of methods on context\n"
},
{
"from": "human",
"value": "var Promise = require('bluebird');\n\nvar ebs = require('./ebs');\n\nvar handler = function* (event, context) {\n try {\n \n yield ebs.snapshotVolumes();\n yield ebs.purgeSnapsho... | javascript | chosen |
[
{
"from": "system",
"value": "Add maxOpacity for backdrop fade\n"
},
{
"from": "human",
"value": "const options = {\n duration: 700,\n easing: 'easeInOutQuint'\n};\n\nexport default function defaultTransition(context) {\n if (!context || typeof context.transition !== 'function') {\n throw ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove parentheses and accept baselines\n"
},
{
"from": "human",
"value": "//// [emptyAssignmentPatterns02_ES5.ts]\r\n\nvar a: any;\nlet x, y, z, a1, a2, a3;\n\n({} = { x, y, z } = a);\n([] = [ a1, a2, a3] = a);\r\n\r\n//// [emptyAssignmentPatterns02_ES5.js]\r\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Set loglevel to DEBUG to remain current behaviour.\n\nSigned-off-by: André Jaenisch <2c685275bd32aff3e28a84de6a3e3ac9f1b2b901@posteo.de>\n"
},
{
"from": "human",
"value": "\"use strict\";\n/**\n * @module logger\n */\nconst log = require(\"loglevel\");\n\n// This is... | javascript | chosen |
[
{
"from": "system",
"value": "Update to correct Linting Warning\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Article from './Article';\n\n// note the functional nature of this declared object - does nore explicitly require a 'class' definition\nconst ArticleList = (props... | javascript | chosen |
[
{
"from": "system",
"value": "Add redirect to login endpoint if 401 received\n"
},
{
"from": "human",
"value": "function likeComment(event, commentId) {\n console.log(forumId);\n console.log(commentId);\n $.ajax({\n 'url': '/forums/' + forumId + '/comments/' + commentId + \"/like... | javascript | chosen |
[
{
"from": "system",
"value": "Replace hardcoded API call with parameterized call\n\nPrevious API call had a preset route and stop the server could retrieve\ninformation for. This commit replaces that preset call with a generic\none that parses the URL string for user-supplied stop and route\narguments.\n\nA... | javascript | chosen |
[
{
"from": "system",
"value": "Use type.name to determine component type. displayName is only for debug\n"
},
{
"from": "human",
"value": "import React, { Component, Children } from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class Switch extends Component {\n componentDidMou... | javascript | chosen |
[
{
"from": "system",
"value": "Make passwport-jwt exract tokens from the query params instea of the AuthHeaders\n\n --Auth headers are not being asent at the moment\n due to issues tyo do with CORS. Will find a\n fix sometime in the futur\n"
},
{
"from": "human",
"value": "const passport =... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust in auth to avoid throwing full errors logs to end user.\n"
},
{
"from": "human",
"value": "'use strict';\n\nlet express = require('express');\nlet passport = require('passport');\nlet signToken = require('../auth.service').signToken;\n\nvar router = express.R... | javascript | chosen |
[
{
"from": "system",
"value": "Fix file path for config.json\n"
},
{
"from": "human",
"value": "import fs from 'fs';\nimport path from 'path';\nimport Sequelize from 'sequelize';\n\nconst basename = path.basename(module.filename);\nconst env = process.env.NODE_ENV || 'development';\nconst config ... | javascript | chosen |
[
{
"from": "system",
"value": "Add group validation middleware to routes\n"
},
{
"from": "human",
"value": "import dotenv from 'dotenv';\nimport authControllers from '../controllers';\nimport authenticate from '../middleware/authenticate';\n\nconst usersController = authControllers.users;\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Add helper to create build folder\n"
},
{
"from": "human",
"value": "var settings = require('../../settings.json');\n\n/**\n * Returns true if the build is running in production mode\n *\n * @returns {Boolean} True if production mode is enabled\n */\nvar isProductio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issues with sudo: false infra on Travis CI.\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_in_dev: [\n 'Chro... | javascript | chosen |
[
{
"from": "system",
"value": "Add process_id into the $state.go statements. Have chooseExistingProcess make a REST call to get the list of processes.\n"
},
{
"from": "human",
"value": "(function (module) {\n module.controller('ProjectHomeController', ProjectHomeController);\n ProjectHomeCo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix not logged-in users being able to access the reload page. [IQSLDSH-364]\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('admin').controller('ReloadController', ['$scope', 'Admin',\n\tfunction($scope, Admin) {\n\t\t $scope.reload = function () ... | javascript | chosen |
[
{
"from": "system",
"value": "Reorder error handler and '/' route\n"
},
{
"from": "human",
"value": "const express = require('express'),\n app = express(),\n bodyParser = require('body-parser'),\n methodOverride = require('method-override'),\n mongoose = require('mongoose');\... | javascript | chosen |
[
{
"from": "system",
"value": "Change the wording a little\n"
},
{
"from": "human",
"value": "console.warn();\nconsole.warn('This package (facebook) has been deprecated.');\nconsole.warn(\"You should not use this anymore.\");\nconsole.warn(\n \"If you need the export Facebook, you can now simp... | javascript | chosen |
[
{
"from": "system",
"value": "Add charset specification to ajax request.\n\nFirefox automatically adds it, chrome doesn't, the current backend\nchokes on it not being present.\n"
},
{
"from": "human",
"value": "var Cart = function(baseUrl) {\n var self = this\n this.baseUrl = baseUrl\n this.u... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce test timeout to 5 minutes"
},
{
"from": "human",
"value": "require('dotenv/config');\nconst request = require('then-request');\n\nlet server = null;\n\nlet url = null;\nswitch (process.argv[2]) {\n case 'local':\n url = 'http://localhost:3000';\n serve... | javascript | chosen |
[
{
"from": "system",
"value": "Replace _ with () on callbacks that don't use any argument\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst http = require('http');\nconst path = require('path');\nconst url = require('url');\nconst auth = require('http-auth');\nconst HttpStatusCodes = req... | javascript | chosen |
[
{
"from": "system",
"value": "Set up revealing module patter\n"
},
{
"from": "human",
"value": "(function (window, document, $, undefined) {\n\n})(window, document, jQuery);"
},
{
"from": "gpt",
"value": "(function (window, document, $, undefined) {\n \n var rockhopper = function (... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to generic instance specification\n"
},
{
"from": "human",
"value": "var quilt = require(\"@quilt/quilt\");\n\nexports.New = function(count) {\n var inf = quilt.createDeployment({});\n\n var machine = new quilt.Machine({\n provider: \"Amazon\",\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix IE8 issue if 'less' is a dom element\n"
},
{
"from": "human",
"value": "if (typeof(window.less) === 'undefined') { window.less = {}; }\nless = window.less;\ntree = window.less.tree = {};\nless.mode = 'browser';\n"
},
{
"from": "gpt",
"value": "if (ty... | javascript | chosen |
[
{
"from": "system",
"value": "Fix target channel of !welcome\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst\n Command = require('../Command'),\n MentionsMiddleware = require('../../middleware/MentionsMiddleware'),\n RestrictChannelsMiddleware = require('../../middleware/Restr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to work on meetings landing page\n"
},
{
"from": "human",
"value": "var $ = require('jquery');\nvar m = require('mithril');\nvar Meetings = require('../meetings.js');\nvar Submissions = require('../submissions.js');\n\nnew Meetings(window.contextVars.meetings);\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where color selector's inputs'd be out of sync\n"
},
{
"from": "human",
"value": "(function (App) {\n 'use strict';\n\n App.View.ColorSelectorView = Backbone.View.extend({\n events: {\n 'change input[type=\"color\"]': '_updateColor'\n },\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix para que los jugadores mantengan su posición\n"
},
{
"from": "human",
"value": "/**\n * Created by ivan on 10/5/14.\n */\nangular.module('Frosch')\n .factory('ConfiguracionService', function ($http, $translate) {\n\n var clase = function () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow catching uncaught exceptions and transmitting them via the error protocol\n"
},
{
"from": "human",
"value": "(function (context) {\n var noflo = context.require('noflo');\n var Base = context.require('noflo-noflo-runtime-base');\n\n var Iframe = function ()... | javascript | chosen |
[
{
"from": "system",
"value": "Add a message when refusing due to a lack of query parameter\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar restify = require('restify');\nvar async = require('async');\nvar Anyfetch = require('anyfetch');\n\n\nmodule.exports.get = function get(req, res, ... | javascript | chosen |
[
{
"from": "system",
"value": "Use textareas in the form\n"
},
{
"from": "human",
"value": "Quotes = new Meteor.Collection(\"quotes\");\nQuotes.attachSchema(new SimpleSchema({\n body: {\n type: String,\n label: \"Body\"\n },\n description: {\n type: String,\n label: \"Description\"... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary dependency from interval script\n"
},
{
"from": "human",
"value": "var xhr = require('xmlhttprequest');\nvar mongoose = require('mongoose');\nvar moment = require('moment');\nvar tz = require('moment-timezone');\nvar range = require('moment-range'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the routes so they handle the promise properly\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\nvar moment = require('moment');\nvar languageColors = require('../language_colors');\n\n// GET home page\nlanguag... | javascript | chosen |
[
{
"from": "system",
"value": "Add retryable error to story.\n"
},
{
"from": "human",
"value": "/**\n * ErrorNotice stories.\n *\n * Site Kit by Google, Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in comp... | javascript | chosen |
[
{
"from": "system",
"value": "Remove typo from rebundle task\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst HookTask = require('./HookTask');\n\nclass RebundleTask extends HookTask {\n\n constructor(buildManager, taskRunner) {\n super(buildManager, taskRunner);\n th... | javascript | chosen |
[
{
"from": "system",
"value": "Test commit for conflict resolution\n"
},
{
"from": "human",
"value": " var app = angular.module('at', ['pascalprecht.translate']);\n\n app.config(function ($translateProvider) {\n $translateProvider.useStaticFilesLoader({\n prefix: '/json/',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix port on main server\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport express from 'express';\n\nconst isDeveloping = process.env.NODE_ENV !== 'production';\nconst port = isDeveloping ? 8080 : process.env.PORT;\nconst address = process.env.DOCK... | javascript | chosen |
[
{
"from": "system",
"value": "JavaScript: Remove a redundant extractor option.\n"
},
{
"from": "human",
"value": "class C {\n static foo() { return 23; }\n}\n\nmodule.exports = C;\n\n// semmle-extractor-options: --abort-on-parse-errors"
},
{
"from": "gpt",
"value": "class C {\n sta... | javascript | chosen |
[
{
"from": "system",
"value": "Make it respond to touch events - much more responsive now\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport './Tile.css';\n\nclass Tile extends Component {\n\n showTile(tileId) {\n this.props.showTile(tileId);\n }\n\n render... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem with convention import\n"
},
{
"from": "human",
"value": "import {Origin} from 'aurelia-metadata';\nimport {JadeView} from './jade';\n\n/**\nRetrieves a `.jade`-type view via usual convention used by `ConventionView`. \n\n@class JadeConventionView\n@exte... | javascript | chosen |
[
{
"from": "system",
"value": "Add autosize and modal directives\n"
},
{
"from": "human",
"value": "import Vue from 'vue'\r\nimport VueFire from 'vuefire'\r\nimport App from './App'\r\n\r\nimport 'jquery-ui/jquery-ui.min.js'\r\n\r\n// import imagesLoaded from 'imagesloaded'\r\n// imagesLoaded.mak... | javascript | chosen |
[
{
"from": "system",
"value": "Change console.log to console.error where appropriate\n"
},
{
"from": "human",
"value": "import handleFrontMatter from './transforms/handle-front-matter';\nimport handleMarkdown from './transforms/handle-markdown';\nimport wrapReact from './transforms/wrap-react';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix incorrect error subscription on input stream\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n\"use strict\";\n\nlet fs = require(\"fs\");\nlet peg = require(\"../lib/peg\");\nlet options = require(\"./options\");\n\n// Helpers\n\nfunction readStream(in... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up request plugin handling a bit\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar CONFIG = require('config');\n\nvar util = require('./util');\n\nvar ALL_PLUGINS = util.loadPluginsSync(__dirname, CONFIG);\n\nexports.handleRequest = function(request, res... | javascript | chosen |
[
{
"from": "system",
"value": "Check in Chai assertions that they have been given TestMongo\n"
},
{
"from": "human",
"value": "import isEqual from 'lodash/isEqual'\n\nimport { collectionAttachedSchema } from '../schemaHelper'\n\n\nconst collectionLabel = collection =>\n collection._name ? `colle... | javascript | chosen |
[
{
"from": "system",
"value": "Change 'GITHUB_REPO_NAME' constant to point to my node.js GitHub repo\n"
},
{
"from": "human",
"value": "export const CLIENT_ID = \"ca49494ef26794d2427f\";\nexport const GATEKEEPER_AUTH_URL = \"https://gatekeeper-server.herokuapp.com/authenticate/\";\nexport const O... | javascript | chosen |
[
{
"from": "system",
"value": "Hide certain values from initial view to logged in user\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar errorHandler = require('./errors.server.controller');\n\n/**\n * Render the main application page\n */\nexports.renderIndex = function(req, res) {\n\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Test calls to preventDefault and stopPropagation in DragEventAcceptor\n"
},
{
"from": "human",
"value": "// @flow\n/*global it*/\n\nimport DragEventAcceptor from './DragEventAcceptor'\n\nconst FailIfCalled = () => {\n throw new Error('Should not have been called')\... | javascript | chosen |
[
{
"from": "system",
"value": "Replace level 1,2,3 with ERROR, WARNING, NOTICE.\n"
},
{
"from": "human",
"value": "var HTMLCS_RUNNER = new function() {\n this.run = function(standard) {\n var self = this;\n\n // At the moment, it passes the whole DOM document.\n HTMLCS.pro... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for the pickers to be used in custom dashboards\n\nThe current setup for nupickers does not allow it to exist outside of the current page context. All that needs to happen is a value needs to be passed for the currentId and parentId if editorstate is null."
},
{
"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix action logging for asyncIt.only\n"
},
{
"from": "human",
"value": "'use strict'\n\n/* global it */\n\nimport actionLogger from './action_logger'\n\nexport const asyncIt = (description, test, config) => {\n const decoratedTest = _decorateTest(test, config)\n it... | javascript | chosen |
[
{
"from": "system",
"value": "Use classes for webpack plugins.\n"
},
{
"from": "human",
"value": "let fs = require('fs');\n\nmodule.exports = WatchTimestampsPlugin;\n\nfunction WatchTimestampsPlugin(patterns) {\n\tthis.patterns = patterns;\n}\n\nWatchTimestampsPlugin.prototype.apply = function (... | javascript | chosen |
[
{
"from": "system",
"value": "Allow entities to emit events\n"
},
{
"from": "human",
"value": "module.exports = class Entity {\n\n constructor() {\n this.guid = Math.random() * 1000000 | 0;\n }\n\n};\n"
},
{
"from": "gpt",
"value": "const {EventEmitter} = require('events');\n\nm... | javascript | chosen |
[
{
"from": "system",
"value": "Fix google analytics hangs when viewing locally.\n\nClose #57\n"
},
{
"from": "human",
"value": " (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\r\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\r\n m... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem with Halt button on enketo colletion\n"
},
{
"from": "human",
"value": "$(document).foundation();\n\n$('a.disabled').click(function(e) {\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation();\n});\n\n// Show shadow when content s... | javascript | chosen |
[
{
"from": "system",
"value": "Add proptype validation to PostTile component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { getImageUrlFromProp } from '../../helpers';\n\nclass PostTile extends React.Component {\n render() {\n const post = this.props.details;\n\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Remove @emails from non-generated files (91/n)\n\nSummary:\nContext - [[quip](https://fb.quip.com/1T2uAglapSkF)]\n\nWe are updating the oncall annotation format of all javascript files from `emails oncall+my_oncall_shortname` to `oncall my_oncall_shortname`.\n\nNOTE: There are... | javascript | chosen |
[
{
"from": "system",
"value": "Fix assert.match integration test helper\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You\n * may not use this file e... | javascript | chosen |
[
{
"from": "system",
"value": "Fix positioning of the spinner inside the button\n"
},
{
"from": "human",
"value": "import styled from 'styled-components';\n\nconst SpinnerWrapper = styled.span`\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n`;\n\nexport... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for sort order in the nick list.\n"
},
{
"from": "human",
"value": "(function() {\n \"use strict\";\n\n describe('A nick list', function() {\n var win = {};\n var item = function(index) {\n if (index === -1) {\n return items().last();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Hypothesis config hooks to plugin for UI tweaks\n"
},
{
"from": "human",
"value": "/**\n * This plugin helps to properly load the Hypothes.is client with Readium.\n * Enable this plugin if you want to add the Hypothesis client to your reader\n * so that visitors... | javascript | chosen |
[
{
"from": "system",
"value": "[page] Add mixin for the cartridge\n"
},
{
"from": "human",
"value": "var isFunction = require('lodash/lang/isFunction');\nvar dispatcher = require('focus').dispatcher;\nmodule.exports = {\n /**\n * Register the cartridge.\n */\n _registerCartridge: fu... | javascript | chosen |
[
{
"from": "system",
"value": "Change port for production to 8082\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst app = express();\nconst path = require('path');\n\napp.use('/public', express.static(path.join(__dirname, 'public')))\napp.use('/node_modules', express.s... | javascript | chosen |
[
{
"from": "system",
"value": "Disable print dialog in Firefox because Ctrl + P is used to open the player. [IQSLDSH-378]\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('core').controller('HeaderController', ['$scope', '$window', 'Authentication', 'Menus', '$state', '$rootScop... | javascript | chosen |
[
{
"from": "system",
"value": "Add TODO item to make examples browser compatible\n"
},
{
"from": "human",
"value": "'use strict';\n\n// FIXME: clean-up once split is ready\n// var splitStream = require( '@stdlib/streams/utils/split' );\nvar joinStream = require( './../lib' );\n\nvar split;\nvar j... | javascript | chosen |
[
{
"from": "system",
"value": "Fix stories according to new structure\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { storiesOf } from '@kadira/storybook';\n\nimport ClubLayout from 'vclub/views/clubLayout/ClubLayout';\nimport clubReducer from 'vclub/reducers/club';\n\n\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix: Include the invalid glob in error message\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar defaults = require('lodash.defaults');\nvar through = require('through2');\nvar gs = require('glob-stream');\nvar File = require('vinyl');\n\nvar getContents = req... | javascript | chosen |
[
{
"from": "system",
"value": "Fix regression: colors in props table.\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport cx from 'classnames';\n\nimport s from '../Markdown/Markdown.css';\n\nconst CodeRenderer = ({ className, children }) => (\n\t<code className={... | javascript | chosen |
[
{
"from": "system",
"value": "Send JWT token in HTTP requests only when available.\n"
},
{
"from": "human",
"value": "module.exports = (function() {\n var Router = require('router'),\n Connection = require('lib/connection');\n\n // App namespace.\n window.Boards = {\n Models: {},\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use refs to access child components\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nclass App extends React.Component {\n\tconstructor(){\n\t\tsuper();\n\t\tthis.state = { txt: ''};\n\t\tthis.update = this.update.bind(this);\n\t}\n\tupdate(e){\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Compress the payload in a basic manner to test\n"
},
{
"from": "human",
"value": "// Setup basic express server\nvar express = require('express');\nvar bodyParser = require('body-parser');\nvar debug = require('debug')('cloud');\nvar namespaces = require('./namespac... | javascript | chosen |
[
{
"from": "system",
"value": "Read program version from package.json for -V flag\n"
},
{
"from": "human",
"value": "var program = require(\"commander\");\r\n\r\nprogram\r\n .version(\"0.0.1\")\r\n .option(\"-s, --smtp-port [number]\", \"SMTP server port (1025 by default).\")\r\n .option(\"-p,... | javascript | chosen |
[
{
"from": "system",
"value": "Change the console.log to stdout.write\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar args = process.argv;\nvar text = args[args.length - 1];\n\nvar encoder = require('./index.js');\nconsole.log(encoder(text));\n"
},
{
"from": "gpt",
"valu... | javascript | chosen |
[
{
"from": "system",
"value": "Test that titles are updated as expected\n"
},
{
"from": "human",
"value": "var assert = chai.assert;\n\n\ndescribe('react-frozenhead', function () {\n it('passes a test', function () {\n assert(true);\n });\n});\n"
},
{
"from": "gpt",
"valu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix incorrect paths in postcss debugger\n"
},
{
"from": "human",
"value": "// https://github.com/andywer/postcss-debug#js-code\n\n/* eslint-disable strict, no-console */\n\n'use strict';\n\nconst fs = require('fs');\nconst postcss = require('postcss');\nconst postcs... | javascript | chosen |
[
{
"from": "system",
"value": "Allow the mocha tests to take 6 seconds\n"
},
{
"from": "human",
"value": "module.exports = function (config) {\n config.set({\n basePath: '.',\n frameworks: ['mocha'],\n reporters: ['mocha'],\n files: [\n '../node_modules/es6-promise/dist/es6-prom... | javascript | chosen |
[
{
"from": "system",
"value": "Add the submit function to the last button\n\nEtc..\n"
},
{
"from": "human",
"value": "var count = 1;\n\n$(document).ready(function() {\n\n var b = $(\".bottom-arrow\");\n\n var u = $(\".up-arrow\");\n\n b.click(function(e) {\n if ($(\".slide\" + (+count + 1))... | javascript | chosen |
[
{
"from": "system",
"value": "Support UTF-8 for encoding/decoding widget links.\n"
},
{
"from": "human",
"value": "angular.module(\"Prometheus.services\").factory('UrlConfigDecoder', function($location) {\n return function(defaultHash) {\n var hash = $location.hash() || defaultHash;\n if ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow http scheme so that the demo client works\n"
},
{
"from": "human",
"value": "'use strict';\nvar config = require('../config');\n\n\nmodule.exports = {\n 'swagger': '2.0',\n 'info': {\n 'title': 'Koodilehto CRM API',\n 'description': 'Manage... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console logging in database config.\n"
},
{
"from": "human",
"value": "const Sequelize = require('sequelize');\nconst config = require('config');\n\nconst databaseConnection = new Sequelize(config.get('databaseUrl'), { //todo: configs here!\n dialect: 'pos... | javascript | chosen |
[
{
"from": "system",
"value": "Remove description for isPingPong, update test for pingPongType according to new JavaScript code\n"
},
{
"from": "human",
"value": "describe('pingPongType', function() {\n it(\"returns ping for a number that is divisible by 3\", function() {\n expect(pingPongTyp... | javascript | chosen |
[
{
"from": "system",
"value": "FIX: Use a string in `q` instead of an object because special characters in the values of each key of an object are now escaped as expected.\n"
},
{
"from": "human",
"value": "// Dependencies \nvar nock = require('nock'), \n solr = require('./../main'),\n vows =... | javascript | chosen |
[
{
"from": "system",
"value": "Add formatted dates to journey schema\n\n"
},
{
"from": "human",
"value": "import mongoose from 'mongoose';\n\nconst { Schema } = mongoose;\n\nconst JourneySchema = new Schema({\n created: {\n type: Date,\n default: Date.now,\n },\n date: {\n type: Date,... | javascript | chosen |
[
{
"from": "system",
"value": "Add animated zoom to keyboard zoom interaction\n"
},
{
"from": "human",
"value": "// FIXME works for View2D only\n\ngoog.provide('ol.interaction.KeyboardZoom');\n\ngoog.require('goog.events.KeyCodes');\ngoog.require('goog.events.KeyHandler.EventType');\ngoog.require... | javascript | chosen |
[
{
"from": "system",
"value": "Update ConfigurableItems demo to not refresh page onSave\n"
},
{
"from": "human",
"value": "import ConfigurableItemsPattern from './';\nimport ConfigurableItemsActions from './actions';\nimport Definition from './../../../demo/utils/definition';\n\nlet definition = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing 'random' dependency to retry\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"Retry logic with exponential backoff\",\n internal: true\n});\n\nPackage.on_use(function (api) {\n api.use('underscore', ['client', 'server']);\n api.expo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reference to exported version of underscore in project skeleton\n"
},
{
"from": "human",
"value": "/**\n * The default controller for your page structure.\n */\nvar turnpike = require('turnpike');\nvar util = require('util');\nvar _ = turnpike._;\n\nf... | javascript | chosen |
[
{
"from": "system",
"value": "Generalize test scene geometry generation.\n"
},
{
"from": "human",
"value": "import THREE from 'three';\n\nconst maps = {\n minimal( scene ) {\n const geometry = new THREE.IcosahedronGeometry( 1, 2 );\n const material = new THREE.MeshPhongMaterial({\n s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a11y testing for older Ember versions\n"
},
{
"from": "human",
"value": "import Application from '@ember/application';\nimport Resolver from './resolver';\nimport loadInitializers from 'ember-load-initializers';\nimport config from './config/environment';\n\nexp... | javascript | chosen |
[
{
"from": "system",
"value": "Update template wrapper to support preserveComments.\n"
},
{
"from": "human",
"value": "import template from 'babel-template';\n\nexport default str => {\n return template(str, {sourceType: 'module'});\n};\n"
},
{
"from": "gpt",
"value": "import templ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.