conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add data handling and render chart\n" }, { "from": "human", "value": "Template.homeActivityCountsByFacilitatorRole.onCreated(function () {\n // Set up reactive variable for chart data\n\n // Call method to fetch data, assigning it to reactive variable\n});\n\nTemp...
javascript
chosen
[ { "from": "system", "value": "feature: Add template to working directory\n" }, { "from": "human", "value": "\n'use strict';\n\nvar fs = require('fs')\n , _find = require('lodash.find')\n , prompt = require('inquirer').prompt\n , stellorc = require('./stellorc')\n , defaults = require('../con...
javascript
chosen
[ { "from": "system", "value": "Add Bitcoin Cash (BCH) to bitstamp\n" }, { "from": "human", "value": "const Lang = imports.lang;\n\nconst Local = imports.misc.extensionUtils.getCurrentExtension();\nconst BaseProvider = Local.imports.BaseProvider;\n\n\nconst Api = new Lang.Class({\n Name: 'Bitstam...
javascript
chosen
[ { "from": "system", "value": "Fix the Redo Button initialize issue\n\nRedo Button is disabled when => store is not initialized, or redo stack is empty." }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { EditorState } from 'dr...
javascript
chosen
[ { "from": "system", "value": "Replace the code \"indo\" with \"id\"\n\nFixing this silly mistake." }, { "from": "human", "value": "scratchblocks2.load_language(scratchblocks2._translations.indo);\nscratchblocks2.parse();\nscratchblocks2.parse('code.blocks', {inline: true});\n" }, { "from...
javascript
chosen
[ { "from": "system", "value": "Update description in blueprints generator\n" }, { "from": "human", "value": "import { Base } from 'yeoman-generator';\nimport generatorArguments from './arguments';\nimport generatorOptions from './options';\nimport generatorSteps from './steps';\n\nexport default ...
javascript
chosen
[ { "from": "system", "value": "Add a new test case\n\nChange-Id: Iadcc04e47a4214dfbd5524b4ea499d88143fe455\n" }, { "from": "human", "value": "import React from 'react';\nimport TestUtils from 'react-addons-test-utils';\nimport RangeInput from '../../index';\n\ndescribe('react-range-input', functi...
javascript
chosen
[ { "from": "system", "value": "Set BG to transparent instead of matching page background color" }, { "from": "human", "value": "(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['exports', 'echarts...
javascript
chosen
[ { "from": "system", "value": "Add default checked = false state to models\n" }, { "from": "human", "value": "/**\n * Collection for interfacing with localStorage.\n */\n\n'use strict';\n\nvar Backbone = require('backbone');\nvar _ = require('lodash');\n\nmodule.exports = Backbone.Collecti...
javascript
chosen
[ { "from": "system", "value": "Load current tab from url hash\n" }, { "from": "human", "value": "export class Tabs {\n initEventListeners () {\n $('.nav-tabs a').on('click', $.proxy(this.changeTab, this))\n }\n\n changeTab (event) {\n let $current = $(event.currentTarget)\n /* if the ...
javascript
chosen
[ { "from": "system", "value": "Fix: Use new React ref API (needs React >= 16.3)" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport ReactDOM from 'react-dom';\n\n\nexport default class ReactNoUnmountHide extends Component {\n constructor() {\n super();\n }\n\n ...
javascript
chosen
[ { "from": "system", "value": "Fix client js error if comment author deleted\n" }, { "from": "human", "value": "angular.module('commentFilters', []).filter('authorCssClass', function () {\n\treturn function (comment, question) {\n\t\tvar answers = comment.author.answers;\n\t\tif (!answers) {\n\t\...
javascript
chosen
[ { "from": "system", "value": "Remove unused DirectionalLight position/target properties.\n" }, { "from": "human", "value": "'use strict';\n\nvar Vector3 = require( '../math/vector3' );\nvar Object3D = require( '../object3d' );\n\nfunction DirectionalLight( color, intensity ) {\n Object3D.call( ...
javascript
chosen
[ { "from": "system", "value": "Revert of output path grunt task. The git repo should be loated at Drive:\\xxxx\"\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n var path = require('path');\n var base = path.resolve();\n\n // Project configuration.\n grunt.initConfig(...
javascript
chosen
[ { "from": "system", "value": "Add state routing to example\n" }, { "from": "human", "value": "import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport ReactTestUtils from \"react-addons-test-utils\"\n\nimport * as Testdown from \"../index.js\"\n\nimport exampleSuite from \"./examp...
javascript
chosen
[ { "from": "system", "value": "Allow player to be defined from TMX file\n" }, { "from": "human", "value": "window.addEventListener('load',function() {\n var Q = Quintus({\n development: true,\n //audioPath: \"assets/audio/\",\n imagePath: \"assets/images/\",\n dataPath: \"assets/data...
javascript
chosen
[ { "from": "system", "value": "Revert \"Intentionally failing test to check Travis CI build works.\"\n\nThis reverts commit 9a0c5bcc93c5ab496d528bb4a7231b48ab20f689.\n\nThe experiment has worked - now we want the tests to pass again.\n" }, { "from": "human", "value": "describe('freeagent-transact...
javascript
chosen
[ { "from": "system", "value": "Improve asset `manualTerminationAsync`, use valid global instance of `wTools`\n" }, { "from": "human", "value": "\nrequire( 'wTesting' );\nconst _ = require( 'wTools' );\n_.include( 'wProcess' );\nlet c = 0;\n\n//\n\n_.process.on( 'exit', () =>\n{\n debugger;\n c+...
javascript
chosen
[ { "from": "system", "value": "[landing] Call `subscribe_email` endpoint on form submission\n\nSummary: Hooked up the landing page email form to the `subscribe_email` endpoint we created on the backend.\n\nTest Plan: Was able to successfully hit endpoint and get responses back as expected. Was also, thanks t...
javascript
chosen
[ { "from": "system", "value": "Update MaterialTextfield unit test with chai-jquery\n" }, { "from": "human", "value": "\n describe('textfield tests', function () {\n\n it('Should have MaterialTextfield globally available', function () {\n expect(MaterialTextfield).to.be.a('function');\n ...
javascript
chosen
[ { "from": "system", "value": "Update test to use ?state" }, { "from": "human", "value": "'use strict';\n\nrequire('should');\nvar request = require('supertest');\n\nvar app = require('../app.js');\nvar helpers = require('./helpers.js');\nvar config = require('../config/configuration.js');\n\n\nd...
javascript
chosen
[ { "from": "system", "value": "Improve user SSH key management (SAAS-612)\n\nAdded validation for empty key name field. Implemented getting\nkey name from PUBkey contents.\nhttp://localhost:8001/#/keys/add/\n" }, { "from": "human", "value": "(function() {\n angular.module('ncsaas')\n .control...
javascript
chosen
[ { "from": "system", "value": "Watch by default and switch to a different devtool\n" }, { "from": "human", "value": "const webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n main: './javascript/app.jsx',\n vendor: ['react', 'react-dom', 'whatwg-fetch']\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Set status code on unauthorized\n" }, { "from": "human", "value": "let bcrypt = require('bcrypt-nodejs');\nlet uuid = require('uuid/v1');\nlet Promise = require('bluebird');\n\nlet RestfulController = require('./_restful-controller');\n\nmodule.exports = class UserC...
javascript
chosen
[ { "from": "system", "value": "Revert to include dark UI theme\n" }, { "from": "human", "value": "define([\n 'ace/theme'\n], function(aceTheme) {\n var themes = codebox.require(\"core/themes\");\n\n themes.add({\n id: \"tomorrow.night\",\n title: \"Tomorrow Night\",\n\n ...
javascript
chosen
[ { "from": "system", "value": "Use lowercase type for consistency\n" }, { "from": "human", "value": "/*\n Heading Block\n*/\nSirTrevor.Blocks.Heading = SirTrevor.Block.extend({\n\n type: 'Heading',\n\n title: function(){ return i18n.t('blocks:heading:title'); },\n\n editorHTML: '<div class=\"...
javascript
chosen
[ { "from": "system", "value": "Support recursion in color tags\n" }, { "from": "human", "value": "(function() {\n Discourse.Dialect.inlineBetween({\n start: \"[color=\",\n stop: \"[/color]\",\n rawContents: true,\n emitter: function(contents) {\n var matches = contents.match(/(...
javascript
chosen
[ { "from": "system", "value": "Change model associations to include belongs to many serfs\n" }, { "from": "human", "value": "'use strict';\nmodule.exports = function(sequelize, DataTypes) {\n var User = sequelize.define('User', {\n first_name: DataTypes.STRING,\n last_name: DataTypes.STRIN...
javascript
chosen
[ { "from": "system", "value": "Add more proper response handling sending the list to AppBody\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport '../App.css';\nlet request = require('superagent');\n\nclass SearchBar extends Component {\n\n constructor() {\n su...
javascript
chosen
[ { "from": "system", "value": "Return 404 not found if user or research entity doesn't exist when getting the profile image\n" }, { "from": "human", "value": "/**\n * TagLabelController\n *\n * @description :: Server-side logic for managing Journals\n * @help :: See http://sailsjs.org/#!/d...
javascript
chosen
[ { "from": "system", "value": "Replace the promise with async / await as its 10x cooler\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport Loader from 'react-loader';\nimport Header from './Header';\nimport ImgurImageList from './ImgurImageList';\nimport { search...
javascript
chosen
[ { "from": "system", "value": "Revert \"Made jest test file extension name optional\"\n\nThis reverts commit 8565613614aecf5ecbd7f9f0f35394c20ff52fa9.\n" }, { "from": "human", "value": "import addons from '@storybook/addons';\n\nconst findTestResults = (testFiles, jestTestResults, jestTestFilesEx...
javascript
chosen
[ { "from": "system", "value": "Adjust camera to persisted settings\n" }, { "from": "human", "value": "import React from 'react'\nimport { render } from 'react-dom'\nimport { compose, applyMiddleware, createStore } from 'redux';\nimport { Provider } from 'react-redux';\nimport logger from 'redux-l...
javascript
chosen
[ { "from": "system", "value": "Implement sorting of stock tables.\n" }, { "from": "human", "value": "$(\"#location\").select2({\n placeholder: \"Location\",\n allowClear: true\n});\n$(\"#site\").select2({\n placeholder: \"Site\",\n allowClear: true\n});\n$(\"#category\").select2({\n ...
javascript
chosen
[ { "from": "system", "value": "Add variable answer numbers to add answer option jquery\n" }, { "from": "human", "value": "$(document).ready(function() {\n var answer_number = 1;\n // add a question to Make Survey form when user clicks on \"add question\"\n $('#add-answer-option-field').on('cli...
javascript
chosen
[ { "from": "system", "value": "Change version number to 0.1.x\n" }, { "from": "human", "value": "/**\n * Configuration for kort application\n */\nExt.define('Denkmap.util.Config', {\n singleton: true,\n\n config: {\n /**\n * @cfg {String} version Current version number of app...
javascript
chosen
[ { "from": "system", "value": "Add cormoran to vendor script\n" }, { "from": "human", "value": "import path from 'path';\nimport webpack from 'webpack'\n\nlet config = {\n entry: {\n main: './src/main.js',\n vendor: [ 'react', 'react-dom' ]\n },\n output: {\n path: path.resolve(__dirn...
javascript
chosen
[ { "from": "system", "value": "Use const for fakeResponse function\n" }, { "from": "human", "value": "import queryString from 'query-string';\nimport pathMatch from 'path-match';\nimport parseUrl from 'parse-url';\n\nconst nativeFetch = window.fetch;\n\n//TODO: Handle response headers\nlet fakeRe...
javascript
chosen
[ { "from": "system", "value": "Change duplicate variable in httpconnection\n" }, { "from": "human", "value": "module.exports = HttpConnection;\n\nvar request = require('requestretry');\nvar HttpConfig = require(\"./HttpConfig\");\nvar PaymayaApiError = require(\"./PaymayaApiError\");\n\nfunction ...
javascript
chosen
[ { "from": "system", "value": "[LIB] Add support for a class to be applied to the Popover component\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { autobind } from 'core-decorators';\nimport { Popover, Position, Button } from \"@bluepri...
javascript
chosen
[ { "from": "system", "value": "Make an use of the search term state\n" }, { "from": "human", "value": "import {div, p, input, h1, h2, tr, td, tbody, thead, th, table, h4, h5} from '@cycle/dom'\n\n\nexport function view(state$) {\n return state$.map((state) => {\n\n const list = state.characte...
javascript
chosen
[ { "from": "system", "value": "Use Function.prototype.bind to support ES6 classes\n\nBy using `bind` it will work both with old style functions as classes\r\nand the new proper classes in ES2015." }, { "from": "human", "value": "define(function () {\n\n function F(){}\n\n /**\n * Do fn....
javascript
chosen
[ { "from": "system", "value": "Remove the only in test case !\n" }, { "from": "human", "value": "'use strict';\n\n\nvar OCLE = require('../..');\n\n\ndescribe.only('toDiastereotopicSVG on propane', function () {\n var molecule=OCLE.Molecule.fromSmiles('CCC');\n var svg=molecule.toDiastereot...
javascript
chosen
[ { "from": "system", "value": "Fix the rule set test\n" }, { "from": "human", "value": "/* jshint expr:true */\nimport { expect } from 'chai';\nimport {\n describeModel,\n it\n} from 'ember-mocha';\n\ndescribeModel(\n 'rule-set',\n 'RuleSet',\n {\n // Specify the other units that are requ...
javascript
chosen
[ { "from": "system", "value": "platformPrefixIcon: Return given input if criteria not met\n\nIf the given icon name is already available and cannot be prefixed by\nplatform because it does not exist, return early. (See: ionic, which\nhas logo-ionic.)\n\nSigned-off-by: Kristofer Rye <1ed31cfd0b53bc3d1689a6fee...
javascript
chosen
[ { "from": "system", "value": "Add proptype validation to Table component\n" }, { "from": "human", "value": "import React from 'react';\nimport { map } from 'lodash';\n\nimport CampaignRow from './CampaignRow';\nimport EventRow from './EventRow';\nimport './table.scss';\n\nclass Table extends Rea...
javascript
chosen
[ { "from": "system", "value": "Support only \\n as newline control character\n" }, { "from": "human", "value": "'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\n\nvar _ = require('underscore');\n\nfunction Generator(templateFile, targetFile) {\n templateFile = path.join(__d...
javascript
chosen
[ { "from": "system", "value": "Add dependency to jest transform\n" }, { "from": "human", "value": "module.exports = {\n setupFilesAfterEnv: ['./jest.setup.js'],\n moduleDirectories: ['<rootDir>/node_modules', 'node_modules'],\n collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],\n tran...
javascript
chosen
[ { "from": "system", "value": "Update demo server reported version number\n" }, { "from": "human", "value": "const EventEmitter = require(\"events\");\nclass DemoClient extends EventEmitter {}\n\nconst Client = new DemoClient();\nexports.client = Client;\n\nClient.connect = () => {\n Client.emit...
javascript
chosen
[ { "from": "system", "value": "Make sure encoding does not get lost\n" }, { "from": "human", "value": "/**\n * @module readcache\n */\n\nvar fs = require('fs');\n\nvar cache = {};\n\n/**\n * Reads a text file and stores it in the cache.\n *\n * @param {string} path - Path to the file you want to ...
javascript
chosen
[ { "from": "system", "value": "Simplify import of test helper test modules\n" }, { "from": "human", "value": "function importAll( r ) {\n\tr.keys().forEach( r );\n}\n\n// import tests in a certain order instead of importing them alphabetically\nimportAll( require.context( \"qunit/test/\", true, /...
javascript
chosen
[ { "from": "system", "value": "Add test for get trello lists\n" }, { "from": "human", "value": "var request = require('../../../supertest.js');\nvar should = require('should');\n\ndescribe('Trello controller tests', function() {\n 'use strict';\n this.timeout(15000);\n\n it('should get all tre...
javascript
chosen
[ { "from": "system", "value": "Use users service to get current user (saas-185)\n" }, { "from": "human", "value": "'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('keysService', ['$q', 'RawKey', 'currentStateService', keysService]);\n\n function keysService($q, RawKey, c...
javascript
chosen
[ { "from": "system", "value": "[Home] Fix getting artwork rail content for updated schema.\n" }, { "from": "human", "value": "/* @flow */\n'use strict';\n\nimport Relay from 'react-relay';\nimport React from 'react';\nimport { ScrollView } from 'react-native';\n\nimport Rail from '../components/h...
javascript
chosen
[ { "from": "system", "value": "Add --include-ts to find error script\n" }, { "from": "human", "value": "const { writeFileSync } = require('fs')\nconst alltests = require('./test-results')\n\nconst results = alltests.testResults[0].assertionResults\n .filter(_ => _.failureMessages.length === 1)\n...
javascript
chosen
[ { "from": "system", "value": "Add support for Jest 22 envs.\n" }, { "from": "human", "value": "const NodeEnvironment = require('jest-environment-node');\nconst undom = require('undom');\nrequire('./register');\n\nmodule.exports = class extends NodeEnvironment {\n constructor(config) {\n supe...
javascript
chosen
[ { "from": "system", "value": "Remove react-tap-event-plugin from the styleguide.\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme'\nimport MuiThemeProvider from 'material-ui/styles/MuiThemeProvid...
javascript
chosen
[ { "from": "system", "value": "Fix typo, tempalte to template\n" }, { "from": "human", "value": "'use strict';\n\nvar pathwayApp = angular.module('pathwayApp', ['ui.router', 'templates']);\n\npathwayApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) {\n //Default route\n ...
javascript
chosen
[ { "from": "system", "value": "Fix `.ui.menu .item` click active state issue\n" }, { "from": "human", "value": "$(document).ready(function() {\n // put your code here.\n $('.ui.sticky').sticky();\n $('.ui.dropdown').dropdown({on: 'click'});\n $('.item[data-tab]').tab();\n});\n" }, { "...
javascript
chosen
[ { "from": "system", "value": "Add fix for embroider tests\n" }, { "from": "human", "value": "/* eslint-disable prettier/prettier */\n'use strict';\n\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function (defaults) {\n let app = new EmberAddon(defaults, ...
javascript
chosen
[ { "from": "system", "value": "Use top thousand results when faceting\n" }, { "from": "human", "value": "\"use strict\";\nvar search = require('../lib/search');\n\nmodule.exports = function (input, callback) {\n if (typeof input.query.plan !== 'undefined' && typeof input.query.plan.esquery !==...
javascript
chosen
[ { "from": "system", "value": "Remove additional test Bubble from navigation main\n\n" }, { "from": "human", "value": "//@flow\nimport React from \"react\";\n\nimport { Ul, Li, Nav } from \"./styled-components\";\nimport { LinkedInIcon } from \"../linkedin-icon\";\nimport { OctocatIcon } from \"....
javascript
chosen
[ { "from": "system", "value": "Switch to using same proxy settings as main BeerTap.js\n" }, { "from": "human", "value": "define(['TwitterProxy', 'ListView', 'ListPresenter', 'TapsModel'],\nfunction (TwitterProxy, ListView, ListPresenter, TapsModel) {\n\n function BeerTapEmbed(twitterScreenName...
javascript
chosen
[ { "from": "system", "value": "Use RecipeListEntry for search results and recipe history\n" }, { "from": "human", "value": "import React from 'react';\nimport '../scss/_recipeContainer.scss';\n\nimport RecipeEntry from '../../client/components/RecipeEntry.js';\n\nconst RecipeContainer = (props) =...
javascript
chosen
[ { "from": "system", "value": "Fix channel sorting to work across clients on Vue\n" }, { "from": "human", "value": "\"use strict\";\n\nconst $ = require(\"jquery\");\nconst socket = require(\"../socket\");\n\nsocket.on(\"sync_sort\", function(data) {\n\tconst type = data.type;\n\tconst order = da...
javascript
chosen
[ { "from": "system", "value": "Remove unobvious default limit for followers. Now its Infinity by default.\n" }, { "from": "human", "value": "var _ = require('underscore');\nvar util = require('util');\nvar FeedBase = require('./feed-base');\n\nfunction AccountFollowersFeed(session, accountId, lim...
javascript
chosen
[ { "from": "system", "value": "Move calendarId into environment keys\n" }, { "from": "human", "value": "import { CALL_API } from 'redux-api-middleware';\nimport moment from 'moment';\n\nexport const FETCH_EVENTS = (calendar) => {\n // Get events for current month\n const\n startDate ...
javascript
chosen
[ { "from": "system", "value": "Set ember/no-jquery lint rule to warn as we upgrade Ember CLI to address it later\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n root: true,\n parser: 'babel-eslint',\n parserOptions: {\n ecmaVersion: 2018,\n sourceType: 'module',\...
javascript
chosen
[ { "from": "system", "value": "Revert \"Options rewrite started, allows for the built in primitive types now.\"\n\nThis reverts commit c1b43ee736baf7be8abd224fba9d1aa19d17e944.\n" }, { "from": "human", "value": "require('../CactusJuice.js');\n\nmodule.exports = (function () {\n var Options = Cac...
javascript
chosen
[ { "from": "system", "value": "Fix Tax Letter test that was leaving the date to chance\n" }, { "from": "human", "value": "import { find, visit } from '@ember/test-helpers';\nimport { module, test } from \"qunit\";\nimport { setupApplicationTest } from 'ember-qunit';\nimport moment from \"moment\"...
javascript
chosen
[ { "from": "system", "value": "Update helper to not look for success message.\n" }, { "from": "human", "value": "\n/**\n * WordPress dependencies\n */\nimport { activatePlugin, visitAdminPage } from '@wordpress/e2e-test-utils';\n\n/**\n * The allow list of AMP modes.\n *\n */\nexport const allowe...
javascript
chosen
[ { "from": "system", "value": "Add Salmon Run (co-op mode) data\n\n" }, { "from": "human", "value": "require('dotenv').config();\nconst axios = require('axios');\nconst path = require('path');\nconst fs = require('fs');\nconst mkdirp = require('mkdirp');\n\nconst dataPath = path.resolve('public/d...
javascript
chosen
[ { "from": "system", "value": "Fix bad path to ConsoleLogger.\n" }, { "from": "human", "value": "import ProvidedAppDelegate from \"./lib/ProvidedAppDelegate\";\nimport SimpleSession from \"./lib/providers/SimpleSession\";\nimport ConsoleLogger from \"./lib/providers/NullLogger\";\nimport NullLogg...
javascript
chosen
[ { "from": "system", "value": "Fix lambda service in dev environment when lambda function does not have any events.\n" }, { "from": "human", "value": "// This file gets all lambda functions from the Serverless\n// config and exports the handlers and endpoint info.\n\nimport path from 'path'\nimpo...
javascript
chosen
[ { "from": "system", "value": "Remove redundant removal of array\n\nThis operation is already being done by the\nremoveArray function called before\n" }, { "from": "human", "value": "const { pick, mapValues, isArray, pickBy, get } = require('lodash')\n\nconst { search } = require('../../search/se...
javascript
chosen
[ { "from": "system", "value": "Apply jscs to server code\n\nAtom's jscs-fixer automatically fixed some problems: now all lines have a tab\nindentation and statements are well spaced. Google's preset also converts all\ndouble quotes into single quotes unless it's pure JSON.\n" }, { "from": "human", ...
javascript
chosen
[ { "from": "system", "value": "Adjust ServiceWorker for polyfill demo\n" }, { "from": "human", "value": "importScripts('/streaming-dot.min.js');\n\nconst ASSETS = [\n '/header.partial.html',\n '/footer.partial.html',\n '/index.dot.html'\n];\n\nself.oninstall = event => event.waitUntil(\n cach...
javascript
chosen
[ { "from": "system", "value": "Update the loading screen with an ActivityIndicator\n" }, { "from": "human", "value": "import React from 'react';\nimport { View, Text } from 'react-native';\n\nexport default () => {\n return (\n <View style={styles.container}>\n <Text>\n ...
javascript
chosen
[ { "from": "system", "value": "Use strict camel case for directive names\n\nSomething was happening when angular normalized the directive name.\n" }, { "from": "human", "value": "'use strict';\nmodule.exports =\n\nangular\n .module('quill-grammar.directives.grammarCMS', [\n ])\n .directive('gr...
javascript
chosen
[ { "from": "system", "value": "Add test for Ember.Logger.error messages" }, { "from": "human", "value": "import Ember from 'ember';\nimport { test } from 'qunit';\nimport moduleForAcceptance from '../../tests/helpers/module-for-acceptance';\n\nmoduleForAcceptance('Acceptance | new relic browser')...
javascript
chosen
[ { "from": "system", "value": "Remove `tokens` and `upload` for now\n\nuntil we figure out the problem with bower in `postinstall` as detailed\nin #92\n" }, { "from": "human", "value": "'use strict';\n\nvar inquirer = require('inquirer'),\n _ = require('lodash');\n\n// callback must be in form o...
javascript
chosen
[ { "from": "system", "value": "Add expand-all toggling instead of just one-way expanding\n" }, { "from": "human", "value": "$(document).ready(function () {\n $('.panel').hide();\n $('.panel').first().show();\n\n $('.tab a').click(function (tab) {\n var target_panel = $(tab.target).attr('hre...
javascript
chosen
[ { "from": "system", "value": "Fix map marker and zoom map in center\n" }, { "from": "human", "value": "/* global google:false */\nexport function VenueDirective () {\n 'ngInject';\n\n return {\n restrict: 'E',\n templateUrl: 'app/components/venue/venue.html',\n scope: {},\n control...
javascript
chosen
[ { "from": "system", "value": "Fix error in Angular module call\n" }, { "from": "human", "value": "var searchApp = angular.module('searchApp', {});\n\nsearchApp.controller('SimpleController', function($scope){\n $scope.customers = [\n {name: 'Gendelman', city: 'West Bloomfield'},\n {name: 'Rya...
javascript
chosen
[ { "from": "system", "value": "Fix IntelliJ redux syntax error" }, { "from": "human", "value": "import { INCREMENT_COUNTER, DECREMENT_COUNTER } from '../actions/counter';\n\nexport default function counter(state = 0, action) {\n switch (action.type) {\n case INCREMENT_COUNTER:\n return state...
javascript
chosen
[ { "from": "system", "value": "Add initial image to interests\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport {\n Text,\n View,\n StyleSheet,\n TouchableHighlight,\n Image\n} from 'react-native'\n\nexport default class Interests extends Component {\n\n re...
javascript
chosen
[ { "from": "system", "value": "server: Use server URL as storage key.\n" }, { "from": "human", "value": "import ms from 'ms';\nimport createDebug from 'debug';\n\nconst debug = createDebug('u-wave-hub');\n\nconst servers = new Map();\n\nexport function announce(req, res) {\n servers.set(req.ip, ...
javascript
chosen
[ { "from": "system", "value": "Work around bug in @u-wave/react-server-list build system\n" }, { "from": "human", "value": "import React from 'react';\nimport CircularProgress from '@material-ui/core/CircularProgress';\n\nconst ServerListContainer = React.lazy(() => Promise.all([\n import('@u-wa...
javascript
chosen
[ { "from": "system", "value": "Add event listeners for better tracking of worker.\n" }, { "from": "human", "value": "/*global WebWorker:false */\n(function () {\n 'use strict';\n\n var worker = null,\n $output = null;\n\n $output = $('#worker-output');\n\n /**\n worker = ne...
javascript
chosen
[ { "from": "system", "value": "Remove obsolete unit test for imported isHTMLSafe() function\n" }, { "from": "human", "value": "import { module, test } from 'qunit';\nimport Ember from 'ember';\nimport isHTMLSafe from 'ember-string-ishtmlsafe-polyfill';\n\nmodule('Unit | isHTMLSafe');\n\ntest('Imp...
javascript
chosen
[ { "from": "system", "value": "Add ability to get user object\n" }, { "from": "human", "value": "// var _ = require('underscore');\n\nmodule.exports = function(robot){\n\n\trobot.respond(/last beer/i, function(res){\n\t\tvar response = 'My last eber was from ' + robot.brain.get('lastBeerFrom');\n...
javascript
chosen
[ { "from": "system", "value": "Create input for submit button\n" }, { "from": "human", "value": "document.getElementById(\"ayuda\").setAttribute(\"aria-current\", \"page\");\n\nvar aside = document.getElementById(\"complementario\");\n\nvar form = document.createElement(\"FORM\");\nvar p = docume...
javascript
chosen
[ { "from": "system", "value": "Fix mismatch due to strictequal\n" }, { "from": "human", "value": "'use strict'\n\nconst schema = require('../../app/schema')\n\nexports.shortlink = (body) => {\n return new Promise((resolve, reject) => {\n if (schema.validate(body)) {\n resolve()\n } el...
javascript
chosen
[ { "from": "system", "value": "Remove focus after clear search\n\n" }, { "from": "human", "value": "$(document).ready(function() {\n $('#clearSearch').on('click', function() {\n event.preventDefault();\n\n $('#idForm, #descriptionForm')\n .trigger('reset')\n ...
javascript
chosen
[ { "from": "system", "value": "Fix exception from require('mdns') if Avahi detection fails with an unexpected error\n\nIt can also fail e.g. with kDNSServiceErr_ServiceNotRunning (at least on Windows).\n" }, { "from": "human", "value": "var dns_sd = require('./dns_sd');\n\nfunction supportsInterf...
javascript
chosen
[ { "from": "system", "value": "Use proper symbol for square meters\n" }, { "from": "human", "value": "import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { AREA_UNITS } from '../../constants/units';\n\nconst AreaUnits = ({ value, unit, className, ...rest }) => {\n switch (u...
javascript
chosen
[ { "from": "system", "value": "Update for Backbone 1.3.3 parity.\n" }, { "from": "human", "value": "/**\n * ModuleRuntime.js (Parse) -- Provides the standard / default configuration that is the same as Backbone 1.2.3\n */\n\n'use strict';\n\nimport Backbone from 'backbone-es6/src/Backbone...
javascript
chosen
[ { "from": "system", "value": "QS-1247: Use post method instead of delete for unsubscribing\n" }, { "from": "human", "value": "import { postData, deleteData } from '../utils/APIUtils';\nimport { API_URLS } from '../constants/Constants';\n\nexport function sendSubscription(data, url = API_URLS.NOT...
javascript
chosen
[ { "from": "system", "value": "Return Fitbit data at activity endpoint\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\nrouter.get('/summary', function(req, res, next) {\n res.json({\n \t'totals': {},\n \t'activities': []\n });\n});\n\nmo...
javascript
chosen
[ { "from": "system", "value": "Fix import path of sw.js\n" }, { "from": "human", "value": "if('serviceWorker' in navigator) {\n navigator.serviceWorker.register('/sw.js', {scope: './'}).then(function(registration) {\n // Registration was successful 😊\n console.log('ServiceWorker registrat...
javascript
chosen