conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add display name for clock\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport moment from 'moment-timezone';\nimport classnames from 'classnames';\n\nimport styles from './style.scss';\n\nexport default class Dashboard extends Compone...
javascript
chosen
[ { "from": "system", "value": "Improve livechat custom field queue storing it by key\n\n" }, { "from": "human", "value": "this.CustomFields = (function() {\n\tvar queue = [];\n\tvar initiated = false;\n\n\tvar setCustomField = function(token, key, value) {\n\t\tif (!initiated) {\n\t\t\treturn que...
javascript
chosen
[ { "from": "system", "value": "Update include point for latest version of Sizzle." }, { "from": "human", "value": "Prototype._original_property = window.Sizzle;\n//= require \"repository/sizzle\"\n\n;(function(engine) {\n var extendElements = Prototype.Selector.extendElements;\n \n function se...
javascript
chosen
[ { "from": "system", "value": "Add Base64 File Encoder to Utility Module\n" }, { "from": "human", "value": "module.exports = {\n generateQueryString: function (data) {\n var ret = []\n for (var d in data)\n if (data[d])\n ret.push(encodeURIComponent(d) + \"=\" + encodeURICompon...
javascript
chosen
[ { "from": "system", "value": "Add comment about toggling devtools\n" }, { "from": "human", "value": "const {Menu} = require('electron')\nconst menubar = require('menubar')\n\nrequire('electron-debug')({showDevTools: true});\n\nconst mb = menubar({\n width: 220,\n height: 206,\n preloadWindow:...
javascript
chosen
[ { "from": "system", "value": "Rewrite text-fill directive to use isolated scope. [IQSLDSH-382]\n" }, { "from": "human", "value": "/*global angular*/\n(function () {\n 'use strict';\n\n // min-font-size attribute = minimum font size in pixels\n // max-font-size attribute = maximum font s...
javascript
chosen
[ { "from": "system", "value": "Replace deprecated use of `bw.openDevTools`" }, { "from": "human", "value": "var app = require('app'); // Module to control application life.\nvar BrowserWindow = require('browser-window'); // Module to create native browser window.\n\n// Report crashes to our ser...
javascript
chosen
[ { "from": "system", "value": "Fix typo in copy/pasta controllerneeds suite\n" }, { "from": "human", "value": "describe('lib/rules/disallow-positionalparams-extend', function () {\n var checker = global.checker({\n plugins: ['./lib/index']\n });\n\n describe('not configured', func...
javascript
chosen
[ { "from": "system", "value": "Add example with page and limit\n" }, { "from": "human", "value": "var TeostoApi = require('./TeostoApi');\n\nTeostoApi.getVenueByName('tavastia', function(error, response, body) {\n if (error) console.log(error);\n console.log('status: ', response.statusCode);\n co...
javascript
chosen
[ { "from": "system", "value": "Make sure we always get the selection list with a default value. (Cleans up error on startup.)\n" }, { "from": "human", "value": "adjectiveArray = [{name: \"happy\"},{name:\"sad\"},{name:\"angry\"},{name:\"afraid\"}];\r\n\r\nif (Meteor.isClient) {\r\n Template.ad...
javascript
chosen
[ { "from": "system", "value": "Add logs for Ember resolver lookups\n" }, { "from": "human", "value": "import Resolver from 'ember/resolver';\nimport loadInitializers from 'ember/load-initializers';\nimport afterRender from 'client/utils/after-render';\nimport FastClickInit from 'client/utils/fast...
javascript
chosen
[ { "from": "system", "value": "Add 'use strict' to test.js\n" }, { "from": "human", "value": "var assert = require('assert');\nvar <%= camelizedPackageName %> = require('..');\n\ndescribe('<%= packageName %>', function() {\n\n it('should do something awesome', function() {\n assert.equal(<%= ...
javascript
chosen
[ { "from": "system", "value": "Add missing propType to Step component\n" }, { "from": "human", "value": "import cn from 'classnames'\nimport { Caption, PrimaryText } from 'components/Text'\nimport React, { PropTypes } from 'react'\nimport styles from './Stepper.css'\n\nexport function Stepper ({ ...
javascript
chosen
[ { "from": "system", "value": "Fix links assignment on some AJAX requests\n" }, { "from": "human", "value": "import axios from 'axios'\n\nlet links\n\nexport default async function AJAX({\n url,\n resource,\n id,\n method = 'GET',\n data = {},\n params = {},\n headers = {},\n}) {\n try {\...
javascript
chosen
[ { "from": "system", "value": "Fix start new project from type - count was missing\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';\n// global $\n\nexport default Ember.Route.extend(AuthenticatedRout...
javascript
chosen
[ { "from": "system", "value": "Build script refer to production config file\n" }, { "from": "human", "value": "({\n\t/*\n\t * Invoke with r.js -o build.js\n\t * Documentation of available options: https://github.com/jrburke/r.js/blob/master/build/example.build.js\n\t */\n\tbaseUrl: \"scripts\",\n...
javascript
chosen
[ { "from": "system", "value": "Use propTypes from external package in anchor-plugin\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\n\nconst propTypes = {\n className: PropTypes.string,\n children: PropTypes.node.isRequired,\n entityKey: PropTypes.string,\n getEdi...
javascript
chosen
[ { "from": "system", "value": ":shirt: Add ignore option for max-nesting-depth rule\n" }, { "from": "human", "value": "module.exports = {\n plugins: ['stylelint-order', 'stylelint-scss'],\n extends: [\n 'stylelint-config-sass-guidelines',\n 'stylelint-config-property-sort-order-smacss',\n...
javascript
chosen
[ { "from": "system", "value": "Select path for page context.\n" }, { "from": "human", "value": "\"use strict\";\nimport React, { Component, PropTypes } from 'react';\nimport { getItems } from '../../actions';\nimport PageItem from './PageItem';\n\nexport default class PageContext extends Componen...
javascript
chosen
[ { "from": "system", "value": "fix(lint): Fix post install eslint fix triggering an error\n" }, { "from": "human", "value": "const Base = require('yeoman-generator');\n\nclass LintGenerator extends Base {\n initializing() {\n this.composeWith('rn-toolbox:checkversion');\n }\n\n install() {\...
javascript
chosen
[ { "from": "system", "value": "Fix Menus to update hash when Stack.back() called.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2017 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.nanos.menu',\n nam...
javascript
chosen
[ { "from": "system", "value": "Use the new mechanism for the callback functions\n" }, { "from": "human", "value": "/**\n * @constructor\n * @param {string} baseURL - URL for the Open PHACTS API\n * @param {string} appID - Application ID for the application being used. Created by https://dev.openp...
javascript
chosen
[ { "from": "system", "value": "Trim string before checking if variable exists. (whitespace should be ignored in variable names)\n" }, { "from": "human", "value": "// Build out Handlebars basic SafeString type\nSideburns.SafeString = function(string) {\n this.string = string;\n}\nSideburns.SafeSt...
javascript
chosen
[ { "from": "system", "value": "Addon-docs: Update svelte preset to latest API\n" }, { "from": "human", "value": "/* eslint-disable import/no-extraneous-dependencies */\nimport { addParameters } from '@storybook/svelte';\nimport { DocsPage } from '@storybook/addon-docs/blocks';\n\naddParameters({\...
javascript
chosen
[ { "from": "system", "value": "Add TextView text, SpeechView text and SpeechView seconds elapsed fields to user schema\n" }, { "from": "human", "value": "/* eslint new-cap: 0 */\nconst mongoose = require('mongoose');\nconst bcrypt = require('bcrypt-nodejs');\nconst Q = require('q');\n\nconst SALT...
javascript
chosen
[ { "from": "system", "value": "Fix UserId and GroupId not found bugs\n" }, { "from": "human", "value": "module.exports = (sequelize, DataTypes) => {\n const Group = sequelize.define('Group', {\n name: {\n type: DataTypes.STRING,\n allowNull: false,\n },\n description: {\n ...
javascript
chosen
[ { "from": "system", "value": "Define warning message from CW\n" }, { "from": "human", "value": "/*\n * Copyright 2016 The CodeWorld Authors. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the ...
javascript
chosen
[ { "from": "system", "value": "Correct resolution of paths with webpack bundle\n" }, { "from": "human", "value": "/*---------------------------------------------------------------------------------------------\n * Licensed under the MIT License. See License.txt in the project root for license i...
javascript
chosen
[ { "from": "system", "value": "Add dynamic segment for movie.view route\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport config from './config/environment';\n\nvar Router = Ember.Router.extend({\n location: config.locationType\n});\n\nRouter.map(function() {\n this.route('m...
javascript
chosen
[ { "from": "system", "value": "Add strings for upcoming features to common learn strings\n" }, { "from": "human", "value": "import { createTranslator } from 'kolibri.utils.i18n';\n\nexport const learnStrings = createTranslator('CommonLearnStrings', {\n // Labels\n learnLabel: {\n message: 'L...
javascript
chosen
[ { "from": "system", "value": "Revert \"only calls unhighlight on mouseout when necessary\"\n\nThis reverts commit 0172733d1299ed3b86a3bb91345d4611f72e166b.\n" }, { "from": "human", "value": "$(document).ready(function() {\r\n $(\".btn.year\").click(function(e){\r\n var target = $(e.tar...
javascript
chosen
[ { "from": "system", "value": "Use prepare instead of dispatched\n" }, { "from": "human", "value": "import { compose } from 'redux';\nimport { connect } from 'react-redux';\nimport { dispatched } from '@webkom/react-prepare';\nimport { fetch } from 'app/actions/FrontpageActions';\nimport { login,...
javascript
chosen
[ { "from": "system", "value": "Allow filtering of event stream\n" }, { "from": "human", "value": "/*jshint strict:true, trailing:false, unused:true, node:true */\n'use strict';\n\nvar EventEmitter = require('eventemitter3');\nvar emitter = new EventEmitter();\n\nvar rx = function(data) {\n emitt...
javascript
chosen
[ { "from": "system", "value": "Fix bug with composed variants without parent context\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { CONTEXT_KEY, contextType } from './connectVariants';\nimport _ from 'lodash';\n\nexport default class V...
javascript
chosen
[ { "from": "system", "value": "Fix rounding in the toolbar\n" }, { "from": "human", "value": "(function(){\n 'use strict';\n\n if (document.readyState === 'complete') {\n startCollect();\n } else {\n window.addEventListener('load', startCollect);\n }\n\n function startCollect() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add Marketplace link to user dropdown in toolbar\n" }, { "from": "human", "value": "frappe.provide('erpnext.hub');\n\nfrappe.views.marketplaceFactory = class marketplaceFactory extends frappe.views.Factory {\n\tshow() {\n\t\tif (frappe.pages.marketplace) {\n\t\t\tfr...
javascript
chosen
[ { "from": "system", "value": "refactor(shape): Change order of let in text shape\n" }, { "from": "human", "value": "import { Shape } from '../Shape';\n\nexport class Text extends Shape {\n /**\n * Creates new Text instance\n * @constructor\n */\n constructor(...args) {\n super(...args...
javascript
chosen
[ { "from": "system", "value": "Fix machine enable monitoring in js\n" }, { "from": "human", "value": "define('app/views/machine_manual_monitoring', ['app/views/templated', 'ember'],\n /**\n * Machine Manual Monitoring View\n *\n * @returns Class\n */\n function (TemplatedV...
javascript
chosen
[ { "from": "system", "value": "Watch component asset paths too\n\nWatch was no longer catching SCSS/JS moved into the component\nfile structure, and wasn't getting rebuild/updating fractal.\n\nThe JS matcher works, but is too broad, and will trigger a\nbuild if the config or spec JS is updated too. This does...
javascript
chosen
[ { "from": "system", "value": "Add authorize function to Controllers\n" }, { "from": "human", "value": "let _ = require('lodash');\n\nmodule.exports = class Controller {\n constructor(router) {\n this.router = router;\n\n this.configRouter(); \n }\n\n configRouter() {\n let methods =...
javascript
chosen
[ { "from": "system", "value": "Use arrow functions and replace deprecated ListView with a FlatList\n" }, { "from": "human", "value": "'use strict';\n\nimport React, { Component } from 'react';\n\nimport {\n AppRegistry,\n View,\n StyleSheet,\n ListView,\n} from 'react-native';\n\nclass Collec...
javascript
chosen
[ { "from": "system", "value": "Fix issue with cascading loads\n" }, { "from": "human", "value": "$(function () {\n\n // Initialize date pickers\n $('input[data-provides=\"anomaly.field_type.datetime\"][name$=\"[date]\"]:not([data-initialized])').each(function () {\n\n var input = $(t...
javascript
chosen
[ { "from": "system", "value": "Support callback as render's second arg\n" }, { "from": "human", "value": "module.exports = function(req, res, next) {\n\n if (!req.session.flash) {\n req.session.flash = [];\n }\n\n res.locals.flash = req.session.flash;\n\n req.session.flash = []...
javascript
chosen
[ { "from": "system", "value": "Modify mongo database server saved to .env\n" }, { "from": "human", "value": "\nlet SakuyaBot = require('./src/SakuyaBot')\nlet SakuyaDb = require('./src/SakuyaDb')\nlet Twitter = require('twitter')\nlet TwitterClient = require('./src/TwitterClient')\nlet FollowCraw...
javascript
chosen
[ { "from": "system", "value": "Prepare for input functions to receive options\n" }, { "from": "human", "value": "'use strict'\n\nvar Input = require('base-input')\nvar phone = require('phones')\n\nmodule.exports = Input({\n parse: phone.parse,\n format: phone.format,\n validate: phone.validate...
javascript
chosen
[ { "from": "system", "value": "Add support for npm 3\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nvar path = require('path');\n\nmodule.exports = {\n name: 'ember-cli-timecop',\n\n treeFor: function(name) {\n if (name !== 'vendor') { return; }\n\n return th...
javascript
chosen
[ { "from": "system", "value": "Add English aliases for enigma components\n" }, { "from": "human", "value": "\nvar Enigma = require('./lib/enigma'),\n Rotor = require('./lib/rotor'),\n Umkehrwalze = require('./lib/umkehrwalze'),\n Eintrittswalze = require('./lib/ei...
javascript
chosen
[ { "from": "system", "value": "Check for beeing a function\n" }, { "from": "human", "value": "var excludeMethods = [\n /^constructor$/, \n /^render$/, \n /^component[A-Za-z]+$/\n];\n\nvar displayNameReg = /^function\\s+([a-zA-Z]+)/;\n\nfunction isExcluded(methodName) {\n return excludeMethods...
javascript
chosen
[ { "from": "system", "value": "Add beta path in dev server\n" }, { "from": "human", "value": "import express from 'express';\nimport http from 'http';\nimport {renderFile} from 'ejs';\nimport request from 'superagent';\n\nvar app = express();\n\nvar FRIGG_API = process.env.FRIGG_API || 'https://c...
javascript
chosen
[ { "from": "system", "value": "Make sure locales are found in CJS bundle\n" }, { "from": "human", "value": "import commonjs from '@rollup/plugin-commonjs'\nimport json from '@rollup/plugin-json'\n//import resolve from '@rollup/plugin-node-resolve'\n\nexport default [\n {\n input: 'index.js',\...
javascript
chosen
[ { "from": "system", "value": "Update build steps to only correct core-css version\n" }, { "from": "human", "value": "import autoprefixer from 'autoprefixer'\nimport postcss from 'rollup-plugin-postcss'\nimport serve from 'rollup-plugin-serve'\nimport header from 'postcss-header'\nimport path fro...
javascript
chosen
[ { "from": "system", "value": "Update rollup externals to suppress warning\n" }, { "from": "human", "value": "import babel from 'rollup-plugin-babel';\n\nexport default {\n input: 'src/index.js',\n output: {\n file: 'build/index.js',\n format: 'cjs',\n },\n plugins: [\n babel({\n ...
javascript
chosen
[ { "from": "system", "value": "Add information about logged out user.\n" }, { "from": "human", "value": "module.exports = function(socket) {\n console.log('user connected!');\n\n socket.emit('init', { message: 'Hello World' });\n\n socket.on('user:joined', function(userName) {\n socket.broa...
javascript
chosen
[ { "from": "system", "value": "Add cache support for incremental builds\n" }, { "from": "human", "value": "\nvar through = require('through2'),\n gutil = require('gulp-util'),\n Rollup = require('rollup');\n\nvar PluginError = gutil.PluginError;\n\nmodule.exports = function(options) {\n\n var ...
javascript
chosen
[ { "from": "system", "value": "Add a default fallback URL.\n" }, { "from": "human", "value": "'use strict';\n\nconst hiredis = require('hiredis');\nconst URL = require('url');\n\nconst reader = new hiredis.Reader();\n\nclass YoRedis {\n constructor(config) {\n if (config instanceof Funct...
javascript
chosen
[ { "from": "system", "value": "Remove output; use correct function\n" }, { "from": "human", "value": "'use strict';\r\n\r\nconst drive = require('./src/drive');\r\nconst handbrake = require('./src/handbrake');\r\nconst Progress = require('./src/progress');\r\n\r\nlet progress;\r\n\r\ndrive.watch(...
javascript
chosen
[ { "from": "system", "value": "Add arrow symbols, change identation for tabs\n" }, { "from": "human", "value": "var chalk = require('chalk'),\n success = chalk.green,\n error = chalk.red,\n info = chalk.white,\n warning = chalk.yellow,\n text = chalk.white;\n\nmodule.exports = {\n ...
javascript
chosen
[ { "from": "system", "value": "Set default options object after checking for callback\n" }, { "from": "human", "value": "const parseStack = require('./lib/parse-stack')\nconst fetchSourcemaps = require('./lib/fetch-sourcemaps')\nconst translateFrames = require('./lib/translate-frames')\n\nmodule....
javascript
chosen
[ { "from": "system", "value": "Add an option to skip auto tasking.\n\nThis looks like:\n\n```\nmodule.exports.autotask = false;\n```\n\nIn the task\n" }, { "from": "human", "value": "'use strict';\n\nvar glob = require('glob');\nvar gulp = require('gulp');\nvar path = require('path');\n\nmodule.e...
javascript
chosen
[ { "from": "system", "value": "Change to 4 spaces and 120 wrap." }, { "from": "human", "value": "/*! jsbeautifierSettingsTweaks.js v0.2.0 by ryanpcmcquen */\nwindow.addEventListener('load', function () {\n 'use strict';\n // Set any vars you want to change here:\n var jslintCheckbox = document...
javascript
chosen
[ { "from": "system", "value": "Send X-Observed-Position header (with dummy value) from JS\n" }, { "from": "human", "value": "// Copyright © 2016-2017 Esko Luontola\n// This software is released under the Apache License 2.0.\n// The license text is at http://www.apache.org/licenses/LICENSE-2.0\n\n...
javascript
chosen
[ { "from": "system", "value": "Use just one color for bar graph for now.\n" }, { "from": "human", "value": "foam.CLASS({\n package: 'org.chartjs',\n name: 'Bar',\n extends: 'org.chartjs.AbstractChartCView',\n requires: [\n 'foam.mlang.sink.GroupBy'\n ],\n properties: [\n [ 'chartType'...
javascript
chosen
[ { "from": "system", "value": "Add window.angular to make it pass the basic tests\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 = ...
javascript
chosen
[ { "from": "system", "value": "Disable eslint new-cap rule for one line\n\nThis line is using an external api which prevents fulfilling this rule\n" }, { "from": "human", "value": "import express from 'express';\nimport path from 'path';\nimport morgan from 'morgan';\nimport logger from './system...
javascript
chosen
[ { "from": "system", "value": "Add max length for notifications\n\nfbshipit-source-id: be6c9de\n" }, { "from": "human", "value": "import React, {PropTypes} from 'react';\n\nimport StyleConstants from './StyleConstants';\n\nexport default class Notification extends React.Component {\n static prop...
javascript
chosen
[ { "from": "system", "value": "Improve http logger output filenames\n" }, { "from": "human", "value": "'use strict';\n\nvar fs = require( 'fs' );\nvar path = require( 'path' );\nvar fileStreamRotator = require( 'file-stream-rotator' );\n\n// Use Morgan logger for HTTP access logging\nvar morgan =...
javascript
chosen
[ { "from": "system", "value": "Add null test for getHostURL()\n" }, { "from": "human", "value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2....
javascript
chosen
[ { "from": "system", "value": "Fix element not having an image\n" }, { "from": "human", "value": "const React = require(\"react\");\nconst ReactDOM = require(\"react-dom\");\n\nconst e = React.createElement;\n\nclass Component extends React.Component {\n render() {\n const { enabled, status }...
javascript
chosen
[ { "from": "system", "value": "Update alert banner to HCS GA\n" }, { "from": "human", "value": "export const ALERT_BANNER_ACTIVE = true\n\n// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner\nexport default {\n tag: 'Announcing',\n url: 'https://www.hashicorp.com/bl...
javascript
chosen
[ { "from": "system", "value": "Trim leading a trailing whitespace in Wordpress importer\n" }, { "from": "human", "value": "var fs = require('fs-extra');\n\nmodule.exports = function (post, callback) {\n\n var atime, mtime;\n\n console.log('...', post.path, post.title);\n \n fs.outputFile(post...
javascript
chosen
[ { "from": "system", "value": "Maintain tab ordering after reordering items.\n" }, { "from": "human", "value": "$( \".sortable\" ).sortable({\n\taxis : \"y\",\n\titems: \"div:not(.disabled)\",\n\thandle: \"span.input-group-addon\",\n\tupdate: function(event, ui) {\n\n\t},\n});\n// $( \".sortable\...
javascript
chosen
[ { "from": "system", "value": "Use .name to lookup tag name under fruitloops\n" }, { "from": "human", "value": "/*global viewTemplateOverrides, createErrorMessage */\nHandlebars.registerViewHelper('view', {\n factory: function(args, options) {\n var View = args.length >= 1 ? args[0] : Thorax....
javascript
chosen
[ { "from": "system", "value": "Comment code to add class on click sidebar element\n" }, { "from": "human", "value": "/* --------------------------------------------------------------------------\n Initialize\n --------------------------------------------------------------------------- */\n\n$(d...
javascript
chosen
[ { "from": "system", "value": "Call toString() on return value of datetimeparser.\n" }, { "from": "human", "value": "$(document).ready(function() {\n $('input').keyup(function(){\n var inputText = $(this).val();\n if (inputText == ''){\n $('.changeme').text('Type something above!'); \...
javascript
chosen
[ { "from": "system", "value": "Add some explanation as to how the events module is initialized\n" }, { "from": "human", "value": "require.config({\n paths: {\n jquery: 'lib/jquery.min',\n bootstrap: 'lib/bootstrap.min.js',\n backbone: 'lib/backbone.min',\n underscor...
javascript
chosen
[ { "from": "system", "value": "fix(shape): Update kittik-shape-basic to the latest version\n\nBREAKING CHANGE: Change signature for render() method\n" }, { "from": "human", "value": "import Shape from 'kittik-shape-basic';\n\n/**\n * Implements rectangle shape with text support.\n *\n * @since 1....
javascript
chosen
[ { "from": "system", "value": "Fix up use of players.eachIF to account for location.\n" }, { "from": "human", "value": "const Type = require('./type').Type;\nconst util = require('util');\n\nconst noop = function() {}\nconst toRoom = (location, firstParty, secondParty, players) => config => {\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix goog.require for XhrIoPool use\n" }, { "from": "human", "value": "goog.require('goog.net.XhrIo');\n\nvar xhrIoPool;\n\n/**\n * Retrieve Json data using XhrIo's static send() method\n *\n * @param {string} dataUrl The url to request\n */\nfunction getData(dataUrl...
javascript
chosen
[ { "from": "system", "value": "Add test data from Vanessa\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa').constant('MORPH_IMPORTS', [\n {\n name: 'Latin Morphology',\n language: 'lat',\n route: '...'\n },\n {\n name: 'Greek Morphology',\n languag...
javascript
chosen
[ { "from": "system", "value": "Add fail case in API call\n" }, { "from": "human", "value": "import fetch from 'isomorphic-fetch';\n\nimport API from 'utils/api';\nimport { set_loading } from './loading';\n\nexport const QUOTE_RECEIVED = 'quote_received';\n\nexport function get_quote() {\n return...
javascript
chosen
[ { "from": "system", "value": "Move initializing of Resume sub-objects back to parse so we get\n\nthat behavior on sync.\n" }, { "from": "human", "value": "define([\n 'underscore',\n 'backbone',\n 'models/profile',\n 'models/address',\n 'collections/item'\n], function (_, Backbone, Profile, ...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect reference to the AppFixture module.\n" }, { "from": "human", "value": "define([\"app-fixture\", \"app\"],\nfunction(AppFixture, App) {\n describe(\"App\", function() {\n it(\"Should return hello\", function() {\n expect(App.hello()).toEqual...
javascript
chosen
[ { "from": "system", "value": "Use PhantomJs for example domains\n\n" }, { "from": "human", "value": "const syrup = require('../../');\n\nsyrup.enableDebug()\n .config(`${__dirname}/config.yaml`)\n .scenario({\n name: 'example.org - 1',\n entrypoint: `${__dirname}/test-example...
javascript
chosen
[ { "from": "system", "value": "DOC: Refactor Javascript for listing doc versions to only have the version in one place.\n" }, { "from": "human", "value": "\nfunction insert_version_links() {\n var labels = ['0.5dev', '0.4', '0.3'];\n var links = ['http://scikits-image.org/docs/dev/index.htm...
javascript
chosen
[ { "from": "system", "value": "Add boolean parsing and renaming utilities\n\n- Add a parseBool function for converting values to Boolean values,\n treating the string \"true\" specially\n- Add a utility for creating a new object by renaming some of its\n properties based on a property mapping object\n" }...
javascript
chosen
[ { "from": "system", "value": "Fix vulcanize not resolving paths.\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n vulcanize = require('gulp-vulcanize');\n\ngulp.task('default', function () {\n console.log('it works!');\n});\n\ngulp.task('bundle', function () {\n return g...
javascript
chosen
[ { "from": "system", "value": "Add CORS on service endpoint.\n" }, { "from": "human", "value": "var express = require('express');\nvar cors = require('cors');\n\nvar situations = require('../controllers/situations');\nvar teleservices = require('../controllers/teleservices');\n\nmodule.exports = ...
javascript
chosen
[ { "from": "system", "value": "Add normalizeEntityName to blueprint 2\n" }, { "from": "human", "value": "module.exports = {\n description: \"Provides the PubNub JavaScript SDK\",\n\n afterInstall: function() {\n normalizeEntityName: function() {},\n return this.addBowerPackageToProject(\"...
javascript
chosen
[ { "from": "system", "value": "Add TODO into the code\n" }, { "from": "human", "value": "#!/usr/bin/env node\nconst AWS = require('aws-sdk')\nconst path = require('path')\nconst { exec } = require('child_process')\nconst ngrok = require('./ngrok')\n\nconst Lambda = new AWS.Lambda({ region: 'us-ea...
javascript
chosen
[ { "from": "system", "value": "Add option to delayer plugin to start disabled\n\nIt's useful to add the delayer plugin to have it available, but\nwithout enabling by default. Thus, add an option to disable it by\ndefault on startup.\n" }, { "from": "human", "value": "var robohydra = require(\...
javascript
chosen
[ { "from": "system", "value": "Add .git to git url\n" }, { "from": "human", "value": "Package.describe({\n git: 'https://github.com/zimme/meteor-collection-timestampable',\n name: 'zimme:collection-timestampable',\n summary: 'Add timestamps to collections',\n version: '1.0.3'\n});\n\nPackage....
javascript
chosen
[ { "from": "system", "value": "Add propTypes for Icon component\n" }, { "from": "human", "value": "import React from 'react'\n\nexport default function Icon ({name, className}) {\n return (\n <svg role='img' className={`i-${name} ${className || ''}`}>\n <use xlinkHref={`#i-${name}`}></us...
javascript
chosen
[ { "from": "system", "value": "Implement now() and age() functions.\n" }, { "from": "human", "value": "var $builtinmodule = function(name)\n{\n var mod = {};\n\t\n mod.sleep = new Sk.builtin.func(function(milliseconds) { // milliseconds will be a Sk.builtin.nmbr\n\t\tvar startTime = Date.no...
javascript
chosen
[ { "from": "system", "value": "Update search results when selected date changes.\n" }, { "from": "human", "value": "import 'rxjs/add/operator/debounceTime'\nimport 'rxjs/add/operator/map'\n\n\nimport * as actions from './actions'\n\n// When the query changed, refresh the search results\nexport co...
javascript
chosen
[ { "from": "system", "value": "Update for discussion controls API\n" }, { "from": "human", "value": "import { extend } from 'flarum/extension-utils';\nimport Discussion from 'flarum/models/discussion';\nimport ActionButton from 'flarum/components/action-button';\n\nimport TagDiscussionModal from ...
javascript
chosen
[ { "from": "system", "value": "Use real base64 decoding for SVGs.\n" }, { "from": "human", "value": "define([\"github/github\"], function() {\n\t\n\treturn ['github', function(github) {\n\t\treturn function(repoOwner, repoName, currentGitDir, relativePath) {\n\t\t\t// Return a promise that resolv...
javascript
chosen
[ { "from": "system", "value": "Add 'click' event functionality to 'update' seek-bar by re-using 'updateSeekPercentage' functionality from the 'Foundation' functions via 'scope.value' attributes...\n" }, { "from": "human", "value": "(function() {\n\tfunction seekBar() {\n\t\treturn {\n\t\t\ttempla...
javascript
chosen
[ { "from": "system", "value": "Implement md5 for demo known users password\n" }, { "from": "human", "value": "'use strict';\n\nvar userDAO = require('../index').UserDAO.createInstance();\nvar userService = require('../index').UserService.singleton(userDAO);\nvar UsersGenerator = require('../index...
javascript
chosen
[ { "from": "system", "value": "Fix `-h` help option alias shadowed by a similar alias for `--home`\n\nIn v2.2.1 (and in pretty much every software out there, really), `-h` was an alias of `--help`. By adding it as an alias of `--home`, it is now shown twice in the help.\n" }, { "from": "human", "...
javascript
chosen
[ { "from": "system", "value": "Fix page height issues for tutorial page\n" }, { "from": "human", "value": "import React from 'react'\nimport '../styles/video.css'\n\nconst Tutorial = props =>\n <div className='container'>\n <div className='row'>\n <div\n className='col s12 valign-...
javascript
chosen