conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix title of paths page when redirected from professions page\n" }, { "from": "human", "value": "var ProfessionsPageController = (function(){\n function ProfessionsPageController(\n currentProfessions,\n currentPaths,\n $location\n ) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add unit tests for cell grid parsing\n" }, { "from": "human", "value": "describe('Support module', function () {\n var S = GameOfLife.Support;\n\n it('inverts an object', function () {\n var obj = { foo: 1, bar: 2};\n expect(S.invertObject(obj)).toEqual({1: ...
javascript
chosen
[ { "from": "system", "value": "Add initial tests for Registry.emit\n" }, { "from": "human", "value": "import test from 'ava';\n\ntest.todo('Write test for Registry.emit');\n" }, { "from": "gpt", "value": "import test from 'ava';\nimport Registry from '../src/registry';\n\ntest('Regist...
javascript
chosen
[ { "from": "system", "value": "Use real path to WebTorrent.exe\n" }, { "from": "human", "value": "module.exports = function () {\n if (process.platform === 'win32') {\n registerProtocolHandler('magnet', 'URL:BitTorrent Magnet URL', 'WebTorrent.exe')\n }\n}\n\nfunction registerProtocolHandler...
javascript
chosen
[ { "from": "system", "value": "Replace ember-mobiletouch (deprecated) with ember-gestures (recommended replacement)\n" }, { "from": "human", "value": "var path = require('path');\nvar chalk = require('chalk');\nvar Promise = require('../../lib/ext/promise');\nvar stringUtils = re...
javascript
chosen
[ { "from": "system", "value": "Update bg image extraction to support Safari\n" }, { "from": "human", "value": "(function() {\n //\n // Avoid sudden background resize on mobile browsers when the address bar is hidden.\n //\n\n var homeTop = document.querySelector('.home__top');\n va...
javascript
chosen
[ { "from": "system", "value": "Add more explicit jumpToFrame during frontend load\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular.module('nin').directive('demo', function($interval, demo) {\n return {\n restrict: 'E',\n template: '<div class=demo-contai...
javascript
chosen
[ { "from": "system", "value": "Debug log of app mount path\n" }, { "from": "human", "value": "import express from 'express';\nimport Debug from 'debug';\nimport path from 'path';\nimport Router from './router';\n\nconst debug = Debug('league-tooltips:middleware');\n\nexport default (apiKey, regio...
javascript
chosen
[ { "from": "system", "value": "Add es-glue to the CommonJS paths.\n" }, { "from": "human", "value": "require.config({\n baseUrl: '/js',\n paths: {\n 'jquery': '/vendor/jquery',\n }\n});\n" }, { "from": "gpt", "value": "require.config({\n baseUrl: '/js',\n paths: {\n 'jq...
javascript
chosen
[ { "from": "system", "value": "Fix default object and validation\n" }, { "from": "human", "value": "'use strict';\n\nvar assert = require('assert')\n\nvar dataServiceFactory = require('./dataService')\n\nfunction createDataServices(config) {\n var dataServices = {}\n\n config.forEach((dsConfig)...
javascript
chosen
[ { "from": "system", "value": "Add an option to enable/disable JSON parsing\n" }, { "from": "human", "value": "import xhr from 'xhr'\n\nfunction isString (obj) { return (typeof (obj) === 'string') }\nfunction isSuccess (code) { return (code >= 200 && code <= 399) }\n\nasync function get (url) {\n...
javascript
chosen
[ { "from": "system", "value": "Reset kubectl config when leaving page\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport C from 'ui/utils/constants';\n\nexport default Ember.Route.extend({\n k8s: Ember.inject.service(),\n\n model() {\n return this.get('store').findAll('con...
javascript
chosen
[ { "from": "system", "value": "Add built-in interceptors via configration\n\n" }, { "from": "human", "value": "JARS.internal('InternalBootstrapper', function(InternalsManager) {\n 'use strict';\n\n var getInternal = InternalsManager.get,\n InternalBootstrapper;\n\n /**\n * @na...
javascript
chosen
[ { "from": "system", "value": "Add the hidden activity value to the form so we know which activity has been selected.\n" }, { "from": "human", "value": "var $ = $ || function() {}; // Keeps from throwing ref errors.\n\nfunction swapselected(from, to) {\n\t$(to).html(options[$(from).val()]);\n}\n\...
javascript
chosen
[ { "from": "system", "value": "Fix console error about having both child and component in react router\n" }, { "from": "human", "value": "import \"./App.css\";\n\nimport React, { Component } from \"react\";\nimport { Route } from \"react-router-dom\";\n\n//Components\nimport Header from \"./compo...
javascript
chosen
[ { "from": "system", "value": "Remove repository function for getting requests by session\n" }, { "from": "human", "value": "require('./request-store-manage');\n\nvar glimpse = require('glimpse'),\n resourceRepository = require('./request-repository-remote'),\n localRepository = require('./...
javascript
chosen
[ { "from": "system", "value": "Fix wrong dev config logic\n" }, { "from": "human", "value": "process.on('unhandledRejection', err => {\n throw err;\n});\n\nconst express = require('express');\nconst next = require('next');\nconst { createRouter } = require('soya-next/server/router');\nconst { so...
javascript
chosen
[ { "from": "system", "value": "Reduce weight of ugly Promise constructor\n" }, { "from": "human", "value": "const compile = require(\"truffle-compile\");\n\nclass DebugCompiler {\n constructor(config) {\n this.config = config;\n }\n\n async compile() {\n const { contracts, files } = awai...
javascript
chosen
[ { "from": "system", "value": "Add placeholder to the whitelist \n\nThe placeholder from inputProperties gets removed when whitelistInputProps() is called in FormComponentInner.jsx, so placeholders get removed from smartform text inputs. This adds placeholder to the whitelist of supported fields so they are ...
javascript
chosen
[ { "from": "system", "value": "Return null instead of setting content to null\n" }, { "from": "human", "value": "import React from 'react'\nimport { Box, Grid, Typography, Card, CardContent } from '@material-ui/core'\nimport { Edit, Delete } from '@material-ui/icons'\n\nexport default function Tr...
javascript
chosen
[ { "from": "system", "value": "Clean up user route validation\n" }, { "from": "human", "value": "var async = require( 'async' );\nvar Validation = require( './validation' );\nvar Data = require( './data' );\nvar Output = require( './output' );\nvar utils = require( '../utils' );\n\n\nexports.user...
javascript
chosen
[ { "from": "system", "value": "Change deployed version to using heroku for api rather than local host\n" }, { "from": "human", "value": "var heroku = 'https://topoftheflops.herokuapp.com'\nvar localUrl = 'http://localhost:3000'\n\nvar url = localUrl\n\nmodule.exports = url\n" }, { "from":...
javascript
chosen
[ { "from": "system", "value": "Use improved animation code as it was used inline\n" }, { "from": "human", "value": "var clock = function() {\n var sDial = document.getElementsByClassName(\"seconds\")[0];\n var mDial = document.getElementsByClassName(\"minutes\")[0];\n var hDial = document.getE...
javascript
chosen
[ { "from": "system", "value": "Add unit test for missing country mapping\n" }, { "from": "human", "value": "const Promise = require('bluebird')\nconst chai = require('chai')\nchai.use(require('chai-as-promised'))\nconst expect = chai.expect\nconst rewire = require('rewire')\nconst fetchCountryMap...
javascript
chosen
[ { "from": "system", "value": "Remove outdated code to apply mixin\n" }, { "from": "human", "value": "\nSpace.Object.extend(TodoMVC, 'LayoutController', {\n\n mixin: [\n Space.messaging.EventSubscribing\n ],\n\n dependencies: {\n layout: 'BlazeLayout'\n },\n\n eventSubscriptions() {\n ...
javascript
chosen
[ { "from": "system", "value": "Reset window location on logout, to force clearing the datastore.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n session: Ember.inject.service(),\n actions: {\n invalidateSession() {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix unhandled rejection in test cases\n" }, { "from": "human", "value": "import promisify from 'promisify-object'\nimport semverRegex from 'semver-regex'\n\nconst ghissues = promisify(require('ghissues'), ['createComment', 'list'])\n\nimport {logger} from '../loggin...
javascript
chosen
[ { "from": "system", "value": "Replace accent with apostrophe for consistency.\n\n" }, { "from": "human", "value": "define ({\n title: 'Titre',\n format: 'Format',\n layout: 'Disposition',\n settings: 'Paramètres',\n mapScaleExtent: 'Échelle/étendue de la carte',\n preserve: 'Pr...
javascript
chosen
[ { "from": "system", "value": "Add input for numeric measures\n" }, { "from": "human", "value": "// import React and Redux dependencies\nvar React = require('react');\nvar connect = require('react-redux').connect;\nvar _ = require('underscore');\n\nvar bindActionCreators = require('redux').bindAc...
javascript
chosen
[ { "from": "system", "value": "Check that the reducer is attached to the root reducer and the App container state is updated accordingly.\n" }, { "from": "human", "value": "'use strict';\nlet path = require('path');\nlet assert = require('yeoman-generator').assert;\nlet helpers = require('yeoman-...
javascript
chosen
[ { "from": "system", "value": "Use the new API to register a build plugin\n" }, { "from": "human", "value": "Package.describe({\n summary: \"Jade template language\",\n version: \"0.2.9\",\n name: \"mquandalle:jade\",\n git: \"https://github.com/mquandalle/meteor-jade.git\"\n});\n\nPackage._t...
javascript
chosen
[ { "from": "system", "value": "Enhance `expectPromise` helper to first check existence of `then`.\n" }, { "from": "human", "value": "/*! resol-vbus | Copyright (c) 2013-2014, Daniel Wippermann | MIT license */\n'use strict';\n\n\n\nvar _ = require('lodash');\nvar Q = require('q');\n\n\n\nvar test...
javascript
chosen
[ { "from": "system", "value": "Remove no longer needed allowedVersions\n\nThese conflicts have been resolved in the ecosystem and we don't need\nto worry about them anymore.\n" }, { "from": "human", "value": "/* eslint-env node */\n'use strict';\n\nmodule.exports = {\n allowedVersions: {\n 'e...
javascript
chosen
[ { "from": "system", "value": "Update url to point to a working current link\n" }, { "from": "human", "value": "const DYNAMIC_TEMPLATE_CHAR_WARNING = `\nContent with characters ', \" or & may need to be escaped with three brackets\n{{{ content }}}\nSee https://sendgrid.com/docs/ui/sending-email/u...
javascript
chosen
[ { "from": "system", "value": "Add method to access an element of the module-container\n" }, { "from": "human", "value": "(function(app) {\n 'use strict';\n\n var jCore = require('jcore');\n var helper = app.helper || require('../helper.js');\n var dom = app.dom || require('../dom.js');\n\n ...
javascript
chosen
[ { "from": "system", "value": "Update supported versions in !ip" }, { "from": "human", "value": "const Command = require('../Command');\n\nmodule.exports = Command.extend({\n commandName: 'ip',\n commandAliases: ['address', 'server', 'connect', 'version'],\n processMessage: function (mes...
javascript
chosen
[ { "from": "system", "value": "Add delimiter code; not working yet\n" }, { "from": "human", "value": "var consoleJSON = consoleJSON || {};\n\nconsoleJSON.log = function(json, ruleset) {\n // pretty prints JSON to console according to given ruleset\n // obj is a Javascript object, ruleset is a c...
javascript
chosen
[ { "from": "system", "value": "Use log instead of info.\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\nconst program = require('commander')\nconst PipelineRunner = require('../pipeline/runner')\n\nprogram\n .version('scry 0.1.0')\n .usage('[options] <type> <dir> <file...>')\n .opti...
javascript
chosen
[ { "from": "system", "value": "Increase payload limit to 1.5MB\n\nWhen editing a model, this allow the user to upload a 1MB file, rather\nthan something like a 925.3kB file, along with about 500kB of\ndescription text.\n" }, { "from": "human", "value": "import express from 'express';\nimport path...
javascript
chosen
[ { "from": "system", "value": "Add documentation to counter example" }, { "from": "human", "value": "import {Observable as O} from \"rx\"\n\n\nexport default function main({DOM, model$, mux}) {\n const {h} = DOM\n\n // we can use our model like normal observable\n const vdom$ = DOM.prepare(mod...
javascript
chosen
[ { "from": "system", "value": "Change function to arrow function\n\n- Add missing semicolons\n\nSigned-off-by: Kien Ha <3e36ebd6a7c89ee7d9a20a5fbbffc571f107e566@gmail.com>\n" }, { "from": "human", "value": "\"use strict\";\n\nfunction setAllBlogId() {\n let blogLinkElements = document.querySel...
javascript
chosen
[ { "from": "system", "value": "Allow rows to have fixed height\n" }, { "from": "human", "value": "/* @flow */\n'use strict';\n\nimport React, {Component} from 'react';\nimport {View, } from 'react-native';\n\nimport computeProps from '../Utils/computeProps';\nimport _ from 'lodash';\n\n\nexport d...
javascript
chosen
[ { "from": "system", "value": "Replace the whole expression rather than the whole node\n\nCo-Authored-By: David Buchan-Swanson <c3af9b132736d390414a453d097fd3de5af0f970@gmail.com>" }, { "from": "human", "value": "/**\n * @fileoverview Enforce no single element style arrays\n * @author Michael Gal...
javascript
chosen
[ { "from": "system", "value": "Add disableDraggingForSnapshotTest to CreateGroups to workaround react-beautiful-dnd / snapshot renderer mismatch\n" }, { "from": "human", "value": "import PropTypes from 'prop-types';\nimport React from 'react';\n\n// A visual UI element for horizontal dots indicat...
javascript
chosen
[ { "from": "system", "value": "Set Web3 provider on contracts.\n" }, { "from": "human", "value": "import contract from 'truffle-contract'\n\nimport RFQRegistryJSON from 'contracts/build/contracts/RFQRegistry.json'\nimport RFQJSON from 'contracts/build/contracts/RFQ.json'\n\nconst RFQRegistry = co...
javascript
chosen
[ { "from": "system", "value": "Fix formatting and missing semicolon\n" }, { "from": "human", "value": "L.AngularControl = L.Control.extend({\n\toptions: {\n\t\tposition: 'bottomleft',\n\t\ttemplate: ''\n\t},\n\tonAdd: function (map) {\n\t\tvar container = L.DomUtil.create('div', 'leaflet-angular'...
javascript
chosen
[ { "from": "system", "value": "Fix global 'Promise' as default argument\n\nBecause of hoisting, the default 'Promise' argument was 'undefined'.\nChanging the argument name fixes this.\n\nCloses #1\n" }, { "from": "human", "value": "export default (Promise=Promise) => f =>\n (...args) =>\n new...
javascript
chosen
[ { "from": "system", "value": "Change reporter for clean output\n" }, { "from": "human", "value": "module.exports = function(config) {\n config.set({\n plugins: [\n 'karma-jasmine',\n 'karma-firefox-launcher',\n 'karma-phantomjs-launcher',\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add activePieces Lookup to Board" }, { "from": "human", "value": "var TwoDimensionalFixedArray = require('./two_dementional_fixed_array.js');\nvar _ = require('lodash');\nvar np = require('named-parameters');\n\nmodule.exports = function(args) {\n parsedArgs = np.p...
javascript
chosen
[ { "from": "system", "value": "Fix require for collapsible components\n" }, { "from": "human", "value": "'use strict';\n\nexport default {\n\n Container : require('./container'),\n Row : require('./row'),\n Col : require('./col'),\n\n IconButton : require('./icon-button'),\n\n AppHeader : re...
javascript
chosen
[ { "from": "system", "value": "Remove the custom URL when initialize socket.io\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { RouterProvider } from 'react-router5';\nimport App from './containers/...
javascript
chosen
[ { "from": "system", "value": "Replace unnecessary ` with '\n" }, { "from": "human", "value": "const { createClient } = require('./client')\nconst { attachCommands } = require('./commands')\nrequire('dotenv').config()\n\nconst TG_API_TOKEN = process.env.TG_API_TOKEN\nconst WEBHOOK_PORT = parseInt...
javascript
chosen
[ { "from": "system", "value": "Add /flip and /flop commands\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2015 Nick Jurgens <nicholas2010081@gmail.com>\n */\n'use strict';\n\nimport Poller from './poller';\nimport api from './api';\n\nlet poller = new Poller();\n\npoller.dispatcher\n ...
javascript
chosen
[ { "from": "system", "value": "Add the polyfills so they work in the browser." }, { "from": "human", "value": "import {renderInBrowser} from './render.js';\n\nrenderInBrowser();\n" }, { "from": "gpt", "value": "import 'babel-core/lib/babel/polyfill';\nimport {renderInBrowser} from './...
javascript
chosen
[ { "from": "system", "value": "Fix unhandled promise rejection error reporting to Sentry\n" }, { "from": "human", "value": "import React from 'react';\nimport { render } from 'react-dom';\nimport { Router, Route, browserHistory } from 'react-router';\n\nimport './static/bootstrap/css/bootstrap.cs...
javascript
chosen
[ { "from": "system", "value": "Make raf loop a method of Fluzo\n" }, { "from": "human", "value": "'use strict';\n\nvar postal = require('postal');\nvar raf = require('raf');\nvar FluzoStore = require('fluzo-store')(postal);\n\nvar fluzo_channel = postal.channel('fluzo');\n\nvar render_pending = f...
javascript
chosen
[ { "from": "system", "value": "Change to test travis build flow" }, { "from": "human", "value": "'use strict';\nvar chai = require('chai');\nvar supertest = require('supertest');\nvar api = supertest('https://apis-bank-dev.apigee.net'); // supertest init;\n\nchai.should();\n\ndescribe('/atms', fu...
javascript
chosen
[ { "from": "system", "value": "Change key for quote in redux\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';\nconst tempQuote = {\n quote: 'A comp...
javascript
chosen
[ { "from": "system", "value": "Refactor redirectUrl logic of page language selector\n" }, { "from": "human", "value": "const toArray = nodelist => Array.prototype.slice.call(nodelist);\nconst things = ['method', 'case', 'organization'];\n\nconst languageSelect = {\n redirectUrl: null,\n isThing...
javascript
chosen
[ { "from": "system", "value": "Set up framework for trace parser\n" }, { "from": "human", "value": "window.addEventListener(\"load\", function (event) {\n \n});\n\nfunction parse_prolog_trace(source)\n{\n \n}\n" }, { "from": "gpt", "value": "\"use strict\";\nwindow.addEventListe...
javascript
chosen
[ { "from": "system", "value": "Add middleware to work with Redux chrome extension\n\nExtension page:\nhttps://github.com/zalmoxisus/redux-devtools-extension\n" }, { "from": "human", "value": "import {createStore, applyMiddleware} from 'redux';\nimport createSagaMiddleware from 'redux-saga';\nimpo...
javascript
chosen
[ { "from": "system", "value": "Allow broadcaster's labels to be localized\n" }, { "from": "human", "value": "import { Localization } from './base';\nimport { overlayElement } from './overlay';\n\nexport { contexts } from './base';\n\nconst ns = 'http://www.mozilla.org/keymaster/gatekeeper/there.i...
javascript
chosen
[ { "from": "system", "value": "Add class StopFlashTabs extends Builder\n" }, { "from": "human", "value": "/**\n * StopFlash\n *\n * https://github.com/JWhile/StopFlash\n *\n * stopflash.js\n */\n\n// class StopFlashUI extends Builder\nfunction StopFlashUI(elements)\n{\n this.super('div');\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add entry point for readme\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport { head, pipe, cond, equals, prop } from 'ramda';\nimport { reject } from 'bluebird';\nimport build from './build';\nimport run from './run';\nimpo...
javascript
chosen
[ { "from": "system", "value": "Raise error upon dataflow cycle detection.\n" }, { "from": "human", "value": "/**\n * Assigns a rank to an operator. Ranks are assigned in increasing order\n * by incrementing an internal rank counter.\n * @param {Operator} op - The operator to assign a rank.\n */\n...
javascript
chosen
[ { "from": "system", "value": "Use consistent terminology in tests as in the README\n" }, { "from": "human", "value": "/* global describe, it */\n\nconst should = require('should')\nconst cb = require('../index')\nconst fs = require('fs')\n\ndescribe('Testing valid format receipts should convert ...
javascript
chosen
[ { "from": "system", "value": "Fix redirection when taking the token from URL.\n" }, { "from": "human", "value": "define(function () {\n var App = Ember.Application.create()\n , isDev = /localhost/.test(document.location.href)\n , tokenRegexp = /authentication_token=([a-zA-Z0-9]+)/;\n\n /...
javascript
chosen
[ { "from": "system", "value": "Change to add a new JIRA link as a sibling.\n" }, { "from": "human", "value": "// Content script loaded into https://github.com/apache/reef/pulls\n\n\n// Rewrite an entry of the PR list by adding a link to the JIRA\nfunction append_jira_url(index, html){\n return...
javascript
chosen
[ { "from": "system", "value": "Rename from to to name\n" }, { "from": "human", "value": "const request = require('supertest');\nconst app = require('../app');\ndescribe('transforms the name of the object in a coordinate', function () {\n it('Input place name-string,base coordinate, return coordi...
javascript
chosen
[ { "from": "system", "value": "Add additional elements to html5shiv\n\nThe default configuration of html5shiv lacks several elements.\n" }, { "from": "human", "value": "'use strict';\n\nrequire('./test-accessible-name');\nrequire('./test-role-from-tag');\nrequire('./test-words-from-role');\nrequi...
javascript
chosen
[ { "from": "system", "value": "Address a few syntax issues\n" }, { "from": "human", "value": "function log(message){\n console.log(message);\n}\n\nfunction pick(array){\n return array[Math.floor(Math.random()*array.length)];\n}\n\nfunction unique(array) {\n var sorted = array;\n sorte...
javascript
chosen
[ { "from": "system", "value": "Add tests for creating and deleting things\n" }, { "from": "human", "value": "module.exports = function() {\n const DEFAULT_HOST = 'localhost';\n const DEFAULT_PORT = 8080;\n\n let frisby = require('frisby');\n\n let host = process.env.VOLONTARIO_EXPRESS_HOST ||...
javascript
chosen
[ { "from": "system", "value": "Remove window.Promise from global promise getter\n" }, { "from": "human", "value": "import debug from 'debug';\nimport Channel from './channel';\n\nconst dbg = debug('transceiver:main');\n\nexport default new class Transceiver {\n constructor() {\n dbg('Initiali...
javascript
chosen
[ { "from": "system", "value": "TEST: Work aound failing Nightwatch test\n" }, { "from": "human", "value": "'use strict';\n\nvar log = require('../modules/log');\n\nexports.command = function(scenario, callback) {\n var client = this;\n\n this.perform(function() {\n log.command('Processing Sc...
javascript
chosen
[ { "from": "system", "value": "Modify player preview to render child props and update PropTypes\n" }, { "from": "human", "value": "const React = require('react')\nconst propTypes = require('prop-types')\n\nfunction PlayerPreview (props) {\n return (\n <div>\n <div className='column'>\n ...
javascript
chosen
[ { "from": "system", "value": "Use promise for api request, taskrunner\n" }, { "from": "human", "value": "const low = require(\"lowdb\");\nconst dataDb = low('./data/datadb.json');\nconst Requester = require('../controllers/requester');\nconst Parser = require('../controllers/parser');\n\nconst T...
javascript
chosen
[ { "from": "system", "value": "Change state and method style in Tooltip\n" }, { "from": "human", "value": "import styles from './Tooltip.css';\nimport React, { Component } from 'react';\nimport cx from 'classnames';\n\nexport default class Tooltip extends Component {\n constructor(props) {\n ...
javascript
chosen
[ { "from": "system", "value": "Update links when dtenable set\n" }, { "from": "human", "value": "/* eslint-disable no-console */\n// <nowiki>\n(function() {\n\n\tvar updateLinks = function() {\n\t\t$('a').each(function(i, e) {\n\t\t\tvar shorthref = e.getAttribute('href') || '';\n\t\t\tif (shorth...
javascript
chosen
[ { "from": "system", "value": "Add more info to about box\n\nAuditors: da39a3ee5e6b4b0d3255bfef95601890afd80709@diracdeltas\n" }, { "from": "human", "value": "const electron = require('electron')\nconst app = require('electron').app\nconst dialog = electron.dialog\nconst Channel = require('./chan...
javascript
chosen
[ { "from": "system", "value": "Use module mode for nuxt store\n" }, { "from": "human", "value": "import Vuex from 'vuex';\nimport feathersClient from '../feathers-client';\nimport feathersVuex, { initAuth } from 'feathers-vuex';\n\nconst { service, auth } = feathersVuex(feathersClient, { idField:...
javascript
chosen
[ { "from": "system", "value": "Remove tests to quick fix 'Tinytest is not defined' error\n" }, { "from": "human", "value": "Package.describe({\n name: 'konecty:mongo-counter',\n summary: \"Atomic counters stored in MongoDB\",\n version: \"0.0.4\",\n git: \"https://github.com/Konecty/meteor-mo...
javascript
chosen
[ { "from": "system", "value": "Fix use of userID instead of id\n" }, { "from": "human", "value": "var Blog = React.createClass({\n navigate: function(interval) {\n alert(interval)\n },\n navBtn: function(forwards) {\n return (\n <div className={\"ui \" + (forward...
javascript
chosen
[ { "from": "system", "value": "Change the default sort to be by name\n" }, { "from": "human", "value": "Meteor.methods({\n\tgroupsList: function(nameFilter, limit, sort) {\n\t\tif (!Meteor.userId()) {\n\t\t\tthrow new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'groupsList' });\n...
javascript
chosen
[ { "from": "system", "value": "Support for new lazyload standard.\n" }, { "from": "human", "value": "(() => {\n 'use strict';\n\n const imgs = document.getElementsByTagName('img');\n\n for (const img of imgs) {\n var url;\n\n if (url = img.getAttribute('data-original')) {\n...
javascript
chosen
[ { "from": "system", "value": "test(lorax): Fix tests due to eslint problems\n" }, { "from": "human", "value": "'use strict';\n\nimport test from 'ava';\nimport * as lorax from '../index';\nimport * as fs from 'fs';\n\ntest.afterEach.cb(t => {\n fs.stat('test.md', (err, stats) => {\n if (stat...
javascript
chosen
[ { "from": "system", "value": "Add firefox to the list of karma test browsers\n" }, { "from": "human", "value": "// Copyright 2017 Google Inc. 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": "Copy form that accepts new passwords into overlay div of add/update.\n" }, { "from": "human", "value": "const {clipboard} = require('electron')\nclipboard.writeText('Example String', 'selection')\nconsole.log(clipboard.readText('selection'))\n\n$('#submit-words').su...
javascript
chosen
[ { "from": "system", "value": "Add validate step to benchmark suite\n" }, { "from": "human", "value": "/* eslint-disable no-console, import/no-extraneous-dependencies */\nconst { Suite } = require('benchmark');\n\nconst fixture = require('./fixture');\n\nconst suite = new Suite();\n\nsuite\n .ad...
javascript
chosen
[ { "from": "system", "value": "Extend visualisation to March 2016\n" }, { "from": "human", "value": "\nvar moment = require('moment');\n\n// note that month indices are zero-based\n\nmodule.exports.DATA_START_YEAR = 2012;\nmodule.exports.DATA_START_MONTH = 0;\n\nmodule.exports.DATA_END_YEAR = 201...
javascript
chosen
[ { "from": "system", "value": "Add new spec for experimental promise library\n" }, { "from": "human", "value": "import TestPromise from 'jasmine-es6/helpers/promise';\n\nconst implementation = {\n fetch() {\n return new Promise(() => null);\n },\n async doStuff() {\n this.showSpinner = t...
javascript
chosen
[ { "from": "system", "value": "Add a 'try' block for current versions of Node.js to try and '.close' the server.\n" }, { "from": "human", "value": "'use strict';\r\n\r\nvar NET = require('net');\r\nvar PORTS = {};\r\n\r\nfunction CreateServer(\r\n port,\r\n callback\r\n){\r\n \r\n if(\r\n ...
javascript
chosen
[ { "from": "system", "value": "Fix crash error, send exceptions to loggly\n" }, { "from": "human", "value": "var winston = require('winston');\nvar mkdirp = require('mkdirp');\n\n// Init log path\nif (!process.env.LOGPATH) {\n process.env.LOGPATH = './logs';\n}\nmkdirp(process.env.LOGPATH);\n\...
javascript
chosen
[ { "from": "system", "value": "Update core tast to and docs to reflect new args param\n" }, { "from": "human", "value": "module.exports = (function() {\n\n 'use strict';\n\n /**\n * Do not need to extend from this class for new Tasks, just use this as a reference template.\n * @class\n */\n ...
javascript
chosen
[ { "from": "system", "value": "Allow configuration to override app name\n" }, { "from": "human", "value": "var express = require('express');\nvar serveStatic = require('serve-static');\nvar bodyParser = require('body-parser');\nvar session = require('express-session');\nvar RedisStore = require('...
javascript
chosen
[ { "from": "system", "value": "Rename variables for optimal readability\n\nThe variable names in the spec are a bit cryptic.\n" }, { "from": "human", "value": "/*! http://mths.be/array-of v0.1.0 by @mathias */\nif (!Array.of) {\n\t(function() {\n\t\tvar isConstructor = function(Constructor) {\n\t...
javascript
chosen
[ { "from": "system", "value": "Validate indentation to have 2 spaces\n" }, { "from": "human", "value": "var gulp = require('gulp');\n\nvar javascripts = {\n gulpfile: 'Gulpfile.js',\n source: ['index.js', 'lib/**/*.js'],\n tests: 'test/**/*.js'\n};\n\njavascripts.all = Object.keys(javascripts)...
javascript
chosen
[ { "from": "system", "value": "Add a color theme for the UI of the whole app\n" }, { "from": "human", "value": "angular.module('zoomableApp', ['ui.router', 'appRoutes', 'ngMaterial']);\n" }, { "from": "gpt", "value": "angular.module('zoomableApp', ['ui.router', 'appRoutes', 'ngMateria...
javascript
chosen
[ { "from": "system", "value": "Fix decimal numbers limit to 2\n\nwhile calculating the row total, javascript was called and on some quantity, a number with a big decimal part was appearing.In this PR it is fixed\nFixes https://github.com/opensuse/osem/issues/1709\n" }, { "from": "human", "value":...
javascript
chosen
[ { "from": "system", "value": "Enable debug mode in darts-ui\n" }, { "from": "human", "value": "$(function () {\n if ($('#darts-ui')[0]) {\n window.dartsUi = new DartsUi('#darts-ui');\n }\n});\n" }, { "from": "gpt", "value": "$(function () {\n if ($('#darts-ui')[0]) {\n var d...
javascript
chosen
[ { "from": "system", "value": "Fix JS behaviour to show categories when noosfero is in a subdir environment\n\nSigned-off-by: Fabio Teixeira <a90b0aa793b4509973a022e6fee8cf8a263dd84e@gmail.com>\nSigned-off-by: Gabriela Navarro <61c2bac069eee966d94f5b4095f9a2d9fa323d86@gmail.com>\n" }, { "from": "huma...
javascript
chosen