conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add test for progress bar\n"
},
{
"from": "human",
"value": "/* eslint-env jest */\nimport React from 'react';\nimport { shallow } from 'enzyme';\n\nimport ProgressBar from './../ProgressBar';\n\nconst REQUIRED_PROPS = {\n delay: 5000,\n isRunning: true,\n closeT... | javascript | chosen |
[
{
"from": "system",
"value": "Add update to period scheudle helper method\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport Realm from 'realm';\n\nexport class PeriodSchedule extends Realm.Object {\n getUseablePeriodsForProgram(pro... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary variable assignment in blueprint\n"
},
{
"from": "human",
"value": "module.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function() {\n var that = this;\n \n return this.addBowerPackageToProject('select2');\n }\n};\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix title comment on Italian locale js\n"
},
{
"from": "human",
"value": "/**\n * Uruguayan spanish translation for bootstrap-wysihtml5\n */\n(function($){\n $.fn.wysihtml5.locale[\"it-IT\"] = {\n font_styles: {\n normal: \"Testo normale\",\n... | javascript | chosen |
[
{
"from": "system",
"value": "Attach GitHubPolyglot to root and remove this.init()\n"
},
{
"from": "human",
"value": "// This file generates the client script\n// Dependencies\nvar Fs = require(\"fs\")\n , GitHubColors = require(\"github-colors\")\n , UglifyJS = require(\"uglify-js\")\n ;\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Prepend right copyright to the passed content\n"
},
{
"from": "human",
"value": "// This file is used by the AMD web builder service.\n// When the micro modules are used the version is pulled as a text module.\n// When building with r.js we need to replace the versi... | javascript | chosen |
[
{
"from": "system",
"value": "Check for captureStackTrace existence before calling it\n"
},
{
"from": "human",
"value": "var util = require('util');\n\n\nvar APIError = function(name, message, status, requestInfo, originalError){\n this.name = name || this.constructor.name || this.constructor.p... | javascript | chosen |
[
{
"from": "system",
"value": "Move component actions to the bottom of the file\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst {\n computed,\n defineProperty\n} = Ember;\n\nexport default Ember.Component.extend({\n classNames: ['f-default__row'],\n\n model: null,\n ty... | javascript | chosen |
[
{
"from": "system",
"value": ":new: Add a proper getParents helper\n"
},
{
"from": "human",
"value": "'use babel'\n\n/* @flow */\n\nexport function getParents() {\n const parents = []\n\n return parents\n}\n"
},
{
"from": "gpt",
"value": "'use babel'\n\n/* @flow */\n\nexport functi... | javascript | chosen |
[
{
"from": "system",
"value": "Remove scroll list's load more button\n\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { map } from \"lodash-es\";\nimport { Button } from \"react-bootstrap\";\nimport { LoadingPlaceholder } from \"./index\";\n\nexport class ScrollList exten... | javascript | chosen |
[
{
"from": "system",
"value": "Add click and retrieve API data.\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react';\n// import NavBar from './NavBar';\n\nexport default class App extends Component {\n constructor(){\n super()\n this.state = {\n location:'',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use trailing slashes for angular routing urls\n\nCurrently angular js still strips the trailing slashes from the url. With\nangular 1.3 this cane be changed via a resourceProvider.\n"
},
{
"from": "human",
"value": "// -*- coding: utf-8 -*-\n//\n// (c) 2014 Bjoern R... | javascript | chosen |
[
{
"from": "system",
"value": "Use finish event listening instead of overriding res.end()\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar extend = require('obj-extend');\nvar Lynx = require('lynx');\n\nmodule.exports = function expressStatsdInit (options) {\n options = ex... | javascript | chosen |
[
{
"from": "system",
"value": "Improve nbsp position regexp for numbers and punctuation\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar execall = require('regexp.execall'),\n unicode = require('unicoderegexp'),\n merge = unicode.spliceCharacterClassRegExps;\n\n\nvar alphanumeric = m... | javascript | chosen |
[
{
"from": "system",
"value": ":memo: Add JSDoc to Schedule function\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Promise = require('bluebird');\nconst _ = require('lodash');\n\nconst utils = require('./utils');\nconst database = require('../database');\n\n/*\n * Schedule content sun... | javascript | chosen |
[
{
"from": "system",
"value": "Input: Fix movement using the \"S\" key to go down (typo!)\n"
},
{
"from": "human",
"value": "var Player = Entity.extend({\n init: function() {\n this._super();\n\n this.width = 32;\n this.height = 18;\n\n this.setCoord(9, 2);\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change how the winning and achievement handling\n"
},
{
"from": "human",
"value": "var ywtgapp = angular.module(\"ywtgapp\",[])\n .controller(\"ywtgController\", function($scope, $interval){\n $scope.youwin=\"You win!\";\n $scope.counter=0;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"temporary fix for lightbox interruption of animation\"\n\nThis reverts commit 8d55ec105855a6c48a9aaea6509a7dc59fdd3240.\n"
},
{
"from": "human",
"value": "// page refresh always brings user to top of page\n$(window).on('beforeunload', function() {\n $(wi... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for overriding global metaData\n"
},
{
"from": "human",
"value": "var request = require('./request');\nvar config = require('./config');\nvar notifierVersion = require('./version').notifierVersion;\n\nfunction merge(target, obj) {\n for (var key in obj)... | javascript | chosen |
[
{
"from": "system",
"value": "Update e-mail address to info@\n"
},
{
"from": "human",
"value": "var message = \"\";\n\n$(\"#sendMessage\").on(\"click\", function() {\n message = $(\"#contactform\").serialize();\n $.ajax({\n url: \"//formspree.io/robin.soubry@gmail.com\", \n m... | javascript | chosen |
[
{
"from": "system",
"value": "Use require.resolve to get path to sails.io.js file\n"
},
{
"from": "human",
"value": "/**\n * sails-generate-sails.io.js\n *\n * Usage:\n * `sails generate sails.io.js`\n *\n * @description Generates a sails-generate-sails.io.js\n * @help See http://links.sailsjs.o... | javascript | chosen |
[
{
"from": "system",
"value": "Stop inserting semicolons during concat\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n concat: {\n options: {\n separator: ';',\n },\n dist: {\n src: ['lib/osteo.js', 'lib/*.js'],\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix build errors when using optional switches.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n //\"use strict\"; \n //This is disabled because it's picking up octal literal notation that is quoted in a string.\n \n //usage: grunt ... | javascript | chosen |
[
{
"from": "system",
"value": "Support compilation JS & CSS\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.loadNpmTasks('grunt-babel');\n\n grunt.initConfig({\n babel: {\n options: {\n sourceMap: true\n },\n dist: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "fix(getConfig): Return empty string when a config entry is not defined\n"
},
{
"from": "human",
"value": "import childProcess from 'child_process'\nimport {promisify} from 'util'\n\nconst exec = promisify(childProcess.exec)\n\nexport default async function (name) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add tasks (script-build & style-build)\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n 'use strict';\n\n var config = require('./grunt_tasks/config');\n grunt.config.init(config);\n\n var packages = grunt.file.readJSON('./package... | javascript | chosen |
[
{
"from": "system",
"value": "Hide the Contract details when the selected point changes\n"
},
{
"from": "human",
"value": "angular.module(\"yds\").controller(\"TrafficCountsController\", [\"$scope\", \"$timeout\", \"DashboardService\",\n function ($scope, $timeout, DashboardService) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use current version as default range with fallback to a new version\n"
},
{
"from": "human",
"value": "const fs = require( 'fs' );\nconst path = require( 'path' );\n\nconst DEFAULT_CONFIG = {\n extends: 'kokarn'\n};\nconst DEFAULT_TEST_COMMAND = 'eslint *.js';\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Add newline to end of file\n"
},
{
"from": "human",
"value": "/**\n * Module dependencies.\n */\nimport fs from 'fs';\n\nexport function createReadStream( ...args ) {\n\treturn fs.createReadStream( ...args );\n}"
},
{
"from": "gpt",
"value": "/**\n * Mod... | javascript | chosen |
[
{
"from": "system",
"value": "Change functions removed from Details factory to run from new Reviews Factory\n"
},
{
"from": "human",
"value": "angular.module('zeus.editReview', [])\n.controller('editReviewController', function($location, $stateParams, Details) {\n var EditReviewVm = this;\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Decrease high timeout in ci\"\n\n0e16b3547b7134e032885053ddac97cb85cb7ee2\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('./webpack.config');\n\nprocess.env.CHROME_BIN = require('puppeteer').executablePath();\n\nmodule... | javascript | chosen |
[
{
"from": "system",
"value": "Allow API config to be specified in user configuration\n"
},
{
"from": "human",
"value": "import client from '@sanity/client-next'\nimport getUserConfig from './getUserConfig'\n\n/**\n * Creates a wrapper/getter function to retrieve a Sanity API client.\n * Instead ... | javascript | chosen |
[
{
"from": "system",
"value": "Add getMentor and getMentors functions\n"
},
{
"from": "human",
"value": "app.controller('SearchController', ['$http', '$mdDialog', function($http, $mdDialog) {\n console.log('SearchController running');\n var self = this;\n\n self.mentors = [];\n\n self.newSear... | javascript | chosen |
[
{
"from": "system",
"value": "Move messagesReducer into it's own reducer\n"
},
{
"from": "human",
"value": "import { ADD_MESSAGE } from './actionTypes'\n\nconst initialState = {\n messages: []\n}\n\nexport default function MainReducer(state = initialState, action) {\n switch (action.type) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Correct ACE class name in subscibe config\n"
},
{
"from": "human",
"value": "/*jslint browser: true, undef: true *//*global Ext*/\nExt.define('JarvusAceDemo.view.editor.Panel', {\n extend: 'Ext.Panel',\n xtype: 'editor-panel',\n\n requires: [\n 'Jarv... | javascript | chosen |
[
{
"from": "system",
"value": "Return PENDING from 'getTestResult' if mainBrick has no testOutput\n"
},
{
"from": "human",
"value": "import { testColors } from '../components/constants'\n\nexport const FAILING = 'failing'\nexport const PASSING = 'passing'\nexport const PENDING = 'pending'\n\nexpo... | javascript | chosen |
[
{
"from": "system",
"value": "Allow `id` to be passed by default\n\nIt seems rather common that you want to assign an id and since it's a generic prop it cannot hurt to allow it to always pass through."
},
{
"from": "human",
"value": "/* @flow weak */\nimport { createElement, PropTypes } from 'r... | javascript | chosen |
[
{
"from": "system",
"value": "Set default value for complete.\n"
},
{
"from": "human",
"value": "import Model from 'ember-data/model';\nimport {belongsTo, hasMany} from 'ember-data/relationships';\nimport attr from 'ember-data/attr';\n\n\nexport default Model.extend({\n\n show: belongsTo('sho... | javascript | chosen |
[
{
"from": "system",
"value": "Allow forcing CE polyfill via script.\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.tx... | javascript | chosen |
[
{
"from": "system",
"value": "Fix other devices not moving to loading page\n"
},
{
"from": "human",
"value": "class LobbyController {\n constructor($scope, $state, $stateParams, SocketService) {\n 'ngInject';\n\n this.$state = $state;\n this.SocketService = SocketService;\n this.roo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bad reference to host node\n\nAlso store the host as a instance property to avoid calling into\nAttribute every scroll\n"
},
{
"from": "human",
"value": "/*jshint browser:true, yui:true */\nYUI.add(\"plugin-lazy-images\", function(Y) {\n \"use strict\";\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove obsolete code and re-enable selecting projects\n"
},
{
"from": "human",
"value": "$(function() {\n\n // Unhover on add hover\n $('.project .menu .add').hover(function() {\n $('.project .menu ul li').removeClass('hover');\n }, function() {});\n\n // Edi... | javascript | chosen |
[
{
"from": "system",
"value": "Add a basic controller for each view\n"
},
{
"from": "human",
"value": "angular.module('starter.controllers', [])\n\n.controller('AppCtrl', function($scope, $ionicModal, $timeout) {\n // Form data for the login modal\n $scope.loginData = {};\n\n // Create the log... | javascript | chosen |
[
{
"from": "system",
"value": "Change repo back to app\n\nShouldn't have comitted that change\n"
},
{
"from": "human",
"value": "import './main.scss';\n\n/* eslint indent: 0 */\nconst template = [\n '<div>',\n '<header class=\"section\"></header>',\n '<highlights class=\"section\"></highli... | javascript | chosen |
[
{
"from": "system",
"value": "Fix expose API host env\n"
},
{
"from": "human",
"value": "module.exports = {\n /*\n ** Headers of the page\n */\n head: {\n title: 'client',\n meta: [\n { charset: 'utf-8' },\n { name: 'viewport', content: 'width=device-width, initial-scale=1' }... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Code climate doesn't understand `off`\"\n"
},
{
"from": "human",
"value": "module.exports = {\n 'extends': 'airbnb',\n 'rules': {\n 'no-console': 0,\n 'indent': ['error', 4],\n 'prefer-const': 'off',\n 'comma-dangle': ['err... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error causing degraded performance\n"
},
{
"from": "human",
"value": "Template.header.helpers({\n displayRegister: function () {\n if (Meteor.user().profile) {return \"none\";}\n }\n})\n\nTemplate.heading.helpers({\n heading: function () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add answer hint to the console.log\n"
},
{
"from": "human",
"value": "class GameboardController {\n constructor(Game, GlobalEvents) {\n 'ngInject';\n\n this.currentAnswer = '';\n this.currentMangledWord = Game.currentWord.mangled;\n this.game = Game;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix regex when no date is specified in the url, thx @kashike\n"
},
{
"from": "human",
"value": "$(function() {\n var moving = false;\n var availableDays = JSON.parse($('#available-log-days').text());\n var $dateInput = $('#log-date');\n $dateInput.datepi... | javascript | chosen |
[
{
"from": "system",
"value": "Make Jobqueue view start collapsed\n\nThis makes for a better overview if you have a lot of queues and jobs.\n"
},
{
"from": "human",
"value": "$(function () {\n $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle the case when pathSuffix is falsey\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { inject as service } from '@ember/service';\nimport config from '../config/environment';\n\nexport default Ember.Route.extend({\n queryParams: {\n rd... | javascript | chosen |
[
{
"from": "system",
"value": "Change public event to event list.\n"
},
{
"from": "human",
"value": ";(function(){\n angular.module('flockTogether', ['ngRoute'], function($routeProvider, $httpProvider) {\n $routeProvider\n .when('/', {\n templateUrl: 'partials/public_event_list.... | javascript | chosen |
[
{
"from": "system",
"value": "Change where legacy outputs to in order to match current components.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n 'use strict';\n\n grunt.initConfig({\n\n /**\n * Pull in the package.json file so we can read its metadata.\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make post creation work again.\n"
},
{
"from": "human",
"value": "(function(config, models, views, routers, utils, templates) {\n\nviews.NewPost = Backbone.View.extend({\n id: 'new_post',\n\n events: {\n 'submit #new_post_form': 'createPost'\n },\n\n createPo... | javascript | chosen |
[
{
"from": "system",
"value": "FIX (dotfiles in gist): fix links of dotfiles\n\n- fix links of dotfiles not handled correctly by \"dotToDash\" custom filter\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('gisto.filter.dotToDash', []).filter('dotToDash', function () {\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reading the \"can use\" data\n"
},
{
"from": "human",
"value": "var ui_settings = (function() {\n\nvar externalDisplayOn = false;\n\n$(document).on(\"ui-settings\", function(event, data) {\n\t\n\tif (data.header == \"externalDisplay\") {\n\t\tif (canUseExternalD... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"refactor(StackedPaneDisplay): Experiment with Save button on top.\"\n\nThis reverts commit 42a08c15a62bae19466052598a2a2416f8641a1a.\n"
},
{
"from": "human",
"value": "import PropTypes from 'prop-types'\nimport React from 'react'\nimport { Button } from 're... | javascript | chosen |
[
{
"from": "system",
"value": "Make example deploy a bit simpler.\n"
},
{
"from": "human",
"value": "module.exports = function(deployer) {\n deployer.deploy(ConvertLib);\n deployer.autolink(MetaCoin);\n deployer.deploy(MetaCoin);\n};\n"
},
{
"from": "gpt",
"value": "module.exports ... | javascript | chosen |
[
{
"from": "system",
"value": "Reset message input after sending a message.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { connect } from 'react-redux';\n\nimport config from '../config'\nimport actions from '../actions';\n\nclass Messenger extends React.Component {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Fix bug which stopped users from submitting decimal values in number fields\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport styles from './input-styles'\n\nexport default ({ className, errors, onChange, onCommit, property, value }) => (\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable fetching profile for now\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { connect } from 'react-redux';\n\nimport { clearNotices } from 'lib/actions/general';\nimport { doAuthWithPassword, parseAuthToken, getProfile } from 'lib/actions... | javascript | chosen |
[
{
"from": "system",
"value": "Fix GraphQL queries with no nesting\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { uniq } = require('../../../../../utilities');\n\n// Retrieve `rpcDef.args.populate` using GraphQL selection sets\nconst addPopulate = function ({ args, args: { select }, ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert to default transition next frame instead of anim duration.\n"
},
{
"from": "human",
"value": "var React = require(\"react\");\nvar ReactCSSTransitionGroup = require(\"react-addons-css-transition-group\");\n\nvar Navigation = require(\"../component/Navigation\... | javascript | chosen |
[
{
"from": "system",
"value": "Modify sample module for the unit test\n"
},
{
"from": "human",
"value": "'use strict';\nmodule.exports = (function() {\n var PI = Math.PI;\n\n let area = function(r) {\n return PI * r * r;\n };\n\n let circumference = function(r) {\n return 2 * PI * r;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Test the value passed to the growl manager component\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nimport {\n test,\n moduleForComponent\n} from 'ember-qunit';\n\nvar testNotification = {options: {type: 'error', twitch: true}};\n\nmoduleForCompo... | javascript | chosen |
[
{
"from": "system",
"value": "Revert to Ember.merge so 1.13 tests pass\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport Application from '../../app';\nimport config from '../../config/environment';\n\nexport default function startApp(attrs) {\n let application;\n\n let att... | javascript | chosen |
[
{
"from": "system",
"value": "Add affix to profile page\n"
},
{
"from": "human",
"value": "var profile = require('../profile.js');\n\nvar ctx = window.contextVars;\n\nnew profile.Names('#names', ctx.nameUrls, ['edit']);\nnew profile.Social('#social', ctx.socialUrls, ['edit']);\nnew profile.Jobs(... | javascript | chosen |
[
{
"from": "system",
"value": "Implement new way to call superclass\n"
},
{
"from": "human",
"value": "function PPTennisTournament(name) {\n this.superclass(name);\n this.class = PPTennisTournament.className();\n}\n\n// This must be in between the constructor definition and\n// new method defin... | javascript | chosen |
[
{
"from": "system",
"value": "Update internal temperature example to use chipio.InternalTemperature\n"
},
{
"from": "human",
"value": "var five = require('johnny-five');\nvar ChipIO = require('../index'); // or require('chip-io');\n\nvar board = new five.Board({\n io: new ChipIO()\n});\n\nboard... | javascript | chosen |
[
{
"from": "system",
"value": "Clear the jsdom document created in createWindow\n"
},
{
"from": "human",
"value": "require.paths.unshift('lib')\nrequire.paths.unshift('deps/jsdom/lib')\nvar HTML5 = require('html5'),\n Script = process.binding('evals').Script,\n sys = require('sys'),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable Chrome in karma as it is not available in travis\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n config.set({\n browsers : ['Chrome', 'Firefox'],\n frameworks : ['jasmine'],\n reporters : ['mocha'],\n singleRun ... | javascript | chosen |
[
{
"from": "system",
"value": "Add class to header description\n"
},
{
"from": "human",
"value": "const About = () => {\n return (\n <header id=\"header\" className=\"component\">\n <img className=\"header-logo\" src=\"assets/images/online_logo.svg\" alt=\"\" />\n <h1>Velkommen til ... | javascript | chosen |
[
{
"from": "system",
"value": "Change my-sample directive (using template property)\n"
},
{
"from": "human",
"value": "'use strict';\n\neventsApp.directive('mySample', function($compile) {\n\treturn {\n\t\trestrict: 'E',\n\t\tlink: function(scope, element, attrs, controller) {\n\t\t\tvar markup =... | javascript | chosen |
[
{
"from": "system",
"value": "Update test site notification to use remote format.\n"
},
{
"from": "human",
"value": "export const testSiteNotification = {\n\tid: 'test-notification-id',\n\ttitle: 'Test notification title',\n\tcontent: 'Test notification content',\n\tdismissible: true,\n\tdismiss... | javascript | chosen |
[
{
"from": "system",
"value": "Change string concat to join() call\n"
},
{
"from": "human",
"value": "const compressor = require('node-minify');\nconst { readdirSync } = require('fs');\nconst { basename, join } = require('path');\n\nconst resources = (...dir) => join(...[__dirname, 'src', 'resour... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Retry queries up to 10 times on SQLite\"\n\nThis reverts commit 2a731dbb\n"
},
{
"from": "human",
"value": "/* jslint node: true */\nconst fs = require('fs')\nconst path = require('path')\nconst sequelizeNoUpdateAttributes = require('sequelize-noupdate-attr... | javascript | chosen |
[
{
"from": "system",
"value": "Check for updates on start.\n"
},
{
"from": "human",
"value": "/* global $ */\n/* global requirejs */\n\n'use strict';\n\nvar request = require('request');\nvar ipc = require('electron-safe-ipc/guest');\nvar pjson = require('./package.json');\n\nexports.init = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Rearrange temp support for no internet\n"
},
{
"from": "human",
"value": "app.factory('stocks', ['$http', function($http) {\n\tvar endPoint = 'https://query.yahooapis.com/v1/public/yql?q=',\n\t\t\tsymbols = [\n\t\t\t\t\"W\",\n\t\t\t\t\"FIT\"\n\t\t\t],\n\t\t\tquery =... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for a single array or multiple arguments\n"
},
{
"from": "human",
"value": "var Promise = require('es6-promise').Promise;\nvar engine = require('static-engine');\nvar compose = require('static-compose');\n\nmodule.exports = function (name, plugins) {\n\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Allow ember-orbit to be used in addons"
},
{
"from": "human",
"value": "'use strict';\nconst path = require('path');\nconst assert = require('assert');\nconst fs = require('fs');\n\nmodule.exports = {\n name: require('./package').name,\n included() {\n const ap... | javascript | chosen |
[
{
"from": "system",
"value": "Use non-deprecated webpack v5 APIs\n"
},
{
"from": "human",
"value": "function GenerateJsonPlugin(filename, value, replacer, space) {\n Object.assign(this, { filename, value, replacer, space });\n\n this.plugin = { name: 'GenerateJsonPlugin' };\n}\n\nGenerateJsonP... | javascript | chosen |
[
{
"from": "system",
"value": "Add and implement function for second rule\n"
},
{
"from": "human",
"value": "/* Puzzle input - check /input/day5.js */\nvar input = require('./input/day5.js');\n\n/* Variables */\n// Split input by new line character (\"\\n\")\nvar strings = input.split('\\n');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Allow users to set the per_page option to 0\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assign = require('object-assign');\n\nhexo.config.tag_generator = assign({\n per_page: hexo.config.per_page || 10\n}, hexo.config.tag_generator);\n\nhexo.extend.gene... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to redis based caching.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar compression = require('compression');\nvar seo = require('mean-seo');\n\nvar app = express();\n\n// Enable gzip compression.\napp.use(compression());\n\n// Enabl... | javascript | chosen |
[
{
"from": "system",
"value": "Return Search route early if data is null\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { Query } from 'react-apollo'\nimport { Switch, Route } from 'react-router-dom'\nimport { remove as removeDiacritics } from 'diacritics'\n\nimport parseRou... | javascript | chosen |
[
{
"from": "system",
"value": "Update Example to Change Title\n\nUpdate the example site to show how to change the title of the page when the url changes.\n"
},
{
"from": "human",
"value": "import 'babel-polyfill';\n\nimport React from 'react';\nimport { render } from 'express-react-router';\n\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure pretender shuts down on test runs\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default function destroyApp(application) {\n Ember.run(application, 'destroy');\n}\n"
},
{
"from": "gpt",
"value": "import Ember from 'em... | javascript | chosen |
[
{
"from": "system",
"value": "Add EquationNode to ast constructors\n"
},
{
"from": "human",
"value": "function KIFNode(kifExpressions) {\n this.type = 'KIFNode';\n this.expressions = this.expressions || [];\n this.expressions = this.expressions.concat(kifExpressions);\n}\n\nfunction WordNode(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the entire thing error displaying, make it only in the scope of the template and drop ReactiveArray since it isn't really helping\n"
},
{
"from": "human",
"value": "errors = new ReactiveArray([]);\n\nTemplate.login.helpers({\n errorList: function() {\n retur... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'slice' to clone an array\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction createTree(list, rootNodes) {\n var tree = [];\n\n for (var prop in rootNodes) {\n if (!rootNodes.hasOwnProperty(prop)) {\n continue;\n }\n\n var node = rootNo... | javascript | chosen |
[
{
"from": "system",
"value": "Allow main handlers to be called without callbacks\n"
},
{
"from": "human",
"value": "var Observable = require('../utils').Observable,\n errors = require('../errors');\n\nmodule.exports = Observable.extend({\n constructor: function MailHandler(transport, render)... | javascript | chosen |
[
{
"from": "system",
"value": "Make channel name input use max page width\n"
},
{
"from": "human",
"value": "import { space } from 'styled-system';\nimport { preset } from 'react/styles/functions';\nimport styled from 'styled-components';\nimport { mixin } from 'react/components/UI/GenericInput';... | javascript | chosen |
[
{
"from": "system",
"value": "Fix not parsing JSON issue\n"
},
{
"from": "human",
"value": "var request = require(\"request\"); /* we need this to send requests to the server */\n\nmodule.exports = {\n /* this object becomes available inside what require() returns */\n\n convert: function(... | javascript | chosen |
[
{
"from": "system",
"value": "Add dir watch with file created/removed events\n"
},
{
"from": "human",
"value": "import dir from 'node-dir';\nimport path from 'path';\nimport commandLineArgs from 'command-line-args';\n\nconst cli = commandLineArgs([\n {\n name: 'dir',\n alias: 'd... | javascript | chosen |
[
{
"from": "system",
"value": "Add check if options is undefined"
},
{
"from": "human",
"value": "/* global Buffer */\nvar pocoGen = require('typescript-cs-poco');\nvar through = require('through2');\nvar gutil = require('gulp-util');\nvar PluginError = gutil.PluginError;\n\nvar PLUGIN_NAME = 'gu... | javascript | chosen |
[
{
"from": "system",
"value": "Add a fake prices endpoint\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar express = require(\"express\");\n\nmodule.exports = function () {\n \n var app = express();\n\n // Allow all domains to request data (see CORS for more details)\n app.use(functi... | javascript | chosen |
[
{
"from": "system",
"value": "Reformat so it looks pretty on Github"
},
{
"from": "human",
"value": "module.exports = {\n \n normalize: function extract(phoneNumber) {\n\n \treturn phoneNumber.replace(\n \t\t/^[\\+\\d{1,3}\\-\\s]*\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/,\n \t\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Change startsWith param test method to be use with all version of nodejs\n"
},
{
"from": "human",
"value": "/**\n * Homemade gulp options manager\n */\nmodule.exports = {\n options: null,\n read: function(argv) {\n var optionsClean = [];\n argv.s... | javascript | chosen |
[
{
"from": "system",
"value": "Update error method to allow for new Error objects\n"
},
{
"from": "human",
"value": "var LogEmitter = function (source) {\n\tthis.source = source;\n};\n\nLogEmitter.prototype.info = function (message) {\n\tprocess.emit(\"gulp:log\", { level: \"info\", message: mess... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to remove unneeded splice\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar visit = require('unist-util-visit');\nvar remove = require('unist-util-remove');\nvar getDefinitions = require('mdast-util-definitions');\n\nmodule.exports = inlineLinks;\n\nf... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.