conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix teardown when pending requests\n\nCo-authored-by: Peter Wagenet <0b0a1b9940579be214edfb951377a0a41030ae09@gmail.com>\n"
},
{
"from": "human",
"value": "import startMirage from 'ember-cli-mirage/start-mirage';\n\n//\n// Used to set up mirage for a test. Must be c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix check for empty aray in matchTypes.js\n"
},
{
"from": "human",
"value": "import isArray from 'lodash/lang/isArray';\nimport intersection from 'lodash/array/intersection';\n\nexport default function matchesType(targetType, draggedItemType) {\n var draggedItemTyp... | javascript | chosen |
[
{
"from": "system",
"value": "CSRA-347: Add test coverage on health endpoint for build-info\n"
},
{
"from": "human",
"value": "import request from 'supertest';\nimport express from 'express';\nimport healthEndpoint from '../../../../server/routes/health';\n\ndescribe('GET /health', () => {\n le... | javascript | chosen |
[
{
"from": "system",
"value": "Split into readable length lines\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nclass HashSelector extends Component {\n render() {\n return (\n <div className='flex flex-row justify-center mv4'>\n <input className='m... | javascript | chosen |
[
{
"from": "system",
"value": "Change commentId to accurately be responseId.\n"
},
{
"from": "human",
"value": "$(document).ready( function () {\n $(\".upvote\").click( function() {\n var commentId = $(\".upvote\").data(\"id\");\n event.preventDefault();\n $.ajax({\n url: '/respons... | javascript | chosen |
[
{
"from": "system",
"value": "Remove timestamp from the concat task.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n concat: {\n options: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change content of grunt file accordingly\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n 'use strict';\n\n grunt.initConfig({\n less: {\n dev: {\n options: {\n paths: ['velvet']\n },\n files: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add styleinjector task for live css injection"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n grunt.initConfig({\n\n // watch changes to less files\n watch: {\n styles: {\n files: [\"less/*\"],\n ... | javascript | chosen |
[
{
"from": "system",
"value": "USe browsers variable for Grunt.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n var browsers = [\n 'Chrome',\n 'PhantomJS',\n 'Firefox'\n ];\n\n if (process.env.TRAVIS){\n browsers = ['Ph... | javascript | chosen |
[
{
"from": "system",
"value": "Call go test for src/ only\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'), // the package file to use\n\n qunit: { // internal task or name of a plugin (like \"qu... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for 'mup docker setup'\n"
},
{
"from": "human",
"value": "import {describe, it} from 'mocha';\n\ndescribe('module - docker', function () {\n it('TODO write tests');\n\n describe('dump', function () {\n it('TODO write tests');\n });\n\n describe('hel... | javascript | chosen |
[
{
"from": "system",
"value": "Fix general business processes collection\n"
},
{
"from": "human",
"value": "// Collection of all business processes which where made online\n\n'use strict';\n\nmodule.exports = require('./resolve')(require('../db').BusinessProcess);\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Use updateHead instead of createRef\n"
},
{
"from": "human",
"value": "var\toauthAuth = new GitHub(logged ? { token: logged } : {}),\n\trepo = oauthAuth.getRepo(OWNER_NAME, PROJECT_NAME),\n\tauth = logged ? oauthAuth.getUser() : false;\n\n// READ REPO\nrepo.getDetai... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ember-flexberry blueprint add dependencies\n"
},
{
"from": "human",
"value": "/* globals module */\nmodule.exports = {\n afterInstall: function() {\n var _this = this;\n return this.addBowerPackagesToProject([\n { name: 'semantic-ui-daterangepicker',... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Events routes i18n languages\n"
},
{
"from": "human",
"value": "import { injectLocale } from 'common/i18n/helpers'\n\nexport default (store, i18n) => ({\n path: 'events',\n\n async getComponent(nextState, cb) {\n const EventsContainer = await import(/* webp... | javascript | chosen |
[
{
"from": "system",
"value": "Add ability to load album art\n"
},
{
"from": "human",
"value": "\n$(function () {\n\tSC.initialize({client_id: '28b05a26f8f8bec9d27bea7c938337ff'});\n\tgetTracks();\n\tvar timer = setInterval(getTracks, 10000);\n})\n\nfunction getTracks() {\n\t$('ul').html('');\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Return Promise and resolve explicitly\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport test from 'blue-tape';\nimport hello from '../source/index';\n\n\ntest('Tests run', (assert) => {\n assert.pass('Tests run');\n assert.end();\n});\n\n\ntest('Greet Wor... | javascript | chosen |
[
{
"from": "system",
"value": "Replace call to goog.define with assignment to the result of goog.define\n"
},
{
"from": "human",
"value": "goog.module('legacy.namespace.goog.define');\ngoog.module.declareLegacyNamespace();\n\n/** @define {string} */\ngoog.define('GOOG_DEFINE', 'goog.define');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Define screw method directly on I18n\n"
},
{
"from": "human",
"value": "import md5 from \"md5\";\nimport I18n from \"i18n-js\";\n\nfunction onMissingTranslation(md5, message) {\n return `translation missing: ${I18n.locale}.${message}`;\n}\n\nconst interpolate = (me... | javascript | chosen |
[
{
"from": "system",
"value": "Add error handling to nuget restore task\n"
},
{
"from": "human",
"value": "import gulp from 'gulp';\nimport nugetRestore from 'gulp-nuget-restore';\n\nexport default {\n /**\n * Task name\n * @type {String}\n */\n name: 'sitecore:nuget-restore',\n\n /**\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make the pause indicator radially symmetric\n"
},
{
"from": "human",
"value": "import {black} from './colors.js'\n\nexport function getIcon(\n unscaledSize,\n {monitored, metrics = []},\n {asImageData = false} = {},\n) {\n const scale = devicePixelRatio\n const... | javascript | chosen |
[
{
"from": "system",
"value": "Add prefer-rest-params to Node preset\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports = {\n extends: './base.js',\n plugins: [\n 'node'\n ],\n rules: {\n 'node/no-unsupported-features': 'error',\n\n 'template-curly-spacing': ['error', ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove logger middleware from debugger\n"
},
{
"from": "human",
"value": "import debugModule from \"debug\";\nconst debug = debugModule(\"debugger:store:common\");\nconst reduxDebug = debugModule(\"debugger:redux\");\n\nimport { compose, createStore, applyMiddleware... | javascript | chosen |
[
{
"from": "system",
"value": "Use Stripes object from context, not from prop\n\nPart of STRIPES-395.\n"
},
{
"from": "human",
"value": "// We have to remove node_modules/react to avoid having multiple copies loaded.\n// eslint-disable-next-line import/no-unresolved\nimport React, { PropTypes } f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove qualification that idea-generation starts the retro in earnest\n\n - the prime directive is a part of the retro proper\n"
},
{
"from": "human",
"value": "export default {\n \"prime-directive\": {\n alert: null,\n confirmationMessage: \"Are you sure wa... | javascript | chosen |
[
{
"from": "system",
"value": "Allow pngs to be the thumbnail.\n"
},
{
"from": "human",
"value": "// All JSON schemas related to ballot objects\n\nexports.candidates = {\n \"title\": \"Ballot Candidates Schema\",\n \"type\": \"array\",\n \"minItems\": 5,\n \"items\": {\n \"type... | javascript | chosen |
[
{
"from": "system",
"value": "Add box-sizing to storybook demo\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { storiesOf } from '@kadira/storybook';\n\nimport SetStateExample from './SetStateExample';\nimport '../../styles/index.css';\n\nstoriesOf('<DropNCrop />', module)... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broadcast to only broadcast to everyone else\n"
},
{
"from": "human",
"value": "var WebSocketServer = require(\"ws\").Server,\n wss = new WebSocketServer({ port: 8080 });\n\nwss.broadcast = function broadcast (data) {\n\twss.clients.forEach(function sendTo (c... | javascript | chosen |
[
{
"from": "system",
"value": "Add template for bags get and post verbs.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\nvar bodyParser = require('body-parser');\n\n//Parse setup\nGLOBAL.Parse = require('parse').Parse;\nParse.initialize(\"W42PEkh5M824lp... | javascript | chosen |
[
{
"from": "system",
"value": "Check whether console[c] is actually a function\n"
},
{
"from": "human",
"value": "(function (cmds) {\n\t'use strict';\n\tif (typeof window.di === 'undefined') { window.di = {}; }; di.con = {}; var noop = function () { }; di.usecon = typeof console !== 'undefined';\... | javascript | chosen |
[
{
"from": "system",
"value": "Add key to pathway comment elements\n"
},
{
"from": "human",
"value": "const React = require('react');\nconst h = require('react-hyperscript');\n\n\nclass NetworkInfoMenu extends React.Component {\n render() {\n const { infoList } = this.props;\n\n const noIn... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'isDeleted' field to Message schema\n"
},
{
"from": "human",
"value": "module.exports = (db, Sequelize) => {\n const Message = db.define('message', {\n id: {\n type: Sequelize.INTEGER,\n autoIncrement: true,\n primaryKey: true,\n },\n ti... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct optional paramater JSDoc syntax\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root director... | javascript | chosen |
[
{
"from": "system",
"value": "Add option to display the VWP version"
},
{
"from": "human",
"value": "const Path = require('path')\n\nconst action = process.argv[2]\nvar args = process.argv.slice(3)\nvar env = process.env.NODE_ENV\nvar webpack\n\nswitch (action) {\n case 'build':\n webpack = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a level to Field\n"
},
{
"from": "human",
"value": "levels = [\n {\n \"nuclei\": [\n {\n \"x\": 0.3,\n \"y\": 0.35,\n \"intensity\": 5\n },\n {\n \"x\": 0.3,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Disable lint rule for specific lines\n"
},
{
"from": "human",
"value": "/* eslint-disable no-sync */\n'use strict';\n\n// MODULES //\n\nvar fs = require( 'fs' );\n\n\n// MAIN //\n\n/**\n* Synchronously reads the entire contents of a file.\n*\n* @param {(string|Buffe... | javascript | chosen |
[
{
"from": "system",
"value": "Generalize Dance.FFT plugin to scale to any height canvas element\n"
},
{
"from": "human",
"value": "/*\n * FFT plugin for dance.js\n * \n * Usage of frequencies being 2px with 1px spacing:\n *\n * var dance = new Dance('song.ogg'),\n * canvas = document.getElem... | javascript | chosen |
[
{
"from": "system",
"value": "feat(Error): Add timeout for auto-closing errors\n"
},
{
"from": "human",
"value": "export const SHOW_ERROR = '§_SHOW_ERROR'\nexport const HIDE_ERROR = '§_HIDE_ERROR'\n\nexport const showError = ({ message, fatal, icon = 'alert' }) => ({\n type: SHOW_ERROR,\n payl... | javascript | chosen |
[
{
"from": "system",
"value": "Clear line more aggressively for Windows"
},
{
"from": "human",
"value": "/**\n * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of ... | javascript | chosen |
[
{
"from": "system",
"value": "Add resolve property to home route to auto get stocks from express\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Declare app level module which depends on views, and components\nvar app = angular.module('Stocks', ['ngRoute', 'ngResource']);\n\napp.config(fu... | javascript | chosen |
[
{
"from": "system",
"value": "Improve log lines for private/public clones\n"
},
{
"from": "human",
"value": "var fs = require('fs');\n\nvar gitane = require('gitane');\nvar winston = require('winston');\n\nfunction cloneInto(repoUrl, destPath, keyPath, callback) {\n var gitClone = function(keyD... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up how we enable the extension after loading options\n"
},
{
"from": "human",
"value": "(function() {\n var Handler = function() {\n var options = {\n urlPatterns: [],\n shortcutKey: null,\n linkSelector: null\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove requiresLogin and helper function from auth\n"
},
{
"from": "human",
"value": "'use strict';\nvar mongoose = require('mongoose'),\n User = mongoose.model('User'),\n _ = require('lodash');\n\n\nvar findUser = exports.findUser = function(id, cb) {\n User.fin... | javascript | chosen |
[
{
"from": "system",
"value": "Add dummy animation for testing\n"
},
{
"from": "human",
"value": "/* global Thing */\n\n(function (document, window) {\n 'use strict';\n\n var Main = function () {\n // console.log('Main()');\n\n this.field = document.getElementById('field');\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add server-side logging utility function\n"
},
{
"from": "human",
"value": "var moment = require('moment');\nvar geolib = require('geolib');\n\n// Use moment.js to calculate how much time has elapsed since some prior time\nexports.getTimeElapsedSince = function(time... | javascript | chosen |
[
{
"from": "system",
"value": "Update QRCode when text attribute is changed"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport QRCode from 'qrcode';\n\nexport default Ember.Component.extend({\n\n text: null,\n\n light: '#ffffff',\n\n colorDark: '#000000',\n\n width: 128,\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "[entries] Normalize return value format for all objects to [key, value] entries\n\nMeaning, an object of the following structure: { a: 1, b: 2 }\nWould be returned as [['a', 1], ['b', 2]]\n\nAlso, for numbers, return an array of numbers instead of strings.\n"
},
{
"from... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust the browser definition to the ones that actually work\n"
},
{
"from": "human",
"value": "module.exports = config => {\n const customLaunchers = {\n 'SL Chrome 26': {\n base: 'SauceLabs',\n browserName: 'chrome',\n version: '26'\n },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update jest setup to mock window and document with jsdom\n"
},
{
"from": "human",
"value": "import Enzyme from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\n\nEnzyme.configure({ adapter: new Adapter() });\n"
},
{
"from": "gpt",
"value": "imp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix build on RPi. Building from source timesout on karma tests so increase timeouts\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n 'use strict';\n\n config.set({\n basePath: __dirname + '/public_gen',\n\n frameworks: ['mocha', 'exp... | javascript | chosen |
[
{
"from": "system",
"value": "Add object-assign plugin to karma\n"
},
{
"from": "human",
"value": "var webpack = require('webpack');\n\nmodule.exports = function (config) {\n config.set({\n\n browserNoActivityTimeout: 30000,\n\n browsers: [ process.env.CONTINUOUS_INTEGRATION ? 'Firefox' :... | javascript | chosen |
[
{
"from": "system",
"value": "Increase Karma browserNoActivityTimeout for Travis\n"
},
{
"from": "human",
"value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-file.html\n\nmodule.exports = function (config) {\n config.s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug: use type to construct log string\n"
},
{
"from": "human",
"value": "var Logger = function (config) {\n this.config = config;\n this.backend = this.config.backend || 'stdout'\n this.level = this.config.level || \"LOG_INFO\"\n if (this.backend == 'stdo... | javascript | chosen |
[
{
"from": "system",
"value": "Use the node's cluster module\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport http from 'http';\n\nimport Promise from 'bluebird';\n\nimport * as dispatcher from './dispatcher';\nimport * as config from './config';\n\nexport default {\n start(options, ... | javascript | chosen |
[
{
"from": "system",
"value": "Add some `toString` conversions (required by MongoDB)\n"
},
{
"from": "human",
"value": "module.exports = function(sugar, schemas, assert, api) {\n return function(cb) {\n api.create(null, function(err, d) {\n var name = d.name + d.name;\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add flag for Travis CI\n"
},
{
"from": "human",
"value": "/* eslint-env node */\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: [\n 'Chrome'\n ],\n launch_in_dev: [\n 'Chrome'\n ],\n browser_args... | javascript | chosen |
[
{
"from": "system",
"value": "Change default DataDog metric prefix in node app to node.express\n"
},
{
"from": "human",
"value": "var FS = require('fs');\nvar Path = require('path');\n\nvar Winston = require('winston');\n\nglobal.Config = require('nconf');\nglobal.Log = new Winston.Logger();\nLo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove requirejs (using internal TypeScript modules) And update to match the new TypeScript services (no path required now).\n"
},
{
"from": "human",
"value": "var runSequence = require('run-sequence');\n\nvar typescript = require('./typescript');\nvar requirejs = r... | javascript | chosen |
[
{
"from": "system",
"value": "Add more comment for explain the code\n"
},
{
"from": "human",
"value": "'use strict'\n\n// let plusES5 = function(a, b){\n \n// console.log(\"A:\", a, \", B:\", b);\n// let result = a + b;\n// return result;\n\n// };\n\n// console.log(plusES5(9,10));... | javascript | chosen |
[
{
"from": "system",
"value": "Fix time formatting for queue items\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\n\nexport function formatDuration(duration) {\n var sec_num = parseInt(duration, 10);\n var hours = Math.floor(sec_num / 3600);\n var minutes = Math.floor((sec_num - ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix \"done is not a function\"\n"
},
{
"from": "human",
"value": "/*\n * min-webdriver\n *\n * Copyright (c) 2014-2015 Maximilian Antoni <mail@maxantoni.de>\n *\n * @license MIT\n */\n'use strict';\n\nvar path = require('path');\nvar through = require('through2')... | javascript | chosen |
[
{
"from": "system",
"value": "Support old lower-case entity type `image` for backwards compatibility\n"
},
{
"from": "human",
"value": "import decorateComponentWithProps from 'decorate-component-with-props';\nimport addImage from './modifiers/addImage';\nimport ImageComponent from './Image';\nim... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused local variables in parse\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar path = require('path');\nvar minimatch = require('./fnmatch');\nvar iniparser = require('./ini');\n\nfunction getConfigFileNames(filepath) {\n var old_dirname = f... | javascript | chosen |
[
{
"from": "system",
"value": "Allow a default wording to be passed in as an option instead of forcing 'some time ago'\n"
},
{
"from": "human",
"value": "if (typeof Handlebars !== 'undefined') {\n Handlebars.registerHelper(\"timeago\", function(date) {\n var dateObj;\n if (date) {\n d... | javascript | chosen |
[
{
"from": "system",
"value": "Add placeholders for user notification\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport './TicTacToe.scss';\nimport { connect } from 'react-redux';\nimport ticTacToeActions from 'actions/tictactoe';\n\nimport GameBoard from './compone... | javascript | chosen |
[
{
"from": "system",
"value": "Add router, remove unused imports\n"
},
{
"from": "human",
"value": "import {\n Event,\n Reactor,\n TabTools,\n TabTracker,\n core,\n Module\n} from './universal.js';\n\nchrome.browserAction.onClicked.addListener(() => {\n TabTools.new(chrome.extension.getURL... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up the version stuff, use more constants\n"
},
{
"from": "human",
"value": "// @flow\n\nimport {version} from '../package.json'\nimport {Platform} from 'react-native'\n\nconst platformString = Platform.OS == 'ios' ? 'iOS' : 'Android'\nconst platformVersion = P... | javascript | chosen |
[
{
"from": "system",
"value": "Make harvesters dump in extensions before links\n"
},
{
"from": "human",
"value": "module.exports = function (creep) {\n if(creep.memory.currentTarget) {\n creep.memory.currentTarget = Game.getObjectById(creep.memory.currentTarget.id);\n }\n\n // Aqu... | javascript | chosen |
[
{
"from": "system",
"value": "Add default provider - null object pattern\n"
},
{
"from": "human",
"value": "define([\n\t\"underscore\",\n\t\"providers/ProviderEntry\"\n], function(\n\t_,\n\tProviderEntry\n) {\n return ProviderEntry.extend({\n\n \tisProvider: function() {\n \t\treturn true;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove blank line from qunit test file"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-qunit';<% if (testType === 'integration') { %>\nimport hbs from 'htmlbars-inline-precompile';<% } %>\n\nmoduleForComponent('<%= componentPathName ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix default Server Name config\n"
},
{
"from": "human",
"value": "module.exports = {\n name: 'ProductionServer',\n webpack: {\n entry: './src/Server.es6.js',\n output: {\n generator: 'simple',\n dest: './bin',\n },\n resolve: {\n generat... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure app when executed returns empty object if not set to custom\nengine.\n"
},
{
"from": "human",
"value": "function Application (cb) {\n this._logger = function () {};\n this._app = function () {};\n\n cb.call(this);\n}\n\nApplication.prototype.init = f... | javascript | chosen |
[
{
"from": "system",
"value": "Update Cloud Files mock to match.\n"
},
{
"from": "human",
"value": "// Mock pkgcloud functionality.\n\nvar\n util = require(\"util\"),\n stream = require(\"stream\"),\n Writable = stream.Writable,\n Readable = stream.Readable;\n\nutil.inherits(Sink, Writable);\... | javascript | chosen |
[
{
"from": "system",
"value": "Change URL to handle https if website is running with it\n"
},
{
"from": "human",
"value": "/*\n * Author: Pierre-Henry Soria <ph7software@gmail.com>\n * Copyright: (c) 2015-2017, Pierre-Henry Soria. All Rights Reserved.\n * License: GNU General Pub... | javascript | chosen |
[
{
"from": "system",
"value": "Add site footer to each documentation generator\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tac... | javascript | chosen |
[
{
"from": "system",
"value": "Fix null processing in QuoteString\n\nFix null processing in QuoteString when use prepareStatement with null values for placeholders"
},
{
"from": "human",
"value": "/**\n * Quotes a string for SQL statements\n * \n * @param {string|number} string \n * @returns {str... | javascript | chosen |
[
{
"from": "system",
"value": "Send server error log for debugging\n"
},
{
"from": "human",
"value": "import nodemailer from 'nodemailer';\nimport config from '../../config.js';\n\nfunction getSmtpTransport(service, user, pass) {\n return nodemailer.createTransport('SMTP', {\n service,\n a... | javascript | chosen |
[
{
"from": "system",
"value": "Change MongoDB URI for production environment (Clever)\n"
},
{
"from": "human",
"value": "const mongoose = require('mongoose');\nconst log = require('./logger.helper');\nconst appHelper = require('./application.helper');\n\nconst options = {\n useNewUrlParser: true... | javascript | chosen |
[
{
"from": "system",
"value": "Check if FormData is present\n"
},
{
"from": "human",
"value": "/**\n * Sends a JSON-LD request to the API.\n *\n * @param {string} url\n * @param {object} options\n * @return {Promise.<object>} An object with a response key (the original HTTP response) and an optio... | javascript | chosen |
[
{
"from": "system",
"value": "Update long description of language counts\n"
},
{
"from": "human",
"value": "var _ = require('underscore'),\n SHORT = _.template('Languages: jw.org: <%= jworg.total %>, <%= jworg.hasWebContent %> L1+, <%= jworg.isSign %> SLs, <%= jworg.isRTL %> RTL, <%= jworg.is... | javascript | chosen |
[
{
"from": "system",
"value": "Compress the record structure even more.\n"
},
{
"from": "human",
"value": "var fs = require(\"fs\");\n\nvar jsonld = require(\"jsonld\");\n\nvar nquads = fs.readFileSync(process.argv[2], \"utf8\");\n\njsonld.fromRDF(nquads, {format: \"application/nquads\"}, functio... | javascript | chosen |
[
{
"from": "system",
"value": "Add scroll to the tasks\n"
},
{
"from": "human",
"value": "/**\n * SCSS grunt task for CartoDB.js\n *\n */\n\nmodule.exports = {\n task: function(grunt, config) {\n return {\n dist: {\n options: {\n sourceMap: false,\n outputStyle:... | javascript | chosen |
[
{
"from": "system",
"value": "Update event namings based on edX standard formats\n"
},
{
"from": "human",
"value": "function OfficeMixBlock(runtime, element) {\n var iframe = $('iframe', element);\n var player = new playerjs.Player(iframe.get(0));\n\n var mixUrl = iframe.attr('src');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add show hide nav functionality for hamburger icon\n"
},
{
"from": "human",
"value": "document.querySelector('.hamburger-button')\n .addEventListener('click', function () {\n this.classList.toggle('active');\n });\n"
},
{
"from": "gpt",
"value": "(f... | javascript | chosen |
[
{
"from": "system",
"value": "Use JQuery remove instead of native\n"
},
{
"from": "human",
"value": "function updateIdea() {\n $('#idea').attr('id', 'idea-old').animate({ left: '200%', right: '-200%', opacity:'0' }, function() {\n this.remove();\n });\n $('#idea-old').clone().attr('id', 'i... | javascript | chosen |
[
{
"from": "system",
"value": "[INTERNAL] Fix sporadic CI issues on macOS by increasing timeouts\n"
},
{
"from": "human",
"value": "process.env.CHROME_BIN = require(\"puppeteer\").executablePath();\n\nmodule.exports = function(config) {\n\tconfig.set({\n\n\t\tplugins: [\n\t\t\trequire(\"../../\")... | javascript | chosen |
[
{
"from": "system",
"value": "Update socket url for staging\n"
},
{
"from": "human",
"value": "/*\n * Configuration values needed in js codes\n *\n * NOTE:\n * Please use the following command to avoid accidentally committing personal changes\n * git update-index --assume-unchanged src/javascrip... | javascript | chosen |
[
{
"from": "system",
"value": "test: Add comments explaining slightly obtuse test code.\n"
},
{
"from": "human",
"value": "import reactify from '../../src/index';\n\nlet x = 0;\nfunction createComponent() {\n return reactify(document.registerElement(`x-webcomponent-proto-funcs-${x++}`, {\n pr... | javascript | chosen |
[
{
"from": "system",
"value": "Add the rest of the methods.\n"
},
{
"from": "human",
"value": "/**\n * Markdown for Gpub. Note that Glift comes pre-packaged with markdown.\n *\n * Most output formats will want to defined a custom renderer.\n */\ngpub.markdown = {\n /** For reference, here are th... | javascript | chosen |
[
{
"from": "system",
"value": "Add Benchmark & Performance Notes\n"
},
{
"from": "human",
"value": "// Remove all children nested within a node\n//\n// TL;DR; Replace child fastest\n//\n// BENCHMARK: https://i.stack.imgur.com/5rvfc.png\n// https://jsperf.com/innerhtml-vs-removechild/53\n// https:... | javascript | chosen |
[
{
"from": "system",
"value": "Exit process with -1 when error occurs\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar Q = require('q');\nvar _ = require('lodash');\nvar fs = require('fs');\n\nvar utils = require('./utils');\nvar generate = require(\"../lib/generate\");\nvar pa... | javascript | chosen |
[
{
"from": "system",
"value": "Make the delay longer so that test passes more consistently.\n"
},
{
"from": "human",
"value": "define([\"pat-masonry\"], function(pattern) {\n\n describe(\"pat-masonry\", function() {\n beforeEach(function() {\n $(\"<div/>\", {id: \"lab\"}).app... | javascript | chosen |
[
{
"from": "system",
"value": "Remove require for missing refresh.js asset\n"
},
{
"from": "human",
"value": "//= require application\n//= require refresh\n//= require twitter\n//= require versionCheck\n//= require projectCheck\n//= require projectRefresh\n//= require spin\n\n$(function() {\n Ve... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing gettext into vmCloudAttachFormController\n"
},
{
"from": "human",
"value": "ManageIQ.angular.app.controller('vmCloudAttachFormController', ['$scope', 'vmCloudAttachFormId', 'miqService', function($scope, vmCloudAttachFormId, miqService) {\n var vm = thi... | javascript | chosen |
[
{
"from": "system",
"value": "Update widgets based on the data-widget data attribute\n"
},
{
"from": "human",
"value": "//= require jquery.knob\n//= require jquery.gridster\n//= require_tree .\n\n$(function () {\n 'use strict';\n window.Kiteboard = {\n init: function () {\n var content... | javascript | chosen |
[
{
"from": "system",
"value": "Add a babel task to watch which works\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkgFile: 'package.json',\n clean: ['build'],\n babel: {\n options: {\n sourceMap: fal... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to Modal displaying off the page.\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2015 Ian Davies\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n *\n * You may ... | javascript | chosen |
[
{
"from": "system",
"value": "Add version to PHP70 dependency\n"
},
{
"from": "human",
"value": "import Dependency from './Dependency'\n\n/**\n * The base class for defining your application's dependencies and installation\n * proceedures.\n */\nexport default class Php70 extends Dependency {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust component to be used in an add-on\n\n`layout: layout` needs to be defined where layout is imported from the component's template\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n tagName: 'div',\n cla... | javascript | chosen |
[
{
"from": "system",
"value": "Fix syntax error on phantom js browser\n\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst BrowserWorker = require('./BrowserWorker');\nconst WebDriver = require('webdriverio');\n\nclass PhantomJsBrowserWorker extends BrowserWorker {\n constructor(scenari... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.