conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update test to check for required chrome values\n"
},
{
"from": "human",
"value": "var detect = require('rtc-core/detect');\nvar extend = require('cog/extend');\nvar test = require('tape');\nvar expect = require('./helpers/expect-constraints');\n\nfunction mozMediaS... | javascript | chosen |
[
{
"from": "system",
"value": "Modify date created display format to DD.MM.YYYY\n"
},
{
"from": "human",
"value": "Template.wishItem.helpers({\n dateOfWish() {\n var data = Template.instance().data;\n return moment().format('LLLL');\n }\n});\n"
},
{
"from": "gpt",
"value": "Te... | javascript | chosen |
[
{
"from": "system",
"value": "Disable Typus.setConfirmUnload(true). It now fires in places where it shouldn’t (search, filtering), making the tool annoying."
},
{
"from": "human",
"value": "$(document).ready(function() {\n\n // $(\"#quicksearch\").searchField();\n\n $(\".resource :input\",... | javascript | chosen |
[
{
"from": "system",
"value": "Remove single and dblick mess use .toggleClass\n"
},
{
"from": "human",
"value": "const elements = document.querySelectorAll('bracket-less');\nlet clicks = 0;\nlet timer = null;\n\nfunction expandBrackets(e) {\n e.innerHTML = e.dataset.bracketless;\n e.classList.t... | javascript | chosen |
[
{
"from": "system",
"value": "Use Link component instead of anchors to play nice with routes.\n\n"
},
{
"from": "human",
"value": "/**\n * Poster v0.1.0\n * A React webapp to list upcoming movies and maintain a watchlist, powered by TMDb\n *\n * Author: Kushal Pandya <kushalspandya@gmail.com> (h... | javascript | chosen |
[
{
"from": "system",
"value": "Fix prematurely firing reviewLinker directive\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nangular.module('arethusa.review').directive('reviewLinker', [\n 'review',\n 'translator',\n function(review, translator) {\n return {\n restrict: 'A',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console logs for PR\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n angular.module('Tombola.Games.Bingo90.Core')\n .service('LoginConverter', [\n function () {\n var me = this;\n\n me.c... | javascript | chosen |
[
{
"from": "system",
"value": "Use defineConfiguration in main route\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nangular.module('arethusa.core').constant('MAIN_ROUTE', {\n controller: 'MainCtrl',\n template: '<div ng-include=\"template\"></div>',\n resolve: {\n loadConfiguration: ... | javascript | chosen |
[
{
"from": "system",
"value": "Change to selected tab if it's in another window\n"
},
{
"from": "human",
"value": "function makeListWithArray(array) {\n var list = document.createElement('ul');\n list.id = 'results_list';\n\n for (var i = 0; i < array.length; i++) {\n var item = document.cr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix email sending to address\n"
},
{
"from": "human",
"value": "const emailHelper = require('../../../helpers/email');\n\nmodule.exports = async({ address, template, vars }) => {\n return await emailHelper.send({ email: address, template, vars });\n};\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Add filterOpts for listing messages\n"
},
{
"from": "human",
"value": "// Download the Node helper library from twilio.com/docs/node/install\n// These vars are your accountSid and authToken from twilio.com/user/account\nvar accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXX... | javascript | chosen |
[
{
"from": "system",
"value": "Create stage config from modal\n"
},
{
"from": "human",
"value": "export default ['$scope', '$http', '$uibModalInstance', function($scope, $http, $uibModalInstance) {\n\n console.log('scope', $scope)\n\n $http\n .get('/api/stage-types')\n .then(res => $scope... | javascript | chosen |
[
{
"from": "system",
"value": "Add a check on region to avoid looping for that.\n"
},
{
"from": "human",
"value": "\nvar sqs = require('./lib/sqs'),\n assert = require('assert');\n\nfunction queue(options) {\n 'use strict';\n\n assert(options, 'missing options');\n assert(options.queueUrl, ... | javascript | chosen |
[
{
"from": "system",
"value": "Use angular.isArray() for better IE8 support"
},
{
"from": "human",
"value": "/**\n * Created by Zack Boman on 1/31/14.\n * http://www.zackboman.com or tennisgent@gmail.com\n */\n\n'use strict';\n\n(function(){\n\n var mod = angular.module('routeStyles', ['ngRout... | javascript | chosen |
[
{
"from": "system",
"value": "Create PUT route (same as PATCH for now).\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst router = new (require('express')).Router()\n\nconst mw = require('./middleware')\n\nconst { isAdmin } = require('midwest-module-membership/passport/authorization-middl... | javascript | chosen |
[
{
"from": "system",
"value": "Remove data field from route, not sure how to use it yet\n"
},
{
"from": "human",
"value": "Router.route('/', function() {\n this.render('home');\n});\n\nRouter.route('/register', function() {\n this.render('register');\n});\n\nRouter.route('/login', function() {\... | javascript | chosen |
[
{
"from": "system",
"value": "Make the dark theme for JavaScript look a bit like Monokai.\n"
},
{
"from": "human",
"value": "module.exports = {\n name: 'dark-syntax-theme',\n installInto: function (pen) {\n pen.installTheme('html', {\n jsComment: 'gray',\n jsFu... | javascript | chosen |
[
{
"from": "system",
"value": "Allow options to be set with environment variables in lambda\n\nPrior to this commit, the way to customize your installation of\necho-sonos was to make a copy of the options.example.js and hand\nedit it for your setup.\n\nAfter this commit, the way to customize your installatio... | javascript | chosen |
[
{
"from": "system",
"value": "Use let and const instead of var\n"
},
{
"from": "human",
"value": "module.exports = {\n getRequest: (url, callback) => {\n var request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.onload = () => {\n if (request.status >= 200 &&... | javascript | chosen |
[
{
"from": "system",
"value": "Include the named-blocks polyfill compiler in the storybook babel options\n"
},
{
"from": "human",
"value": "/* eslint-env node */\nmodule.exports = {\n presets: [\n [\n '@babel/preset-env',\n {\n shippedProposals: true,\n useBuiltIns: 'u... | javascript | chosen |
[
{
"from": "system",
"value": "Put Box around 'Software is up-to-date'\n\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { connect } from \"react-redux\";\nimport styled from \"styled-components\";\nimport { pushState } from \"../../app/actions\";\nimport { Icon } from \".... | javascript | chosen |
[
{
"from": "system",
"value": "Move statement to 2 lines\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar path = require('path');\nvar favicon = require('serve-favicon');\nvar logger = require('morgan');\nvar cookieParser = require('cookie-parser');\n\nvar bodyParser = re... | javascript | chosen |
[
{
"from": "system",
"value": "Return current handlebars instance from noConflict\n\nFixes wycats/handlebars-site#131"
},
{
"from": "human",
"value": "/* global window */\nexport default function(Handlebars) {\n /* istanbul ignore next */\n let root = typeof global !== 'undefined' ? global : wi... | javascript | chosen |
[
{
"from": "system",
"value": "Add order by to individual capacity query\n"
},
{
"from": "human",
"value": "const config = require('../../../knexfile').web\nconst knex = require('knex')(config)\n\nmodule.exports = function (id, fromDate, toDate) {\n return knex('workload_points_calculations')\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Clear warnings for externals with Rollup.\n\nSilences warnings in the console for now, but in the long term we\nshould update @glimmer/build to allow passing rollup-plugin-node-builtins\nand rollup-plugin-node-resolve (and possibly rollup-plugin-commonjs).\n"
},
{
"from... | javascript | chosen |
[
{
"from": "system",
"value": "Add pages to admin UI menu\n"
},
{
"from": "human",
"value": "'use strict';\nvar express = require('express');\nvar co = require('collections-online');\n\n// This allows loading of environment variables from a .env file\nrequire('dotenv').config({silent: true});\n//... | javascript | chosen |
[
{
"from": "system",
"value": "Clean of sample xml result\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar xml = require('xml');\nvar app = express();\nvar suncalc = require('suncalc');\nvar mongoose = require('mongoose');\n\nmongoose.connect('mongodb://localhost/sunrised... | javascript | chosen |
[
{
"from": "system",
"value": "Fix frontend test by adding a mising injection\n"
},
{
"from": "human",
"value": "import { expect } from 'chai';\nimport { describe, it } from 'mocha';\nimport { setupTest } from 'ember-mocha';\n\ndescribe('Unit | Route | visualize/graph', function() {\n setupTest(... | javascript | chosen |
[
{
"from": "system",
"value": "Allow defining addon position for InputGroups\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport styles from './input-group.scss';\n\nfunction InputGroup({className, children, addo... | javascript | chosen |
[
{
"from": "system",
"value": "Send response on proxy timeout\n"
},
{
"from": "human",
"value": "'use strict'; // jshint node: true, browser: false, esnext: true\nvar proxy = require('http-proxy').createProxyServer({});\nvar express = require('express');\nvar app = express();\n\n// Configur... | javascript | chosen |
[
{
"from": "system",
"value": "Set updatedAt field only on fields modification\n"
},
{
"from": "human",
"value": "events = {};\n\nevents.beforeInsert = function() {\n // Find a class on which the behavior had been set.\n var behaviorData = Astro.utils.findBehavior(this.constructor, 'timestamp')... | javascript | chosen |
[
{
"from": "system",
"value": "Update property value to include single quotes\n\nCo-authored-by: Michael[tm] Smith <a17fed27eaa842282862ff7c1b9c8395a26ac320@w3.org>"
},
{
"from": "human",
"value": "class ClassWithStaticMethod {\n\n static staticProperty = \"someValue\";\n static staticMethod() ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error message so they display something useful\n"
},
{
"from": "human",
"value": "import { bindable } from 'aurelia-framework';\n\nexport class UiErrorMessageCustomElement {\n @bindable errorSource;\n\n errorSourceChanged() {\n if (this.errorSource)... | javascript | chosen |
[
{
"from": "system",
"value": "Update latency calculating mechanism to return latency is half of rtt\n"
},
{
"from": "human",
"value": "\nfunction Player (name, roomId, playerId, color, socket, socketId) {\n\tthis.name = name;\n\tthis.roomId = roomId;\n\tthis.playerId = playerId;\n\tthis.color = ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the OnePassword.storeLoginForUrl method params"
},
{
"from": "human",
"value": "var exec = require('cordova/exec');\nvar cordova = require('cordova');\n\nfunction OnePassword() {\n\n}\n\nOnePassword.prototype.findLoginForUrl = function (success, error, url) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for presence of addHandler and removeHandler.\n"
},
{
"from": "human",
"value": "/*global jest, jasmine, describe, it, expect*/\n\njest.dontMock('../');\n\nvar hotkey = require('../');\n\ndescribe('exports', function() {\n it('should provide activate fu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix strict quality check and extra }"
},
{
"from": "human",
"value": "var keystone = require('../../../');\n\tvar signin = keystone.get('signin redirect') || 'signin';\n\tif (signin != 'signin') {\n\t\tres.redirect(signin);\n\t} else {\n\t\tkeystone.render(req, res,... | javascript | chosen |
[
{
"from": "system",
"value": "Make ajax have constant latency\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nvar express = require('express');\nvar simpleFsRest = require('simple-fs-rest');\nvar app = express();\n\nvar MAX_TIME = 100;\n\n// Link the REST Service to anything under /api. ... | javascript | chosen |
[
{
"from": "system",
"value": "FIX Use port from environment\n"
},
{
"from": "human",
"value": "var app = require('express')();\nvar http = require('http').Server(app);\nvar io = require('socket.io')(http);\n\n//Deliver index.html with client javascript code\napp.get('/', function(req, res){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use the ncp npm module to copy lessc.js to the root directory\n"
},
{
"from": "human",
"value": "var fs = require('fs');\n\nfunction copyFile(source, target) {\n console.log('Copying ' + source + ' to ' + target + '...');\n return new Promise(function(resolve, rej... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug wih anti-flood, now using from, not author\n"
},
{
"from": "human",
"value": "// This is called on every message. It can reject a message, or transform it, or let it through.\n\nexport default class MessageProxy {\n\tlastMessage = {}\n\tspamInterval = 1000\n... | javascript | chosen |
[
{
"from": "system",
"value": "Validate resource schema are valid on startup\n"
},
{
"from": "human",
"value": "'use strict'\nconst schemaValidator = module.exports = { }\n\nschemaValidator.validate = function (resources) {\n Object.keys(resources).forEach(resource => {\n Object.keys(resource... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Simplify webpack image loading\"\n\nThis reverts commit 66322ccce2219656114bbc2697cc21956366c1f0.\n"
},
{
"from": "human",
"value": "const ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst glob = require(\"glob\");\n\nmodule.exports = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move errorToString to global scope, because it's also used by another module and useful for manual reduction\n"
},
{
"from": "human",
"value": "function aC(r, n) { if (r) { r.appendChild(n); } else { dumpln(\"aC->rM\"); rM(n); } }\nfunction iB(r, n) { if (r) { r.par... | javascript | chosen |
[
{
"from": "system",
"value": "Add test cases to Sum of Multiples\n"
},
{
"from": "human",
"value": "var SumOfMultiples = require('./sum-of-multiples');\n\ndescribe('SumOfMultiples', function () {\n it('to 1', function () {\n expect(SumOfMultiples().to(1)).toBe(0);\n });\n\n xit('to 3', fun... | javascript | chosen |
[
{
"from": "system",
"value": "feat(lib): Add missing top level properties\n"
},
{
"from": "human",
"value": "import Joi from 'joi'\nimport moduleSchema from './properties/module'\n\nexport const schema = Joi.object({\n module: moduleSchema,\n resolve: Joi.any(),\n output: Joi.any(),\n entry:... | javascript | chosen |
[
{
"from": "system",
"value": "Add Store prop to main module.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n@module storex\n*/\nmodule.exports = {\n\t// Folders.\n\tActions: require('./actions'),\n\t// Files.\n\tAction: require('./action'),\n\tcreateStore: require('./createStore')\n};\... | javascript | chosen |
[
{
"from": "system",
"value": "Use code splitting to pack editor and dependencies in own chunk\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { createStore } from 'redux'\nimport { Provider } from 'react-redux'\nimport rootReducer from './... | javascript | chosen |
[
{
"from": "system",
"value": "Add breaking error to test slack notifications on error\n"
},
{
"from": "human",
"value": "module.exports.sayHello = function (name) {\n return \"Hello \" + name + \".\"\n};\n"
},
{
"from": "gpt",
"value": "module.exports.sayHello = function (name) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Use hash history for react-router.\n\nThis avoids the need for special route configuration on the web server.\n"
},
{
"from": "human",
"value": "/* eslint-disable import/default */\n\nimport React from 'react';\nimport {render} from 'react-dom';\nimport { Provider }... | javascript | chosen |
[
{
"from": "system",
"value": "Add new stuff to main export\n"
},
{
"from": "human",
"value": "import Button from './Button';\nimport ButtonGroup from './ButtonGroup';\nimport Card from './Card';\nimport Dialog from './Dialog/Dialog';\nimport DialogContent from './Dialog/DialogContent';\nimport D... | javascript | chosen |
[
{
"from": "system",
"value": "Add name property to plugin object\n"
},
{
"from": "human",
"value": "/* eslint-disable no-console */\nimport { createFilter } from 'rollup-pluginutils';\nimport { resolve } from 'source-map-resolve';\nimport { readFile } from 'fs';\nimport { promisify } from './uti... | javascript | chosen |
[
{
"from": "system",
"value": "Reset files when an error is thrown\n"
},
{
"from": "human",
"value": "var execSync = require('child_process').execSync;\nvar Interactive = require('./interactive');\n\nfunction GitAddAndCommit(options) {\n\tif (options.help) {\n\t\tconsole.log('help screen');\n\t} ... | javascript | chosen |
[
{
"from": "system",
"value": ":racehorse: Use some best practices\nLearnt from the node.js core peeps\n"
},
{
"from": "human",
"value": "'use babel'\n\n/* @flow */\n\nmodule.exports = function promisify(callback: Function): Function {\n return function promisified(){\n const parameters = arg... | javascript | chosen |
[
{
"from": "system",
"value": "Raise the timeout limit for slow banking modules;\n"
},
{
"from": "human",
"value": "import americano from 'americano';\nimport path from 'path-extra';\n\nimport { makeLogger } from './helpers';\n\nlet log = makeLogger('index');\n\nlet application = (options = {}, c... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing exports for backwardConnectionArgs and forwardConnectionArgs"
},
{
"from": "human",
"value": "/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENS... | javascript | chosen |
[
{
"from": "system",
"value": "Implement the basic loading mechanism\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst {PropTypes} = React;\nconst {span} = React.DOM;\n\nconst Status = {\n PENDING: 'pending',\n LOADING: 'loading',\n LOADED: 'loaded',\n FAILED: 'failed',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Set target to _blank for all hyperlinks in the post content\n"
},
{
"from": "human",
"value": "import Parallax from './js/parallax';\nimport Share from './js/share';\n\nrequire('./sass/main.scss');\n\n/**\n * Enable parallax for the post list\n */\nArray.prototype.f... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure no return value is resolved\n"
},
{
"from": "human",
"value": "// Loaded ready states\nconst loadedStates = ['interactive', 'complete'];\n\n// Return Promise\nconst whenDomReady = (cb, doc) => new Promise(resolve => {\n\t// Allow doc to be passed in as the... | javascript | chosen |
[
{
"from": "system",
"value": "Fix not implemented return value\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* eslint no-unused-vars: 0 */\n\nmodule.exports.read = function read( toFind ) {\n // TODO: hit bucket and read\n\n return Promise.reject({ code: 501, message: 'Not implement... | javascript | chosen |
[
{
"from": "system",
"value": "Update the copyright from 2009 to 2010.\n"
},
{
"from": "human",
"value": "/*!\n * jQuery JavaScript Library v@VERSION\n * http://jquery.com/\n *\n * Copyright 2009, John Resig\n * Dual licensed under the MIT or GPL Version 2 licenses.\n * http://docs.jquery.com/Lic... | javascript | chosen |
[
{
"from": "system",
"value": "Update perf scripts to use browserify rather than gulp-browserify.\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar build = require('./../gulp-build');\nvar rename = require('gulp-rename');\nvar concat = require('gulp-concat');\nvar browserify = r... | javascript | chosen |
[
{
"from": "system",
"value": "Change copy and test link placement on homepage\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Link } from 'react-router-dom';\nimport Logo from './Logo.js';\n\nclass Home extends Component {\n render(){\n return (\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use Chrome only for browser testing\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n config.set({\n browsers: ['Chrome', 'Firefox'],\n frameworks: ['mocha'],\n reporters: ['mocha'],\n\n files: ['test/*.js'],\n\n preprocessors:... | javascript | chosen |
[
{
"from": "system",
"value": "Return empty obj by default\n"
},
{
"from": "human",
"value": "module.exports = function mkobj(obj, ...props) {\n if (Array.isArray(obj)) {\n props.unshift(obj);\n\n // eslint-disable-next-line no-param-reassign\n obj = {};\n }\n\n props.forEach((prop) =... | javascript | chosen |
[
{
"from": "human",
"value": "Add sql queries for listing guests, listing all rooms, & list available rooms\n"
},
{
"from": "gpt",
"value": "const pgPromise = require('pg-promise')\nconst pgp = pgPromise()\nconst db = pgp(`postgres://${process.env.USER}@localhost:5432/hotel_db`)\n\nconst listGues... | javascript | chosen |
[
{
"from": "system",
"value": "Check if process.env is defined\n"
},
{
"from": "human",
"value": "/* eslint-disable react/prop-types */\nimport React from \"react\"\nimport { shallowEqual } from \"./utils/utils\"\n\nexport const MobXProviderContext = React.createContext({})\n\nexport function Pro... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Color from Global Scope\n"
},
{
"from": "human",
"value": "Colorize = {};\n\nColorize.red = function(text) {\n return \"\\033[1;31m\" + text + \"\\033[0m\";\n}\n\nColorize.green = function(text) {\n return \"\\033[1;32m\" + text + \"\\033[0m\";\n}\n\nColori... | javascript | chosen |
[
{
"from": "system",
"value": "Fix url to service worker\n"
},
{
"from": "human",
"value": "import HomeAssistant from '../home-assistant-js/src/index';\n\nconst hass = new HomeAssistant();\n\nwindow.validateAuth = function validateAuth(authToken, rememberAuth) {\n hass.authActions.validate(authT... | javascript | chosen |
[
{
"from": "system",
"value": "Update externals so that global entry point works in UMD\n"
},
{
"from": "human",
"value": "'use strict';\nvar extend = require('xtend');\n\nvar common = require('./webpack.common');\n\n\nmodule.exports = extend(common, {\n entry: './lib/index',\n externals: {... | javascript | chosen |
[
{
"from": "system",
"value": "Change class to a non-semantic javascript one\n"
},
{
"from": "human",
"value": "define([\n 'jquery',\n 'underscore',\n 'backbone',\n 'vm',\n\t'events',\n 'text!templates/layout.html'\n], function($, _, Backbone, Vm, Events, layoutTemplate){\n var AppView = Ba... | javascript | chosen |
[
{
"from": "system",
"value": "Add HTMLElement ($.create()) creation feature\n"
},
{
"from": "human",
"value": " dom = function (els) {\n var _i;\n\n for (_i = 0; _i < els.length; _i+=1) {\n this[_i] = els[_i];\n }\n\n this.length = els.length;\n };\n"
},
{
"from": "gpt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix molecule offset on mobile devices.\nUse renderer size instead of canvas'\n"
},
{
"from": "human",
"value": "\n\nimport * as THREE from 'three';\n\nfunction Axes(target, targetCamera) {\n this._target = target;\n this._targetCamera = targetCamera;\n this._came... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Ensure store[uniqueId].path is defined\"\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar through = require('through2');\nvar stream = require('stream');\nvar File = require('vinyl');\n\nmodule.exports = new NgStore();\n\nfunction NgStore() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Switch from csso justDoIt to minify because of deprecation notice\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar path = require('path');\nvar csso = require('csso');\nvar autoprefixer = require('autoprefixer');\nvar UglifyJS = require('uglify-js');\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow only id argument to be passed.\n"
},
{
"from": "human",
"value": "var debug = require('debug')('nds');\n\n\nfunction Resolver() {\n this._mechs = [];\n}\n\nResolver.prototype.use = function(fn) {\n this._mechs.push(fn);\n};\n\nResolver.prototype.query = func... | javascript | chosen |
[
{
"from": "system",
"value": "Add mutation observer to catch changes in the DOM\n\nE.g. when there are dynamic changes in the website, we would like to\nfind textareas and change their font style be monospaced.\n"
},
{
"from": "human",
"value": "var textareas = document.getElementsByTagName(\"te... | javascript | chosen |
[
{
"from": "system",
"value": "Fix hover state strapi link\n\nSigned-off-by: soupette <0a59f0508aa203bc732745954131d022d9f538a9@gmail.com>\n"
},
{
"from": "human",
"value": "/**\n *\n * LeftMenuFooter\n *\n */\n\nimport React from 'react';\nimport { PropTypes } from 'prop-types';\nimport Wrapper,... | javascript | chosen |
[
{
"from": "system",
"value": "Write as stateless function for linter\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nclass CardStackPanResponder {\n}\n\nclass PagerPanResponder {\n}\n\nclass NavigationCard extends React.Component {\n}\n\nNavigationCard.CardStackPanResponder = Ca... | javascript | chosen |
[
{
"from": "system",
"value": "Make the multi-embed-test-project use a complex subpath for 2nd component\n"
},
{
"from": "human",
"value": "\nvar gulp = require('gulp');\n\nvar embedDefs = [\n {\n componentPath: 'src/js/components/hello-world.jsx',\n path: '/hello-world'\n },\n {\n co... | javascript | chosen |
[
{
"from": "system",
"value": "Add code to jscs lint errors\n"
},
{
"from": "human",
"value": "var util = require('util');\n\nvar Jscs = require('jscs');\n\nvar DefaultValidator = require('./DefaultValidator');\n\nvar Validator = function() {\n};\n\nutil.inherits(Validator, DefaultValidator);\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add subscribe to change redux events\n"
},
{
"from": "human",
"value": "'use strict'\n\nimport React from 'react'\nimport { render } from 'react-dom'\nimport { Provider } from 'react-redux'\nimport App from './containers/app/index'\nimport configureStore from './sto... | javascript | chosen |
[
{
"from": "system",
"value": "Hide burger menu in VR mode\n"
},
{
"from": "human",
"value": "import 'aframe';\nimport 'aframe-extras';\nimport 'babel-polyfill';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport SpaceScene from './components/SpaceScene';\nimport Sidebar fro... | javascript | chosen |
[
{
"from": "system",
"value": "Remove hack for popper fix\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n'use strict';\n\nconst EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n let app = new EmberApp(defaults, {\n 'ember-bootstrap':... | javascript | chosen |
[
{
"from": "system",
"value": "Include babel poylfills in dummy app build\n"
},
{
"from": "human",
"value": "/*jshint node:true*/\n/* global require, module */\nvar path = require('path');\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a note about _buildUriComponents\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar request = require('request')\n\nvar Client = function(config) {\n this.config = config\n this.baseUrl = config.scheme + '://' + config.host + config.basePath\n}\n\nClient.p... | javascript | chosen |
[
{
"from": "system",
"value": "Improve use of clientX instead of offsetX.\n"
},
{
"from": "human",
"value": "const contextmenus = {};\n\ncontextmenus.hide_open_menus =\nfunction hide_open_menus()\n{\n const elements = document.getElementsByClassName(\"open_contextmenu\");\n while (elements.... | javascript | chosen |
[
{
"from": "system",
"value": "[local-sync] Add a better reason when waking sync for syncback\n\nSummary: see title\n\nTest Plan: nil\n\nReviewers: mark\n\nReviewed By: mark\n\nDifferential Revision: https://phab.nylas.com/D3892\n"
},
{
"from": "human",
"value": "const _ = require('underscore')\n... | javascript | chosen |
[
{
"from": "system",
"value": "Test over export and import functions added.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar PLS = require(\"../src/pls\");\nvar Matrix = require(\"ml-matrix\");\n\ndescribe(\"PLS-DA algorithm\", function () {\n it(\"test with a pseudo-AND operator\", f... | javascript | chosen |
[
{
"from": "system",
"value": "Copy minlength change over from Struts. Now minlength passes if all whitespace is entered.\n\n\ngit-svn-id: c96248f4ce6931c9674b921fd55ab67490fa1adf@140031 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "human",
"value": "\n function validateMinLength(form... | javascript | chosen |
[
{
"from": "system",
"value": "Make the collision tests pass\n"
},
{
"from": "human",
"value": "var assert = require('chai').assert;\nvar Bubble = require('../lib/bubbles');\nvar Dinosaur = require('../lib/dinosaur');\nvar Collision = require('../lib/collision');\n\ndescribe('collision', function... | javascript | chosen |
[
{
"from": "system",
"value": "Verify maintaining state in an iterator\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst assert = require('chai').assert;\n\ndescribe('ES2015 Generators ', () => {\n it('should iterator of results', () => {\n // Given\n function* newIterator() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix argument count on `Error`\n"
},
{
"from": "human",
"value": "import ls from 'local-storage';\n\nconst defaulGetDocumentStorageId = (doc, name) => {\n const { _id, conversationId } = doc\n if (_id && name) { return {id: `${_id}${name}`, verify: true}}\n if (_i... | javascript | chosen |
[
{
"from": "system",
"value": "Fix RSVP.Promise overriding Promise in native promise detection.\n"
},
{
"from": "human",
"value": "import { Promise } from 'rsvp';\n\nexport const nextTick =\n typeof Promise === 'undefined' ? setTimeout : cb => Promise.resolve().then(cb);\nexport const futureTick... | javascript | chosen |
[
{
"from": "system",
"value": "Make force publish better on IE7\n\nDisable linked modals on IE7, as modals don’t work well.\n"
},
{
"from": "human",
"value": "(function(Modules) {\n \"use strict\";\n\n /*\n If `data-toggle=modal` and `data-target` are used on a link element in\n Bootstrap... | javascript | chosen |
[
{
"from": "system",
"value": "Rollback a single preference on request failing\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst { Component } = Ember;\n\nexport default Component.extend({\n actions: {\n savePreference(setting) {\n setting.save()\n .then(() =>... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude quoted strings and regex literals\n"
},
{
"from": "human",
"value": "/**\n * @copyright Copyright (c) 2020 Maxim Khorin <maksimovichu@gmail.com>\n */\n'use strict';\n\nconst BLOCK_COMMENT = /\\/\\*(\\*(?!\\/)|[^*])*\\*\\//g;\nconst MULTIPLE_SPACE = /\\s\\s+/... | javascript | chosen |
[
{
"from": "system",
"value": "Add cold wallet and hot wallet to bank account\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar mongoose = require('mongoose'),\n Schema = mongoose.Schema;\n\nvar BankaccountSchema = new Schema({\n name: String,\n info: String,\n active: Boolean\n});\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add guests to hit fetch route. Ugly.\n"
},
{
"from": "human",
"value": "'use strict';\n// =========================================================================\n//\n// Policies for documents\n//\n// ==============================================================... | javascript | chosen |
[
{
"from": "system",
"value": "Set max condition depth to 3 due to limited width\n"
},
{
"from": "human",
"value": "module.exports = {\n\n DEBUG: <%= DEBUG %>,\n\n INPUT_DELAY_BEFORE_SAVE: 500, // in milliseconds\n\n SITE_TITLE: 'Sana Protocol Builder',\n\n APP_NAMESPACE: 'spb',\n\n ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.