conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix dir of files to be updated in `replace()` function for babel plugin\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst {readFileSync, writeFileSync} = require('fs')\n\n\nfunction replace(name)\n{\n const {dest, packageName, src} = this\n\n const p... | javascript | chosen |
[
{
"from": "system",
"value": "Deploy to GitHub pages [ci skip]\n"
},
{
"from": "human",
"value": "import BackgroundsPlus from \"./backgrounds-plus.jpg\";\n\nexport default {\n BackgroundsPlus\n};\n"
},
{
"from": "gpt",
"value": "import React from \"react\";\nimport Image from \"../.... | javascript | chosen |
[
{
"from": "system",
"value": "Check errorMessage state before resetting error message\n"
},
{
"from": "human",
"value": "export function resetErrorMessage() {\n return {\n type: 'RESET_ERROR_MESSAGE'\n }\n}\n"
},
{
"from": "gpt",
"value": "export function resetErrorMessage() {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Move to user (move to seperate file later)\n"
},
{
"from": "human",
"value": "import API from '../api';\n\n/** Action Creators */\nconst setDrivers = drivers => {\n return {\n type: \"SET_DRIVERS\",\n drivers\n }\n}\n\nexport const showModal = driver => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"take node0 child.send args into consideration\"\n\nThis reverts commit eb0cb99d4c78046db8024d3bb748a9af3759c2ab.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n'use strict';\n\nvar spawn = require('child_process').spawn;\n\nif (process.send) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable psi socket for now, to spam the console less.\n"
},
{
"from": "human",
"value": "import createNydus from 'nydus-client'\n\nconst psiSocket = createNydus('wss://lifeoflively.net:33198')\npsiSocket.connect()\n\nexport default psiSocket\n"
},
{
"from": ... | javascript | chosen |
[
{
"from": "system",
"value": "test: Add failing test to reproduce issue.\n\n#137\n"
},
{
"from": "human",
"value": "/* eslint-env jasmine, mocha */\n\ndescribe('DocumentFragment', () => {\n it('should report the correct parent node for nested nodes', () => {\n const frag = document.createDoc... | javascript | chosen |
[
{
"from": "system",
"value": "Correct timeout to 3 seconds\n\nAvoid repeated print attempts within 3 seconds of the original (this\nwas the original intent, but the time period was set to 1 second)\n"
},
{
"from": "human",
"value": "// Extension to monitor attempts to print pages.\n(function () ... | javascript | chosen |
[
{
"from": "system",
"value": "Set back to just Chrome\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 'PhantomJS'\n ],\n launch_in_dev: [\n 'PhantomJS',\n 'Chrome'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix result value ID key access\n"
},
{
"from": "human",
"value": "import lodashFind from 'lodash/find';\nimport lodashMap from 'lodash/map';\nimport lodashExtend from 'lodash/extend';\nimport lodashEach from 'lodash/each';\n\nexport default (source, itemArg, opts) =... | javascript | chosen |
[
{
"from": "system",
"value": "Fix applying changed function names\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, lightenColor, darken } from '@storybook/theming';\nimport { Link } from '@storybook/router';\n\nconst baseStyle =... | javascript | chosen |
[
{
"from": "system",
"value": "Add guard to prevent TypeError during paste\n"
},
{
"from": "human",
"value": "import { isArray, contains } from 'underscore';\n\nexport default {\n run(ed) {\n const em = ed.getModel();\n const clp = em.get('clipboard');\n const selected = ed.getSelected(... | javascript | chosen |
[
{
"from": "system",
"value": "Update test according to data from CLDR 28\n"
},
{
"from": "human",
"value": "define([\n\t\"src/core\",\n\t\"src/bundle/parent_lookup\",\n\t\"json!cldr-data/supplemental/parentLocales.json\"\n], function( Cldr, parentLookup, parentLocalesJson ) {\n\n\tdescribe( \"Bu... | javascript | chosen |
[
{
"from": "system",
"value": "Add first real runtime test\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport UserDefinition from '../UserDefinition';\n\ndescribe('runtime', () => {\n it('should instantiate UserDefinition', () => {\n expect(new UserDefinition());\n });\n});\n"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Switch notebook list to PouchDB\n"
},
{
"from": "human",
"value": "module.exports = {\n replace: true,\n template: require('./template.html'),\n data: function() {\n return {\n apiUrl: '_view/notebooks?reduce=false&include_docs=true',\n items: []\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix conf.get after converting to env variables.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar mongoose = require('mongoose');\nvar cors = require('cors');\nvar logger = require('morgan');\nvar bodyParser = require('body-parser');\nvar con... | javascript | chosen |
[
{
"from": "system",
"value": "Use the callback type from emitter\n"
},
{
"from": "human",
"value": "import Emitter from '../emitter'\n\ntype callback = (input?: mixed) => void\n\nexport default function chain(superclass: Emitter): Emitter {\n return class extends superclass {\n on(name: stri... | javascript | chosen |
[
{
"from": "system",
"value": "Add index by (gone_status is null) to users table\n\n"
},
{
"from": "human",
"value": "/**\n * The *gone_status* is null for the active users. If it is not null then the\n * user shows as deleted in any public contexts. Actual values can be:\n * - 1: user is suspen... | javascript | chosen |
[
{
"from": "system",
"value": "fix(linter): Fix Arrow function should not return assignment\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst cheerio = require('cheerio');\nconst http = require('http');\nconst querystring = require('querystring');\n\nconst getZip = data => {\n return new... | javascript | chosen |
[
{
"from": "system",
"value": "Add jsdoc comment to main module.\n"
},
{
"from": "human",
"value": "// Copyright (c) Rotorz Limited. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root.\n\nexport default function setup() {\n}\n"
},
{
"from": "gpt"... | javascript | chosen |
[
{
"from": "system",
"value": "Remove not working libs to make the package lighter\n"
},
{
"from": "human",
"value": "export { default as createApolloClient } from './createApolloClient';\nexport { default as graphQLClientServer } from './graphQLClientServer';\nexport { default as jsonGraphqlExpr... | javascript | chosen |
[
{
"from": "system",
"value": "Change slice test to use host object\n\nThese renditions must be able to use host objects"
},
{
"from": "human",
"value": "/*global canCall */\n\n/*\nDescription:\nCutting edge where possible, wide support\n*/\n\n/*\nAuthor:\nGraham Veal\n*/\n\nvar toArray;\n\nif (c... | javascript | chosen |
[
{
"from": "system",
"value": "Add name property, so plugin could be found by Player.getPlugin()\n"
},
{
"from": "human",
"value": "\nimport {Video} from 'kaleidoscopejs';\nimport {ContainerPlugin} from 'clappr';\n\nexport default class Video360 extends ContainerPlugin {\n constructor(container)... | javascript | chosen |
[
{
"from": "system",
"value": "Update paths to reqwest.js and neat-complete.js\n"
},
{
"from": "human",
"value": "var config = {\n paths: {\n addressfinder_magento: 'AddressFinder_Widget/js/addressfinder_magento',\n addressfinder: 'https://api.addressfinder.io/assets/v3/core',\n reqwest... | javascript | chosen |
[
{
"from": "system",
"value": "Add webpack to list of preset exports.\n"
},
{
"from": "human",
"value": "module.exports = [\n 'babel',\n 'base',\n 'flow',\n 'husky',\n 'jest',\n 'rollup',\n 'typescript'\n].reduce((prev, curr) => {\n prev[curr] = require(`./${curr}`);\n return prev;\n}, {... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment about disabled xss test.\n"
},
{
"from": "human",
"value": "const numberOfPlannedTests = 7\ncasper.test.begin('test-xss', numberOfPlannedTests, (test) => {\n casper.start(`http://${testhost}`, function () {\n })\n\n casper.then(function () {\n cons... | javascript | chosen |
[
{
"from": "system",
"value": "Make Stack server example better.\n"
},
{
"from": "human",
"value": "require('modbus-stack');\nrequire('modbus-stack/server').createServer(\n require('stack')(\n // Handle \"Read Coils\" (well, we just call `next()`...)\n functionCode(1, function(req, res, ne... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the drag'n drop when entering a fipe.\n"
},
{
"from": "human",
"value": "(function() {\n\n App.Views.Fipe = Backbone.View.extend({\n events: {\n // Classic file selection\n 'click .upload a' : 'browseFiles',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change format of content of <time> tags\n\nThe method of formatting is also being changed - from the one using one\nof the methods (toLocaleString or toLocaleDateString) of Date object to\none using an Intl.DateTimeFormat instance.\n"
},
{
"from": "human",
"value": ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Vue router fallback parameter\n"
},
{
"from": "human",
"value": "import Vue from 'vue'\nimport Router from 'vue-router'\nimport IndexPage from '@/components/IndexPage'\nimport NodesPage from '@/components/NodesPage'\nimport PlatformPage from '@/components/pla... | javascript | chosen |
[
{
"from": "system",
"value": "Use error string in definition\n"
},
{
"from": "human",
"value": "module.exports = {\n parser: 'babel-eslint',\n rules: {\n // Enforce using all arguments\n // Allow ignoring arguments with underscore prefix\n 'no-unused-vars': [2, { args: 'all', argsIgno... | javascript | chosen |
[
{
"from": "system",
"value": "Move sock setup in spec to a beforeEach\n"
},
{
"from": "human",
"value": "describe('Sock object', function() {\n var socket;\n var pong;\n var joinRoom;\n beforeEach(function() {\n });\n\n afterEach(function() {\n });\n\n it('should exist', function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable action buttons until AJAX is finished.\n"
},
{
"from": "human",
"value": "/* global confirm */\n\nconst $ = require('jquery');\n\nconst Keys = require('keys/dist/client');\n\n$(() => {\n $('body').on('click', 'button[data-keys-action]', ev => {\n ev.prev... | javascript | chosen |
[
{
"from": "system",
"value": "Fix epl-traffic WS socket route\n"
},
{
"from": "human",
"value": "// @flow\nimport { onWithStore } from '../../sockets';\nexport default onWithStore((store, on) => {\n return on(\n 'epl_dashboard_EPL',\n {\n 'traffic-info': data => {\n console.lo... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Removed superfluous assignments to 'tail'\"\n\nThis reverts commit c7bce38240926b9bb51f1b94472f63c408105ff0.\n"
},
{
"from": "human",
"value": "'use strict'\n\nfunction reusify (Constructor) {\n var head = new Constructor()\n\n function get () {\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Add textContent for cross-browser compatibility.\n\nFirefox doesn't appear to like `innerText`."
},
{
"from": "human",
"value": "'use strict';\n\ndragula([$('left1'), $('right1')]);\ndragula([$('left2'), $('right2')], { copy: true });\ndragula([$('left3'), $('right3... | javascript | chosen |
[
{
"from": "system",
"value": "Fix undefined error in test\n"
},
{
"from": "human",
"value": "var React = require('react');\nvar TestUtils = require('react-addons-test-utils');\nvar expect = require('expect');\n\nvar sdk = require('matrix-react-sdk');\n\nvar test_utils = require('../../test-utils... | javascript | chosen |
[
{
"from": "system",
"value": "Reorder logic to make the intention clearer\n"
},
{
"from": "human",
"value": "define([\n 'extensions/views/view'\n],\nfunction (View) {\n var SingleStatView = View.extend({\n\n changeOnSelected: false,\n valueTag: 'strong',\n\n initialize: function () {\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix failing tests by adding symbol polyfill\n"
},
{
"from": "human",
"value": "/*jshint node:true*/\n/* global require, module */\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n var app = new EmberAddon(de... | javascript | chosen |
[
{
"from": "system",
"value": "Update end user sockend component name\n"
},
{
"from": "human",
"value": "var app = require('express')(),\n server = require('http').Server(app),\n io = require('socket.io')(server),\n cote = require('cote')({multicast: '239.1.11.111'});\n\napp.get('/', fun... | javascript | chosen |
[
{
"from": "system",
"value": "Raise maxListeners so if you have 16 cores it doesn't complain\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nvar log = require('./src/log.js'),\n Parent = require('./src/parent.js'),\n ctrl = require('daemonctrl'),\n currentParent = new Parent(),\... | javascript | chosen |
[
{
"from": "system",
"value": "GPII-1852: Fix for (quietly reported) test failure in registryResolver\n"
},
{
"from": "human",
"value": "/*\n * Windows Utilities Unit Tests\n *\n * Copyright 2015 Raising the Floor - International\n *\n * Licensed under the New BSD license. You may not use this fi... | javascript | chosen |
[
{
"from": "system",
"value": "Add hint if no keywords found\n"
},
{
"from": "human",
"value": "const fs = require('fs')\nconst lang = process.argv[2]\nconst promptly = require('promptly')\nif (!lang) {\n const files = fs.readdirSync('dist')\n const langs = files.map(tag => tag.match(/-(.+)\\./... | javascript | chosen |
[
{
"from": "system",
"value": "Change default adapter for new apps to filesystem\n"
},
{
"from": "human",
"value": "/*\n * Geddy JavaScript Web development framework\n * Copyright 2112 Matthew Eernisse (mde@fleegix.org)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Fix letter case of Image namespace\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar uInteger = require('../../number/integer/u-integer');\n\nmodule.exports = require('../file').create('image', {\n\twidth: uInteger,\n\theight: uInteger\n});\n"
},
{
"fr... | javascript | chosen |
[
{
"from": "system",
"value": "Check to see if Alcatraz is defined on window before setting root_url\n"
},
{
"from": "human",
"value": "import config from '../config/environment';\n\nexport function initialize() {\n window.Alcatraz.rootUrl = config.alcatrazClient.rootUrl;\n}\n\nexport default {\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow calling `scrollVertical` with only the target\n\nAll the options are optional, but if an empty object is not passed\nthe `scrollVertical` method blows up with cannot reat offset of undefined.\n\nNow we can scrollVertical('#id') instead of having scrollVertical('#id',{});\... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out example custom matcher."
},
{
"from": "human",
"value": "beforeEach(function () {\n jasmine.addMatchers({\n // EXAMPLE\n // toBePlaying: function () {\n // return {\n // compare: function (actual, expected) {\n // var player =... | javascript | chosen |
[
{
"from": "system",
"value": "Make it possible to do a password input field"
},
{
"from": "human",
"value": "(function registerInputFieldLayout(){\n \n widget.layout.register( 'inputField', createInputField, {\n description: \"TODO!\"\n }, {\n styleClass: 'inputFieldHolder'\n } );\n\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Stop sending request immediately, instead, sending the request if user stops changing the value for some time.\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport UserList from './UserList';\nimport LocationBox from './LocationBox';\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for Safari strict CSP for websockets issue\n"
},
{
"from": "human",
"value": "BrowserPolicy.content.allowOriginForAll('*.googleapis.com');\nBrowserPolicy.content.allowOriginForAll('*.gstatic.com');\nBrowserPolicy.content.allowOriginForAll('*.bootstrapcdn.com');\... | javascript | chosen |
[
{
"from": "system",
"value": "Add announcements to API client\n"
},
{
"from": "human",
"value": "import api from './api';\nimport Core from './core';\nimport Auth from './auth';\n\nexport default function createAPI(apiRoot) {\n const core = new Core(apiRoot);\n const API = api.bind(null, core)... | javascript | chosen |
[
{
"from": "system",
"value": "[NO-JIRA]: Fix errors overview actions naming\n"
},
{
"from": "human",
"value": "import { fetchErrorCatalog } from '../../../services/errors.service.js'\n\n// ------------------------------------\n// Constants\n// ------------------------------------\nconst GET_ENVI... | javascript | chosen |
[
{
"from": "system",
"value": "feat(Cursor): Make methods `cursorToData` and `dataToCursor` public\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport { composeWithConnection } from './composeWithConnection';\n\nexport default composeWithConnection;\n\nexport {\n composeWithConnection\n};\n... | javascript | chosen |
[
{
"from": "system",
"value": "Set base path to work in /app\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { createStore } from 'redux';\nimport coordinateCommonsApp from './reducers';\nimport Ac... | javascript | chosen |
[
{
"from": "system",
"value": "Add an API to clear cache\n"
},
{
"from": "human",
"value": "var createCache = require('uber-cache');\n\nvar defaultSize = 100;\n\nfunction normalizeOptions(options) {\n options = options || {};\n\n options.size = options.size || defaultSize;\n\n return options;\... | javascript | chosen |
[
{
"from": "system",
"value": "Set minimize option to false to store empty objects\n"
},
{
"from": "human",
"value": "/*\n** Module dependencies\n*/\nvar mongoose = require('mongoose');\n\nvar Schema = mongoose.Schema;\n\nvar SituationSchema = new Schema({\n _updated: Date,\n status: { type... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor config checking into separate class\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar requiredKeys = ['url','type']\n\nclass DataService {\n constructor(config) {\n this.config = this.validate(config)\n this.data = null\n }\n\n validate(confi... | javascript | chosen |
[
{
"from": "system",
"value": "Add module masterlist to helpers\n"
},
{
"from": "human",
"value": "// function checkPermissions(bot, message) {\n// return true;\n// }\n\n// function disabledMessage(bot, message) {\n// }\n\n// module.exports = {\n// checkPermissions: checkPermissions,\n// ... | javascript | chosen |
[
{
"from": "system",
"value": "Optimize loop by caching lowercase version of comparison.\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\n\n/** \n * Represents an ActiveDirectory user account.\n *\n * @private\n * @param {Object} [properties] The properties to assign to the newl... | javascript | chosen |
[
{
"from": "system",
"value": "Store failed JKF to the sessionStorage instead of console.log\n"
},
{
"from": "human",
"value": "export default class Api {\n static fetchJKF() {\n return fetch('/jkf')\n .then(response => response.json());\n }\n static storeJKF(jkf) {\n const body = J... | javascript | chosen |
[
{
"from": "system",
"value": "Update to correct path for stage & prod\n"
},
{
"from": "human",
"value": "const STARWARS = {\n 'star wars': '/img/search-chewie.gif',\n 'darth vader': '/img/search-darth-vader.gif',\n r2d2: '/img/search-r2d2.gif',\n chewie: '/img/search-chewie.gif',\n 'luke sk... | javascript | chosen |
[
{
"from": "system",
"value": "Fix items in review feed were not linked\n"
},
{
"from": "human",
"value": "import _ from \"lodash\";\nimport Feed from \"../feed\";\nimport Narou from \"../../sites/narou\";\nimport { translate } from \"../../util/chrome-util\";\n\n/**\n * Feed fetcher of received ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove -n in favor of --as\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport path from 'path';\nimport fs from 'fs';\nimport * as pose from '.';\nimport actions from './actions';\n\nconst opts = yargs\n.usage('$ pose <actio... | javascript | chosen |
[
{
"from": "system",
"value": "Revert factory name to fustyFlowFactory case for backward compatibility reasons\n"
},
{
"from": "human",
"value": "(function (Flow, FustyFlow, window) {\r\n 'use strict';\r\n\r\n var FustyFlowFactory = function (opts) {\r\n var flow = new Flow(opts);\r\n if ... | javascript | chosen |
[
{
"from": "system",
"value": "Use functional JSX component. Update to `loaderUtils` to support options.\n"
},
{
"from": "human",
"value": "'use strict';\nvar fs = require('fs');\nvar path = require('path');\nvar marked = require('marked');\nvar setCase = require('case')\nvar Renderer = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Add { after 'if' condition\n\nFixes #5\n"
},
{
"from": "human",
"value": "import {createFilter} from 'rollup-pluginutils'\nimport Compiler from './compiler'\nimport objectAssign from 'object-assign'\nimport path from 'path'\n\nexport default function plugin (options... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Make spyOnTree() an arrow function\n"
},
{
"from": "human",
"value": "// Copyright (c) 2017 The Regents of the University of Michigan.\n// All Rights Reserved. Licensed according to the terms of the Revised\n// BSD License. See LICENSE.txt for details.\n\ncons... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error with gamertags that contain spaces"
},
{
"from": "human",
"value": "var https = require(\"https\");\n\nvar options = {\n host: 'www.haloapi.com' ,\n path: '',\n method: 'GET',\n headers: {\"Ocp-Apim-Subscription-Key\": \"\"}\n};\n\nfunction httpWrapper... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary check from block-no-empty\n"
},
{
"from": "human",
"value": "import {\n cssStatementHasBlock,\n cssStatementHasEmptyBlock,\n report,\n ruleMessages\n} from \"../../utils\"\n\nexport const ruleName = \"block-no-empty\"\n\nexport const messages ... | javascript | chosen |
[
{
"from": "system",
"value": "Add trademark symbol to control component\n"
},
{
"from": "human",
"value": "/*renders control panel with associated buttons and display*/\nimport React from 'react';\nimport CountDisplay from 'CountDisplay';\nimport StrictButton from 'StrictButton';\nimport OnOffBu... | javascript | chosen |
[
{
"from": "system",
"value": "Update references to build in chart tooltips\n"
},
{
"from": "human",
"value": "(function(){\n 'use strict';\n\n define([\n 'app',\n 'utils/chartHelpers',\n 'utils/duration',\n 'utils/escapeHtml'], function(app, chartHelpers, duration, escapeHt... | javascript | chosen |
[
{
"from": "system",
"value": "Allow anything to be edited via Types list\n\nBit nuts...but now it can edit itself!\n"
},
{
"from": "human",
"value": "function(doc) {\n if ('type' in doc && doc.type !== 'Notebook' && doc.type !== 'object') {\n emit([doc.type, doc.name], 1);\n }\n}\n"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Increase timeout warning to 15 minutes.\n"
},
{
"from": "human",
"value": "import React, { PropTypes, Component } from 'react'\nimport moment from 'moment'\n\nimport style from './../../../styles/organisms/ThermostatForm.scss'\n\nclass ThermostatForm extends Compone... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong validation (values are wrongly validated as the column name)\n"
},
{
"from": "human",
"value": "var resolver = require('../resolver');\n\nfunction Translator(domain) {\n this.domain = domain;\n this.initialize();\n}\n\nTranslator.prototype = {\n TYPE_AD... | javascript | chosen |
[
{
"from": "system",
"value": "Reconnect websocket when connection is lost.\n"
},
{
"from": "human",
"value": "/* Really simple events dispatcher using Websockets.\n * We expect socket.io lib to be on the server side.\n *\n * Usage:\n * events_dispatcher.bind('EventName', callback(jsondata));\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix calling sendAction on destroyed object error\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport layout from '../templates/components/resize-detector';\n\nconst {\n inject: { service },\n run: { scheduleOnce, bind }\n} = Ember;\n\nexport defa... | javascript | chosen |
[
{
"from": "system",
"value": "Rename from either to Either\n"
},
{
"from": "human",
"value": "import compose from './compose'\nimport curry from './curry'\nimport either from './either'\nimport map from './map'\nimport merge from './merge'\nimport partial from './partial'\nimport prop from './pr... | javascript | chosen |
[
{
"from": "system",
"value": "Add space character after code element\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react'\n\nexport default function Counter({\n increment,\n incrementIfOdd,\n decrement,\n counter,\n}) {\n return (\n <section>\n <p className=\"... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite tab switching with jQuery\n"
},
{
"from": "human",
"value": "window.onload = function() {\n\n var tabs = function() {\n var args = models.application.arguments;\n var current = document.getElementById(args[0]);\n var sections = docume... | javascript | chosen |
[
{
"from": "system",
"value": "Add Super to the printable types.\n"
},
{
"from": "human",
"value": "export function ClassDeclaration(node) {\n this.ensure(\"class\");\n this.ensureSpace();\n\n if (node.id) {\n this.print(node.id);\n this.ensureSpace();\n }\n\n if (nod... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up comments and console.logs.\n"
},
{
"from": "human",
"value": "$(document).ready( function () {\n $(\"button.upvote\").click( function() {\n var commentId = $(\".upvote\").data(\"id\");\n event.preventDefault();\n // alert(\"Hi, I am data id: \" + ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix use of deprecated GLOBAL\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar namespace = require( './../lib' );\n\n// Assign all modules to the GLOBAL namespace:\nvar ns = namespace( GLOBAL );\n\nvar bool = ( typeof ns.erf === 'function' );\nconsole.log( boo... | javascript | chosen |
[
{
"from": "system",
"value": "Add if to check if $ is globally used\n"
},
{
"from": "human",
"value": "angular\n .module('lnPatterns')\n .directive('lnOGravityForm', lnOGravityForm);\n\n/**\n * TODO:\n * - Expand the list of supported input types (see comments in form parser)\n * - Add i... | javascript | chosen |
[
{
"from": "system",
"value": "Enable to upload image by paste\n"
},
{
"from": "human",
"value": "Dropzone.autoDiscover = false;\n\ndocument.addEventListener(\"turbolinks:load\", function() {\n //Only work at words form page\n if ($('#word_body').length == 0) { return; }\n\n //Dropzone.js\n v... | javascript | chosen |
[
{
"from": "system",
"value": "Correct bug in producer; producer always writes to partition 0 even if a specific partition is set in the payload.\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction DefaultPartitioner() {\n this.getPartition = function () {\n return 0;\n }\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use AttachUser middleware before verifyAdmin.\n"
},
{
"from": "human",
"value": "const userController = require('../controllers/user');\nconst authenticationMiddleware = require('../middleware/authentication');\nconst express = require('express');\n\nconst router = ... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure number is positive, in case of wrong setting of local time\n"
},
{
"from": "human",
"value": "'use strict';\n\n// To make id smaller we get microseconds count from more recent date\nvar start = Date.UTC(2012, 12, 21, 12, 0, 0, 0) * 1000\n\n// Prefix with n... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for browsersync configuration in external rc file\n"
},
{
"from": "human",
"value": "var historyFallback = require('connect-history-api-fallback');\nvar log = require('connect-logger');\nvar yargs = require('yargs');\nvar sync = require('browser-sync').c... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify the calculation by removing one conditional\n"
},
{
"from": "human",
"value": "/**\n * @author Martin Giger\n * @module tank-treads\n * @license MIT\n */\n\nvar HALF_PI = Math.PI / 2;\nvar THREE_HALF_PI = Math.PI + HALF_PI;\n\n/**\n * Calculates the speed o... | javascript | chosen |
[
{
"from": "system",
"value": "Add ObjectLocator test for case where object has no dependencies\n"
},
{
"from": "human",
"value": "let fs = require('fs');\nlet objLoc = require('../src/ObjectLocator');\nvar expect = require('chai').expect;\n\ndescribe('Object Locator Tests', () => {\n it('Shou... | javascript | chosen |
[
{
"from": "system",
"value": "Send alert ID to UI\n\nThis will allow alert detail page links on the alert list page to work again."
},
{
"from": "human",
"value": "import { Paginator } from '../../utils';\nimport template from './alerts-list.html';\n\nconst stateClass = {\n ok: 'label label-suc... | javascript | chosen |
[
{
"from": "system",
"value": "Save and load data about corporations using LocalStorageService\n"
},
{
"from": "human",
"value": "app.controller('myCtrl', function($scope, corporations) {\n $scope.apps = corporations.information();\n $scope.selectedFactions = shuffle($scope.apps).slice(0,3)\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix embroider build in CI\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\nconst { maybeEmbroider } = require('@embroider/test-setup');\n\nprocess.env.buildTarget = EmberAddon.env();\n\nmodule.exp... | javascript | chosen |
[
{
"from": "system",
"value": "Update gulp file to build a clean version of prod. Sequence the tasks\nand update them to include needed assets.\n"
},
{
"from": "human",
"value": "var gulp = require(\"gulp\");\nvar usemin = require(\"gulp-usemin\");\nvar ngmin = require(\"gulp-ngmin\");\nvar uglif... | javascript | chosen |
[
{
"from": "system",
"value": "Use an intejob delay of 0 for work queue\n"
},
{
"from": "human",
"value": "/**\n *\n * Delay jobs to make the page remain responsive during expensive jobs.\n *\n * Usage:\n *\n * require([\"work_queue\"], function(_work_queue) {\n * _.each(ids, function(id) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "ENH: Add a reset call before noCallThru to prevent reusing stale modules in normal requires\n"
},
{
"from": "human",
"value": "var through = require('through');\nmodule.exports = function (file, opts) {\n if (file === require.resolve('../index')) return t... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to array length for link number\n"
},
{
"from": "human",
"value": "/**\n * Home controller definition\n * @scope Controllers\n */\ndefine(['./module', 'jquery', './home-directives'], function(controllers, $) {\n 'use strict';\n\n controllers.controller(... | javascript | chosen |
[
{
"from": "system",
"value": "Make stub creation more concise\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar expect = require('chai').expect\n , twilioCaller = require('../../lib/twilio-caller')\n , sinon = require('sinon')\n , mockery = require('mockery');\n\ndescribe('twilio-caller... | javascript | chosen |
[
{
"from": "system",
"value": "Allow loading without a callback"
},
{
"from": "human",
"value": "/*global _, Backbone, lumbarLoader */\n(function() {\n lumbarLoader.initEvents = function() {\n // Needs to be defered until we know that backbone has been loaded\n _.extend(lumbarLoader, Backb... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.