conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix the codemirror bundle handling\n" }, { "from": "human", "value": "\nvar ContextReplacementPlugin = require(\"webpack/lib/ContextReplacementPlugin\");\n\nmodule.exports = {\n entry: './build/index.js',\n output: {\n path: './build',\n filename: 'bundle.js...
javascript
chosen
[ { "from": "system", "value": "Switch default color distance algorithm for user to RGB_APPROX\n\nLAB_NEAREST can be really slow\n" }, { "from": "human", "value": "// @flow\n\nimport { RGB_NEAREST, RGB_APPROX, LAB_NEAREST } from \"constants/color\";\n\nexport const BOOL = \"BOOL\";\nexport const E...
javascript
chosen
[ { "from": "system", "value": "Fix double-no clicking on participants\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport { task } from 'ember-concurrency';\n\nexport default Ember.Component.extend({\n store: Ember.inject.service(),\n flashMessages: Ember.inject.service(),\n ...
javascript
chosen
[ { "from": "system", "value": "Change marathon endpoint to groups\n" }, { "from": "human", "value": "import ActionTypes from '../constants/ActionTypes';\nvar AppDispatcher = require('./AppDispatcher');\nvar Config = require('../config/Config');\nvar RequestUtil = require('../utils/RequestUtil');\...
javascript
chosen
[ { "from": "system", "value": "Fix bug where the first tap gave a bpm of infinity" }, { "from": "human", "value": "class BpmCounter {\n constructor() {\n this.numTaps = 0;\n this.bpm = 0;\n this.startTapTime = new Date();\n }\n\n restart() {\n this.numTaps = 0;\n this.bpm = 0;\n...
javascript
chosen
[ { "from": "system", "value": "Fix artifact display on job steps (which broke because the API changes to return an object rather than a list)\n\nTest Plan: manual =(\n\nReviewers: mkedia, kylec\n\nReviewed By: kylec\n\nSubscribers: changesbot\n\nDifferential Revision: https://tails.corp.dropbox.com/D143542\n...
javascript
chosen
[ { "from": "system", "value": "Return HTTP 502 and error message if upstream server error.\n" }, { "from": "human", "value": "const util = require('util');\nconst Koa = require('koa');\nconst bodyParser = require('koa-bodyparser');\nconst request = require('./request');\n\nclass Server {\n\n con...
javascript
chosen
[ { "from": "system", "value": "Fix duplicates on session manager\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n sortProperties: [\n 'statusSort:asc',\n 'organizationKindSort:asc',\n 'nomen:asc',\n ],\n sortedSessions: Ember....
javascript
chosen
[ { "from": "system", "value": "Fix bug with uploading octed data like images\n" }, { "from": "human", "value": "var ssh2 = require('ssh2');\nvar SocketIOFileUpload = require('socketio-file-upload');\n\nvar completeFileUpload = function(client, sshCredentials) {\n return function(event) {\n va...
javascript
chosen
[ { "from": "system", "value": "Improve regular expression's overlapping and details\n" }, { "from": "human", "value": "'use strict';\n\nvar execall = require('regexp.execall');\n\n\nmodule.exports = function (text) {\n return execall(/ \\w{1,2} [^ ]/g, text).map(function (match) {\n return ma...
javascript
chosen
[ { "from": "system", "value": "Add the possibility to append `label` on component toolbar buttons\n" }, { "from": "human", "value": "var Backbone = require('backbone');\n\nmodule.exports = Backbone.View.extend({\n events() {\n return (\n this.model.get('events') || {\n mousedown: ...
javascript
chosen
[ { "from": "system", "value": "Add missing funcs to util maintenance\n" }, { "from": "human", "value": "const AssignedSchedule = require('../../structs/db/AssignedSchedule.js')\nconst pruneGuilds = require('./pruneGuilds.js')\nconst pruneFeeds = require('./pruneFeeds.js')\nconst pruneFormats = re...
javascript
chosen
[ { "from": "system", "value": "Fix DowntimeDescription not showing on checklist\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport Checklist from 'parser/shared/modules/features/Checklist2';\nimport Rule from 'parser/shared/modules/features/...
javascript
chosen
[ { "from": "system", "value": "Change constructor to receive (options, repo, branch)\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n/*\n* Copyright 2013 Eduardo Lundgren, All Rights Reserved.\n*\n* Code licensed under the BSD License:\n* https://github.com/eduardolundgren/blob/master/L...
javascript
chosen
[ { "from": "system", "value": "fixed: Fix pattern for export formats\n" }, { "from": "human", "value": "'use strict';\n\nvar express = require('express');\nvar controller = require('./conversion.controller');\n\nvar router = express.Router();\n\nrouter.post('/import', controller.import);\nrouter....
javascript
chosen
[ { "from": "system", "value": "Change how Typekit fonts are applied.\n\nPrevent the FOUC that sometimes occurs by having Typekit apply fonts\ninstead of handling it ourselves.\n" }, { "from": "human", "value": "$(\".container\").addClass(\"tk-proxima-nova\");\n$(\".page-header\").addClass(\"tk-le...
javascript
chosen
[ { "from": "system", "value": "Add chapter 9, exercise 3\n" }, { "from": "human", "value": "let number = /^[+-]?\\d*(\\d\\.|\\.\\d)?\\d*([eE][+-]?\\d+)?$/;\n" }, { "from": "gpt", "value": "let number = /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([Ee][+-]?\\d+)?$/;\n" } ]
javascript
chosen
[ { "from": "system", "value": "Add chapter 11, exercise 1\n" }, { "from": "human", "value": "async function locateScalpel(nest) {\n let curNest = nest.name;\n for (;;) {\n let scalpelLoc = await anyStorage(nest, curNest, \"scalpel\");\n if (scalpelLoc == curNest) return curNes...
javascript
chosen
[ { "from": "system", "value": "Fix styles and classes for grouped columns\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/simple-table-cell';\n\nexport default Ember.Component.extend({\n layout,\n tagName: 'th',\n\n classNameBindings: ...
javascript
chosen
[ { "from": "system", "value": "Change to treat the string as a special case\n" }, { "from": "human", "value": "'use strict';\n\nvar fetch = require('node-fetch');\nvar URL = require('url').URL;\n\nfunction wrapFetchForNode(fetch) {\n // Support schemaless URIs on the server for parity with the b...
javascript
chosen
[ { "from": "system", "value": "Add help path to poi data\n" }, { "from": "human", "value": "'use strict';\nimport { t } from '../utils/i18n';\n\nexport const fileTypesMatrix = {\n 'admin-bounds': {\n display: t('Administrative Boundaries'),\n description: t('A GeoJSON containing polygons w...
javascript
chosen
[ { "from": "system", "value": "Test coverage for DEL_SERIES action\n" }, { "from": "human", "value": "import assert from 'assert';\n\nimport series from './series';\nimport * as TYPES from '../../actions/types';\n\n\ndescribe('A series reducer for redux state', () => {\n\n\t//Test states\n\tconst...
javascript
chosen
[ { "from": "system", "value": "Test db should have data now\n\nDidn’t realize that child_process functions don’t return promises\n" }, { "from": "human", "value": "/* eslint-env jest */\n\nconst { exec } = require('child_process')\nconst request = require('supertest')\nlet app\n\n// start a mongo...
javascript
chosen
[ { "from": "system", "value": ":green_heart: Fix tests relying on fs spies\n" }, { "from": "human", "value": "'use strict';\n\nconst fs = require('fs');\nconst GetEmail = require('../../lib/install/get-email');\n\ndescribe('GetEmail', () => {\n let step;\n\n beforeEach(() => {\n step = new G...
javascript
chosen
[ { "from": "system", "value": "Allow observable creation with no argument\n" }, { "from": "human", "value": "const fromArray = array => createObservable((push, end) => {\n array.forEach(value => { push(value); });\n end();\n});\n" }, { "from": "gpt", "value": "const fromArray = arra...
javascript
chosen
[ { "from": "system", "value": "Change the color of the audio levels indicator.\n" }, { "from": "human", "value": "var interfaceConfig = {\n CANVAS_EXTRA: 104,\n CANVAS_RADIUS: 7,\n SHADOW_COLOR: '#00ccff',\n INITIAL_TOOLBAR_TIMEOUT: 20000,\n TOOLBAR_TIMEOUT: 4000,\n DEFAULT_REMO...
javascript
chosen
[ { "from": "system", "value": "Use TeX magic to allow bulder override\n" }, { "from": "human", "value": "'use babel'\n\nimport fs from 'fs-plus'\nimport path from 'path'\n\nexport default class BuilderRegistry {\n getBuilder (filePath) {\n const builders = this.getAllBuilders()\n const can...
javascript
chosen
[ { "from": "system", "value": "Refactor to be constructed without parameters\n" }, { "from": "human", "value": "/*\n * DomainScope module\n * @lastmodifiedBy ChengFuLin(chengfulin0806@gmail.com)\n * @lastmodifiedDate 2015-07-28\n */\nvar Scope = require('./scope');\n\n/**\n * DomainScope\n * @par...
javascript
chosen
[ { "from": "system", "value": "Make sorting and trailing commas consistent\n" }, { "from": "human", "value": "'use strict';\n\nvar generate = require('../generate');\n\nexports.endgames = [\n 'nefarious purposes',\n 'a Washington takeover',\n 'a terrorist plot',\n 'world domination',\...
javascript
chosen
[ { "from": "system", "value": "Update to register descriptor route\n\n" }, { "from": "human", "value": "/**\n * Created by Alex on 29/01/2017.\n */\n import Hapi from 'hapi';\n\n export class Knekt {\n \tconstructor() {\n \t\tthis._server = new Hapi.Server();\n \t\tthis.plugins = [];\n \t}\n\n \t...
javascript
chosen
[ { "from": "system", "value": "Remove setTimeout left over from debugging.\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { useTranslator } from '@u-wave/react-translate';\nimport CircularProgress from '@material-ui/core/CircularProgress...
javascript
chosen
[ { "from": "system", "value": "Update copy for team management link" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport Relay from 'react-relay';\nimport TeamRoute from './TeamRoute';\nimport Can from '../components/Can';\nimport CheckContext from '../Che...
javascript
chosen
[ { "from": "system", "value": "Fix setup function: Should return promise\n" }, { "from": "human", "value": "var CodeMirror = require('codemirror')\n , bindCodemirror = require('gulf-codemirror')\n\nmodule.exports = setup\nmodule.exports.consumes = ['editor']\nmodule.exports.provides = []\nfuncti...
javascript
chosen
[ { "from": "system", "value": "Add testStyles and prefixed to the depedencies.\n" }, { "from": "human", "value": "define(['Modernizr', 'createElement', 'docElement'], function( Modernizr, createElement, docElement ) {\n // http://www.w3.org/TR/css3-exclusions\n // http://www.w3.org/TR/css3-...
javascript
chosen
[ { "from": "system", "value": "Disable pagination in rsvp page\n" }, { "from": "human", "value": "import 'footable';\n\n$(() => {\n $('.participants').footable({\n sorting: {\n enabled: true,\n },\n });\n});\n" }, { "from": "gpt", "value": "import 'footable';\n\n$(() => {...
javascript
chosen
[ { "from": "system", "value": "Change title limit to 30 chars.\n" }, { "from": "human", "value": "App.populator('feed', function (page, data) {\n $(page).find('.app-title').text(data.title);\n $.getJSON('/data/feed/' + data.id + '/articles', function (articles) {\n articles.forEach(function ...
javascript
chosen
[ { "from": "system", "value": "Resolve issue with running plugin on multiple rules.\n" }, { "from": "human", "value": "import postcss from 'postcss';\nimport margin from './lib/decl/margin';\nimport padding from './lib/decl/padding';\nimport borders from './lib/decl/borders';\nimport columns from...
javascript
chosen
[ { "from": "system", "value": "Adjust JS document ready function\n" }, { "from": "human", "value": "\"use strict\";\n\n$(document).on(\"turbolinks:load\", function() { //equivalent of $(document).ready()\n console.log(\"JS loaded.\")\n addSpace();\n var $grid = initMasonry();\n\n // layout Ma...
javascript
chosen
[ { "from": "system", "value": "Disable start/limit params on recipients request\n" }, { "from": "human", "value": "/*jslint browser: true, undef: true, white: false, laxbreak: true *//*global Ext,Slate*/\nExt.define('SlateAdmin.model.person.progress.NoteRecipient', {\n extend: 'Ext.data.Model'...
javascript
chosen
[ { "from": "system", "value": "Fix formatISODuration documentation (ci skip)\n" }, { "from": "human", "value": "import requiredArgs from '../_lib/requiredArgs/index.js'\n\n/**\n * @name formatISODuration\n * @category Common Helpers\n * @summary Format a Duration Object according to ISO 8601 Dura...
javascript
chosen
[ { "from": "system", "value": "636: Update case progress query to include name\n" }, { "from": "human", "value": "const config = require('../../../knexfile').web\nconst knex = require('knex')(config)\nconst orgUnitFinder = require('../helpers/org-unit-finder')\n\nmodule.exports = function (id, ty...
javascript
chosen
[ { "from": "system", "value": "Add radio button and link up to state.\n" }, { "from": "human", "value": "/**\n * SurveyQuestionSingleSelectChoice component.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may ...
javascript
chosen
[ { "from": "system", "value": "Return more sane data through API\n" }, { "from": "human", "value": "var router = require(\"express\").Router();\nvar db = require(\"./db\");\n\nrouter.get(\"/\", function (req, res) {\n var o = {\n map: function () {\n if (this.parents.length === 1) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use constant for error message.\n" }, { "from": "human", "value": "AccountsAnonymous.login = function (callback) {\n callback = callback || function () {};\n if (Meteor.userId()) {\n callback(new Meteor.Error('accounts-anonymous-already-logged-in',\n \"You...
javascript
chosen
[ { "from": "system", "value": "Use `Ember.computed` instead of `Function.prototype.property`\n" }, { "from": "human", "value": "import Em from 'ember';\nimport ArraySlice from 'array-slice';\nvar get = Em.get;\nvar set = Em.set;\n\nvar ArrayPager = ArraySlice.extend({\n\t// 1-based\n\tpage: funct...
javascript
chosen
[ { "from": "system", "value": "Add angular assets to asset pipeline\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javasc...
javascript
chosen
[ { "from": "system", "value": "Use chrome.runtime.id instead of name to select Analytics property.\n" }, { "from": "human", "value": "/**\n * @constructor\n */\nfunction Analytics() {\n this.service_ = null;\n}\n\nAnalytics.prototype.start = function(settings) {\n if (this.service_) {\n thro...
javascript
chosen
[ { "from": "system", "value": "[MAILWEB-801] Use larger modal for Custom CSS\n" }, { "from": "human", "value": "import React, { useState } from 'react';\nimport { c } from 'ttag';\nimport PropTypes from 'prop-types';\nimport { FormModal, PrimaryButton, Label, Alert, TextArea } from 'react-compone...
javascript
chosen
[ { "from": "system", "value": "Fix for \"browser is not defined\" error\n\nThe `browser` variable is not available outside a beforeEach() call.\n" }, { "from": "human", "value": "'use strict';\n\n/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */\n\ndescribe('ng-grid', function() {\n be...
javascript
chosen
[ { "from": "system", "value": "Change default port to 7431.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\n/**\n * Binary to run the main server.\n * (C) 2015 Alex Fernández.\n */\n\n// requires\nvar stdio = require('stdio');\nvar Log = require('log');\nvar reviewServer ...
javascript
chosen
[ { "from": "system", "value": "Use credentials as default values, complain if not found.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\n/**\n * Binary to run the main server.\n * (C) 2015 Alex Fernández.\n */\n\n// requires\nvar stdio = require('stdio');\nvar reviewServe...
javascript
chosen
[ { "from": "system", "value": "Fix user global patching.\nWork around wierd runtime error\n" }, { "from": "human", "value": "const path = require('path')\n\nmodule.exports = function engine (config) {\n require('./driver')(config)\n config.engine.on('init', function (processType) {\n // proc...
javascript
chosen
[ { "from": "system", "value": "Add notification icon and delete code that didn't work\n" }, { "from": "human", "value": "console.log('Started', self);\nself.addEventListener('install', function(event) {\n self.skipWaiting();\n console.log('Installed', event);\n});\nself.addEventListener('ac...
javascript
chosen
[ { "from": "system", "value": "Fix generate failing on README parsing\n\nFailed if no title or description could be extracted\n" }, { "from": "human", "value": "var _ = require('lodash');\nvar marked = require('marked');\nvar textRenderer = require('marked-text-renderer');\n\nfunction extractFirs...
javascript
chosen
[ { "from": "system", "value": "Add a small comment to an export.\n" }, { "from": "human", "value": "var createError = require('createerror');\nvar httpErrors = require('httperrors');\nvar socketCodesMap = require('./socketCodesMap');\nvar _ = require('lodash');\n\nvar SocketError = createError({ ...
javascript
chosen
[ { "from": "system", "value": "Add alert message reducer format\n" }, { "from": "human", "value": "import _ from 'lodash';\n\nimport {\n OPEN_ALERT_MESSAGE,\n CLOSE_ALERT_MESSAGE,\n} from '../actions/actionTypes';\n\nconst initialState = {\n show: false,\n messages: {\n th: '',\n en: ''...
javascript
chosen
[ { "from": "system", "value": "Update unit test for supported formula\n" }, { "from": "human", "value": "import SUPPORTED_FORMULAS from '../../src/supported-formulas';\n\ndescribe('.SUPPORTED_FORMULAS', () => {\n it('should be defined', () => {\n expect(SUPPORTED_FORMULAS.length).to.eq(391);\...
javascript
chosen
[ { "from": "system", "value": "Refactor [description] property to not require\n" }, { "from": "human", "value": "/**\n * Places.js\n *\n * @description :: TODO: You might write a short summary of how this model works and what it represents here.\n * @docs :: http://sailsjs.org/documentatio...
javascript
chosen
[ { "from": "system", "value": "Use most recent payment when sending final charged to Shopify\n" }, { "from": "human", "value": "import { Mongo } from 'meteor/mongo';\nimport moment from 'moment';\n\nconst Payments = new Mongo.Collection('payments');\n\nPayments.refund = (orderId) => {\n if (orde...
javascript
chosen
[ { "from": "system", "value": "Check the file extension before requiring a test.\n\nMy vim swap files kept getting caught in the test runner so I made the\nchange to only load up .js files.\n" }, { "from": "human", "value": "var fs = require('fs'),\n\tfileModule = require('file'),\n\ttestDir = '/...
javascript
chosen
[ { "from": "system", "value": "Update module to return two different methods for adding the deploy script" }, { "from": "human", "value": "// include flightplan.js\nvar plan = require('flightplan');\n\n// Plan to git deploy via ssh remote\nplan.remote('gitDeploy', function(remote) {\n var webRoo...
javascript
chosen
[ { "from": "system", "value": "Add note about quirk related to build-custom-glclient.sh\n" }, { "from": "human", "value": "angular.module('GLClient.themes', [])\n .factory('Templates', function() {\n var selected_theme = 'default';\n\n return {\n 'home': 'templates/' + selected_...
javascript
chosen
[ { "from": "system", "value": "Update test mockPromt and expected\n" }, { "from": "human", "value": "/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\n\ndescribe('plugin generator', function () {\n beforeEac...
javascript
chosen
[ { "from": "system", "value": "Add non-hot-reload build support for playground\n" }, { "from": "human", "value": "var webpack = require('webpack')\nmodule.exports = {\n context: __dirname,\n entry: [\n \"./index\",\n \"webpack-dev-server/client?http://localhost:8080\",\n ...
javascript
chosen
[ { "from": "system", "value": "Add token authenticated temperature route\n" }, { "from": "human", "value": "'use strict';\n\nconst router = require('express').Router();\nconst temperatureapi = require('../api/temperature');\nconst requiresApiAuthorization = require('../auth/requiresApiAuthorizati...
javascript
chosen
[ { "from": "system", "value": "Fix shared file path config reading\n" }, { "from": "human", "value": "import path from \"path\";\n\nimport config from \"config\";\n\nexport default function findPath(configName) {\n let configRoot = process.env.FILE_PATH || \"files\";\n if (config.paths && confi...
javascript
chosen
[ { "from": "system", "value": "fix(ci): Fix error with elm deployments\n\nNote: this update does not change any user facing code and is related\nto our continuous integration / semantic release process only.\nI am tagging it as \"fix\" so we can continue to test the release process.\n" }, { "from": "...
javascript
chosen
[ { "from": "system", "value": "[lib] Fix bug in multimedia upload\n\n`uploadBlob` expects an array of multimedia, not a single one.\n" }, { "from": "human", "value": "// @flow\n\nimport type { FetchJSON } from '../utils/fetch-json';\nimport type { UploadMultimediaResult } from '../types/media-typ...
javascript
chosen
[ { "from": "system", "value": "Return error message in Code Climate runs\n\nStringifying an Error object results in {} so the formatter was not\nreturning the actual underlying error with the Code Climate formatter.\nThis change returns the error so that they user can take action if an\nanalysis run fails.\n...
javascript
chosen
[ { "from": "system", "value": "Correct minor typo in group-pattern help.\n" }, { "from": "human", "value": "/*:tabSize=2:indentSize=2:noTabs=true:mode=javascript:*/\n\nvar commander = require('commander'),\n path = require('path');\n\nvar version = JSON.parse(require('fs')\n .readFileSync(p...
javascript
chosen
[ { "from": "system", "value": "Add logging for docker debugging\n" }, { "from": "human", "value": "export default {\n \"url\": process.env.CRN_SERVER_URL,\n \"port\": 8111,\n \"location\": process.env.CRN_SERVER_LOCATION,\n \"headers\": {\n \"Access-Control-Allow-Origin\": \"*\...
javascript
chosen
[ { "from": "system", "value": "Support the AutoPagerize in the click event\n" }, { "from": "human", "value": "$(document).ready(function() {\n $('.star').click(function() {\n // Toggle a display of star\n $(this).toggleClass('favorited');\n var isFavorited = $(this).hasClass('favorited'...
javascript
chosen
[ { "from": "system", "value": "Add button full component to shopping list\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport { View, Text, ScrollView, Button } from 'react-native';\nimport axios from 'axios';\n\nimport colors from '../config/colors';\nimport { User...
javascript
chosen
[ { "from": "system", "value": "Reset controller state on didTransition\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n model: function(params) {\n return this.store.find('question', params.id);\n }\n});\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Remove css import, add global styles\n" }, { "from": "human", "value": "import React from \"react\";\nimport { render } from \"react-dom\";\n\nimport { applyRouterMiddleware, Router, Route, browserHistory, IndexRoute } from \"react-router\";\nimport { useScroll } fr...
javascript
chosen
[ { "from": "system", "value": "Use _.transform instead of _.reduce\n" }, { "from": "human", "value": "import _ from 'lodash';\n\nfunction omitUndefined(obj) {\n const result = {};\n _.forOwn(obj, function(value, key) {\n if (_.isPlainObject(value)) {\n result[key] = omitUndefined(value)...
javascript
chosen
[ { "from": "system", "value": "Use callback for dialog API\n" }, { "from": "human", "value": "var ipc = require('electron').ipcMain;\nvar dialog = require('electron').dialog;\n\nmodule.exports.setup = function () {\n ipc.on('open-file-dialog', function (event) {\n var files = dialog.showOpenD...
javascript
chosen
[ { "from": "system", "value": "Remove old route from config\n" }, { "from": "human", "value": "/**\n * Policy Mappings\n * (sails.config.policies)\n *\n * Policies are simple functions which run **before** your controllers.\n * You can apply one or more policies to a given controller, or protect\...
javascript
chosen
[ { "from": "system", "value": "Attach admin policy to actions which create or destroy groups, rooms, or users.\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>" }, { "from": "human", "value": "/**\n * Policies are simply Express middleware functions which run ...
javascript
chosen
[ { "from": "system", "value": "fix(build): Fix template literal issue with underscore templates.\n" }, { "from": "human", "value": "const rollupBabel = require('rollup-plugin-babel');\nconst rollupCommonjs = require('rollup-plugin-commonjs');\nconst rollupNodeResolve = require('rollup-plugin-node...
javascript
chosen
[ { "from": "system", "value": "Add zoom.us and appear.in to blacklist" }, { "from": "human", "value": "// Add your blacklisted sites to this array. Subdomain and TLD are optional and flexible.\n// Should probably be kept in sync with https://github.com/premgane/agolo-twitterbot/blob/master/server...
javascript
chosen
[ { "from": "system", "value": "Load reconstructive.js using an absolute path\n" }, { "from": "human", "value": "/* eslint-env serviceworker */\n\n// This makes a module available named \"reconstructive\"\nimportScripts('reconstructive.js')\n\n// Customize configs (defaults should work for IPWB ou...
javascript
chosen
[ { "from": "system", "value": "Fix SCSS engine error message\n" }, { "from": "human", "value": "'use strict';\n\nvar Engine = require('./engine');\nvar herit = require('herit');\nvar path = require('path');\n\nmodule.exports = herit(Engine, {\n defaults: function () {\n return {\n paths:...
javascript
chosen
[ { "from": "system", "value": "Create infinitediv class and add basic buffer based loading.\n" }, { "from": "human", "value": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Con...
javascript
chosen
[ { "from": "system", "value": "Fix inconsistent rendering in about command\n" }, { "from": "human", "value": "const chalk = require('chalk');\nconst helpers = require('../helpers');\n\nexports.about = function () {\n helpers.printMessage(chalk.green('Welcome to Space CLI'), '- a CLI for space in...
javascript
chosen
[ { "from": "system", "value": "Hide SimpleWorkflow service class from AWS properties\n" }, { "from": "human", "value": "var AWS = require('../core');\n\n/**\n * @constant\n * @readonly\n * Backwards compatibility for access to the {AWS.SWF} service class.\n */\nAWS.SimpleWorkflow = AWS.SWF;\n" ...
javascript
chosen
[ { "from": "system", "value": "Add addComponent method to Entity\n" }, { "from": "human", "value": "const createTransform = require('./transform')\n\nlet entityId = 0\n\nfunction Entity (components, parent, tags) {\n this.id = entityId++\n this.tags = tags || []\n\n this.components = component...
javascript
chosen
[ { "from": "system", "value": "Allow multiple nulls in username\n" }, { "from": "human", "value": "\nexports.up = (knex, Promise) => Promise.all([\n knex.schema.createTableIfNotExists('user', (table) => {\n table.integer('telegram_id')\n .primary();\n table.string('piikki_username')\n...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary value on inline prop\n" }, { "from": "human", "value": "import React from 'react';\nimport { FormattedMessage, FormattedNumber } from 'react-intl';\nimport { Button, Popover, Position, Spinner } from '@blueprintjs/core';\n\nconst SearchFilterCount...
javascript
chosen
[ { "from": "system", "value": "Fix space between title and version select\n" }, { "from": "human", "value": "import theme from '../../theme'\n\nexport default {\n mdContent: {},\n content: {\n position: 'relative',\n },\n markdown: {\n display: 'block',\n },\n actions: {\n float: '...
javascript
chosen
[ { "from": "system", "value": "Fix for enzyme and react 15\n" }, { "from": "human", "value": "\"use strict\";\n/**\n * Webpack frontend test configuration.\n */\nvar path = require(\"path\");\nvar prodCfg = require(\"./webpack.config\");\n\n// Replace with `__dirname` if using in project root.\nv...
javascript
chosen
[ { "from": "system", "value": "Add simple code for time triggering of gauge\n" }, { "from": "human", "value": "\n// Render the environment & partner menus\nrenderEnvironmentMenuItems();\nrenderPartnerMenuItems();\nrenderGaugeRowItems();\n\n// Events binding\nwindow.onhashchange = _handlerRefreshM...
javascript
chosen
[ { "from": "system", "value": "Set attribute of comment frame.\n" }, { "from": "human", "value": "function receiveMessage(event) {\n\tvar commentPath,\n\t\tframeURL;\n\n\t// get url of comment\n\tcommentPath = event.data.commentURL;\n\tframeURL \t= \"https://news.ycombinator.com/\" + commentPath;...
javascript
chosen
[ { "from": "system", "value": "Use jar.lang.Array instead of native as returnvalue\n" }, { "from": "human", "value": "JAR.register({\n MID: 'jar.lang.Object.Object-info',\n deps: ['..', '.!reduce|derive', '..Array!reduce']\n}, function(lang, Obj, Arr) {\n 'use strict';\n\n var reduce ...
javascript
chosen
[ { "from": "system", "value": "Allow update of notification text.\n\nAllows you to update the message in the notification.\r\nI wanted this feature to allow me to show loading percentage in the notification when downloading or uploading data." }, { "from": "human", "value": "var args = _.extend({...
javascript
chosen
[ { "from": "system", "value": "Change level from `advanced` to `advancedSync`\n\nAs per: https://github.com/Nexmo/nexmo-node/pull/232" }, { "from": "human", "value": "require('dotenv').config({path: __dirname + '/../.env'})\n\nconst NEXMO_API_KEY = process.env.NEXMO_API_KEY\nconst NEXMO_API_SECRE...
javascript
chosen
[ { "from": "system", "value": "Throw meaningful exception if table does not exist\n" }, { "from": "human", "value": "// ----------------------------------------------------------------------------\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// ----------------------------------...
javascript
chosen
[ { "from": "system", "value": "Simplify location chooser target route logic\n" }, { "from": "human", "value": "import locations from '../core/locations';\n\nimport View from '../base/view';\n\nimport {trigger} from '../utils/browser';\n\nimport template from '../../templates/location-chooser.ejs'...
javascript
chosen
[ { "from": "system", "value": "Add black and white filter\n" }, { "from": "human", "value": "\"use strict\";\n\n(function() {\n var filters = {\n age: function() {\n this\n .saturation(20)\n .gamma(1.4)\n .vintage()\n .contrast(5)\n .exposure(15)\n ...
javascript
chosen
[ { "from": "system", "value": "Revert \"Add dev tools stuff\"\n\nThis reverts commit 46ebaea0030bdb0b81aa5b6ac343f70a968910b9.\n" }, { "from": "human", "value": "'use strict';\n\nimport { createStore, applyMiddleware, compose } from 'redux';\nimport thunk from 'redux-thunk';\nimport reducer from ...
javascript
chosen