conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Increase the height of the Iframe\n\nSigned-off-by: Brianna Major <6a62c0472e857db5994824f147beeb095c78d3a5@kitware.com>\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Iframe from 'react-ifra... | javascript | chosen |
[
{
"from": "system",
"value": "Use `version` not `platformVersion` for iOS appium config\n"
},
{
"from": "human",
"value": "// Test runner\nvar runTests = require('./affixing-header-specs'),\n browsers = [\n {browserName: 'chrome'},\n {browserName: 'firefox'}\n ];\n\n// var ... | javascript | chosen |
[
{
"from": "system",
"value": "Change new constant postfix to arr instead of set.\n"
},
{
"from": "human",
"value": "/**\n * This file specifies the database collection and field names.\n */\nexport const COLLECTION_TRIPS = 'trips';\nexport const TRIPS_TITLE = 'title';\nexport const TRIPS_DESCRIP... | javascript | chosen |
[
{
"from": "system",
"value": "Update sass block to use new API\n"
},
{
"from": "human",
"value": "/**\n * SASS webpack block.\n *\n * @see https://github.com/jtangelder/sass-loader\n */\n\nmodule.exports = sass\n\n/**\n * @param {object} [options] See https://github.com/sass/n... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Include lifecycle methods for reinvocation of getHashAsClass method\n"
},
{
"from": "human",
"value": "'use strict';\nimport React, { Component } from 'react';\nimport { Link } from 'react-router';\n\nimport NavBar from './NavBar';\nimport Footer from './Foote... | javascript | chosen |
[
{
"from": "system",
"value": "test: Fix dom test after adding pretty print of html\n"
},
{
"from": "human",
"value": "/* eslint-env mocha, browser */\nconst { expect } = chai;\n\ndescribe('DOM nodes', () => {\n it('should find valid xpath in element', () => {\n const element = document.creat... | javascript | chosen |
[
{
"from": "system",
"value": "Add a div wrapper for multi select to persist a selection.\n"
},
{
"from": "human",
"value": "import { Component } from 'substance'\nimport MultiSelectInput from './MultiSelectInput'\nimport { getAvailableOptions } from './propertyEditorHelpers'\n\nexport default cl... | javascript | chosen |
[
{
"from": "system",
"value": "Add a class to past stops for styling purposes\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport moment from 'moment';\nimport stringToHue from 'bus-detective/utils/string-to-hue';\nvar inject = Ember.inject;\n\nexport default Ember.Component.ext... | javascript | chosen |
[
{
"from": "system",
"value": "Load Page method when web socket is ready\n"
},
{
"from": "human",
"value": "function Connection(onMessage) {\n\n socket_uri = document.URL.replace(/https?:(.*)\\/html\\/.*/, \"ws:$1/ws\");\n var websocket = new WebSocket(socket_uri);\n\n websocket.onopen = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Fix CodeMirror mode load paths\n"
},
{
"from": "human",
"value": "module.exports = [ \n 'browser/vendor/codemirror/lib/codemirror.js',\n 'browser/vendor/codemirror/mode/xml/xml.js',\n 'browser/vendor/codemirror/mode/javascript/javascript.js',\n 'brows... | javascript | chosen |
[
{
"from": "system",
"value": "Apply outerMargin to non-fluid grids as well\n"
},
{
"from": "human",
"value": "\nimport PropTypes from 'prop-types'\nimport styled, { css } from 'styled-components'\n\nimport config, { DIMENSION_NAMES } from '../config'\n\nconst Grid = styled.div`\n margin-right: ... | javascript | chosen |
[
{
"from": "system",
"value": "Update js file with new name and bug fixes.\n"
},
{
"from": "human",
"value": "GeoLocationService.prototype = {\n\n\tcreateCallbackFn: function (callbackFn, scope) {\n\t\tif (typeof callbackFn !== 'function')\n\t\t\treturn;\n\t\t\t\n\t\treturn function () {\n\t\t\tc... | javascript | chosen |
[
{
"from": "system",
"value": "Allow multiple calls to optimize without introducing race conditions\n"
},
{
"from": "human",
"value": "var parse = require('./parse');\nvar clean = require('./clean');\n\nmodule.exports = Engine = {};\n\nEngine.runPython = function(operation, func, options, cb) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add timeInfo() for conditional scales\n\nFix quotes and remove whitespace\n"
},
{
"from": "human",
"value": "import fmt from \"./fmt\"\nimport { log } from \"fly-util\"\n\nexport default function () {\n this.on(\"fly_run\", ({ path }) =>\n log(`Flying with ${fmt... | javascript | chosen |
[
{
"from": "system",
"value": "Edit registration set reactive variables.\n"
},
{
"from": "human",
"value": "Template.editRegistration.helpers({\n // Get the current registration from the URL path\n getRegistration: function () {\n var registrationId = Router.current().params._id;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add confLoaded event to ArethusaCtrl spec\n"
},
{
"from": "human",
"value": "\"use strict\";\n\ndescribe('ArethusaCtrl', function() {\n beforeEach(module('arethusa'));\n\n it('sets scope values', inject(function($controller, $rootScope) {\n var scope = $rootSco... | javascript | chosen |
[
{
"from": "system",
"value": "Mark a peer that has left as inactive\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\n/**\n #### leave\n\n ```\n /leave|{\"id\":\"...\"}\n ```\n\n When a leave message is received from a peer, we check to see if that is\n a peer th... | javascript | chosen |
[
{
"from": "system",
"value": "Make exchange rates look a bit nicer\n"
},
{
"from": "human",
"value": "// A comma separated list of currencies to display.\nvar ticker_currencies = \"USD,BTC,ETH,JPY,CNY\"\n\nticker = function(currencies) {\n $.ajax({\n type: \"GET\",\n url: \"https://min-ap... | javascript | chosen |
[
{
"from": "system",
"value": "Fix usage from multiple tabs\n"
},
{
"from": "human",
"value": "var tab = null;\nvar nativePort = null;\nvar contentPort = null;\n\nchrome.runtime.onConnect.addListener(function(port) {\n console.assert(port.name == \"webcard\");\n if (!contentPort)\n contentPo... | javascript | chosen |
[
{
"from": "system",
"value": "Add js to gulp watch\n"
},
{
"from": "human",
"value": "var gulp = require(\"gulp\");\n\nvar sourcemaps = require(\"gulp-sourcemaps\");\n\nvar sass = require(\"gulp-sass\");\n\nvar concat = require(\"gulp-concat\");\nvar uglify = require(\"gulp-uglify\");\n\n\ngulp.... | javascript | chosen |
[
{
"from": "system",
"value": "Improve user role editing, not finalized: current roles should be shown with checkboxes, removed if necessary\n"
},
{
"from": "human",
"value": "/*****************************************************************************/\n/* EditRole: Event Handlers */\n/*******... | javascript | chosen |
[
{
"from": "system",
"value": "Make the website nav header's hysteresis a bit more robust\n\nIn particular, this prevents the nav header from reappearing all the\ntime while scrolling down on Firefox.\n"
},
{
"from": "human",
"value": "//- ----------------------------------\n//- 💫 MAIN JAVASCRIP... | javascript | chosen |
[
{
"from": "system",
"value": "Add test files to gulp linting\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst gulp = require('gulp');\nconst babel = require('gulp-babel');\nconst eslint = require('gulp-eslint');\nconst Server = require('karma').Server;\n\nconst src = 'src/... | javascript | chosen |
[
{
"from": "system",
"value": "Implement method to search group for clients\n"
},
{
"from": "human",
"value": "/**\n * 24.05.2017\n * TCP Chat using NodeJS\n * https://github.com/PatrikValkovic/TCPChat\n * Created by patri\n */\n'use strict'\n\nlet counter = 0\n\n/**\n * Represent connected clien... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust app scheme with portDefinitions\n"
},
{
"from": "human",
"value": "import Util from \"../../helpers/Util\";\n\nimport AppTypes from \"../../constants/AppTypes\";\nimport AppStatus from \"../../constants/AppStatus\";\n\nconst appScheme = {\n cmd: null,\n con... | javascript | chosen |
[
{
"from": "system",
"value": "chore(Karma): Use Phantom.js for FEND tets\n"
},
{
"from": "human",
"value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n config.set({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove question mark as initial state on tabs\n"
},
{
"from": "human",
"value": "(function(){\n 'use strict';\n\n angular.module('cla.controllers')\n .controller('CaseEditDetailCtrl',\n ['$scope', 'AlternativeHelpService',\n function($scope, Alterna... | javascript | chosen |
[
{
"from": "system",
"value": "Update select to remove warnning messages, use MenuItem instead\n"
},
{
"from": "human",
"value": "/**\n * Created by steve on 15/09/15.\n */\nimport React from 'react';\nimport ValidationMixin from './ValidationMixin';\nconst SelectField = require('material-ui/lib/... | javascript | chosen |
[
{
"from": "system",
"value": "Make the addition of hosts sync\n\nIt now adds a host and continues to the next. It's a shame we cant use\npromises, and do it all aync. Maybe the splice of the hosts array is a\nbit strange, and a index with counter on it would be better.\n\nRef: #2\n"
},
{
"from": "hu... | javascript | chosen |
[
{
"from": "system",
"value": "Use rtc-switchboard-messenger for simple example\n"
},
{
"from": "human",
"value": "// create a new signaller, connecting to the target switchboard\nvar signaller = require('..')('//switchboard.rtc.io/');\n\n// when a new peer is announced, log it\nsignaller.on('pee... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error caused by having typings and spec files in the models directory\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar browserify = require('browserify');\nvar coffeeify = require('coffeeify');\nvar path = require('path');\nvar fs = require('fs');\n\nmodu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix no config provider invariant in plugin interface\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport bluebird from 'bluebird'\nimport invariant from 'invariant'\nimport {Navy} from './'\n\nimport type {ConfigProvider} from '../config-provider'\n\nconst reso... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to conceal expert section from create form\n\n- Workaround for cases when fields are duplicated in a details view\n"
},
{
"from": "human",
"value": "import template from './expert-contract-form.html';\n\nconst expertContract = {\n template,\n bindings: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a basic model with data for 6 locations\n"
},
{
"from": "human",
"value": "// Create a map variable\nvar map;\n\n// Initialize the map\nfunction initMap() {\n\t// Use a constructor to create a new map JS object.\n\tmap = new google.maps.Map(document.getElementBy... | javascript | chosen |
[
{
"from": "system",
"value": "Update text index to include url\n"
},
{
"from": "human",
"value": "var client = require('mongodb').MongoClient\n\nvar instance = false\n\nmodule.exports = {\n connect: function(config, callback) {\n client.connect(config.database.host+config.database.name... | javascript | chosen |
[
{
"from": "system",
"value": "Add attribute message for model campaign\n"
},
{
"from": "human",
"value": "/**\n* Campagne.js\n*\n* @description :: TODO: You might write a short summary of how this model works and what it represents here.\n* @docs :: http://sailsjs.org/#!documentation/mode... | javascript | chosen |
[
{
"from": "system",
"value": "Add all languages of progit to binary\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n\nvar Q = require('q');\nvar _ = require('lodash');\nvar path = require('path');\n\n\nvar convert = require('../');\n\nvar LANGS = ['en'];\n\nvar DIR = path.resolve(proces... | javascript | chosen |
[
{
"from": "system",
"value": "Add sample output in comments.\n"
},
{
"from": "human",
"value": "/* Detect object's properties being used */\n\n\n// Object to be spied, can be Modernizr library for example\nvar user = { name: 'Maciej', surname: 'Smolinski', fullName: 'Maciej Smolinski' };\n\n\n//... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust User type to expect number vals for `id`, `score` & `teamId`\n"
},
{
"from": "human",
"value": "/**\n *\n * @flow\n */\n'use strict';\n\nimport type {Action} from '../actions/types';\n\nexport type User = {\n id: string;\n name: string;\n username: s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix login error: password check\n"
},
{
"from": "human",
"value": "var response = require('response');\nvar JSONStream = require('JSONStream');\nvar formBody = require('body/form');\nvar redirect = require('../lib/redirect');\n\nexports.install = function (server, p... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to array for questionnaire list\n"
},
{
"from": "human",
"value": "// According to the swagger documentation, qrList is an object with\n// questionnaire ids as key, and an object with `id`, `name`, `'label`,\n// `agency` and `survey` as values. A survey is ma... | javascript | chosen |
[
{
"from": "system",
"value": "Set SocialLinks to row layout\n"
},
{
"from": "human",
"value": "import styled from 'styled-components'\n\nexport const SocialLinksWrapper = styled.nav``\n\nexport const SocialLinksList = styled.ul`\n display: grid;\n grid-gap: 0.8rem;\n grid-auto-flow: column;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use font awesome user and search iscons\n"
},
{
"from": "human",
"value": "/**\n * @module SOCIAL\n */\nvar SOCIAL = (function (SOCIAL) {\n\n /**\n * @property breadcrumbs\n * @type {{content: string, title: string, isValid: isValid, href: string}[]}\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix config map volume issue\n\nhttps://github.com/rancher/rancher/issues/12535\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport layout from './template';\nimport { observer } from '@ember/object';\nimport VolumeSource from 'shared... | javascript | chosen |
[
{
"from": "system",
"value": "Indent two spaces instead of tabs\n"
},
{
"from": "human",
"value": "/**\n * Functionality for the node info side display panel\n *\n * @author Taylor Welter - tdwelter\n */\n(function()\n 'use strict';\n angular\n .module('nodeproperties', ['ngVis'])\n... | javascript | chosen |
[
{
"from": "system",
"value": "Set profile once <select> has been initialized\n"
},
{
"from": "human",
"value": "var EdsnSwitch = (function () {\n 'use strict';\n\n var EDSN_THRESHOLD = 30,\n validBaseLoads = /^(base_load|base_load_edsn)$/;\n\n function swapSelectBox() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve functional steps failure descriptions\nLeverage getDescription()\n"
},
{
"from": "human",
"value": "var promises = require('q');\n\n\nvar FunctionalStep = new Class({\n\tExtends: require('./AbstractStep'),\n\n\t/** A function, promise-returning or not, to be... | javascript | chosen |
[
{
"from": "system",
"value": "Use more sane default values\n"
},
{
"from": "human",
"value": "/* eslint TSNE:false */\n\nself.onmessage = function (e) {\n let msg = e.data;\n let currcost = 100;\n\n let model = new TSNE({\n dim: msg.dim || 2,\n perplexity: msg.perplexity || 100.0,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out callback_query since it's not being used\n"
},
{
"from": "human",
"value": "var mysql = require('mysql'),\n config = require('../config'),\n Promise = require('promise');\n\nvar pool = mysql.createPool({\n host: config.mysql.host,\n database: c... | javascript | chosen |
[
{
"from": "system",
"value": "Read database configuration from config.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Promise = require('bluebird'),\n monk = require('monk'),\n db;\n\nfunction formatConnectionString(dbConfiguration) {\n return dbConfiguration.host + '/' + dbCon... | javascript | chosen |
[
{
"from": "system",
"value": "Remove cb from core function\n"
},
{
"from": "human",
"value": "const merge = require('webpack-merge');\nconst concat = require('lodash/concat');\nconst reduce = require('lodash/reduce');\nconst compact = require('lodash/compact');\nconst isArray = require('lodash/i... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate to new sass.compile function\n"
},
{
"from": "human",
"value": "const CleanCSS = require(\"clean-css\");\nconst sass = require(\"sass\");\nconst through = require(\"through2\");\n\n// Minimal wrapper plugin around CleanCss\nmodule.exports.minify = (options) ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix host and path validation.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar fs = require(\"fs\"),\n main = require(\"./main\"),\n config = require(\"./config\");\n\nfunction evaluate(params) {\n var cmd = params.command || \"\",\n filenam... | javascript | chosen |
[
{
"from": "system",
"value": "Customize assert.throws, as it behaves in unintuitive ways sometimes\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction FillMeInError() {\n this.name = \"FillMeInError\";\n this.message = this.name;\n Error.captureStackTrace(this, FillMeInError)... | javascript | chosen |
[
{
"from": "system",
"value": "Use Object.assign() to update object\n"
},
{
"from": "human",
"value": "export class PlayerModelService {\n\tconstructor($log, $http, $localStorage, _, websocket) {\n\t\t'ngInject';\n\n\t\tthis.$log = $log;\n\t\tthis.$http = $http;\n\t\tthis.$localStorage = $localSt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Prolific UDP listener print line.\n"
},
{
"from": "human",
"value": "/*\n ___ usage ___ en_US ___\n node stdout.udp.bin.js --bind ip:port\n\n options:\n\n --help display help message\n -p, --port <integer> port ... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests of JWT kid and alg values\n\nTest that our JWT library resists a series of potential attacks against\nits verifyJWT method.\n"
},
{
"from": "human",
"value": "const JSONWebToken = require('../../models/jsonwebtoken');\n\ndescribe('JSONWebToken', function()... | javascript | chosen |
[
{
"from": "system",
"value": "Store roles and permissions in user session instead of reloading them each request\n"
},
{
"from": "human",
"value": "var model = require('./model');\n\nvar middleware = module.exports = {};\n\nmiddleware.loadRoles = function (req, res, next) {\n if (req.user) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add emptyView option back to element list\n"
},
{
"from": "human",
"value": "const Config = require('utils/config');\n\n\nmodule.exports = Marionette.CompositeView.extend({\n\n template: require('templates/builder/pageDetails/pageElements/elementsCompositeView'),... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce padding for address-list to make it fit on mobile displays\n"
},
{
"from": "human",
"value": "// @flow\nimport type { AddressMap, KnxAddress } from '../types';\n\nimport React from 'react';\n\nimport createStore from '../lib/create-store';\nimport withRedux f... | javascript | chosen |
[
{
"from": "system",
"value": "Create complete zip of app\n"
},
{
"from": "human",
"value": "/*jshint node:true */\n\"use strict\";\n\nvar fs = require(\"fs\"),\n shell = require(\"shelljs\"),\n archiver = require(\"archiver\");\n\nmodule.exports = function(config, done) {\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for TaskList component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { expect } from 'chai';\nimport { shallow } from 'enzyme';\nimport TaskList from '../../../src/components/Todo/TaskList';\n\nconst setup = (props = {\n tasks: [],... | javascript | chosen |
[
{
"from": "system",
"value": "Fix can't insert when grouping.\n"
},
{
"from": "human",
"value": "/**\n * Created by dungvn3000 on 3/11/14.\n */\n\nExt.define('sunerp.controller.sophancong.SoPhanCongListCtr', {\n extend: 'sunerp.controller.core.BaseListEditController',\n modelClass: 'sunerp... | javascript | chosen |
[
{
"from": "system",
"value": "Use single quotes and semi colon\n"
},
{
"from": "human",
"value": "Meteor.methods({\n 'pingHost': function(host){\n this.unblock();\n\n var pingRes = Ping.host(host.ip);\n\n console.log(\"Host \" + host.ip + \": \" + pingRes.status + \" \" + pingRes.laten... | javascript | chosen |
[
{
"from": "system",
"value": "Add note about which chars are used to generate room code\n"
},
{
"from": "human",
"value": "import Room from './room.js';\n\nclass RoomManager {\n\n constructor() {\n this.roomsById = {};\n }\n\n getRoom(roomCode) {\n return this.roomsById[roomCode];\n }\... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"format and fix regex\"\n\nThis reverts commit b0329940ae024aa0d51cc468ba43af97b416a06f.\n"
},
{
"from": "human",
"value": "var map = require('map-stream');\n\n/**\n *\n * 排除 _ 开头的参数\n * @returns {Stream}\n */\nmodule.exports = function (nextStream) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add node env location to script header.\n"
},
{
"from": "human",
"value": "const\n fs = require('fs');\n\n/* Remove all white space from str. */\nfunction minifyString(str) {\n return str.replace(/\\s/g, '');\n};\n\n/* Insert .min extension to FileName. */\nfunctio... | javascript | chosen |
[
{
"from": "system",
"value": "Check that cordova device plugin is installed\n"
},
{
"from": "human",
"value": "import Kinvey from 'kinvey-javascript-sdk-core';\nimport { NetworkRack } from 'kinvey-javascript-sdk-core/es5/rack/rack';\nimport { HttpMiddleware } from 'kinvey-javascript-sdk-core/es5... | javascript | chosen |
[
{
"from": "system",
"value": "Update the background printer widget to handle the new system\n"
},
{
"from": "human",
"value": "// command: 'cat ./stolaf-base/printer-data-url.txt | xargs curl --silent',\ncommand: 'cat ./stolaf-base/printerstatus.csv',\n\nrefreshFrequency: 60000,\nlastUpdateTime:... | javascript | chosen |
[
{
"from": "system",
"value": "Add log when servers are unavailable\n"
},
{
"from": "human",
"value": "var http = require('http'),\n httpProxy = require('http-proxy'),\n config = require('./config');\n\n\nvar sendError = function(err, req, res) {\n res.writeHead(500, {\n 'Content-Type':... | javascript | chosen |
[
{
"from": "system",
"value": "Manage xml and text content type.\n"
},
{
"from": "human",
"value": "/*!\n * qwebs\n * Copyright(c) 2015 Benoît Claveau\n * MIT Licensed\n */\n \n\"use strict\";\n\nconst DataError = require(\"./../dataerror\");\n\nclass ContentTypeProvider {\n constructor() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add TODO comment for watch mode\n"
},
{
"from": "human",
"value": "import CLIEngine from \"./cli-engine\";\nimport defaultOptions from \"./default-options\";\nimport log from \"../helper/log\";\nimport options from \"./options\";\nimport pkg from \"../../package.jso... | javascript | chosen |
[
{
"from": "human",
"value": "feat: Add fallback view for unrecognized wildcard routes\n"
},
{
"from": "gpt",
"value": "'use strict';\nimport React from 'react';\n\n\nconst Error404 = () => (\n <div id='error-wrapper'>\n <img\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQ... | javascript | chosen |
[
{
"from": "system",
"value": "Check for firefox for testrpc initialisation\n"
},
{
"from": "human",
"value": "/* global angular, mist */\nimport {web3} from '../../contract/Chess.sol';\nangular.module('dappChess').factory('accounts', function () {\n return {\n // For testing purposes: Use th... | javascript | chosen |
[
{
"from": "system",
"value": "Add disable/enable methods to Parallax3D\n"
},
{
"from": "human",
"value": "export default class Parallax3D {\n\n constructor(element, initialTransform) {\n this.elem = element;\n this.initialTransform = initialTransform;\n this.rotmax = 10;\n\n window.... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite Scope with prototypal notation\n"
},
{
"from": "human",
"value": "// Heavily inspired by coffee-script again\n\nexports.Scope = function (parent) {\n var self = this;\n\n if (parent) {\n self.root = null;\n } else {\n self.root = self;... | javascript | chosen |
[
{
"from": "system",
"value": "Add custom defer and debug function\n"
},
{
"from": "human",
"value": "// Polyfills\n''.trim||(String.prototype.trim=function(){return this.replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g,'');});\nif (!Function.prototype.bind) {\n Function.prototype.bind = function (oThis... | javascript | chosen |
[
{
"from": "system",
"value": "Add JS for some christmas spirit\n"
},
{
"from": "human",
"value": "/**\n * main.js\n */\n\n'use strict';\n\n// Only run in capable browsers via feature detection\nvar didCutTheMustard = 'querySelector' in document\n && 'classList' in document.createElement('a')\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix user satisfaction bar charts tests following removal of the matrix\n"
},
{
"from": "human",
"value": "define([\n 'common/views/visualisations/bar-chart/user-satisfaction',\n 'common/views/visualisations/bar-chart/bar-chart',\n 'common/collections/journey',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle case iframe is rendered too early.\n"
},
{
"from": "human",
"value": "define([\n\t'backbone',\n\t'jquery',\n\t'underscore',\n\n\t'chartsM',\n\t'visualizationsServiceM',\n], function (Backbone, $, _, chartsM, visualizationsServiceM) {\n\t'use strict';\n\n\tvar... | javascript | chosen |
[
{
"from": "system",
"value": "Fix recursive reference to use 'this' and don't store tokenization info on function.\n"
},
{
"from": "human",
"value": "function strtok (str, tokens) {\n // http://kevin.vanzonneveld.net\n // + original by: Brett Zamir (http://brettz9.blogspot.com)\n // %... | javascript | chosen |
[
{
"from": "system",
"value": "Update pinback URL and reporter message\n"
},
{
"from": "human",
"value": "const Report = require('./Report');\nconst Notification = require('./Notification');\n\nasync function Reporter( request, reply ) {\n // Params https://sites.google.com/a/webpagetest.org/doc... | javascript | chosen |
[
{
"from": "system",
"value": "Change next to createStore for better readability\n"
},
{
"from": "human",
"value": "import compose from './compose'\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such... | javascript | chosen |
[
{
"from": "system",
"value": "Add stack trace to promises output.\n\nThis makes it much easier to debug when there are problems.\n\nBefore:\n\n```\nindex.js:21 Failed to load the deck. TypeError: Cannot read property 'keys' of undefined(…)\n```\n\nAfter:\n\n```\nindex.js:21 Failed to load the deck.\nTypeErr... | javascript | chosen |
[
{
"from": "system",
"value": "Change calcualtion formula and premium to 13%\n"
},
{
"from": "human",
"value": "// Settings\n$(document).ready(function() {\n\n // Commission percentage\n window.mybtcprice.commission = 15;\n\n // Allow user to change commission?\n window.mybtcprice.commission_... | javascript | chosen |
[
{
"from": "system",
"value": "Create additional (dummy) test to fix test coverage\n"
},
{
"from": "human",
"value": "const {expect} = require('chai');\n\nconst s = require('../lib/spec');\n\nconst {isInteger} = s.utils;\n\ndescribe('Test the form function', () => {\n before(() => {\n s... | javascript | chosen |
[
{
"from": "system",
"value": "Put a timer on reload to wait for autosave to finish\n"
},
{
"from": "human",
"value": "(function (ng, app) {\n app.config(['$stateProvider', function ($stateProvider) {\n $stateProvider.state('it-system.usage.contracts', {\n url: '/contracts',... | javascript | chosen |
[
{
"from": "system",
"value": "[MISC] Remove an unnecessary file import of the sass config\n"
},
{
"from": "human",
"value": "/**\n * Grunt-autoprefixer\n * @description Autoprefixer parses CSS and adds vendor-prefixed CSS properties using the Can I Use database.\n * @docs https://github.com/nDmi... | javascript | chosen |
[
{
"from": "system",
"value": "Add actual call to the jumping function.\n"
},
{
"from": "human",
"value": "var arrayContainsObject = require('./array-contains-object');\nvar collisionObstacles = [];\nvar Jump = require('./../jump');\nvar hypotenuse = require('./hypotenuse');\n\nvar isColliding = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add an extern for WebGLDebugUtils.glFunctionArgsToString\n"
},
{
"from": "human",
"value": "/**\n * @type {Object}\n */\nfunction WebGLDebugUtils() {}\n"
},
{
"from": "gpt",
"value": "/**\n * @type {Object}\n */\nfunction WebGLDebugUtils() {}\n\n/**\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant variable to simplify the code\n"
},
{
"from": "human",
"value": "export default function configure(element, userOptions, defaultOptions) {\n return Object.keys(defaultOptions).reduce((options, key) => {\n const initial = defaultOptions[key];\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to interest group info page\n"
},
{
"from": "human",
"value": "// @flow\n\nimport styles from './InterestGroup.css';\nimport React from 'react';\nimport InterestGroupComponent from './InterestGroup';\nimport Button from 'app/components/Button';\nimport { Co... | javascript | chosen |
[
{
"from": "system",
"value": "Add some basics to get the server going enough for further testing.\n"
},
{
"from": "human",
"value": "/**\n * Created by unleet on 11/2/13.\n */\n"
},
{
"from": "gpt",
"value": "/**\n * A 12-factor friendly configuration manager.\n * Every setting the T... | javascript | chosen |
[
{
"from": "system",
"value": "Raise the treshold for levels 4+\n"
},
{
"from": "human",
"value": "import html from \"innerself\";\nimport Scene from \"./Scene\";\nimport { SCENE_LEVELS, SCENE_FIND, SCENE_NOPASS } from \"./actions\"\n\nfunction LevelScore(score, idx) {\n return html`\n <div ... | javascript | chosen |
[
{
"from": "system",
"value": "Change success to then manually\n"
},
{
"from": "human",
"value": "export default\n function LoadConfig($log, $rootScope, $http, Store) {\n return function() {\n\n\n var configSettings = {};\n\n var configInit = function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix stateless component. cc @catalinmiron\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst styles = {\n width: 200,\n height: 200,\n border: '1px solid cyan',\n position: 'relative',\n};\n\nexport default ({ children }) => ({\n render() {\... | javascript | chosen |
[
{
"from": "system",
"value": "Use requireFirstInTree from node-ext package\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path')\n , createContext = require('vm').createContext\n , isFunction = require('es5-ext/lib/Function/is-function')\n , ba2p ... | javascript | chosen |
[
{
"from": "system",
"value": "Use SSL for the default API\n"
},
{
"from": "human",
"value": "module.exports = {\n API_HOST: JSON.stringify(process.env.API_HOST || 'http://api-staging.scratch.mit.edu')\n};\n"
},
{
"from": "gpt",
"value": "module.exports = {\n API_HOST: JSON.stri... | javascript | chosen |
[
{
"from": "system",
"value": "Add per-element breakdown to stats.\n"
},
{
"from": "human",
"value": "function StatsWriter() {\n this.result = {\n element: 0,\n text: 0,\n attribute: 0\n };\n}\n\nStatsWriter.prototype.beginOpenElement = function(name) {\n this.result.element += 1;\n}\... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure we provide which database to make the unique check\n"
},
{
"from": "human",
"value": "/**\n\n Copyright 2015 Covistra Technologies Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance w... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.