conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Rename fetchPage to fetchPageContent, since it returns the content of the page.\n"
},
{
"from": "human",
"value": "/* eslint no-console: 0 */\n'use strict';\n\nconst phantom = require('phantom');\n\n\nfunction* blockResourceLoading(page) {\n yield page.property('... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate to the latest way electron exposes app module\n"
},
{
"from": "human",
"value": "var app = require('app');\nvar chokidar = require('chokidar');\nvar extend = require('util')._extend;\nvar fs = require('fs');\n\nvar bootstrap = function(glob, options) {\n op... | javascript | chosen |
[
{
"from": "system",
"value": "Use shorthand url to open Travis.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n/* \n\n ___ usage ___ en_US ___\n usage: dots git issue create [options] [subject]\n\n desciption:\n\n Create a GitHub issue from the command line using the given... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug where the wrong metadata would be used\n"
},
{
"from": "human",
"value": "import get from 'lodash/get';\n\nconst isEmptyMetadata = (metadata) => {\n const keys = [\n 'description',\n 'citation',\n 'source',\n 'applicationProperties.cautions',\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with lightbox resizing.\n\nFixes #34\n"
},
{
"from": "human",
"value": "function resizeWhich(img) {\n img.removeAttr('style');\n\n if (window.innerWidth / img.width() < window.innerHeight / img.height()) {\n return 'width';\n console.lo... | javascript | chosen |
[
{
"from": "system",
"value": "Use defaults in coffe parser\n"
},
{
"from": "human",
"value": "const eol = require('eol');\nconst commentsUtil = require('../utils/comments');\n\nmodule.exports = function(params) {\n params = params || {};\n const regex = commentsUtil.getRegex(params.customT... | javascript | chosen |
[
{
"from": "system",
"value": "Fix newline throw for empty indentation\n"
},
{
"from": "human",
"value": "const indentRegex = /^\\s+/\n\nconst getIndent = (plain, cursorPos) => {\n const startSlice = plain.slice(0, cursorPos)\n const lastNewline = startSlice.lastIndexOf('\\n') + 1\n const line... | javascript | chosen |
[
{
"from": "system",
"value": "Fix “reload convrsation” button’s state\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { loadConversation } from 'redux/modules/conversationModule';\n// COMPONENTS\nimport Comme... | javascript | chosen |
[
{
"from": "system",
"value": "Add tiers and ticks collections to crowdsalePageStore\n"
},
{
"from": "human",
"value": "import { observable, action } from 'mobx';\n\nclass CrowdsalePageStore {\n\n @observable maximumSellableTokens;\n @observable maximumSellableTokensInWei;\n @observable invest... | javascript | chosen |
[
{
"from": "system",
"value": "Fix POST to PUT on method\n"
},
{
"from": "human",
"value": "export default class EventService {\r\n constructor($http) {\r\n this.$inject = ['$http'];\r\n this.$http = $http;\r\n this.events = [];\r\n }\r\n\r\n loadEventsByPlanId(planId) {\r\n return... | javascript | chosen |
[
{
"from": "system",
"value": "Throw a descriptive error when $DATABASE_URL is undefined\n"
},
{
"from": "human",
"value": "const Sequelize = require('sequelize');\n\nconst database = process.env.DATABASE_URL;\n\nconst db = new Sequelize(database, {\n logging: false\n});\n\nmodule.exports = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update gen-publish script to update 'next' tag for main releases\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst path = require(\"path\");\nconst fs = require(\"fs-extra\");\nconst should = require(\"should\");\n\nconst LATEST = \"2\";\n\nfunction ge... | javascript | chosen |
[
{
"from": "system",
"value": "apps/bootstrap: Replace FOAM_SOURCES with a filtered list of the core files from FOAMmodels.js so its always up to date.\n"
},
{
"from": "human",
"value": "var FOAM_SOURCES = [\n 'core/i18n.js',\n 'core/stdlib.js',\n 'core/io.js',\n 'core/writer.js',\n 'core/so... | javascript | chosen |
[
{
"from": "system",
"value": "Fix observed element for Dynamics 365\n\nThe button was losing the active status right after the timer was started.\n"
},
{
"from": "human",
"value": "'use strict';\n\ntogglbutton.render('#headerContainer:not(.toggl)',\n { observe: true },\n function (elem) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix GraphQL introspection query crashing\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { emitEvent } = require('../../events');\nconst { mapValues, omit } = require('../../utilities');\n\n// Create event when all protocol-specific servers have started\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Add message to error instead of printing to console\n"
},
{
"from": "human",
"value": "import graphqlShorthandParser from 'graphql-shorthand-parser';\n\n// we wrap the parser to get useful error messages\n// see: https://github.com/pegjs/pegjs/issues/314\n\n// @p sh... | javascript | chosen |
[
{
"from": "system",
"value": ":new: Add specs for both envs\n"
},
{
"from": "human",
"value": "'use babel'\n\nimport promisify from '..'\n\ndescribe('Promisify', function() {\n it('succeeds properly', function() {\n const callback = function(arg1, arg2) {\n expect(arg1).toBe('something'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix roles for Courses API\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n // Courses controller\n angular\n .module('courses')\n .controller('CoursesController', CoursesController);\n\n CoursesController.$inject = ['$scope', '$state',... | javascript | chosen |
[
{
"from": "system",
"value": "Add +calendar to the home page\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PersonGroup from '../../../../components/person-group'\nimport {sortPeople} from '../../../../../shared/utils'\n\n\nexport default Episode\n\nfunction Episode({episod... | javascript | chosen |
[
{
"from": "system",
"value": "Fix handling of default boolean values\n"
},
{
"from": "human",
"value": "module.exports = function(localStorageService) {\n var configManager = {};\n\n configManager.getPrivateToken = function() {\n return localStorageService.get('private_token');\n }\n\n co... | javascript | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning with ember-ajax\n"
},
{
"from": "human",
"value": "import config from '../config/environment';\nimport Ember from 'ember';\nimport ajax from 'ember-ajax';\n\nconst { inject } = Ember;\n\nexport default Ember.Object.extend({ /**\n * Resolve... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for flexberry-layers-attributes-panel component\n"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-qunit';\n\nmoduleForComponent('flexberry-layers-attributes-panel', 'Integration | Component | flexberry layers attributes pane... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"working on getting outside menu click to close menu. has a bug\"\n\nThis reverts commit 26ebe01026f9c9eb611324861f52c1886aa50341.\n"
},
{
"from": "human",
"value": "app.directive('emoticonMenu', function($rootScope, $filter, $document) {\n\treturn {\n\t\tte... | javascript | chosen |
[
{
"from": "system",
"value": "Create init function for injecting GTM script tag\n"
},
{
"from": "human",
"value": "import { getAppIdFallback } from './appId';\nimport AppIdMap from './appIdResolver';\nimport { getTokenList } from './utils/storageManager';\n\nconst GTM = (() => {\n const isGtm... | javascript | chosen |
[
{
"from": "system",
"value": "Fix initial textarea row count\n"
},
{
"from": "human",
"value": "var cell_types = cell_types || {};\n\n(function(){\n cell_types[\"mathjs\"] = {\n button_html: \"+\",\n on_create: function(element, content){\n var extension_content = sub... | javascript | chosen |
[
{
"from": "system",
"value": "Fix copy&paste error in test description\n"
},
{
"from": "human",
"value": "const chai = require('chai')\nconst expect = chai.expect\nconst calculateScore = require('../../lib/calculateScore')\n\ndescribe('Score', () => {\n it('should be 100 points for a * challeng... | javascript | chosen |
[
{
"from": "system",
"value": "Fix embedded code being removed\n\nno issue\n- changed order of escaping\n"
},
{
"from": "human",
"value": "/* global Showdown, Handlebars, html_sanitize*/\nimport cajaSanitizers from 'ghost/utils/caja-sanitizers';\n\nvar showdown = new Showdown.converter({extension... | javascript | chosen |
[
{
"from": "system",
"value": "Add callback to pretty print yAxes\n\nRetab whole file so its actually understandable\n"
},
{
"from": "human",
"value": "function traffic_data(traffic_levels) {\n var ctx = document.getElementById(\"traffic-chart\");\n var timeFormat = 'DD/MM/YYYY';\n var m... | javascript | chosen |
[
{
"from": "system",
"value": "Use spread operator instead Object.assign\n"
},
{
"from": "human",
"value": "const mainReducer = (state , action) => {\n\tswitch (action.type) {\n\t\tcase 'REQUEST_LOCATION':\n\t\t\treturn Object.assign({}, state, {\n\t\t\t\tloading: true\n\t\t\t})\n\t\tcase 'RECEIV... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue where StyleSheet.create() is called when it doesn't have to be\n"
},
{
"from": "human",
"value": "import { StyleSheet } from 'react-native';\nimport { flatten } from 'lodash';\n\nexport const cachedStyles = {};\nexport const styleHasher = JSON.stringify; /... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console log statement in sidebar controller.\n"
},
{
"from": "human",
"value": "angular.module('app.sidebar').controller('SidebarCtrl', ['$scope', 'organizationService', 'spaceService', function ($scope, organizationService, spaceService) {\n $scope.organiza... | javascript | chosen |
[
{
"from": "system",
"value": "Add searchTerm key to objects\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst _ = require('lodash');\n_.mixin(require('lodash-inflection'));\n\nconst IMAGE_PATH = process.argv[2];\n\nconst images = fs.readdirSync(IMAGE_PATH, 'utf8');\n\nlet baseS... | javascript | chosen |
[
{
"from": "system",
"value": "Change Var to Const in Seed.js\n"
},
{
"from": "human",
"value": "var userData = require('./mockdata/exampleUsers');\nvar templateData = require('./mockdata/exampleTemplate');\nvar activityData = require('./mockdata/exampleActivity');\nvar historyData = require('./m... | javascript | chosen |
[
{
"from": "system",
"value": "Improve handling of profile defaults\n\nIf no profiles exist in the .novacfg, fall back to the default always.\n"
},
{
"from": "human",
"value": "var _ = require('underscore')\n , fs = require('fs');\n\nfunction loadConfiguration() {\n var default_config = {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix {X} no momento que vota e dá o erro\n"
},
{
"from": "human",
"value": "jQuery( function( $ ) {\n\n $('.js-vote-button').click(function() {\n var post_id = $(this).data('post_id');\n\n var panel = $(this).closest('.panel-heading');\n\n $.a... | javascript | chosen |
[
{
"from": "system",
"value": "Stop excluding bower because it is gone\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar ExtractTextPlugin = require('extract-text-webpack-plugin');\nvar path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n context: path.join(__... | javascript | chosen |
[
{
"from": "system",
"value": "Correct output of shell errors for CI detection\n"
},
{
"from": "human",
"value": "var shell = require('shelljs')\nshell.exec('ava test/**/*.js --color=always')"
},
{
"from": "gpt",
"value": "var shell = require('shelljs')\n\nif(process.env.CI !== 'true'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix presentation of toggle button in narrower screen resolutions\n\n* Remove incorrect attribute escaping of translation exported to JS.\n* Restore amp-validation-error-detail-toggle to webpack config.\n"
},
{
"from": "human",
"value": "/* global require, module, __... | javascript | chosen |
[
{
"from": "system",
"value": "Move getter and setter require statements to post so that test error line numbers are not skewed\n"
},
{
"from": "human",
"value": "var through = require(\"through\");\nvar path = require(\"path\");\n\nconsole.warn(\"Injecting Rewireify into modules\");\n\nmodule.ex... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Fix unnoticed deletion widget eslint errors\n"
},
{
"from": "human",
"value": "/**\n * Listeners for header\n */\n\nimport $ from 'jquery'\nimport { version } from '../../../package.json'\nimport { reload, erase } from '../game-util'\n\nconst deleteFriendo = (... | javascript | chosen |
[
{
"from": "system",
"value": "Load latestDistData in main build\n"
},
{
"from": "human",
"value": "import history from '!json!../assets/data/history.json'\nimport metadata from '!json!../assets/data/metadata.json'\n// Loading latest season in the main bundle itself\nimport latestSeasonData from ... | javascript | chosen |
[
{
"from": "system",
"value": "Add use of the new stepper\n"
},
{
"from": "human",
"value": "/* eslint-disable react/forbid-prop-types */\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2021\n */\nimport React from 'react';\nimport { Wizard } from '../widgets';\nimport { PatientSelect... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"safari faq bug test 2\"\n\nThis reverts commit bf47a1eb7c54cac225ff975b0c674d3d2ef34a5e.\n"
},
{
"from": "human",
"value": "$(\"body\").backstretch(\"assets/img/background1.png\");\n\n$(window).on('load', function() {\n $('.faqelem').click(function() {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove `chmod` since downloaded files should have the right permission now\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar BinBuild = require('./');\nvar fs = require('fs');\nvar path = require('path');\nvar test = require('ava');\n\ntest('expose a construct... | javascript | chosen |
[
{
"from": "system",
"value": "[+] Add 'scenes' field to the Xsplit resource\n"
},
{
"from": "human",
"value": "const cache = require('memory-cache')\nconst websockets = require('../websockets')()\n\n/**\n * Class representing the displayed data for XSplit\n */\nclass XSplit {\n constructor () {... | javascript | chosen |
[
{
"from": "system",
"value": "Make the new edit button JS func visible to native land.\n\nForgot to include this in the commit which added the JS func.\n"
},
{
"from": "human",
"value": "var wmf = {}\n\nwmf.compatibility = require('wikimedia-page-library').CompatibilityTransform\nwmf.elementLoca... | javascript | chosen |
[
{
"from": "system",
"value": "Write a function to update data\n"
},
{
"from": "human",
"value": "/*\n* Cepat Sembuh v1.0\n* Copyright 2016 Cepat Sembuh\n*/\n\n// Firebase go online whenever the application is open\ndocument.addEventListener(\"deviceready\", function () {\n Firebase.goOnline()... | javascript | chosen |
[
{
"from": "system",
"value": "Improve async action by removing promise\n"
},
{
"from": "human",
"value": "export const ActionType = {\n INCREMENT: 'INCREMENT',\n DECREMENT: 'DECREMENT'\n};\n\nexport function incrementAsync() {\n return (dispatch) => {\n return new Promise((resolv... | javascript | chosen |
[
{
"from": "system",
"value": "Update formatting in template app\n"
},
{
"from": "human",
"value": "import ui.TextView as TextView;\n\nexports = Class(GC.Application, function () {\n\n this.initUI = function () {\n var textview = new TextView({\n superview: this.view,\n text: \"Hell... | javascript | chosen |
[
{
"from": "system",
"value": "Add code explanation about baseDate variable\n"
},
{
"from": "human",
"value": "export default function getCalendarMonthWeeks(month, enableOutsideDays) {\n const baseDate = month.clone().utcOffset(month.utcOffset());\n const firstOfMonth = baseDate.clone().startOf... | javascript | chosen |
[
{
"from": "system",
"value": "Allow todo creation by non logged-in users.\n"
},
{
"from": "human",
"value": "import { call, fork, put, select, take, takeEvery } from 'redux-saga/effects';\n\nimport {\n types,\n syncTodos,\n} from '../reducer/todos.actions';\n\nimport rsf from '../rsf';\n\nfunc... | javascript | chosen |
[
{
"from": "system",
"value": "Set default window size to largest.\n"
},
{
"from": "human",
"value": "/**\n * Listens for the app launching then creates the window\n *\n */\nchrome.app.runtime.onLaunched.addListener(function() {\n var screenWidth = screen.availWidth;\n var screenHeight = sc... | javascript | chosen |
[
{
"from": "system",
"value": "Implement support for template functions returned by render.\n"
},
{
"from": "human",
"value": "define(['sail',\n 'anchor/events',\n 'anchor/class'],\nfunction(sail, events, clazz) {\n \n function View(el, options) {\n View.super_.call(this);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move propTypes to RadioWithNote class\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { ListItem, Radio, Left, Right, Text } from 'native-base';\n\n// Radio button list item with title and note.\nexport default class RadioWithNot... | javascript | chosen |
[
{
"from": "system",
"value": "Remove useless function around it."
},
{
"from": "human",
"value": "import KataUrl from './kata-url.js'\n\nexport default class StartUp {\n constructor(xhrGet, xhrGetDefaultKata) {\n this.xhrGet = xhrGet;\n this.xhrGetDefaultKata = xhrGetDefaultKata;\n }\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix errant space in learn more items\n"
},
{
"from": "human",
"value": "/*\n *\n * ToolPage\n *\n */\n\nimport React, { PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { createStructuredSelector } from 'reselect';\nimport Markdown from 'rea... | javascript | chosen |
[
{
"from": "system",
"value": "Fix async test - return the promise\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2017, Emanuel Rabina (http://www.ultraq.net.nz/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional font size test\n"
},
{
"from": "human",
"value": "import assert from 'power-assert';\nimport test from '../../helper/test';\nimport fontSize, {PX, PT} from '../../../lib/utility/css/font-size';\n\ndescribe('fontSize', () => {\n it('returns the font s... | javascript | chosen |
[
{
"from": "system",
"value": "Update the home slider, add auto play\n"
},
{
"from": "human",
"value": "var LightSliderHomeInit = function() {\n\n //\n // Init\n //\n this.init();\n\n};\n\nLightSliderHomeInit.prototype.init = function() {\n\n var that = this;\n\n $('[data-slider... | javascript | chosen |
[
{
"from": "system",
"value": "Use built in functionality for calling Promise.all on an object of promises\n"
},
{
"from": "human",
"value": "(function(angular, window) {\n\n 'use strict';\n\n angular\n .module('mwl.bluebird', [])\n .constant('Bluebird', window.P.noConflict())\n .confi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ace editor problem on production\n"
},
{
"from": "human",
"value": "function setAceEditor() {\n var textarea = document.getElementById(\"editor\");\n var form = textarea.form\n\n editor = ace.edit(textarea)\n language = $(\":selected\").html()\n changeEdito... | javascript | chosen |
[
{
"from": "system",
"value": "Use mediumtext instead of text"
},
{
"from": "human",
"value": "/**\n * hive.js\n * Copyright (C) 2013-2016 Marcel Klehr <mklehr@gmx.net>\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Mozilla Public Licens... | javascript | chosen |
[
{
"from": "system",
"value": "Moderator: Update comment for current name\n\nUpdate the comment for the variable that displays\nthe current name to the moderator webpage.\n"
},
{
"from": "human",
"value": "var socket = io();\nvar nameInfo = {\"name\":\"\", \"accepted\":\"\"};\n\n// Get the name f... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to simple tableview with checkmark\n"
},
{
"from": "human",
"value": "// @flow\nimport React from 'react'\nimport {View} from 'react-native'\nimport {ButtonCell} from '../components/cells/button'\nimport ReactNativeDynamicIcon from 'react-native-dynamic-icon'... | javascript | chosen |
[
{
"from": "system",
"value": "Make a box a box\n\n* fix default name from \"folder\" to \"box\""
},
{
"from": "human",
"value": "/*\n * Wegas\n * http://wegas.albasim.ch\n *\n * Copyright (c) 2013-2018 School of Business and Engineering Vaud, Comem, MEI\n * Licensed under the MIT License\n */\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change $urlRouterProvider.otherwise back to /home\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n angular\n .module('app.core')\n .run(function($rootScope, $state) {\n return $rootScope.$on('$stateChangeStart', fu... | javascript | chosen |
[
{
"from": "system",
"value": "Use + operator to add lengths\n"
},
{
"from": "human",
"value": "'use strict';\n\n// MODULES //\n\nvar merge = require( '@stdlib/utils/merge' );\nvar unique = require( './unique.js' );\n\n\n// MAIN //\n\n/**\n* Combines two lunr indices into a single one.\n*\n* @pri... | javascript | chosen |
[
{
"from": "system",
"value": "Add first test for newsfeed module.\n\nThis test case check if set newsfeed title\n"
},
{
"from": "human",
"value": "const globalSetup = require(\"../global-setup\");\nconst app = globalSetup.app;\nconst chai = require(\"chai\");\nconst expect = chai.expect;\n\ndesc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix no labeled statement error\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport TableRow from './TableRow/index.js'\nimport Button from '../../Components/Button/index.js'\n\nexport default class ... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure the data is parse out as json from the server for SSE\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar glimpse = require('glimpse');\nvar polyfill = require('event-source')\n\nvar socket = (function() {\n var connection;\n\n var setup = functi... | javascript | chosen |
[
{
"from": "system",
"value": "test: Fix deprecation warning with mongoose `open()` method\n"
},
{
"from": "human",
"value": "/* @flow */\n/* eslint-disable no-param-reassign, no-console */\n\nimport mongoose, { Schema } from 'mongoose';\nimport MongodbMemoryServer from 'mongodb-memory-server';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove last redux-fields message from the code\n"
},
{
"from": "human",
"value": "import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n intl: {\n defaultMessage: 'Intl',\n id: 'app.links.intl'\n },\n fields: {\n defaultMessage... | javascript | chosen |
[
{
"from": "system",
"value": "Enable source-map for development build\n"
},
{
"from": "human",
"value": "module.exports = {\n entry: {\n host: [\"babel-polyfill\", \"./host/index.js\"],\n participant: [\"babel-polyfill\", \"./participant/index.js\"],\n },\n output: {\n path: \"./\",\... | javascript | chosen |
[
{
"from": "system",
"value": "Rename exported var to be with uppercase\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst env = require('yargs').argv.mode;\nconst webpack = require('webpack');\n\nconst { UglifyJsPlugin } = webpack.optimize;\n\nconst libraryName = 'wix... | javascript | chosen |
[
{
"from": "system",
"value": "Solve a problem with Webpack 4\n"
},
{
"from": "human",
"value": "var path = require('path')\nvar pkg = require('./package.json')\nvar UglifyjsPlugin = require('uglifyjs-webpack-plugin')\nvar BannerPlugin = require('webpack').BannerPlugin\n\nmodule.exports = {\n en... | javascript | chosen |
[
{
"from": "system",
"value": "Return role of caller when populating page from server\n"
},
{
"from": "human",
"value": "(function () {\n var cogClass = function () {};\n cogClass.prototype.exec = function (params, request, response) {\n var oops = this.utils.apiError;\n var s... | javascript | chosen |
[
{
"from": "system",
"value": "Use implicit returns for dashboard action creators\n\nImplicit returns are more concise here, and considered more idiomatic.\nAlso, async action creators have been collected together and moved\ntowards the end of the file for ease of navigation.\n"
},
{
"from": "human",... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \":fire: Removed useless sample code\"\n\nThis reverts commit f3b8351c375f9b6344dd3e3c3d6484e2b671021e.\n"
},
{
"from": "human",
"value": "import Inferno from 'inferno'\nimport Component from 'inferno-component'\nimport styled from 'styled-components'\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "Send and receive cookies to Girder\n"
},
{
"from": "human",
"value": "import Vue from 'vue';\nimport Girder, { RestClient } from '@girder/components/src';\n\n// Install the Vue plugin that lets us use the components\nVue.use(Girder);\n\nconst girderRest = new RestCl... | javascript | chosen |
[
{
"from": "system",
"value": "Add a test to verify that the controller calls the calculator service properly.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar expect = require('chai').expect;\nvar angular = require('angular');\n\nvar helloWorldModule = require('./helloWorld.controller');\... | javascript | chosen |
[
{
"from": "system",
"value": "Implement back / forward buttons on quick update.\n"
},
{
"from": "human",
"value": "Hummingbird.QuickUpdateComponent = Ember.Component.extend({\n loading: true,\n page: 1,\n libraryEntries: [],\n canGoBack: Em.computed.gt('page', 1),\n canGoForward: true,\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Validate incoming url against config\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar oembed = module.exports = {\n name: 'oembed'\n};\n\n// oEmbed endpoint with JSONP support.\noembed.embed = function(req, res) {\n var url = req.query.url;\n\n if (!url ||... | javascript | chosen |
[
{
"from": "system",
"value": "Add microdata to youtube embeds\n"
},
{
"from": "human",
"value": "define([\n\t'jquery'\n], function (\n\t\t$\n\t\t) {\n\t$.fn.activateYoutube = function(trigger) {\n\t\tif (trigger === undefined) {\n\t\t\ttrigger = true;\n\t\t}\n\t\t$('.youtube', this).empty().each... | javascript | chosen |
[
{
"from": "system",
"value": "Update render backtracking tests for removed first usage stack trace\n"
},
{
"from": "human",
"value": "const SUPPORTS_STACK_TRACE = Boolean(new Error().stack);\n\nexport function backtrackingMessageFor(key, obj, { renderTree } = {}) {\n // Start off with standard ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix membership async loading for tasks\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst {\n get,\n inject: { service },\n Route,\n RSVP\n } = Ember;\n\nexport default Route.extend({\n projectTaskBoard: service(),\n\n model() {\n let pr... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"cancel sorting trend tags in the UI side\"\n\nThis reverts commit d72abcf351161b068496b38675fda1306d21de74.\n"
},
{
"from": "human",
"value": "import { TREND_TAGS_SUCCESS,\n TREND_TAGS_HISTORY_SUCCESS,\n TOGGLE_TREND_TAGS\n} from '../actions/trend_tags';\... | javascript | chosen |
[
{
"from": "system",
"value": "Update fb js to v2.12\n"
},
{
"from": "human",
"value": "// https://dev.twitter.com/web/javascript/loading\nwindow.twttr = (function (d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0],\n t = window.twttr || {};\n if (d.getElementById(id)) return t;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace jQuery .unbind with .off\n\nThe .unbind method is deprecated in jQuery 3.\n"
},
{
"from": "human",
"value": "import $ from 'jquery';\nimport _ from 'underscore';\n\nimport AlertDialogTemplate from './alertDialog.pug';\n\n/**\n * Miscellaneous utility functio... | javascript | chosen |
[
{
"from": "system",
"value": "Test config does not require an entry setting\n"
},
{
"from": "human",
"value": "var webpack = require(\"webpack\");\nvar nodeExternals = require(\"webpack-node-externals\");\n\nmodule.exports = {\n target: \"node\",\n externals: [nodeExternals()],\n entry: './te... | javascript | chosen |
[
{
"from": "system",
"value": "Add testing setup\nSee if Sinon works for you\n"
},
{
"from": "human",
"value": "const chai = require('chai')\nconst assert = chai.assert;\nconst sinon = require('sinon/pkg/sinon');\nconst Ball = require(\"../lib/ball\")\n\ndescribe(\"Ball\", function(){\n context(... | javascript | chosen |
[
{
"from": "system",
"value": "Set default port for local API server\n\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst production = process.env.NODE_ENV === 'production';\nconst oneDay = 24 * 60 * 60;\n\nfunction get(name, fallback, options = {}) {\n if (process.env[name]) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Save answer but error occured\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\nvar Answer = require(config.root.MODEL_ROOT).answer;\nvar scoreMod = require(config.root.MODULE_ROOT).score;\n\nfunction saveAnswer(ua... | javascript | chosen |
[
{
"from": "system",
"value": "Add routes to the router middleware.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar express = require('express');\n\nmodule.exports = function () {\n\n var router = express.Router();\n\n return router;\n};\n"
},
{
"from": "gpt",
"value": "'use... | javascript | chosen |
[
{
"from": "system",
"value": "Use proxied downloads as fallback\n\nShould hopefully fix https://github.com/cheapsteak/npmcharts.com/issues/76\n"
},
{
"from": "human",
"value": "const fetch = require('isomorphic-fetch');\n\nmodule.exports = (packageNames, startDate, endDate) => {\n const package... | javascript | chosen |
[
{
"from": "system",
"value": "Remove handling of sparse kind\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar setPrototypeOf = require('es5-ext/object/set-prototype-of')\n , contains = require('es5-ext/string/#/contains')\n , startsWith = require('es5-ext/string/#/starts-with'... | javascript | chosen |
[
{
"from": "system",
"value": "Make Kureev happy with currying\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst flatten = require('lodash.flatten');\n\n/**\n * Filter dependencies by name pattern\n * @param {String} dependency Name of the dependency\n * @return {Boolean} ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable button after upload has started (it can last for some time).\nRedirect to home page after upload completed.\n"
},
{
"from": "human",
"value": "$(function() {\n var fileText;\n\n var maxFileSizeInBytes = 100000; // 100kB\n $('#inputFile').change(func... | javascript | chosen |
[
{
"from": "system",
"value": "Make date and time optional\n"
},
{
"from": "human",
"value": "orion.addEntity('activities', _.extend(_.clone(commonSchema), {\n location: {\n type: Object,\n label: 'Location',\n optional: true,\n autoform: {\n type: 'map',\n afFieldInput: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add warning for unimplemented adapter methods\n"
},
{
"from": "human",
"value": "var get = Ember.get;\n\nDS.Serializer = Ember.Object.extend({\n toJSON: function(record, options) {\n options = options || {};\n\n var hash = {};\n\n this.addAttributes(hash, ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove invalid param type `custom`\n"
},
{
"from": "human",
"value": "const UrlQueryParamTypes = {\n number: 'number',\n string: 'string',\n object: 'object',\n array: 'array',\n json: 'json',\n date: 'date',\n boolean: 'boolean',\n custom: 'custom',\n};\n\n... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.