conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use -s option before or after argument\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar fs = require('fs')\nvar path = require('path')\nvar argv = require('yargs')\n .alias('s', 'silent')\n .describe('s', 'print empty string instead of err... | javascript | chosen |
[
{
"from": "system",
"value": "Add --debug flag to command line to allow easier reporting\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\"use strict\";\n\nconst aliases = {\n\th: \"help\",\n\t\"-h\": \"help\",\n\t\"/h\": \"help\",\n\tv: \"version\",\n\t\"-v\": \"version\",\n\tn: \"new\"... | javascript | chosen |
[
{
"from": "system",
"value": "Join the welcome message on script init\n\n"
},
{
"from": "human",
"value": "/*Tell users to read the rules, \nwith a direct link to the channel,\nwhen they join.*/\nvar info = console.log.bind(console, \"[Welcomer]\");\n\nvar message = [\n \"Welcome to the serve... | javascript | chosen |
[
{
"from": "system",
"value": "Fix task not complete error\n"
},
{
"from": "human",
"value": "const childProcess = require('child_process');\nconst path = require('path');\n\nconst setup = require('setup/setup');\n\nfunction exec(command) {\n const run = childProcess.exec;\n return new Promise(... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite getTrace with util.promisify for readability\n"
},
{
"from": "human",
"value": "import debugModule from \"debug\";\nconst debug = debugModule(\"debugger:web3:adapter\");\n\nimport Web3 from \"web3\";\n\nexport default class Web3Adapter {\n constructor(provi... | javascript | chosen |
[
{
"from": "system",
"value": "Use jQuery to get elements\n"
},
{
"from": "human",
"value": "window.onload = initializeData()\nvar ref = new Firebase(\"https://cepatsembuh.firebaseio.com\");\nvar no_antri = new Firebase(ref + '/no_antrian');\n\nfunction initializeData() {\n var right_now = docum... | javascript | chosen |
[
{
"from": "system",
"value": "Switch dropdown value on selections\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\n\nimport NativeSelect from '@material-ui/core/NativeSelect'\n\nclass TimeSelect extends React.Component {\n render = () => {\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Set mime type for ts files explicitly.\n\nSet mime type to ensure that Chrome interprets Typescript\nfiles correctly when debugging unit tests.\n"
},
{
"from": "human",
"value": "var fs = require('fs')\n\nmodule.exports = function(config) {\n config.set({\n brow... | javascript | chosen |
[
{
"from": "system",
"value": "Add xterm.js to included files"
},
{
"from": "human",
"value": "module.exports = function(config) {\n config.set({\n frameworks: ['mocha', 'chai'],\n files: ['test/**/*.js', 'xterm-terminal.js'],\n reporters: ['progress'],\n port: 9876, // karma web se... | javascript | chosen |
[
{
"from": "system",
"value": "Update js interface to allow more params\n"
},
{
"from": "human",
"value": "/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regar... | javascript | chosen |
[
{
"from": "system",
"value": "Send person data in the request.\n"
},
{
"from": "human",
"value": "define([\"application\"], function(App) {\n App.EditProfileModalView = Ember.View.extend({\n actions: {\n save: function () {\n var person = this.get('controller.person')\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Enforce strict routing (handled in compiler)\n"
},
{
"from": "human",
"value": "/**\n\n server\n\n The backbone of the server module. In development, this runs proxied through\n BrowserSync server.\n\n @param {Object} options Options passed on to \"globals\"\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle case where screensEnabled isn't available (in Snack)\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport * as React from 'react';\nimport { Platform, StyleSheet, View } from 'react-native';\nimport { Screen, screensEnabled } from 'react-native-screens';\... | javascript | chosen |
[
{
"from": "system",
"value": "Set email address as optional to show optional label\n"
},
{
"from": "human",
"value": "const { isEmpty, pickBy } = require('lodash')\n\nconst logger = require('../../../config/logger')\nconst { createZenDeskMessage, postToZenDesk } = require('./services')\n\nasync ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace the Contact page with the FAQ page\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n angular.module('civic.services')\n .constant('ConfigService', {\n serverUrl: 'http://localhost:3000/',\n mainMenuItems: [\n {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use $timeout instead of setTimeout for better compatibility"
},
{
"from": "human",
"value": "/* global angular */\nconst MESSAGE_TIMEOUTS = {message: 7000, success: 6000, error: 14000};\n\nangular.module('dappChess').controller('MessagesCtrl', function ($scope) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change Beat's instance property 'freq' to 'frequency' for more natural get/setting\n"
},
{
"from": "human",
"value": "(function() {\n var Beat = function ( dance, freq, threshold, decay, onBeat, offBeat ) {\n this.dance = dance;\n this.freq = freq;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add new Mirage route handlers.\n"
},
{
"from": "human",
"value": "import getDailyRiderships from './get-daily-riderships';\nimport getRoute from './get-route';\nimport getRoutes from './get-routes';\nimport getServiceHourRiderships from './get-service-hour-ridership... | javascript | chosen |
[
{
"from": "system",
"value": "Fix context loss for eachFile helper\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport _ from 'lodash';\nimport minimatch from \"minimatch\";\n\nlet allFiles = {}\n\nmodule.exports.helpers = {\n\tequal(lvalue, rvalue, options) {\n\t\tif (arguments.... | javascript | chosen |
[
{
"from": "system",
"value": "Convert Non-strict to strict equality checking\nConvert non-strict equality checking, using `==`, to the strict version, using `===`."
},
{
"from": "human",
"value": "const analytics = {\n send: function(eventObject) {\n let analyticsPath;\n const path = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Add main route, change screen helper\n"
},
{
"from": "human",
"value": "\"use strict\";\n/**\n * Handle all routes.\n */\ndefine([\n \"underscore\",\n \"backbone\",\n \"app\"\n], function(_, Backbone, app) {\n\n // Define the application router.\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Add font smoothing for firefox\n"
},
{
"from": "human",
"value": "import { createGlobalStyle } from 'styled-components'\n\nexport default createGlobalStyle`\n body {\n margin: 0;\n padding: 0;\n -webkit-font-smoothing: antialiased;\n font-family: ${prop... | javascript | chosen |
[
{
"from": "system",
"value": "Use default options from socketcluster when not specified\n"
},
{
"from": "human",
"value": "import socketCluster from 'socketcluster-client';\nimport socketOptions from '../constants/socketOptions';\n\nlet socket;\nlet channel;\n\nexport function subscribe(subscrib... | javascript | chosen |
[
{
"from": "system",
"value": "Change proptypes for action to allow node\n\n* Changed proptypes for action in order to remove the proptypes warning when passing a node.\r\n\r\n* Changed action proptype to accept node\r\n"
},
{
"from": "human",
"value": "import { PropTypes } from 'react';\n\nexpor... | javascript | chosen |
[
{
"from": "system",
"value": "Remove superfluous string from format variable\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar request = require('request');\n\nvar opts = parseOptions(process.argv[2]);\n\nrequest(opts, function (err, res, body) {\n if (err) throw new Error(err);\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "FIX (field js): correctly refresh chosen fields if dependent field already has value\n"
},
{
"from": "human",
"value": "(function($){\n\t$.entwine('ss', function($){\n\n\t\t$('select.dependentdynamiclistdropdown').entwine({\n\t\t\tonmatch : function(){\n\t\t\t\tvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Use the RouterState mixin in GameNav\n"
},
{
"from": "human",
"value": "import * as React from 'react'\nimport {Octicon as OcticonClass} from './octicon'\nimport {Link} from 'react-router'\n\nlet Octicon = React.createFactory(OcticonClass);\n\nlet GameNavbar = React... | javascript | chosen |
[
{
"from": "system",
"value": "Update grunt setup to compile JSX properly\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n babel: {\n options: {\n sourceMap: true,\n presets: ['es2015... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing tapEventNames and tapCoordinates properties.\n"
},
{
"from": "human",
"value": "/**\n * Flag indicating if the client supports touch events.\n * \n * @returns {Boolean} <em>true</em> if have touch support\n * @preserve\n */\nsn.hasTouchSupport = (functio... | javascript | chosen |
[
{
"from": "system",
"value": "Add simple error handling during iframe creation.\n"
},
{
"from": "human",
"value": "var Promise = require('es6-promise').Promise;\n\nmodule.exports = {\n init: function(url) {\n createIframe(url)\n .then(sendHandshake);\n }\n};\n\nfunction createIframe(... | javascript | chosen |
[
{
"from": "system",
"value": "Add timezone/geometry/tags to new Operators from Feed\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport DS from 'ember-data';\nimport _ from 'npm:lodash';\n\nvar Feed = DS.Model.extend({\n\tonestop_id: Ember.computed.alias('id'),\n\toperators: DS... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure options is an object.\n"
},
{
"from": "human",
"value": "module.exports.extend = function(constructor, parent) {\n constructor.prototype = Object.create(parent.prototype);\n constructor.prototype.constructor = constructor;\n};\n\nvar utils = {};\n\nutils... | javascript | chosen |
[
{
"from": "system",
"value": "Use plurals in API resource URIs\n"
},
{
"from": "human",
"value": "export function signUp(name, email, password) {\n return fetch('/api/user', {\n method: 'POST',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update the loader to use SSL\n\nUpdate the loader to use SSL"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name\t\t InfernoShoutMod Dev\n// @namespace\t http://rune-server.org/\n// @include *.rune-server.org/forum.php\n// @include *.rune-server.... | javascript | chosen |
[
{
"from": "system",
"value": "Support custom options for each field\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Db = require('../');\n\nmodule.exports = Db;\n\nrequire('./row');\n\nDb.prototype.set('toDOMFieldset', function (document/*, options*/) {\n\tvar options = Object(arguments[... | javascript | chosen |
[
{
"from": "system",
"value": "Use webpack config to set publicPath\n"
},
{
"from": "human",
"value": "const FaviconsWebpackPlugin = require('favicons-webpack-plugin');\n\nmodule.exports.onCreateWebpackConfig = ({ actions, stage }, { logo, icons = {}, title, background }) => {\n if (stage === 'd... | javascript | chosen |
[
{
"from": "system",
"value": "Remove temp download link format that doesn't work\n"
},
{
"from": "human",
"value": "/////////////////////////////////\n// Dropbox injection functions //\n/////////////////////////////////\n\nDropbox.appKey = \"8oj6dw6o6urk6wn\";\n\nfunction addDropboxScriptTag() {... | javascript | chosen |
[
{
"from": "system",
"value": "Use the ES6 parseInt, which is in the Number namespace now.\n"
},
{
"from": "human",
"value": "const rawPathToEs6KataLink = (path) => {\n return `http://tddbin.com/#?kata=es6/language/${path}`;\n};\n\nexport default class Kata {\n \n static fromRawItem(rawItem) {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sidenav on full-index page\n"
},
{
"from": "human",
"value": "---\n---\n$(document).ready(function() {\n 'use strict';\n\n // Navbar\n // =======================================================\n const header = $('.header');\n const navbar = $('.navbar-prof... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite plugin instantiation for integration tests\n"
},
{
"from": "human",
"value": "let serverless\n\nexport async function setup(options) {\n const { servicePath } = options\n\n if (RUN_TEST_AGAINST_AWS) {\n return\n }\n\n // require lazy, AWS tests will e... | javascript | chosen |
[
{
"from": "system",
"value": "Use componentDidMount over willMount in boostrap\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Provider } from 'react-redux';\nimport { Router } from 'react-native-router-flux';\n\nimport setup from './store/setup';\nimport s... | javascript | chosen |
[
{
"from": "system",
"value": "Use middleware as generated by express-generator.\n"
},
{
"from": "human",
"value": "require('dotenv').config();\n\nvar path = require('path');\nvar express = require('express');\nvar passport = require('passport');\n\nvar authRouter = require('./routes/auth');\n\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path resolution on the command line to support absolute paths\n\nBefore the change, I could not `codecept run /my/absolute/path`.\r\n`path.join` would always stick the current working directory in front.\r\nMore proper path resolution is also simpler, as `path.resolve` will... | javascript | chosen |
[
{
"from": "system",
"value": "Use computed properties instead of manually checking equality\n"
},
{
"from": "human",
"value": "App.FlashMessage = Ember.Object.extend({\n type: 'notice',\n dismissable: true,\n message: null,\n\n isNotice: function(){\n return this.get('type') == 'notice';\... | javascript | chosen |
[
{
"from": "system",
"value": "chore(karma): Make sure `module` files are loaded first.\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n\tconfig.set({\n\n\n\t\tbasePath: '',\n\t\tfiles: [\n\t\t\t'vendor/angular/angular.js',\n\t\t\t'vendor/angular-animate/angular-animate.js... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional isNaN check for check methods.\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction hasTypeNumber(numberToCheck) {\n return typeof numberToCheck === 'number';\n}\n\nmodule.exports = {\n\n isNumeric: function isNumeric(numberToCheck) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Return a promise from a failed item save"
},
{
"from": "human",
"value": "import AppDispatcher from '../dispatchers/app-dispatcher';\nimport {products} from '../lib/sprintly-client';\n\nlet ItemActions = {\n addItem(productId, data) {\n let product = products.ge... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing method for empty panel\n"
},
{
"from": "human",
"value": "/**\n * Empty panel which is shown when no data object is selected.\n * @class\n */\nexport default class EmptyDetailPanel {\n constructor(rootElement, rb) {\n this.rootElement = rootEle... | javascript | chosen |
[
{
"from": "system",
"value": "Change format of ErlNumber class\n"
},
{
"from": "human",
"value": "var BigNumber = require(\"bignumber.js\");\n\nclass ErlNumber {\n constructor(value) {\n this.value = new BigNumber(value);\n }\n\n toString() {\n return this.value.toString()... | javascript | chosen |
[
{
"from": "system",
"value": "Use key/val data structure for evaluations\n"
},
{
"from": "human",
"value": "const mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\n\nconst studentSchema = new Schema({\n fname: String,\n lname: String,\n csub_id: Number,\n gender: String,\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Remove empty event handler in chaos monkey\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Stubby Chaos Money Demo Module\n */\n\nvar StubbyChaosMonkey = function() {\n\n /* min is inclusive, and max is exclusive */\n var getRandomArbitrary = functio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix null padding issues to pass tests\n"
},
{
"from": "human",
"value": "var crypto = require('crypto');\nvar iv = new Buffer(\"\");\n\nfunction createCryptor(key) {\n key = new Buffer(key);\n return function encrypt(data) {\n var cipher = crypto.create... | javascript | chosen |
[
{
"from": "system",
"value": "Rename action data to payload\n"
},
{
"from": "human",
"value": "function faceCaptures(state = [], action) {\n switch (action.type) {\n case 'FACE_CAPTURE':\n return [action.data, ...state]\n default:\n return state\n }\n}\n\nfunction documentCaptu... | javascript | chosen |
[
{
"from": "system",
"value": "Add RTL for not animated menu\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { View } from 'react-native';\n\nimport { computePosition, styles } from './ContextMenu';\n\n/**\nSimplified version of ContextMenu without animation.\n*/\nexport def... | javascript | chosen |
[
{
"from": "system",
"value": "Allow use of 'require' in the docs bootstrap\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: [\n 'onelint'\n ],\n plugins: ['import'],\n rules: {\n 'import/no-extraneous-dependencies': [\n 'error', {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix social links at the bottom of posts\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Helmet from 'react-helmet'\nimport { graphql } from 'gatsby'\nimport Layout from '../components/Layout'\nimport PostTemplateDetails from '../components/PostT... | javascript | chosen |
[
{
"from": "system",
"value": "Remove return early from buildElems\n"
},
{
"from": "human",
"value": "var walk = require('dom-walk')\n\nvar FormData = require('./index.js')\n\nmodule.exports = getFormData\n\nfunction buildElems(rootElem) {\n var hash = {}\n if (rootElem.name) {\n \thash[... | javascript | chosen |
[
{
"from": "system",
"value": "Handle Reserve from Booking Model\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar Objectid = mongoose.Schema.Types.ObjectId;\n\nvar BookingSchema = new Schema({\n\troom: Objectid,\n\tstart_time... | javascript | chosen |
[
{
"from": "system",
"value": "Use assign instead of merge\n"
},
{
"from": "human",
"value": "'use strict'\n\nimport * as types from '../constants/action-types'\nimport { REQUEST_PAGE_START_FROM } from '../constants/author-page'\n\nimport get from 'lodash/get'\nimport isArray from 'lodash/isArray... | javascript | chosen |
[
{
"from": "system",
"value": "Allow <a>-tags for policyAreas.summary and policies.summary\n"
},
{
"from": "human",
"value": "o_.capitaliseFirstLetter = function(string){\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\no_.lowerFirstLetter = function(string){\n if(!string) ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a small bug related to onLoadHooks\n"
},
{
"from": "human",
"value": "/* boilerUtils\n * This object holds functions that assist Boilerplate\n */\n\nvar boilerUtils = {}\n\nboilerUtils.renderAction = function renderAction (action) {\n return {\n 'string': al... | javascript | chosen |
[
{
"from": "system",
"value": "Fix dust driver to include innerHTML\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst fs = require('fs')\nconst { resolve } = require('url')\nconst escapeHTML = require('escape-html')\n\nmodule.exports = createDustRenderer\n\nfunction createDustRenderer () {... | javascript | chosen |
[
{
"from": "system",
"value": "Make css loader work with promises\n"
},
{
"from": "human",
"value": "phast.stylesLoading = 0;\n\nvar resourceLoader = new phast.ResourceLoader.make(phast.config.serviceUrl);\n\nphast.forEachSelectedElement('style[data-phast-params]', function (style) {\n phast.s... | javascript | chosen |
[
{
"from": "system",
"value": "Return the response object, rather than body\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst baseUrl = 'http://www.spc.noaa.gov/climo/data/nglsr/data/rpts/';\nconst Promise = require('bluebird');\nconst request = Promise.promisifyAll(require('request'));\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure we can easily create new daily logs\n"
},
{
"from": "human",
"value": "var\n moment = require('moment'),\n sprintf = require('sprintf'),\n fsr = require('file-stream-rotator');\n\nfunction create_logger (streamConfig) {\n\n streamConfig = streamConfig ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"GCW- 2473- Replace Admin Offers UI with Dashboard and Search Filters\"\"\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport preloadDataMixin from '../mixins/preload_data';\n\nexport default Ember.Route.extend(preloadDataMixin, {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add changes to the js file\n"
},
{
"from": "human",
"value": "// window.checkAdLoad = function(){\n// var checkAdLoadfunction = function(){\n// var msg = \"Ad unit is not present\";\n// if($(\"._teraAdContainer\")){\n// console.log(\"Ad unit is prese... | javascript | chosen |
[
{
"from": "system",
"value": "Allow multiple arguments for async actions\n"
},
{
"from": "human",
"value": "import AsyncQueue from '../utils/asyncQueueStructures';\n\nlet asyncQueue = new AsyncQueue();\n\nconst endAsync = () => ({ type: 'ASYNC_INACTIVE' });\n\nconst startAsync = () => ({ type: '... | javascript | chosen |
[
{
"from": "system",
"value": "Augment stack traces limit to 100.\n"
},
{
"from": "human",
"value": "try { require('source-map-support-2/register') } catch (_) {}\n\n// Async stacks.\ntry { require('trace') } catch (_) {}\n\n// Removes node_modules and internal modules.\ntry {\n var sep = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Update mutable methods for arguments passing\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) 2015-present, Joshua Hollenbeck\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix fatal error when visible section is a descendant of invisible one.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n/**\n * to_tree(source[, root = null]) -> array\n * - source (array): array of sections\n * - root (mongodb.BSONPure.ObjectID|String): id ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing globally registered <Icon> in tests\n"
},
{
"from": "human",
"value": "import Vue from 'vue';\nimport Vuetify from 'vuetify';\n\nVue.use(Vuetify);\n\nconst csrf = global.document.createElement('input');\ncsrf.name = 'csrfmiddlewaretoken';\ncsrf.value = '... | javascript | chosen |
[
{
"from": "system",
"value": "Fix jest hast map issue with .cache folder in examples\n\nSigned-off-by: Alexandre Bodin <70f0c7aa1e44ecfca5832512bee3743e3471816f@gmail.com>\n"
},
{
"from": "human",
"value": "module.exports = {\n name: 'Unit test',\n testMatch: ['**/packages/**/__tests__/?(*.)+(... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Make tick thicker to facilitate hovering\"\n\nThis reverts commit a90e6f1f92888e0904bd50d67993ab23ccec1a38.\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Service for the spec config.\n// We keep this separate so that changes are kept even if the sp... | javascript | chosen |
[
{
"from": "system",
"value": "Add radix to a parseInt()\n"
},
{
"from": "human",
"value": "Gittip.upgrade = {};\n\nGittip.upgrade.init = function () {\n\n var userAgent = navigator.userAgent.toLowerCase();\n var browser = (userAgent.indexOf('msie') != -1) ? parseInt(userAgent.split('msie')... | javascript | chosen |
[
{
"from": "system",
"value": "Change messaging based on cookie\n"
},
{
"from": "human",
"value": "// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie\n\nconsole.log('Any cookies yet? ' + document.cookie);\n\nconsole.log('Setting a cookie...');\n\ndocument.cookie = 'something=some... | javascript | chosen |
[
{
"from": "system",
"value": "Add active class to current page in drop down\n"
},
{
"from": "human",
"value": "$(function() {\r\n $.get(\"includes/header.html\", function(data) {\r\n $('body').prepend(data);\r\n });\r\n $(\"#footer\").load(\"includes/footer.html\");\r\n})"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing username in initial login session\n"
},
{
"from": "human",
"value": "/* eslint-disable no-param-reassign */\n\nimport Vue from 'vue';\n\nexport default {\n namespaced: true,\n\n state: {\n username: null,\n },\n\n mutations: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update case on CodeMirror require in case web server is case sensitive (like gh-pages)\n"
},
{
"from": "human",
"value": "require.config({\n paths: {\n \"knockout\": \"ext/knockout-2.1.0\",\n \"jquery\": \"ext/jquery-1.7.2.min\",\n \"text\": ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error propagation in middleware\n"
},
{
"from": "human",
"value": "'use strict';\n\nlet express = require('express');\n\nlet router = require('./router.js');\nlet createDatabaseManager = require('./models/dbManager.js');\nlet ClientError = require('./errors.js')... | javascript | chosen |
[
{
"from": "system",
"value": "Remove hasmark from TAP titles.\n"
},
{
"from": "human",
"value": "\n/**\n * Module dependencies.\n */\n\nvar Base = require('./base')\n , cursor = Base.cursor\n , color = Base.color;\n\n/**\n * Expose `TAP`.\n */\n\nexports = module.exports = TAP;\n\n/**\n * Init... | javascript | chosen |
[
{
"from": "system",
"value": "Use headless Chrome in non-tdd mode\n"
},
{
"from": "human",
"value": "module.exports = function (karma) {\n let configuration = {\n basePath: '.',\n frameworks: ['mocha'],\n files: [\n { pattern: 'node_modules/chai/chai.js', include: true },\n '... | javascript | chosen |
[
{
"from": "system",
"value": "Add Node <5 support by removing spread operator"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports =\n{\n\tbase_name\t\t: 'sms',\n\taction_name\t\t: 'sms/{id}',\n\n\tsend: function() {\n\t\treturn this.action(...arguments);\n\t},\n\n\tgetResponses: fun... | javascript | chosen |
[
{
"from": "system",
"value": "Add chapter 3, exercise 1\n"
},
{
"from": "human",
"value": "function min(a, b) {\n return a < b ? a : b;\n}\n\nconsole.log(min(0, 10));\nconsole.log(min(0, -10));\n"
},
{
"from": "gpt",
"value": "function min(a, b) {\n\treturn a < b ? a : b;\n}\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Add sample.com site. Rerouting allows testing site routing, so here's a site.\n"
},
{
"from": "human",
"value": "var background= __dirname+'/../background';\nvar map= {\n localhost: background\n ,'127.0.0.1': background\n}\n\nexports= module.exports= {\n lookup: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix an issue with matching route\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport Receipt from './Receipt';\nimport ReceiptsList from './ReceiptsList';\nimport './App.css';\nimpor... | javascript | chosen |
[
{
"from": "system",
"value": "Update rate limit policy to set redis expiry inline with windowMs\n"
},
{
"from": "human",
"value": "const RateLimit = require('express-rate-limit');\nconst RedisStore = require('rate-limit-redis');\nconst logger = require('../../logger').policy;\n\nmodule.exports =... | javascript | chosen |
[
{
"from": "system",
"value": "Add exec() to xRegExp wrapper\n\nxRegExp includes an exec() method that we are using, but we hadn't\nincluded it on our wrapper, so it was failing.\n"
},
{
"from": "human",
"value": "const xRegExp = require('xregexp');\n\n/**\n * Wrapper for xRegExp to work around\n... | javascript | chosen |
[
{
"from": "system",
"value": "Update logger and add config\n"
},
{
"from": "human",
"value": "import Joi from 'joi';\nimport jsonServerConfig from 'config/server.json';\nimport schema from './schema.js';\n\nclass ServerConfig {\n constructor() {\n this._jsonConfig = jsonServerConfig;\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Throw errors if a template is not set, or if a template can't be loaded\n"
},
{
"from": "human",
"value": "var fs = require('fs');\n\nmodule.exports = function(opts) {\n this.options = opts;\n\n if (!opts.handlebars) this.options.handlebars = require('handlebars')... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak grid demo column header text\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n setupController: function() {\n this.controllerFor( 'pagination' ).get( 'translateService' ).setDictionary( Ember.Obje... | javascript | chosen |
[
{
"from": "system",
"value": "Add parameters to stub loading/saving methods\n"
},
{
"from": "human",
"value": "var h = require('html')\nvar Panel = require('panel')\n\nfunction Editor() {\n this.layersPanel = new Panel(this, 215, h('.layers-panel'))\n this.inspectorPanel = new Panel(this, 215,... | javascript | chosen |
[
{
"from": "system",
"value": "Change format to widget to be more friendly with ajv\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nexport const isRequired = (schema, fieldName) => {\n if (!schema.required) {\n return false\n }\n return (schema.required.indexOf(fie... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue in flat list\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport React from 'react'\nimport {TouchableOpacity, View, FlatList} from 'react-native'\n\nexport default class NodeView extends React.PureComponent {\n\n componentWillMount = () => {\n le... | javascript | chosen |
[
{
"from": "system",
"value": "Fix due to removed clientInfo property\n"
},
{
"from": "human",
"value": "var express = require('express'),\n\trouter = express.Router(),\n\tpassport = require('passport');\n\nmodule.exports = function (app) {\n\tapp.use('/account', router);\n};\n\nrouter.get('/', f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove useless sinon require shim\n"
},
{
"from": "human",
"value": "'use strict';\n\nrequire.config({\n baseUrl: '../lib',\n paths: {\n 'test': '..',\n 'forge': 'forge.min',\n 'stringencoding': 'stringencoding.min'\n },\n shim: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong type for title in post model.\n"
},
{
"from": "human",
"value": "/*jslint eqeq: true, indent: 2, node: true, plusplus: true, regexp: true, unparam: true, vars: true, nomen: true */\n'use strict';\n\nvar Schema = require('mongoose').Schema;\n\n/**\n * The a... | javascript | chosen |
[
{
"from": "system",
"value": "Use the progress reporter for karma\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n config.set({\n frameworks: ['mocha'],\n\n exclude: ['build/test/external.spec.js'],\n\n files: [\n 'vendor/es5-shim.js',\n 'vendor/es5-sh... | javascript | chosen |
[
{
"from": "system",
"value": "Add a test for controllers\n"
},
{
"from": "human",
"value": "describe('Sock object', function() {\n var socket;\n var pong;\n var joinRoom;\n beforeEach(function() {\n });\n\n afterEach(function() {\n });\n\n it('should exist', function() {\n expect(wind... | javascript | chosen |
[
{
"from": "system",
"value": "Enable muting for internal MIT users.\n\n(imported from commit 82dc8c620c5f9af5b7a366bd16aee9125b9ba634)\n"
},
{
"from": "human",
"value": "var feature_flags = (function () {\n\nvar exports = {};\n\nexports.mark_read_at_bottom = true;\nexports.summarize_read_while_n... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.