conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add logic to separate target from message and recombine message.\n" }, { "from": "human", "value": "var l10n_file = __dirname + '/../l10n/commands/whisper.yml';\nvar l10n = require('../src/l10n')(l10n_file);\nvar CommandUtil = require('../src/command_util').CommandU...
javascript
chosen
[ { "from": "system", "value": "Fix issue where book names weren't being lowercased\n\nThe book name must be lowercased in order to be compared with the query\nstring.\n" }, { "from": "human", "value": "import m from 'mithril';\n\n// The core back-end model consisting of shared functions and data\...
javascript
chosen
[ { "from": "system", "value": "Add IL relevant article body links\n" }, { "from": "human", "value": "$(function() {\n // Body headings\n $('h1.juttuotsikko span.otsikko:last-of-type').each(function() {\n // Some of the center title spans on Iltalehti have manual <br /> elements\n // insid...
javascript
chosen
[ { "from": "system", "value": "Add support for Android back button\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { addNavigationHelpers } from 'react-navigation';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { ...
javascript
chosen
[ { "from": "system", "value": "Allow credentials for CORS requests\n" }, { "from": "human", "value": "HAL.Http.Client = function(opts) {\n this.vent = opts.vent;\n this.defaultHeaders = { 'Accept': 'application/hal+json, application/json, */*; q=0.01' };\n};\n\nHAL.Http.Client.prototype.get = f...
javascript
chosen
[ { "from": "system", "value": "Configure the gatbsy plugin for styled-components\n" }, { "from": "human", "value": "module.exports = {\n siteMetadata: {\n title: `Antonio Rodriguez`,\n },\n plugins: [\n `gatsby-plugin-react-helmet`,\n {\n resolve: `gatsby-plugin-typography`,\n ...
javascript
chosen
[ { "from": "system", "value": "Add more information to the product sale track call\n" }, { "from": "human", "value": "import db from '.';\nimport analytics from '../components/stats';\n\nconst trackProductUsage = transactionProduct => {\n db.Product.findOne({\n where: {\n id:...
javascript
chosen
[ { "from": "system", "value": "Make better message for RunJS not found\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict'\n\nconst path = require('path')\nconst fs = require('fs')\n\nconst SCRIPT_API_PATH = './node_modules/runjs/lib/script.js'\n\ntry {\n fs.accessSync(path.reso...
javascript
chosen
[ { "from": "system", "value": "Revert \"Fix no data error on cde dashboard\"\n" }, { "from": "human", "value": "var saikuWidgetComponent = BaseComponent.extend({\n\n\tupdate : function() {\n\t\tvar myself=this;\n\t\tvar htmlId = \"#\" + myself.htmlObject;\n\t\tif (myself.saikuFilePath.substr(0,1)...
javascript
chosen
[ { "from": "system", "value": "Add version contraints to dependencies to satisfy meteor 0.9.0\n" }, { "from": "human", "value": "Package.describe({\n summary: \"A package that provides easy, editable, static pages\",\n version: \"0.2.0\",\n name: \"hellogerard:voltage\",\n git: \"https://gith...
javascript
chosen
[ { "from": "system", "value": "Update matchParent to new ecs\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = function(ecs, data) {\n\tecs.addEach(function(entity, elapsed) { // eslint-disable-line no-unused-vars\n\t\tvar parent = data.entities.entities[entity.match.id];\n\t...
javascript
chosen
[ { "from": "system", "value": "Test that the video is centered\n\nBy actually comparing the positioning aganist the size of the viewport,\nso not checking some specific css or styling.\n" }, { "from": "human", "value": "/* eslint-env jest */\n\nimport { visit } from './testUtils'\n\ndescribe('Tut...
javascript
chosen
[ { "from": "system", "value": "test: Update up to changes in dependencies\n" }, { "from": "human", "value": "\"use strict\";\n\nconst webmake = require(\"../../../\")\n , pg = require(\"path\").resolve(__dirname, \"../../__playground\");\n\nmodule.exports = function (t, a, d) {\n\twebmake...
javascript
chosen
[ { "from": "system", "value": "Modify presentation of CSS strings\n" }, { "from": "human", "value": "'use strict';\n\nfunction CSSStyleDeclaration(inline) {\n\tif (inline) {\n\t\tinline.trim().split(';').forEach(function(statement) {\n\t\t\tvar parts = statement.split(':');\n\n\t\t\tif (parts.len...
javascript
chosen
[ { "from": "system", "value": "Handle other kinds of empty values\n\nThis lets us wait on false/0/undefined the same way we wait on an empty\narray, give it a second to resolve and then return the value we have.\n" }, { "from": "human", "value": "import { next } from '@ember/runloop';\nimport { s...
javascript
chosen
[ { "from": "system", "value": "Fix ESLint error for no parenthesis for single params\n" }, { "from": "human", "value": "exports.newGame = function newGame(gameId, opponentName, isStarting) {\n return {\n gameId,\n opponentName,\n isStarting,\n };\n};\n\nexports.lengthOfRoom = function ...
javascript
chosen
[ { "from": "system", "value": "Tweak formatting of source code.\n" }, { "from": "human", "value": "// Copyright (c) Rotorz Limited. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root.\n\nexport function isEnvironment(value) {\n return value !== null && ...
javascript
chosen
[ { "from": "system", "value": "Fix tests in test helpers\n" }, { "from": "human", "value": "import {\n introJSNext,\n introJSPrevious,\n introJSExit,\n introJSEnsureClosed,\n introJSCurrentStep } from './../helpers/ember-introjs';\nimport { expect } from 'chai';\nimport { describe, it, befor...
javascript
chosen
[ { "from": "system", "value": "Use ES6 let instead of var\n" }, { "from": "human", "value": "// Define search and replace terms for image src link\nvar search = /s[0-9]+/g;\nvar replace = 's512';\n\nfunction getProfileImageContainer() {\n // Get profile image containers\n return $('#channel...
javascript
chosen
[ { "from": "system", "value": "Add publication for missing mangas\n" }, { "from": "human", "value": "// Send back all owned mangas\nMeteor.publish('allOwnedMangas', function(userId) {\n\treturn Mangas.find({\n\t\t\"user\": userId,\n\t\t\"owned\": true\n\t});\n});\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Fix issues pointed out by JSHint\n" }, { "from": "human", "value": "var \n test = require('tap').test,\n SDNV = require('../index');\n\nvar \n buff = new Buffer([0x0A, 0xBC]), \n sdnv = new SDNV(buff);\n\ntest('make sure a valid buffer results in a valid SNDV', ...
javascript
chosen
[ { "from": "system", "value": "Add method to get admin users.\n" }, { "from": "human", "value": "module.exports = function(r) {\n 'use strict';\n\n return {\n allByProject: allByProject\n };\n\n function allByProject() {\n return r.table('access').run().then(function(all...
javascript
chosen
[ { "from": "system", "value": "Make sure logging is correct\n" }, { "from": "human", "value": "import path from 'path'\nimport colors from 'colors/safe'\nimport server from '../server'\nimport logger from '../helpers/logger'\n\nconst { red, green, cyan, bold } = colors\n\nexport default async ({ ...
javascript
chosen
[ { "from": "system", "value": "Make completion work more logically.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar fs = require('fs');\nvar path = require('path');\nvar tab = require('tabalot');\nvar noop = function() {}\nvar homedir = path.resolve(process.env[(process.platform == ...
javascript
chosen
[ { "from": "system", "value": "Clear module instead of deleting it.\n" }, { "from": "human", "value": "$(document).ready(function() {\n /* Our dummy module.exports is full of s*it. Clear it... */\n delete module;\n\n TRAFFICSIM_APP.utils.logger.log(TRAFFICSIM_APP.utils.logger.LogType.DEB...
javascript
chosen
[ { "from": "system", "value": "Include query string in URL as cache ID.\n" }, { "from": "human", "value": "var Data = require('./data');\nvar data = new Data();\n\nfunction feedPocketPage(req, res) {\n res.render('feedpocket.html', {\n layout: 'layout',\n locals: {\n categories: data....
javascript
chosen
[ { "from": "system", "value": "Move error formatting into validation object\n" }, { "from": "human", "value": "'use strict';\n\n// Load requirements\nconst ajv = require('ajv')({allErrors: true, removeAdditional: 'all'});\n\n// Load our schemas\najv.addSchema(require('./schema/tasks.schema'), 'ta...
javascript
chosen
[ { "from": "system", "value": "Consolidate functions and clean up logic. Change function names to be more descriptive.\n" }, { "from": "human", "value": "/* global SW:true */ \n\nvar getUnassigned = function (assignmentCount) {\n var ticketTotal = 0;\n for (var property in assignmentCount) {\n...
javascript
chosen
[ { "from": "system", "value": ":art: Use package name in protocol to avoid conflicts\n" }, { "from": "human", "value": "/** @babel */\n\nimport { CompositeDisposable } from 'atom';\nimport TerminalView from './terminal-view';\n\nexport default {\n\n disposables: null,\n terminalViews: [],\n\n ...
javascript
chosen
[ { "from": "system", "value": "[api] Make API look like `net.Server`\n" }, { "from": "human", "value": "var ws = require('ws'),\n WebSocketServer = ws.Server;\n\nvar WSProxy = exports.WSProxy = function (options) {\n options || (options = {});\n\n if (!options.target) {\n throw new TypeEr...
javascript
chosen
[ { "from": "system", "value": ":wrench: Tweak img alt in LoginContainer\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\nimport { get } from 'axios';\nimport FlintLogo from 'components/Fli...
javascript
chosen
[ { "from": "system", "value": "Make use of es6 template literals\n" }, { "from": "human", "value": "const join = require('path').join\nconst execSync = require('child_process').execSync\nconst Interactive = require('./interactive')\n\n/**\n * Reads a file glob and a commit message, and commits to...
javascript
chosen
[ { "from": "system", "value": "Make the torch physics bodies tight to the stem of the torch\n\nFixes #75.\n" }, { "from": "human", "value": "'use strict';\n\nclass Switch extends Phaser.Sprite {\n\n constructor(game, x, y, id, switchSound) {\n super(game, x, y, 'switch', 0);\n\n this.id = ...
javascript
chosen
[ { "from": "system", "value": "Change state constants to be more logic\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar SurveySchema = new Schema(\n{\n description : String,\n name : String,\n state : {type : Number,...
javascript
chosen
[ { "from": "system", "value": "Set both jpg and m4v creation dates\n" }, { "from": "human", "value": "const photos = Application('photos');\nconst terminal = Application('terminal');\nconst albums = photos.albums();\n\nconst pad = (val) => String(val).length < 2 ? '0' + val : String(val);\nconst ...
javascript
chosen
[ { "from": "system", "value": "Update underscore dependency to 3.0.0\n" }, { "from": "human", "value": "Package.describe({\n git: 'https://github.com/zimme/meteor-iron-router-active.git',\n name: 'zimme:iron-router-active',\n summary: 'Active route/path template helpers for iron:router',\n ve...
javascript
chosen
[ { "from": "system", "value": "Change status method to pass object instead of nesting it\n" }, { "from": "human", "value": "'use strict';\n\n// Create, restore, list, and get status of koast DB backups\n//\n/**\n * @module koastAdminApp.service/koastBackup\n */\nangular.module('koastAdminApp.sect...
javascript
chosen
[ { "from": "system", "value": "Enable SSL for postgre connection\n" }, { "from": "human", "value": "var fs = require(\"fs\");\nvar path = require(\"path\");\nvar Sequelize = require(\"sequelize\");\nvar env = process.env.NODE_ENV || \"development\";\n//var config = require('../config/sequelize.js...
javascript
chosen
[ { "from": "system", "value": "Use the sync version of mkdirp\n" }, { "from": "human", "value": "/**\n * Module Dependencies.\n */\n\nvar debug = require('debug')('metalsmith-static');\nvar ncp = require('ncp').ncp;\nvar path = require('path');\nvar fsextra = require('fs-extra');\n\n\n/**\n...
javascript
chosen
[ { "from": "system", "value": "Add value conversions to the API\n" }, { "from": "human", "value": "var request = require('request');\r\n\r\nexports.attach = function(app) {\r\n var BASE_URL = 'https://coinbase.com/api/v1/',\r\n EXCHANGE_RATE_ENDPOINT = BASE_URL + 'currencies/exchange_rates...
javascript
chosen
[ { "from": "system", "value": "Fix - ribbon doesn't open contact form\n" }, { "from": "human", "value": "var codebrag = codebrag || {};\n\n/**\n * Module for adding scripts not related with app features and Angular\n */\ncodebrag.addons = {};\n\ncodebrag.addons.betaRibbon = (function() {\n\n v...
javascript
chosen
[ { "from": "system", "value": "Remove href for More submenu header\n" }, { "from": "human", "value": "const submenuItems = [\n {\n header: 'Health',\n items: [\n { title: 'Critical Illness Insurance', url: '/critical-illness-insurance/', },\n { title: 'Vision Insurance', url: '/v...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix `AlminLogger is not constructor`\n" }, { "from": "human", "value": "// @flow\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { Dispatcher, Context } from 'almin'\nimport AppStoreGroup from './store/AppStoreGroup'\nimport SearchApp from...
javascript
chosen
[ { "from": "system", "value": "Change javascript alert to a flash-like thing\n" }, { "from": "human", "value": "// Place all the behaviors and hooks related to the matching controller here.\n// All this logic will automatically be available in application.js.\n// You can use CoffeeScript in this ...
javascript
chosen
[ { "from": "system", "value": "Sort residents by first name for consistency\n" }, { "from": "human", "value": "Template.home.onCreated(function () {\n const instance = this;\n\n // Set current Home ID from router\n instance.homeId = Router.current().params.homeId;\n\n // Subscribe to current ...
javascript
chosen
[ { "from": "system", "value": "Stop propagation of keydown events on modal level.\n" }, { "from": "human", "value": "import { Component } from 'substance'\n\n/**\n ModalDialog component\n\n @class\n @component\n\n @prop {String} width 'small', 'medium', 'large' and 'full'\n\n @example\n\n `...
javascript
chosen
[ { "from": "system", "value": "Refactor to avoid hardcoding model name\n" }, { "from": "human", "value": "var modella = require('modella');\nvar test = require('tape');\n\nvar render = require('./');\n\nvar modelName = 'MyModel';\n\ntest('Model with no attributes', function(t) {\n var model = mo...
javascript
chosen
[ { "from": "system", "value": "Increase entropy of available package\n" }, { "from": "human", "value": "'use strict';\nvar assert = require('assert');\nvar atomName = require('./');\n\nit('should return true when package name is available', function (cb) {\n\tvar name = Math.random().toString(36)...
javascript
chosen
[ { "from": "system", "value": "Implement primitive ls-remote over git proxy." }, { "from": "human", "value": "\nconsole.log(\"Connecting to https://luvit.io through proxy...\");\nconnect(\"tls\", \"luvit.io\", \"443\", function (write) {\n console.log(\"Connected to remote. Sending HTTP request....
javascript
chosen
[ { "from": "system", "value": "Add href to group object in notifications\n" }, { "from": "human", "value": "import gql from 'graphql-tag';\n\nexport default gql`\n fragment NotificationObject on DeedKind {\n __typename\n\n ... on Channel {\n id\n label: title\n href\n v...
javascript
chosen
[ { "from": "system", "value": "Add support for SIMD via selectTypeprototype()\n" }, { "from": "human", "value": "\nvar weml = {\n\tallocateArray: function(size) {\n\t\treturn new Float32Array(size);\n\t},\n};" }, { "from": "gpt", "value": "\nvar weml = {\n\tallocateArray: function(siz...
javascript
chosen
[ { "from": "system", "value": "Add assertion about undefined entitlements property\n" }, { "from": "human", "value": "'use strict';\n\nvar assert = require('assert');\nvar ipaMetadataParser = require('./');\n\ndescribe('should parse .ipa file', function(){\n it('should contain the correct data',...
javascript
chosen
[ { "from": "system", "value": "Disable node/no-deprecated-api for Buffer constructor\n\nThe use is deprecated since Node 6 but we still support Node 4 so we can't replace it yet.\n" }, { "from": "human", "value": "'use strict';\n\nconst debugFinder = require('./');\nconst assert = require('assert...
javascript
chosen
[ { "from": "system", "value": "[form-builder] Fix some issues with Slate drag plugin for outside content\n" }, { "from": "human", "value": "function onDrop(event, data, state, editor) {\n if (data.type !== 'node') {\n return\n }\n let {target} = data\n const {isInternal, node} = data\n le...
javascript
chosen
[ { "from": "system", "value": "Use the real registry, and set debug = true by default\n" }, { "from": "human", "value": "exports.keys = [ \"super duper secrets go here!\" ]\n\nexports.port = 15443\n\nexports.cluster = { size : require(\"os\").cpus().length }\n\n// redis auth \nexports.redis = { h...
javascript
chosen
[ { "from": "system", "value": "Improve performance of if block\n" }, { "from": "human", "value": "// Handles the setup of the routes within the app.\n\n// Sets the root the the 'body' tag\nBlazeLayout.setRoot('body');\n\n// Sets the index to automatically render either dashboard or the main page ...
javascript
chosen
[ { "from": "system", "value": "Fix for angular-jwt injecting authorization header\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('mean.admin').controller('ThemesController', ['$scope', 'Global', '$rootScope', '$http',\n function($scope, Global, $rootScope, $http) {\n ...
javascript
chosen
[ { "from": "system", "value": "tests: Make compartible with QUnit 2\n\nChange-Id: I726d7f75e37a759e1b1f6372710cb06f754fc94b\n" }, { "from": "human", "value": "( function ( $, mw ) {\n\tQUnit.module( 'Thanks mobilediff' );\n\n\tQUnit.test( 'render button for logged in users', 1, function ( assert ...
javascript
chosen
[ { "from": "system", "value": "Add more tests for event address formatting\n" }, { "from": "human", "value": "import 'angular-mocks';\n\ndescribe('Filter: eventAddressFormat', () => {\n var filter;\n\n beforeEach(() => {\n angular.mock.module('confRegistrationWebApp');\n\n inject($injecto...
javascript
chosen
[ { "from": "system", "value": "Update tests for same validation" }, { "from": "human", "value": "import EmberObject from '@ember/object';\nimport { A } from '@ember/array';\nimport validator from 'ember-legit-forms/validators/same-validator';\nimport validatorObject from 'ember-legit-forms/utils/...
javascript
chosen
[ { "from": "system", "value": "Revert changes that broke everything\n" }, { "from": "human", "value": "vars = require('./vars');\ndash_button = require('node-dash-button');\nnest = require('unofficial-nest-api');\n\nvar dash = dash_button(vars.AMAZON_DASH_BUTTON_MAC);\n\nconsole.log(\"Nest API Co...
javascript
chosen
[ { "from": "system", "value": "Return cancelers from Aff actions\n" }, { "from": "human", "value": "'use strict';\n\nvar pg = require('pg');\n\nexports.newPool = function(config) {\n return function(onSuccess, onError) {\n onSuccess(new pg.Pool(config));\n };\n};\n\nexports.withConne...
javascript
chosen
[ { "from": "system", "value": "[skip ci] Fix rootURL in production 🔨\n" }, { "from": "human", "value": "/* eslint-env node */\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'dummy',\n environment,\n rootURL: '/',\n locationType: 'auto',\n ...
javascript
chosen
[ { "from": "system", "value": "Add support for Firefox & IE9\n" }, { "from": "human", "value": "if (typeof jQuery!=='undefined') {\n\t(function($) {\n\t\tvar iframe = $('#Iframepage-iframe');\n\t\tvar loading = $('#Iframepage-loading');\n\n\t\t// Add not-ready marker for third party use.\n\t\tifr...
javascript
chosen
[ { "from": "system", "value": "Make sure the viewArgs array is never null\n" }, { "from": "human", "value": "jsio('from common.javascript import Singleton')\n\nexports = Class(function() {\n\t\n\tthis.init = function() {\n\t\tthis._viewConstructors = {}\n\t}\n\t\n\tthis.registerView = function(vi...
javascript
chosen
[ { "from": "system", "value": "Protip: Use parentheses when you want to call a JS function.\n" }, { "from": "human", "value": "class CharCounter {\n constructor(input, counter, limit = 250) {\n this.input = input\n this.counter = counter\n this.limit = limit\n\n this.updateCounter()\...
javascript
chosen
[ { "from": "system", "value": "Fix a Flow type annotation in ValidationError\n" }, { "from": "human", "value": "/**\n * Node.js API Starter Kit (https://reactstarter.com/nodejs)\n *\n * Copyright © 2016-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT...
javascript
chosen
[ { "from": "system", "value": "Prepare for two-factor auth scenarios\n" }, { "from": "human", "value": "export default function makeAuthActions (feathersClient) {\n return {\n authenticate (store, data) {\n const { commit, state, dispatch } = store\n\n commit('setAuthenticatePending...
javascript
chosen
[ { "from": "system", "value": "Enable lookup via enter and click.\n" }, { "from": "human", "value": "$(document).ready(function() { \n // On Click, lookup address.\n $('#lookup-submit').click(function() {\n var street = $('#lookup-street').val();\n var zip = $('#lookup-zip').val();\n ...
javascript
chosen
[ { "from": "system", "value": "Fix tests failing on ProcessingInstruction nodes not having proper Node interface.\n" }, { "from": "human", "value": "// This implements a minimum fake window object constructor that is sufficient\n// to test constructing a DOM Tree for cue content.\nmodule.exports ...
javascript
chosen
[ { "from": "system", "value": "Fix scrolling when embedded inside an IFRAME.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar Typewriter = require(\"../node_modules/typewriter.js/src/typewriter\");\n\nclass Writer {\n constructor(args) {\n this.lines = args.lines || [];\n }\n\n sta...
javascript
chosen
[ { "from": "system", "value": ":new: Add a placeholder updateMeta method\n" }, { "from": "human", "value": "'use babel'\n\nimport {CompositeDisposable, Emitter} from 'atom'\nimport {aggressiveDebounce} from './helpers'\n\nexport default class Editor {\n constructor(textEditor, connection) {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unused parameters and variables\n" }, { "from": "human", "value": "// Copyright 2015 Yahoo! Inc.\n// Copyrights licensed under the Mit License. See the accompanying LICENSE file for terms.\n\nvar CoreBase = require('preceptor-core').Base;\n\nvar Image = requi...
javascript
chosen
[ { "from": "system", "value": "Fix bug where force-refreshing a PeriodicRefresher engaged timer\n" }, { "from": "human", "value": "import {autobind} from 'core-decorators';\n\nconst refreshMapPerUniqueId = new WeakMap();\n\nexport default class PeriodicRefresher {\n refresh() {\n this._callba...
javascript
chosen
[ { "from": "system", "value": "Make temporary input box invisible\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n charClass: 'hidden-emoji-char',\n\n copyText(text) {\n let copied;\n let input = Ember.$('<input>');\n this.$().a...
javascript
chosen
[ { "from": "system", "value": "Copy the public root files properly\n" }, { "from": "human", "value": "var path = require('path');\n\nmodule.exports = {\n 'assets': {\n 'files': [\n {\n 'expand': true,\n 'cwd': path.join(process.cwd(), 'app/assets'),\n 'src': '**/*',\...
javascript
chosen
[ { "from": "system", "value": "Add block ui to ajax call for signing up to a session\n" }, { "from": "human", "value": "var studentSignUp = function(timeslot_id){\n $(\"#modal_remote\").modal('hide');\n $.ajax({\n type: \"PATCH\",\n url: \"/api/timeslots/\" + timeslot_id\n }).done(...
javascript
chosen
[ { "from": "system", "value": "Add live url for iD Editor\n" }, { "from": "human", "value": "'use strict';\n/*\n * App config for production.\n */\nmodule.exports = {\n environment: 'production',\n api: 'http://localhost:4000',\n iDEditor: 'http://localhost:8080',\n mbtoken: 'pk.eyJ1IjoiZGV2c...
javascript
chosen
[ { "from": "system", "value": "Use jQuery 1.9.0 for CI\n" }, { "from": "human", "value": "steal.config({\n\tmap: {\n\t\t\"*\": {\n\t\t\t\"jquery/jquery.js\" : \"jquery\",\n\t\t\t\"can/util/util.js\": \"can/util/jquery/jquery.js\"\n\t\t}\n\t},\n\tpaths: {\n\t\t\"jquery\": \"can/lib/jquery.1.8.3.js...
javascript
chosen
[ { "from": "system", "value": "Replace testing paremeters and implement Routing methods of the FOSJsBundle\n" }, { "from": "human", "value": "$(document).ready(function() {\n $('.crud-delete').click(function() {\n $('#entity-delete .btn-danger').attr('data-id', $(this).attr('data-id'));...
javascript
chosen
[ { "from": "system", "value": "Use non-template literals for node v0.12 builds.\n" }, { "from": "human", "value": "import babel from 'rollup-plugin-babel';\nimport multiEntry from 'rollup-plugin-multi-entry';\n\nexport default {\n entry: 'test/**/*_test.js',\n plugins: [babel(), multiEntry()],\...
javascript
chosen
[ { "from": "system", "value": "Add LICENSE into xpi archive\n\nThis ensures that a copy of the license is included to everyone to whom\nthe addon is distributed.\n" }, { "from": "human", "value": "const fs = require(\"fs\");\nconst archiver = require(\"archiver\");\n\nconst prefix = \"windows_tas...
javascript
chosen
[ { "from": "system", "value": "Add functions to create a multisignature transaction and a funding transaction to the multisignature address\n" }, { "from": "human", "value": "angular.module('scratchApp')\n .factory('PaymentChannel', [ function() {\n\n /*\n BitcoinJS is availa...
javascript
chosen
[ { "from": "system", "value": "Add real uuid for fixtures\n" }, { "from": "human", "value": "/* @flow */\nimport Moment from 'moment';\nimport type { Poster } from '../types';\n\n\n// State\ntype State = {\n posters: Array<Poster>\n}\n\nconst initialState: State = {\n posters: [\n {\n k...
javascript
chosen
[ { "from": "system", "value": "Shell: Add plugin src dirs into search path to pick up .js files in dev\n" }, { "from": "human", "value": "// Set default paths to the plugin dirs\nImporter.defaultPaths = ['js/src', 'build/default/plugins/sqlite3', \n 'build/default/plugins/curl', 'build/default/p...
javascript
chosen
[ { "from": "system", "value": "Make Fields type more concrete." }, { "from": "human", "value": "/* @flow */\n\nimport type { Decoder, Decode } from \"./Decoder\"\nimport { Error, TypeError, ThrownError } from \"./Error\"\nimport { FieldError } from \"./Field\"\nimport * as Variant from \"./Decode...
javascript
chosen
[ { "from": "system", "value": "Make playlistId optional for YouTube list\n" }, { "from": "human", "value": "const youtubeShortcode = require('./youtube-shortcode.js');\n\nmodule.exports = function youtubeListShortCode (data) {\n return `\n${data.host == undefined ? '' : `<h2>${data.host}</h2>`...
javascript
chosen
[ { "from": "system", "value": "Implement Object schema toJSON function.\n" }, { "from": "human", "value": "var schema = require('../schema')\n\nvar ObjectSchema = module.exports = function(object) {\n this.reference = {}\n \n for (var property in object) this.reference[property] = schema(objec...
javascript
chosen
[ { "from": "system", "value": "Revert pageview logic, as behaviour flow was no longer visible\n" }, { "from": "human", "value": "require('./css/main.css');\nrequire('babel-polyfill');\n\nvar angular = require('angular');\n\nangular.module('app', [require('angular-sanitize'), require('angular-rout...
javascript
chosen
[ { "from": "system", "value": "Store Async actions in a queue\n-eliminates use of setTimeout to schedule async actions\n" }, { "from": "human", "value": "const endAsync = () => {\n return { type: 'ASYNC_INACTIVE' };\n};\n\nlet queuedActions = 0;\n\nconst callAsync = (dispatchFn, delay = 500, dis...
javascript
chosen
[ { "from": "system", "value": "Add posts state and inject service to PostsCtrl.\n" }, { "from": "human", "value": "var app = angular.module('codeLinks', ['ui.router']);\napp.config([\n '$stateProvider',\n '$urlRouterProvider',\n function($stateProvider, $urlRouterProvider) {\n $st...
javascript
chosen
[ { "from": "system", "value": "Switch PWI to use plugin container\n" }, { "from": "human", "value": "pwi_form = function() {\nvar $viewerSelected = 'fancybox',\nsettings = {\n username: 'brianc@palaver.net',\n popupPlugin: $viewerSelected,\n showPhotoDownload: true,\n ...
javascript
chosen
[ { "from": "system", "value": "Store factory method instead of transport instance in TransportProvider\n" }, { "from": "human", "value": "'use strict';\n\nvar EventEmitter = require('events').EventEmitter;\nvar AbstractTransport = require('./abstract_transport.js');\nvar NetTransport = require('....
javascript
chosen
[ { "from": "system", "value": "Hide app when focus is lost.\n" }, { "from": "human", "value": "var gui = global.window.nwDispatcher.requireNwGui();\nvar win = gui.Window.get();\n\nvar tray = new gui.Tray({title: 'IHC'});\nvar menu = new gui.Menu();\nmenu.append(new gui.MenuItem({ label: 'Show' })...
javascript
chosen
[ { "from": "system", "value": "Add SweetAlert for authentication errors\n" }, { "from": "human", "value": "import Ember from 'ember';\n\n/**\n * This is the basic route to handle all routes that needs authentication.\n * If there's a route that needs previous auth, it will need to extend this one...
javascript
chosen
[ { "from": "system", "value": "Add username to lrs activities\n" }, { "from": "human", "value": "'use strict';\n\nconst Microservices = require('../configs/microservices');\n\nmodule.exports = {\n\n actor: function(user) {\n return {\n objectType: 'Agent',\n // name: user.username,\...
javascript
chosen
[ { "from": "system", "value": "Add Unit Tests for Check Status Helper\n" }, { "from": "human", "value": "import assert from 'assert'\n\nimport { promiseSerial } from '../nitro.sdk/helpers/promise.js'\n\ndescribe('helpers', function() {\n describe('promiseSerial', function() {\n it('should run...
javascript
chosen
[ { "from": "system", "value": "Add JSDoc comments to explain what's going on\n" }, { "from": "human", "value": "/**\n * Checks if the page title contains the given value.\n *\n * ```\n * this.demoTest = function (client) {\n * browser.assert.titleContains(\"Nightwatch\");\n * };\n * ``...
javascript
chosen
[ { "from": "system", "value": "Make .git dir w 777 permissions" }, { "from": "human", "value": "var fs = require('fs');\n\nvar init = exports.init = function(repoDir) {\n fs.mkdirSync(gitDir);\n var gitDir = (repoDir || \".\") + \".git/\";\n};\n" }, { "from": "gpt", "value": "var fs...
javascript
chosen
[ { "from": "system", "value": "Implement plugin for HTTPS validation\n" }, { "from": "human", "value": "/**\n * @file\n * Config example for Yandex opensearch.xml file\n */\nmodule.exports = {\n reporter: 'text',\n noColors: false,\n suppress: [\n {level: 'error', text: 'Unexpecte...
javascript
chosen