conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add node markers on the map after all nodes json data are fetched\n"
},
{
"from": "human",
"value": "var map = L.map('map', {\n attributionControl: false\n}).setView([37.944, 24.115], 6);\n\nL.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Define context for setupTips if undefined"
},
{
"from": "human",
"value": "define(function(require) {\n require('foundation.tooltip');\n //Replaces all class\"tip\" divs with an information icon that\n //displays the tip information on mouseover.\n var _setup = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add lodash to the build.\n"
},
{
"from": "human",
"value": "var libA = require(\"./shared/lib-a\");\nvar libB = require(\"./shared/lib-b\");\n\nconsole.log(\"entry-a:libA\", libA);\nconsole.log(\"entra-a:libB\", libB);\n"
},
{
"from": "gpt",
"value": "va... | javascript | chosen |
[
{
"from": "system",
"value": "Set the 'until' field to now for now\n"
},
{
"from": "human",
"value": "$(document).on('dp.change', '#ds-range-picker-from', function(e) {\n var from = $('#ds-range-picker-from').data(\"DateTimePicker\").getDate()\n console.log('set from time: ' + moment(from).fro... | javascript | chosen |
[
{
"from": "system",
"value": "Remove one more reference to @ember/object\n"
},
{
"from": "human",
"value": "/* global wait */\nimport { MockUser } from '../utils/ember-cognito';\nimport { set } from '@ember/object';\n\nexport function mockCognitoUser(app, userAttributes) {\n const { __container... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console.log statement from weather-viewer\n"
},
{
"from": "human",
"value": "console.log ('I am the weatherman')\n\nclass Weather {\n\n constructor (latitude, longitude) {\n }\n\n locate (latitude, longitude) {\n\n const api = 'https://crossorigin.me/ht... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for button click handler\n"
},
{
"from": "human",
"value": "// component test\nimport React from \"react\";\nimport ReactTestUtils from \"react-addons-test-utils\";\n\nimport Button from \"src/components/Shared/Button.js\";\n\ndescribe(\"Button component\",... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a stupid bug where gain read the value for the channel, not the sample\n"
},
{
"from": "human",
"value": "/**\n * @depends ../core/AudioletNode.js\n */\n\nvar Gain = new Class({\n Extends: AudioletNode,\n initialize: function(audiolet, gain) {\n Aud... | javascript | chosen |
[
{
"from": "system",
"value": "Move Vue element creation to beforeEach\n"
},
{
"from": "human",
"value": "import Vue from 'vue'\nimport Dashboard from 'src/components/Dashboard'\nimport axios from 'axios'\n\ndescribe('Dashboard.vue', () => {\n let sandbox\n beforeEach(function() {\n sandbox ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove ability to have callbacks\n"
},
{
"from": "human",
"value": "/*global FormplayerFrontend */\n\n/**\n * hq.events.js\n *\n * This is framework for allowing messages from HQ\n */\nFormplayerFrontend.module(\"HQ.Events\", function(Events, FormplayerFrontend) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test broken on node.js 6\n"
},
{
"from": "human",
"value": "import { DEFAULT_CONFIG } from './core/config'\nimport { createCore } from './core/core'\nimport * as all from './factory'\nimport { ArgumentsError } from './error/ArgumentsError'\nimport { DimensionErr... | javascript | chosen |
[
{
"from": "system",
"value": "Support running of PaperScript .pjs files.\n"
},
{
"from": "human",
"value": "var context = require('vm').createContext({\n\toptions: {\n\t\tserver: true,\n\t\tversion: 'dev'\n\t},\n\tCanvas: require('canvas'),\n console: console,\n\trequire: require,\n\tinclude:... | javascript | chosen |
[
{
"from": "system",
"value": "Add note about IE11 for removeNode\n"
},
{
"from": "human",
"value": "/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties fr... | javascript | chosen |
[
{
"from": "system",
"value": "Rename Home in routes.js to HomeContainer\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Route, IndexRoute } from 'react-router';\nimport CoreLayout from '../layouts/CoreLayout/CoreLayout';\nimport Home from './UI/containers/HomeContainer';\... | javascript | chosen |
[
{
"from": "system",
"value": "Add variables for easy configiration and customisation.\n"
},
{
"from": "human",
"value": "var upnp = require(\"peer-upnp\");\nvar http = require(\"http\");\nvar server = http.createServer();\nvar PORT = 8080;\n\n// start server on port 8080.\nserver.listen(PORT);\n... | javascript | chosen |
[
{
"from": "system",
"value": "Implement basic getStats call for FireFox\n"
},
{
"from": "human",
"value": "var accessToken = '';\nvar accessManager = Twilio.AccessManager(accessToken);\nvar client = Twilio.Conversations.Client(accessManager);\n\nfunction handleConversationStats(conversation) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix errorHandler to come from gulp.conf\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst gutil = require('gulp-util');\n\nconst webpack = require('webpack');\nconst webpackConf = require('../conf/webpack.conf');\nconst webpackDistConf = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Send button disabled as long as there is no message\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\n\n/* Component with a state */\nexport default class AddChatMessage extends React.Component {\n\tconstructor(props) ... | javascript | chosen |
[
{
"from": "system",
"value": "Kill any hanging processes when grunt exits\n"
},
{
"from": "human",
"value": "'use strict';\nvar lpad = require('lpad');\n\nmodule.exports = function (grunt) {\n\tgrunt.registerMultiTask('concurrent', 'Run grunt tasks concurrently', function () {\n\t\tvar spawnOpti... | javascript | chosen |
[
{
"from": "system",
"value": "Use skipIfExists instead of true\n"
},
{
"from": "human",
"value": "/*\n * grunt-contrib-internal\n * http://gruntjs.com/\n *\n * Copyright (c) 2016 Tyler Kellen, contributors\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function(gru... | javascript | chosen |
[
{
"from": "system",
"value": "Correct API helper scripts for getScript and getBuild\n"
},
{
"from": "human",
"value": "var\n request = require('request'),\n config = require('../../config');\n\nexports.get = function () {\n var query = arguments.length === 2 ? arguments[0] : null;\n var call... | javascript | chosen |
[
{
"from": "system",
"value": "Set current account name/description when opening modal.\n"
},
{
"from": "human",
"value": "var NRS = (function(NRS, $, undefined) {\n\tNRS.forms.setAccountInfoComplete = function(response, data) {\n\t\tvar name = $.trim(String(data.name));\n\t\tif (name) {\n\t\t\t$... | javascript | chosen |
[
{
"from": "system",
"value": "Clear form fields before entering new values\n"
},
{
"from": "human",
"value": "var helper = require('massah/helper')\n\nmodule.exports = (function() {\n var library = helper.getLibrary()\n .given('I enter \\'(.*)\\' in the \\'(.*)\\' field', function(valu... | javascript | chosen |
[
{
"from": "system",
"value": "Add blank line for readability"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport FormInput from '../formInput/formInput';\n\nclass FormEmail extends Component {\n render() {\n const validEmailRegex = /(^[^@\\s]+)@((?:[-a-z0-9]+\\... | javascript | chosen |
[
{
"from": "system",
"value": "Hide initial popup if popup param is 0\n"
},
{
"from": "human",
"value": "Checklist.MainView = Ember.View.extend({\n tagName: 'section',\n templateName: 'main_view',\n\n classNames: ['main'],\n\n landingColorboxConfig: {\n inline: true,\n transition: 'fade... | javascript | chosen |
[
{
"from": "system",
"value": "Fix jslint warning in null checks\n"
},
{
"from": "human",
"value": "/*!\n * Wef\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\n\n/**\n * wef module\n */\n(function(global) {\n var wef = function() {\n return new wef.prototype.init();\n };... | javascript | chosen |
[
{
"from": "system",
"value": "Improve reply list response for risk status webhook.\n"
},
{
"from": "human",
"value": "/* LIB */\n\nconst radial = require('../../radial');\nconst authenticate = require('./authenticate');\n\n/* MODULES */\n\nconst xmlConvert = require('xml-js');\n\n/* CONSTRUCTOR ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable debug info for release.\n"
},
{
"from": "human",
"value": "angular.module('proxtop', ['ngMaterial', 'ngSanitize', 'ui.router', 'angular-progress-arc', 'pascalprecht.translate', 'debounce'])\n .config(['$stateProvider', '$urlRouterProvider', '$translatePro... | javascript | chosen |
[
{
"from": "system",
"value": "Return sender ids instead of recipient id\n"
},
{
"from": "human",
"value": "const db = require('../db.js');\nconst Sequelize = require('sequelize');\n\nconst getUserIdsGivenSelfIdAndRelationshipType = (selfId, relationshipType) => {\n const queryStr = `SELECT user... | javascript | chosen |
[
{
"from": "system",
"value": "Set port to Heroku variable\n"
},
{
"from": "human",
"value": "const applicationConfig = {\n host: 'localhost',\n port: '3000',\n privateUploadDirectory: 'uploads/photos',\n\n getFullHostname() {\n if (this.port !== '443') {\n return `${this.host}:${this... | javascript | chosen |
[
{
"from": "system",
"value": "Add auth middleware after signup/signin user routes\n"
},
{
"from": "human",
"value": "import express from 'express';\n\nimport * as userController from '../../controllers/users';\nimport * as recipeController from '../../controllers/recipes';\nimport * as favoriteC... | javascript | chosen |
[
{
"from": "system",
"value": "Add source links to all comments\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = React.createClass({displayName: 'CommentView',\n\n render: function() {\n var comment = this.props.comment;\n if (!comment) {\n return... | javascript | chosen |
[
{
"from": "system",
"value": "Bring multis inline with each other\n"
},
{
"from": "human",
"value": "var get = require('./get'),\n getIn = require('./getIn'),\n assoc = require('./assoc'),\n dissoc = require('./dissoc'),\n assocIn = require('./assocIn'),\n dissocIn = require('./di... | javascript | chosen |
[
{
"from": "system",
"value": "fix(form): Update PlanTripButton to work with recent API refactor\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react'\nimport { Button } from 'react-bootstrap'\nimport { connect } from 'react-redux'\n\nimport { planTrip, profileTri... | javascript | chosen |
[
{
"from": "system",
"value": "Add operator compilation test case\n"
},
{
"from": "human",
"value": "module.exports = [\n ['console.log();', 'красноглазое.чмо() нах'],\n /**\n * Вхождения внутри слова\n *\n * https://github.com/samgozman/YoptaScript/issues/30\n */\n ['checking', 'check... | javascript | chosen |
[
{
"from": "system",
"value": "Remove stylelint ignore comment which was added by mistake.\n"
},
{
"from": "human",
"value": "/* eslint-disable camelcase */\nimport styled from \"styled-components\";\nimport { colors } from \"constants/theme\";\n\nconst PropertyPane = styled.div`\n height: 100%;... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite Api tests to ES2015\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assert = require('assert');\nvar sinon = require('sinon');\n\nvar Api = require('../../lib/endpoints/api');\nvar Request = require('../../lib/request');\n\ndescribe('endpoints/api', ... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Add [un]debug to cli api\n"
},
{
"from": "human",
"value": "'use strict';\n\nlet lastEval = undefined;\nlet ringBuffer = [];\n\nfunction createAPI() {\n const api = {\n $_: lastEval,\n };\n\n [ 0, 1, 2, 3, 4 ].forEach(idx =>\n api[`$${idx}`] = ringBuf... | javascript | chosen |
[
{
"from": "system",
"value": "Add chapter 7, exercise 1\n"
},
{
"from": "human",
"value": "function getTurnCount(state, robot, memory) {\n for (let turn = 0;; turn++) {\n if (state.parcels.length == 0) {\n return turn;\n }\n let action = robot(state, memory);\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add inline field mixin to base block class.\n"
},
{
"from": "human",
"value": "export default {\n\n\tprops: [\n\t\t'type',\n\t\t'index',\n\t\t'fields',\n\t\t'other'\n\t],\n\n\tdata() {\n\t\treturn this.fields;\n\t},\n\n\tcreated() {\n\t\tthis.watching = {};\n\t\tthi... | javascript | chosen |
[
{
"from": "system",
"value": "Add correction between CodeMirror lint plugin to display warning on expected line number\n"
},
{
"from": "human",
"value": "/*jslint browser*/\n// This file is the shim layer to connect jslint to CodeMirror editor\nimport jslint from \"./jslint.mjs\";\n\nconst CodeM... | javascript | chosen |
[
{
"from": "system",
"value": "Rename imports and exports for experimental SSR data fetching.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/*\n * This is intended to start necessary effort for sync access to data for server-side rendering.\n */\n\nconst TopData = require('../../storage/top... | javascript | chosen |
[
{
"from": "system",
"value": "Set the POI being saved on the Favourite model\n"
},
{
"from": "human",
"value": "define(['jquery', 'backbone', 'underscore', 'moxie.conf', 'hbs!places/templates/detail', 'hbs!places/templates/busrti', 'hbs!places/templates/trainrti'],\n function($, Backbone, _, ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix no event loop test (need to wait for fd)\n"
},
{
"from": "human",
"value": "global.process = { __proto__: process, pid: 123456 }\nDate.now = function () { return 1459875739796 }\nrequire('os').hostname = function () { return 'abcdefghijklmnopqr' }\nvar pino = re... | javascript | chosen |
[
{
"from": "system",
"value": "Test fixes and style adjustments\n"
},
{
"from": "human",
"value": "var test = require('tape'),\n\tes2015 = require('babel-preset-es2015'),\n\tes2015Loose = require('..');\n\nvar LOOSE = { loose: true };\n\nvar PREFIX = 'transform-es2015-';\n\nvar SHOULD_BE_LOOSE = ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test for default config\n"
},
{
"from": "human",
"value": "import main from '../'\nimport test from 'ava'\n\ntest('extends files', t => {\n const expected = [\n 'airbnb',\n 'wyze/base',\n 'wyze/rules/react',\n 'wyze/rules/jsx-a11y',\n ]\n\n t.deep... | javascript | chosen |
[
{
"from": "system",
"value": "Use let instead of var\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Botkit = require('botkit');\nconst apiaibotkit = require('../api-ai-botkit');\n\nconst slackToken = process.env.SLACK_TOKEN;\nconst apiaiToken = process.env.APIAI_TOKEN;\n\nconst apiai ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for no changes to the user object.\n"
},
{
"from": "human",
"value": "Accounts.onCreateUser(function(options, user) {\n if (Accounts.ui._options.onPostSignUpHook) {\n return Accounts.ui._options.onPostSignUpHook(options, user);\n }\n return user;\n});\n"... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for localized spoken language name\n"
},
{
"from": "human",
"value": "const test = require('tap').test;\nconst TextToSpeech = require('../../src/extensions/scratch3_text2speech/index.js');\n\nconst fakeStage = {\n textToSpeechLanguage: null\n};\n\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle driver not loaded cleaner\n"
},
{
"from": "human",
"value": "import cli from 'cli';\nimport {Gpio} from 'chip-gpio';\nimport sensor from 'ds18x20';\n\nvar options = cli.parse();\n\nvar interval = 2000;\nvar threshold = 25;\n\nvar heater = new Gpio(0, 'out');\... | javascript | chosen |
[
{
"from": "system",
"value": "Add a notification zero state"
},
{
"from": "human",
"value": "import * as ACTION_TYPES from '../constants/action_types'\nimport * as MAPPING_TYPES from '../constants/mapping_types'\nimport * as api from '../networking/api'\nimport * as StreamFilters from '../compon... | javascript | chosen |
[
{
"from": "system",
"value": "Add a guard clause for svg attribute presence\n\nThis is failing for some dashboards as getAttribute('d') returns null\nso calls to .split() and .should() subsequently fail.\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\n\nmodule.exports = {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Sort lines alphabetically. Never gets tired.\n"
},
{
"from": "human",
"value": "import './App.scss';\nimport Component from 'react-pure-render/component';\nimport Footer from './Footer.react';\nimport Header from './Header.react';\nimport Helmet from 'react-helmet';... | javascript | chosen |
[
{
"from": "system",
"value": "Add a shortcut for isMoment\n\nUnless I'm seeing it wrong it's harder than it should be to check if an object is a moment object.\r\nThe only way I'm able to check it is if I use moment from ``import moment from 'moment'`` in my code alongside importing the service.\r\nI could ... | javascript | chosen |
[
{
"from": "system",
"value": "Create example 2 with state and Starting Value in input\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\n\nclass SearchBar extends Component{\n\n constructor(props){\n super(props);\n\n this.state = { term : ''}; //ого... | javascript | chosen |
[
{
"from": "system",
"value": "Fix handlebars adapter asset references\n"
},
{
"from": "human",
"value": "//= require jquery\n//= require handlebars.runtime\n//= require underscore/underscore\n//= require backbone/backbone\n//= require backbone/backbone.handlebars.adapter\n//= require marionette/... | javascript | chosen |
[
{
"from": "system",
"value": "Fix user notification settings fetch\n"
},
{
"from": "human",
"value": "// @flow\n\nimport { compose } from 'redux';\nimport { connect } from 'react-redux';\nimport { dispatched } from '@webkom/react-prepare';\n\nimport UserSettingsNotifications from './components/U... | javascript | chosen |
[
{
"from": "system",
"value": "Use foam.LIB and be a bit lazier.\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.core',\n name: 'AxiomCloner',\n do... | javascript | chosen |
[
{
"from": "system",
"value": "Add method to generate random game of life board\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nclass BoardContainer extends Component {\n constructor() {\n \n }\n}\n\nexport default BoardContainer;\n"
},
{
"from": "gpt"... | javascript | chosen |
[
{
"from": "system",
"value": "Add angular and angular-route requires\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/java... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite Decals API for Koa\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst Errors = require('../errors')\nconst Decal = require('../classes/Decal')\nconst User = require('../db').User\nconst Permission = require('../permission')\n\nclass HTTP {\n static ch... | javascript | chosen |
[
{
"from": "system",
"value": "Remove jquery cookie from shim config.\n"
},
{
"from": "human",
"value": "requirejs.config({\n baseUrl: 'assets/js',\n paths: {\n 'jquery': '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min',\n 'bootstrap': '//maxcdn.bootstrapcdn.com/boots... | javascript | chosen |
[
{
"from": "system",
"value": "Change button to Next in add profile test\n"
},
{
"from": "human",
"value": "describe('Profile', function() {\n const owner = require('../fixtures/user.json').owner;\n const profile = require('../fixtures/profile.json');\n\n it('Create a new profile', function() ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Apollo Client instance caching on client-side\n"
},
{
"from": "human",
"value": "import {ApolloClient, HttpLink, InMemoryCache} from \"@apollo/client\"\n\nimport fetch from \"isomorphic-fetch\"\n\n/**\n * @typedef {import(\"@apollo/client\").NormalizedCacheObjec... | javascript | chosen |
[
{
"from": "system",
"value": "Fix PhantomJS test (remove 'class' from Array)"
},
{
"from": "human",
"value": "/*!\n * PhantomJS\n */\nconditionizr.add('phantomjs', ['class'], function () {\n return /\\sPhantomJS\\/[[0-9]+\\]/.test(navigator.userAgent);\n});\n"
},
{
"from": "gpt",
"v... | javascript | chosen |
[
{
"from": "system",
"value": "Remove junk code and comments.\n"
},
{
"from": "human",
"value": "\nvar runway = require('./runway.js')\nmodule.exports = runway\n\n\n\ndocument.onclick = function(event) {\n event = event || window.event // IE specials\n var target = event.target || event.srcElem... | javascript | chosen |
[
{
"from": "system",
"value": "Configure Redux store to work with redux-devtools-extensions & react-native-debugger\n"
},
{
"from": "human",
"value": "/**\n * @providesModule ZeroProj.Redux.Store\n */\n\n/* eslint-disable no-underscore-dangle */\n\nimport { applyMiddleware, createStore } from 're... | javascript | chosen |
[
{
"from": "system",
"value": "Sort tales by created date ascending\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport AuthenticateRoute from 'wholetale/routes/authenticate';\n\nexport default AuthenticateRoute.extend({\n model() {\n\n return {\n tales: this.get('store... | javascript | chosen |
[
{
"from": "system",
"value": "Add another blank like in constant.js file\n"
},
{
"from": "human",
"value": "export const KERNEL_LENGTH = 20;\nexport const RENDER_QUANTUM = 128;\nexport const FRAME_SIZE = KERNEL_LENGTH * RENDER_QUANTUM;\nexport const QUEUE_SIZE = 40960;\n"
},
{
"from": "g... | javascript | chosen |
[
{
"from": "system",
"value": "Update Knobs for Message Storybook\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { text, select, boolean } from '@storybook/addon-knobs';\nimport { action } from '@storybook/addon-actions';\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove prefix '_' while passing context param to templates\n"
},
{
"from": "human",
"value": "const BaseDataview = require('./base');\nconst debug = require('debug')('windshaft:dataview:list');\n\nconst TYPE = 'list';\n\nconst listSqlTpl = ctx => `select ${ctx._colu... | javascript | chosen |
[
{
"from": "system",
"value": "Use const for requirements, constants and variables that are initialized once\n"
},
{
"from": "human",
"value": "var BaseDataview = require('./base');\n\nvar TYPE = 'list';\n\nvar listSqlTpl = ctx => `select ${ctx._columns} from (${ctx._query}) as _cdb_list`;\n\n/**... | javascript | chosen |
[
{
"from": "system",
"value": "Use package.json to name the process.\n\nNot setting the process name means that 'node'\nwill appear in `ps` instead of 'wotblitz'.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar program = require('commander');\nvar config = {\n api: require('./confi... | javascript | chosen |
[
{
"from": "system",
"value": "Disable sourcemaps since we don't use them\n"
},
{
"from": "human",
"value": "exports.files = {\n javascripts: {\n joinTo: {\n 'fateOfAllFools.js': /^(?!spec)/\n }\n },\n stylesheets: {\n joinTo: 'fateOfAllFools.css'\n }\n};\n\n/*\n Tests are hand... | javascript | chosen |
[
{
"from": "system",
"value": "Add parse_var methode to the RustParser\n"
},
{
"from": "human",
"value": "var DocsParser = require(\"../docsparser\");\nvar xregexp = require('../xregexp').XRegExp;\n\nfunction RustParser(settings) {\n DocsParser.call(this, settings);\n}\n\nRustParser.prototype ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unecessary eslint disable rule\n"
},
{
"from": "human",
"value": "/* eslint strict: [\"error\", \"never\"] */\n\nconst getJsonFiles = require('./lib/getJsonFiles');\nconst { execSync } = require('child_process');\nconst path = require('path');\n\n// eslint-di... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor js into a jQuery plugin\n"
},
{
"from": "human",
"value": "// Ajax link validator for VZ URL fieldtype\n// by Eli Van Zoeren (http://elivz.com)\njQuery(document).ready(function() {\n\tjQuery('.vz_url_field').blur(function() {\n\t\tfield = $(this);\n\t\tjQue... | javascript | chosen |
[
{
"from": "system",
"value": "Set a URL in storybook\n"
},
{
"from": "human",
"value": "import { configure, addParameters } from '@storybook/vue';\n\n// Option defaults:\naddParameters({\n options: {\n name: 'Vue Visual',\n }\n})\n\n// automatically import all files ending in *.stories.js\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add break-word property to error messages of long hex strings\n\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { map } from \"lodash-es\";\n\nimport { Alert } from \"../../base\";\n\nconst JobError = ({ error }) => {\n if (!error) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add user._id to interest document.\n"
},
{
"from": "human",
"value": "var Interests = require('./interests.server.model.js');\nvar Q = require('q');\n\nmodule.exports = {\n add: function (req, res, next) {\n var interest = {};\n interest.id = req.body.id;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add typeahead suggestions based on repository names\n"
},
{
"from": "human",
"value": "\nvar bloodhound = new Bloodhound({\n datumTokenizer: Bloodhound.tokenizers.obj.whitespace,\n queryTokenizer: Bloodhound.tokenizers.whitespace,\n local: repositories,\n})... | javascript | chosen |
[
{
"from": "system",
"value": "Add client-side routing support to dev server\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\nvar config = require('./webpack.config');\n\nconfig.output = {\n path: './dist/',\n publicPath: '/',\n filename: '[nam... | javascript | chosen |
[
{
"from": "system",
"value": "SAK-29371: Fix javascript errors resulting from SAK-29356\n"
},
{
"from": "human",
"value": "var ASN_SVS = {};\n\n/* For the cancel button - if the user made progress, we need them to confirm that they want to discard their progress */\nASN_SVS.confirmDiscardOrSubmi... | javascript | chosen |
[
{
"from": "system",
"value": "Add developer flag to user schema\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar userSchema = new Schema({\n githubId: Number,\n name: String,\n avatar_url: String,\n projects: Array\n});\n\nmodule.ex... | javascript | chosen |
[
{
"from": "system",
"value": "Tidy up custom email form\n"
},
{
"from": "human",
"value": "const React = require('react')\nconst { map, objOf, zipWith, merge, compose, indexBy, prop, converge, dissoc } = require('ramda')\n\nexport default ({ members, submit }) => {\n const onSubmit = (e) => {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Create exports as function taking IO\n"
},
{
"from": "human",
"value": "//var Teachers = require('../models/teachers');\n//var TeacherClasses = require('../models/Teacher_classes');\n//var Classes = require('../models/classes');\n//var ClassLessons = require('../mod... | javascript | chosen |
[
{
"from": "system",
"value": "Add status field to the users model\n"
},
{
"from": "human",
"value": "import mongoose, { Schema } from 'mongoose';\n\nconst userSchema = new Schema({\n first_name: { type: String, required: true },\n last_name: { type: String, required: true },\n email: { ... | javascript | chosen |
[
{
"from": "system",
"value": "Use both keyup and keypress if input unsupported\n"
},
{
"from": "human",
"value": "/*\n * Every time the form field is changed, sanitize its contents with the given\n * function to only allow input of a certain form.\n */\n(function ($) {\n var inputEvents = \"i... | javascript | chosen |
[
{
"from": "system",
"value": "Include the eslint react defaults so it behaves as expected for React JSX files\n"
},
{
"from": "human",
"value": "module.exports = {\n 'parser': 'babel-eslint',\n 'env': {\n 'browser': true,\n 'es6': true,\n 'node': true,\n },\n 'extends': 'eslint:reco... | javascript | chosen |
[
{
"from": "system",
"value": "Set jsx curly spacing eslint rule\n"
},
{
"from": "human",
"value": "module.exports = {\n\t\"parser\": \"babel-eslint\",\n\t\"env\": {\n\t\t\"browser\": true\n\t},\n\t\"plugins\": [\n\t\t\"react\"\n\t],\n\t\"extends\": [\n\t\t\"eslint:recommended\",\n\t\t\"plugin:re... | javascript | chosen |
[
{
"from": "system",
"value": "Add browser to eslint globals\n"
},
{
"from": "human",
"value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"es6\": true\n },\n \"extends\": \"eslint:recommended\",\n \"parserOptions\": {\n \"sourceType\": \"module\"\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace occurences of 'startCode' with 'code'\n"
},
{
"from": "human",
"value": "var validator = require('validator'),\n iz = require('iz');\n\nvar assessmentValidator = {};\n\nvar validate = function (assessment) {\n var toReturn = true;\n var results = [\... | javascript | chosen |
[
{
"from": "system",
"value": "Update concourse browser plugin for new version.\n\nSome of the markup has changed. In earlier versions, there was an\nelement with an id of 'cli-downloads' that contained the download links\nin the lower left corner. With newer versions, this now also displays\nthe concourse v... | javascript | chosen |
[
{
"from": "system",
"value": "Update Frig valueLink From Hue Slider\n"
},
{
"from": "human",
"value": "let React = require(\"react\")\nlet draggable = require('./higher_order_components/draggable')\nlet {div} = React.DOM\n\n@draggable\nexport default class extends React.Component {\n static def... | javascript | chosen |
[
{
"from": "system",
"value": "Move package changes to method\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst Generator = require('yeoman-generator')\nconst sort = require('sort-package-json')\n\nmodule.exports = class NodeModule extends Generator {\n configuring () {\n const {name, ... | javascript | chosen |
[
{
"from": "system",
"value": "Add braces to control block\n"
},
{
"from": "human",
"value": "import {getField} from \"./getField\";\n\n/**\n * Creates a new object whose fields are either equal to obj[field]\n * or defaultValue.\n * Useful for extracting a subset of fields from an object.\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a simple Flow example\n\nChanges the simple \"demo app\" to use flow static types.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { render } from 'react-dom'\n\nfunction Hello () {\n return <div>Hello React JSX World! powered by Babel</div... | javascript | chosen |
[
{
"from": "system",
"value": "Fix boolean logic in loadFull invocation\n\nthanks @rokob\n"
},
{
"from": "human",
"value": "/* globals __DEFAULT_ROLLBARJS_URL__ */\n/* globals _rollbarConfig */\n\nvar RollbarShim = require('../shim').Rollbar;\nvar snippetCallback = require('../snippet_callback');... | javascript | chosen |
[
{
"from": "system",
"value": "Use env vars by default instead of 'CHANGE_ME'\n\nAlso, make comment more clear about what clientId really is."
},
{
"from": "human",
"value": "import React from 'react'\nimport createContentfulAdapter from 'tux-adapter-contentful'\nimport tux from './middleware/tux... | javascript | chosen |
[
{
"from": "system",
"value": "Update tests for Home View\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { HomeView } from 'routes/Home/components/HomeView'\nimport { render } from 'enzyme'\n\ndescribe('(View) Home', () => {\n let _component\n\n beforeEach(() => {\n _co... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.