conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "FIX - changed node api to https\n"
},
{
"from": "human",
"value": "import defaults from 'defaults'\n\nconst API_GLOBAL = '_IMDIKATOR'\n\nconst env = process.env.NODE_ENV || 'development'\n\nconst DEFAULTS = {\n port: 3000,\n reduxDevTools: false\n}\n\nconst global... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure env.Path === env.PATH on Windows.\n"
},
{
"from": "human",
"value": "var path = require(\"path\");\nvar devBundleDir = path.resolve(__dirname, \"..\", \"..\", \"dev_bundle\");\nvar binDir = path.join(devBundleDir, \"bin\");\n\nexports.getCommandPath = func... | javascript | chosen |
[
{
"from": "system",
"value": "Add assertion to test to wait for component to load\n"
},
{
"from": "human",
"value": "describe('home page', () => {\n before(() => {\n cy.visit('/')\n })\n\n it('content', () => {\n cy.get('.dashboard-section__info-feed-date').hideElement()\n cy.get('.g... | javascript | chosen |
[
{
"from": "system",
"value": "Add inline docs to injection code"
},
{
"from": "human",
"value": "var set = Ember.set;\n\nEmber.onLoad('Ember.Application', function(Application) {\n Application.registerInjection({\n name: \"store\",\n before: \"controllers\",\n\n injection: function(app... | javascript | chosen |
[
{
"from": "system",
"value": "Set default values to avoid initial binding errors.\n"
},
{
"from": "human",
"value": "// Aurelia\nimport {\n bindable,\n bindingMode\n} from 'aurelia-framework';\n\nimport icons from 'configs/icons';\n\nexport class SvgIcon {\n @bindable({ defaultBindingMode: bi... | javascript | chosen |
[
{
"from": "system",
"value": "Save only one variable (dict)\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name EPFL People\n// @namespace none\n// @description A script to improve browsing on people.epfl.ch\n// @include http://people.epfl.ch/*\n// @version 1\n// @gra... | javascript | chosen |
[
{
"from": "system",
"value": "Add beta ta to version\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar cfg = require('../app-config').config;\n\n//\n// Controller\n//\n\nvar AboutCtrl = function($scope) {\n\n $scope.state.about = {\n toggle: function(to) {\n $scope.sta... | javascript | chosen |
[
{
"from": "system",
"value": "Handle OS X no window situation\n\nSame setup as quick start guide\n"
},
{
"from": "human",
"value": "var app = require('app');\nvar BrowserWindow = require('browser-window');\nvar glob = require('glob');\n\nvar mainWindow = null;\n\n// Require and setup each JS fil... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure Canvas is supported on the browser\n"
},
{
"from": "human",
"value": "console.log(\"I'm ready\");\n"
},
{
"from": "gpt",
"value": "// Init the app after page loaded.\nwindow.onload = initPage;\n\n// The entry function.\nfunction initPage() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong public URL for static in webpack\n\nAfter a recent change, `STATIC_URL` is now `assets` in the webapp.\nThe webpack config has not been updated though, and the frontend was trying an old URL.\n"
},
{
"from": "human",
"value": "/* eslint-disable */\nconst p... | javascript | chosen |
[
{
"from": "system",
"value": "Fix crash on Android 4.x\n"
},
{
"from": "human",
"value": "import React from \"react-native\";\n\nconst {\n\tTouchableNativeFeedback\n} = React;\n\nexport default class TouchFeedback extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t<TouchableNativeFeedb... | javascript | chosen |
[
{
"from": "system",
"value": "Update room title on store change\n"
},
{
"from": "human",
"value": "import React from \"react-native\";\nimport RoomTitle from \"../components/room-title\";\nimport controller from \"./controller\";\n\nconst {\n\tInteractionManager\n} = React;\n\n@controller\nexpor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lint error in master\n"
},
{
"from": "human",
"value": "// Do not delete or move this file.\n// Many fiddles reference it so we have to keep it here.\n(function() {\n var tag = document.querySelector(\n 'script[type=\"application/javascript;version=1.7\"]'\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change to const instead of let\n"
},
{
"from": "human",
"value": "(function() {\n let height = 15,\n block = '#',\n space = ' ';\n\n if (height<2 || height>12) {\n return console.log('Error! Height must be >= 2 and <= 12');\n }\n\n f... | javascript | chosen |
[
{
"from": "system",
"value": "Use specific version of Ionic Keyboard plugin\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n//this hook installs all your plugins\n\nvar pluginlist = [\n \"https://github.com/driftyco/ionic-plugins-keyboard.git\",\n \"cordova-plugin-vibration\",\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add functionality to check for keys in commmit\n"
},
{
"from": "human",
"value": "var dir = require('node-dir');\n\ndir.readFiles(__dirname, {\n exclude: ['LICENSE', '.gitignore', '.DS_Store'],\n excludeDir: ['node_modules', '.git']\n }, function(er... | javascript | chosen |
[
{
"from": "system",
"value": "Move badCode to the wrapping function\n\nThis moves the badCode to the wrapping funciton as the status will\nnot be correct in the function where the middleware first gets\ncalled.\n"
},
{
"from": "human",
"value": "const jsonMask = require('json-mask')\n\nconst bad... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug. Remove console logs.\n"
},
{
"from": "human",
"value": "/**\n * Created by tshen on 16/7/15.\n */\n'use strict'\n\nimport {NativeModules} from 'react-native';\nconst NativeSimpleFetch = NativeModules.SimpleFetch;\n\nconst fetch = function (url, options) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Include precompiled styles automatically for non-sass users\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\n// var path = require('path');\n\nmodule.exports = {\n name: 'ember-power-select',\n contentFor: function(type, config) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak the height of the popup box. Meetup varies the height of their box based on which permissions are requested."
},
{
"from": "human",
"value": "(function () {\n Meteor.loginWithMeetup = function (options, callback) {\n // support both (options, callback) and... | javascript | chosen |
[
{
"from": "system",
"value": "Fix utilities path from helpers to commands\n"
},
{
"from": "human",
"value": "var elixir = require('laravel-elixir');\nvar gulp = require('gulp');\nvar imagemin = require('gulp-imagemin');\nvar pngquant = require('imagemin-pngquant');\nvar notify = require('gulp-no... | javascript | chosen |
[
{
"from": "system",
"value": "Drop v8 vm for native implementation, update tests accordingly :rocket:.\n\n- Implements and closes #1 by @edmulraney.\n- Better performance & browser support.\n"
},
{
"from": "human",
"value": "const vm = require('vm')\n\nmodule.exports = class Guards {\n construc... | javascript | chosen |
[
{
"from": "system",
"value": "Add getUser and validatePassword to login\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar extend = require('extend');\nvar express = require('express');\nvar bodyParser = require('body-parser');\n\nvar router = express.Router();\nvar defaults = {\n loginEnd... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the bug when src key is undefined,the shim plugin do not work.\n\nWhen an alias item, the 'src' key is not defined, the code do not work\nwell with the exports value.\n"
},
{
"from": "human",
"value": "/**\n * Add shim config for configuring the dependencies and... | javascript | chosen |
[
{
"from": "system",
"value": "Complete the test for case 3\n"
},
{
"from": "human",
"value": ";(_ => {\n 'use strict';\n var tagContent = 'router2-content';\n\n function matchHash() {\n var containers = document.querySelectorAll(`${tagContent}:not([hidden])`);\n var container;\n for ... | javascript | chosen |
[
{
"from": "system",
"value": "Rearrange code to reduce nesting as requested by PR comment.\n"
},
{
"from": "human",
"value": "'use strict';\nvar server = require('./lib/server/')();\nvar config = require('config');\n\nfunction ngrokIsAvailable() {\n try {\n require.resolve('ngrok');\n ret... | javascript | chosen |
[
{
"from": "system",
"value": "Use url.resolve to get the url\n"
},
{
"from": "human",
"value": "'use strict';\nrequire('whatwg-fetch');\n\nconst path = require('path'),\n querystring = require('querystring').parse;\n\nconst registry = 'http://npm-registry.herokuapp.com';\n\n\nconst query = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add `request` and `response` to context.\n\nAdd `request` and `response` to context in the service.\n\nCloses #106.\n"
},
{
"from": "human",
"value": "var find = require('reactor/find'),\n serializer = require('./serializer'),\n url = require('url');\n\nfuncti... | javascript | chosen |
[
{
"from": "system",
"value": "Use global variables instead of configuration file (no need to recompile the JS code to see the changes)\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport App from './App';\nimport config from './config';\n\nvar mountNode = document.getElemen... | javascript | chosen |
[
{
"from": "system",
"value": "[XDE] Call process.exit() when all windows are closed\n\n"
},
{
"from": "human",
"value": "import electron from 'electron';\nimport path from 'path';\n\nimport Menu from './remote/Menu';\n\nimport config from './config';\n\nconst app = electron.app;\n\n// Report cra... | javascript | chosen |
[
{
"from": "system",
"value": "Use Bluebird's nodeify to handle resulting promise"
},
{
"from": "human",
"value": "var Promise = require('bluebird');\nvar mapObj = require('map-obj');\nvar assign = require('object-assign');\n\nfunction FileWebpackPlugin(files) {\n this.files = files || {};\n}\n\... | javascript | chosen |
[
{
"from": "system",
"value": "docs: Fix incorrect text for MQTT publish\n\nFixes #262\n"
},
{
"from": "human",
"value": "const apiPutMqttMessage = {\n schema: {\n summary: 'Retrieve a list of all keys present in the specified namespace.',\n description: '',\n body: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Implement move steps, turn right, turn left, point in direction\n"
},
{
"from": "human",
"value": "function Scratch3MotionBlocks(runtime) {\n /**\n * The runtime instantiating this block package.\n * @type {Runtime}\n */\n this.runtime = runtime;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add api key... will have to remove eventually\n"
},
{
"from": "human",
"value": "import Web3 from 'web3';\n\nconst web3 = new Web3();\n\nexport default web3;\n\nexport const initWeb3 = (web3) => {\n if (window.web3) {\n web3.setProvider(window.web3.currentProvid... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for when Mocha.settings are not available\n"
},
{
"from": "human",
"value": "//makes the bdd interface available (describe, it before, after, etc\nif(Meteor.settings.public.mocha_setup_args) {\n mocha.setup(Meteor.settings.public.mocha_setup_args);\n} else {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add eslint-disable-next-line comments to get rid of excessively pedantic react/no-array-index-key errors.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport css from './Breadcrumbs.css';\n\nconst propTypes = {\n links: React.PropTypes.array,\n};\... | javascript | chosen |
[
{
"from": "system",
"value": "Add a DelayedHook test class.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst hookModule = require(\"../src/\");\nclass TallyHook extends hookModule.Hook {\n\n preProcess(thing) {\n thing.preTally = thing.preTally + 1;\n return true;\n }\n\n postP... | javascript | chosen |
[
{
"from": "system",
"value": "Use tape for asserts to better detect callbacks not being fired"
},
{
"from": "human",
"value": "var test = require(\"tape\")\n\nvar crypto = require('crypto')\nvar cryptoB = require('../')\nvar assert = require('assert')\n\nfunction assertSame (fn) {\n test(fn.nam... | javascript | chosen |
[
{
"from": "system",
"value": "Put the sector in the middle of the hex grid (very crude)\n"
},
{
"from": "human",
"value": "const hexWidth = 50;\nconst hexPadding = 2;\n\nexport default ({ width, height, columns, rows, renderSector }) => {\n const hexWidthUnit = hexWidth / 4;\n const hexHeight ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for brightcove player when orintation is changed\n"
},
{
"from": "human",
"value": "/**\n * This script keeps the height set on elements with regard to their\n * width for a given aspect ratio. Great for \"display:block\" elements\n *\n * Example usage:\n *\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "[Resource][Core] Use collection instead of array in all transformers, also use map method\n"
},
{
"from": "human",
"value": "/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please... | javascript | chosen |
[
{
"from": "system",
"value": "feature: Make slide viewable based on current and order\n\nA slide will be viewable only if the current property matches\nthe order property.\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\n\nrequire('./slide.scss');\n\nclass... | javascript | chosen |
[
{
"from": "system",
"value": "Move all info output of mdast(1) to stderr(4)\n\nThis changes moves all reporting output, even when not including\nfailure messages, from stout(4) to stderr(4).\n\nThus, when piping only stdout(4) from mdast(1) into a file, only\nthe markdown is written.\n\nCloses GH-47.\n"
}... | javascript | chosen |
[
{
"from": "system",
"value": "Use .attr instead of .data to get json selector. Prevents evaluation of [x] as array\n"
},
{
"from": "human",
"value": "// ===================================================\n// DOM Outline with event handlers\n// ===================================================... | javascript | chosen |
[
{
"from": "system",
"value": "Update sortTabs to group tabs by domain then sort in window\n"
},
{
"from": "human",
"value": "import { action, computed } from 'mobx'\nimport { moveTabs, tabComparator } from '../libs'\n\nexport default class ArrangeStore {\n constructor (store) {\n this.store ... | javascript | chosen |
[
{
"from": "system",
"value": "Add fallback for old name ordinalParse\n"
},
{
"from": "human",
"value": "import { makeGetSet } from '../moment/get-set';\nimport { addFormatToken } from '../format/format';\nimport { addUnitAlias } from './aliases';\nimport { addUnitPriority } from './priorities';\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix React warning on the home page (add key attribute to list items)\n"
},
{
"from": "human",
"value": "/**\n * React Static Boilerplate\n * https://github.com/kriasoft/react-static-boilerplate\n *\n * Copyright © 2015-present Kriasoft, LLC. All rights reserved.\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Add note to explain where the custom name comes from"
},
{
"from": "human",
"value": "/**\n * Dependencies.\n */\n\nlet NullAnalytics = require('./NullAnalytics');\nlet Tracker = require('./Tracker');\n\n/**\n * Constants.\n */\n\nconst ANALYTICS_KEY = process.env.A... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce code duplication using GET params\n\nReplaced the two routes, one for http and another one for https, using\nGET parameter ?url=\n"
},
{
"from": "human",
"value": "// This route will save the given url into the database\n// returning its \"shorter\" version\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken path to css caused by previous commit\n"
},
{
"from": "human",
"value": "console.time('Starting server');\n\nrequire('promise-helpers');\nvar fs = require('fs');\nvar path = require('path');\nvar express = require('express');\nvar app = express();\n\n/**\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for IE11 custom event\n"
},
{
"from": "human",
"value": "import assign from 'object-assign';\n\nimport { store } from './helpers';\n\nexport const MENU_SHOW = 'REACT_CONTEXTMENU_SHOW';\nexport const MENU_HIDE = 'REACT_CONTEXTMENU_HIDE';\n\n\nexport function disp... | javascript | chosen |
[
{
"from": "system",
"value": "Allow collapse all accordion tabs in profileeditor\n"
},
{
"from": "human",
"value": "(function($){\n $(function(){\n\n $('.button-collapse').sideNav();\n\n }); // end of document ready\n})(jQuery); // end of jQuery name space\n\n// Keep one tab expanded while ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix checkboxes for Patient Summary.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Col } from 'react-bootstrap';\n\nconst PTCustomCheckbox = ({ title, name, isChecked... | javascript | chosen |
[
{
"from": "system",
"value": "Rename data prop to initial\n"
},
{
"from": "human",
"value": "/* @flow */\n\nexport const inMemory = (data : Object, transition : Function) => {\n let rootState = data;\n const read = () => rootState;\n const write = (fn : Function) => {\n const oldState = re... | javascript | chosen |
[
{
"from": "system",
"value": "Fix selecting node text when moving\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport { StyleSheet, css } from 'aphrodite';\n\nconst styles = StyleSheet.create({\n node: {\n cursor: 'move',\n },\n});\n\nconst renderState = (st... | javascript | chosen |
[
{
"from": "system",
"value": "Move destroy checks just before set"
},
{
"from": "human",
"value": "\nimport Ember from 'ember'\nimport layout from './template'\nimport PropTypeMixin, { PropTypes } from 'ember-prop-types'\n\nconst { K } = Ember\n\nexport default Ember.Component.extend(PropTypeMix... | javascript | chosen |
[
{
"from": "system",
"value": "Make it fit in one line\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport './App.css';\nimport logo from './logo.png';\n\nexport default function App() {\n return (\n <div>\n <h1>\n Welcome to\n <img src={logo} className=\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add timeout when resizing container (prevent close multicall that can cause performance issue)\n"
},
{
"from": "human",
"value": "\nvar fixedWidth = 220;\nvar minWidth = 660;\nvar fixedPadding = 100;\n\nfunction layoutWidth()\n{\n var wWidth = $(window).width();\... | javascript | chosen |
[
{
"from": "system",
"value": "Add createdAt field to Tiqs collection\n"
},
{
"from": "human",
"value": "Meteor.startup(function () {\n Tiqs._ensureIndex({text: 1});\n});\n\nMeteor.methods({\n associateTags: function(text, tags) {\n Tiqs.upsert({text: text}, {$addToSet: {tags: {$each: tags}}... | javascript | chosen |
[
{
"from": "system",
"value": "Add pto app to hrdata rule\n\nthis will allow the pto app to get manager info and no longer need an LDAP connection"
},
{
"from": "human",
"value": "function (user, context, callback) {\n // This is a rule to specifically allow access to _HRData for specific Client... | javascript | chosen |
[
{
"from": "system",
"value": "Return artwork node instead of fields\n"
},
{
"from": "human",
"value": "import gravity from '../../lib/loaders/gravity';\nimport { GraphQLString, GraphQLBoolean } from 'graphql';\nimport { mutationWithClientMutationId } from 'graphql-relay';\nimport { artworkFields... | javascript | chosen |
[
{
"from": "system",
"value": "Add sub components test; Add dismiss test\n"
},
{
"from": "human",
"value": "const React = require('react')\nconst should = require('should')\nconst { shallow } = require('enzyme')\nconst { expect } = require('chai')\n\nimport DropdownAlert from '../DropdownAlert'\n... | javascript | chosen |
[
{
"from": "system",
"value": "test: Fix test by adding a missing import.\n"
},
{
"from": "human",
"value": "import { Component } from '../../../src';\n\ndescribe('api/Component', () => {\n if (!classStaticsInheritance()) {\n return;\n }\n\n describe('property getters', () => {\n it('obs... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra trailing empty lines\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar readFile = require( './../lib' );\n\n// Sync //\n\nvar file = readFile.sync( __filename, 'utf8' );\n// returns <string>\n\nconsole.log( file instanceof Error );\n// => false\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add some test cases that are in doc\n"
},
{
"from": "human",
"value": "var should = require('chai').should();\n\nvar LocationUtil = require('../src/location-util.js').LocationUtil;\n\n\ndescribe('#absUrl', function () {\n it('should get full URL', function () {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use a cross-browser compatible method of determining document height\n\nThe automatic setting of height for the preview iframe stopped working in\nChrome. This change fixes this.\n"
},
{
"from": "human",
"value": "\n(function($) {\n\t$.entwine('ss', function($){\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Destroy HLS source before component unmount\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Hls from 'hls.js';\n\nconst propTypes = {\n src: PropTypes.string.isRequired,\n type: PropTypes.st... | javascript | chosen |
[
{
"from": "system",
"value": "Clear lesson field on add.\n"
},
{
"from": "human",
"value": "Template.sectionAddLesson.events({\n 'click .add-lesson-button': function (event, template) {\n // Get lesson name\n var lessonName = template.find(\".lesson-name\").value;\n\n // ... | javascript | chosen |
[
{
"from": "system",
"value": "Use process.exit to make test faster\n"
},
{
"from": "human",
"value": "/**\n * Check If Image Path Exists\n */\nvar http = require('http'),\n\turl = 'http://sirocco.accuweather.com/adc_images2/english/feature/400x300/worstwx.jpg'\n;\n\nhttp.get(url, function(respon... | javascript | chosen |
[
{
"from": "system",
"value": "Add link from candidate thumbnail to candidate detail page\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Image } from 'react-bootstrap'\nimport CandidateCounter from './CandidateCounter'\n\nimport styles from './candidatethumbnail.css'\n\ne... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Added new exclude image\"\n\nThis reverts commit cbc4520fcc0b6744113bee40ee21571eb787ea25.\n"
},
{
"from": "human",
"value": "module.exports = [\n 'https://upload.wikimedia.org/wikipedia/en/e/e7/Cscr-featured.svg',\n '.webm',\n 'https://upload.wikimedia.... | javascript | chosen |
[
{
"from": "system",
"value": "Add helper functions to change screen states\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { View } from 'react-native';\nimport RepoSearchBar from './components/RepoSearchBar';\nimport RepoSearchButton from './components/RepoS... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor constructor to take advantage of __super__ member.\n"
},
{
"from": "human",
"value": "define(['lib/def', 'handler'], function(Def, Handler) {\n\n var HandlerAdaptor = Def.type(Handler, function(handler) {\n Handler.call(this);\n this.def_prop('handle... | javascript | chosen |
[
{
"from": "system",
"value": "Check to see if the url has the context path first.\n"
},
{
"from": "human",
"value": "/**\n * Since IRIDA can be served within a container, all requests need to have\n * the correct base url. This will add, if required, the base url.\n *\n * NOTE: THIS ONLY NEEDS ... | javascript | chosen |
[
{
"from": "system",
"value": "Add an additional spec test for userNumbers divisible by 15\n"
},
{
"from": "human",
"value": "describe('pingPong', function() {\n it(\"is true for a number that is divisible by 3\", function() {\n expect(pingPong(6)).to.equal(true);\n });\n\n it(\"is true for... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to GH repo\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport {\n HashRouter as Router,\n Switch,\n Route,\n Link\n} from \"react-router-dom\";\nimport ComponentsPage from './pages/Components';\nimport ContentPage from './pages/Cont... | javascript | chosen |
[
{
"from": "system",
"value": "Fix index as key anti pattern\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { BrowserRouter, Match, Miss } from 'react-router'\nimport Header from './components/Header';\nimport CTA from './components/CTA';\nimport Footer from './components/F... | javascript | chosen |
[
{
"from": "system",
"value": "Use CssNormalize to normalize padding/margin\nfor entire app\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { BrowserRouter as Router, Route } from 'react-router-dom';\nimport Home from './Home';\n\nconst App = () => (\n <React.Fragment>\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove my dumb logging statement"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDom from 'react-dom';\nimport { Link } from 'react-router';\nimport _ from 'lodash';\nimport client from '../../common/store/Contentful';\nimport marked from 'm... | javascript | chosen |
[
{
"from": "system",
"value": "Remove -e in favor of --from\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport path from 'path';\nimport fs from 'fs';\nimport * as pose from '.';\nimport actions from './actions';\n\nconst opts = yargs\n.usage('$ pose <act... | javascript | chosen |
[
{
"from": "system",
"value": "Use beta version of Firefox (supports vertical writing-mode) in tests on Sauce Labs\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n var commonConfig = (require(\"./karma-common.conf\"))(config);\n var customLaunchers = {\n sl_ch... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test broken by encodeURIComponent change\n"
},
{
"from": "human",
"value": "var test = require('tap').test,\n ecstatic = require('../lib/ecstatic'),\n http = require('http'),\n request = require('request'),\n path = require('path');\n\nvar root = __d... | javascript | chosen |
[
{
"from": "system",
"value": "Implement ucFirst() to pass test\n"
},
{
"from": "human",
"value": "/**\n * Has Vowels\n * \n * hasVowel tests if the String calling the function has a vowels\n * \n * @param {void}\n * @return {Boolean} returns true or false indicating if the string\n * has a vowel... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the marker bouncing function.\n"
},
{
"from": "human",
"value": "function initMap() {\n var map;\n var $business_object;\n var biz_loc_collection;\n var i;\n\n $business_object = $('#businesses').data('url');\n biz_loc_collection = [];\n for (i = 0; i < $... | javascript | chosen |
[
{
"from": "system",
"value": "Implement fake form submits and confirmation buttons\n"
},
{
"from": "human",
"value": "$(document).foundation();\n\n$('a.disabled').click(function(e) {\n e.preventDefault();\n});\n\n\n// Show shadow when content slides under the page header\n$(document).ready(func... | javascript | chosen |
[
{
"from": "system",
"value": "Update consistent-path import for 2.x\n"
},
{
"from": "human",
"value": "'use babel'\n\nimport {getPath} from 'consistent-path'\nimport {BufferedProcess} from 'atom'\n\nexport default (command, args, cwd = null) => new Promise((resolve, reject) => {\n let output = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for new React Core (v16)\n\nOld react (v15) still working"
},
{
"from": "human",
"value": "import { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDom from 'react-dom';\n\nclass Portal extends Component {\n componentWillMoun... | javascript | chosen |
[
{
"from": "system",
"value": "Build a GraphQL response with errors reported\n"
},
{
"from": "human",
"value": "import {parse, Source} from 'graphql';\n\nimport {createSpecBuilderClass} from './base';\n\nimport {RepositoryBuilder} from './repository';\nimport {PullRequestBuilder} from './pr';\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Test that there are errors instead of exact number\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { mount, shallow } from 'enzyme';\nimport App from './App';\nimport TimeTable from 'timetablescreen';\n\ndescribe('App', () => {\n\tbeforeEach( (... | javascript | chosen |
[
{
"from": "system",
"value": "Add few functions and connect to query builder\n"
},
{
"from": "human",
"value": "const mysql = require('mysql')\nconst qBuilder = require('./QueryBuilder')\n\nlet query = ''\nlet params = []\n\nmodule.exports = (dbSetting) => {\n let connection = mysql.createConne... | javascript | chosen |
[
{
"from": "system",
"value": "Allow sails lift to take longer than 2 seconds\n"
},
{
"from": "human",
"value": "var Sails = require('sails');\r\n\r\nbefore(function (done) {\r\n Sails.lift({\r\n //config\r\n }, function (err, sails) {\r\n if (err) return done(err);\r\n // load fixture... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused tooltip initialization code\n"
},
{
"from": "human",
"value": "(function($) {\n $(\"#pl_map path\").on(\"click\", function() {\n document.location.pathname = $(this).data(\"href\")\n });\n $('[data-toggle=\"tooltip\"]').tooltip({'contai... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to pass hash instead of filepath to Config.\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\nvar fs = require('fs');\n\nfunction Config(filePath) {\n var data = this.parse(filePath);\n this.validate(data);\n return Object.freeze(data);\n}\... | javascript | chosen |
[
{
"from": "system",
"value": "Add imports to test suite\n"
},
{
"from": "human",
"value": "GLOBAL.projRequire = function (module) {\n\treturn require('../' + module);\n};\n"
},
{
"from": "gpt",
"value": "GLOBAL.projRequire = function (module) {\n\treturn require('../' + module);\n};\... | javascript | chosen |
[
{
"from": "system",
"value": "Include WS TLS test in the test suite\n"
},
{
"from": "human",
"value": "require('./unit/index');\nrequire('./test_multiple_payloads');\nrequire('./test_misc');\nrequire('./test_loop');\nrequire('./test_capture');\nrequire('./test_arrivals');\nrequire('./test_reuse'... | javascript | chosen |
[
{
"from": "system",
"value": "Add Domain class's shorthand name\n"
},
{
"from": "human",
"value": "'use strict'\n\n/**\n * @class Elastic\n */\nvar Elastic = {\n klass : klass,\n domain: {\n Layout : LayoutDomain,\n View : ViewDomain,\n Compontnt: ComponentDomain\n },\n except... | javascript | chosen |
[
{
"from": "system",
"value": "Add pgp to notification channels\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport engine from '../engine'\nimport {notifyCtlSetNotificationsRpc} from '../constants/types/flow-types'\n\ntype NotificationChannels = {\n session?: true,\n users?: true,\n kbfs... | javascript | chosen |
[
{
"from": "system",
"value": "Increase delay to help test reliability.\n"
},
{
"from": "human",
"value": "var test = require('tape');\nvar robot = require('..');\nvar lastKnownPos, currentPos;\n\ntest('Get the initial mouse position.', function(t) \n{\n\tt.plan(3);\n\tt.ok(lastKnownPos = robot.g... | javascript | chosen |
[
{
"from": "system",
"value": "Change VIEW_CONTEXT_WP_DASHBOARD to camel case.\n"
},
{
"from": "human",
"value": "/**\n * Core constants.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file e... | javascript | chosen |
[
{
"from": "system",
"value": "Set a nice, generous timeout on requests.\n"
},
{
"from": "human",
"value": "/*\n * Initialize the Restify server.\n */\n\nvar restify = require('restify');\nvar config = require('./config');\nvar routes = require('./routes');\nvar log = require('./logging').getLogg... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.