conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Prepare elements for new styles\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport './App.css';\nimport { connect } from 'react-redux';\nimport SelectGender from './components/SelectGender.js';\nimport store from './store.js';\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove cb argument from evaluate() and mark as async.\n\nCo-Authored-By: Andreas Lind <9d09920e13870a2871b35105baa9dce1d35b3390@gmail.com>"
},
{
"from": "human",
"value": "var extractSnippets = require('./extractSnippets');\nvar evaluateSnippets = require('./evaluat... | javascript | chosen |
[
{
"from": "system",
"value": "Clarify which part of the state is used for rendering\n"
},
{
"from": "human",
"value": "import {combineReducers} from 'redux';\n\nimport addingComponent from './reducers/addingComponent';\nimport movingComponent from './reducers/moveComponent';\nimport mode from '.... | javascript | chosen |
[
{
"from": "system",
"value": "Use the document object and a selector so the events are bound to dynamically created objects.\n"
},
{
"from": "human",
"value": "//= require jquery\n//= require dataTables/jquery.dataTables\n//= require_tree .\n\n$(function() {\n $(\"table\").dataTable({\n \"aa... | javascript | chosen |
[
{
"from": "system",
"value": "Correct the frequency for updating tasks\n"
},
{
"from": "human",
"value": "// Ctrl+Enter adds to the report\n$(document).ready(function(){\n\t$('#item').keydown(function (e) {\n\t if (e.keyCode === 13 && e.ctrlKey) {\n\t $('#report_item_submit').click();\n\t ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove packages that were never used\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n/* eslint max-len: 0 */\nimport _ from 'lodash';\nimport fs from 'fs';\nimport path from 'path';\nimport glob from 'glob';\nimport gulp from 'gulp';\n\n// Copy necessary p... | javascript | chosen |
[
{
"from": "system",
"value": "Fix regression in D-01186, introduced by B-03523\n\nThe solution for B-03523 incorrectly tests when the status is set to \"DOWN\".\nIt appears to be testings if the service is visible to the public OR if the status is \"DOWN\".\nThis ends up exposing non-public services to anon... | javascript | chosen |
[
{
"from": "system",
"value": "Update routes (automatic routes list:create)\n"
},
{
"from": "human",
"value": "import { err, notFound } from './middlewares/errors'\nimport { Router } from 'express'\nimport ctrl from './controllers/'\n\nconst router = Router()\n.get('users', ctrl.users.list)\n.pos... | javascript | chosen |
[
{
"from": "system",
"value": "Remove return before starting the watcher\n"
},
{
"from": "human",
"value": "'use strict';\n\nlet utils = require('./utils');\nlet path = require('path');\n\nfunction hook(callback) {\n if (this.isAfter()) {\n return callback();\n }\n\n let directory = path.jo... | javascript | chosen |
[
{
"from": "system",
"value": "Add the bang line to eecute the file directly\n"
},
{
"from": "human",
"value": "\nfunction toInt(num) { return parseInt(num, 10); }\n\n// Read command line arguments\nvar args = process.argv,\n n = args.length;\n\nvar numbers = args.slice(2, n).map(toInt);\n\nva... | javascript | chosen |
[
{
"from": "system",
"value": "Copy any vendored CSS to build directory.\n"
},
{
"from": "human",
"value": "module.exports = {\n // These copy tasks happen before transpile or hinting. They\n // prepare the build pipeline by moving JavaScript files to\n // tmp/javascript.\n //\n \"prepare\":... | javascript | chosen |
[
{
"from": "system",
"value": "Add command line option to bind to all interfaces (or specific IP)\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nvar commander = require('commander');\nvar proxy = require('./proxy.js');\n\ncommander\n// .version(meta.version)\n .usage('[options] <endpoi... | javascript | chosen |
[
{
"from": "system",
"value": "Move all navigation code into try block\n\nThis prevents navigation forward when the validation failed.\nBefore the user didn't have the chance to correct what was wrong and\nwhere immediately taken on the next page.\n"
},
{
"from": "human",
"value": "import { take,... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug where the interaction wouldn't always work on Explore's map\n\nThe interaction wouldn't work with the non-default layers of the datasets.\n"
},
{
"from": "human",
"value": "import { createSelector } from 'reselect';\nimport isEmpty from 'lodash/isEmpty';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add badge text to signify that livereload is on\n"
},
{
"from": "human",
"value": "// State, contains tabs which have livereloading enabled.\nlet enabledTabs = []\n\nconst toolbarButtonHandler = tab => {\n enabledTabs.push(tab)\n browser.tabs.executeScript(tab.id,... | javascript | chosen |
[
{
"from": "system",
"value": "Allow Perseus to load in IE9.\n\nSummary:\nSupport ticket: https://app.asana.com/0/27216215224639/49500138320617/f\n\nPerseus was not loading at all in IE9 because it was choking on our\nuse of the `const` keyword. The solution is to enable Babel's support\nfor constants.\n\nTe... | javascript | chosen |
[
{
"from": "system",
"value": "Return stats object when checking for expiry.\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst {promisify} = require('util');\n\nconst stat = promisify(fs.stat);\n\nconst checkCacheExpiry = (path, ttl) =>\n stat(path).then(({mtime}) => {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for using the extension from inside an iframe\n"
},
{
"from": "human",
"value": "// FORKED FROM https://github.com/muaz-khan/WebRTC-Experiment/tree/master/Chrome-Extensions/desktopCapture\n\n// this background script is used to invoke desktopCapture API to capt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test to register collisions\n"
},
{
"from": "human",
"value": "const assert = require('chai').assert;\n\nconst Plane = require('../lib/javascripts/plane');\nconst CollisionDetector = require('../lib/javascripts/collision_detector')\n\ndescribe('Collision detecto... | javascript | chosen |
[
{
"from": "system",
"value": "Use native Node functions if possible\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar normalize = require('../../lib/path/normalize')\n , separator = require('../../lib/path/separator');\n\nmodule.exports = function (t, a) {\n\ta(t('raz/dwa/'), normalize('r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JS error preventing newly created dictionary items from opening automatically\n\n(cherry picked from commit 59f90bd08be677817133584fc877f4a53a349359)\n"
},
{
"from": "human",
"value": "/**\n * @ngdoc controller\n * @name Umbraco.Editors.Dictionary.CreateControl... | javascript | chosen |
[
{
"from": "system",
"value": "Remove TODO -> was done, but forgot to delete it\n"
},
{
"from": "human",
"value": "/**\n * Created by quasarchimaere on 21.01.2019.\n */\nimport { get } from \"../utils.js\";\nimport {\n isProcessingInitialLoad,\n isProcessingLogin,\n isProcessingLogout,\n isPr... | javascript | chosen |
[
{
"from": "system",
"value": "Establish new Question View on show page with el set to div containing said question\n"
},
{
"from": "human",
"value": "var app = app || {};\nvar ENTER_KEY = 13;\n\n$(document).ready(function() {\n app.currentUser.set(\"currentQuestion\", new app.Question());\n});"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix flexberry-model blueprint JSCS errors in generated mixin\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport DS from 'ember-data';\n<%if(projections) {%>import { Projection } from 'ember-flexberry-data';<%}%>\n<% for (let enumName in enumImport... | javascript | chosen |
[
{
"from": "system",
"value": "title: Mark `narrow` param optional in `getTitle*Color` selectors.\n\n`getIsInTopicOrStreamNarrow` already accepts narrow as undefined,\nreturning false in that case.\n"
},
{
"from": "human",
"value": "/* @flow */\nimport { createSelector } from 'reselect';\n\nimpor... | javascript | chosen |
[
{
"from": "system",
"value": "Update manifest URL to https\n"
},
{
"from": "human",
"value": "angular.module( 'App.Views' ).controller( 'ClientCtrl', function( $sce, $http, App, Device, Growls, Fireside_Post, payload )\n{\n\tvar _this = this;\n\n\tApp.title = 'Game Jolt Client'\n\n\tthis.platfor... | javascript | chosen |
[
{
"from": "system",
"value": "Put back changes in observer after unsuccessful commit.\n"
},
{
"from": "human",
"value": "/**\n * Topic observer pattern base class\n */\nexport class TopicObserver {\n\n constructor() {\n this.observers = { __all__: [] };\n }\n\n observe(fn, topic)... | javascript | chosen |
[
{
"from": "system",
"value": "Change Direction of Chip While Equality of Rand Numbers Otherwise Changing Position\n"
},
{
"from": "human",
"value": "module.exports =\n{\n mutationFunction: function(phenotype)\n {\n // make a random change to phenotype\n var count = Math.floor((phenotype.... | javascript | chosen |
[
{
"from": "system",
"value": "Allow click-drag on polygons to still move the map around\n"
},
{
"from": "human",
"value": "/**\n *\n * Displaying popups\n *\n */\n\nMapPopup = {\n map: null,\n layer: null,\n\n init: function(m, l) {\n this.map = m;\n this.layer = l;\n m.addControl(ne... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct name for twit package\n"
},
{
"from": "human",
"value": "var Twit = Npm.require('Twit');\n\nPostTweetForFlight = {\n post: function (flight) {\n var tweetMessage = \"✈✈✈ Flight #\" + flight.number + \" on @airstripio - http://airstrip.io/f/\" + fligh... | javascript | chosen |
[
{
"from": "system",
"value": "Remove fields from PostCSS 8.2.1\n"
},
{
"from": "human",
"value": "function clean (node) {\n delete node.inputs;\n if (node.source) delete node.source.inputId\n delete node.indexes\n delete node.lastEach\n delete node.rawCache\n\n if (node.nodes) node.nodes =... | javascript | chosen |
[
{
"from": "system",
"value": "Fix nested styles on headings\n"
},
{
"from": "human",
"value": "import styled from \"@emotion/styled\"\nimport PropTypes from \"prop-types\"\nimport React from \"react\"\n\nconst styles = {\n \"& a\": {\n background: \"none\",\n textShadow: \"none\",\n },\n... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce SQLite connection pool size from 5 to 1\n\n(hopefully fixes #1309)\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\n\n/* jslint node: true */\nconst fs = require('fs')\nconst path = req... | javascript | chosen |
[
{
"from": "system",
"value": "Fix templateUrl: use a relative path instead of absolute path\n"
},
{
"from": "human",
"value": "angular.module('myApp.games', [])\n\n.directive('buttonClickGame', function() {\n return {\n restrict: 'E',\n templateUrl: '/app/partials/buttonClick.html',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix auth service tokens url"
},
{
"from": "human",
"value": "chipsterWeb.factory('AuthenticationService', ['localStorageService', '$http', 'ConfigService',\n function (localStorageService, $http, ConfigService) {\n\n var service = {};\n\n // Do the ... | javascript | chosen |
[
{
"from": "system",
"value": "Update negotiationController, using the NegotiationList\n"
},
{
"from": "human",
"value": "class NegotiationController {\n\n constructor() {\n const $ = document.querySelector.bind(document);\n\n // avoid traversing the DOM many times\n this._amount = $('#... | javascript | chosen |
[
{
"from": "system",
"value": "Update example to 'try' authentication, so guest user can be used\n"
},
{
"from": "human",
"value": "var Hapi = require('hapi');\nvar Path = require('path');\n\nvar server = new Hapi.Server();\nserver.connection({ port: 4000 });\n\nserver.views({\n engines: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure traceBuffer is referenced"
},
{
"from": "human",
"value": "var utils = require('../utils')\nvar transactionStore = require('../transactionStore')\n\nmodule.exports = function ($provide, traceBuffer) {\n // Controller Instrumentation\n $provide.decorator(... | javascript | chosen |
[
{
"from": "system",
"value": "Remove done param from migration file\n"
},
{
"from": "human",
"value": "const {readFileSync} = require('fs');\n\nmodule.exports = {\n up: function (queryInterface, Sequelize, done) {\n\n return [\n queryInterface.renameColumn(\n 'users',\n 's... | javascript | chosen |
[
{
"from": "system",
"value": "Rename the client to socket because that's less confusing\n"
},
{
"from": "human",
"value": "var dgram = require('dgram');\n\nvar Transmitter = function () {};\n\nTransmitter.prototype.transmit = function (packet) {\n var client = dgram.createSocket(\"udp4\");\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow other query params when feature testing\n"
},
{
"from": "human",
"value": "const { get, isEmpty } = require('lodash')\n\nconst config = require('../config')\nconst { authorisedRequest } = require('../lib/authorised-request')\n\n/**\n * Allows users with the gi... | javascript | chosen |
[
{
"from": "system",
"value": "Convert umlaute in slugger urls\n\n"
},
{
"from": "human",
"value": "const mkdirp = require('mkdirp');\nconst fs = require('fs');\nconst dirname = require('path').dirname;\n\n// Create \"this-is-a-post\" from \"This is a Post\"\nexports.slugger = str => str.toLowerC... | javascript | chosen |
[
{
"from": "system",
"value": "blueprints: Update auto-installed \"ember-cli-chai\" to v0.3.0\n"
},
{
"from": "human",
"value": "var EOL = require('os').EOL;\n\nmodule.exports = {\n name: 'ember-cli-mocha',\n\n normalizeEntityName: function() {\n // this prevents an error when the entityName... | javascript | chosen |
[
{
"from": "system",
"value": "Prepare DOM with required custom gelato elements.\n"
},
{
"from": "human",
"value": "var Application = require('application');\n\nmodule.exports = (function() {\n\n function start() {\n window.app = new Application();\n window.app.start();\n }\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add better commenting to floorMult filter."
},
{
"from": "human",
"value": "/* Filter for finding the next-smallest multiple of input number */\nangular.module('sknFloorMultFilter', []).filter('floorMult', function() {\n return function(input, multSize) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with About slidebox view needing to be refreshed when coming from map view\n"
},
{
"from": "human",
"value": "'use strict';\nangular.module('Trendicity')\n\n.controller('IntroCtrl', function($scope, $state, $ionicSlideBoxDelegate, $ionicSideMenuDelegate, $... | javascript | chosen |
[
{
"from": "system",
"value": "Update the names of custom properties in the epub-reflowable module\n"
},
{
"from": "human",
"value": "EpubReflowable.ReflowableCustomizer = Backbone.Model.extend({\n\n initialize : function (attributes, options) {\n\n this.$parentEl = $(this.get(\"parentE... | javascript | chosen |
[
{
"from": "system",
"value": "Change default port to 3333\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nconst pkg = require('../package.json')\n\n// @todo Figure out a better way to detect if we're running in \"development mode\"\nconst serverDevMode = Boolean(pkg._id) === false\nconst... | javascript | chosen |
[
{
"from": "system",
"value": "Convert function to a one-liner.\n\nSee #1121.\n"
},
{
"from": "human",
"value": "const ascension = require('ascension')\nconst sort = ascension([ Number ], entry => [ entry.when ])\n\nconst Isochronous = require('isochronous')\n\nclass Printer {\n constructor (d... | javascript | chosen |
[
{
"from": "system",
"value": "Edit FileManager path in router\n"
},
{
"from": "human",
"value": "import Vue from 'vue';\nimport Router from 'vue-router';\nimport FileManager from 'components/FileManager';\nimport Content from 'components/editor-viewer/Content';\n\nVue.use(Router);\n\nexport defa... | javascript | chosen |
[
{
"from": "system",
"value": "Add meiosis-tracer to requirejs example.\n"
},
{
"from": "human",
"value": "/*global requirejs*/\nrequirejs.config({\n paths: {\n meiosis: \"../lib/meiosis.min\",\n meiosisVanillaJs: \"../lib/meiosis-vanillajs.min\"\n }\n});\n\nrequirejs([\"require\", \"meio... | javascript | chosen |
[
{
"from": "system",
"value": "Set branch version to MAJOR\n"
},
{
"from": "human",
"value": "import { fail, danger } from 'danger';\nimport { flatten, intersection, isEmpty } from 'lodash';\n\nconst pkg = require('./package.json'); // eslint-disable-line import/newline-after-import\nconst prLogC... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to HTML with SSR package\n"
},
{
"from": "human",
"value": "Meteor.methods({\n 'sendEmail': function (to, from, subject, text) {\n check([to, from, subject, text], [String]);\n\n // Let other method calls from the same client start running,\n // wit... | javascript | chosen |
[
{
"from": "system",
"value": "Add no-cache flag to docker build\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar exec = require('child_process').exec;\n\nvar IMAGE_TAG = process.env.DOCKER_IMAGE_TAG || 'ottogiron/hapiember';\n\ngulp.task('build-docker', function(callback){\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add node modules to ignore watch\n\n"
},
{
"from": "human",
"value": "module.exports = {\n apps : [\n {\n name: \"CaSS\",\n script: \"./src/main/server.js\",\n watch: true,\n ignore_watch: [\"logs\"],\n instance... | javascript | chosen |
[
{
"from": "system",
"value": "Add 2 permalink parameters: i_month and i_day\n"
},
{
"from": "human",
"value": "exports.id = function(post){\n return post.id || post._id;\n};\n\nexports.title = function(post){\n return post.slug;\n};\n\nexports.year = function(post){\n return post.date.format(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in games with no move timeout\n"
},
{
"from": "human",
"value": "class Timer {\n\n start(code, delay) {\n this.timeoutObj = setTimeout(function() {\n this.timeoutObj = null;\n code();\n }, delay);\n\n this.timeoutObj.startTime = Date.now(... | javascript | chosen |
[
{
"from": "system",
"value": "Add a function to change text colour of input to colour being typed\n\nSigned-off-by: Cole Peters <c40dbb01a0ae2ed2db5ce64b57b4492867839e53@colepeters.com>\n"
},
{
"from": "human",
"value": "$('input.convert').click(convert);\n\nfunction convert() {\n var input ... | javascript | chosen |
[
{
"from": "system",
"value": "Use the babel-runtime to fix the build\n"
},
{
"from": "human",
"value": "/* global process */\nmodule.exports = function (config) {\n config.set({\n browsers: [ process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome' ],\n singleRun: true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for contrast stylesheet public path\n"
},
{
"from": "human",
"value": "/* eslint-disable no-underscore-dangle */\nimport last from 'lodash/last';\n/**\n * Change the Scope UI theme from normal to high-contrast.\n * This will inject a stylesheet into <head> and o... | javascript | chosen |
[
{
"from": "system",
"value": "Fix comment around IE11 detection.\n\nIt makes no sense, I know. But it definitely is correct.\n"
},
{
"from": "human",
"value": "// `window.ActiveXObject` returns undefined in IE11 (as well as non-IE browsers)\n// `\"ActiveXObject\" in window` returns `true` in all... | javascript | chosen |
[
{
"from": "system",
"value": "Fix touchable list group item\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport BaseTouchable from '../../utils/rnw-compat/BaseTouchable';\nimport useActionElement from '../../hoo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error when activating on empty editor\n"
},
{
"from": "human",
"value": "'use babel'\n\nimport { dirname, basename } from 'path'\n\nfunction getPath (path) {\n let [projectPath, filePath] = atom.project.relativizePath(path)\n\n if (!projectPath) {\n project... | javascript | chosen |
[
{
"from": "system",
"value": "Disable firefox for e2e tests.\n\nCurrent firefox 35 not compatibile with selenium 2.44\n"
},
{
"from": "human",
"value": "var HtmlReporter = require('protractor-html-screenshot-reporter');\n\nexports.config = {\n allScriptsTimeout: 11000,\n\n specs: [\n '*.js'... | javascript | chosen |
[
{
"from": "system",
"value": "Remove request-payload as a dependency\n"
},
{
"from": "human",
"value": "/*\n * Server \n *\n */\n\n// Define dependencies \nconst http = require('http');\nconst payload = require('request-payload');\n\n// Create module object\nvar server = {};\n\n// Is listening a... | javascript | chosen |
[
{
"from": "system",
"value": "Fix indentation on boostrap function\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * An asynchronous bootstrap function that runs before\n * your application gets lifted.\n *\n * This gives you an opportunity to set up your data model,\n * run jobs, or p... | javascript | chosen |
[
{
"from": "system",
"value": "Store the last peek42 websocket reference (and terminate the previous)"
},
{
"from": "human",
"value": "import EventEmitter from 'events';\n\nconst cable = {\n __proto__: EventEmitter.prototype,\n\n init(websocket) {\n this.emit('ready', websocket);\n },\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in unknown service provider error message"
},
{
"from": "human",
"value": "var services = {\n 'travis' : require('./services/travis'),\n 'circle' : require('./services/circle'),\n 'buildkite' : require('./services/buildkite'),\n 'codeship' : require('./... | javascript | chosen |
[
{
"from": "system",
"value": "Fix log4js during the `npm install pulsar-rest-api`\n"
},
{
"from": "human",
"value": "var log4js = require('log4js');\nlog4js.configure('bin/log4js.json', {reloadSecs: 300});\n\nmodule.exports = log4js.getLogger();\n"
},
{
"from": "gpt",
"value": "var l... | javascript | chosen |
[
{
"from": "system",
"value": "Add bootstrap to build process for testing\n\nNeeded to handle visibility checks in integration tests\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n/* global require, module */\n\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nvar a... | javascript | chosen |
[
{
"from": "system",
"value": "Undo accidental commit that changed the platformer starting map\n"
},
{
"from": "human",
"value": "game.PlayScreen = me.ScreenObject.extend({\n /**\n * action to perform on state change\n */\n onResetEvent: function() {\n // load a level\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add log level to configuration\n"
},
{
"from": "human",
"value": "/* eslint key-spacing:0 spaced-comment:0 */\nconst path = require('path');\nconst ip = require('ip');\n\nconst projectBase = path.resolve(__dirname, '..');\n\n/****************************************... | javascript | chosen |
[
{
"from": "system",
"value": "fix(referrals-invite): Fix sms link for iOS\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n console.log('test');\n var smsElem = $('#invite_sms');\n var emailElem = $('#invite_email');\n var codeElem = $('#invitation_code');\n rogerthat.cal... | javascript | chosen |
[
{
"from": "system",
"value": "Call module gulpease with socket plugin\n"
},
{
"from": "human",
"value": "function start() {\n console.log( \"Start\" );\n}\n"
},
{
"from": "gpt",
"value": "function start() {\n const socket = require( './socket_plugin' );\n socket.run( \"gulpe... | javascript | chosen |
[
{
"from": "system",
"value": "Make Int and cleanJSON plain functions\n\nThis facilitates recursion. Then we can `module.exports` these named\nfunctions.\n"
},
{
"from": "human",
"value": "module.exports = {\n /**\n * Just like parseInt, but fixed to base-10\n */\n Int(str) {\n return p... | javascript | chosen |
[
{
"from": "system",
"value": "[CHORE] Remove ripple rest fom package.json.\n"
},
{
"from": "human",
"value": "var exec = require('child_process').exec;\nvar spawn = require('child_process').spawn;\n\nfunction GatewayProcessManager() {\n\n this.processNames = [\n \"ripple_rest\",\n \"depos... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Check if app is mounted\"\n\nThis reverts commit cb9e2bfb6b03435513750b741da1a5896ae4ad5d.\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Navbar, Nav, NavItem } from 'react-bootstrap';\nimport ImgurImage from './Imgur... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test after notification classes change\n"
},
{
"from": "human",
"value": "'use strict';\n\n\n/*global $*/\n\n\ndescribe('ACP edit user group', function () {\n it('should save changes', function (done) {\n let user;\n let adminGroupId;\n\n TEST.browser\... | javascript | chosen |
[
{
"from": "system",
"value": "Edit code to fix bugs\n"
},
{
"from": "human",
"value": "import passport from 'passport';\nimport passportLocal from 'passport-local';\nimport bcrypt from 'bcrypt';\nimport user from '../models';\nimport helpers from '../helpers';\n\nconst LocalStrategy = passportLo... | javascript | chosen |
[
{
"from": "system",
"value": "Set CORS to be used in specific responses\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar cors = require('cors');\nvar app = express();\napp.use(cors);\n\nvar winston = require('winston');\nvar logger = new (winston.Logger) ({\n transports... | javascript | chosen |
[
{
"from": "system",
"value": "Add logging for graceful shutdown errors\n"
},
{
"from": "human",
"value": "const http = require('http');\nconst mongoose = require('mongoose');\nconst { logger } = require('./middleware/logger');\nconst app = require('./app');\n\nconst PORT = process.env.PORT || 66... | javascript | chosen |
[
{
"from": "system",
"value": "Stop disabling update button while updating\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { formatRelative } from 'date-fns';\nimport './Projects.css';\n\nconst Projects = ({ projects, toggle, update }) => {\n return (\n <ul\n classN... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Fix Create Room button\"\n\nThis reverts commit 9cae667c063e67b32e60b89e7256d714a056559b.\n"
},
{
"from": "human",
"value": "/*\nCopyright 2017 Vector Creations Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this f... | javascript | chosen |
[
{
"from": "system",
"value": "Change full coverage report to short text summary\n"
},
{
"from": "human",
"value": "module.exports = function karma(config) {\n config.set({\n browsers: ['PhantomJS'],\n frameworks: ['mocha', 'chai', 'sinon'],\n files: ['tests.webpack.js'],\n plugins: ... | javascript | chosen |
[
{
"from": "system",
"value": "Change get all submissions route\n"
},
{
"from": "human",
"value": "import { Router } from 'express';\nimport * as SubmissionController from '../controllers/submission.controller';\nconst router = new Router();\n\n// Gets all submissions for a contest\nrouter.route(... | javascript | chosen |
[
{
"from": "system",
"value": "Test in Internet Explorer in SauceLabs\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n config.set({\n frameworks: ['mocha'],\n browsers: ['Firefox', 'PhantomJS'],\n files: [require.resolve('es5-shim'), 'build/test.js'... | javascript | chosen |
[
{
"from": "system",
"value": "Improve cache for hashed js files\n"
},
{
"from": "human",
"value": "const SIX_MONTHS_IN_SECONDS = 15552000;\n\nconst STATIC_ASSET_PATHS = [\n '/public/font/font-v1.css',\n '/public/font/v1/300.woff',\n '/public/font/v1/300i.woff',\n '/public/font/v1/400.woff',\... | javascript | chosen |
[
{
"from": "system",
"value": "Use long stack traces in tests.\n"
},
{
"from": "human",
"value": "'use strict';\n\n//====================================================================\n\nvar hashy = require('./');\n\n//--------------------------------------------------------------------\n\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Delete and re-create dist directory\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n\necho('Cleaning up dist directory');\nrm('-rf', 'dist/*');\n\necho('Optmizing SVG icons');\nexec('npm run svgo');\n\necho('Creating socialshares.js');\nexec('npm run build'... | javascript | chosen |
[
{
"from": "system",
"value": "Use react router to change main page\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {render} from 'react-dom';\nimport { MemoryRouter, Switch, Route } from 'react-router';\nimport SingleCharacterRolling from './components/single-character-roll... | javascript | chosen |
[
{
"from": "system",
"value": "Add todo list tip when no todos exist\n"
},
{
"from": "human",
"value": "'use babel';\n\nimport React from 'react';\nimport TodoItem from './TodoItem';\n\nconst TodoList = ({ todos, setTodoStatus, deleteTodo, onTitleClick }) => {\n return (\n <div>\n {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add addSelect function on query builder and start to make add function\n"
},
{
"from": "human",
"value": "let _where,\n_select,\n_from,\n_orderBy,\n_groupBy,\n_limit,\n_skip,\n_join,\n_insert,\n_delete,\n_update,\n_command,\n_table,\n_option,\n_params\n\nmodule.expo... | javascript | chosen |
[
{
"from": "system",
"value": "Change get to post in esglue.\n"
},
{
"from": "human",
"value": "define([\"jquery\"], function($) {\n\n function ESGlue() {\n\n }\n\n ESGlue.query = function(options, onDone) {\n $.get(\"http://10.251.33.248:9200/reviews/review\",\n '{' + \n '\"fro... | javascript | chosen |
[
{
"from": "system",
"value": "Fix handling of errors that are not the Error\n"
},
{
"from": "human",
"value": "var domain = require('domain');\n\nmodule.exports = function (app, templateVarService, appUtil) {\n return {\n setup: function () {\n app.use(function (req, res) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Make the whole element clickable, so users don't have to peck on mobile\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $('div.results div.result').on('click', function() {\n var redirect = '/detail'\n location.href = redirect\n })\n})\n"... | javascript | chosen |
[
{
"from": "system",
"value": "Disable Firefox specs because the runner consistently crashes\n"
},
{
"from": "human",
"value": "// Karma configuration\n// Generated on Fri Dec 05 2014 16:49:29 GMT-0500 (EST)\n\nmodule.exports = function(config) {\n\tconfig.set({\n\t\tbasePath: '',\n\t\tframeworks... | javascript | chosen |
[
{
"from": "system",
"value": "build: Add clover.xml to coverage output\n\nThis is needed for the coverage percentage to show up\non <https://doc.wikimedia.org/cover/>.\n\nChange-Id: Ie1424e53548220224a589c41c9f3d3848e672406\n"
},
{
"from": "human",
"value": "/* eslint-env node */\nmodule.exports... | javascript | chosen |
[
{
"from": "system",
"value": "Check if an interface is defined during the \"init\" event\n"
},
{
"from": "human",
"value": "const Hooter = require('hooter')\n\n\nconst EVENTS = [\n ['init', 'sync'],\n ['start', 'sync'],\n ['execute', 'async'],\n ['execute.batch', 'async'],\n ['execute.one',... | javascript | chosen |
[
{
"from": "system",
"value": "Fix feature detection bug on Node v0.10\n"
},
{
"from": "human",
"value": "'use strict';\n\n// MODULES //\n\nvar tape = require( 'tape' );\nvar detect = require( './../lib' );\n\n\n// VARIABLES //\n\nvar hasSymbols = ( typeof Symbol !== 'undefined' );\n\n\n// TESTS ... | javascript | chosen |
[
{
"from": "system",
"value": "Add get_messages, get_thread, and send_message url strings\n"
},
{
"from": "human",
"value": "module.exports = {\n URLS: {\n login: 'https://www.okcupid.com/login',\n rate: 'http://www.okcupid.com/quickmatch',\n visit_user: 'http://www.okcupid.com/profil... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.