conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add flash selector to local header\n"
},
{
"from": "human",
"value": "module.exports = () => {\n const localHeaderSelector = '[data-auto-id=\"localHeader\"]'\n return {\n heading: `${localHeaderSelector} h1.c-local-header__heading`,\n headingAfter: `${localH... | javascript | chosen |
[
{
"from": "system",
"value": "Check id in attributes before remove\n"
},
{
"from": "human",
"value": "import Backbone from 'backbone';\n\nexport default Backbone.Model.extend({\n build(model, opts = {}) {\n const models = model.components();\n const htmlOpts = {};\n const { em } = opts... | javascript | chosen |
[
{
"from": "system",
"value": "Increment version number for the addition of latest client side js\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'saucecode:rollbar',\n version: '0.0.6',\n summary: 'Rollbar error reporting integrations for Meteor',\n documentation: 'README.md'\n... | javascript | chosen |
[
{
"from": "system",
"value": "docs(table): Add todo for sort order constants\n"
},
{
"from": "human",
"value": "/**\n * Sort order for the Table\n */\nconst SortOrder = {\n /**\n * Sort data in ascending order\n */\n ASC: \"asc\",\n /**\n * Sort data in descending order\n */\n DESC: ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Rollup options that are unnecessary now that `@web/test-runner-mocha` is no longer bundled.\n"
},
{
"from": "human",
"value": "import commonjs from '@rollup/plugin-commonjs';\nimport {nodeResolve} from '@rollup/plugin-node-resolve';\n\nexport default [\n {\n... | javascript | chosen |
[
{
"from": "system",
"value": "[setup] Refactor review schema, establish relations\n"
},
{
"from": "human",
"value": "// reviews schema/model\nconst Sequelize = require('sequelize');\nconst dbConnection = require('../../config/db.config.js');\nconst POI = require('../poi/poi.model.js');\nconst Us... | javascript | chosen |
[
{
"from": "system",
"value": "Make deps an explicit dependency\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: 'Display the connection status with the server'\n})\n\nPackage.on_use(function(api, where) {\n api.use([\n 'meteor',\n 'underscore',\n 'templating'\n ], 'cl... | javascript | chosen |
[
{
"from": "system",
"value": "Add Type and Status constants to Project Model\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar ProjectSchema = new Schema(\n{\n name : String,\n picture : {type : String, default : null},... | javascript | chosen |
[
{
"from": "system",
"value": "Rename timestamp to data and show data instead of this.raw (which doesn't do anything)"
},
{
"from": "human",
"value": "var five = require(\"../lib/johnny-five.js\"),\n board, accel;\n\nboard = new five.Board();\n\nboard.on(\"ready\", function() {\n\n // Create ... | javascript | chosen |
[
{
"from": "system",
"value": "Use var = function syntax\n"
},
{
"from": "human",
"value": "import { select, local } from \"d3-selection\";\n\nvar myLocal = local(),\n noop = function (){};\n\nexport default function (tagName, className){\n var create = noop,\n render = noop,\n dest... | javascript | chosen |
[
{
"from": "system",
"value": "Remove usage of unused package in npmalerets.js\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar github = require('./github');\nvar npm = require('./npm');\nvar db = require('./db');\nvar email = require('./email');\n\nvar semver = require('semver');\nvar _ =... | javascript | chosen |
[
{
"from": "system",
"value": "Replace deep equality with regular in Cache\n\nWe only use string keys anyway so what’s the point. This’ll help us\nphase out deep-equal from dependencies.\n"
},
{
"from": "human",
"value": "import equal from 'deep-equal';\n\n\nexport default class Cache {\n constr... | javascript | chosen |
[
{
"from": "system",
"value": "[improve] Create database reference and add static methods to model.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst levelco = require('level-co');\nconst memdown = require('memdown');\nconst model = require('../');\n\nvar attributes = {\n username: 'me',... | javascript | chosen |
[
{
"from": "system",
"value": "Fix scroll being at an awkward position when switching back from print-friendly\n"
},
{
"from": "human",
"value": "const renderer = new marked.Renderer();\nconst katexOpts = {\n throwOnError: false,\n errorColor: '#F44336',\n};\nrenderer.code = function(code) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to automatically add/rm the coarse class\n\nBased on viewport height. Automatically adjusted onresize.\n"
},
{
"from": "human",
"value": "window.onload = function() {\n var container = document.querySelector('#toc');\n\n if (container != null) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add some specs for actionscript\n"
},
{
"from": "human",
"value": "\"use babel\"\n\nimport Parser from '../../lib/languages/actionscript'\n\ndescribe('ParserActionScript', () => {\n\n let parser;\n\n beforeEach(() => {\n waitsForPromise(() => atom.packages.acti... | javascript | chosen |
[
{
"from": "system",
"value": "Add bootstrap js to pipeline\n\nNeeded for the user to click the X on flash notices\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffe... | javascript | chosen |
[
{
"from": "system",
"value": "Convert numerical values to number type\n\nFor example,\r\n\r\n`index.js --a=1 b=2.12`\r\n\r\nshould give\r\n\r\n```js\r\n{\r\n \"a\": 1,\r\n \"b\": 2.12\r\n}\r\n```\r\n\r\ninstead of string types:\r\n\r\n```js\r\n{\r\n \"a\": \"1\",\r\n \"b\": \"2.12\"\r\n}\r\n```\r\n\r\nT... | javascript | chosen |
[
{
"from": "system",
"value": "Make cleverbot module behave like a typing human\n"
},
{
"from": "human",
"value": "/**\n * Created by Julian/Wolke on 27.11.2016.\n */\nlet Manager = require('../../structures/manager');\nlet Cleverbot = require('cleverbot');\n\nlet re = /<@[0-9].*>/g;\nlet cleverb... | javascript | chosen |
[
{
"from": "system",
"value": "Fix cover fetch when it has single or doublequotes in its path\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react';\n\nimport utils from '../../utils/utils';\n\n\n/*\n|---------------------------------------------------------------------... | javascript | chosen |
[
{
"from": "system",
"value": "Use Babel polyfill from browser only\n"
},
{
"from": "human",
"value": "require('../sass/main.scss');\nimport 'babel-polyfill';\nimport NamesPanel from './names-panel.js';\nimport OptionsPanel from './options-panel.js';\n\nnew NamesPanel().init();\nnew OptionsPanel(... | javascript | chosen |
[
{
"from": "system",
"value": "Change template path to a const; Add proxy option and comments.\n"
},
{
"from": "human",
"value": "module.exports = {\n \"browsersync\": {\n \"files\": [\n \"./app/assets/_compiled/styles.css\",\n \"./app/assets/_compiled/*.js\",\n \"./app/templat... | javascript | chosen |
[
{
"from": "system",
"value": "Set default user name to 'You'.\n"
},
{
"from": "human",
"value": "const qs = require('qs');\n\nmodule.exports.handler = (event, context, callback) => {\n /** Immediate response for WarmUP plugin */\n if (event.source === 'serverless-plugin-warmup') {\n console... | javascript | chosen |
[
{
"from": "system",
"value": "Use querySelector instead of getElementById.\n"
},
{
"from": "human",
"value": "window.AudioContext = window.AudioContext || window.webkitAudioContext;\nnavigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || n... | javascript | chosen |
[
{
"from": "system",
"value": "Make it a kata, all tests fail.\n"
},
{
"from": "human",
"value": "// 36: Symbol.keyFor - retrieves a shared symbol key from the global symbol registry\n// To do: make all tests pass, leave the assert lines unchanged!\n\ndescribe('`Symbol.keyFor` gets the symbol key... | javascript | chosen |
[
{
"from": "system",
"value": "Revert spec test back to true/false\n"
},
{
"from": "human",
"value": "describe('pingPong', function() {\n it(\"returns ping for a number that is divisible by 3\", function() {\n expect(pingPong(6)).to.equal(\"ping\");\n });\n it(\"returns pong for a number th... | javascript | chosen |
[
{
"from": "system",
"value": "lambda/: Send conditional POST req to netlify build hook\n"
},
{
"from": "human",
"value": "exports.handler = async (event, context) => {\n console.log('Snipcart webhook received!');\n console.log('event', event);\n console.log('context', context);\n return {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update up to changes in es5-ext package\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Assert = require('test/assert').Assert\n , bindMethods = require('es5-ext/lib/Object/bind-methods')\n\n , never, neverBind;\n\nnever = function (message) {\n\tthis... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"fix: wah, typo - correct order for subtraction\"\n\nThis reverts commit 2bf8308d058dd4d951ca38e49d58098074070591.\n\nstop being stupid!\n"
},
{
"from": "human",
"value": "/* -*- coding: utf-8 -*- */\n/* global cforum, Highcharts, t */\n\ncforum.admin.jobs =... | javascript | chosen |
[
{
"from": "system",
"value": "Add stateless functional component and web component stories\n"
},
{
"from": "human",
"value": "gemini.suite('CSS component', (suite) => {\n suite.setUrl('/')\n .setCaptureElements('#storybook-preview-iframe')\n .capture('plain');\n});\n"
},
{
"from":... | javascript | chosen |
[
{
"from": "system",
"value": "Add AST to schema step in util\n"
},
{
"from": "human",
"value": "const compiler = require('idyll-compiler')\nconst fs = require('fs')\nconst { join } = require('path')\n\nfs.writeFileSync(\n join(__dirname, 'ast.json'),\n JSON.stringify(\n compiler(fs.readFile... | javascript | chosen |
[
{
"from": "system",
"value": "Update CLI test to reliably stop\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport Fabric from '../';\n\nconst assert = require('assert');\nconst expect = require('chai').expect;\n\ndescribe('CLI', function () {\n it('should expose a constructor', function... | javascript | chosen |
[
{
"from": "system",
"value": "Add a few more tests\n"
},
{
"from": "human",
"value": "import {\n weatherIcon\n} from 'ember-cli-weather-icons/helpers/weather-icon';\n\nmodule('WeatherIconHelper');\n\n// Replace this with your real tests.\ntest('it works', function() {\n var result = weatherIco... | javascript | chosen |
[
{
"from": "system",
"value": "Hide context boxes if they are not needed.\n"
},
{
"from": "human",
"value": "var gData;\n\nfunction init() {\n\tif ( !window.arguments) window.close();\n\tgData = window.arguments[0];\n\tdocument.getElementById('sbSourcePreTag').value = gData.preTag;\n\tdocument.ge... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to avoid dynamic module resolution\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdl... | javascript | chosen |
[
{
"from": "system",
"value": "Enable X-Forwarded-* headers in http-proxy\n\nReasoning: when using e.g. a Rails backend running on a separate port, proxying it using the ember-cli proxy feature, the generated _links_ sometimes tends to be incorrect. They are based on settings in the X-Forwarded-* headers. He... | javascript | chosen |
[
{
"from": "system",
"value": "Work around a problem in later (currently unsupported) embers where Ember.computed.bool is not a function\n"
},
{
"from": "human",
"value": "import { run } from '@ember/runloop';\nimport Helper from '@ember/component/helper';\nimport { get, observer, computed } from... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong asset path being copied into dist folder.\n"
},
{
"from": "human",
"value": "module.exports = {\n assets: {\n files: [\n {expand: true, src: [\"images/**\"], dest: \"dist/\"}\n ]\n }\n};\n"
},
{
"from": "gpt",
"value": "module.expo... | javascript | chosen |
[
{
"from": "system",
"value": "Make HMR work when app is ran on web host\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n devtool: 'eval',\n entry: [\n 'webpack-dev-server/client?http://localhost:3000',\n 'webpack/ho... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for merge function\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Merger = require('../lib/merger')\n , path = require('path');\nrequire('./_config');\n\ndescribe('Solidity Merger', () => {\n\n it('should set default options', function () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add note regarding username/password interchange."
},
{
"from": "human",
"value": "// User-specific configuration\nexports.sentiment_keyword = \"education\"; // keyword to monitor in Twitter\nexports.sentiment_analysis_frequency_sec = 30; // analyze sentiment ... | javascript | chosen |
[
{
"from": "system",
"value": "Add an instance of createIndex\n"
},
{
"from": "human",
"value": "window.onload = () => {\n var instance = new Index();\n\n var filePath = document.getElementById('filePath');\n var createIndexButton = document.getElementById('createIndexButton');\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug filename : App -> app\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar React = require('react'),\n App = require('./App');\n\nReact.render(<App />, document.body);"
},
{
"from": "gpt",
"value": "'use strict';\n\nvar React = require('rea... | javascript | chosen |
[
{
"from": "system",
"value": "Add more accurate time to unit observations\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport moment from 'moment';\nimport {translate} from 'react-i18next';\n\nconst formatTime = (time: Date, t: Function) => {\n const now = moment();\n let loo... | javascript | chosen |
[
{
"from": "system",
"value": "Update chart view on state changes.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar React = require('react');\n\n// Styles\nvar compStyles = require('./ChartView.module.css');\n\nvar ChartView = React.createClass({\n\tshouldComponentUpdate: function () {\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Add default value for map center\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport layout from '../templates/components/flexberry-map';\nimport ContainerMixin from 'ember-flexberry-gis/mixins/layercontainer';\n\nexport default Ember.Component.ext... | javascript | chosen |
[
{
"from": "system",
"value": "Add select and tex area glodal class\n"
},
{
"from": "human",
"value": "(function($,undefined){\n \n $(document).on('click', '.delete-confirm', function(){\n var $this = $(this);\n $('#DeleteUser').find('#confirmDeleteUser').data('url', $this.att... | javascript | chosen |
[
{
"from": "system",
"value": "Sort entryproducts api by latest entrys, limit to 20\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst hooks = require('./hooks');\nconst Promise = require('bluebird');\n\nmodule.exports = function(){\n const app = this;\n\n app.use('/entryproducts', {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change default number of colors reported (6 --> 5)\n"
},
{
"from": "human",
"value": "var ColorThief = require('color-thief')\n, rgbToHex = require('rgb-hex')\n\nvar colorThief = new ColorThief()\n\nmodule.exports = {\n getPalette: getPalette,\n rgbArrayToHex: rgb... | javascript | chosen |
[
{
"from": "system",
"value": "Fix setImmediate is not a function\n"
},
{
"from": "human",
"value": "const next = (iter, callbacks, prev = undefined) => {\n const { onNext, onComplete } = callbacks;\n const item = iter.next(prev);\n const value = item.value;\n\n if (item.done) {\n return o... | javascript | chosen |
[
{
"from": "system",
"value": "Update _data_list structure for charts\n"
},
{
"from": "human",
"value": "\nvar _data_list = [];\n\nfunction fetchDataAndRenderContent () {\n console.log(\"fetchDataAndRenderContent first time!\");\n _data_list = [];\n renderCharts();\n extractDataAndUpdateConte... | javascript | chosen |
[
{
"from": "system",
"value": "Update comment wording from \"should\" to \"might\""
},
{
"from": "human",
"value": "import * as katex from './katex-import.js';\n\nexport class KatexInline extends HTMLElement {\n\n constructor() {\n super();\n this.attachShadow({mode: 'open'});\n this.sh... | javascript | chosen |
[
{
"from": "system",
"value": "Create SweetScroll instance after updated current page order\n"
},
{
"from": "human",
"value": "// @flow\nimport { PureComponent } from 'react'\nimport scrollParent from 'scrollparent'\nimport SweetScroll from 'sweet-scroll'\n\nimport type { Children } from 'react'\... | javascript | chosen |
[
{
"from": "system",
"value": "Change sitemap.db path to module root\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs');\nvar Promise = require('es6-promise').Promise;\nvar sqlite3 = require('sqlite3');\n\nvar file = 'sitemap.db';\nvar dbExists = fs.existsSync(file);\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Add ingredients table row click handler\n"
},
{
"from": "human",
"value": "var mode = 0; //primary\n\nfunction calc_mode() {\n\tvar modes = [\"primary\", \"secondary\", \"tertiary\"];\n\treturn modes[mode];\n}\n\n$(function() {\n\t$(\".add\").button();\n\t$(\".edit\... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to vpc in console\n"
},
{
"from": "human",
"value": "class Resource {\n constructor(region, id, tagMap) {\n this._region = region;\n this._id = id;\n this._tagMap = tagMap || new Map();\n }\n\n get region() { return this._region; }\n get id() {... | javascript | chosen |
[
{
"from": "system",
"value": "FIX - not initialising cache when no cache is supplied\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = {\n // cache system (see https://github.com/BryanDonovan/node-cache-manager)\n Cache: {\n store: \"memory\",\n max: 5000... | javascript | chosen |
[
{
"from": "system",
"value": "Fix code error in template\n"
},
{
"from": "human",
"value": "import ATV from 'atvjs';\n// templates\nimport listTemplate from './templates/list.jade';\n\nlet myPageStyles = `\n.text-bold {\n font-weight: bold;\n}\n.text-white {\n color: rgb(255, 255, 255);\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Add cross domain event tracking\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n // Load Google Analytics libraries\n GOVUK.Analytics.load();\n\n var cookieDomain = (document.domain === 'www.gov.uk') ? '.www.gov.uk' : document.domain;\n\n //... | javascript | chosen |
[
{
"from": "system",
"value": "Fix user bug in talk collections\n"
},
{
"from": "human",
"value": "var ProjectBasedCollection = require('collections/project_based_collection');\n\nvar UserTalkCollections = ProjectBasedCollection.extend({\n url: function() {\n return \"/talk/users/\" + User.cu... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing space to jslint config line.\n"
},
{
"from": "human",
"value": "/*jslint forin: true */\n\nvar log = console.log;\n\nexports.report = function(file, lint) {\n log(file);\n\n var options = [], key, value,\n i, len, pad, e;\n\n for (key in ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix add live promise problem\n"
},
{
"from": "human",
"value": "import { GraphQLBoolean, GraphQLString } from 'graphql';\nimport { createClient } from 'redis';\n\nimport { redisUrl } from '../../config';\n\nconst startLive = {\n type: GraphQLBoolean,\n args: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Modify event listeners to use new html\n"
},
{
"from": "human",
"value": "$().ready(() => {\n loadContentSection().then(() =>{ \n $(\"#loader\").addClass(\"hide\");\n $(\"#real-body\").removeClass(\"hide\");\n $(\"#real-body\").addClass(\"body\");\n });\n... | javascript | chosen |
[
{
"from": "system",
"value": "Support profile.X_specific instead of profile['X-specific'].\n"
},
{
"from": "human",
"value": "if (process.env.NODE_ENV === 'development') {\n ['test1', 'test2'].forEach(createServiceWithName);\n} else {\n throw Error('Test login handlers can only be registered o... | javascript | chosen |
[
{
"from": "system",
"value": "Fix double-click login button issue\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { ScrollView } from 'react-native';\nimport UserAccount from './UserAccount';\nimport CardPreferences from './CardPreferences';\nimport css from '../../styles/c... | javascript | chosen |
[
{
"from": "system",
"value": "Add key prop to ShowCard.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport preload from '../public/data.json'\nimport ShowCard from './ShowCard'\n\nconst Search = React.createClass({\n render () {\n return (\n <div className='search'>\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Rename Promise var to avoid conflict with native promise\n"
},
{
"from": "human",
"value": "var base = require('42-cent-base');\nvar util = require('util');\nvar Promise = require('bluebird');\n\nfunction GatewayMock(options) {\n base.BaseGateway.call(this);\n thi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix data handler name type"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst path = require('path');\n\nmodule.exports = function(options, fieldname, filename) {\n const dir = path.normalize(options.tempFileDir || process.cwd() + '/tmp/');\n\n if (... | javascript | chosen |
[
{
"from": "system",
"value": "Remove link to old css file\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { connect } from 'react-redux';\n\nimport Header from '../components/Header';\n\nrequire('purecss');\nrequire('../css/new.css');\n\nconst IndexView = React.createClass(... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional bikeshed builder actions\n"
},
{
"from": "human",
"value": "import BikeshedBuilderConstants from '../constants/BikeshedBuilderConstants'\n\nexport function navigateAction (context) {\n context.dispatch(BikeshedBuilderConstants.RESET)\n}\n\nexport fun... | javascript | chosen |
[
{
"from": "system",
"value": "Add Y direction, bouncing, slowing\n"
},
{
"from": "human",
"value": "var canvas = document.getElementById('game');\nvar context = canvas.getContext('2d');\n\nvar Ball = function(x, y, radius, context) {\n this.x = x;\n this.y = y;\n this.radius = radius || 10;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor registering, replacing throw by next\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Hoek = require('hoek');\nconst Config = require('./config');\n\nexports.register = function (server, options, next) {\n\n Hoek.assert(server.connections.length... | javascript | chosen |
[
{
"from": "system",
"value": "Read template file when inserting in bdd\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\n\n// connect\nmongoose.connect('mongodb://localhost/website', function(err) {\n if (err) { throw err; }\n});\n\n// Schema\nvar fileSchema = new mongoose... | javascript | chosen |
[
{
"from": "system",
"value": "Send GA event on FxOS build clicks.\n"
},
{
"from": "human",
"value": "jQuery(document).ready(function ($) {\n $('#BuildModal').on('show.bs.modal', function (event) {\n var button = $(event.relatedTarget);\n var recipient = button.data('build');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use debug log for logging."
},
{
"from": "human",
"value": "const crypto = require('crypto');\n\n/**\n * memHandler - In memory upload handler\n * @param {object} options\n * @param {string} fieldname\n * @param {string} filename\n */\nmodule.exports = function(opti... | javascript | chosen |
[
{
"from": "system",
"value": ":gem: Add GCM message & title\n"
},
{
"from": "human",
"value": "var nodegcm = require('node-gcm');\n\n// insert Google Server API Key here\nvar Gcm = exports.Gcm = function (api_key) {\n this.sender = new nodegcm.Sender(api_key); \n};\n\nGcm.prototype.send = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Allow CORS support check for jQuery to pass\n"
},
{
"from": "human",
"value": "var xhr = require('xmlhttprequest').XMLHttpRequest;\nvar relative = /^https?:\\/\\//i;\nvar MyXMLHttpRequest = global.XMLHttpRequest = function() {\n\txhr.apply(this, arguments);\n\n\tvar... | javascript | chosen |
[
{
"from": "system",
"value": "Add optional breach log end timestamp\n"
},
{
"from": "human",
"value": "/**\n * Sustainable Solutions (NZ) Ltd. 2020\n * mSupply Mobile\n */\n\nimport Realm from 'realm';\n\nexport class BreachLog extends Realm.Object {}\n\nBreachLog.schema = {\n name: 'BreachLog'... | javascript | chosen |
[
{
"from": "system",
"value": "Store processes in a global var\n"
},
{
"from": "human",
"value": "'use strict'\nconst grunt = require('gruntfile-api')\nconst fs = require('fs')\nconst path = require('path')\nconst spawn = require('child_process').spawn\nconst gruntfile = fs.readFileSync(path.join... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure tone 1 is on record of the database\n"
},
{
"from": "human",
"value": "var result = {};\n\nload('./lib/bopomofo_encoder.js');\n\nif (!stringsAreUTF8()) {\n throw 'You need UTF-8 enabled SpiderMonkey to do cook the data.';\n quit();\n}\n\nvar line;\nwhile... | javascript | chosen |
[
{
"from": "system",
"value": "Use the logic from sdc-login for zone lookup\n"
},
{
"from": "human",
"value": "/*\n * pushit push hooks\n *\n * Right now, only contains functions that are run in variable expansion\n */\n\n\nvar child_process = require('child_process');\nvar util = require('util')... | javascript | chosen |
[
{
"from": "system",
"value": "Mark updates pending at boot so initial render is performed\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar postal = require('postal');\nvar raf = require('raf');\nvar FluzoStore = require('fluzo-store')(postal);\n\nvar fluzo_channel = postal.channel('fluzo'... | javascript | chosen |
[
{
"from": "system",
"value": "Create index for unique name\n"
},
{
"from": "human",
"value": "// Code to be run on server start.\n\nvar local = require('./local');\nvar bcrypt = require('bcryptjs');\n\nmodule.exports = function (db) {\n\n (function insertDefaultUser() {\n\n var user = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add onReset() to clear collections\n"
},
{
"from": "human",
"value": "Donations.App = Space.Application.define('Donations.App', {\n\n configuration: {\n appId: 'Donations.App'\n },\n\n requiredModules: [\n 'Space.accounts',\n 'Space.accountsUi',\n 'Do... | javascript | chosen |
[
{
"from": "system",
"value": "Check that te element exists before removing it\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function () {\n this.elements = [];\n\n this.contains = function(element) {\n if (this.elements.indexOf(element) != -1) {\n return true;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra elements from Header\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport AppBar from 'material-ui/AppBar';\n\nimport './Header.css';\n\nconst SearchBar = () => (\n <div>Hello</div>\n);\n\nclass Header extends Component ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix incorrect VO for selected check-in date\n"
},
{
"from": "human",
"value": "import getPhrase from './getPhrase';\nimport { BLOCKED_MODIFIER } from '../constants';\n\nexport default function getCalendarDaySettings(day, ariaLabelFormat, daySize, modifiers, phrases)... | javascript | chosen |
[
{
"from": "system",
"value": "Deal with optional methods too\n"
},
{
"from": "human",
"value": "import {VueComponentFactory} from \"./vueComponentFactory\";\n\nclass VueFrameworkComponentWrapper {\n constructor(parent) {\n this._parent = parent;\n }\n\n wrap(component, methodList... | javascript | chosen |
[
{
"from": "system",
"value": "Add a missing trailing comma\n"
},
{
"from": "human",
"value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/... | javascript | chosen |
[
{
"from": "system",
"value": "Disable cache on ie and edge\n"
},
{
"from": "human",
"value": "/**\n * @fileoverview This file provides the \"app\" namespace, which is the\n * application's main namespace. And it defines the application's Angular\n * module.\n */\ngoog.provide('app');\n\ngoog.req... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the OccurrenceOrderPlugin that is no longer necessary in Webpack2.\nAdd the LoaderOptionsPlugin that ensures that output of loaders is minified.\n"
},
{
"from": "human",
"value": "/*\n * This defines the production settings for our webpack build.\n * Anything... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with sorting after events added\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport { getContext, mapProps, compose } from 'recompose';\nimport { combineHandlers } from '../utils/compositionUtils';\n\nconst EnhancedHeadingCel... | javascript | chosen |
[
{
"from": "system",
"value": "Test more cases for array\n"
},
{
"from": "human",
"value": "/**\n * Dependencies\n */\n\nvar test = require('tape')\nvar isEmptyObject = require('../')\n\n/**\n * Tests\n */\n\ntest('isEmptyObject(obj)', function(assert) {\n assert.equal(isEmptyObject({}),... | javascript | chosen |
[
{
"from": "system",
"value": "Use `error` instead of `load`."
},
{
"from": "human",
"value": "/** Implements process.nextTick() in a browser environment.\n * Where other implementations use postMessage, this uses the Image constructor and data URIs, because postMessage spam sucks.\n * However,... | javascript | chosen |
[
{
"from": "system",
"value": "Add secure update and remove methods\n"
},
{
"from": "human",
"value": "ActivityTypes = new Mongo.Collection('activityTypes');\n\nvar ActivityTypesSchema = new SimpleSchema({\n name: {\n type: String\n }\n});\n\nActivityTypes.allow({\n insert: function () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mouse position on transformed canvas\n"
},
{
"from": "human",
"value": "export default class MouseController {\n constructor(game, canvas, controllableItems) {\n this.game = game\n this.items = controllableItems\n canvas.addEventListener('mousemove', t... | javascript | chosen |
[
{
"from": "system",
"value": "Add ASTTransformer and StaticFilterCompiler to adapter API\n\nASTTransformer can be used by adapters which transform filter AST before\nprocessing, e.g. the InfluxDB adapter.\n\nStaticFilterCompiler is the new base class for filter compilers.\n"
},
{
"from": "human",
... | javascript | chosen |
[
{
"from": "system",
"value": "Add Metalsmith plugins to list of ignored unused packages\n\nAdd metalsmith-* to list of packages ignored when checking unused\r\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst depcheck = require('depcheck');\nconst ora = require('ora');\n\nfunction skipUn... | javascript | chosen |
[
{
"from": "system",
"value": "Install Babel 5 on postinstall\n\nBabel 6 will fail.\n"
},
{
"from": "human",
"value": "// adapted based on rackt/history (MIT)\n// Node 0.12+\nvar execSync = require('child_process').execSync;\nvar stat = require('fs').stat;\n\nfunction exec(command) {\n execSync(... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure name param is valid\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport type from 'type-of';\n\nclass CustomError extends Error {\n\n constructor(err, name = 'Error') {\n super();\n\n if (_.isString(err)) {\n this.message = err;\... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.