conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add Support for Latest NW.js and Electron" }, { "from": "human", "value": "var app = require('app'); // Module to control application life.\nvar BrowserWindow = require('browser-window'); // Module to create native browser window.\n \nvar mainWindow = null;\n \n \...
javascript
chosen
[ { "from": "system", "value": "Clean up on project deletion.\n\nWhen a project is deleted removed associated files (from tables and db) and scenarios\n" }, { "from": "human", "value": "'use strict';\nimport Joi from 'joi';\nimport Boom from 'boom';\n\nimport db from '../db/';\n\nmodule.exports =...
javascript
chosen
[ { "from": "system", "value": "Add cypress test of /collect/:medium page\n" }, { "from": "human", "value": "/* eslint-disable jest/expect-expect */\nimport { artworkGridRenders } from \"../helpers/artworkGridRenders\"\n\ndescribe(\"/collect\", () => {\n before(() => {\n cy.visit(\"/collect\")...
javascript
chosen
[ { "from": "system", "value": "style: Remove commented out stubs that aren't going to be used for now.\n\nCloses #13. Not implementing alternatives to YAML at the moment as\nthere doesn't seem to be any desire or need for it. If that changes\nthen this can be revisited.\n" }, { "from": "human", "...
javascript
chosen
[ { "from": "system", "value": "Update to make sure hostName exists before trying to act on it. Otherwise it will throw an error." }, { "from": "human", "value": "// Returns true if this is a host that closes *before* it ends?!?!\nmodule.exports.isAnEarlyCloseHost= function( hostName ) {\n return...
javascript
chosen
[ { "from": "system", "value": "Add missing global & var declarations\n" }, { "from": "human", "value": "/* globals JSLang */\n\n$(document).ready(function () {\n $(\".delete.tipTitle\").tipTip({delay: 0, maxWidth: \"200px\", content: JSLang[\"CMD_Delete_Title\"]});\n $(\".search.tipTitle\")...
javascript
chosen
[ { "from": "system", "value": "Leverage the 'exports' option to 'SuperError.subclass()`.\n" }, { "from": "human", "value": "//----------------------------------------------------------------------------------------------------------------------\n// Custom errors\n//\n// @module error.js\n//------...
javascript
chosen
[ { "from": "system", "value": "Add support for jQuery in compatibility mode" }, { "from": "human", "value": "Materialize = {};\n\n// Unique ID\nMaterialize.guid = (function() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }...
javascript
chosen
[ { "from": "system", "value": "Add linkPrefix to links when activated\n" }, { "from": "human", "value": "import React from 'react'\nimport Link from 'react-router/lib/Link'\n\n// Use createClass instead of ES6 class as Babel spews out a ton of code\n// for polyfilling classes which there's no rea...
javascript
chosen
[ { "from": "system", "value": "Add api call to status to return environment variables from container\n" }, { "from": "human", "value": "function getStatus( status ) {\n\treturn {\n\t\tuptime: {\n\t\t\thost: status.uptime,\n\t\t\tservice: status.serviceUptime\n\t\t},\n\t\tpackage: status.state,\n\...
javascript
chosen
[ { "from": "system", "value": "Update MaterialRadio unit test with chai-jquery\n" }, { "from": "human", "value": "\n describe('radio tests', function () {\n\n it('Should have MaterialRadio globally available', function () {\n expect(MaterialRadio).to.be.a('function');\n });\n\n it(...
javascript
chosen
[ { "from": "system", "value": "Correct to pass JSHINT check" }, { "from": "human", "value": "var zheader,version,url;\r\nvar u = \"https://developers.zomato.com/api/\"\r\nvar Zomato = {\r\n init:function (opts) {\r\n if (opts.key!=null) {\r\n zheader = {\r\n Accept : \"text/plain;...
javascript
chosen
[ { "from": "system", "value": "Fix bug where loading dialog continues to show on invalid sessionID in URL\n" }, { "from": "human", "value": "angular.module('dcs.controllers').controller('MainController', ['$scope', '$state', '$stateParams', 'session', '$timeout', '$mdDialog',\n\tfunction($scope, ...
javascript
chosen
[ { "from": "system", "value": "Change content height when resizing.\n" }, { "from": "human", "value": "(function ($) {\n var backgrounds = $('.background .img');\n function changeBackground() {\n var $current = $(backgrounds.filter('.shown')[0]);\n $current.removeClass('shown');\n var ...
javascript
chosen
[ { "from": "system", "value": "Fix API URL for production in case when relative URL used\n" }, { "from": "human", "value": "import url from 'url';\n\nexport const isApiExternal = !!url.parse(__API_URL__).protocol;\nexport const apiUrl = !isApiExternal\n ? `${window.location.protocol}//${window.l...
javascript
chosen
[ { "from": "system", "value": "Simplify check for local.config.js file\n" }, { "from": "human", "value": "import Config from './app-config.module';\nimport './base.config';\n\n/**\n * Optionally include a file\n */\n((_require) => {\n if (_require.keys().find(x => x.indexOf('local.config.js') > ...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary logic on boards list.\n" }, { "from": "human", "value": "module.exports = Z.Region.extend({\n el: 'div.account-page-sidebar-list',\n\n keepEl: true,\n\n view: require('account/views/boards-list'),\n\n events: {\n 'mouseout': 'onMouseOut',\n...
javascript
chosen
[ { "from": "system", "value": "Revert \"rearrange controller to make it more readable\"\n\nThis reverts commit 6f8d4777b150b1b6b157c1cd924de6e9f31f9d14.\n" }, { "from": "human", "value": "(function (angular) {\n\t'use strict';\n\n\tvar app = angular.module('application.main');\n\n\tapp.controller...
javascript
chosen
[ { "from": "system", "value": "Adjust gulp file to watch directories and make changes\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar react = require('gulp-react');\nvar browserSync = require('browser-sync');\nvar runSequence = require('run-sequence');\n\ngulp.task('react', fu...
javascript
chosen
[ { "from": "system", "value": "Use insert for now to salt the passwords\n" }, { "from": "human", "value": "var async = require('async')\nvar mongoose = require('mongoose')\nvar schema = require('../server/schema')\n\nvar jobs = process.argv.slice(2)\nvar fixtureData = readFixtureData()\n\nmongoos...
javascript
chosen
[ { "from": "system", "value": "Add vendor directory to dist\n" }, { "from": "human", "value": "var gulp = require('gulp');\n\nvar clean = require('gulp-clean');\nvar zip = require('gulp-zip');\n\nvar bases = {\n root: 'dist/'\n};\n\nvar paths = [\n 'core/**',\n '!core/data',\n '!core/...
javascript
chosen
[ { "from": "system", "value": "Client: Remove global variable used for debugging\n" }, { "from": "human", "value": "var Backbone = require(\"lib\").Backbone;\nvar utils = require(\"utils\");\n\nvar View = Backbone.View.extend({\n el: \"#top-progress-bar\",\n\n initialize: function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Load movie info from server\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n});\n" }, { "from": "gpt", "value": "import Ember from 'ember';\nimport config from 'polyflix/config/environment';\nimport T...
javascript
chosen
[ { "from": "system", "value": "Send email for out-of-date data-sets\n\nCall the data-sets endpoint and send an emai with the results.\n" }, { "from": "human", "value": "var email = new (require('./emailer'))();\n\nemail.sendEmail('notifications@performance.service.gov.uk', 'email title', 'email b...
javascript
chosen
[ { "from": "system", "value": "Fix path name to payloads.js file" }, { "from": "human", "value": "var items = require('../items'),\n payloads = require('../payload'),\n categories = require('../categories');\n\nvar h5sc = {};\n\nh5sc.items = items;\nh5sc.payloads = payloads;\nh5sc.categorie...
javascript
chosen
[ { "from": "system", "value": "Handle undeifned and null so we do not get an error\n" }, { "from": "human", "value": "/**\n * findValue\n * Finds the value at given path in the specified object.\n *\n * @name findValue\n * @function\n * @param {Object} obj The input object.\n * @param {String} pa...
javascript
chosen
[ { "from": "system", "value": "Add safe knex closing when architect will close" }, { "from": "human", "value": "/*jslint node : true, nomen: true, plusplus: true, vars: true, eqeq: true,*/\n/* \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file exc...
javascript
chosen
[ { "from": "system", "value": "Correct template format of Textarea\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular\n .module('app')\n .directive('propText', TextDirective);\n\n TextDirective.$inject = ['$parse'];\n function TextDirective($parse) {\n var d...
javascript
chosen
[ { "from": "system", "value": "Use hasOwnProperty to decide whether adapters are passed\n" }, { "from": "human", "value": "'use strict';\n\nvar defaultLogAdapter = require('./adapter/logger/winston');\nvar defaultFsAdapter = require('./adapter/fs/fs');\n\nfunction logger(logDirectory, adapters) {...
javascript
chosen
[ { "from": "system", "value": "Add code comment for multiply-by-2 algo\n" }, { "from": "human", "value": "'use strict';\n\n// VARIABLES //\n\nvar MAX_ITER = 1075; // 1023+52 (subnormals)\nvar MAX_BITS = 54; // only 53 bits for fraction\n\n\n// MULT2 //\n\n/**\n* FUNCTION: mult2( x )\n*\tConverts ...
javascript
chosen
[ { "from": "system", "value": "Refactor num iterator for new spec :white_check_mark:\n" }, { "from": "human", "value": "// Number iterator for iterating from 0 to Number\n// http://blog.getify.com/iterating-es6-numbers/comment-page-1/#comment-535319\n\nfunction numberIterator(total, increment = 1...
javascript
chosen
[ { "from": "system", "value": "Fix typo in module name\n" }, { "from": "human", "value": "import {exec} from 'node-promise-es6/child-promise';\nimport fs from 'node-promise-es6/fs';\n\nasync function run() {\n const {linkDependencies = {}} = await fs.readJson('package.json');\n for (const depen...
javascript
chosen
[ { "from": "system", "value": "Fix js on mobile login screen — again!\n\nCloses: CORE-3190\n\nThis time in a way that will still work when webpack minifies it.\n\nThere is some bug in webpack/minify in the prod build where \n`jqueryui/mouse` was not loaded by the time `jquery-ui-touch-punch`\nwas loaded, eve...
javascript
chosen
[ { "from": "system", "value": "Update to the export file.\n" }, { "from": "human", "value": "import EO from 'ember-orbit/main';\nimport Store from 'ember-orbit/store';\nimport Model from 'ember-orbit/model';\nimport RecordArrayManager from 'ember-orbit/record-array-manager';\nimport Schema from '...
javascript
chosen
[ { "from": "system", "value": "Add orientation change to window service\n" }, { "from": "human", "value": "\"use strict\";\n\nvar withObservable = require(\"../common/withObservable\");\nvar debounceUpdateListener = require(\"../common/debounceUpdateListener\");\n\n\nvar windowService = withObser...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix stylesheets issue when changing subtheme\n" }, { "from": "human", "value": "\"use babel\";\n\"use strict\";\n\nimport fs from \"fs\";\nimport path from \"path\";\nimport {CompositeDisposable} from \"atom\";\nimport {name as packageName} from \"../package.j...
javascript
chosen
[ { "from": "system", "value": "Add blur/focus event to text field, add methods to focus and set value\n" }, { "from": "human", "value": "/**\n * @class CM_FormField_Text\n * @extends CM_FormField_Abstract\n */\nvar CM_FormField_Text = CM_FormField_Abstract.extend({\n\t_class: 'CM_FormField_Text'\...
javascript
chosen
[ { "from": "system", "value": "Add better errors to pack\n" }, { "from": "human", "value": "var fs = require('fs');\nvar mkdirp = require('mkdirp');\n\nfunction linkModules(toDir) {\n mkdirp.sync(toDir + '/server_modules');\n copyWebpackModules(toDir);\n}\n\nfunction copyWebpackModules(toDir) {...
javascript
chosen
[ { "from": "system", "value": "Create model name dynamically in Local authenticator\n\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies.\n */\n\nimport { UNAUTHORIZED } from 'http-codes';\nimport models from './models';\n\nmodule.exports = function({ CorePOSTAuthenti...
javascript
chosen
[ { "from": "system", "value": "Update needed for RN 15\n" }, { "from": "human", "value": "'use strict';\n\nvar React = require('react-native');\nvar AdSupportIOS = require('AdSupportIOS');\nvar Dimensions = require('Dimensions');\n\nmodule.exports = {\n getClientId(cb) {\n AdSupportIOS.getAdv...
javascript
chosen
[ { "from": "system", "value": "Update test to match relative paths\n" }, { "from": "human", "value": "describe('apiService', function() {\n var $httpBackend;\n var apiService;\n\n // Initialize `app` module\n beforeEach(module('app'));\n\n // Mock `$httpBackend` requests and store locally wi...
javascript
chosen
[ { "from": "system", "value": "Use bassoradio as temp stream for radiodiodi\n" }, { "from": "human", "value": "var util = require('../src/util/seeds');\n\n\nexports.seed = function(knex, Promise) {\n const cities = {};\n\n return knex('cities').select('*')\n .then(rows => {\n rows.forEach(c...
javascript
chosen
[ { "from": "system", "value": "Move stuff to an order that makes sense" }, { "from": "human", "value": "var util = require('util');\nvar ParentBot = require('../parentBot.js').ParentBot; //change to 'steam-parentbot' if not running from examples directory\n\nvar MySQL = require('mysql'); //requi...
javascript
chosen
[ { "from": "system", "value": "Update router metric to Histogram.\nUse toggleable service label for router metric.\n\nBug: T238658\nBug: T247820\n" }, { "from": "human", "value": "'use strict';\n\nfunction emitMetric(hyper, req, res, specInfo, startTime) {\n let statusCode = 'unknown';\n if...
javascript
chosen
[ { "from": "system", "value": "bugfix: Remove plugins configured with `severity: 0` from reports\n" }, { "from": "human", "value": "var _ = require('lodash');\n\nmodule.exports = function(ast, filePath, plugins) {\n var errors = [],\n warnings = [];\n\n _.each(plugins, function(plugin...
javascript
chosen
[ { "from": "human", "value": "Fix inviteUser and add validLink methods\n" }, { "from": "gpt", "value": "Meteor.methods({\n validLink: function (inviteCode) {\n console.log(inviteCode);\n return !!Invites.findOne({ 'inviteCode': inviteCode, 'accepted': false });\n },\n inviteUser: functio...
javascript
chosen
[ { "from": "system", "value": "Support for listener in component constructor\n" }, { "from": "human", "value": "/**\n * A component\n * @constructor\n * @param {Object} options\n * @param {Element} options.element\n * @param {String} options.name\n */\nhui.ui.Component = function(options) {\n\tth...
javascript
chosen
[ { "from": "system", "value": "Add mark as read button to all link types, including local HN links\n" }, { "from": "human", "value": "HNSpecial.settings.registerModule(\"mark_as_read\", function () {\n function editLinks() {\n var titles = _.toArray(document.getElementsByClassName(\"title\"))...
javascript
chosen
[ { "from": "system", "value": "Update gruntfile with screeps task\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json')\n });\n};\n" }, { "from": "gpt", "value": "module.exports = function(gru...
javascript
chosen
[ { "from": "system", "value": "Fix error reported by jshint\n" }, { "from": "human", "value": "/**\n* Run script for Grunt, task runner\n*\n* The MIT License (MIT)\n* Copyright (c) 2015 GochoMugo <mugo@forfuture.co.ke>\n*/\n\n\nexports = module.exports = function(grunt) {\n \"use strict\";\n\n ...
javascript
chosen
[ { "from": "system", "value": "Make the multiplier return the current volume\nwithout doing any math to it, so we can have different ways to set the multiplier in logarithmic ways.\n" }, { "from": "human", "value": "const Transform = require('stream').Transform;\n\n/**\n * @see https://github.com...
javascript
chosen
[ { "from": "system", "value": "Remove try/catch from event execution\n" }, { "from": "human", "value": "/*\n coveraje - a simple javascript code coverage tool.\n \n EventEmitter wrapper\n \n Copyright (c) 2011 Wolfgang Kluge (klugesoftware.de, gehirnwindung.de)\n*/\n\n(function () ...
javascript
chosen
[ { "from": "system", "value": "Refactor search into node module\n" }, { "from": "human", "value": "var http = require( 'http' );\n\n\nvar errorHandler = function ( err, res ) {\n console.log( err );\n res.send( 500 );\n};\n\n\nexports.trackSearch = function ( req, res ) {\n\n var apiOpti...
javascript
chosen
[ { "from": "system", "value": "Fix typo in class name\n" }, { "from": "human", "value": "const BaseChecker = require('./../base-checker');\n\nclass BaseDecprecation extends BaseChecker {\n constructor(reporter) {\n super(reporter);\n this.active = false;\n this.deprecation...
javascript
chosen
[ { "from": "system", "value": "Return readable message for unar errors\n" }, { "from": "human", "value": "'use strict'\n\nconst path = require('path')\nconst execa = require('execa')\n\nasync function unarchive(location) {\n const temp = path.join(path.dirname(location), '_unarchived')\n\n awai...
javascript
chosen
[ { "from": "system", "value": "Fix issue where errors aren't being propagated.\n" }, { "from": "human", "value": "function DeferredChain() {\n var self = this;\n this.chain = new Promise(function(accept, reject) {\n self._accept = accept;\n self._reject = reject;\n });\n\n this.await = ...
javascript
chosen
[ { "from": "system", "value": "Set key-only command line arguments to true\n" }, { "from": "human", "value": "/* global __dirname */\n\n(function() {\n\t'use strict';\n\n\tvar gruntPath = __dirname + '/../Gruntfile.js',\n\t\tgrunt = require('grunt'),\n\t\tbuild = require(gruntPath);\n\n\tmodule.e...
javascript
chosen
[ { "from": "system", "value": "Fix missing svg bug on chrome\n" }, { "from": "human", "value": "var path = require('path');\n\n// /////////////////////////////////////////////////////////////////////////////\n// ------------------------ Available modules --------------------------------//\n// ---...
javascript
chosen
[ { "from": "system", "value": "Remove unused code in buttonGroupController\n" }, { "from": "human", "value": "ManageIQ.angular.app.controller('buttonGroupController', ['$scope', 'miqService', function($scope, miqService) {\n var init = function() {\n $scope.saveable = miqService.saveable;\n ...
javascript
chosen
[ { "from": "system", "value": "Implement very basic styles using styled-components\n" }, { "from": "human", "value": "import React, {Component} from 'react';\n\n// Footer Component\nconst Footer = () => {\n return(\n <footer>\n <h5>&copy; {new Date().getFullYear()} Austin Lauritsen | Buil...
javascript
chosen
[ { "from": "system", "value": "Add Guest for Mail Receiver.\n" }, { "from": "human", "value": "\"use strict\";\n\n\nconst debug = require(\"debug\")(\"OSMBC:util:initialize\");\nconst async = require(\"async\");\nconst logger = require(\"../config.js\").logger;\n\n\nconst configModule = require(...
javascript
chosen
[ { "from": "system", "value": "Update ViewConfig generator test to follow new ComponentSchema\n\nSummary:\nNOTE: Flow and Jest won't pass on this diff. Sandcastle, should, however, be green on D24236405 (i.e: the tip of this stack).\n\nChangelog: [Internal]\n\n(Note: this ignores all push blocking failures!)...
javascript
chosen
[ { "from": "system", "value": "Add fetch methods for popular and airing today tv shows and data stores to hold results\n" }, { "from": "human", "value": "angular.module('zeus.landing', [])\n .controller('LandingController', function($scope, Landing) {\n $scope.popularmovies = {};\n $scope....
javascript
chosen
[ { "from": "system", "value": "Fix js bug with checked option\n" }, { "from": "human", "value": "(function () {\n Playlist = function () {\n this.key = $(\"#key\");\n this.station = $(\"#station\");\n this.format = $(\":input[name='optionsRadios']:checked\");\n this...
javascript
chosen
[ { "from": "system", "value": "Extend example script to show orientation and taps\n" }, { "from": "human", "value": "#import \"SnapshotHelper.js\"\n\nvar target = UIATarget.localTarget();\nvar app = target.frontMostApp();\nvar window = app.mainWindow();\n\n\ntarget.delay(3)\ncaptureLocalizedScree...
javascript
chosen
[ { "from": "system", "value": "Use onClick in the example.\n" }, { "from": "human", "value": "$(document).ready(function(){\n $(\"#box\").click(function() {\n\t\tfadeoutDivs(\"#box\")\n\t});\n});" }, { "from": "gpt", "value": "$(document).ready(function(){\n $(\"#box\").on(\"cli...
javascript
chosen
[ { "from": "system", "value": "Fix linter errors in example 1.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar rio = require(\"../lib/rio\");\n\n// rio.enableDebug(true);\n// rio.enableRecordMode(true, {fileName: 'dump.bin'});\n// rio.enablePlaybackMode(true, {fileName: 'dump.bin'});\n\...
javascript
chosen
[ { "from": "system", "value": "Add easing function to auto-scroll\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('arethusaTranslateGuiApp').directive('containers', [\n '$timeout',\n function($timeout) {\n return {\n restrict: 'A',\n scope: true,\n link: functio...
javascript
chosen
[ { "from": "system", "value": "Remove unused comments, fix component width\n" }, { "from": "human", "value": "import React from 'react'\nimport ImdbResultsContainer from './ImdbResultsContainer'\n\nconst SearchResults = ({searchResults}) => {\n if (searchResults.searchMovies.error) {\n return...
javascript
chosen
[ { "from": "system", "value": "Use Ember.isEqual to set checked status\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/radio-button';\n\nconst {\n Component,\n computed\n} = Ember;\n\nexport default Component.extend({\n tagName: '',\n ...
javascript
chosen
[ { "from": "system", "value": "Use console.error for extra severity\n" }, { "from": "human", "value": "/*jslint indent:2, white:true, node:true, sloppy:true*/\nvar app = require('express')();\nvar server = require('http').Server(app);\nvar io = require('socket.io')(server);\n\nserver.listen(proce...
javascript
chosen
[ { "from": "system", "value": "Add check for client keys in environment variable\n" }, { "from": "human", "value": "var express = require('express');\nvar path = require('path');\n\nvar index = require('./routes/index');\n\nvar app = express();\n\nif(!process.env.API_KEY){\n console.log('Set the...
javascript
chosen
[ { "from": "system", "value": "Fix bug that send 'unknown' as command name every time\n" }, { "from": "human", "value": "import Mixpanel from 'mixpanel';\nimport path from 'path';\nimport fs from 'fs';\n\nconst mixpanel = Mixpanel.init(process.env.MIXPANEL_TOKEN);\n\nconst commands = [];\n{\n co...
javascript
chosen
[ { "from": "system", "value": "Improve robustness of link utility functions\n\nFixes #321, fixes #323\n" }, { "from": "human", "value": "var url = require('url');\nvar path = require('path');\n\n// Is the link an external link\nvar isExternal = function(href) {\n return Boolean(url.parse(href)...
javascript
chosen
[ { "from": "system", "value": "Restructure GPX according to GPX schema\n" }, { "from": "human", "value": "define(['jquery'], function($) {\n\n\tfunction Gpx(data) {\n\t\tthis.points = [];\n\t\tvar trkpts = data.documentElement.getElementsByTagName(\"trkpt\");\n\t\tfor (var i = 0; i < trkpts.lengt...
javascript
chosen
[ { "from": "system", "value": "Fix title of a support request page" }, { "from": "human", "value": "// @ngInject\nexport default function issueRoutes($stateProvider) {\n $stateProvider\n .state('support', {\n url: '/support/',\n template: '<issues-workspace></issues-workspace>',\n ...
javascript
chosen
[ { "from": "system", "value": "Use only this years week for the 'week' listing\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar app = require('commander')\nvar moment = require('moment')\nvar getLists = require('./lib/get-lists')\nvar printList = require('./lib/print-list')\nvar auth...
javascript
chosen
[ { "from": "system", "value": "Add gulp-connect to serve project\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar gutil = require('gulp-util');\nvar notify = require('gulp-notify');\nvar less = require('gulp-less');\nvar autoprefix = require('gulp-autoprefixer');\nvar minifyCSS...
javascript
chosen
[ { "from": "system", "value": "Fix old production library names... 4a9833c\n" }, { "from": "human", "value": "module.exports = {\n\toptions: {\n\t\tbaseUrl : \"src/app\",\n\t\tmainConfigFile: \"src/app/config.js\",\n\n\t\tname: \"\",\n\t\tout : \"build/tmp/app/main.js\",\n\n\t\tinclude: [ \...
javascript
chosen
[ { "from": "system", "value": "Add monthNames, dayNames and dayNamesShort to picktastic properties\n" }, { "from": "human", "value": "$(picktastic_init);\n\npicktasticProperties = ['dateFormat', 'minDate', 'maxDate', 'firstDay'];\n\nfunction picktastic_init() {\n var addProperty = function(objec...
javascript
chosen
[ { "from": "system", "value": "Use my photo in the twitter view if the tweet does not have one\n" }, { "from": "human", "value": "module('from lib.javascript import Class');\nmodule('import class .View');\nmodule('import lib.dom as dom');\n\nexports.TweetView = Class(View, function(supr) {\n\t\n\...
javascript
chosen
[ { "from": "system", "value": "Add JS function for all numbers & operators\n" }, { "from": "human", "value": "/* global displayer */\nvar calculation = [];\nvar operation = \"\";\nvar result\n\nfunction display() {\n operation = calculation.join(\"\");\n $('#displayer').html(operation)\n}\n...
javascript
chosen
[ { "from": "system", "value": "Fix crash in character tab when race is unknown\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\n\nimport { makeCharacterUrl } from 'interface/common/makeAnalyzerUrl';\n\nco...
javascript
chosen
[ { "from": "system", "value": "Check for callback before execution\n" }, { "from": "human", "value": "'use strict';\nvar fs = require('fs');\nvar request = require('request');\n\nvar USER_AGENT_STRING = 'SubDB/1.0 (subfil/1.1; '\n + 'https://github.com/divijbindlish/subfil)';\n\nvar download = f...
javascript
chosen
[ { "from": "system", "value": "[Glitch] Fix searching for additional hashtags in hashtag column\n\nPort 3f382e337d5c40db18995a88c0bf6b1b34f031b7 to glitch-soc\n\nSigned-off-by: Claire <82b964c50e9d1d222e48cf5046e6484a966a7b07@sitedethib.com>\n" }, { "from": "human", "value": "import { connect } f...
javascript
chosen
[ { "from": "system", "value": "Fix keyToSlice for array/object filter values\n" }, { "from": "human", "value": "'use strict';\nlet juri = require('juri')(),\n\tpattern = /(^|[+\\-:!])(\\w+|\\([^(]+\\))/g;\n\nexports.sliceToKey = (s) => s.type +\n\t(s.join ? '+' + juri.encode(s.join) : '') +\n\t(s...
javascript
chosen
[ { "from": "system", "value": "Improve page not found message.\n\nRemoving the redundant mention to tldr --update because\nnow the tool automatically runs a tldr --update when a page\ndoes not exist\n" }, { "from": "human", "value": "const config = require('./config');\n\nmodule.exports = {\n em...
javascript
chosen
[ { "from": "system", "value": "Make contribution prompt more explicit" }, { "from": "human", "value": "const config = require('./config');\n\nmodule.exports = {\n emptyCache() {\n return `Local cache is empty\nPlease run tldr --update`;\n },\n\n notFound() {\n return `Page not found.\nFe...
javascript
chosen
[ { "from": "system", "value": "Use correct home directory on windows\n" }, { "from": "human", "value": "/*eslint no-sync: 0*/\n'use strict';\n\nvar fs = require('fs');\n\nvar portFile = process.env.HOME + '/.eslint_d_port';\n\nexports.write = function (port) {\n fs.writeFileSync(portFile, String...
javascript
chosen
[ { "from": "system", "value": "Check if markdown rendering is needed or not\n" }, { "from": "human", "value": "require('../css/hjlog.scss');\nrequire('script!jquery');\nrequire('script!semantic-ui/dist/semantic.js');\nrequire('script!./highlight');\nrequire('script!./showdown');\nrequire('script!...
javascript
chosen
[ { "from": "system", "value": "Add minimized version of updated script.\n" }, { "from": "human", "value": "melange.templates.inherit(function(){function k(){c=jQuery(d).text();e=jQuery(f).text()}function l(){var a={mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:true,panControl:true,zoomCo...
javascript
chosen
[ { "from": "system", "value": "Add workaround for IE < 10 which doesn't support `Error.prototype.stack`\n" }, { "from": "human", "value": "/*global define*/\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(...
javascript
chosen
[ { "from": "system", "value": "[Docs] Update comment with correct return value" }, { "from": "human", "value": "/**\n * MessageFilter\n * For now, this only applies to the MainGuild or TestGuild\n *\n * @func messageFilter\n * Deletes/filters messages\n * Returns whether or not a message has b...
javascript
chosen
[ { "from": "system", "value": "Delete all associated printers when an organization is deleted\n" }, { "from": "human", "value": "exports.action = {\n name: 'organizationDelete',\n description: 'Deletes an Organization',\n version: 1,\n inputs: {\n required: [ 'organizationId' ]...
javascript
chosen
[ { "from": "system", "value": "Send full sortProperty to events.onSort\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport compose from 'recompose/compose';\nimport mapProps from 'recompose/mapProps';\nimport getContext from 'recompose/getCon...
javascript
chosen
[ { "from": "system", "value": "Make sure its defined before using it.\n" }, { "from": "human", "value": "// Take the comma separated list for {field} from {item}.{field} and populate the select#{field} box\n// Any of the values in the comma separated list for {field} that doesn't have an option i...
javascript
chosen
[ { "from": "system", "value": "Fix Firefox: no more sending a post when submitting.\n" }, { "from": "human", "value": "$(window).load(function () {\n var Ector = require('ector');\n ector = new Ector();\n var previousResponseNodes = null;\n var user = { username: \"Guy\"};\n var ms...
javascript
chosen
[ { "from": "system", "value": "Allow AWS client against non-https servers\n\nI want to test my application against a \"fake\" local S3. It is not running HTTPS. This change allows me to specify a non-HTTPS connection by passing { protocol: 'http://' } to the client creation as an option." }, { "fro...
javascript
chosen
[ { "from": "system", "value": "Increase Coverage on Front Utils\n" }, { "from": "human", "value": "'use strict';\n\nvar expect = require('chai').expect;\nvar utils = require('../public/javascripts/utils.js');\n\nconsole.log(expect, utils);\n" }, { "from": "gpt", "value": "'use strict'...
javascript
chosen
[ { "from": "system", "value": "Add forgotten prop check on test\n" }, { "from": "human", "value": "/* global request, describe, it, before */\nimport '../../setup'\nimport { app } from '../../../src/lib/app'\n\nconst url = 'http://localhost:8181/api/'\n\ndescribe('app', () => {\n\n before(() => ...
javascript
chosen