conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make the buttons look like buttons\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Row, Col } from 'react-bootstrap';\n\nimport API from './api';\nimport './Questions.css';\n\n\nlet Question = (props) => {\n let answer = x => API.Question.an... | javascript | chosen |
[
{
"from": "system",
"value": "feat(Lazyload): Append alt to large image from small image.\n"
},
{
"from": "human",
"value": "(function () {\n var ctrl = new ScrollMagic.Controller();\n\n $(document).ready(function () {\n $('.lazyload-wrapper').each(function () {\n var wrapper = this,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Watch stylus files for changes\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n grunt.config.set('watch', {\n livereload: {\n options: {\n livereload: true,\n },\n files: ['src/**/*.{js,css,html}'],\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for issue with `--spider-limit` without `--spider` (was limited to one url)\n"
},
{
"from": "human",
"value": "var childProcess = require( \"child_process\" );\nvar phantomjs = require( \"phantomjs-prebuilt\" );\nvar path = require( \"path\" );\n\nfunction Phant... | javascript | chosen |
[
{
"from": "system",
"value": "Switch back zoom level in the count example to 15\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar tileReduce = require('../../src');\nvar path = require('path');\n\nvar numFeatures = 0;\n\ntileReduce({\n bbox: [-122.05862045288086, 36.93768132842635, -121.9... | javascript | chosen |
[
{
"from": "human",
"value": "Add functionality for search toggles and image fade in on scroll\n"
},
{
"from": "gpt",
"value": "// Search toggle\nconst searchIcon = document.querySelector('.search label')\nconst searchInput = document.querySelector('.search input')\n\nfunction toggleSearch() {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Test moving of slider updates text\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { shallow, mount, render } from 'enzyme';\nimport Slider from '../src/slider.jsx';\nimport GoldTagLine from '../src/goldtagline.jsx'\nimport {expect} from 'chai'... | javascript | chosen |
[
{
"from": "system",
"value": "Use GitHub releases to retrieve latest non-prerelease version\n"
},
{
"from": "human",
"value": "(function() {\n\t$.getJSON(\"https://api.github.com/repos/thelounge/lounge/tags\", function(json) {\n\t\tvar first = json.shift();\n\t\tif (first.name) {\n\t\t\tvar vers... | javascript | chosen |
[
{
"from": "system",
"value": "Remove ‘test’ module and update test case to pass\n"
},
{
"from": "human",
"value": "import { getSpecialValue } from 'test';\n\ndescribe('Test', function() {\n\tit('should do what I want it to', function () {\n\t\texpect(getSpecialValue()).to.equal(10);\n\t});\n});"... | javascript | chosen |
[
{
"from": "system",
"value": "Switch Font Awesome build script to use our logger\n"
},
{
"from": "human",
"value": "/* eslint-disable no-console */\n\"use strict\";\n\nvar fs = require(\"fs-extra\");\n\nvar srcDir = \"./node_modules/font-awesome/fonts/\";\nvar destDir = \"./client/fonts/\";\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Minor Formatting Changes for Quotes Test\"\n\nThis reverts commit 129d814dcfda52d3ee3f55cfd61c7643cd90eea5.\n"
},
{
"from": "human",
"value": "var assert = require(\"assert\");\n\nvar dateFormat = require(\"./../lib/dateformat\");\n\ndescribe(\"quoted subst... | javascript | chosen |
[
{
"from": "system",
"value": "Make footer a little better.\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nfunction Footer() {\n return (\n <footer style={{height: '100px', backgroundColor: 'rgb(80, 80, 80)'}}>\n <div>\n <div style={{color: 'whitesmoke'}}>© innek... | javascript | chosen |
[
{
"from": "system",
"value": "Enable source-map, so that we can debug in the browser using the original ES2015 javascript.\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst babelModule = require('./webpack/babel-module')\nconst htmlPlugin = require('./webpack/html-plugin')\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix animations when document is scrolled\n\n- unscaling code must take scroll position into account\n"
},
{
"from": "human",
"value": "import { forIn } from 'lodash';\n\nexport default function unscaleProperties(obj, scale=1) {\n let scaledObj = {};\n forIn(obj, f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path to template served by express\n"
},
{
"from": "human",
"value": "const webpack = require('webpack');\nconst path = require('path');\nconst webpackDevMiddleware = require('webpack-dev-middleware');\nconst webpackHotMiddleware = require('webpack-hot-middlewar... | javascript | chosen |
[
{
"from": "system",
"value": "Remove semicolons and unused initializers\n"
},
{
"from": "human",
"value": "require('./lib/whatwg-fetch/fetch.js')\nrequire('./lib/kube-6.0.1/kube.min.css')\n\nimport 'react-hot-loader/patch'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Root... | javascript | chosen |
[
{
"from": "system",
"value": "Disable pull-to-refresh and overscroll glow\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport ReactDOM from 'react-dom'\nimport { createGlobalStyle } from 'styled-components'\n\nimport { App } from './App'\nimport woff2 from './fonts/source-sans-p... | javascript | chosen |
[
{
"from": "system",
"value": "Replace class component with function component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { render } from 'react-dom';\nimport Clock from 'react-live-clock';\nimport ErrorBoundary from './components/error-boundary';\nimport Favorites from... | javascript | chosen |
[
{
"from": "system",
"value": "Allow brunch server to listen on 0.0.0.0\n"
},
{
"from": "human",
"value": "exports.config = {\n npm: {\n styles: {\n 'normalize.css': ['normalize.css']\n }\n },\n\n conventions: {\n ignored: [\n /[\\\\/]_/,\n /\\.spec\\.js$/\n ]\n },\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in Famo.us require in test\n"
},
{
"from": "human",
"value": "'use strict';\nwindow.Famous = require('../node_modules/famous');\nvar test = require('tape');\n\nvar BEST = require('../lib/index');\nvar DataStore = require('../lib/data-store/data-store');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Enable Sign In, Sign Up\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { BrowserRouter as Router, Switch, Route } from 'react-router-dom'\n\nimport Home from './containers/Home';\nimport App from './container... | javascript | chosen |
[
{
"from": "system",
"value": "Fix selectors used by e2e tests\n"
},
{
"from": "human",
"value": "module.exports = {\n name: '#field-name',\n scope: '#field-scope',\n day: '#field-deadline_month',\n month: '#field-deadline_day',\n year: '#field-deadline_year',\n button: '.c-form-actions > b... | javascript | chosen |
[
{
"from": "system",
"value": "Disable debug logging for redux\n"
},
{
"from": "human",
"value": "import createLogger from 'redux-logger';\n\n// log actions in development mode\nexport default createLogger({\n collapsed: true,\n\n // only log in development mode\n predicate: () => __DEV__,\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add prettier-ignore to generated files\n\nSummary:\nWhen prettier is run on the generated files, it removes the parenthesis resulting in flow failing.\n\nAdding the prettier-ignore comment skip formatting of this line.\n\nFixes #2426\nCloses https://github.com/facebook/relay/pu... | javascript | chosen |
[
{
"from": "system",
"value": "LightDisplay: Rename `pins` option to `segments`\n"
},
{
"from": "human",
"value": "module.exports = (five) => {\n const Animation = require('./animation')(five)\n const Segment = require('./segment')(five)\n\n class LightDisplay {\n constructor (options) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the document title fix\n"
},
{
"from": "human",
"value": "/**\n * Created by wesley on 6/2/15.\n */\n\nif (Meteor.isClient) {\n\n //Router.route('/', function() {\n // this.render('homePage');\n //});\n\n Router.route('homePage', {\n path: ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary use of glob\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\nvar server = require('http').Server(app);\nvar io = require('socket.io')(server);\nvar path = require('path');\nvar glob = require('glob');\nva... | javascript | chosen |
[
{
"from": "system",
"value": "Add example text to CLI --help\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n'use strict';\n\nvar pkg = require('./package.json');\nvar shelfiesAmazonLinker = require('./');\nvar argv = process.argv.slice(2);\n\nvar copypaste = require('copy-paste').silent... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"fixed whitespacing, added comments to clarify test case\"\n\nThis reverts commit 54d900f5aec6cd9e408624aa5cf1adbb413e7e4f.\n"
},
{
"from": "human",
"value": "var tortuga = require('./../lib/tortuga.js');\nvar expect = require('chai').expect;\n\nfunction sea... | javascript | chosen |
[
{
"from": "system",
"value": "Update location services to user new dataService\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('myApp')\n.factory('locationService', ['$http', function($http) {\n\tvar locations = {};\n\tvar url = '/locations'\n\n\tlocations.getLocations = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add a template for features\n"
},
{
"from": "human",
"value": "var login = require('facebook-chat-api');\nvar users_position = new Array();\n\nlogin({email: '', password: ''}, function callback (err, api) {\n if(err)\n return console.error(err);\n\n api... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the report option \"reportLocation\"\n\nPublic interface of AccessSniff describes \"reportLocation\"; not \"location\".\n"
},
{
"from": "human",
"value": "//\n// Grunt AccessSniff Task\n// ------------------------\n\nmodule.exports = function(grunt) {\n\n var a... | javascript | chosen |
[
{
"from": "system",
"value": "Replace only not remote supplementary files.\n"
},
{
"from": "human",
"value": "import { Command } from 'substance'\n\nexport default class ReplaceSupplementaryFileCommand extends Command {\n getCommandState (params, context) {\n const xpath = params.selectionSt... | javascript | chosen |
[
{
"from": "system",
"value": "Improve split regex to include \\r\n"
},
{
"from": "human",
"value": "/**\n * Generate a blob link.\n * @param {string} file - File name\n * @param {string} contents - Contents of the file\n * @param {string} title - The title of the new issue\n * @param {string} sh... | javascript | chosen |
[
{
"from": "system",
"value": "Use app-root-dir to resolve absolute project path\n"
},
{
"from": "human",
"value": "// Contains all the configuration specific to our Server.\n// Please note that the DefinePlugin of webpack will inline/replace all the\n// respective \"process.env.*\" variables bel... | javascript | chosen |
[
{
"from": "system",
"value": "Admin: Fix pagination to calculate the correct number of pages for filtered results\n"
},
{
"from": "human",
"value": "import _ from 'lodash'\n\nconst getInfo = res => ({\n type: 'numbered',\n // need to return strings here, otherwise page 0 will evaluate to false... | javascript | chosen |
[
{
"from": "system",
"value": "Replace loaders -> rules. Edit webpack.optimize.CommonsChunkPlugin config\n"
},
{
"from": "human",
"value": "const loaders = require(\"./loaders\");\nconst webpack = require(\"webpack\");\nconst HtmlWebpackPlugin = require(\"html-webpack-plugin\");\nconst CleanWebpa... | javascript | chosen |
[
{
"from": "system",
"value": "Add util function to calculate the size of the longest rotated tick value to help determine required padding.\n"
},
{
"from": "human",
"value": "/* global window */\n\n/**\n * Measure rendered width of string\n * @param {String} str -> the string to measure\n * @par... | javascript | chosen |
[
{
"from": "system",
"value": "Add Props Modified To Replace State Edited In Text\n\nAdd props modified to replace the state edited in the text component\nsince props modified is used throw out the application.\n"
},
{
"from": "human",
"value": "let React = require(\"react\")\nlet {errorList, siz... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out projects tab note that will not apply to Expo iOS yet\n\nfbshipit-source-id: 86b1d43\n"
},
{
"from": "human",
"value": "import { User as UserManager } from 'xdl';\nimport chalk from 'chalk';\nimport log from './log';\n\nexport default async function prin... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify test task since typescript coverage is not supported\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst Task = require('../Task'),\n gulp = require('gulp'),\n mocha = require('gulp-mocha'),\n istanbul = require('gulp-istanbul'),\n ispar... | javascript | chosen |
[
{
"from": "system",
"value": "Allow client URL to be set on Docker config\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n db: {\n type: 'sqlite',\n\n // Database filename for SQLite\n filename: 'data/cpa-service-provider.sqlite',\n\n // For debugging, log SQ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor database connection for production environment.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function () {\n return {\n db: {\n development: {\n uri: 'mongodb://localhost:27017/hackshub-file-service-db',\n opti... | javascript | chosen |
[
{
"from": "system",
"value": "Initialize core before anything else gets required\n\nThat makes sure you can import e.g. `rxjs` before importing `react-native` and will not receive errors that certain APIs are missing (like `setTimeout`)\r\n\r\nCC: da39a3ee5e6b4b0d3255bfef95601890afd80709@ferrannp"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Replace tab indent with space\n"
},
{
"from": "human",
"value": "(function( $ ){\n\t\n\t$.fn.base64img = function( options ){\n\t\tvar settings = $.extend({\n //list default here\n\n }, options );\n\n\t\treturn this;\n\t}\n}( jQuery ));"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Update CORS sample middleware to match the current template the cli generator uses\n"
},
{
"from": "human",
"value": "module.exports = (function() {\n\n 'use strict';\n\n const Nodal = require('nodal');\n\n class CORSMiddleware extends Nodal.Middleware {\n\n e... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Temporary turn off the batch attachments sanitize job handler\"\n\nb51dc42a6ed78b46051f21bf086596bffa198c05\n"
},
{
"from": "human",
"value": "import monitor from 'monitor-dog';\nimport Raven from 'raven';\nimport config from 'config';\n\nimport { JobManage... | javascript | chosen |
[
{
"from": "system",
"value": "Include SQS and SNS in default services\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You\n * may not use this file ex... | javascript | chosen |
[
{
"from": "system",
"value": "Fix link test not using network model\n"
},
{
"from": "human",
"value": "var EventEmitter = require(\"events\").EventEmitter;\nvar util = require(\"util\");\nvar _ = require(\"lodash\");\nvar express = require(\"express\");\n\nfunction MockClient(opts) {\n\tthis.use... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug in rxjs 5.0.0-beta.11.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n(function (app) {\n app.View1 = ng.core\n .Component({\n template: \"<p>View {{ viewName }} loaded with the router</p>\"\n })\n .Class({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use stateless normal function over class\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport './Note.scss';\n\nexport default class Note extends React.Component {\n render() {\n const note = this.props;\n return (\n <div className=\"not... | javascript | chosen |
[
{
"from": "system",
"value": "Add volume adjustment to sound script.\n"
},
{
"from": "human",
"value": "// This will not make any noise if the file\n// ~/.arlobot/status/bequiet\n// exists\nvar beQuietFile = process.env.HOME + '/.arlobot/status/bequiet';\nvar fs = require('fs');\nfs.open(beQuiet... | javascript | chosen |
[
{
"from": "system",
"value": "Load NTLM Authentication Proxy on startup\n"
},
{
"from": "human",
"value": "import { Meteor } from 'meteor/meteor';\n\nMeteor.startup(() => {\n // code to run on server at startup\n});\n"
},
{
"from": "gpt",
"value": "import { Meteor } from 'meteor/met... | javascript | chosen |
[
{
"from": "system",
"value": "Make short-circuiting redux store optional\n"
},
{
"from": "human",
"value": "import urlQueryReducer from './urlQueryReducer';\nimport urlQueryConfig from '../urlQueryConfig';\n\n/**\n * Middleware to handle updating the URL query params\n */\nconst urlQueryMiddlewa... | javascript | chosen |
[
{
"from": "system",
"value": "Change isArgumentObj to detect plugin variable name\n"
},
{
"from": "human",
"value": "\n\nexport function isArgumentObj(fn) {\n\tif (fn.toString().match(/^[^\\(]*\\(\\s*\\{/)) {\n\t\treturn true;\n\n\t} else if (fn.toString().match(/^[^\\(]*\\(\\s*_ref\\s*\\)/)) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove default empty `vnode` hook (note: this is technically a breaking change, but very few people use this API and documentation has mentioned performing an existence check on the previous hook prior to calling it for a long time)\n"
},
{
"from": "human",
"value":... | javascript | chosen |
[
{
"from": "system",
"value": "Throw exception if dispatching undefined action type\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Dispatcher = require('flux').Dispatcher;\n\nmodule.exports = new Dispatcher();\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nvar Dispatcher =... | javascript | chosen |
[
{
"from": "system",
"value": "Fix setting up AWS config.\n"
},
{
"from": "human",
"value": "var AWS = require('aws-sdk');\nvar config;\n\ntry {\n config = require(\"./config.js\");\n} catch(e) {\n console.log(e);\n}\n\nAWS.Config({\n accessKeyId: process.env.ACCESS_KEY_ID || config.accessKeyI... | javascript | chosen |
[
{
"from": "system",
"value": "Increase mocha timeout to reduce flakyness in CI\n"
},
{
"from": "human",
"value": "import { plugins } from './rollup.config'\nimport istanbul from 'rollup-plugin-istanbul'\n\nexport default config => config.set({\n frameworks: ['mocha', 'chai', 'sinon', 'sinon-cha... | javascript | chosen |
[
{
"from": "system",
"value": "Add rootCollection option to SkinGridStore.exist\n"
},
{
"from": "human",
"value": "var GridStore = require('mongodb').GridStore;\n\n/**\n * @param filename: filename or ObjectId\n */\nvar SkinGridStore = exports.SkinGridStore = function(skinDb) {\n this.skinDb = ... | javascript | chosen |
[
{
"from": "system",
"value": "Use canvas width and height\n"
},
{
"from": "human",
"value": "(function(codefest){\n console.log('Get Ready!');\n\n var canvas = document.getElementById('viewport');\n canvas.width = 640;\n canvas.height = 480;\n var context = canvas.getContext('2d')... | javascript | chosen |
[
{
"from": "system",
"value": "Reformat library to pull functions in from global scope.\n"
},
{
"from": "human",
"value": "(function(context) {\n\tvar event = new Event('network-ready');\n\tcontext.ajax = function(url, data, callback) {\n\t\tif (typeof data === 'function') {\n\t\t\tcallback = dat... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant check for obj.__context\n"
},
{
"from": "human",
"value": "var Context = require('../context');\n\nfunction getContext(obj) {\n if (!obj) {\n return;\n }\n\n if (obj instanceof Context) {\n return obj;\n }\n\n if (obj.context instanceof C... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Set a default count value of Bottom Tab\n"
},
{
"from": "human",
"value": "'use strict';\n\nclass BottomTab extends HTMLElement{\n\n prepare(name) {\n this.name = name\n this.attached = false\n this.active = false\n this.classList.add('linter-tab'... | javascript | chosen |
[
{
"from": "system",
"value": "Add a beforeCreate() hook to automatically add a UUID\n"
},
{
"from": "human",
"value": "// Person class\n\nvar databank = require('databank'),\n Identifier = require('./Identifier'),\n DatabankObject = databank.DatabankObject;\n\nvar Person = DatabankObject.s... | javascript | chosen |
[
{
"from": "system",
"value": "Increase interval and run the initial service call as soon as the controller loads.\n"
},
{
"from": "human",
"value": "\nangular.module('ls_battle')\n.controller('MainController', mainCtrl);\n\nfunction mainCtrl($http,$timeout,$scope){\n\n var self = this;\n\n sel... | javascript | chosen |
[
{
"from": "system",
"value": "Use extraPaths configuration for browserify\n"
},
{
"from": "human",
"value": "module.exports = function(gulp, settings) {\n var appBundlerFn = require(\"./util-bundlers.js\")(gulp, settings).appBundlerFn;\n\n /**\n * Run all test build tasks.\n **/\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up function examples in JS\n"
},
{
"from": "human",
"value": "import assert from 'assert';\n\n// We don't have to name functions to call them\nassert((x => x + 5)(10) === 15);\n\n// We can assign function values to variables\nlet square = x => x * x;\nlet odd ... | javascript | chosen |
[
{
"from": "system",
"value": "Use typedef to define the type of GlobalWorkerOptions.\n"
},
{
"from": "human",
"value": "/* Copyright 2018 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Licen... | javascript | chosen |
[
{
"from": "system",
"value": "Include dummy filter value to the config\n"
},
{
"from": "human",
"value": "/**\n * Storage (save data to localStorage)\n */\n\nvar config = {};\n\nvar storage = {\n set : function (key, value, stringify) {\n var isChanged = config.hasOwnProperty(key) && (config... | javascript | chosen |
[
{
"from": "system",
"value": "Add keyboard shortcut for saving.\n"
},
{
"from": "human",
"value": "import SaveCommand from './SaveCommand'\n\nexport default {\n name: 'persistence',\n configure: function(config) {\n config.addCommand('save', SaveCommand, {\n commandGroup: 'persistence'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix \"Edge for Android\" compatibility\n"
},
{
"from": "human",
"value": "module.exports = {\n browsers: [\n // These are the browsers we actually are attempting to support:\n 'last 2 Chrome versions',\n 'last 1 Firefox version',\n 'Firefox ESR',\n '... | javascript | chosen |
[
{
"from": "system",
"value": "Define paths inside of function.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst _ = require('lodash');\nconst Fun = require('./function');\nconst pathToControllers = process.env.NODE_ENV === 'test' ? '../test/fixtures/controllers/' : '../../app/controller... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment to debug line\n"
},
{
"from": "human",
"value": "'use strict'\n\nlet routes = function(server, app) {\n server.route({\n method: 'POST',\n path: '/alexa',\n config: {\n handler: function(request, response) {\n let retVal = app.handl... | javascript | chosen |
[
{
"from": "system",
"value": "Compress even if payload is small\n"
},
{
"from": "human",
"value": "const Promise = require('bluebird');\nconst pathLib = require('path');\nconst express = require('express');\nconst compression = require('compression');\nconst tiles = require('./tiles');\nconst in... | javascript | chosen |
[
{
"from": "system",
"value": "Change the comment from timestamp plugin to addCreatedAndModified plugin"
},
{
"from": "human",
"value": "var vows = require('vows')\n , assert = require('assert')\n , mongoose = require('mongoose')\n , timestamp = require('../lib/addCreatedAndModified')\n , uti... | javascript | chosen |
[
{
"from": "system",
"value": "Load viz and place on goal\n"
},
{
"from": "human",
"value": "\n//When page loadded, read data and URL state, if any\n$( document ).ready(load_data());\n\nfunction page_main(){\n add_goals_sidebar();\n add_goals();\n}\n\nfunction add_goals_sidebar(){\n $('#sideba... | javascript | chosen |
[
{
"from": "system",
"value": "Rename the resultant CSS file to fix the empty demo problem\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n sass = require('gulp-sass'),\n neat = require('node-neat'),\n styleguide = require('./lib/styleguide'),\n source = 'lib/app/**/*.scss',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add loading bar to overall app\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react'\nimport {connect} from 'react-redux'\nimport Nav from './shared/Nav'\n\nclass App extends Component {\n render () {\n return (\n <div>\n <Nav log... | javascript | chosen |
[
{
"from": "system",
"value": "Implement getCols(), getRows() and Constructor.\n"
},
{
"from": "human",
"value": "function GameOfLife(params) {\n params = params || {};\n}\n\nGameOfLife.prototype.getCols = function() {\n}\n\nGameOfLife.prototype.getRows = function() {\n}\n\nmodule.exports = Game... | javascript | chosen |
[
{
"from": "system",
"value": "Add bearer to qp token\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar authHeader = require('auth-header');\nvar tokenUtils = require('./token');\n\nmodule.exports = function (options) {\n return function (req, res, next) {\n var authorization = req.get(... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused jobs state property refetchPage\n\n"
},
{
"from": "human",
"value": "import {\n WS_INSERT_JOB,\n WS_UPDATE_JOB,\n WS_REMOVE_JOB,\n FIND_JOBS,\n GET_JOB,\n GET_RESOURCES,\n GET_LINKED_JOB\n} from \"../app/actionTypes\";\nimport { up... | javascript | chosen |
[
{
"from": "system",
"value": "Update to work with new Geostore API\n"
},
{
"from": "human",
"value": "define([\n 'Class', 'uri', 'bluebird',\n 'map/services/DataService'\n], function(Class, UriTemplate, Promise, ds) {\n\n 'use strict';\n\n var GET_REQUEST_ID = 'GeostoreService:get',\n S... | javascript | chosen |
[
{
"from": "system",
"value": "Add og:site_name to opengraph parser"
},
{
"from": "human",
"value": "(function() {\n var OgpParser;\n\n OgpParser = (typeof exports !== \"undefined\" && exports !== null) && exports || (this.OgpParser = {});\n\n OgpParser.execute = function($) {\n return {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Completed Event to Piece Bank\n"
},
{
"from": "human",
"value": "var banks = {};\n\nmodule.exports = function(infoHash) {\n\t\n\tvar newObj = {};\n\t\n\tnewObj.create = function(engine) {\n\t\tbanks[engine.infoHash] = {\n\t\t\tdownloaded: 0,\n\t\t\ttotal: engine... | javascript | chosen |
[
{
"from": "system",
"value": "Make fake error id more recognizable\n"
},
{
"from": "human",
"value": "var buster = typeof window !== 'undefined' ? window.buster : require('buster');\nvar unhandledRejection = require('../lib/decorators/unhandledRejection');\n\nbuster.testCase('unhandledRejection'... | javascript | chosen |
[
{
"from": "system",
"value": "Add newline to end of file.\n"
},
{
"from": "human",
"value": "var match = function(message)\n{\n return (message.text.toLowerCase().indexOf(\"calculate\") == 0 );\n}\n\nvar calculate = function(message)\n{\n text = message.text;\n return text;\n}\n\nmodule... | javascript | chosen |
[
{
"from": "system",
"value": "Change forEach for some loop\n"
},
{
"from": "human",
"value": "export const initialState = {\n isOpen: false,\n requiredError: false,\n downloadUrl: '',\n downloadSize: ''\n};\n\nconst setModalDownloadParams = (state, { payload }) => ({\n ...state,\n isOpen: ... | javascript | chosen |
[
{
"from": "human",
"value": "Set Up New Event Handlers To Watch Button Clicks\n"
},
{
"from": "gpt",
"value": "function Controller (view){\n var user_questions = [];\n this.view = view;\n\n $.ajax({\n url: '/questions/index',\n method: 'GET',\n dataType: 'json'\n }).done(function(da... | javascript | chosen |
[
{
"from": "system",
"value": "[WEB-819] Fix getFieldsMeta util to recurse into nested fields\n"
},
{
"from": "human",
"value": "import includes from 'lodash/includes';\nimport map from 'lodash/map';\nimport reduce from 'lodash/reduce';\nimport keys from 'lodash/keys';\nimport isEmpty from 'lodas... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve webpack-dev-server output filename error\n\n```\nERROR in chunk [file] [entry]\nCannot use [chunkhash] or [contenthash] for chunk in 'js/[name]-[contenthash].js' (use [hash] instead)\n```\n\nOverride the base config output filename and resolve the above error in chunk\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add license comment for test file mock.\n"
},
{
"from": "human",
"value": "export default 'test-file-stub';\n"
},
{
"from": "gpt",
"value": "/**\n * Test file mock.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache L... | javascript | chosen |
[
{
"from": "system",
"value": "Remove function import and call\n"
},
{
"from": "human",
"value": "import resolver from './helpers/resolver';\nimport registerSelectHelper from './helpers/register-select-helper';\nregisterSelectHelper();\nimport {\n setResolver\n} from 'ember-qunit';\nimport { sta... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Fix t.answer is not a function \n\n"
},
{
"from": "human",
"value": "import { chaynsInfo } from '../../chayns-info';\n\nexport default function getGlobalData(req, res) {\n if (chaynsInfo) {\n const data = chaynsInfo.getGlobalData();\n res.answ... | javascript | chosen |
[
{
"from": "system",
"value": "Check dashboard stubs based on page-type\n\nInstead of maintaining a regex of blacklisted files, just assume anything that isn't a dashboard isn't a dashboard.\n"
},
{
"from": "human",
"value": "var fs = require('fs'),\n path = require('path'),\n _ = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Use CSS styling to proportionally resize the iFrame\n\nUse the notebook aspect ratio to determine padding for the iFrame container. This\nkeeps the proportions of the JupyterLab Notebook, avoids the delay caused by\ncalculating the height, and seems to work smoothly across brow... | javascript | chosen |
[
{
"from": "system",
"value": "Use uuid for uploaded file name.\n\nCreate a random file name based on uuid v4. Prepend the current user's id to\nthe front of this name. This should ensure we don't have file collisions.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar _ = require('underscor... | javascript | chosen |
[
{
"from": "system",
"value": "Add unmigratedDocumentQuery to test migration\n"
},
{
"from": "human",
"value": "import { Comments } from '../../lib/collections/comments'\nimport { registerMigration, migrateDocuments } from './migrationUtils';\n\n\nregisterMigration({\n name: \"testCommentMigrati... | javascript | chosen |
[
{
"from": "system",
"value": "[FIX] Test was running too fast, delaying more\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport startApp from '../../helpers/start-app';\nimport {TRANSPARENT_PIXEL} from 'dummy/utils/img-manager/img-clone-holder';\nimport '../../helpers/later';\... | javascript | chosen |
[
{
"from": "system",
"value": "Implement optionally running header components only on column change\n"
},
{
"from": "human",
"value": "import { select } from 'd3-selection'\n\nexport function createRunHeaderComponents() {\n\n function runHeaderComponents(s) {\n s.selectAll('.zambezi-grid-head... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.