conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Include step stubs for Machine test\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar expect = require('chai').expect;\n\nvar Fabric = require('../');\nvar Machine = Fabric.Machine;\n\ndescribe('Machine', function () {\n it('should correctly c... | javascript | chosen |
[
{
"from": "system",
"value": "[jquery] Add assertion to validate HTML is correct.\n\nThis requires the nodes.js version of jquery. Talk to Luke if you are having issues\ninstalling it.\n\n(imported from commit 86dc91a9a41b2ef9c2dbcc4fb0085109250d7af7)\n"
},
{
"from": "human",
"value": "var asse... | javascript | chosen |
[
{
"from": "system",
"value": "Fix weird bug with conditional. Function scope weirdness, maybe?\n"
},
{
"from": "human",
"value": "var l10n_file = __dirname + '/../l10n/commands/emote.yml';\nvar l10n = require('../src/l10n')(l10n_file);\nvar CommandUtil = require('../src/command_util').CommandUti... | javascript | chosen |
[
{
"from": "system",
"value": "Add route to sort landing page forums by popular or recent\n"
},
{
"from": "human",
"value": "const router = require('express').Router();\nconst data = require(\"../data\");\nconst forumsData = data.forums;\n\nrouter.get('/', (req, res) => {\n\tlet userInfo = req.lo... | javascript | chosen |
[
{
"from": "system",
"value": "Use white labels for increased readability\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nclass Label extends React.Component {\n static defaultProps = {\n x: 0,\n y: 0,\n font_size: 14,\n alignment: \"start\",\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make ngClip point at osscdn\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('osscdnApp', ['ngAnimate', 'ui.router', 'ngDropdowns', 'semverSort',\n 'ngClipboard', 'angular-flash.service', 'angular-flash.flash-alert-directive']).\n value('Zero... | javascript | chosen |
[
{
"from": "system",
"value": "Add input's name for future usage\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport styles from 'stylesheets/components/common/typography';\n\nclass Kugel extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\... | javascript | chosen |
[
{
"from": "system",
"value": "Create more precise check of timeout\n"
},
{
"from": "human",
"value": "/*eslint-env mocha,node*/\nvar babel = require('babel-core');\nvar vm = require('vm');\nvar expect = chai.expect;\n\ndescribe('babel.test.js', function () {\n it('should work together with babe... | javascript | chosen |
[
{
"from": "system",
"value": "Use Chrome instead of Firefox for Protractor tests temporarily;\n (Chrome does not work with Travis CI, but Firefox does not\n work with Selenium 2.44)\n"
},
{
"from": "human",
"value": "(function() {\n\n 'use strict';\n\n // protractor configuration\n\n e... | javascript | chosen |
[
{
"from": "system",
"value": "Use sign instead of round\n\nLets use the function for what it is designed for.\n"
},
{
"from": "human",
"value": "(function($){\n $.permutation = function(){\n return new Permutation($.toArray(arguments));\n };\n var Permutation = $.Permutation = fu... | javascript | chosen |
[
{
"from": "system",
"value": "Make it .html to prevent confusion\n\nIf someone would like to add some html to the output, he could get confused because the browser won't render. (For example <br />)\r\nMaking it $('#timer').html(...); Changes nothing but solves this problem for people that want to use it wi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for actual windows user agent string\n"
},
{
"from": "human",
"value": "/*!\n * Module dependencies.\n */\n\nvar useragent = require('useragent');\n\n/**\n * Parse User-Agent for Cordova Platform.\n *\n * Options:\n *\n * - `ua` {String} is the server request ... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for CC's COMMIT_ID env var\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst childProcess = require('child_process');\nlet version = require('../../../package.json').version;\n\ntry {\n\tversion = childProcess.execSync('git log -1 \"--f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix signedTx & hardcode a test wallet\n"
},
{
"from": "human",
"value": "\nimport React from 'react';\nimport {\n StyleSheet,\n Text,\n View\n} from 'react-native';\nimport WalletService from '../services/WalletService';\n\nconst styles = StyleSheet.create({\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Update generator to derive from frost-component\n"
},
{
"from": "human",
"value": "/**\n * Component definition for the <%= dasherizedModuleName %> component\n */\n\nimport Ember from 'ember'\nconst {Component} = Ember\nimport PropTypesMixin, {PropTypes} from 'ember... | javascript | chosen |
[
{
"from": "system",
"value": "Rename var semantically for consistency\n"
},
{
"from": "human",
"value": "var data = require('../private.js'),\n postJson = require('post-json');\n\nvar url = data.url.jesseTest,\n body = {};\n\nbody.value1 = \"hola\"; // Change value of one of the keys in the JS... | javascript | chosen |
[
{
"from": "system",
"value": "Fix random x axis ball speed\n"
},
{
"from": "human",
"value": "import Item, { MovingDirection, ItemType } from './Item'\nimport Ball from './Ball'\nimport ItemLoader from '../Loader/ItemLoader'\nimport Helper from '../Utility/Utility'\n\nexport default class Platfo... | javascript | chosen |
[
{
"from": "system",
"value": "Send modifier keys to VM but allow bubbling\n\nThis allows the keys to be used for developer shortcuts, but also keeps the \"if any key pressed\" block working (and hacked key blocks).\n"
},
{
"from": "human",
"value": "const bindAll = require('lodash.bindall');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Implement eq(), normalize with get()\n"
},
{
"from": "human",
"value": "Rye.extend(function(exports){\n\n var util = Rye.require('util')\n , _slice = Array.prototype.slice\n , _concat = Array.prototype.concat\n\n exports.get = function(num){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix data store update operations"
},
{
"from": "human",
"value": "var _ = require('lodash'),\n Fs = require('fs');\n\nvar dataFile = __dirname + '/../data.json';\n\nmodule.exports.load = function() {\n return JSON.parse(Fs.readFileSync(dataFile).toString());\n};... | javascript | chosen |
[
{
"from": "system",
"value": "Move navigator checking method to it's function\n\nMake all functions in `sources` array to iteare over with hope of\nsuccess before it's finished.\n"
},
{
"from": "human",
"value": "/**\n * Require dependencies\n */\n\nvar cookie = require('component-cookie');\n\nv... | javascript | chosen |
[
{
"from": "system",
"value": "Change error message for empty value\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst template = require('../../views/pages/ErrorPage.hbs');\n\nclass ErrorPage {\n\tconstructor() {\n\t\tthis.container = document.createElement('div');\n\t\tthis.container.cla... | javascript | chosen |
[
{
"from": "system",
"value": "Use prepublish.js to compile in grunt\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n var growl = require('growl');\n var path = require('path');\n var shell = require('shelljs');\n\n var bin = ['node_modules', '.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove trailing comma, as causes issues when minifying\n"
},
{
"from": "human",
"value": "/*\n * Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute\n * \n * Licensed under the Apache License, Version 2.0 (the \"Licen... | javascript | chosen |
[
{
"from": "system",
"value": "Fix possible issue with multiple clicks on demo login screen.\nThough this doesn't currently repro, there is a possibility that if the demo login flow takes too long, a user clicking really fast on the login screen may see unexpected behavior due to multiple login attempts bein... | javascript | chosen |
[
{
"from": "system",
"value": "[WebUI] Implement state fetching on load.\n\nTODO: Find out what actual RasPi returns for the states.\n\nSigned-off-by: Juri Berlanda <5bfdca9e82c53adb0603ce7083f4ba4f2da5cacf@hotmail.com>\n"
},
{
"from": "human",
"value": "console.log(\"Start\");\r\nvar socket = io... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure that repo has owner name and name in tests\n\nIn most tests we only set a slug for a repository. This works fine in\nmost cases, but has a drawback of not displaying a proper owner name and\nname in the UI. This commit fixes the situation by setting owner name and\nna... | javascript | chosen |
[
{
"from": "system",
"value": "[minor] Make it clear that this method is only used in tests\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Stores data.\n *\n * @type {Object}\n * @api public\n */\nvar data = Object.create(null);\n\n//\n// Expose a `store` like interface.\n//\nmodule.... | javascript | chosen |
[
{
"from": "system",
"value": "Allow multiple sorting criteria. Reverse specific to each field\n"
},
{
"from": "human",
"value": "'use strict';\n\n(\n function(angular) {\n return angular\n .module('ngOrderObjectBy', [])\n .filter('orderObjectBy', function() {\n return functi... | javascript | chosen |
[
{
"from": "system",
"value": "Make namespace check more robust\n"
},
{
"from": "human",
"value": "import {NAMESPACE, PREFIX} from './constants';\n\nconst ast = require('parametric-svg-ast');\nconst arrayFrom = require('array-from');\nconst startsWith = require('starts-with');\n\nconst ELEMENT_NO... | javascript | chosen |
[
{
"from": "system",
"value": "Disable bundle size warnings in production\n\nWe should get back to this later, but for now it's just pretty noisy\n"
},
{
"from": "human",
"value": "const webpack = require('webpack');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst path = require... | javascript | chosen |
[
{
"from": "system",
"value": "Fix conditional import path issue\n\n- modified to check file exists with absolute path\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar JSIO = jsio.__jsio;\n\nvar conditionalImport = /(\\s*import\\s+)([^=+*\"',\\s\\r\\n;\\/]+\\|[^=+\"',\\s\\r\\n;\\/]... | javascript | chosen |
[
{
"from": "system",
"value": "Throw error when selector is not unique\n"
},
{
"from": "human",
"value": "var Browser = require('../interfaces/browser.js');\nvar objectAssign = require('object-assign');\n\n/**\n * An adapter of WebdriverIO for use with Mugshot\n *\n * @implements {Browser}\n * @c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem with old Node\n"
},
{
"from": "human",
"value": "console.log(require('os').endianness() === 'BE' ? 'big' : 'little')\n"
},
{
"from": "gpt",
"value": "var os = require('os')\nif (os.endianness) {\n console.log(require('os').endianness() === '... | javascript | chosen |
[
{
"from": "system",
"value": "Update preview on setting change\n"
},
{
"from": "human",
"value": "const vscode = require('vscode');\n\nconst THEME_CONFIGURATION_ID = 'markdown-preview-github-styles';\nconst THEME_CONFIGURATION_KEY = 'colorTheme';\n\nconst THEME_CONFIGURATION_VALUES = {\n 'aut... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo on the cleaning loop"
},
{
"from": "human",
"value": "module.exports = function(data, Bot, Config, Helpers) {\n\n var value = Helpers.getCommandPart(data.message, '2', Config);\n\n if(Config.admin.indexOf(data.userID) == -1) {\n\n var message = '';\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Enforce arrow parens style for Node as well"
},
{
"from": "human",
"value": "module.exports = {\n \"extends\": \"chiton/configurations/default\",\n \"env\": {\n \"node\": true\n },\n \"ecmaFeatures\": {\n \"arrowFunctions\": true\n },\n \"rules\": {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use multi cursors in quill\n"
},
{
"from": "human",
"value": "var quill = new Quill('#editor', {\n // modules: {\n // 'toolbar': { container: '#toolbar' },\n // 'link-tooltip': true\n // },\n theme: 'snow'\n});\nquill.addModule('toolbar', { co... | javascript | chosen |
[
{
"from": "system",
"value": "Add Scene class to SceneScroller object\n"
},
{
"from": "human",
"value": "/* global window */\n\n/**\n * @module SceneScroller\n */\n'use strict';\n\n/**\n * @namespace SceneScroller\n */\nvar SceneScroller = {}\n\n\n/**\n * @property {String} version The version o... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure all startup errors follow same signature\n"
},
{
"from": "human",
"value": "'use strict';\n\n\nconst { httpStartServer } = require('./http');\nconst { attachRequire } = require('../utilities');\nconst { processOptions } = require('./process_options');\n\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add api for non negative least squares\n"
},
{
"from": "human",
"value": "var eng = require('./node/engine');\n\nmodule.exports = {\n minimize: function(func, options, callback) {\n eng.runPython('minimize', func, options, callback);\n }\n}\n"
},
{
"fro... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure HTML files in subdirs are hasres'd\n"
},
{
"from": "human",
"value": "// Hash CSS and JS assets, change filenames and references in markup\nmodule.exports = function(grunt) {\n grunt.config('hashres', {\n options: {\n encoding: 'utf-8'... | javascript | chosen |
[
{
"from": "system",
"value": "Solve data undefined in error event\n"
},
{
"from": "human",
"value": "/**\n * @author Marcelo G.\n */\n(function ($) {\n $.viaAjaxLite = {\n sendForm: function(selector, callback) {\n\n var jqElement = $(selector);\n var self = this;... | javascript | chosen |
[
{
"from": "system",
"value": "Apply prettier, eslint to settings files\n"
},
{
"from": "human",
"value": "import { AsyncStorage } from 'react-native';\n\nexport { MobileAppSettings } from './MobileAppSettings';\n\nexport const SETTINGS_KEYS = {\n APP_VERSION: 'AppVersion',\n CURRENT_LANGUAGE: ... | javascript | chosen |
[
{
"from": "system",
"value": "Update with reference to global nav partial\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyon... | javascript | chosen |
[
{
"from": "system",
"value": "Remove all non-alphanumeric characters when copying title to url. Also copy title on blur event\n"
},
{
"from": "human",
"value": "$(document).ready( function(){\n\nstrip = function(s) { return s.replace(/^\\s+/, '').replace(/\\s+$/, ''); }\nremove_punctuation = fun... | javascript | chosen |
[
{
"from": "system",
"value": "Append the code to the page\n"
},
{
"from": "human",
"value": "window.addEventListener(\"load\", function () {\n {lib}\n});\n"
},
{
"from": "gpt",
"value": "window.addEventListener(\"load\", function () {\n var script = document.createElement(\"scr... | javascript | chosen |
[
{
"from": "system",
"value": "Add TagManager class in new class way\n"
},
{
"from": "human",
"value": "\"use strict\";\n"
},
{
"from": "gpt",
"value": "\"use strict\";\n\nclass TagManager {\n constructor(topicId) {\n this.topicId = topicId;\n }\n \n addTag(tagName) {\n API... | javascript | chosen |
[
{
"from": "system",
"value": "Add logic for `installationCount` on Plugin\n"
},
{
"from": "human",
"value": "/**\n * PluginInstallationController\n *\n * @description :: Server-side logic for managing Plugininstallations\n * @help :: See http://links.sailsjs.org/docs/controllers\n */\n\nm... | javascript | chosen |
[
{
"from": "system",
"value": "Save reference to original server properly."
},
{
"from": "human",
"value": "(function(Monarch) {\n Monarch.Remote.FakeServer = new JS.Singleton('Monarch.Remote.FakeServer', {\n initialize: function() {\n this.reset();\n },\n\n create: function(record... | javascript | chosen |
[
{
"from": "system",
"value": "Fix pulling componentName param in prefixer plugin\n"
},
{
"from": "human",
"value": "/* @flow */\n\nvar Prefixer = require('../prefixer');\n\nvar prefixPlugin = function ({component, style}) {\n var newStyle = Prefixer.getPrefixedStyle(component, style);\n return... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor stubbed data to return available results:\n\nResults can be:\n\n * zero\n * one\n * many\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar searchResults = [{\n name: 'Edinburgh',\n zoomLevel: 16,\n point: {\n x: 55.953252,\n y: -3.188267\n... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify result check to cover null and undefined.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst KMSProvider = require('../../providers/kms');\n\n/**\n * Route handler for KMS secrets\n * @param {StorageService} storage\n * @returns {function}\n */\nfunc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken camel art and add a better message\n"
},
{
"from": "human",
"value": "var chalk = require('chalk');\n\nvar greetings = \"\" +\n chalk.yellow(\" .. .. / o._) .---.\") +\n chalk.yellow(\" /--'/--\\ \\-'|| .----. ... | javascript | chosen |
[
{
"from": "system",
"value": "Make preview default to on\n"
},
{
"from": "human",
"value": "/*\n Load Meltdown.js on appropriate fields.\n - Can also be used to specify any custom settings for Meltdown on init.\n - See https://github.com/iphands/Meltdown#options\n\n*/\n\n$(document).ready... | javascript | chosen |
[
{
"from": "system",
"value": "Clear open cards when region change\n"
},
{
"from": "human",
"value": "import {OPEN_CARD, CLOSE_CARD} from '../actions/ActionTypes'\n\nexport default function cards(state = [], action) {\n switch (action.type) {\n case OPEN_CARD:\n return state.filter(cardN... | javascript | chosen |
[
{
"from": "system",
"value": "Add global error message reducer\n"
},
{
"from": "human",
"value": "import { combineReducers } from 'redux'\nimport { optimistic } from 'redux-optimistic-ui';\nimport locationReducer from './location'\nimport account from 'routes/Account/modules/account'\nimport lib... | javascript | chosen |
[
{
"from": "system",
"value": "Use proper npm ui-bootstrap dependency\n"
},
{
"from": "human",
"value": "var webpack = require('webpack');\nvar ejs = require('ejs');\nvar MIN = process.argv.indexOf('-p') > -1;\n\nfunction getBanner() {\n var pkg = require('./bower.json');\n var banner = ['/**',... | javascript | chosen |
[
{
"from": "system",
"value": "Tidy up strings in ErrorHandler.\n"
},
{
"from": "human",
"value": "/**\n * External dependencies\n */\nimport PropTypes from 'prop-types';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';... | javascript | chosen |
[
{
"from": "system",
"value": "Add action to remove component\n"
},
{
"from": "human",
"value": "Todos.TodoEntryComponent = Ember.Component.extend({\n\tactions: {\n\t\t\n\t}\n\n});"
},
{
"from": "gpt",
"value": "Todos.TodoEntryComponent = Ember.Component.extend({\n\tactions: {\n\t\tcl... | javascript | chosen |
[
{
"from": "system",
"value": "Add a second layer of try/catch around the error reporting, in case the JSON stringification of the error object fails due to circular references\n"
},
{
"from": "human",
"value": "require('./lib/js.io/packages/jsio')\njsio.path.shared = './js'\njsio.path.server = '... | javascript | chosen |
[
{
"from": "system",
"value": "Add visual identify which tab is active"
},
{
"from": "human",
"value": "/* jshint devel: true */\n!function() {\n\t'use strict';\n\n\tvar navGame = document.getElementById(\"nav-game\");\n\tvar navUpgrade = document.getElementById(\"nav-upgrade\");\n\tvar navAbout ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lint errors in the `rx-ext` code\n"
},
{
"from": "human",
"value": "import { merge as mergeObs } from 'rxjs/observable'\nimport { distinctUntilChanged, map as mapObs, debounceTime } from 'rxjs/operators'\nimport { isEqual, isFunction } from '../util/minilo'\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Add the NO_CONTENT HTTP Code\n"
},
{
"from": "human",
"value": "/**\n * @fileOverview Project wide enumerations.\n */\n\nvar enums = module.exports = {};\n\n/** @enum {string} The CRUD Ops types */\nenums.CrudOps = {\n CREATE: 'create',\n READ: 'read',\n READ_ONE... | javascript | chosen |
[
{
"from": "system",
"value": "Add proper comments and note about Windows\n"
},
{
"from": "human",
"value": "/**\n * Module dependencies\n */\n\nvar fs = require('fs-extra');\nvar path = require('path');\nvar chalk = require('chalk');\n\nmodule.exports = function newProject(dir) {\n fs.copy(... | javascript | chosen |
[
{
"from": "system",
"value": "Set 'text' column to text type to avoid length limit\n"
},
{
"from": "human",
"value": "\nexports.up = function(knex, Promise) {\n\treturn knex.schema.createTable('entries', function (table) {\n\t\ttable.increments().primary();\n\t\ttable.datetime('date').notNull();... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment w/ bookmarkleter link"
},
{
"from": "human",
"value": "var version = '1.2';\nvar name = 'com.alanhogan.bookmarklets.mark-visited.' + version;\n\nvar extant = document.querySelector('style[data-via-bookmarklet=\"'+name+'\"]');\n\nif (extant !== null) {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Improve binary locator to be more deployment friendly.\n"
},
{
"from": "human",
"value": "var binding;\n\ntry {\n\tbinding = require(__dirname + '/../build/Debug/libxl');\n} catch(e) {\n\tbinding = require(__dirname + '/../build/Release/libxl');\n}\n\nmodule.exports... | javascript | chosen |
[
{
"from": "system",
"value": "fix(webpack): Build with webpack target web\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst merge = require('webpack-merge')\nconst common = require('./webpack.config.lib.common.js')\n\nconst root = path.join(__dirname)\n\nmodule.exports = mer... | javascript | chosen |
[
{
"from": "system",
"value": "ACCESS TOKEN FIX FINALLY :sweat_drops:\n"
},
{
"from": "human",
"value": "(function() {\n var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;\n po.src = 'https://apis.google.com/js/client:plusone.js';\n var s = ... | javascript | chosen |
[
{
"from": "system",
"value": "Update htmlSafe call to 'ember/string'\n\nAccording to this: https://www.emberjs.com/api/ember/3.3/functions/@ember%2Ftemplate/htmlSafe\r\nThe current import doesn't work for me in Ember v2.18.2\r\nNo idea how it works for anyone else. Maybe in Ember v3+ this works."
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Set func params as constants to give context into their values\n"
},
{
"from": "human",
"value": "'use strict'\n\nlet basic = require('./basic-response-helper')\nlet executePipelineCommand = require('../../core/pipelines/execute-pipeline-command')\n\nmodule.exports ... | javascript | chosen |
[
{
"from": "system",
"value": "Set pano popje when straatbeeld exsts\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n angular\n .module('atlas')\n .controller('MapController', MapController);\n\n MapController.$inject = ['store', 'crsConverter'];\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add the module to exports.\n"
},
{
"from": "human",
"value": "exports.User = require('./user');\nexports.Message = require('./message');\nexports.Topic = require('./topic');\nexports.Hot = require('./hot');\nexports.Reply = require('./reply');\n"
},
{
"from"... | javascript | chosen |
[
{
"from": "system",
"value": "Add newline to end of usage error messages\n"
},
{
"from": "human",
"value": "var docopt = require('docopt');\nvar fs = require('fs');\nvar path = require('path');\n\nvar meta = require('../package.json');\nvar usage = fs.readFileSync(path.join(__dirname, 'usage.txt... | javascript | chosen |
[
{
"from": "system",
"value": "Update proxima nova font locations.\n\nSummary: The locations of Proxima nova have changed since this was\nwritten, this updates it to the correct location.\n\nTest plan:\n - Not actually sure if this is used, but it sure looks better!\n\nAuditors: michelle\n"
},
{
"fro... | javascript | chosen |
[
{
"from": "system",
"value": "Return errors as json, instead of throwing an error about view engines.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar express = require('express');\nvar logger = require('morgan');\nvar cookieParser = require('cookie-parser');\nvar bodyParser = require('bo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix meteor-promise tests with api.use(\"modules\").\n"
},
{
"from": "human",
"value": "Package.describe({\n name: \"promise\",\n version: \"0.6.2-beta.16\",\n summary: \"ECMAScript 2015 Promise polyfill with Fiber support\",\n git: \"https://github.com/meteor/pr... | javascript | chosen |
[
{
"from": "system",
"value": "Append 2 newlines to table for convenience\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar logToTable = require('./util/log-to-table.js');\nvar logFilePath = 'table.txt';\nvar commitID = 'abc';\nif (process.argv.length >= 4) {\n logFilePath = proc... | javascript | chosen |
[
{
"from": "system",
"value": "Change toolbar initialization in FF.\n"
},
{
"from": "human",
"value": "var self = require(\"sdk/self\");\n\n// create toolbarbutton\nvar tbb = require(\"toolbarbutton\").ToolbarButton({\n id: \"UProxyItem\",\n label: \"UProxy\",\n image: self.data.url(\"uproxy-1... | javascript | chosen |
[
{
"from": "system",
"value": "Add another solution to the setTimeout/loop issue\n"
},
{
"from": "human",
"value": "// <<: timeout\n// What will this output?\nfor (var i=0; i<3; i++) {\n setTimeout(function(){\n console.log(i);\n }, 1000*i);\n}\nconsole.log(\"Howdy!\");\n// :>>\n\n// <<: new... | javascript | chosen |
[
{
"from": "system",
"value": "Update MongoDB URI in server for heroku\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\n// var dbUrl = 'mongodb://username:password@mongodb:port/database';\n// var dbUrl = process.env.MONGOHQ_URL || 'mongodb://@localhost:27017/personalblog';\... | javascript | chosen |
[
{
"from": "system",
"value": "Add a second assertion to the test\n"
},
{
"from": "human",
"value": "jest.dontMock('../heading');\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport TestUtils from 'react-addons-test-utils';\n\nconst Heading = require('../heading').default;\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Make pino output to stderr.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Promise = require('bluebird');\nconst pino = require('pino');\nconst isPlainObject = require('lodash/isPlainObject');\nconst wrap = require('lodash/wrap');\nconst forIn = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Sort timetable pages in example app\n"
},
{
"from": "human",
"value": "const _ = require('lodash');\nconst gtfs = require('gtfs');\nconst router = require('express').Router();\n\nconst config = require('../config');\nconst utils = require('../lib/utils');\n\n\n/*\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Test to load README.md in homepage\n"
},
{
"from": "human",
"value": "var md = window.markdownit();\n\nfunction readTextFile(file) {\n var rawFile = new XMLHttpRequest();\n rawFile.open(\"GET\", file, false);\n rawFile.onreadystatechange = function() {\n if (r... | javascript | chosen |
[
{
"from": "system",
"value": "Add required objects to class\n"
},
{
"from": "human",
"value": "/*\n * NTwitBot - event.js\n * Copyright (C) 2016 Jordan Sne\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as pub... | javascript | chosen |
[
{
"from": "system",
"value": "Fix arguments to pass done through correctly.\n"
},
{
"from": "human",
"value": "var request = require('request');\nvar xml2js = require('xml2js');\n\nfunction init() {\n var module = {};\n\n function latestRelease(project, majorVersion, done, cb) {\n var relea... | javascript | chosen |
[
{
"from": "system",
"value": "Fix click coordinates in FF/Chrome\n"
},
{
"from": "human",
"value": "define([], function() {\n var util = {};\n\n util.rateLimit = function(func, rate) {\n var blocked = false;\n return function() {\n if (blocked) {\n return;\n }\n blo... | javascript | chosen |
[
{
"from": "system",
"value": "Use stopPropagation instead of stopImmediatePropagation.\n"
},
{
"from": "human",
"value": "var $stack = $('.stack'),\n CLASS_LIST = 'contain-0-items contain-1-items contain-2-items contain-3-items contain-4-items';\n\nvar getPlatesFrom = function(stack){\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Change way we init fading.\n\nThe current strategy fails when chicago-brick is used as an npm dep. Instead, do something that works, but is also hacky.\n"
},
{
"from": "human",
"value": "/* Copyright 2015 Google Inc. All Rights Reserved.\n\nLicensed under the Apache... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicate fetching of ETag header.\n\nResolves #348\n"
},
{
"from": "human",
"value": "//\n// Resource Cache\n// Caches API resources by ETag\n//\n\nimport * as bb from 'backbone';\n\nvar cache = {};\n\n// Configure jQuery to handle resources that haven't bee... | javascript | chosen |
[
{
"from": "system",
"value": "Rename property from \"last\" to \"resolvedConfigPath\"\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar use = require(\"alamid-plugin/use.js\");\n\nvar path = require(\"path\"),\n argv = require(\"minimist\")(process.argv.slice(2));\n\nfunction dynamicC... | javascript | chosen |
[
{
"from": "system",
"value": "Improve reliability of rejectTokens mixin\n"
},
{
"from": "human",
"value": "/*\nExample:\n\nwidgets.mixins.rejectTokens([ 'comment' ])\n*/\nvar _ = require('lodash');\n\n\nmodule.exports = function(types) {\n return {\n filterMatch: function(range, props)... | javascript | chosen |
[
{
"from": "system",
"value": "Change post collection to allow using the PostFilter"
},
{
"from": "human",
"value": "/* global define */\n\ndefine([\n 'jquery',\n 'backbone',\n 'models/post-model',\n 'models/settings-model'\n], function ($, Backbone, Post, Settings) {\n 'use strict';\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Change to app from dist\n"
},
{
"from": "human",
"value": "var http = require(\"http\");\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nvar mime = require(\"mime\");\n\nfunction send404(response) {\n response.writeHead(404, {\"Content-type\" : \"text/... | javascript | chosen |
[
{
"from": "system",
"value": "Implement support for Linux and Mac OS X.\n"
},
{
"from": "human",
"value": "var path = require('path')\n , os = require('os');\n\nexports = path;\n"
},
{
"from": "gpt",
"value": "var path = require('path')\n , os = require('os');\n\nfor (key in path) ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lint error with annotation\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nimport minimist from 'minimist';\nimport { check, formatter, writeOutput, writeFile } from '../lib/cfpathcheck.js';\n\nconst argv = minimist(process.argv.slice(2));\n/**\n * Eve... | javascript | chosen |
[
{
"from": "system",
"value": "Use remote lively serviceworker URL\n"
},
{
"from": "human",
"value": "module.exports = {\n LOADER_TRANSPILE: true,\n WORKER_BASE: \"/lively4-serviceworker/src/\",\n WORKER_ENABLED: true,\n WORKER_INIT: \"/swx.js\",\n WORKER_EMBED: false,\n CLIENT_ENABLED: tru... | javascript | chosen |
[
{
"from": "system",
"value": "Remove spread operator for wider node coverage\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst _ = require('lodash')\nconst Database = require('./database')\nconst inflection = require('inflection')\n\n/**\n * Defines the Model class to be extended on a per... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.