conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update error handling and provide better error message\n"
},
{
"from": "human",
"value": "var async = require('async'),\n\tboom = require('boom'),\n\tdefaultData = {'success' : true};\n\nfunction Series(arr) {\n\tthis.arr = arr;\n}\n\nfunction Validate(arr) {\n\tvar... | javascript | chosen |
[
{
"from": "system",
"value": "Add poly-fill when array.filter doesn't exists\n"
},
{
"from": "human",
"value": "/*global require, module*/\n/*!\n * missing-keys <https://github.com/tobiasoberrauch/missing-keys>\n *\n * Copyright (c) 2015, Tobias Oberrauch.\n * Licensed under the MIT License.\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Move var declarations to the top.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assert = require('assert'),\n Batch = require('batch'),\n getStylesData = require('style-data'),\n getStylesheetList = require('list-stylesheets'),\n getHrefContent... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug which caused camera to rotate when avatar camera was in FPS mode and RMB was pressed/released. Also fixes bug (which was part of the aforementioned bug) which caused mouse cursor to become visible right after entering avatar FPS mode and pressing RMB.\n"
},
{
"f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove template strings for node compatibility"
},
{
"from": "human",
"value": "var CLIEngine = require('eslint').CLIEngine;\nvar chalk = require('chalk');\nvar cli = new CLIEngine({});\nvar format = '';\n\nmodule.exports = function (paths, options) {\n if (options... | javascript | chosen |
[
{
"from": "system",
"value": "Order posts by submitted time.\n"
},
{
"from": "human",
"value": "Template.postsList.helpers({\n posts: function() {\n return Posts.find();\n }\n});\n"
},
{
"from": "gpt",
"value": "Template.postsList.helpers({\n posts: function() {\n return Pos... | javascript | chosen |
[
{
"from": "system",
"value": "Add functionality to post to custom channels\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst fs = require('fs');\n\nconst WebClient = require('@slack/client').WebClient;\n\nconst token = require('./config.js').apiToken;\n\nconst message = process.argv[2];\... | javascript | chosen |
[
{
"from": "system",
"value": "Add quick intro to modules\n"
},
{
"from": "human",
"value": "/* Main app file for CEL project\n * Mostly stolen from requirejs examples: http://requirejs.org/docs/api.html\n */\n\n'use strict';\n\nrequirejs.config({\n //except, if the module ID starts with 'app'... | javascript | chosen |
[
{
"from": "system",
"value": "Improve Bolt module doc block"
},
{
"from": "human",
"value": "/*\n * Initialize Bolt module\n */\nvar Bolt = {};\n"
},
{
"from": "gpt",
"value": "/*\n * Initialize the Bolt module\n *\n * @type {Object}\n * @module Bolt\n * @mixes BoltApp\n * @mixes Bol... | javascript | chosen |
[
{
"from": "system",
"value": "Remove heroku hack, fix comments"
},
{
"from": "human",
"value": "var Twitter = require('twode'),\n _ = require('underscore'),\n CronJob = require('cron').CronJob;\n config = require('./lib/config'),\n fs = require(\"fs\"),\n readFile = fs.readFileSyn... | javascript | chosen |
[
{
"from": "system",
"value": "Add QueryResult to default export\n"
},
{
"from": "human",
"value": "module.exports = {\n\tModel: require('./src/model'),\n\tDocument: require('./src/document'),\n\tQuery: require('./src/query'),\n\tMemStore: require('./src/mem-store'),\n\tMemSource: require('./src/... | javascript | chosen |
[
{
"from": "system",
"value": "Use custom error instance instead of checking the error code\n"
},
{
"from": "human",
"value": "'use strict';\nconst pMap = require('p-map');\n\nconst filter = filterer => (x, i) => Promise.resolve(filterer(x, i)).then(val => {\n\tif (!val) {\n\t\tconst err = new Er... | javascript | chosen |
[
{
"from": "system",
"value": "Remove \"message\" from default props\n"
},
{
"from": "human",
"value": "var React = require('react/addons');\n\nvar Notfication = React.createClass({\n\n /**\n * @function hide\n * @description Focus on the element.\n */\n open: function () {\n this.setS... | javascript | chosen |
[
{
"from": "system",
"value": "Add simple Template constructor to simplify code\n"
},
{
"from": "human",
"value": "module.exports = function parse(value){\n if(isTemplateString(value)){\n var parameter = Parameter(value);\n\n var template = function (context){\n if(typeof context === ... | javascript | chosen |
[
{
"from": "system",
"value": "Use object-key lookup to check for compressibility.\n\nJSPerf reports this as being 1.5+ times faster than using the regex.\n"
},
{
"from": "human",
"value": "module.exports = compressible\n\ncompressible.specs =\ncompressible.specifications = require('./specificati... | javascript | chosen |
[
{
"from": "system",
"value": "Load google-map lib on page load\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-g-map'\n};\n"
},
{
"from": "gpt",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove active state from JS\nNative method can be called even though sleep preventing flag are set. There are no drawbacks to this\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport React, { Component } from 'react';\nimport { NativeModules } from 'react-nativ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning on unlink()\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs');\nvar pictureTube = require('picture-tube');\nvar webshot = require('webshot');\n\nfunction hitThat (url, options) {\n var name = Date.now() + '_that.png'... | javascript | chosen |
[
{
"from": "system",
"value": "Disable rollbar for test env\n\nFixes #12"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\nvar merge = require('lodash-node/modern/object/merge');\nvar template = require('lodash-node/mo... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce the number of calls to isFunction\n"
},
{
"from": "human",
"value": "const isBoolean = require('is-boolean')\nconst isFunction = require('is-function')\n\nconst doWheil = (d0, wh1le) => {\n if (!isFunction(d0)) { throw new TypeError('d0 is no function!, D0 M... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test: can't rely on environment config for ember-cli-node-assets\n\n"
},
{
"from": "human",
"value": "'use strict'\n\n/**\n * @module ember-refined-faker\n */\n\n /**\n * @class config\n */\n\nmodule.exports = {\n name: 'ember-refined-faker',\n\n options: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix null and duplicated class name\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar React = require('react'),\n withSideEffect = require('react-side-effect');\n\nfunction reducePropsToState(propsList) {\n var innermostProps = propsList[propsList.length - ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace lodash each() with standard forEach()"
},
{
"from": "human",
"value": "\n'use strict';\n\nvar through = require('through2');\nvar glob = require('glob');\nvar _ = require('lodash');\n\nmodule.exports = function() {\n\n var transform = function(file, env, ... | javascript | chosen |
[
{
"from": "system",
"value": "Use non-zero exit code for usage\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n\nvar http = require('http')\nvar opn = require('opn')\nvar rc = module.require('rc')\nvar argv = require('optimist').argv\nvar config = rc('hcat', {}, argv)\n\nif (argv.usage... | javascript | chosen |
[
{
"from": "system",
"value": "Fix example and basic test\n"
},
{
"from": "human",
"value": "module.exports = function fnStringify (fn) {\n return /\\*([^*]*)\\*/.exec(fn.toString())[1].trim()\n}\n"
},
{
"from": "gpt",
"value": "module.exports = function fnStringify (fn) {\n var com... | javascript | chosen |
[
{
"from": "system",
"value": "Use Capital case for class\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar Connection = require('./lib/droonga-protocol/connection').Connection;\nvar httpAdapter = require('./lib/adapter/http');\nvar socketIoAdapter = require('./lib/adapter... | javascript | chosen |
[
{
"from": "system",
"value": "Allow enumerable to be specified\n"
},
{
"from": "human",
"value": "module.exports = function (Model) {\n\n Model.on('initialize', function (model) {\n\n Object.keys(Model.attrs).forEach(function (key) {\n var options = Model.attrs[key]\n\n if (Object.... | javascript | chosen |
[
{
"from": "system",
"value": "Use ε when detecting equirectangular case.\n"
},
{
"from": "human",
"value": "// @import parallel2\n\nfunction conicEquidistant(φ0, φ1) {\n var cosφ0 = Math.cos(φ0),\n n = φ0 === φ1 ? Math.sin(φ0) : (cosφ0 - Math.cos(φ1)) / (φ1 - φ0),\n G = cosφ0 / n + φ0... | javascript | chosen |
[
{
"from": "system",
"value": "Add styles from options logic\n"
},
{
"from": "human",
"value": "var postcss = require('postcss');\n\nmodule.exports = postcss.plugin('postcss-messages', function (opts) {\n if ( opts && opts.disabled === true ) {\n return function () { };\n }\n\n re... | javascript | chosen |
[
{
"from": "system",
"value": "Define block \"code\" for highlighting\n"
},
{
"from": "human",
"value": "var Prism = require('prismjs');\nvar cheerio = require('cheerio');\nvar path = require('path');\n\nvar prismCSS = require.resolve('prismjs/themes/prism.css');\n\nmodule.exports = {\n book: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix up grammar errors in the comments\n"
},
{
"from": "human",
"value": "(function(Backbone) {\n\n var superDelegateEvents = Backbone.View.prototype.delegateEvents;\n\n _.extend(Backbone.View.prototype, {\n\n // Hook up `listen` processing in `delegateEvents`.\... | javascript | chosen |
[
{
"from": "system",
"value": "Enable linter on spec/ folder\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst expandGlobPaths = require('./expand-glob-paths')\nconst standard = require('standard')\nconst path = require('path')\n\nconst CONFIG = require('../config')\n\nmodule.exports = fun... | javascript | chosen |
[
{
"from": "system",
"value": "Allow plain URLs, without .git at the end\n"
},
{
"from": "human",
"value": "module.exports = function(remote, url) {\n var repoPattern = /github.com(?:[:\\/])([^\\/]+)\\/(.+?)\\.git$/;\n var result = repoPattern.exec(url);\n if (!result) {\n throw n... | javascript | chosen |
[
{
"from": "system",
"value": "[DOC] Add verobse description of listProcesses.\n"
},
{
"from": "human",
"value": "var GatewayProcessManager = require(__dirname+'/../process_manager.js');\n\n/**\\\n * @requires GatewayProcessManager\n * @function listProcesses\n *\n * @description Looks into the p... | javascript | chosen |
[
{
"from": "system",
"value": "Return richer structure for the formatters\n"
},
{
"from": "human",
"value": "exports.analyze = function(stats) {\n var len = stats.length;\n var ret = {};\n\n stats.forEach(function(stat) {\n stat.result().forEach(function(item) {\n ret[item.key] = ret[i... | javascript | chosen |
[
{
"from": "system",
"value": "Update coverage threshold to 98%\n"
},
{
"from": "human",
"value": "/* eslint-disable */\n// See: https://jestjs.io/docs/en/configuration.html\n\nmodule.exports = {\n // Indicates whether the coverage information should be collected while executing the test\n coll... | javascript | chosen |
[
{
"from": "system",
"value": "Update hashing to match eagel eye\n"
},
{
"from": "human",
"value": "\nvar passport = require('passport')\nvar util = require('util')\nvar crypto = require('crypto')\nvar db = require('mongo-promise')\ndb.shortcut('clients')\n\nfunction ClientKeyStrategy() { \n thi... | javascript | chosen |
[
{
"from": "system",
"value": "Add a route for retrieval of device ID\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nlet {\n getInternetStatus,\n getLastRefresh,\n getNumberOfUsersConnected,\n getSystemMemory,\n getSystemSpace,\n getSystemCpu,\n getSystemVersion\n} = r... | javascript | chosen |
[
{
"from": "system",
"value": "Use default delay when fetching augmented diffs\n\nWhen catching up, it will fetch diffs one after another, so delay really\ncontrols how often the augmented_diff_status endpoint is hit.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n// to silence EPIPE err... | javascript | chosen |
[
{
"from": "system",
"value": "Correct typo on internal error page"
},
{
"from": "human",
"value": "/**\n * React Static Boilerplate\n * https://github.com/koistya/react-static-boilerplate\n * Copyright (c) Konstantin Tarkus (@koistya) | MIT license\n */\n\nimport React, { Component, PropTypes } ... | javascript | chosen |
[
{
"from": "system",
"value": "Save only freshly scraped judges\n"
},
{
"from": "human",
"value": "\"use strict\";\nlet _ = require('lodash');\nlet Promise = require('bluebird');\nlet writeFile = Promise.promisify(require('fs').writeFile);\n\nconst input = require(\"./input\");\n\nmodule.exports ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bad call to provide.\n"
},
{
"from": "human",
"value": "/*eslint-disable no-console */\nimport _ from \"underscore\";\nimport App from \"./App\";\nimport ProvidedAppDelegate from \"./ProvidedAppDelegate\";\nimport { defaultsWithDelegate } from \"./defaultAppArgs... | javascript | chosen |
[
{
"from": "system",
"value": "Move header logo to the left\n\nSigned-off-by: HichamELBSI <89c0764379da71f693bb6b7c10b76731e7cadd4f@gmail.com>\n"
},
{
"from": "human",
"value": "import styled from 'styled-components';\nimport PropTypes from 'prop-types';\n\nimport Logo from '../../assets/images/l... | javascript | chosen |
[
{
"from": "system",
"value": "Complete 'Closures' challenge in 'Scopes chains closures' tutorial\n"
},
{
"from": "human",
"value": "function foo() {\n var bar;\n quux = 42;\n function zip() {\n var quux = 42+42;\n }\n}\n"
},
{
"from": "gpt",
"value": "function foo() {\n var b... | javascript | chosen |
[
{
"from": "system",
"value": "Rename function to match module.\n"
},
{
"from": "human",
"value": "/*global define*/\ndefine(function() {\n \"use strict\";\n\n function createProperty(name, privateName) {\n return {\n get : function() {\n return this[private... | javascript | chosen |
[
{
"from": "system",
"value": "Update URL for new account location\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst fs = require('fs')\nconst got = require('got')\nconst path = require('path')\n\nconst downloadURL = 'https://ci.appveyor.com/api/projects/Atom/rcedit/artifacts/Defaul... | javascript | chosen |
[
{
"from": "system",
"value": "Add empty newline and copyright year\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n *\n * WSO2 Inc. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may n... | javascript | chosen |
[
{
"from": "system",
"value": "Make checkbox labels actual <label>s so they're clickable\n"
},
{
"from": "human",
"value": "\nfunction setDisplay(className, val) {\n\tvar elts = document.getElementsByClassName(className);\n\tfor (var j = 0; j < elts.length; j++) {\n\t\telts[j].style.display = val... | javascript | chosen |
[
{
"from": "system",
"value": "Disable buttons when no items\n"
},
{
"from": "human",
"value": "const {h, app} = hyperapp\n/** @jsx h */\n\n/*\n * To Do List with additional 'delete item'\n * feature that takes number of list item and\n * removes it from the list \n */\n\napp({\n state: {\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Fix passing dynamic extraHeaders to react-sip by temporary hardcoding other params\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { SipProvider } from 'react-sip';\n\nexport default ({ config, children }) => {\n if (config) {\n return (\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to avoid dynamic module resolution\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Allocate a buffer from an `ArrayBuffer`.\n*\n* @module @stdlib/buffer/from-arraybuffer\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array/buffer' );\n* va... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dots when small screen\n"
},
{
"from": "human",
"value": "const settings = {\n autoplay: true,\n infinite: true,\n dots: true,\n speed: 500,\n pauseOnHover: true,\n responsive: [\n {\n breakpoint: 100000,\n settings: {\n slidesToShow... | javascript | chosen |
[
{
"from": "system",
"value": "Fix welcoming new members using outdated functions\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst DiscordHook = require('../../../../bot/modules/DiscordHook');\n\n\nclass HookWelcomeNewMember extends DiscordHook {\n constructor(bot) {\n super(bo... | javascript | chosen |
[
{
"from": "system",
"value": "Add Google icon to Google sign in button\n\nFixes #425\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('directive.googlesignin', []).\n directive('googleSignin', function (Session, $rootScope) {\n return {\n restrict: 'E',\n template... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant import of app.js.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport 'leaflet/dist/leaflet.css'\nimport 'leaflet.markercluster/dist/MarkerCluster.css'\nimport 'react-s-alert/dist/s-alert-default.... | javascript | chosen |
[
{
"from": "system",
"value": "Update dumb component redux pattern"
},
{
"from": "human",
"value": "\nimport React, { PropTypes } from 'react'\nimport styles from './<%= pascalEntityName %>.css'\n\nconst <%= pascalEntityName %> = props => (\n <div className={styles.main}><%= pascalEntityName %><... | javascript | chosen |
[
{
"from": "system",
"value": "Use ES6 syntax to read video from props.\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst VideoListItem = (props) => {\n const video = props.video;\n\n return (\n <li>{video.snippet.title}</li>\n );\n};\n\nexport default VideoListItem;\n"... | javascript | chosen |
[
{
"from": "system",
"value": "Use `defineConstants` in webpack2 e2e test like in the webpack 1.x one\n"
},
{
"from": "human",
"value": "const webpack2 = require('../../index')\n\n// Need to write it like this instead of destructuring so it runs on Node 4.x w/o transpiling\nconst addPlugins = web... | javascript | chosen |
[
{
"from": "system",
"value": "Remove route subscription and waitOn\n"
},
{
"from": "human",
"value": "Router.route('/', function () {\n this.layout('mainLayout');\n this.render('createInvitation');\n});\n\nRouter.route('/view', function () {\n this.layout('mainLayout');\n this.render('viewAl... | javascript | chosen |
[
{
"from": "system",
"value": "Update integration test coverage threshold\n"
},
{
"from": "human",
"value": "const TEST_TYPE = ((argv) => {\n let match = argv[argv.length - 1].match(/npm\\/test-(\\w+).js/);\n\n return match && match[1] || '';\n })(process.argv);\n\nfunction confi... | javascript | chosen |
[
{
"from": "system",
"value": "Update DAO to sort PRs by committed date\n"
},
{
"from": "human",
"value": "const Repository = require(\"../models/repository\").model;\r\n\r\nmodule.exports = {\r\n createRepository: function (repo, issues, pullRequests) {\r\n return Repository.create({\r... | javascript | chosen |
[
{
"from": "system",
"value": "Change default to 0 instead of -1 for error checking\n"
},
{
"from": "human",
"value": "//The amount of pennies to be donated\nvar paymentAmount = 0;\n\nvar incrementDonation = function(amount){\n if(paymentAmount !== -1){\n paymentAmount += amount;\n }... | javascript | chosen |
[
{
"from": "system",
"value": "[refactor] Move filename option handling to js.\n"
},
{
"from": "human",
"value": "\nvar prefork = require('../build/Release/prefork').prefork;\n\nmodule.exports = prefork;\n"
},
{
"from": "gpt",
"value": "\nvar prefork = require('../build/Release/prefor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix literal detection for TemplateLiterals\n\nFix #96.\n"
},
{
"from": "human",
"value": "import * as t from \"babel-types\";\n\n// Literals and `undefined` are treated as constant values in attributes and\n// children.\nexport default function isLiteralOrSpecial(pa... | javascript | chosen |
[
{
"from": "system",
"value": "Support light JSON at import\n"
},
{
"from": "human",
"value": "angular.module('zoumProfilerApp')\n .directive('importage', function() {\n return {\n restrict: 'E',\n templateUrl: 'importage/importage.html'\n };\n })\n .c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue of login button leading to unwanted website\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport AppBar from 'material-ui/AppBar';\nimport IconButton from 'material-ui/IconButton';\nimport SVGNavMenu from 'material-ui/svg-icons/navigation/... | javascript | chosen |
[
{
"from": "system",
"value": "Format API grep return to state ready\n"
},
{
"from": "human",
"value": "function checkStatus(response) {\r\n if (response.status >= 200 && response.status < 300) {\r\n return response;\r\n } else {\r\n const error = new Error(response.statusText);\r\n er... | javascript | chosen |
[
{
"from": "system",
"value": "Add provenance type as item to reset.\n"
},
{
"from": "human",
"value": "Application.Services.factory('toggleDragButton', [toggleDragButton]);\n\nfunction toggleDragButton() {\n var service = {\n addToReview: {\n 'samples': false,\n '... | javascript | chosen |
[
{
"from": "system",
"value": "Use console.log instead of Util.puts\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Util = require('util'),\n Benchmark = require('benchmark'),\n Loud = require('../lib/loud'),\n jsdom = require('./jsdom');\n\nvar suite = new Benchmark.Suite(),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Drop use of spread operator (not supported in Safari/Edge yet).\n"
},
{
"from": "human",
"value": "export default function ClickSelectionMixin(Base) {\n return class ClickSelection extends Base {\n\n constructor(props) {\n super(props);\n this.click = ... | javascript | chosen |
[
{
"from": "system",
"value": "Move weekend days to Friday and Saturday\n"
},
{
"from": "human",
"value": "Date.prototype.toInputFormat = function() {\n\treturn [this.getFullYear(), this.getMonth() + 1, this.getDate()]\n\t\t.map(function(value) {\n\t\t\treturn value < 10 ? \"0\" + value : value;\... | javascript | chosen |
[
{
"from": "system",
"value": "Update to use session storage\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { IntlProvider } from 'react-intl';\nimport { persistStore, autoRehydrate } from 'redux-persist';\n\nimport { Provider } from 'react-redux';\nimport { createStore } f... | javascript | chosen |
[
{
"from": "system",
"value": "Use call instead of apply\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst keyCodeToEventMap = {\n 27: 'esc',\n 37: 'leftArrow',\n 39: 'rightArrow'\n};\n\nexport default Ember.Mixin.create({\n mergedProperties: ['keyEvents'],\n keyEvents: ... | javascript | chosen |
[
{
"from": "system",
"value": "Change “Powered by g0v” image to use https"
},
{
"from": "human",
"value": "import React from 'react';\n\nexport default function AppFooter() {\n return (\n <footer>\n <a href=\"http://grants.g0v.tw/power/\" target=\"_blank\">\n <img src=\"http://gra... | javascript | chosen |
[
{
"from": "system",
"value": "Use the DAP specified way"
},
{
"from": "human",
"value": "(function(){\n\n\tdohx.add({name:\"Number inputs (type=file, capture=camera)\",\n\t\tmqcExecutionOrderBaseOffset:900000, // This number is the base offset for the execution order, the test ID gets added. Nev... | javascript | chosen |
[
{
"from": "system",
"value": "Use init shortcut in embed config\n"
},
{
"from": "human",
"value": "\nvar path = require('path');\nvar express = require('express');\n\n\nvar expressAdmin = require('/home/mighty/node/modules/express-admin');\nvar dpath = path.resolve(__dirname, '../', process.argv... | javascript | chosen |
[
{
"from": "system",
"value": "Allow users to specify a custom add text as data attr\n"
},
{
"from": "human",
"value": "window.Godmin = window.Godmin || {};\n\nGodmin.SelectBoxes = (function() {\n function initialize() {\n initializeEvents();\n initializeState();\n }\n\n function initial... | javascript | chosen |
[
{
"from": "system",
"value": "Fix config value in development seed\n"
},
{
"from": "human",
"value": "const merge = require('webpack-merge');\nconst commonPreset = require('knapsack-preset-common');\nconst namedModules = require('knapsack-plugin-named-modules');\nconst caseSensitive = require('k... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary binding of action creator\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport EntityList from '../components/EntityList';\nimport { fetchEntitie... | javascript | chosen |
[
{
"from": "system",
"value": "Update warning message one last time\n"
},
{
"from": "human",
"value": "import warning from './warning';\n\nconst requestStatuses = {\n IDLE: 'IDLE',\n PENDING: 'PENDING',\n FAILED: 'FAILED',\n SUCCEEDED: 'SUCCEEDED',\n};\n\nif (process.env.NODE_ENV !== 'product... | javascript | chosen |
[
{
"from": "system",
"value": "Connect model's id to CouchDB\n"
},
{
"from": "human",
"value": "\"use strict\";\n/**\n * Model for individual books.\n */\n define([\n \"underscore\",\n \"backbone\"\n], function(_, Backbone) {\n var Book = Backbone.Model.extend({\n defaults: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update QR Code on textbox keyup\n"
},
{
"from": "human",
"value": "document.addEventListener(\"DOMContentLoaded\", function () {\n var qr_cellsize = 8;\n var qr_margin = 2 * qr_cellsize;\n var qr_levels = [\"M\", \"L\"];\n\n var createImage = function(payload) {... | javascript | chosen |
[
{
"from": "system",
"value": "Use vendor min order cost as initial value for order’s money\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n actions: {\n createOrder(vendor, account, attrs) {\n const order = this.store.createReco... | javascript | chosen |
[
{
"from": "system",
"value": "Add correct path to live API\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar API_BASE = 'http://localhost:3000/';\n\n/**\n * @ngdoc overview\n * @name perceptionClientApp\n * @description\n * # perceptionClientApp\n *\n * Main module of the application.\n */... | javascript | chosen |
[
{
"from": "system",
"value": ":racehorse: Fix memory leak in Image component prefetch\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport './image.css';\nimport placeholderImg from './placeholder.png';\nimport { prefetch } from '@utils/image.utils';\n\nclass Imag... | javascript | chosen |
[
{
"from": "system",
"value": "Add a helper function for `document.querySelector`\n"
},
{
"from": "human",
"value": "const {ipcRenderer} = require('electron');\n\nfunction isVisible(el) {\n const classList = el.classList;\n\n return !(classList.contains('invisible') || classList.contains('hidde... | javascript | chosen |
[
{
"from": "system",
"value": "Disable the update server JSON test\n"
},
{
"from": "human",
"value": "import chai from 'chai';\nimport fetch from 'node-fetch';\nimport https from 'https';\n\nchai.should();\n\ndescribe('Update Server', () => {\n it('should be online', (done) => {\n https.get('... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with match for empty string\n"
},
{
"from": "human",
"value": "var test = require('tap').test;\nvar sentiment = require('../../lib/index');\n\nvar result = sentiment(undefined);\n\ntest('synchronous undefined', function (t) {\n t.type(result, 'object');... | javascript | chosen |
[
{
"from": "system",
"value": "Use html5 data attributes to save the original content.\n"
},
{
"from": "human",
"value": "$(function() {\n $(\"td\").dblclick(function() {\n var td = $(this), OriginalContent = td.text();\n\n td.addClass(\"cellEditing\");\n td.html(\"<input type='text' va... | javascript | chosen |
[
{
"from": "system",
"value": "Improve code and remove line feed from host RegEx\n"
},
{
"from": "human",
"value": "(function() {\n var __WS_send = WebSocket.prototype.send;\n window.__WS_send = WebSocket.prototype.send;\n WebSocket.prototype.send = function(data) {\n console.log(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix trailing whitespace in components with both explicit classname and modifiers.\n"
},
{
"from": "human",
"value": "import cx from 'classnames'\nimport mapProps from 'recompose/mapProps'\n\nconst withModifiers = (classNames) =>\n mapProps((props) => {\n const n... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for special characters inside triple-quotes.\n"
},
{
"from": "human",
"value": "import check from './support/check';\n\ndescribe('string interpolation', () => {\n it('ensures backticks are escaped', () => {\n check('\"`#{name}` is required\"', '`\\\\`$... | javascript | chosen |
[
{
"from": "system",
"value": "Remove \"return response\" which can cause issues"
},
{
"from": "human",
"value": "// [START fs_schedule_export]\nconst functions = require('firebase-functions');\nconst firestore = require('@google-cloud/firestore');\nconst client = new firestore.v1.FirestoreAdminC... | javascript | chosen |
[
{
"from": "system",
"value": "Send messages more than once\n"
},
{
"from": "human",
"value": "if (process.argv.length < 7) {\n throw new Error(\"Need at least 5 command line arguments. In order, must be:\\n\" +\n \"consumer_key\\n\" + \n \"consumer_secret... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve merge. Add patrons and okapi-console modules to config\n"
},
{
"from": "human",
"value": "// Base Webpack configuration for building Stripes at the command line,\n// including Stripes configuration.\n\nconst path = require('path');\nconst webpack = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Add js code to another swift demo class.\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2017 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n name: 'RequiredClass',\n package: 'somepack... | javascript | chosen |
[
{
"from": "system",
"value": "HIPPOTHEME-7: Reset demo start page at introduction\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2014 Hippo B.V. (http://www.onehippo.com)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compli... | javascript | chosen |
[
{
"from": "system",
"value": "Load jpg and gif via file-loader\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\nconst ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\nconst extractSass = new ExtractTextPlugin({\n filename: \"... | javascript | chosen |
[
{
"from": "system",
"value": "Add new API for v0.8.0\n"
},
{
"from": "human",
"value": "// Import everything\nimport parse from './lib/parser.js'\nimport typeOf from 'ef-core/src/lib/utils/type-of.js'\nimport { mixStr } from 'ef-core/src/lib/utils/literals-mix.js'\nimport parseEft from 'eft-pars... | javascript | chosen |
[
{
"from": "system",
"value": "Add env defaults for redis config\n"
},
{
"from": "human",
"value": "exports = module.exports = {\n\n production: {\n provider : 'redis',\n options : {\n 'redis' : {\n port: 1216,\n host: '127.0.0.1',\n db: 1\n }\n }\n },\n\... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.