conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use index as unique key prop in category column's list items\n\n - using body as the key prop caused ideas with a duplicate body to not be rendered\n" }, { "from": "human", "value": "import React from \"react\"\n\nfunction CategoryColumn(props) {\n const categoryT...
javascript
chosen
[ { "from": "system", "value": "Allow routes to be resolved by name property.\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n angular.module('angular-reverse-url', ['ngRoute'])\n .filter('reverseUrl', ['$route', function ($route) {\n var regexp = /:([A...
javascript
chosen
[ { "from": "system", "value": "Remove some more json2 code.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2018 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.apploader',\n name: 'NodeModelFileDAO',\...
javascript
chosen
[ { "from": "system", "value": "Use elementId to set Intercom ID\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nconst INTERCOM_APP_ID = 'htxi7bqv';\n\nexport default Ember.Component.extend({\n attributeBindings: ['href', 'id'],\n href: `mailto:${INTERCOM_APP_ID}@incoming.interc...
javascript
chosen
[ { "from": "system", "value": "Use lodash to extract keys safely\n" }, { "from": "human", "value": "import _ from 'lodash'\nimport postcss from 'postcss'\nimport cloneNodes from '../util/cloneNodes'\nimport buildMediaQuery from '../util/buildMediaQuery'\n\nexport default function(options) {\n re...
javascript
chosen
[ { "from": "system", "value": "Make the AppStore an app again (visible in the app store)\n\nWe are doing this as the appstore will become the new appshare home page\n" }, { "from": "human", "value": "function listApps(args) {\n/*\ncreated_timestamp(-1)\nbase_component_id(\"listApps\")\ndisplay_na...
javascript
chosen
[ { "from": "system", "value": "Remove code that's no longer necessary with improved event handling\n" }, { "from": "human", "value": "// ==========================================================================\n// Project: Ember Handlebar Views\n// Copyright: Β©2011 Strobe Inc. and contributor...
javascript
chosen
[ { "from": "system", "value": "Initialize with logged out state\n" }, { "from": "human", "value": "require('xhr');\nrequire('custom-event-polyfill');\n\nwindow._session = {};\n\nwindow.updateSession = function (session) {\n window._session = session;\n var sessionEvent = new CustomEvent('se...
javascript
chosen
[ { "from": "system", "value": "Add ping pattern to CLI and env\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar program = require('commander');\nvar pkg = require('../package.json');\nvar GitterBot = require('../lib/GitterBot');\n\nprogram\n .version(pkg.version)\n .description('Gi...
javascript
chosen
[ { "from": "system", "value": "Fix delay of listing wallets when payment intent\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('copayApp.controllers').controller('PaymentIntentController', function($rootScope, $scope, $modal, $location, balanceService) {\n\n $rootScope.title ...
javascript
chosen
[ { "from": "system", "value": "Attach logging to events triggered by \"dispatch\" now\n" }, { "from": "human", "value": "import { Flux } from 'flumpt';\nimport React from 'react';\n\nimport Root from './components/Root';\nimport { EVENTS } from './consts';\nimport ModelContainer from './container...
javascript
chosen
[ { "from": "system", "value": "Add space between Header navigations \n\n" }, { "from": "human", "value": "//@flow\n\nimport styled from \"styled-components\";\n\nexport const Nav = styled.nav`\n display: inline-block;\n opacity: 1;\n background: transparent;\n z-index: 10;\n`;\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Use more descriptive variable name\n" }, { "from": "human", "value": "import View from 'girder/views/View';\nimport { SORT_ASC, SORT_DESC } from 'girder/constants';\n\nimport SortCollectionWidgetTemplate from 'girder/templates/widgets/sortCollectionWidget.pug';\n\ni...
javascript
chosen
[ { "from": "system", "value": "Modify tests to work around current typing limitations\n" }, { "from": "human", "value": "/* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes....
javascript
chosen
[ { "from": "system", "value": "Remove colorchange component references from home component\n" }, { "from": "human", "value": "import React, { useState } from 'react';\n\nimport ColorChanger from '../app/example-app';\n\nconst Home = () => {\n const [showBugComponent, setShowBugComponent] = useSt...
javascript
chosen
[ { "from": "system", "value": "Stop the search bar taking you to an empty page when cleared\n" }, { "from": "human", "value": "import React from \"react\";\nimport styles from \"./Search.scss\";\nimport FontIcon from \"react-toolbox/lib/font_icon\";\nimport debounce from \"debounce\";\nimport {wi...
javascript
chosen
[ { "from": "system", "value": "Add user role to admin dropdown\n" }, { "from": "human", "value": "'use strict';\n\n//Add admin dropdown to navbar\nangular.module('core.admin').run(['Menus',\n function (Menus) {\n Menus.addMenuItem('topbar', {\n title: 'Admin',\n state: 'admin',\n ...
javascript
chosen
[ { "from": "system", "value": "Use FlowDialog instead of Dialog\n" }, { "from": "human", "value": "//\n// Main Dialog\n//\n// This is the dialog that gets control when your bot starts a new\n// session with a user\n//\n\nimport {Dialog, NLPModel} from 'deepdialog';\n\nexport const MainNLP = new N...
javascript
chosen
[ { "from": "system", "value": "Update Google Maps API key\n" }, { "from": "human", "value": "var merge = require('webpack-merge')\nvar prodEnv = require('./prod.env')\n\nmodule.exports = merge(prodEnv, {\n NODE_ENV: '\"development\"',\n API_SERVER: '\"\"', // False good idea, remove me\n RECAP...
javascript
chosen
[ { "from": "system", "value": "Fix para modelo de posicioanmento autal\n" }, { "from": "human", "value": "angular.module('sislegisapp').factory('ReuniaoResource',\n\t\tfunction($resource, BACKEND) {\n\t\t\treturn $resource(BACKEND + '/reuniaos/:ReuniaoId', {\n\t\t\t\tReuniaoId : '@id'\n\t\t\t}, {...
javascript
chosen
[ { "from": "system", "value": "Remove hack to get messages from remote process\n\nIt is now fixed in electron" }, { "from": "human", "value": "/* eslint no-var: 0, no-extend-native: 0, vars-on-top: 0 */\nvar devMode = (process.argv || []).indexOf('--dev') !== -1;\n\nif (devMode) {\n // enables E...
javascript
chosen
[ { "from": "system", "value": "Add test to check if duration humanization splits big numbers\n" }, { "from": "human", "value": "import { expect } from 'chai'\nimport { describe, it } from 'mocha'\nimport humanizeDuration from 'timed/utils/humanize-duration'\nimport moment from 'moment'\n\ndescrib...
javascript
chosen
[ { "from": "system", "value": "Fix bad comment on header" }, { "from": "human", "value": "+/**\n + * Korean translation for bootstrap-markdown\n + * WoongBi Kim <ssinss@gmail.com>\n + */\n;(function($){\n $.fn.markdown.messages['kr'] = {\n 'Bold': \"μ§„ν•˜κ²Œ\",\n 'Italic': \"이타릭체\",\n 'Headi...
javascript
chosen
[ { "from": "system", "value": "Add missing \"data\" object in relationships\n" }, { "from": "human", "value": "'use strict';\n\nfunction serialize(model) {\n const attrs = model.serialize({shallow: true});\n const rels = {};\n const type = model.jsonapi.type;\n const idAttr = model.jsonapi.id...
javascript
chosen
[ { "from": "system", "value": "Add new line at end of file and after imports block\n" }, { "from": "human", "value": "import * as React from \"react\";\nimport {getField} from \"./utils/getField\";\n/**\n * Component used as an indicator for build status.\n * Statuses are differentiated by altern...
javascript
chosen
[ { "from": "system", "value": "Enable retreiving of only latest event from fb.\n" }, { "from": "human", "value": "import { SET_LATEST_EVENT, SET_EXISTING } from './constants'\nimport fbapi from 'toolbox/fbapi'\nimport moment from 'moment'\n\nexport function setLatestEvent(event) {\n return {\n ...
javascript
chosen
[ { "from": "system", "value": "Make the fix backwards compatible\n" }, { "from": "human", "value": "var net = require('net');\n\nvar Server = net.Server.prototype;\nvar Pipe = process.binding('pipe_wrap').Pipe;\n\nvar oldListen = Server.listen;\nServer.listen = function () {\n var self = this;...
javascript
chosen
[ { "from": "system", "value": "Change Salmon Run tweet wording when the rotation includes mystery weapons\n\n" }, { "from": "human", "value": "const TwitterPostBase = require('./TwitterPostBase');\nconst { captureSalmonRunScreenshot } = require('../screenshots');\nconst { readData } = require('.....
javascript
chosen
[ { "from": "system", "value": "Remove pointer-events: none from title bar, fixing window drag\n" }, { "from": "human", "value": "import React from \"react\";\nimport styled from \"styled-components\";\nimport AddIcon from \"@atlaskit/icon/glyph/add\";\nimport ListIcon from \"@atlaskit/icon/glyph/...
javascript
chosen
[ { "from": "system", "value": "Revert \"format to 'n/a' if no value is passed to the formatter\"\n\nThis reverts commit 17bcf50a6d27b0221ae56c6a060ea2e6f1d2f240.\n" }, { "from": "human", "value": "/* @flow */\n/**\n * @jsx React.DOM\n */\n'use strict';\n\nvar React = require('re...
javascript
chosen
[ { "from": "system", "value": "Reduce spacing in formatting, concisify wording in test specs\n" }, { "from": "human", "value": "require( 'should' );\nvar sinon = require( 'sinon' );\nvar proxyquire = require( 'proxyquire' );\n\nvar hub = require( '../lib/index' );\n\ndescribe( 'Gulp Hub', functio...
javascript
chosen
[ { "from": "system", "value": "Fix issue where fonts aren't actually getting injected.\n" }, { "from": "human", "value": "import {SVGRenderer} from 'scratch-svg-renderer';\n\n// Contains 'font-family', but doesn't only contain 'font-family=\"none\"'\nconst HAS_FONT_REGEXP = 'font-family(?!=\"none...
javascript
chosen
[ { "from": "system", "value": "Update watchers before adding widget\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('Teem')\n .factory('needWidget', [\n '$compile', '$timeout',\n function($compile, $timeout) {\n var editor, scope;\n\n function init (e, s) {\n edit...
javascript
chosen
[ { "from": "system", "value": "CRM-1051: Add a Reset workflow button that will erase the relation from specific entity view page\n - removed not used event triggering\n" }, { "from": "human", "value": "define([\n 'jquery',\n 'underscore',\n 'orotranslation/js/translator',\n 'oroui/js/...
javascript
chosen
[ { "from": "system", "value": "Fix the battlenet request methods for WoW Spells and SC2 Profiles\n" }, { "from": "human", "value": "/**\n * Battle.net API Wrapper.\n */\n\nmodule.exports = function(BATTLENET_API_KEY) {\n 'use strict';\n\n var battlenet = require('./common/battleNetApiRequest')(...
javascript
chosen
[ { "from": "system", "value": "Make the front matter closing dashes matcher lazy\n\nI was having a bit of trouble parsing several Markdown files with front matter, getting errors like these:\r\n\r\n> Fatal error: JS-YAML: expected a single document in the stream, but found more\r\n\r\nThis was caused by Mark...
javascript
chosen
[ { "from": "system", "value": "Add tests for request body validation\n" }, { "from": "human", "value": "const { expect } = require('chai');\nconst httpMocks = require('node-mocks-http');\n\nconst stopCampaignSending = require('./stop-campaign-sending');\nconst {\n sequelize,\n campaign: Campaig...
javascript
chosen
[ { "from": "system", "value": "[lib] Use \"images\" instead of \"photos\" in robotext\n" }, { "from": "human", "value": "// @flow\n\nimport type { Media } from '../types/media-types';\nimport type {\n MultimediaMessageInfo,\n RawMultimediaMessageInfo,\n} from '../types/message-types';\nimport t...
javascript
chosen
[ { "from": "system", "value": "Fix follow button for groups\n" }, { "from": "human", "value": "import gql from 'graphql-tag';\n\nexport default gql`\n fragment Followable on FollowableType {\n __typename\n ... on User {\n id\n is_followed\n counts {\n followers\n ...
javascript
chosen
[ { "from": "system", "value": "Add scale methods in CE ViewportMask to match Phaser 3\n" }, { "from": "human", "value": "let exportObject;\n\nif (Phaser.Graphics === undefined) {\n class ViewportMask3 extends Phaser.GameObjects.Graphics {\n constructor(game, x, y) {\n super(g...
javascript
chosen
[ { "from": "system", "value": "Refactor template of `resetPassword` email" }, { "from": "human", "value": "function greet(welcomeMsg) {\n return function(user, url) {\n var greeting = (user.profile && user.profile.name) ?\n (\"Hello \" + user.profile.name + \",\") : \"Hello,\";\n...
javascript
chosen
[ { "from": "system", "value": "Use the same banner as the rest of the app in the logout page.\n" }, { "from": "human", "value": "'use strict';\n\n/* Controllers */\n\nvar ermLogoutController = angular.module('ermLogoutController', []);\n\nermLogoutController.controller('LogoutCtrl', ['$scope',\n ...
javascript
chosen
[ { "from": "system", "value": "Change fakeBlockchain.getBlock to match ethereumjs-blockchain\n" }, { "from": "human", "value": "const Buffer = require('safe-buffer').Buffer\nconst utils = require('ethereumjs-util')\n\nmodule.exports = {\n getBlock: function (n, cb) {\n // FIXME: this will fai...
javascript
chosen
[ { "from": "system", "value": "Fix broken suffix on chapters with a dot.\n" }, { "from": "human", "value": "'use strict';\nvar affix = require('./affix');\n\n/**\n * Creates an alias for the chapter.\n * @param {!{title: ?string}} series\n * @param {!{number: number, volume: number}} chapter\n * ...
javascript
chosen
[ { "from": "system", "value": "Add JWT as an attribute, so we can return it with the db response\n" }, { "from": "human", "value": "'use strict';\n\nvar mongoose = require('mongoose');\nvar bcrypt = require('bcrypt-nodejs');\nvar jwt = require('jwt-simple');\nvar moment = require('moment');\n\n/*...
javascript
chosen
[ { "from": "system", "value": "Make the printer data widget use the python script\n" }, { "from": "human", "value": "command: '/bin/bash stolaf-base/snmpGet.sh',\n\nrefreshFrequency: 600000,\nlastUpdateTime: undefined,\n\nstyle: [\n\t\"bottom: 0\",\n\t\"left: 75%\",\n\t\"width: 25%\",\n\t\"text-a...
javascript
chosen
[ { "from": "system", "value": "[observable] Fix missing next/error/complete methods on multicast instances\n" }, { "from": "human", "value": "const Observable = require('./SanityObservable')\n\n/*\n A super simple implementation of an observable based multicast.\n Think of it as a Promise/Defer...
javascript
chosen
[ { "from": "system", "value": "Remove direct import of styles\n" }, { "from": "human", "value": "import React from 'react'\nimport '../styles/Sources.css'\n\nconst SourceCard = ({source, clickDiv, setStyle}) => {\n return (\n <div className=\"source\" onClick={clickDiv} style={setStyle()}>\n ...
javascript
chosen
[ { "from": "system", "value": "Add source root for source maps\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar smaps = require('gulp-sourcemaps');\n\ngulp.task('default', ['build']);\n\ngulp.task('build', function() {\n var babel = require('gulp-babel');\n\...
javascript
chosen
[ { "from": "system", "value": "Add more text to the button\n" }, { "from": "human", "value": "$(()=>{\n //ADD A BUTTON TO THE PLAYER\n $('body').append(`<div class=\"afro-button-wrapper\"><button id=\"afro-close-fullscreen\">CLOSE PLAYER</button></div>`);\n\n //WHEN BUTTON IS CLICKED, SE...
javascript
chosen
[ { "from": "system", "value": "Search: Fix query to match_all if query is undefined\n" }, { "from": "human", "value": "const { INDEX_NAME, TYPE_NAME } = require('./constants');\n\n/**\n * Helper function that returns a Promise to a search with the Elasticsearch client with the\n * given query for...
javascript
chosen
[ { "from": "system", "value": "Fix error when there is no previous commit\n" }, { "from": "human", "value": "export const getCompareUrl = (commitInfo) => {\n const previousCommitUrl = commitInfo.getIn(['previous', 'url']);\n const currentCommitId = commitInfo.getIn(['current', 'id']);\n return...
javascript
chosen
[ { "from": "system", "value": "Fix instance reference in helper\n" }, { "from": "human", "value": "Template.taggedCourses.helpers({\n 'courses': function () {\n return Courses.find().fetch();\n },\n 'tag': function () {\n // Get reference to template instance\n var insta...
javascript
chosen
[ { "from": "system", "value": "Destroy model only if it's present\n" }, { "from": "human", "value": "var cdb = require('cartodb-deep-insights.js');\n\n/**\n * Widget definition Model\n */\nmodule.exports = cdb.core.Model.extend({\n\n initialize: function (attrs, options) {\n if (!options.laye...
javascript
chosen
[ { "from": "system", "value": "Remove message traits from Signup controller\n" }, { "from": "human", "value": "SignupController = Space.accountsUi.SignupController;\n\nSignupController.extend(Donations, 'OrgRegistrationsController', {\n\n mixin: [\n Space.messaging.EventSubscribing,\n Spac...
javascript
chosen
[ { "from": "system", "value": "Create a test for the click event\n" }, { "from": "human", "value": "import test from 'tape';\nimport Dropdown from '../Dropdown.jsx';\nimport React from 'react';\nimport TestUtils from 'react-addons-test-utils';\n\nconst setupWithoutRender = () => {\n return new D...
javascript
chosen
[ { "from": "system", "value": "Add CLI paramater for showing hidden files\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n\"use strict\";\n\nvar program = require('commander'),\n pkg = require('../package.json');\n\nprogram\n .version(pkg.version)\n .option('-p, --port [port]',...
javascript
chosen
[ { "from": "system", "value": "Add test for getDeprecatedClass() function on abstract class\n" }, { "from": "human", "value": "var DeprecatedClass = require('../../../lib/helpers/deprecated-class');\n\ndescribe('lib/helpers/deprecated-class', function() {\n it('should raise exception for getOpti...
javascript
chosen
[ { "from": "system", "value": "Remove dispatcher and unwanted boilerplate\n" }, { "from": "human", "value": "import React from 'react';\nimport { connect } from 'react-redux';\n// Components\nimport { Route, Redirect } from 'react-router';\nimport { Button, Glyphicon } from 'react-bootstrap';\nim...
javascript
chosen
[ { "from": "system", "value": "Add test for failing listener\n" }, { "from": "human", "value": "import bus from '../src/bus.js';\n\nbeforeEach(function () {\n bus.stopListenAll();\n});\n\nit('sends and listens', function () {\n var obj = {\n value: 57\n };\n bus.listen('test', function (e,...
javascript
chosen
[ { "from": "system", "value": "[fix] Include __dirname to properly route index.html\n" }, { "from": "human", "value": "var port = process.env.PORT || 3000;\r\nvar express = require('express');\r\nvar app = express();\r\n\r\napp.use(express.static(__dirname + '/public'));\r\n\r\napp.use(function(r...
javascript
chosen
[ { "from": "system", "value": "Move the compress middleware to the top.\n" }, { "from": "human", "value": "/*\r\n * Melodycoder, an personal webside.\r\n * http://botobe.net/\r\n *\r\n * Copyright (c) 2013 Kai.XU\r\n * Licensed under the MIT license.\r\n */\r\n\r\nvar express = require('express')...
javascript
chosen
[ { "from": "system", "value": "Add routes to handle login GET and POST\n" }, { "from": "human", "value": "const express = require('express')\nconst app = express()\nconst http = require('http').Server(app)\nconst path = require('path')\nconst bodyParser = require('body-parser')\nconst register = ...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect variable on line 26\n" }, { "from": "human", "value": "require('dotenv').load();\n\nvar moment = require('moment');\nvar fixturesEpl = require('./fixtures/epl.json')['fixtures'];\nvar fixturesCl = require('./fixtures/cl.json')['fixtures'];\nvar postMes...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary config from product query\n\n" }, { "from": "human", "value": "import { buildFilterProductsQuery } from '@vue-storefront/store/helpers'\n\nexport default {\n name: 'CategorySidebar',\n props: {\n filters: {\n type: Object,\n require...
javascript
chosen
[ { "from": "system", "value": "Fix how .ts files are served by karma.\n" }, { "from": "human", "value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n config.set({\n b...
javascript
chosen
[ { "from": "system", "value": "Add .min name to minified .js\n" }, { "from": "human", "value": "'use strict';\n\n// TODO:\n // - Rename to .min for minified js - get paths right for components.\n\nvar gulp = require('gulp'),\n nib = require('nib'),\n $ = require('gulp-load-plugins')({ laz...
javascript
chosen
[ { "from": "system", "value": "Add Bernoulli iterator to namespace\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 compliance w...
javascript
chosen
[ { "from": "system", "value": "Change api endpoint in extension\n" }, { "from": "human", "value": "const url = process.env.NODE_ENV === 'production'\n ? 'https://gene-info.org/api'\n : 'http://localhost:8002';\n\nchrome.runtime.onMessage.addListener((request, sender, callback) => {\n if (reque...
javascript
chosen
[ { "from": "system", "value": "Use new Congress module to find legislator by bioId\n" }, { "from": "human", "value": "/**\n *\n */\n\nvar changeCaseKeys = require('change-case-keys');\n\nvar Legislator = require('../../../../models').Legislator;\nvar resHelpers = require('../helpers/response');\n...
javascript
chosen
[ { "from": "system", "value": "Refactor the taxonomy pages plugin to use site.config data.\n" }, { "from": "human", "value": "var fs = require('fs')\nvar natural = require('natural')\nvar inflector = new natural.NounInflector()\nvar _ = require('lodash-node/modern')\n\nvar config = require('../li...
javascript
chosen
[ { "from": "system", "value": "Fix bug where modal doesn't disappear on delete\n" }, { "from": "human", "value": "Template['modifyBookModal'].helpers({\n header: function() {\n if (Session.get('modifyBookModal.doc')) {\n return \"Modify book\";\n } else {\n return \"Add a new boo...
javascript
chosen
[ { "from": "system", "value": "Change package name from falcor-server to falcor-express\n\nReviewed by @jhusain" }, { "from": "human", "value": "var express = require('express');\nvar app = express();\nvar FalcorServer = require('falcor-server');\nvar Cache = require('../../data/Cache');\nvar fal...
javascript
chosen
[ { "from": "system", "value": "Use var instead of let to fix tests in older Node versions.\n" }, { "from": "human", "value": "export let c = 0;\nexport function increment() {\n ++c;\n module.export();\n};\n" }, { "from": "gpt", "value": "export var c = 0;\nexport function increment(...
javascript
chosen
[ { "from": "system", "value": "FE: Add ARIA role and state on field-help\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n moj.Modules.FieldHelp = {\n moreInfos: [],\n\n init: function() {\n this.cacheEls();\n this.bindEvents();\n this.addMoreInfoLink();...
javascript
chosen
[ { "from": "system", "value": "Update List View Item View with live urls. Waiting for API to get more data.\n" }, { "from": "human", "value": "app.views.PlanListView = Backbone.View.extend({\n tagName:'ul',\n className:'table-view',\n initialize:function () {\n var self = this;\n ...
javascript
chosen
[ { "from": "system", "value": "Fix edit annotation rendering speed\n\nThe editTemplateVariableNames action would fire way too many times.\nThis cause poor rendering speeds with annotations.\n" }, { "from": "human", "value": "// Middleware generally used for actions needing parsed queryStrings\nim...
javascript
chosen
[ { "from": "system", "value": "Fix browserify setup for example page load\n" }, { "from": "human", "value": "var connect = require('connect');\nvar server = connect.createServer();\n\nserver.use(connect.static(__dirname));\nserver.use(require('browserify')({\n require: ['cucumber-html',\n ...
javascript
chosen
[ { "from": "system", "value": "Fix an atom version check oopsie\n" }, { "from": "human", "value": "import semver from 'semver';\n\nconst {major, minor, patch} = semver.parse(atom.appVersion);\nconst atomVersion = `${major}.${minor}.${patch}`;\nconst requiredVersion = '>=1.13.0';\n\nif (atom.inDev...
javascript
chosen
[ { "from": "system", "value": "Use read stream to ensure file is greater than 0 bytes\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\"use strict\";\n\nvar argv = require(\"optimist\").argv;\nvar pjson = require(\"../package.json\");\nvar defaultConfig = require(\"./default-config\");\n...
javascript
chosen
[ { "from": "system", "value": "Replace newlines with <br /> tags\n" }, { "from": "human", "value": "var Mehdown;\n\nif (typeof exports === 'object' && typeof require === 'function') {\n Mehdown = exports;\n}\nelse {\n Mehdown = {};\n}\n\nMehdown.usernameRegExp = /(^|[^@\\w])@(\\w{1,15})\\b/...
javascript
chosen
[ { "from": "system", "value": "Remove version out of date version number" }, { "from": "human", "value": "/*jshint browser:true, node:true*/\n\n'use strict';\n\n/**\n * @preserve Create and manage a DOM event delegator.\n *\n * @version 0.3.0\n * @codingstandard ftlabs-jsv2\n * @copyright The Fin...
javascript
chosen
[ { "from": "system", "value": "Send emails once we have them\n" }, { "from": "human", "value": "var email = new (require('./emailer'))(),\n backdrop = new (require('./integrations/backdrop'))(),\n stagecraft = new (require('./integrations/stagecraft'))(),\n message = new (require('./message'))...
javascript
chosen
[ { "from": "system", "value": "Use `env.session_id` instead of deprecated `req.sid`.\n" }, { "from": "human", "value": "// Apply login on current session and change session id for security reasons.\n\n\n'use strict';\n\n\nvar rnd = require('nodeca.core/lib/rnd');\n\n\nmodule.exports = function lo...
javascript
chosen
[ { "from": "system", "value": "Add html code implementing the mockups for trading\n" }, { "from": "human", "value": "import React from 'react';\nimport { connect } from 'react-redux';\n\n@connect(state => ({ tickTrade: state.tickTrade }))\nexport default class TickTradePane extends React.Componen...
javascript
chosen
[ { "from": "system", "value": "fix(feeds): Use feed id instead of checksum as back up feed name.\n" }, { "from": "human", "value": "// @flow\nimport {createSelector} from 'reselect'\n\nimport selectCurrentBundle from './current-bundle'\n\nexport default createSelector(\n (state) => state.scenari...
javascript
chosen
[ { "from": "system", "value": "Make the root requires a bit nicer\n" }, { "from": "human", "value": "var Serializer = require(\"./serialization/serializer\").Serializer,\n serialize = require(\"./serialization/serializer\").serialize,\n Deserializer = require(\"./deserialization/deserialize...
javascript
chosen
[ { "from": "system", "value": "Rename complete => morePending, add relevance getter\n" }, { "from": "human", "value": "// @license\n// Copyright (c) 2017 Google Inc. All rights reserved.\n// This code may only be used under the BSD style license found at\n// http://polymer.github.io/LICENSE.txt\n...
javascript
chosen
[ { "from": "system", "value": "Call through to the correct method" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react'\nimport { connect } from 'react-redux'\nimport { openModal, closeModal } from '../../actions/modals'\nimport ConfirmDialog from '../dialogs/Confir...
javascript
chosen
[ { "from": "system", "value": "Change ints to strings for Int32 errors\n\n" }, { "from": "human", "value": "const RSBuddy = `\n\ttype RSBuddy {\n\t\tts: String\n\t\tbuyingPrice: Int\n\t\tbuyingCompleted: Int\n\t\tsellingPrice: Int\n\t\tsellingCompleted: Int\n\t\toverallPrice: Int\n\t\toverallComp...
javascript
chosen
[ { "from": "system", "value": "Allow Pausing Atmo for Video Playback\n\nWas missing in #332\n" }, { "from": "human", "value": "pageflow.ConfigurationEditorView.register('video', {\n configure: function() {\n this.tab('general', function() {\n this.group('general');\n\n this.input('a...
javascript
chosen
[ { "from": "system", "value": "Remove quotes to import uglifyify\n" }, { "from": "human", "value": "var fs = require('fs');\nvar browserify = require('browserify');\nvar uglifyify = require('uglifyify');\n\nvar path = function (d) {\n var p = require('path');\n return p.resolve(__dirname, d);\n...
javascript
chosen
[ { "from": "system", "value": "Fix bad method calls from rebase error\n" }, { "from": "human", "value": "import React from 'react';\n\nimport ChronosStore from '../../stores/ChronosStore';\nimport DescriptionList from '../../components/DescriptionList';\n\nclass JobRunHistoryTable extends React.C...
javascript
chosen
[ { "from": "system", "value": "Remove event from scene highlight params\n\nDumb style stuff.\n" }, { "from": "human", "value": "(function sceneHighlight() {\n 'use strict';\n\n function highlightLines(query) {\n var elements = document.querySelectorAll(query);\n\n Array.from(document.quer...
javascript
chosen
[ { "from": "system", "value": "Add check if its correct page\n" }, { "from": "human", "value": "$(document).ready(function () {\n var height = $(window).innerHeight();\n var headerHeight = $('header').innerHeight();\n $('main').css('height', height);\n window.scrollTo(0, headerHeight)...
javascript
chosen
[ { "from": "system", "value": "Make ukbay script to work on different ukbay URLs" }, { "from": "human", "value": "// ==UserScript==\n// @name UkBay without clicking\n// @namespace https://github.com/rohanorton\n// @version 0.1\n// @description Go straight to Piratebay mirror with...
javascript
chosen
[ { "from": "system", "value": "Comment out initial solution, include faster course solution\n" }, { "from": "human", "value": "// Reverse Array In Place\n\n/*RULES:\n Take array as parameter\n Reverse array\n Return reversed array\n\n NOTES:\n Can't create new empty array to push in\n M...
javascript
chosen
[ { "from": "system", "value": "Replace reference to src/shared/ with shared/\n" }, { "from": "human", "value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport {connect} from 'react-redux'\n\nimport Notification from 'src/shared/components/Notification'\n\nconst Notification...
javascript
chosen
[ { "from": "system", "value": "Make onUnhandled safe for undefined errors\n\nSummary:\nThis pull request fixes cases where the `error` argument of the `onUnhandled` method in `Libraries/Promise.js` is undefined. Previously this would result in a redbox with the helpful message: `Cannot read property message ...
javascript
chosen
[ { "from": "system", "value": "Create .nodewar if it doesn't exist.\n" }, { "from": "human", "value": "var fs = require('fs');\n\nvar home = process.env.HOME;\nvar fname = home + '/.nodewar';\n\nmodule.exports = {\n save:function(session){\n var fd = fs.openSync(fname, 'w', 0600);\n\n if (...
javascript
chosen