conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add console logging upon haiku trigger\n"
},
{
"from": "human",
"value": "const Discord = require('discord.js');\nconst { ChannelProcessor } = require('./channelProcessor');\nconst {discordApiToken } = require('./secrets.js');\nconst client = new Discord.Client();\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for empty body\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar http = require('http');\n\nvar assert = require('assertive');\n\nvar fetch = require('../lib/fetch');\n\ndescribe('fetch', function() {\n var server;\n\n before('start echo server', fu... | javascript | chosen |
[
{
"from": "system",
"value": "Support for all aliases added\n"
},
{
"from": "human",
"value": "module.exports = {\n title: 'now.sh',\n subcommands: new Set([\n 'login',\n 'deploy',\n 'ls',\n 'list',\n 'alias',\n 'scale',\n 'certs',\n 'dns',\n 'domains',\n 'rm',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add File methods for proper JSON snapshots\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar memoize = require('memoizee/plain')\n , validDb = require('dbjs/valid-dbjs')\n , defineFile = require('dbjs-ext/object/file')\n , defineJpegFile =... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for intel routing changes"
},
{
"from": "human",
"value": "// ==UserScript==\n// @id iitc-plugin-region-score-lead@hansolo669\n// @name IITC plugin: region score lead\n// @category Tweaks\n// @version 0.2.3\n// @namespace ... | javascript | chosen |
[
{
"from": "system",
"value": "Support CI using sauce labs\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assert = require('assert');\nvar chromedriver = require('chromedriver');\nvar browser = require('../');\n\nchromedriver.start();\nbrowser.remote('http://localhost:9515/').timeout('60... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for $meteorSession service to support scope variable nested property\n"
},
{
"from": "human",
"value": "describe('$meteorSession service', function () {\n var $meteorSession,\n $rootScope,\n $scope;\n\n beforeEach(angular.mock.module('angular-me... | javascript | chosen |
[
{
"from": "system",
"value": "Fix version tests on linux\n"
},
{
"from": "human",
"value": "import { Component, PropTypes } from 'react';\nimport os from 'os';\nimport semver from 'semver';\n\nexport const semverValidator = (props, propName, componentName) => {\n if (props[propName]) {\n ret... | javascript | chosen |
[
{
"from": "system",
"value": "Allow translator plugin to store selected language in sessionStorage/cookie and remember the settings\n"
},
{
"from": "human",
"value": "angular.module('emixApp',\n ['ngRoute',\n 'emixApp.controllers',\n 'emixApp.directives',\n 'emixApp.services',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix login JS test to use SecureSocial endpoint.\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('Login controller', function () {\n var scope;\n var loginCtrl;\n var $httpBackend;\n\n beforeEach(module('todo.controllers'));\n\n beforeEach... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where volume changes not emitted to client through event stream\n"
},
{
"from": "human",
"value": "var eventSource = require('express-eventsource'),\n logger = require('radiodan-client').utils.logger('event-routes');\n\nmodule.exports = function (app... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up unfinished work + conflict\n"
},
{
"from": "human",
"value": "function sortProject(changeEvent) {\n\n var data = {};\n\n // Get old and new index from event\n data.oldIndex = changeEvent.oldIndex;\n data.newIndex = changeEvent.newIndex;\n\n /... | javascript | chosen |
[
{
"from": "system",
"value": "Add findOneByName for usage with nested names\n"
},
{
"from": "human",
"value": "function findByIds(items, ids) {\n return ids\n .map((id) => {\n return items.find((item) => item.id === id)\n })\n .filter((item) => item)\n}\n\nfunction findOneById(ite... | javascript | chosen |
[
{
"from": "system",
"value": "Change default value of displayname setting\n\nNew default is: \"Display name + username\"\n"
},
{
"from": "human",
"value": "import * as FrontendPrefsOptions from './utils/frontend-preferences-options';\n\nconst config = {\n api:{\n host: 'http://localhost:3000... | javascript | chosen |
[
{
"from": "system",
"value": "Add ability to define port as environment variable\n"
},
{
"from": "human",
"value": "// = Server config =============================================================\n\nexport const port = 3000\n\nexport const enableGraphiQL = true;\n\nexport const logFile = 'store... | javascript | chosen |
[
{
"from": "system",
"value": "Include all client files for coverage reporting\n\nAlso: clean up test-main a bit from its original copypasta.\n"
},
{
"from": "human",
"value": "var allTestFiles = [];\nvar TEST_REGEXP = /_test\\.js$/i;\n\nvar pathToModule = function(path) {\n return path.replace(... | javascript | chosen |
[
{
"from": "human",
"value": "Save post after submit the form\n"
},
{
"from": "gpt",
"value": "Template.add_post.events({\n 'submit .add_post_form': function(){\n var title = event.target.title.value;\n var body - event.target.body.value;\n\n // Insert the post\n Po... | javascript | chosen |
[
{
"from": "system",
"value": "Add donation field to calculation\n"
},
{
"from": "human",
"value": "Template.register.rendered = function () {\n /*\n * Reset form select field values\n * to prevent an edge case bug for code push\n * where accommodations value was undefined\n */\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add latest camshaft reference in the bundle\n"
},
{
"from": "human",
"value": "module.exports = {\n 'src-specs': {\n src: [\n 'test/fail-tests-if-have-errors-in-src.js',\n 'test/spec/api/**/*',\n 'test/spec/core/**/*',\n 'test/spec/dataviews/... | javascript | chosen |
[
{
"from": "system",
"value": "Fix String endsWith prototype shadowing\n"
},
{
"from": "human",
"value": "// =================================================================================================\n// Core.js | String Functions\n// (c) 2014 Mathigon / Philipp Legner\n// ================... | javascript | chosen |
[
{
"from": "system",
"value": "Fix link to event page\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport Link from 'next/link'\nimport { translate } from 'react-i18next'\n\nimport Section from './section'\n\nconst Events = ({ t }) => (\n <Sec... | javascript | chosen |
[
{
"from": "system",
"value": "Allow searching for HPO term ID's and match only entries that contain all of the query words (instead of one of the query words).\n"
},
{
"from": "human",
"value": "var elasticsearch = require('elasticsearch');\n\nif (sails.config.useElastic === true) {\n var CLI... | javascript | chosen |
[
{
"from": "system",
"value": "Add author and status parameter\n"
},
{
"from": "human",
"value": "const Submission = require('../models/Submission');\nconst moment = require('moment');\n\n/**\n * GET /submissions\n */\nexports.getSubmissions = (req, res) => {\n const page = parseInt(req.query &&... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to avoid dynamic module resolution\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Allocate a buffer using an octet array.\n*\n* @module @stdlib/buffer/from-array\n*\n* @example\n* var array2buffer = require( '@stdlib/type/buffer/from-array' );\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix search result image sizes\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport { translate } from 'react-i18next'\n\nimport { GEODATA_API_URL } from '@env'\n\nconst Thumbnail = ({ recordId, thumbnails, t }) => ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor the helper methods to use json method instead of send method\n"
},
{
"from": "human",
"value": "const handleError = (err, res) => {\n switch (err.code) {\n case 401:\n return res.status(401).send(err.message);\n case 404:\n return res.statu... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite Account tests to ES2015\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assert = require('assert');\nvar sinon = require('sinon');\n\nvar Account = require('../../lib/endpoints/account');\nvar Request = require('../../lib/request');\n\ndescribe('endp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix field editors not appearing for field names that contain dashes\n"
},
{
"from": "human",
"value": "export default function metaForField(content, fieldName) {\n if (!content) { return; }\n\n try {\n return content.constructor.metaForProperty(fieldName);\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Add one more test and it fails\n"
},
{
"from": "human",
"value": "defaultConf = {\n height: 100,\n width: 300,\n fingerprintLength: 20\n};\n\ndescribe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constructor Captcha exists'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix crash caused by google adsense\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass Ad extends React.PureComponent {\n static propTypes = {\n style: PropTypes.object,\n };\n\n componentDidMount() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Add normalization of type to prevent wrong types\n"
},
{
"from": "human",
"value": "export default function normalizeOutput(type, value) {\n return {\n type,\n name: value.name,\n firstName: value.firstName,\n lastName: value.las... | javascript | chosen |
[
{
"from": "system",
"value": "Make both style properties equal"
},
{
"from": "human",
"value": "/*\n * \"domui\" stylesheet properties.\n */\nfont_family='Verdana, Geneva, \"DejaVu Sans\", sans-serif';\nfont_size=\"11px\";\nhdr_font_size=\"14px\";\n\nfixed_font_family='Courier New, Courier, mono... | javascript | chosen |
[
{
"from": "system",
"value": "chore(website): Fix display issue with Layout examples\n"
},
{
"from": "human",
"value": "/* @flow */\nimport { createStyledComponent, pxToEm } from '../../../../../library/styles';\nimport _Flex from '../../../../../library/Flex';\n\ntype Props = {\n gutterWidth?:... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JS to use 2-space tabs\n"
},
{
"from": "human",
"value": "$(function () {\n var params = {'data_type': '23andme_names'};\n\n $.ajax({\n 'type': 'GET',\n 'url': '/json-data/',\n 'data': params,\n 'success': function(data) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Test for existence of setData method passes\n"
},
{
"from": "human",
"value": "/**\n * Creates an object of type wgaPipeline for drawing whole genome alignment visualizations\n * @author Markus Ankenbrand <markus.ankenbrand@uni-wuerzburg.de> \n * @constructor\n * @p... | javascript | chosen |
[
{
"from": "system",
"value": "Update javascript to use native API\n"
},
{
"from": "human",
"value": "function do_command(item, command, val) {\n var data = {};\n data[item] = command;\n\n if (val != undefined) {\n\tdata[\"value\"] = val;\n }\n $.get(\"/CMD\", data);\n}\n\nfunction... | javascript | chosen |
[
{
"from": "system",
"value": "Add a backslash for a comment"
},
{
"from": "human",
"value": "/ Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// Licensed under the Apache-2.0 License on an \"AS IS\" BASIS, WITHOUT WARRANTIES OF ANY KIND. \n\n// ABOUT THIS NODE.JS... | javascript | chosen |
[
{
"from": "system",
"value": "Add current date to polling log messages.\n"
},
{
"from": "human",
"value": "var TaskScheduler = require(\"./task\").TaskScheduler;\nvar colors = require(\"colors\");\n\nexports.execute = function(initialStep, context, cb) {\n\tvar completedSteps = 0;\n\tvar estimat... | javascript | chosen |
[
{
"from": "system",
"value": "Modify displaying of error message\n"
},
{
"from": "human",
"value": "module.exports = HttpConnection;\n\nvar request = require('requestretry');\nvar HttpConfig = require(\"./HttpConfig\");\nvar PaymayaApiError = require(\"./PaymayaApiError\");\n\nfunction HttpConne... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing file from last commit\n\n"
},
{
"from": "human",
"value": "'use strict';\n\nexport default {\n setup,\n};\n\n/**\n * Module dependencies.\n */\n\nimport SequelizeStore from 'koa-generic-session-sequelize';\nimport session from 'koa-generic-session';\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix using wrong component in ColumnBackButtonSlim\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport Icon from 'mastodon/components/icon';\n\nexport default class... | javascript | chosen |
[
{
"from": "human",
"value": "Add code to video detail component\n"
},
{
"from": "gpt",
"value": "import React from 'react';\n// import VideoListItem from './video_list_item';\n\nconst VideoDetail = ({video}) => {\n const videoId = video.id.videoId;\n const url = `https://www.youtube.com/embed/... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure to count up test additions\n"
},
{
"from": "human",
"value": "const test = require('tape')\nconst BorrowState = require('../lib/module.js')\n\nconst sleep50ms = require('./sleep.js')\nconst countTo = require('./count-to.js')\n\n;[true, false].forEach((unsa... | javascript | chosen |
[
{
"from": "system",
"value": "Enforce camelCase for private and protected class members\n\nThis encodes some of the TypeScript style guides about identifiers\nhttps://google.github.io/styleguide/tsguide.html#identifiers\n(in particular the rules our codebase already adheres to).\nThe automatic enforcement w... | javascript | chosen |
[
{
"from": "system",
"value": "Fix loading of browse-everything done event\n\nAvoids situations where the prototype browseEverything() function has not been defined yet.\n"
},
{
"from": "human",
"value": "//= require jquery.treetable\n//= require browse_everything/behavior\n\n// Show the files in... | javascript | chosen |
[
{
"from": "system",
"value": "Fix home virtool version display\n\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { get } from \"lodash-es\";\nimport { connect } from \"react-redux\";\nimport { Panel } from \"react-bootstrap\";\n\nimport { getSoftwareUpdates } from \"../..... | javascript | chosen |
[
{
"from": "system",
"value": "Update NewComponent to use NewController\n"
},
{
"from": "human",
"value": "(function(){\n 'use strict'\n\n const New = {\n templateUrl: 'pages/new/new.html'\n\n // templateUrl: 'components/bookmarks/bookmark-search.html',\n // controller: 'NewController'... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"fix: allow backtick in HTML templates as well\"\n\nThis reverts commit 2f96458bcb6dfe8b8db4ef0101036b09bfa7c5f5.\n"
},
{
"from": "human",
"value": "module.exports = {\n\tname: \"frappe-html\",\n\tsetup(build) {\n\t\tlet path = require(\"path\");\n\t\tlet fs... | javascript | chosen |
[
{
"from": "system",
"value": "Fix an issue that prevented modules to be resolved\n\nrear-system-package's config/app-paths.js was trying to resolve\nnode_modules from inside the dependency. This is needed when\nrear-system-package is symlinked. Normally node_modules paths should\nbe resolved from the app's ... | javascript | chosen |
[
{
"from": "system",
"value": "Test for deep equality of arrays\n"
},
{
"from": "human",
"value": "var assert = require('assert'),\n\tcapitalize = require('../index.js')\n\n\ndescribe('Capitalizer', function () {\n\n\tit('Capitalizes the first letter of a string', function () {\n\t\tassert.equal(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong naming in tests\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst chai = require('chai');\n\nconst plate = require('../index');\n\nconst expect = chai.expect;\n\ndescribe('Those postal codes', function() {\n it('should be valid', function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix exception on missing options object\n\nIf the JumpPointFinder constructor was not passed the options object there\nwas a ReferenceError.\n"
},
{
"from": "human",
"value": "/**\n * @author aniero / https://github.com/aniero\n */\nvar DiagonalMovement = require('.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix whitespace tabs-versus-spaces conflict in Urban_dictionary Spice.\n"
},
{
"from": "human",
"value": "// `ddg_spice_urban_dictionary` is a callback function that gets\n// \"urban dictionary cool\" or \"urban dictionary ROTFL.\"\n\n// Note: This plugin can display... | javascript | chosen |
[
{
"from": "system",
"value": "Move AuthProvider into first config block\n"
},
{
"from": "human",
"value": "angular.module('MyApp', ['ngResource', 'ngMessages', 'ngRoute', 'ngAuth', 'mgcrea.ngStrap'])\n .config(['$routeProvider', function($routeProvider) {\n $routeProvider\n .when('/', {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for missing port on API requests\n\n"
},
{
"from": "human",
"value": "(function (window) {\n window.__env = window.__env || {};\n window.__env.hostUrl = 'https://' + window.location.hostname +'/';\n window.__env.apiUrl = window.__env.hostUrl+'api/';\n window... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mistypo on relative index.js\n"
},
{
"from": "human",
"value": "var Compile = require('./index2.js')\n\ncompile = Compile('b11bf50b8a391d4e8560e97fd9d63460')\n\n//Source Code to be compiled remotely\nvar sourceCode = 'print 3*20' \n\n//Programming Language Selec... | javascript | chosen |
[
{
"from": "system",
"value": "Add mocks for menu tests\n"
},
{
"from": "human",
"value": "// From https://github.com/airbnb/enzyme/blob/master/docs/guides/jsdom.md\n\nvar jsdom = require('jsdom').jsdom;\n\nvar exposedProperties = ['window', 'navigator', 'document'];\n\nglobal.document = jsdom(''... | javascript | chosen |
[
{
"from": "system",
"value": "Support retrieving embed HTML in Embedly integration\n"
},
{
"from": "human",
"value": "// @flow\n\nconst getJSON = (\n endpoint: string,\n data: ?{},\n successCallback: ({\n url: string,\n title: string,\n author_name: string,\n thumbnail_url: string... | javascript | chosen |
[
{
"from": "system",
"value": "Fix console still being turned off for react env\n"
},
{
"from": "human",
"value": "/**\n * Js-coding-standards\n *\n * @author Robert Rossmann <rr.rossmann@me.com>\n * @copyright 2016 STRV\n * @license http://choosealicense.com/licenses/bsd-3-clause BSD... | javascript | chosen |
[
{
"from": "system",
"value": "Add defaultProps and initial state.\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport * as counterActions from '../actions/counterActions';\nimport { dispatch } from '../store';\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Change init of watch and server\n"
},
{
"from": "human",
"value": "function setup(options, imports, register) {\n // Import\n var server = imports.server.http;\n var port = imports.server.port;\n var watch = imports.watch;\n var workspace = imports.wo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix script error when last undo.\n"
},
{
"from": "human",
"value": "define(['summernote/core/range'], function (range) {\n /**\n * @class editing.History\n *\n * Editor History\n *\n */\n var History = function ($editable) {\n var stack = [], stackOff... | javascript | chosen |
[
{
"from": "system",
"value": "Change `type` prop to `theme`\n"
},
{
"from": "human",
"value": "const React = require('react');\nconst classNames = require('classnames');\n\nclass Button extends React.Component {\n render() {\n const {\n className,\n children,\n type,\n ..... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Fix Botan token variable name\n"
},
{
"from": "human",
"value": "module.exports = {\n token: process.env.TOKEN || '1234567890abcdef',\n settings: {\n webHook: {\n port: process.env.PORT || 443,\n host: process.env.HOST || '0.0.0.0'\n }\n },\... | javascript | chosen |
[
{
"from": "system",
"value": "Use `.default` to access exported function\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nrequire('babel-polyfill');\n\nvar cli = require('../lib/cli');\ncli.run(process);\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env node\n\nrequire('babel-... | javascript | chosen |
[
{
"from": "system",
"value": "Add an override to console.warn for testing to suppress React warnings.\n"
},
{
"from": "human",
"value": "import React from 'react/addons';\n\nlet find = React.addons.TestUtils.findRenderedDOMComponentWithTag;\nlet render = React.addons.TestUtils.renderIntoDocume... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug where the NodeListStub API response would override existing HostVolumes in the store\n"
},
{
"from": "human",
"value": "import { assign } from '@ember/polyfills';\nimport { inject as service } from '@ember/service';\nimport ApplicationSerializer from './ap... | javascript | chosen |
[
{
"from": "system",
"value": "Use literal function for citext array default value, not string\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports = function (sequelize, DataTypes) {\n let User = sequelize.define('User', {\n id: {\n type: DataTypes.UUID,\n primaryKey: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add leave and hide buttons again"
},
{
"from": "human",
"value": "/* globals menu */\n\nTemplate.sidebarItem.helpers({\n\tcanLeave() {\n\t\tconst roomData = Session.get(`roomData${ this.rid }`);\n\n\t\tif (!roomData) { return false; }\n\n\t\tif (((roomData.cl != nul... | javascript | chosen |
[
{
"from": "system",
"value": "Remove intentional error added for error reporting.\n"
},
{
"from": "human",
"value": "import { animate } from '../actions/animate'\n\nconst Circle = {\n\n getInitialState() {\n return Circle.set(null, { color: 'orange', time: Date.now() })\n },\n\n set (_, { ... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude directories from build digest.\n"
},
{
"from": "human",
"value": "const _ = require('lodash'),\n fstate = require('../util/fstate'),\n digest = require('../util/digest'),\n hashcache = require('../util/hashcache'),\n log = require('../util/log')\n ;\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add addBook reducer to root reducer\n"
},
{
"from": "human",
"value": "import { combineReducers } from 'redux';\nimport { routerReducer } from 'react-router-redux';\nimport { reducer as formReducer } from 'redux-form';\nimport auth from './userSignUp';\nimport login... | javascript | chosen |
[
{
"from": "system",
"value": "Set up hot module replacement for react components\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst cleanWebPackPlugin = require('clean-webpack-plugin');\n\nmodule.exports = {\n output: {\n path: path.resolve(__dirname, 'dist'),\n filen... | javascript | chosen |
[
{
"from": "system",
"value": "Fix undefined cookies on server\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport { Cookies } from \"react-cookie\";\nimport getDisplayName from \"../... | javascript | chosen |
[
{
"from": "system",
"value": "Increase the max event listener count\n"
},
{
"from": "human",
"value": "// import { RedisPubSub } from 'graphql-redis-subscriptions';\nimport { PubSub } from 'graphql-subscriptions';\n\nconst pubsub = new PubSub();\n/*\nconst pubsub = new RedisPubSub({\n connectio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix duplicated calls of sagas based on history\n"
},
{
"from": "human",
"value": "import { createStore, applyMiddleware, compose } from 'redux'\nimport { browserHistory} from 'react-router'\nimport { syncHistoryWithStore, routerMiddleware } from 'react-router-redux'... | javascript | chosen |
[
{
"from": "system",
"value": "Add props declaration of FixButton\n\nTo fix CI error\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport React from 'react'\n\nclass FixButton extends React.Component {\n handleClick(): void {\n this.props.cb()\n }\n render() {\n return <button classN... | javascript | chosen |
[
{
"from": "system",
"value": "Use attribute object from state\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ClipboardJS from 'clipboard';\nimport 'balloon-css/balloon.css';\nimport levelNames from \"../constants/levelNames\";\n\nexport default class CopyButton extends Rea... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to get displacement (vR) vector\n"
},
{
"from": "human",
"value": "const massToRadius = mass => Math.log2(mass)/10;\n\nconst translate = (object3D, velocity) => {\n object3D.translateX(velocity.x);\n object3D.translateY(velocity.y);\n object3D.transl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix IE8 bug with email repeat\n"
},
{
"from": "human",
"value": "/* global $ */\n'use strict'\n\n/**\n * Email repeat\n */\nfunction EmailRepeat (element, config) {\n var options = {}\n\n $.extend(options, config)\n\n // Private variables\n var hintWrapper\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Add Chapter 05, exercise 4\n"
},
{
"from": "human",
"value": "function every(array, test) {\n for (var i = 0; i < array.length; ++i) {\n if (!test(array[i]))\n return false;\n }\n return true;\n}\n\nfunction some(array, test) {\n for (v... | javascript | chosen |
[
{
"from": "system",
"value": "Fix exceptions when using Toast without having App\n\nSee issue #995"
},
{
"from": "human",
"value": "// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP\n\nimport CSSClassnames from './CSSClassnames';\n\nconst CLASS_ROOT = CSSClassnames.APP;\n\nfun... | javascript | chosen |
[
{
"from": "system",
"value": "Make the 1-1 layout vertical\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nexport default (components, className, onClick) => (\n <div className={className + ' horizontal'} onClick={onClick}>\n {components[0]}\n </div>\n);\n"
},
{... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo on the method name:\nstartServer =>\ncreateServer\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar express = require('express'),\n kotoumi = require('./index'),\n http = require('http');\n\nvar application = express();\nvar server = http.... | javascript | chosen |
[
{
"from": "system",
"value": "Switch all the Sass/SCSS tabs together\n"
},
{
"from": "human",
"value": "$(function() {\n $( \"#topic-2\" ).tabs();\n $( \"#topic-3\" ).tabs();\n $( \"#topic-5\" ).tabs();\n $( \"#topic-6\" ).tabs();\n $( \"#topic-7\" ).tabs();\n $( \"#topic-8\" ).tabs();\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missin JSONP support on /organizer/:gplusId\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar mongoose = require('mongoose'),\n\tutils = require('../utils'),\n\tUser = mongoose.model('User'),\n\tApplication = mongoose.model('Application'),\n\tSimpleApiKey ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix incorrect key propagation to child view\n"
},
{
"from": "human",
"value": "import {text} from 'incremental-dom'\n\nexport function item(value) {\n if(typeof value == 'function') {\n value()\n } else {\n text(value)\n }\n}\n"
},
{
"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix unable to revert resolving of SQLinjection\n\n[1] Revert back code for replaceAll\n[2] Revert 2 resolve strings one by one\n"
},
{
"from": "human",
"value": "\nexport default function stringManipulation() {\n this.stringConcat = function stringConcat(...stringT... | javascript | chosen |
[
{
"from": "system",
"value": "Store document meta properties in document block extension\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar getItemURL = require('./get_item_url')\n , regex = /^document (\\d+)$/\n\nmodule.exports = function (md, opts) {\n\n opts = opts || {};\n\n md.use... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded disabled class for slider\n"
},
{
"from": "human",
"value": "/**\n * @class CM_FormField_Integer\n * @extends CM_FormField_Abstract\n */\nvar CM_FormField_Integer = CM_FormField_Abstract.extend({\n\t_class: 'CM_FormField_Integer',\n\n\tready: functio... | javascript | chosen |
[
{
"from": "system",
"value": "Make more tests at Footer component\n"
},
{
"from": "human",
"value": "'use strict';\n\njest.unmock('./../Footer');\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport TestUtils from 'react-addons-test-utils';\nimport Footer from './../Footer';\... | javascript | chosen |
[
{
"from": "system",
"value": "Improve comment for API summary.walk\n"
},
{
"from": "human",
"value": "var encodeSummaryArticle = require('../json/encodeSummaryArticle');\n\n/**\n Encode summary to provide an API to plugin\n\n @param {Output} output\n @param {Config} config\n @return ... | javascript | chosen |
[
{
"from": "system",
"value": "Add innerRef prop to Input component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {Icon} from '../iconography';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\n\nexport class Input extends React.Component {\n sta... | javascript | chosen |
[
{
"from": "system",
"value": "Define \"grid\" variable before it's used."
},
{
"from": "human",
"value": "/*eslint-env node */\n\nvar m = require(\"mithril\");\n\nvar tabs = require(\"./polythene_tabs\");\ntabs.onClick(function(newIndex, oldIndex) {\n var h = require(\"./headers\")[newIndex];... | javascript | chosen |
[
{
"from": "system",
"value": "Use sanitization method that doesn't require more dependencies.\n"
},
{
"from": "human",
"value": "angular.module('proxtop', ['ngMaterial', 'ui.router', 'angular-progress-arc', 'pascalprecht.translate'])\n .config(['$stateProvider', '$urlRouterProvider', '$transl... | javascript | chosen |
[
{
"from": "system",
"value": "Remove default value for addEventListener\n"
},
{
"from": "human",
"value": "/**\n * Show confirm popup, when user close tab with non-synchronized actions.\n *\n * @param {Syncable|Client} client Observed Client instance\n * or object... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to append when document body is ready\n"
},
{
"from": "human",
"value": "(function () {\n var _console = window.console;\n var _methods = {\n log: window.console.log,\n error: window.console.error,\n info: window.console.info,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the website tutorial build to escape <=.\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar fs = require('fs-extra');\nvar pug = require('pug');\n\nvar buildUtils = require('../examples/build-utils');\n\n// generate the tutorials\nfs.ensureDirSy... | javascript | chosen |
[
{
"from": "system",
"value": "Load SVG icons with $http instead of jQuery\n"
},
{
"from": "human",
"value": "angular.module('Shazam2Spotify')\n\t.config(function() {\n\t\t// Load SVG icons (dirty, should not use jQuery...)\n\t\t$.ajax({\n\t\t\turl: 'img/icons.svg',\n\t\t\tmethod: 'GET',\n\t\t\td... | javascript | chosen |
[
{
"from": "system",
"value": "Implement toggle behavior from checkbox change\n"
},
{
"from": "human",
"value": "$(function() {\n $(document).on(\"change\", \"[data-behavior~=toggle-disable-list-command]\", function(e) {\n var commandButtonsSelector = $(e.target).data(\"commands\");\n var ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.