conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix error message if command is not found\n"
},
{
"from": "human",
"value": "import defaultCommands from './commands'\nimport cliPrompter from './prompters/cliPrompter'\nimport cliOutputter from './outputters/cliOutputter'\n\nexport default class CommandRunner {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a title for avatar hover\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport classNames from 'classnames';\n\nclass UserAvatar extends React.Component {\n static propTypes = {\n user: React.PropTypes.shape({\n name: React.PropTypes.str... | javascript | chosen |
[
{
"from": "system",
"value": "Change slice to splice in .off.\n"
},
{
"from": "human",
"value": "Minimitter = function Minimitter() {\n this.listeners = {};\n};\n\nMinimitter.prototype.on = function(name, callback) {\n this.listeners[name] = this.listeners[name] || [];\n this.listeners[name].... | javascript | chosen |
[
{
"from": "system",
"value": "Disable most keyboard commands and controls\n"
},
{
"from": "human",
"value": "let config = {\n reveal: {\n height: 720,\n history: true,\n keyboard: {\n //27: function() { console.log(\"ESC pressed\"); return true },\n //37: function() { console... | javascript | chosen |
[
{
"from": "system",
"value": "Handle timezones in datepicker binding by resolving the string yy-mm-dd date into the local offset date. This prevents 2013-12-31 resolving into 2013-12-30 19:00 EST (for example).\n"
},
{
"from": "human",
"value": "define(['knockout'], function (ko) {\n\tko.bindin... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug in delete action, wrong widget notified"
},
{
"from": "human",
"value": "/*\n---\n\nscript: Delete.js\n\ndescription: Deletes a widget or element\n\nlicense: Public domain (http://unlicense.org).\n\nauthors: Yaroslaff Fedin\n\nrequires:\n - LSD.Action\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add dots to indicate a non-empty object\n"
},
{
"from": "human",
"value": "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in complian... | javascript | chosen |
[
{
"from": "system",
"value": "Add default empty args to switchView\n"
},
{
"from": "human",
"value": "import Model from '../base/model';\n\n\nexport default class ViewSwitcher {\n constructor(app, element) {\n this.app = app;\n this.element = element;\n\n this.currentView = null;\n }\... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for second `config` param\n"
},
{
"from": "human",
"value": "import { ApolloClient } from 'apollo-client';\nimport { InMemoryCache } from 'apollo-cache-inmemory';\nimport { createUploadLink } from 'apollo-upload-client';\nimport csrf from '~/lib/utils/cs... | javascript | chosen |
[
{
"from": "system",
"value": "Update test to accept compTarget array\n"
},
{
"from": "human",
"value": "var assert = require(\"chai\").assert;\nvar fs = require(\"fs-extra\");\nvar glob = require(\"glob\");\nvar Box = require(\"truffle-box\");\nvar Profiler = require(\"truffle-compile/profiler.j... | javascript | chosen |
[
{
"from": "system",
"value": "Change webpack config import path\n"
},
{
"from": "human",
"value": "import webpack from 'webpack';\nimport webpackDevMiddleware from 'webpack-dev-middleware';\nimport webpackHotMiddleware from 'webpack-hot-middleware';\nimport webpackConfig from '../../webpack.conf... | javascript | chosen |
[
{
"from": "system",
"value": "Add fetching to the API and related actions\n\nNote: Sill need to be organize and refactor\n"
},
{
"from": "human",
"value": "/*\n * action types\n */\n\nexport const UPDATE = 'UPDATE'\nexport const NEXT_LOCATION = 'NEXT_LOCATION'\nexport const PREVIOUS_LOCATION = '... | javascript | chosen |
[
{
"from": "system",
"value": "Remove 'go' from suported runtimes\n"
},
{
"from": "human",
"value": "'use strict'\n\n// native runtime support for AWS\n// https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html\n\n// .NET CORE\nconst supportedDotnetcore = [\n // deprecated\n // 'dotne... | javascript | chosen |
[
{
"from": "system",
"value": "Fix enumerability of getter/setter functions\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2016 Google Inc.\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 * You ... | javascript | chosen |
[
{
"from": "system",
"value": "FIX Rename board hit /api\n\n"
},
{
"from": "human",
"value": "import { CLEAN_STATE, GET_ALL_LISTS_IN_BOARD, GET_ONE_BOARD, SAVE_BOARD_TITLE } from './constants'\n\nexport const cleanState = () => (dispatch) => {\n dispatch({\n type: CLEAN_STATE,\n })\n}\n\nexp... | javascript | chosen |
[
{
"from": "system",
"value": "Delete load method, add start method\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n\nclass Config {\n constructor() {\n this.requiredKeys = ['url','type']\n this.messages = {\n missingConfig: 'Data... | javascript | chosen |
[
{
"from": "system",
"value": "Improve load more button style\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Stats from '../Stats'\nimport Hit from '../Hit'\n\nimport './style.scss'\n\nfunction renderHasMore (refine) {\n return (\n <footer className='tc pv3'>\n <a\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove hard coding the 401 and instead give it a readable name.\n"
},
{
"from": "human",
"value": "// apikey module validates the apikey argument used in the call. It\n// caches the list of users to make lookups faster.\nvar http = require('http');\nmodule.exports =... | javascript | chosen |
[
{
"from": "system",
"value": "Use view.declaringView instead of this._view\n"
},
{
"from": "human",
"value": "Handlebars.registerViewHelper('collection', Thorax.CollectionHelperView, function(collection, view) {\n if (arguments.length === 1) {\n view = collection;\n collection = view.decl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix URLs to the gh-pages\n"
},
{
"from": "human",
"value": "/**\n * @link https://github.com/datarhei/restreamer\n * @copyright 2015 datarhei.org\n * @license Apache-2.0\n */\n\n'use strict';\n\n// Global config for frontend\nconst config = {\n 'urls': {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Patch for if there is a 404 inside the page\n"
},
{
"from": "human",
"value": "chrome.webRequest.onCompleted.addListener(function(details) {\n if (details.statusCode == 404) {\n //\n var newUrl = new URL(details.url);\n newUrl.host = \"obamaw... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to new meal form\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport {\n Link\n} from 'react-router-dom'\nimport { connect } from 'react-redux'\nimport { Menu } from 'semantic-ui-react'\nimport { css } from 'glamor'\n\nclass... | javascript | chosen |
[
{
"from": "system",
"value": "Fix doc comment for CommandGroup and add one for the Subcommand constructor\n"
},
{
"from": "human",
"value": "/*\n * Optics / subcommand.js\n * copyright (c) 2016 Susisu\n */\n\n/**\n * @module subcommand\n */\n\n\"use strict\";\n\nfunction endModule() {\n modul... | javascript | chosen |
[
{
"from": "system",
"value": "Remove mousewheel and scrollbar plugin from watchlist\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\n\nimport 'malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar';\nimport 'jquery-mouse... | javascript | chosen |
[
{
"from": "system",
"value": "Build real Date instance from response\n"
},
{
"from": "human",
"value": "angular.module(\"oxymoron.config.http\", [])\n .config(['$httpProvider', '$locationProvider', '$stateProvider', function($httpProvider, $locationProvider, $stateProvider) {\n /*\n * S... | javascript | chosen |
[
{
"from": "system",
"value": "Add reorder data type exports\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport Realm from 'realm';\n\nexport class Address extends Realm.Object {}\nexport { Item } from './Item';\nexport { ItemBatch } ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix way of declare method in a object.\n"
},
{
"from": "human",
"value": "const InventoryError = require('../../errors').InventoryError\nconst models = require('./')\n\nconst Payment = models.payments\n\nmodule.exports = (sequelize, DataTypes) => {\n const Pokemon ... | javascript | chosen |
[
{
"from": "system",
"value": "Add flatpickr widget to activityDate field\n"
},
{
"from": "human",
"value": "import SlimSelect from 'slim-select';\nimport 'slim-select/dist/slimselect.min.css';\n\nAutoForm.addHooks(['activityForm'], {\n 'onSuccess': function (formType) {\n // Hide the modal d... | javascript | chosen |
[
{
"from": "system",
"value": "Remove some old logging messages\n"
},
{
"from": "human",
"value": "define([], function() {\n\n\tvar PageController = ['$scope', 'api', function($scope, api) {\n\t\tconsole.log(\"controller\");\n\n\t\t$scope.sendForm = function() {\n\t\t\tvar message = {\n\t\t\t\t\"... | javascript | chosen |
[
{
"from": "system",
"value": "Allow ol-mapbox-style to import from ol/style/Style etc.\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst path = require('path');\n\nconst cases = path.join(__dirname, 'cases');\n\nconst caseDirs = fs.readdirSync(cases).filter((name) => {\n let e... | javascript | chosen |
[
{
"from": "system",
"value": "Fix pathnames issue in webpack\n\n"
},
{
"from": "human",
"value": "var webpack = require('webpack');\nvar precss = require('precss');\nvar autoprefixer = require('autoprefixer');\n\nmodule.exports = {\n entry: [\n './src/js/main.js'\n ],\n module: {\n load... | javascript | chosen |
[
{
"from": "system",
"value": "Add unit tests for element\n"
},
{
"from": "human",
"value": "import { moduleForModel, test } from 'ember-qunit';\n\nmoduleForModel('element', 'Unit | Model | element', {\n // Specify the other units that are required for this test.\n needs: ['model:page']\n})... | javascript | chosen |
[
{
"from": "system",
"value": "Set Published date as subtitle\n"
},
{
"from": "human",
"value": "(function (env) {\n \"use strict\";\n env.ddg_spice_cve_summary = function(api_result){\n\n // fail the spice if the API does not return a result\n if(api_result == undefined) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Temporarily add debug logging for retry config\"\n\nThis reverts commit 45e3fec7591d635a43ae5c4a910d998892176c84.\n"
},
{
"from": "human",
"value": "jest.setTimeout(90000)\n\nconsole.log('=============== JEST SETUP ================')\nconst retries = proces... | javascript | chosen |
[
{
"from": "system",
"value": "Modify mechanism to generate codes.\n"
},
{
"from": "human",
"value": "var endNewLine = 0;\nvar startNewLine = 0;\n\n\nfunction nNewLines(n) {\n var str = '';\n \n for(var i = 0 ; i < n ; i++) str += '\\n';\n \n return str;\n}\n\n\nfunction nTabs(n) {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mess-up with variable names.\n"
},
{
"from": "human",
"value": "var util = require('util'),\n events = require('events');\n\nfunction Carrier(reader, listener, encoding, separator) {\n var self = this;\n \n self.reader = reader;\n\n if (!separator) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Allow appending an array of elements or a Grindstone object\n"
},
{
"from": "human",
"value": "/**\n * Append a new child element to the current object\n * @param {string|object} element\n * @returns {object} current instance of Grindstone\n */\n\n\t$.fn.append = fu... | javascript | chosen |
[
{
"from": "system",
"value": "Write jasmine specs success and failure of generate user click\n"
},
{
"from": "human",
"value": "describe('Generate User operation', function() {\n var generate_user, ajax;\n beforeEach(function() {\n setFixtures('<tr id=\"362\"><td><a class=\"generate... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with invalid environment vars\n\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Promise = require('bluebird');\nconst _ = require('lodash');\nconst exec = require('child_process').exec;\nconst split = require('split');\n\nconst ACCEPTED_OPTIONS = [... | javascript | chosen |
[
{
"from": "system",
"value": "Add rename use of Stepper\n"
},
{
"from": "human",
"value": "/* eslint-disable import/no-named-as-default */\n/* eslint-disable react/forbid-prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { StepsTracker } from './StepsTrack... | javascript | chosen |
[
{
"from": "system",
"value": "Stop GA from sending extra requests\n"
},
{
"from": "human",
"value": "(function(){\n var html = document.getElementsByTagName('html')[0];\n var analytics_id = html.getAttribute('data-analytics-id');\n var analytics_domain = html.getAttribute('data-analytics-doma... | javascript | chosen |
[
{
"from": "system",
"value": "Optimize initial message history size\n"
},
{
"from": "human",
"value": "//\n// Copyright 2009-2015 Ilkka Oksanen <iao@iki.fi>\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the... | javascript | chosen |
[
{
"from": "system",
"value": "Change log message and only calculate max age once\n"
},
{
"from": "human",
"value": "const logger = require('../config/logger')\n\nmodule.exports = function headers(req, res, next) {\n if (\n req.url.indexOf('/css') === -1 &&\n req.url.indexOf('/javascripts'... | javascript | chosen |
[
{
"from": "system",
"value": "Add test case for comments and strings\n"
},
{
"from": "human",
"value": "module.exports = [\n ['console.log();', 'красноглазое.чмо() нах'],\n /**\n * Вхождения внутри слова\n *\n * https://github.com/samgozman/YoptaScript/issues/30\n */\n ['checking', 'c... | javascript | chosen |
[
{
"from": "system",
"value": "Use mktmp for disk database testing\n"
},
{
"from": "human",
"value": "exports.driverParams = {\n 'memory': {\n },\n 'disk': {\n dir: '/tmp/diskdatabank/'\n },\n 'redis': {\n },\n 'membase': {\n serverLocations: '127.0.0.1:11211',\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix call to deprecated util.puts\n"
},
{
"from": "human",
"value": "fs = require('fs');\nutil = require('util');\nutil.puts('module.exports=' + JSON.stringify(\n fs.readFileSync(process.argv[2]).toString()));\n"
},
{
"from": "gpt",
"value": "f... | javascript | chosen |
[
{
"from": "system",
"value": "Use thehelp-core for loading environment"
},
{
"from": "human",
"value": "\n'use strict';\n\nprocess.env = require('../env.json');\n\nvar cluster = require('../src/server/index');\n\ncluster({\n master: function() {\n var master = new cluster.Master({\n spi... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve race condition with the clock tests\n"
},
{
"from": "human",
"value": "var test = require('tap').test;\nvar Clock = require('../../src/io/clock');\nvar Runtime = require('../../src/engine/runtime');\n\ntest('spec', function (t) {\n var rt = new Runtime();... | javascript | chosen |
[
{
"from": "system",
"value": "Add short chart for demo track\n"
},
{
"from": "human",
"value": "export default {\n 'title': 'Click',\n 'artist': 'Metronomer',\n\n 'data': {\n 'easy': require('./click.json'),\n },\n\n 'musicUrl': require('./click.mp3')\n};\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Change search from Contains to Starts With."
},
{
"from": "human",
"value": "/// <reference path=\"../../../../../argos-sdk/libraries/ext/ext-core-debug.js\"/>\n/// <reference path=\"../../../../../argos-sdk/libraries/sdata/sdata-client-debug\"/>\n/// <reference pat... | javascript | chosen |
[
{
"from": "system",
"value": "Bring back the slug generator\n"
},
{
"from": "human",
"value": "// System wide behaviours\n$(function () {\n $('.flash-notice').delay(3000).slideUp(300).one('click', function () { $(this).slideUp(300); });\n\n $('a.preview').attr(\"target\",\"_blank\");\n $('for... | javascript | chosen |
[
{
"from": "system",
"value": "Fix count on random related\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\n\nmodule.exports = function(context, number, options) {\n if(context.page && context['building-blocks'][context.page]) {\n var ret = '';\n var currentBlock = context['b... | javascript | chosen |
[
{
"from": "system",
"value": "Make faucet support anon access\n\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Router, Route, IndexRoute, browserHistory } from 'react-router'\nimport { Provider } from 'react-redux'\nimport { syncHistory... | javascript | chosen |
[
{
"from": "system",
"value": "Update the initial admin creation object when executing the environment for the first time with no User models. This update keeps the model consistent with the changes made to the User model.\n"
},
{
"from": "human",
"value": "/**\n * This script automatically crea... | javascript | chosen |
[
{
"from": "system",
"value": "Copy SystemJs sourcemap when running in non production mode.\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst flatten = require('gulp-flatten')\n\nexports.dep = ['bundle:app']\nexports.fn = function (gulp, paths, mode, done) {\n return gulp.src([paths.src +... | javascript | chosen |
[
{
"from": "system",
"value": "Update comments to use new relationship structure\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst _ = require('lodash');\n\nfunction normalizeRelationships(relation, relatedName) {\n const related = {};\n\n // This handles the short-hand syntax:\n //\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make the link to the ES6 katas at the bottom of the page work (with a hack)."
},
{
"from": "human",
"value": "import React from 'react';\n\nexport default class KatasNavigation extends React.Component {\n\n render() {\n if (!this.props.katas) {\n return nul... | javascript | chosen |
[
{
"from": "system",
"value": "Fix new post textare margin\n"
},
{
"from": "human",
"value": "/*\n This file is a part of libertysoil.org website\n Copyright (C) 2015 Loki Education (Social Enterprise)\n\n This program is free software: you can redistribute it and/or modify\n it under the terms ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable remove of console.log on production (For debugging)\n"
},
{
"from": "human",
"value": "const Babili = require('babili-webpack-plugin')\n\nmodule.exports = {\n plugins: [\n new Babili({\n removeConsole: true,\n removeDebugger: true\n })\n ]\... | javascript | chosen |
[
{
"from": "system",
"value": "Move extention mapping to modulator.\n"
},
{
"from": "human",
"value": "module.mapper.mapper = def(\n [\n ],\n\n function () {\n var flat = function (id) {\n return id + '.js';\n };\n\n var hierarchical = function (id) {\n return id.replace(/\\... | javascript | chosen |
[
{
"from": "system",
"value": "Add initial spec for input validation function\n"
},
{
"from": "human",
"value": "describe('pingPongOutput', function() {\n it(\"is the number for most input numbers\", function() {\n expect(pingPongOutput(2)).to.equal(2);\n expect(pingPongOutput(28)).to.equa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the ‘arr1 is not defined’ error\n"
},
{
"from": "human",
"value": "/**\n * IsEqual\n *\n * @param {object} obj1\n * @param {object} obj2\n */\nvar isEqual = function(obj1, obj2) {\n\n /**\n * Arrays\n */\n if (isArray(obj1, obj2)) {\n\n if (arr1.length ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow libraries like moment.js to attach to window instead of global.\n\nCloses #5\n"
},
{
"from": "human",
"value": "(function(window) {\n if (!window.nwDispatcher) return;\n\n // Rename node's `require` to avoid conflicts with AMD's `require`.\n var requireNode... | javascript | chosen |
[
{
"from": "system",
"value": "Add a few array functions.\n"
},
{
"from": "human",
"value": "define([\n './core'\n], function(w) {\n 'use strict';\n// $HEADER$\n\n /**\n * The <code>arrays</code> namespace in <code>warmsea</code>.\n */\n w.arrays = {};\n\n /**\n * Test if an item is in... | javascript | chosen |
[
{
"from": "system",
"value": "Revert change to import which was wrong.\n"
},
{
"from": "human",
"value": "import {env} from \"babel-core\";\n\nclass Config {\n\n static urls = {};\n\n static baseUrl() {\n if(Config.isDevelopment())\n return 'http://localhost:5000';\n else\n ret... | javascript | chosen |
[
{
"from": "system",
"value": "Use url rather than file-loader to base64 encode images\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nmodule.exports = {\n mode: 'development', // TODO: production mode\n entry: path.resolve('src', 'index.js'),\n output: {\n fil... | javascript | chosen |
[
{
"from": "system",
"value": "Add target _blank to ahref\n"
},
{
"from": "human",
"value": "import React from 'react';\n\n/**\n * Header Component.\n */\nconst Header = () => (\n <nav>\n <div className=\"nav-wrapper teal darken-3\">\n <div className=\"container\">\n <a href=\"/ne... | javascript | chosen |
[
{
"from": "system",
"value": "Fix closing tag in genericWidget directive"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular.module('app.widgets', [\n 'app.services',\n 'rzModule',\n 'web.colorpicker'\n ])\n .value('WidgetTypes', [])\n .... | javascript | chosen |
[
{
"from": "system",
"value": "Use change:view:end instead of ready event for scroll option\n"
},
{
"from": "human",
"value": "/*global pushDomEvents */\nvar isMobile = 'ontouchstart' in document.documentElement,\n isiOS = navigator.userAgent.match(/(iPhone|iPod|iPad)/i),\n isAndroid = navi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in API docs"
},
{
"from": "human",
"value": "goog.provide('ol.net');\n\n\n/**\n * Simple JSONP helper. Supports error callbacks and a custom callback param.\n * The error callback will be called when no JSONP is executed after 10 seconds.\n *\n * @param {st... | javascript | chosen |
[
{
"from": "system",
"value": "fix(routes): Update to match express v4 API"
},
{
"from": "human",
"value": "/**\n * Module dependencies\n */\n\nvar oidc = require('../oidc')\n , settings = require('../boot/settings')\n , User = require('../models/User')\n ;\n\n\n/**\n * Exports\n */\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Fix ignoring mock artifacts on release\"\n\nThis reverts commit e7bded655b8c336b132968930fa60d339be8115b.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n// This script removes the build artifacts of ignored contracts.\n\nconst fs = require('fs');... | javascript | chosen |
[
{
"from": "system",
"value": "Add Naviagor component, create renderScene\n"
},
{
"from": "human",
"value": "/**\n * Sample React Native App\n * https://github.com/facebook/react-native\n * @flow\n */\n\nimport React, { Component } from 'react';\nimport {\n AppRegistry,\n StyleSheet,\n Text,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Monitor body for changes to catch modal edit box"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name JIRA Enhancements for CSC\n// @namespace http://csc.com/\n// @version 0.1\n// @description Adds a description template to new JIRA task... | javascript | chosen |
[
{
"from": "system",
"value": "Add Mutation Observer to detect date change in a specific element\n"
},
{
"from": "human",
"value": "var calendar_grid_selector = 'div[role=\"grid\"]';\nvar body = document.querySelector('body');\nvar calendar_grid = document.querySelectorAll(calendar_grid_selector)... | javascript | chosen |
[
{
"from": "system",
"value": "Use jQuery to Fetch and Show Code School Badges Using Ajax\n"
},
{
"from": "human",
"value": "$(function() {\n\n // your code will go here\n\n});\n"
},
{
"from": "gpt",
"value": "$.ajax({\n url: 'https://www.codeschool.com/users/imaguz.json',\n da... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path to visualmetrics script after moving js.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst execa = require('execa'),\n log = require('intel'),\n get = require('lodash.get'),\n path = require('path');\n\nconst SCRIPT_PATH = path.join(\n __dirname... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with dropping a file into a log entry\n"
},
{
"from": "human",
"value": "/*\n * jQuery File Upload Plugin JS Example 5.0.1\n * https://github.com/blueimp/jQuery-File-Upload\n *\n * Copyright 2010, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed u... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reference to strophe in tests\n\nNow that we use the production mode for webpack in the build\nscript, strophe is at dist/strophe.min.js\n"
},
{
"from": "human",
"value": "require.config({\n baseUrl: '../',\n paths: {\n \"strophe\": \"dist/... | javascript | chosen |
[
{
"from": "system",
"value": "chore(example): Move the location of the enhancer\n"
},
{
"from": "human",
"value": "import { createStore, combineReducers, applyMiddleware, compose } from 'redux'\nimport { reducer as repoReducer } from './RepoRedux'\nimport { reducer as logoReducer } from './LogoR... | javascript | chosen |
[
{
"from": "system",
"value": "Use props to display content\n"
},
{
"from": "human",
"value": "var div = React.DOM.div\nvar h1 = React.DOM.h1\n\nvar MyTitle = React.createClass({\n render () {\n return (\n div(null,\n h1(null, 'Check out my first class component!')\n )\n )... | javascript | chosen |
[
{
"from": "system",
"value": "Update grid of clusters with new pending cluster\n"
},
{
"from": "human",
"value": "// Welcome user route.\n// Show user id and number of clusters.\nApp.UserWelcomeRoute = App.RestrictedRoute.extend({\n\t//\"user\" model for the welcome route\n\tneeds: 'userWelcome'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with findUp not finding .git directory\n"
},
{
"from": "human",
"value": "import { promisify } from 'util'\nimport findUp from 'find-up'\nimport _gitUrlParse from 'git-url-parse'\nimport gitLocal from 'gitconfiglocal'\n\nconst gitconfig = promisify(gitLoca... | javascript | chosen |
[
{
"from": "system",
"value": "Add more common blacklist words\n"
},
{
"from": "human",
"value": "'use strict'\n\n/**\n * Blacklist of keywords to prevent add not interesting topics.\n */\n\nvar BLACKLIST_WORDS = [\n 'cambio',\n 'vendid[oa]',\n 'retirad[oa]',\n 'ya no',\n 'encontrad[oa]',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update negate gate symbol to be a single thick line\n"
},
{
"from": "human",
"value": "// Copyright 2017 Google Inc.\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// Yo... | javascript | chosen |
[
{
"from": "system",
"value": "[fix][minor] Set Project Gantt Chart dates same as Project dates\n"
},
{
"from": "human",
"value": "// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors\n// License: GNU General Public License v3. See license.txt\n\n// show tasks\ncur_frm.cscript... | javascript | chosen |
[
{
"from": "system",
"value": "Convert default parameters to be ES-pre-6 friendly\n"
},
{
"from": "human",
"value": "var route = function(name, params = {}, absolute = true) {\n var domain = (namedRoutes[name].domain || baseUrl).replace(/\\/+$/,'') + '/',\n url = (absolute ? domain : ''... | javascript | chosen |
[
{
"from": "system",
"value": "Fix : fix unit test\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('Navbar directive', function() {\n var scope, element;\n\n beforeEach(module('talend.widget'));\n beforeEach(module('htmlTemplates'));\n\n beforeEach(inject(function($rootSc... | javascript | chosen |
[
{
"from": "system",
"value": "Add in EventEmitter to TunerBase\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar stampit = require('stampit');\n\nvar TunerBase = stampit({\n tuneIn: function() {\n throw 'tuneIn not yet implemented';\n }\n});\n\nmodule.exports = TunerBase;\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Make global-bind plugin safe in node envs\n\nWhen mousetrap loads in a non-dom environment, it bails early and doesn't set the Mousetrap global. Make the global-bind plugin detect that Mousetrap didn't initialize and bail itself."
},
{
"from": "human",
"value": "/**... | javascript | chosen |
[
{
"from": "system",
"value": "Make comment tests compatible with decaffeinate-parser.\n"
},
{
"from": "human",
"value": "import check from './support/check';\n\ndescribe('comments', () => {\n it('converts line comments to // form', function() {\n check(`\n # foo\n 1\n `, `\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add failing test for multiple attributes\n"
},
{
"from": "human",
"value": "define([ 'janitor' ], function (Janitor) {\n\n describe('janitor', function () {\n var janitor;\n var config = {\n tags: {\n p: []\n }\n };\n\n beforeEach(funct... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the license header from the template\n\nTodoMVC is Public Domain.\n"
},
{
"from": "human",
"value": "/*\n\n[MIT licensed](http://en.wikipedia.org/wiki/MIT_License)\n(c) [You](http://addyosmani.github.com/todomvc/)\n\n*/\n(function() {\n\n// Your starting poin... | javascript | chosen |
[
{
"from": "system",
"value": "Make message text color to black on Android.\n\nand white in night theme.\n"
},
{
"from": "human",
"value": "/* @flow */\nimport React from 'react';\nimport entities from 'entities';\nimport { Text } from 'react-native';\n\ntype FuncArguments = {\n data: string,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move callback function outside loop\n\n...as suggested by jshint.\n"
},
{
"from": "human",
"value": "const bl = require('bl');\nconst http = require('http');\n\nconst PageBuffer = function(url) {\n return { 'url' : url\n , 'bl' : bl()\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use willRender instead of didInsertElement/afterRender\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport layout from '../templates/components/mapbox-marker';\n\nexport default Ember.Component.extend({\n classNameBindings: ['isLoaded'],\n layout... | javascript | chosen |
[
{
"from": "system",
"value": "frontend/tests: Add some sidebar link tests\n"
},
{
"from": "human",
"value": "const nextStep = '.wiz-form__actions__next button.btn-primary';\nconst prevStep = 'button.wiz-form__actions__prev';\n\nconst testPage = (page, json, nextInitiallyDisabled = true) => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move speed display to animation speed selector component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport * as styles from './Home.scss';\n\nconst AnimationSpeedSelector = ({ changeDelay }) => {\n return (\n <div>\n <span className={sty... | javascript | chosen |
[
{
"from": "system",
"value": "Use an independent controller instead of link\n\nFor testability (<3 Angular)\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('ddsApp').directive('droitEligiblesList', function() {\n return {\n restrict: 'E',\n templateUrl: 'parti... | javascript | chosen |
[
{
"from": "system",
"value": "Clear pasted URL textbox after submitting.\n"
},
{
"from": "human",
"value": "function(context) {\n var app = $$(this).app;\n var url = $(\"#pasted_url\").val();\n if (url.length > 0) {\n idPos = url.indexOf(\"id=\");\n if (idPos > -1) {\n url = url.su... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.