conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change lint errors to warnings\n"
},
{
"from": "human",
"value": "module.exports = {\n root: true,\n parserOptions: {\n ecmaVersion: 2017,\n sourceType: 'module'\n },\n plugins: [\n 'ember'\n ],\n extends: [\n 'eslint:recommended',\n 'plugin:emb... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Do not re-evalute sasl every time connection is built\"\n\nThis reverts commit 3f073c556c007fc1adcc4b4cee6608a1128c8231.\n"
},
{
"from": "human",
"value": "const Connection = require('../network/connection')\nconst { KafkaJSConnectionError } = require('../e... | javascript | chosen |
[
{
"from": "system",
"value": "Change hexagon type to rule\n\n"
},
{
"from": "human",
"value": "var HexagonNode = require(\"../HexagonNode\");\n\nmodule.exports = (function () {\n\n\tvar o = function (graph) {\n\t\tHexagonNode.apply(this, arguments);\n\n\t\tthis.attributes([\"hexagon\"])\n\t\t\t.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove more code duplication from StateSnapshot\n"
},
{
"from": "human",
"value": "class StateSnapshot {\n constructor({ store, initialState, meta, currentState = initialState }) {\n this.store = store;\n this.initialState = { ...initialState };\n this.ite... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console.debug from jshint spec\n"
},
{
"from": "human",
"value": "// Thanks to Brandon Keepers - \ndescribe('JSHint', function () {\n var options = {curly: true, white: false, indent: 2},\n files = /^\\/public\\/javascripts\\/(models|collections|views)|... | javascript | chosen |
[
{
"from": "system",
"value": "Add done flag to experiment.\n"
},
{
"from": "human",
"value": "export class ExperimentStep {\n constructor(title, _type) {\n this.id = '';\n this.title = title;\n this._type = _type;\n this.steps = [];\n this.description = '';\... | javascript | chosen |
[
{
"from": "system",
"value": "Clear all notifications when sign out.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('copay.header').controller('HeaderController',\n function($scope, $rootScope, $location, walletFactory, controllerUtils) {\n $scope.menu = [{\n 'title'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in webhook server\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar http = require('http');\nvar spawn = require('child_process').spawn;\n\nhttp.createServer(function(req, res) {\n var json = '';\n\n if (req.method !== 'POST') {\n return;\n }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "lathe[cuboid]: Generalize BoxGeometry translation helpers to scaling.\n"
},
{
"from": "human",
"value": "/* eslint-env es6 */\n/* global THREE, Indices */\nwindow.translateBoxVertices = (function() {\n 'use strict';\n\n const vector = new THREE.Vector3();\n const... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust method call to gulp-typescript 3 api.\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst iif = require('gulp-if')\nconst filter = require('gulp-filter')\nconst ts = require('gulp-typescript')\nconst sourcemaps = require('gulp-sourcemaps')\nconst util = ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix source url to cache\n"
},
{
"from": "human",
"value": "let doCache = false;\n\nlet CACHE_NAME = 'quickbill-cache-v1';\n\nlet urlsToCache = [\n '/',\n './assets/styles/css/styles.css',\n './assets/styles/images/*',\n './dist/index-bundle.js'\n];\n\nself.addEv... | javascript | chosen |
[
{
"from": "system",
"value": "Add jpeg to regular expressions\n"
},
{
"from": "human",
"value": "pref(\"extensions.imageforward.imageURLRegExp\", \"^[^#\\?]+\\.(jpg|png)((#|\\?).*)?$\");\npref(\"extensions.imageforward.linkURLRegExp\", \"^[^#\\?]+\\.(jpg|png)((#|\\?).*)?$\");\npref(\"extensions.... | javascript | chosen |
[
{
"from": "system",
"value": "Change the list call to call the service method\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n/**\n The Products Index Page.\n\n **To Override:** You'll need to run the routes generator:\n\n ```bash\n ember g yebo-ember-storefront-routes\n ```\... | javascript | chosen |
[
{
"from": "system",
"value": "Update the 'fluctuate volume' example for the async API\n"
},
{
"from": "human",
"value": "var iTunes = require('../');\n\niTunes.createConnection(function(err, itunes) {\n var i = itunes.getVolumeSync();\n var inc = 1;\n setInterval(function() {\n if (i == 10... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure to not route `/log(in|out)` to index.html\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst session = require('express-session');\nconst SequelizeStore = require('connect-session-sequelize')(session.Store);\nconst logger = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the issue that xip.io can not be set in catalog\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { get, set, observer } from '@ember/object'\nimport layout from './template';\nimport { inject as service } from '@ember/service'... | javascript | chosen |
[
{
"from": "system",
"value": "Remove optimizeImages task in image task\n"
},
{
"from": "human",
"value": "'use strict';\n\nif (!config.tasks.images) {\n\treturn false;\n}\n\nlet paths = {\n\tsrc: path.join(config.root.base, config.root.src, config.tasks.images.src, '/**', getExtensions(config.t... | javascript | chosen |
[
{
"from": "system",
"value": "Disable pseudo-tty to fix issues with Shipit and Docker"
},
{
"from": "human",
"value": "require('dotenv').config();\n\nmodule.exports = shipit => {\n shipit.initConfig({\n production: {\n servers: process.env.SHIPIT_PRODUCTION_SERVER,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Align award to tree sort\n"
},
{
"from": "human",
"value": "import { inject as service } from '@ember/service';\nimport { not, sort, filterBy } from '@ember/object/computed';\nimport { task } from 'ember-concurrency';\nimport Component from '@ember/component';\n\nex... | javascript | chosen |
[
{
"from": "system",
"value": "Check if the value is a string before crashing :monorail:\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc filter\n * @name grafterizerApp.filter:beautifyUri\n * @function\n * @description\n * # beautifyUri\n * Try to make something from an ugly Ur... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite for the different number of elements case. [for: alex.scown]\n"
},
{
"from": "human",
"value": "define([\n 'underscore'\n], function(_) {\n function containsAll(a, b, predicate) {\n // for every item in a...\n return _.all(a, function(aIt... | javascript | chosen |
[
{
"from": "system",
"value": "Remove cartocss, not used anymore\n"
},
{
"from": "human",
"value": "var TC = require('tangram.cartodb');\nvar LeafletLayerView = require('./leaflet-layer-view');\nvar L = require('leaflet');\n\nvar LeafletCartoDBWebglLayerGroupView = L.Class.extend({\n includes: [... | javascript | chosen |
[
{
"from": "system",
"value": "Switch code highlighter to a dark theme\n"
},
{
"from": "human",
"value": "import { useEffect } from 'react';\nimport hljs from 'highlight.js/lib/core';\nimport go from 'highlight.js/lib/languages/go';\nimport r from 'highlight.js/lib/languages/r';\n\nimport 'animat... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in a test import.\n"
},
{
"from": "human",
"value": "import { find } from '../../src/c/find'\n\ndescribe('chapter1.find', function() {\n\n it('should return -1 if no such element', function() {\n expect(find([2, 1, 4, 2, 3], 5)).toBe(-1);\n });\n\n it... | javascript | chosen |
[
{
"from": "system",
"value": "Set production env variable for browser builds\n"
},
{
"from": "human",
"value": "import webpack from 'webpack'\nimport ExtractTextPlugin from 'extract-text-webpack-plugin'\nimport config, { plugins } from './webpack.config.babel'\n\nexport const minifyPlugins = [\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where scripts are loaded 3X each.\n"
},
{
"from": "human",
"value": "/*\n * catch the 'load-scripts' event and inject the resilts into the current scope.\n */\n(function() {\n self.port.on('load-scripts', function(msg) {\n // bail out if we're in a... | javascript | chosen |
[
{
"from": "system",
"value": "Verify that power state modes are indeed active.\n"
},
{
"from": "human",
"value": "process.env.NODE_ENV = \"test\";\nvar pmset = require('./pmset');\n\nfunction ok(expr, msg) {\n if (!expr) throw new Error(msg);\n}\n\ndescribe(\"Power Management functions for ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"test: lower jasmine timeout threshold to 1000ms\"\n\nThis reverts commit ceafd55ad8a88d6c5ac3c6fc6c2d0735a95cc5ad.\n"
},
{
"from": "human",
"value": "import {BrowserDomAdapter} from 'angular2/platform/browser';\nBrowserDomAdapter.makeCurrent();\njasmine.DEF... | javascript | chosen |
[
{
"from": "system",
"value": "Add module name to source header\n"
},
{
"from": "human",
"value": "/**\n * @preserve Author: Darren Schnare\n * Keywords: javascript,binding,bind,property,list,observer,observable\n * License: MIT ( http://www.opensource.org/licenses/mit-license.php )\n * Repo: htt... | javascript | chosen |
[
{
"from": "system",
"value": "Disable submit button when checking login\n"
},
{
"from": "human",
"value": "$('#accountDetails').submit(function(e) {\n $('.loader .fa-circle-o-notch').show();\n $('.loader .fa-check-circle').hide();\n $('.loader .fa-times-circle').hide();\n $.post('com... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Allow only one listener to be subscribed to the background store\"\n\nThis reverts commit 598c160833271897c9f564b0bad7f71d2f8e39f3.\n"
},
{
"from": "human",
"value": "export default function createDevToolsStore(onDispatch) {\n let currentState = {\n com... | javascript | chosen |
[
{
"from": "system",
"value": "Use relative path for log readability\n"
},
{
"from": "human",
"value": "import fs from 'fs'\n\n/**\n * @class\n */\nexport default class Action {\n /**\n * @param {String} name\n */\n constructor({ name }) {\n this.name = name;\n }\n\n /**\n * @return ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix getAll returning an empty collection\n"
},
{
"from": "human",
"value": "define(function (require) {\n \"use strict\";\n\n var React = require('react/addons'),\n Router = require('react-router'),\n stores = require('stores'),\n ResourceRequest = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Add some logging at install time\n\nOtherwise, it's tough to know if this code executed.\n"
},
{
"from": "human",
"value": "/*global chrome, hwRules */\nchrome.runtime.onInstalled.addListener(function(details) {\n // Install declarative content rules\n\n if (d... | javascript | chosen |
[
{
"from": "system",
"value": "Correct static URL in JS\n"
},
{
"from": "human",
"value": "function hgvsValidation(element) {\n if (element.val().length > 2) {\n $('#result_' + element.attr('id')).html('<i>Please wait...</i>');\n $.get(window.HGVS_URL, { 'code': element.val() }, ... | javascript | chosen |
[
{
"from": "system",
"value": "Update indentation of variable assignment\n"
},
{
"from": "human",
"value": "module.exports = {\n\tPASSED_LINTING: '{a} lint free.',\n\tFAILED_LINTING: 'Formatting check failed.',\n\tINDENTATION_TABS: 'Unexpected spaces ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable console log for now\n"
},
{
"from": "human",
"value": "import adsEnabled from './adsEnabledStatus'\nimport prebid from './prebid/prebidModule'\nimport prebidConfig from './prebid/prebidConfig'\nimport amazonBidder from './amazon/amazonBidder'\nimport handleAd... | javascript | chosen |
[
{
"from": "system",
"value": "Add intl-tel-input images to webpack processing\n"
},
{
"from": "human",
"value": "module.exports = {\n scanForCssSelectors: [],\n whitelistPatterns: [],\n webpackPlugins: [],\n install: [],\n copy: [\n {from: 'app/cortex/foundation/resources/i... | javascript | chosen |
[
{
"from": "system",
"value": "Update with reference to global nav partial\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyon... | javascript | chosen |
[
{
"from": "system",
"value": "Handle answer not found on page\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst xray = require('x-ray')\nconst x = xray()\n\nmodule.exports = query => {\n return new Promise((resolve, reject) => {\n let q = null\n\n if (query.split(' ').length > 1) {... | javascript | chosen |
[
{
"from": "system",
"value": "Use text index on Lookup.text\n"
},
{
"from": "human",
"value": "/* Catalog search - db schema\n\n Copyright 2014 Commons Machinery http://commonsmachinery.se/\n\n Distributed under an AGPL_v3 license, please see LICENSE in the top dir.\n*/\n\n'use strict';\n\nv... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to avoid dynamic module resolution\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Allocate a buffer having a specified number of bytes.\n*\n* @module @stdlib/buffer/alloc-unsafe\n*\n* @example\n* var allocUnsafe = require( '@stdlib/buffer/alloc-... | javascript | chosen |
[
{
"from": "system",
"value": "Make organizationMemberSlug unique, add warning\n"
},
{
"from": "human",
"value": "import Relay from 'react-relay';\n\nexport const query = () => Relay.QL`\n query {\n organizationMember(slug: $slug)\n }\n`;\n\nexport const prepareParams = (params) => {\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Add contacts groups default parameter\n"
},
{
"from": "human",
"value": "var ActionAbstract = require('./action-abstract');\n\n/**\n * get list of groups\n * @see http://dev.smsapi.pl/#!/contacts%2Fgroups/list\n * @param {Object} options\n * @extends ActionAbstract... | javascript | chosen |
[
{
"from": "system",
"value": "Use custom sugar build for deleting items\n"
},
{
"from": "human",
"value": "const timetrack = require('./timetrack');\nconst Sugar = require('sugar-date');\nconst calculateDuration = require('./calculateDuration');\n\nmodule.exports = (pluginContext) => {\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bad search and replace\n"
},
{
"from": "human",
"value": "var vumigo = require('vumigo_v02');\nvar BaseError = vumigo.utils.BaseError;\n\n\nvar OnaValidationError = BaseError.extend(function(self, message) {\n /**class:OnaValidationError\n Thrown for inval... | javascript | chosen |
[
{
"from": "system",
"value": "Remove API since we aren't using it"
},
{
"from": "human",
"value": "/**\n * Angular.js application configuration\n *\n * @author eugene.trounev(a)gmail.com\n */\n\nangular.module('app', [\n 'ngRoute',\n 'com.likalo.ui'\n])\n .constant('APP_META', {\n title: '... | javascript | chosen |
[
{
"from": "system",
"value": "Change prepareRequest to take advantage of axios transform\n"
},
{
"from": "human",
"value": "import { camelizeKeys, decamelizeKeys } from 'humps'\n\nconst DataTransformations = {\n prepareRequest (data, headers) {\n if (headers && headers['Content-Type'] === un... | javascript | chosen |
[
{
"from": "system",
"value": "Move propTypes to CardHeader class\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Icon, CardItem, Text, Body } from 'native-base';\n\n// Card header with icon, title and subtitle.\nexport default class CardHeader extends Compo... | javascript | chosen |
[
{
"from": "system",
"value": "Use MediaSource.isTypeSupported as a decoding info fallback.\n"
},
{
"from": "human",
"value": "/**\n * Returns decoding info for a given media configuration.\n *\n * @param {MediaDecodingConfiguration} configuration Media configuration.\n * @returns {Promise<MediaC... | javascript | chosen |
[
{
"from": "system",
"value": "Make class better (extends net.Server instead)\n"
},
{
"from": "human",
"value": "import net from 'net';\nimport uuid from 'uuid';\nimport { EventEmitter } from 'events';\n\n/**\n * Server class\n */\nclass Server extends EventEmitter {\n /**\n * Constructor\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change foreign_key for interes area\n"
},
{
"from": "human",
"value": "module.exports = function(sequelize, DataTypes) {\n return sequelize.define('interesPoint', {\n id: {\n type: DataTypes.BIGINT,\n field: 'id',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add char count and disable submit feature\n"
},
{
"from": "human",
"value": "import React from 'react';\n\n\nexport default class MessageInput extends React.Component {\n constructor() {\n super();\n this.state = {\n input: '',\n };\n }\n\n submit... | javascript | chosen |
[
{
"from": "system",
"value": "Update mock to be a bit closer to generated content\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar extensions = function(){\n global.AI = {};\n\n AI.extensions = {\n commands: {\n test: (function() {\n var module = {};... | javascript | chosen |
[
{
"from": "system",
"value": "Fix timeout issue when running end to end test in local environment.\n\nThis issue is caused by saving code coverage result file to a\nnon-exist folder(/tmp/.nay_output).\n\nTo fix this issue, two check points were added.\n1. The code coverage result file will not be genreated ... | javascript | chosen |
[
{
"from": "system",
"value": "Reset the loading state after the site socket gets disconnected.\n\nThis fixes a bug where after navigating to a route which is not below\nthe SiteConnectedFilter, the site socket would get disconnected, but all\nthe loading state would remain \"loaded\". Then after going back ... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to hash locationType in hopes of fixing demo app\n"
},
{
"from": "human",
"value": "module.exports = function (environment) {\n var ENV = {\n APP: {},\n rootURL: '/',\n EmberENV: {\n FEATURES: {}\n },\n googleFonts: [\n 'Roboto:300'\... | javascript | chosen |
[
{
"from": "system",
"value": "Make mapDispatchToProps a little shorter\n"
},
{
"from": "human",
"value": "// @flow\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { connect, Provider } from 'react-redux';\n\nimport store from './store';\nimport { increment, decrement } f... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust game size to fit parent element\n"
},
{
"from": "human",
"value": "import 'pixi';\nimport 'p2';\nimport Phaser from 'phaser';\n\nimport BootState from './states/Boot';\nimport SplashState from './states/Splash';\nimport GameState from './states/Game';\n\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Make env compliant with heroku\n"
},
{
"from": "human",
"value": "require('dotenv').config();\nrequire('./lib/mongo')(process.env.MONGODB_URI || 'mongodb://localhost/test');\nconst syncTask = require('./lib/sync/index');\n\nsyncTask({\n host: process.env.HOST,\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Add capital S to JavaScript\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport {Select, Card} from '@shopify/polaris';\nimport './ConferenceFilter.css';\n\nexport default class ConferenceFilter extends Component {\n render() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use props to draw content in preview"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\n\nclass VideoPreview extends Component {\n render() {\n return (\n <div></div>\n );\n }\n}\n\nVideoPreview.propTypes = {\n videoId: React... | javascript | chosen |
[
{
"from": "system",
"value": "Use reduce instead of forEach.\n"
},
{
"from": "human",
"value": "const _ = require('lodash')\nconst Promise = require('promised-io/promise')\nconst { parse } = require('../../parsers/less-variable')\nconst { LineReader } = require('../../io')\n\nmodule.exports = (f... | javascript | chosen |
[
{
"from": "system",
"value": "Store latest pagespeed results in main view\n"
},
{
"from": "human",
"value": "(function() {\n\t'use strict';\n\tangular.module('pagespeedApp').controller('pagespeedDemoController', pagespeedDemoController);\n\n\tpagespeedDemoController.$inject = [];\n\n\tfunction p... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"remove redundatn end points\"\n\nThis reverts commit 4703d26683e4b58510ff25c112dbf2a7fef8b689."
},
{
"from": "human",
"value": "var local = 'http://localhost:55881'\nvar dev = 'https://dev-api-streetsupport.azurewebsites.net'\nvar staging = 'https://staging... | javascript | chosen |
[
{
"from": "system",
"value": "Fix null amounts being displayed as 0\n\nFixes #388\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport numeral from 'numeral';\n\nconst { Helper } = Ember;\nconst defaultFormat = '0,0[.]00 a';\n\nexport function formatAmount(params/*, hash*/) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add extra check for environment variables\n\nisWebAppBuild will not return true if either the environment variables\nare set to production or WEBAPP is set.\n"
},
{
"from": "human",
"value": "import { REGTEST_CORE_API_ENDPOINT } from '../account/store/settings/defa... | javascript | chosen |
[
{
"from": "system",
"value": "Update printed message to point to up to date docs\n\nHelps with #552"
},
{
"from": "human",
"value": "var fs = require('fs-extra');\nvar path = require('path');\n\nvar printMessage = require('print-message');\n\n\ntry {\n fs.copySync(path.join(__dirname, 'src', 't... | javascript | chosen |
[
{
"from": "system",
"value": "Add fix to ace worker loading error\n"
},
{
"from": "human",
"value": "hqDefine('app_manager/js/download_index_main',[\n 'jquery',\n 'underscore',\n 'ace-builds/src-min-noconflict/ace',\n 'app_manager/js/download_async_modal',\n 'app_manager/js/source... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test to better check result.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar chai = require('chai');\nvar expect = chai.expect;\n\nvar path = require('path');\nvar loadRCFiles = require('../../lib/loadRCFiles');\n\nvar fixturesDir = path.resolve(__dirnam... | javascript | chosen |
[
{
"from": "system",
"value": "Add server routing to authentication app\n"
},
{
"from": "human",
"value": "import express from 'express';\nimport apolloMiddleware from 'react/apollo/middleware';\n\nimport { StaticRoutes } from './client/index';\n\nconst middlewareStack = [\n apolloMiddleware,\n]... | javascript | chosen |
[
{
"from": "system",
"value": "Add get weather location id\n\n"
},
{
"from": "human",
"value": "import { connect } from 'react-redux'\nimport Weather from './weather'\nimport { getLocation as getWeatherLocation } from './weatherActions'\nimport store from '../app/store'\n\nconst getLocation = (lo... | javascript | chosen |
[
{
"from": "system",
"value": "Add a space or the twitter url is broked.\n"
},
{
"from": "human",
"value": "const html = require('choo/html');\n\nmodule.exports = (state, prev, send, issue) => {\n if (issue) {\n const tweet = encodeURIComponent('I just called my rep to ' + issue.name.substrin... | javascript | chosen |
[
{
"from": "system",
"value": "Update name registration success message, removed keep Blockstack online for 1 hour.\n"
},
{
"from": "human",
"value": "import PropTypes from 'prop-types'\nimport React from 'react'\nimport { Link } from 'react-router'\n\nconst RegistrationSubmittedView = (props) =>... | javascript | chosen |
[
{
"from": "system",
"value": "Write test that checks that Google Analytics is rendered\n\nIf environment variable `GOOGLE_ANALYTICS_ID` is present, then\nGoogle Analytics should be rendered. (The inverse case should\nhold as well.)\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Modu... | javascript | chosen |
[
{
"from": "system",
"value": "[NGRINDER-463] Add the new process/thread policy"
},
{
"from": "human",
"value": "\nfunction getProcessCount(total) {\n\tif (total < 2) {\n\t\treturn 1;\n\t}\n\t\n\treturn 2;\n}\n\nfunction getThreadCount(total) {\n\tif (total < 2) {\n\t\treturn 1;\n\t}\n\treturn pa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mistaken usage of require(reify/lib/runtime).enable.\n\nRelated fix in meteor-babel@0.24.4:\nhttps://github.com/meteor/babel/commit/786194734c693aef91dc1ee3b9e7166d8c54fff6\n"
},
{
"from": "human",
"value": "// Install ES2015-complaint polyfills for Object, Arra... | javascript | chosen |
[
{
"from": "system",
"value": "Add accounts page to admin v1"
},
{
"from": "human",
"value": "/* \n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the editor.\n */\n\nangular.mo... | javascript | chosen |
[
{
"from": "system",
"value": "Add custom route to API with db.json\n"
},
{
"from": "human",
"value": "// server.js\n\n\"use strict\";\n\nconst jsonServer = require('json-server');\nconst server = jsonServer.create();\nconst middlewares = jsonServer.defaults();\n\nconst path = require(\"path\");\... | javascript | chosen |
[
{
"from": "system",
"value": "Reset generators lib afterEach test\n"
},
{
"from": "human",
"value": "/* global describe, it, expect */\nimport obey from 'src/index'\nimport modelFixtures from 'test/fixtures/generators'\n\ndescribe('integration:generators', () => {\n describe('synchronous', () =... | javascript | chosen |
[
{
"from": "system",
"value": "Use Lodash `omit` instead of `delete`\n"
},
{
"from": "human",
"value": "const isArrayBuffer = require('lodash/isArrayBuffer');\nconst isFunction = require('lodash/isFunction');\nconst isUndefined = require('lodash/isUndefined');\n\n\n// type Context :: {\n// writ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Koa2 hot middleware configuration\n"
},
{
"from": "human",
"value": "module.exports = ({ output }) => {\n return {\n log: false,\n path: `${output.publicPath}/__webpack_hmr`,\n };\n};\n"
},
{
"from": "gpt",
"value": "module.exports = ({ outpu... | javascript | chosen |
[
{
"from": "system",
"value": "Make codemirror plugins depends on codemirror\n\nIt is important codemirror is loaded before those as otherwise it will give\ncertain nasty errors.\n"
},
{
"from": "human",
"value": "require.config({\n paths: {\n jquery: '../components/jquery/jquery',\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Implement basic list slicing operations\n"
},
{
"from": "human",
"value": "export function* map(fn, iterable) {\n for (const value of iterable) {\n yield fn(value);\n }\n}\n\nexport function* filter(fn, iterable) {\n for (const value of iterable) {\n if (fn... | javascript | chosen |
[
{
"from": "system",
"value": "Increase test timeout for Gitter beforeEach tests\n"
},
{
"from": "human",
"value": "/* jshint mocha: true */\n'use strict';\n\nconst assert = require('assert');\nconst gitter = require('../lib/gitter');\nconst jsonist = require('jsonist');\n\nlet nodes;\nlet post =... | javascript | chosen |
[
{
"from": "system",
"value": "Add test entry with expect\n\nThe goal is to test the asserts.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst {expect} = require ('chai');\n\nfunction get (v) {\n switch (v) {\n case 1: return 'foo';\n case 2: return 'bar';\n }\n}\n\ndescribe ('a', fu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix notification binding for info\n"
},
{
"from": "human",
"value": "// module VSCode.Notifications\n\nexports.showError = function(s) { return function() { require('vscode').window.showErrorMessage(s); return {}; }; }\n\nexports.showInfo = function(s) { return func... | javascript | chosen |
[
{
"from": "system",
"value": "Add check for ReactiveVar variable"
},
{
"from": "human",
"value": "// Allow easy setting of template instance's parent (or ancestor) field\n\nBlaze.TemplateInstance.prototype.set = function set(fieldName, value) {\n var template = this;\n\n while (template) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make the default language easily configurable\n"
},
{
"from": "human",
"value": "var available_langs = ['en', 'de'];\n\n// Determine language from browser variable\nvar lang = navigator.language || navigator.browserLanguage;\n\nif ($.inArray(lang, available_langs) =... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for Swig template compile\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar should = require('chai').should(); // eslint-disable-line\n\ndescribe('swig', function() {\n var r = require('../../../lib/plugins/renderer/swig');\n\n it('normal', function... | javascript | chosen |
[
{
"from": "system",
"value": "Replace deprecated \"customEslintPath\" with \"eslintOverride\" in template used by grommet init.\n\nSigned-off-by: Steve Mays <9ce5770b3bb4b2a1d59be2d97e34379cd192299f@accuzonix.com>\n"
},
{
"from": "human",
"value": "import path from 'path';\n\nexport default {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add possibility skip \"change\" event after \"add\", \"remove\", \"removeAll\" methods\n"
},
{
"from": "human",
"value": "describe(\"bootstrap-tagsinput\", function() {\n\n describe(\"events\", function() {\n testTagsInput('<input type=\"text\" />', function() {... | javascript | chosen |
[
{
"from": "system",
"value": "[Android] Work around fetch-induced app breakage\n"
},
{
"from": "human",
"value": "/**\n * Loads a script from a specific URL. React Native cannot load a JS\n * file/resource/URL via a <script> HTML element, so the implementation\n * fetches the specified <tt>url</... | javascript | chosen |
[
{
"from": "system",
"value": "base1: Increase the number of seconds before giving up on loading a script\n\nThe default is 7 seconds, which is causing timeouts on slow networks\n\nCloses #2488\nReviewed-by: Stef Walter <8a7fbf0f15d3ad982af54ef28f5c117d2494b76c@redhat.com>\n"
},
{
"from": "human",
... | javascript | chosen |
[
{
"from": "system",
"value": "Modify sanji window compiler task\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar runSequence = require('run-sequence');\nvar browserSync = require('browser-sync');\n\ngulp.task('watch', ['browser-sync', 'html', 'sass', 'js'], fu... | javascript | chosen |
[
{
"from": "system",
"value": "Update comments in default config\n"
},
{
"from": "human",
"value": "// Learn more about configuration: https://github.com/johnste/finicky/wiki/Configuration\n\nmodule.exports = {\n defaultBrowser: \"Safari\"\n}\n"
},
{
"from": "gpt",
"value": "// Use h... | javascript | chosen |
[
{
"from": "system",
"value": "Clear selected countries correctly when switching sectors\n"
},
{
"from": "human",
"value": "angular.module('yds').controller('Dashboard2Controller', ['$scope', 'DashboardService',\n function($scope, DashboardService) {\n var scope = $scope;\n\n // ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to check if module sub-generator loads\n"
},
{
"from": "human",
"value": "/*global describe, beforeEach, it*/\n'use strict';\nvar assert = require('yeoman-generator').assert;\n\ndescribe('ngbp module', function () {\n it('can be imported without blowing up... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for random sentence always displaying the same sentence in Internet Explorer 8.\n"
},
{
"from": "human",
"value": "/*\n Tatoeba Project, free collaborativ creation of languages corpuses project\n Copyright (C) 2009 TATOEBA Project(should be changed)\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable redux logger in test environment\n"
},
{
"from": "human",
"value": "import {createHistory} from 'history';\nimport {createStore, applyMiddleware, compose, combineReducers} from 'redux';\nimport thunkMiddleware from 'redux-thunk';\nimport {reduxReactRouter} f... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.