conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Apply 'table' css class to all tables\n"
},
{
"from": "human",
"value": "\n/* Prettyify */\n$( document ).ready(function() {\n prettyPrint();\n});\n\n\n/* Scrollspy */\nvar navHeight = $('.navbar').outerHeight(true) + 10\n\n$('body').scrollspy({\n target: '.bs... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra call to to FileRenderer.start\n\nh/t @icereval @chrisseto\n"
},
{
"from": "human",
"value": "var FileRenderer = require('../filerenderer.js');\nvar FileRevisions = require('../fileRevisions.js');\n\nif (window.contextVars.renderURL !== undefined) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "REF: Make sure we use single quotes\n"
},
{
"from": "human",
"value": "var sFormat = require( 'stringformat' );\nvar transformTools = require( 'browserify-transform-tools' );\nvar path = require( 'path' );\n\nvar options = {\n excludeExtensions: [ '.json' ],\n eva... | javascript | chosen |
[
{
"from": "system",
"value": "Test against all types of errors\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function (t, a) {\n\ta(t(), false, \"Undefined\");\n\ta(t(1), false, \"Primitive\");\n\ta(t({}), false, \"Objectt\");\n\ta(t({ toString: function () { return '[obje... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure the compiler post parameter is an allowed one\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst router \t= express.Router();\nconst multer = require('multer');\nconst upload = multer({dest: 'uploads/'});\nconst path = requi... | javascript | chosen |
[
{
"from": "system",
"value": "Add functions for sorting and finding featured products\n"
},
{
"from": "human",
"value": "import r from 'ramda';\nimport products from '../mock-data/products.json';\n\nconst getBrands = r.compose(r.uniq, r.map(r.prop('brand')));\nconst brands = getBrands(products);... | javascript | chosen |
[
{
"from": "system",
"value": "Add a way to specify which files to target\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst fs = require('fs')\nconst program = require('commander')\nconst meta = require(`${process.cwd()}/package.json`)\n\ntry {\n let ver = meta.version\n\n program... | javascript | chosen |
[
{
"from": "system",
"value": "Add export and import newSortDataBy\n"
},
{
"from": "human",
"value": "export {\n formatDate,\n formatDateAndTime,\n parsePositiveInteger,\n truncateString,\n parsePositiveFloat,\n formatExpiryDate,\n parseExpiryDate,\n formatPlural,\n} from 'sussol-utilitie... | javascript | chosen |
[
{
"from": "system",
"value": "Add a Provider/registry to test render method.\n"
},
{
"from": "human",
"value": "/**\n * External dependencies\n */\nimport { render } from '@testing-library/react';\nimport PropTypes from 'prop-types';\n\n/**\n * WordPress dependencies\n */\nimport { Fragment } fr... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Node RSS restart interval in favor of kubernetes cron job\n"
},
{
"from": "human",
"value": "var _ = require('lodash'),\n async = require('async'),\n checkForFiling = require('./check'),\n request = require('request'),\n models = require('../../mo... | javascript | chosen |
[
{
"from": "system",
"value": "Set selection when editing an entity from manuscript view.\n"
},
{
"from": "human",
"value": "import { Command } from 'substance'\n\n/*\n This command intended to switch view and scroll to the selected node.\n Command state becoming active only for certain type of... | javascript | chosen |
[
{
"from": "system",
"value": "Verify that paste size is < 2MB\n"
},
{
"from": "human",
"value": "function(newDoc, oldDoc, userCtx) {\n if (oldDoc){\n if (userCtx.roles.indexOf(\"_admin\") == -1) {\n throw({forbidden: \"Only database admins are allowed to update pastes/comments\"});\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add boolean form element provider field\n"
},
{
"from": "human",
"value": "angular.module('app.services')\n.provider('formElementProvider', function() {\n\t'use strict';\n\n\tvar templates = {\n\t\t'String': function(field) {\n\t\t\tif(field && field.validation.allo... | javascript | chosen |
[
{
"from": "system",
"value": "Use code as id attribute for module model\n"
},
{
"from": "human",
"value": "define(['backbone', 'common/utils/padTwo'], function(Backbone, padTwo) {\n 'use strict';\n\n // Convert exam in Unix time to 12-hour date/time format. We add 8 hours to\n // the UTC time... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo with function added to prototype\n"
},
{
"from": "human",
"value": "/**\n * Don't do \"x <= y\", just do \"x < (y + 1)\".\n * @param {number} x\n * @param {number} y\n * @see {@link http://redd.it/3rc2rm}\n */\nvar isXSmallerThanOrEqualsToY = function(x, y)... | javascript | chosen |
[
{
"from": "system",
"value": "Insert the project URL to script header.\n"
},
{
"from": "human",
"value": "/*\n * Movable Type DataAPI SDK for JavaScript v1\n * Copyright (c) 2013 Six Apart, Ltd.\n * This program is distributed under the terms of the MIT license.\n *\n * Includes jQuery JavaScrip... | javascript | chosen |
[
{
"from": "system",
"value": "Reset apollo store when logging out\n\nfbshipit-source-id: 957b820\n"
},
{
"from": "human",
"value": "import Analytics from '../api/Analytics';\nimport LocalStorage from '../storage/LocalStorage';\nimport ApolloClient from '../api/ApolloClient';\nimport Auth0Api fro... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Fix axios import for UMD build\n"
},
{
"from": "human",
"value": "const axios = require(`axios`);\n\nexport default itemIdentifier => axios.get(`items`, {\n baseURL: `https://track.bpost.be/btr/api/`,\n responseType: `json`,\n params: { itemIdentifier },\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Fix webpack config to ensure it outputs a correct umd bundle\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\n\nconst distPath = path.join(__dirname, 'dist');\nconst srcPath = path.join(__dirname, 'src');\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Add react-router to the library\n"
},
{
"from": "human",
"value": "// Webpack configuration to use with the build task.\n\nvar webpack = require('webpack');\n\nmodule.exports = {\n\n // Create also a \"lib\" chunk with common libraries, e.g. react.\n entry: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Stop AJAX updater consuming ever-increasing memory\"\n"
},
{
"from": "human",
"value": "(function(Modules) {\n \"use strict\";\n\n var queues = {};\n var dd = new diffDOM();\n var timer;\n\n var getRenderer = $component => response => function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update data stories to use datasets from private export tool\n"
},
{
"from": "human",
"value": "/* eslint-disable */\nimport React from 'react';\nimport { configure, addDecorator, addParameters } from '@storybook/react';\nimport { withNotes } from '@storybook/addon-... | javascript | chosen |
[
{
"from": "system",
"value": "Revert afterInstall -> beforeInstall change. afterInstall is fine.\n"
},
{
"from": "human",
"value": "var path = require('path');\n\nmodule.exports = {\n description: 'Initialize files needed for typescript compilation',\n\n files: function() {\n return [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JSCS in default blueprint\n"
},
{
"from": "human",
"value": "/* globals module */\nmodule.exports = {\n afterInstall: function() {\n var _self = this;\n return this.addBowerPackagesToProject([\n { name: 'localforage', target: '1.3.3' }\n ]).then(f... | javascript | chosen |
[
{
"from": "system",
"value": "Use duck-typing instead of strong type checking\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\nvar Authority = require('../authority');\n\nvar defaultOptions = {\n\tassignField: 'auth'\n};\n\nfunction identify(auth, opts) {\n\topts = _.defaults(opts ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"point more info link to mailto\"\n\nThis reverts commit b49158110562840fc2fa7400abefb80f3f2eaa09.\n"
},
{
"from": "human",
"value": "// Page modules\nvar FastClick = require('fastclick')\nvar nav = require('./nav.js')\nvar socialShare = require('./social-sh... | javascript | chosen |
[
{
"from": "system",
"value": "Add reducer for BoardList favourites + request invalidation\n"
},
{
"from": "human",
"value": "import initialState from './initialState';\nimport { \n BOARD_LIST_LOADED, \n BOARD_LIST_REQUESTED,\n} from '../constants'\n\n// ADD_FAVOURITE_BOARD\n// TODO: Add bo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove deprecated lifecycle methods from ObserveModel\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport ModelObserver from '../models/model-observer';\n\nexport default class ObserveModel extends React.Compo... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional test for add method\n"
},
{
"from": "human",
"value": "var chai = require('chai')\nvar mathModule = require('./math-module')\n\nvar expect = chai.expect\n\ndescribe('math module', function () {\n describe('add', function () {\n it('should correctl... | javascript | chosen |
[
{
"from": "system",
"value": "Use dasherized urls for path names\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\n\nexport default DS.RESTAdapter.extend({\n defaultSerializer: 'endpoints',\n buildURL: function(type, id, record) {\n var url = this._super(type, id, record);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Normalize paths on Windows to Unix convention\n\nConvert “\\” to “/“ in relative paths in fs.list\n"
},
{
"from": "human",
"value": "var Q = require(\"q\");\nvar fs = require(\"fs\");\nvar fsExtra = require(\"fs-extra\");\nvar Ignore = require(\"fstream-ignore\");\n... | javascript | chosen |
[
{
"from": "system",
"value": "Template: Add error checking of api_result\n"
},
{
"from": "human",
"value": "(function (env) {\n \"use strict\";\n env.ddg_spice_<: $lia_name :> = function(api_result){\n\n // Validate the response (customize for your Spice)\n if (api_result.err... | javascript | chosen |
[
{
"from": "system",
"value": "Make challenges the initial route\n\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { TabNavigator, addNavigationHelpers } from 'react-navigation'\nimport { connect } from 'react-redux'\nimport Challenges from './components/Challenges'\nimport F... | javascript | chosen |
[
{
"from": "system",
"value": "Add User Class Props To Default Textarea Props\n\nAdd User class props to the default textarea props and the default form\nclass for any text input fields.\n"
},
{
"from": "human",
"value": "let React = require(\"react\")\nlet {errorList, sizeClassNames, formGroupCx... | javascript | chosen |
[
{
"from": "system",
"value": "[test] Fix tests under node 0.8\n"
},
{
"from": "human",
"value": "var http = require('http'),\n assert = require('assert'),\n cb = require('assert-called'),\n jsonquest = require('../');\n\nvar server = http.createServer(cb(function (req, res) {\n var dat... | javascript | chosen |
[
{
"from": "system",
"value": "Add failing tests for regex meta characters\n"
},
{
"from": "human",
"value": "var tape = require('tape'),\n comboBreaker = require('..'),\n redundant,\n broken\n;\n\nredundant = 'I really really really really love pizza.';\n\ntape('combo breaking', functio... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out extra logging on errorHandler\n"
},
{
"from": "human",
"value": "import { alerts } from '../stores/alerts'\n\n// Handle axios errors from backend API so that they can be shown\nexport function errorHandler (error) {\n if (error.response) {\n co... | javascript | chosen |
[
{
"from": "system",
"value": "Add animation for button nav on IPhone\n"
},
{
"from": "human",
"value": "$(document).ready(function () {\n\n $('.side-nav-container').hover(function () {\n $(this).addClass('is-showed');\n $('.kudo').addClass('hide');\n }, function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add saved flash on outcome save\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { sort, filterBy } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { task, timeout } from 'ember-concurre... | javascript | chosen |
[
{
"from": "system",
"value": "Remove \"The Ranch\" full title; Trakt search shows it first now\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003).\n I left this object because it could be usefu... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct ID when adding to cart\n"
},
{
"from": "human",
"value": "SpreeStore.module('Products.Show',function(Show, SpreeStore, Backbone,Marionette,$,_){\n Show.Product = Backbone.Marionette.ItemView.extend({\n tagName: 'div',\n className: 'product',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable (really annoying) spelling auto correct.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst getDictionaries = require('./hunspell-dictionaries').getDictionaries;\nconst getSpellChecker = require('./hunspell-checker');\nconst webframe = require('web-fr... | javascript | chosen |
[
{
"from": "system",
"value": "Remove custom `order` properties from dependencies\n"
},
{
"from": "human",
"value": "const nest = require('depnest')\nconst { h, Value, when } = require('mutant')\n\nexports.gives = nest('app.html.menu')\n\nexports.needs = nest({\n 'app.html.menuItem': 'map',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use bounding on autocomplete results\n"
},
{
"from": "human",
"value": "(function() {\n var app = angular.module('itineraryApp', ['ngAutocomplete']); // initialize app\n\n app.controller('autocompCtrl', function ($scope) {\n // see http://plnkr.co/edit/... | javascript | chosen |
[
{
"from": "system",
"value": "[JSHint] Fix column number in report\n\nRepported column was off for tab-style indentation\n"
},
{
"from": "human",
"value": "var util = require('util');\n\nvar jshint = require('jshint').JSHINT;\n\nvar DefaultValidator = require('./DefaultValidator');\n\nvar Valida... | javascript | chosen |
[
{
"from": "system",
"value": "Set dataType of fetchTemplate to \"text.\"\r\n\r\nThis will ensure that the results of the jQuery.get() method come back as plain text. If you don't set this, the results of a simple layout with nothing but a block level element will return as a Document Object."
},
{
"... | javascript | chosen |
[
{
"from": "system",
"value": "Add styles for loading text view/text\n"
},
{
"from": "human",
"value": "import { StyleSheet, Dimensions } from 'react-native';\n\nexport default StyleSheet.create({\n mainContainer: {\n // flex: 3,\n width: Dimensions.get('window').width * .97,\n height: ... | javascript | chosen |
[
{
"from": "system",
"value": "Make OneLineInput form capable of hanlding submit events\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nimport { connect } from 'react-redux'\n\nclass Message extends React.Component {\n render() {\n return (\n <div>\n {this.props.au... | javascript | chosen |
[
{
"from": "system",
"value": "Set rename and copy url\n"
},
{
"from": "human",
"value": "/* global define */\ndefine(['app'], function (app) {\n 'use strict';\n\n app.config(function (fileManagerConfigProvider) {\n var defaults = fileManagerConfigProvider.$get();\n\n fileManagerConfigPro... | javascript | chosen |
[
{
"from": "system",
"value": "Sort selector times, highest time first\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction RunSelectorStats() {\n\n var result = {};\n var unused_selectors = [];\n result.unused_selectors = unused_selectors;\n var selector_times = [];\n resu... | javascript | chosen |
[
{
"from": "system",
"value": "Rename infogain label to entropy\n"
},
{
"from": "human",
"value": "const way = require('senseway');\nconst mcbsp = require('mcbsp');\nconst renderWay = require('./renderWay');\n\nmodule.exports = (model, dispatch) => {\n const container = document.createElement('d... | javascript | chosen |
[
{
"from": "system",
"value": "Build gc-orders-server from commit 855bd30 on branch master\n"
},
{
"from": "human",
"value": "let path = require('path');\nlet cors = require('cors');\n\nmodule.exports = function(app) {\n app.use(cors());\n // app.use('/', function (req, res) { res.json({mes... | javascript | chosen |
[
{
"from": "system",
"value": "Fix user timeout setInterval interval value\n"
},
{
"from": "human",
"value": "if (Rooms.find().count() === 0) {\n Meteor.call('createRoom');\n}\n\nMeteor.publish('rooms', function() {\n return Rooms.find();\n});\n\nRooms.allow({\n insert: ()=> false,\n upda... | javascript | chosen |
[
{
"from": "system",
"value": "Test that an instance of the index is looked up\n"
},
{
"from": "human",
"value": "import Index from 'appkit/routes/index';\n\nvar route;\nmodule(\"Unit - IndexRoute\", {\n setup: function(){\n var container = isolatedContainer([\n 'route:index'\n ]);\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust query selector for location of image\n"
},
{
"from": "human",
"value": "window.addEventListener(\"click\", notifyExtension);\n\nfunction notifyExtension(e) {\n console.log(\"igcs.js: click on ${e}\");\n if (e.target.classList.contains(\"coreSpriteHeartFull\... | javascript | chosen |
[
{
"from": "system",
"value": "Update default create method to return instance id\n"
},
{
"from": "human",
"value": "import {Meteor} from 'meteor/meteor';\nimport {check} from 'meteor/check';\n\nexport default function (methodName, ClassName) {\n Meteor.methods({\n [`${methodName}.create`](to... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for ~say in addition to just say\n"
},
{
"from": "human",
"value": "// (c) 2011 Richard Carter\n// This code is licensed under the MIT license; see LICENSE.txt for details.\n\n// This script handles the following functions:\n// When someone says something ... | javascript | chosen |
[
{
"from": "system",
"value": "Add require and fix the test case of send message success\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar express = require('express');\nvar request = require('supertest');\nvar logger = require('log4js').getLogger('Unit-Test');\n\nexports['Test send message... | javascript | chosen |
[
{
"from": "system",
"value": "[Closure] Convert `goog.promise.Resolver` to `goog.module` and to ES6.\nRELNOTES: n/a\n\nPiperOrigin-RevId: 412903963\nChange-Id: Ib71d583308c6154c111c9e78f2c3c0aa97b0d25a\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright The Closure Library Authors.... | javascript | chosen |
[
{
"from": "system",
"value": "Apply box props to the Box wrapper\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport Box from '../box';\nimport theme from './theme.css';\nimport Island from '.... | javascript | chosen |
[
{
"from": "system",
"value": "[fix] Remove buggy code from test suite\n"
},
{
"from": "human",
"value": "import supertest from 'supertest';\nimport app from '../index';\n\nconst request = supertest(app);\n\ndescribe('PostIt Tests', () => {\n describe('Authentication routes test', () => {\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Return boolean value in `isPlaying` function\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* global Connector */\n\nConnector.playerSelector = '.lecteur';\n\nConnector.artistSelector = '.artiste .inside_call';\n\nConnector.getTrack = function () {\n\tvar text... | javascript | chosen |
[
{
"from": "system",
"value": "Use cheaper source maps to increase build performance.\n"
},
{
"from": "human",
"value": "/*\n * This takes all bundles defined in our production webpack configuration and adds inline source maps to all of them\n * for easier debugging.\n * Any dev specific modifica... | javascript | chosen |
[
{
"from": "system",
"value": "Remove reference to dashboard services.\n"
},
{
"from": "human",
"value": "define(\n [\n \"angular\",\n \"./dataset-list-controllers\",\n \"./dataset-list-services\"\n ],\n function (angular, controllers) {\n \"use strict\";\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add fallback in case instances have URL specified directly\n"
},
{
"from": "human",
"value": "/**\n * Obtain an imageId for Cornerstone from an image instance\n *\n * @param instance\n * @returns {string} The imageId to be used by Cornerstone\n */\ngetImageId = func... | javascript | chosen |
[
{
"from": "system",
"value": "Fix incoming webhook endpoint to include buid\n"
},
{
"from": "human",
"value": "module.exports = (slackapp) =>\n function(err, req, res) {\n if (err) {\n res.status(500).send(`ERROR: ${err}`);\n } else {\n slackapp.log(`Use /incoming-webhooks/${req... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Reset regex state on exec\n"
},
{
"from": "human",
"value": "'use babel'\n\nconst COLOR_EXTRACTION_REGEXP = /rgb\\(\\d+, ?\\d+, ?\\d+\\)|rgba\\(\\d+, ?\\d+, ?\\d+, ?\\d?\\.?\\d+\\)|#[0-9a-f]{3,6}/g\n\nexport function isColor(textEditor, bufferPosition) {\n co... | javascript | chosen |
[
{
"from": "system",
"value": "Remove flash notice 'slide' animation\n\n* There are no `flash-notice`s in the application\n"
},
{
"from": "human",
"value": "//= require jquery-ui.custom.min\n//= require_directory .\n//= require jquery_nested_form\n\n// System wide behaviours\n$(function () {\n $... | javascript | chosen |
[
{
"from": "system",
"value": "Remove blue bar at top of embedFeed\n\n* Set embedFeed to be headerless\n"
},
{
"from": "human",
"value": "if(\"access_token\" in window && isOGObject()){\n yam.connect.embedFeed({\n container: '#yammer-feed',\n feedType: 'open-graph',\n network: $('meta[n... | javascript | chosen |
[
{
"from": "system",
"value": "Make search results more clickable\n\nRefs #148.\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport { Link } from 'react-router';\n\nimport {\n getAvailableTime,\n getCaption,\n getMainImage,\n getName,\n getOpeningH... | javascript | chosen |
[
{
"from": "system",
"value": "Add nb_NO to the supported i18n locales\n"
},
{
"from": "human",
"value": "module.exports = {\n i18n: {\n defaultLocale: 'en',\n locales: ['en', 'es', 'fr', 'lt']\n },\n react: {\n useSuspense: false\n }\n}\n"
},
{
"from": "gpt",
"value": "m... | javascript | chosen |
[
{
"from": "system",
"value": "Whitelist describe and it in eslint config\n"
},
{
"from": "human",
"value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"es6\": true,\n \"node\": true\n },\n \"extends\": [\"eslint:recommended\", \"plugin:react/recommended\"],\n \"parserOp... | javascript | chosen |
[
{
"from": "system",
"value": "Add in some trailing commas, cc: Kureev\n"
},
{
"from": "human",
"value": "function sampleAction() {\n console.log(arguments);\n // {'0':\n // { projects: { ios: null, android: null },\n // actions: { update: [Object], sample: [Object] } },\n // '1': { f... | javascript | chosen |
[
{
"from": "system",
"value": "Make selectors take in state\n"
},
{
"from": "human",
"value": "// @flow\nimport React from 'react'\nimport {MentionHud} from '.'\nimport {createSelector} from 'reselect'\nimport {connect, type MapStateToProps} from 'react-redux'\nimport {getSelectedInbox} from '../... | javascript | chosen |
[
{
"from": "system",
"value": "Change room to room_id in sensor model\n"
},
{
"from": "human",
"value": "module.exports = SensorModel = Backbone.Model.extend({\n urlRoot: 'http://localhost:4000/sensor/',\n idAttribute: 'sensor_id',\n defaults : {\n name: 'MySensor',\n senso... | javascript | chosen |
[
{
"from": "system",
"value": "Store options state in local db\n"
},
{
"from": "human",
"value": "import { store } from '../persistence/store';\n\nexport const SET_BOOLEAN_OPTION = 'SET_BOOLEAN_OPTION';\n\nexport function setBooleanOption(option, state) {\n return {\n type: SET_BOOLEAN_OPTION... | javascript | chosen |
[
{
"from": "system",
"value": "Fix eslint disbale rule comment\n"
},
{
"from": "human",
"value": "import Vue from \"vue\";\n\nimport NewLink from \"./components/saw-new-link.vue\";\nimport ListItem from \"./components/saw-link-element.vue\";\n\n// Importing the main css files\nimport \"./styleshe... | javascript | chosen |
[
{
"from": "system",
"value": "Fix: Support older devices with session cache\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nangular.module(\"angular-mobile-docs\")\n .factory(\"FetchService\", function ($http, $q, LocalStorageCache, baseUrl) {\n\n var getVersionList = function ()... | javascript | chosen |
[
{
"from": "system",
"value": "Update ApiClient in InfoBar test\n"
},
{
"from": "human",
"value": "import React from 'react/addons';\nimport { expect} from 'chai';\nimport { InfoBar } from 'components';\nimport { Provider } from 'react-redux';\nimport createStore from 'redux/create';\nimport ApiC... | javascript | chosen |
[
{
"from": "system",
"value": "Add fix to periods 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(program, maxOr... | javascript | chosen |
[
{
"from": "system",
"value": "Include validation for question sets and avoid updating existing entries\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst AWS = require('aws-sdk');\n\nconst dynamoDb = new AWS.DynamoDB.DocumentClient();\n\nmodule.exports.create = (event, context, callback) ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix of library declaration used in documentation generation\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use th... | javascript | chosen |
[
{
"from": "system",
"value": "Test that spread attributes are closed over\n"
},
{
"from": "human",
"value": "function render() {\n return (<div class=\"test\" id={id} {...props} key=\"test\" data-expanded={expanded} {...props.attrs}>\n <div {...props} />\n </div>);\n}\n"
},
{
"from"... | javascript | chosen |
[
{
"from": "system",
"value": "Add short pause after starting service\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar log = require('../modules/log');\n\nexports.command = function(callback) {\n var client = this;\n\n this.perform(function() {\n log.command('Starting the service...')... | javascript | chosen |
[
{
"from": "system",
"value": "Return null, not NaN if id being parsed is not a number\n"
},
{
"from": "human",
"value": "\nexport function parseId(potentialId) {\n return (Number.isNaN(potentialId) || potentialId === null) ? null : parseInt(potentialId, 10);\n}\n\nexport const TEMP = 'temp';\n"... | javascript | chosen |
[
{
"from": "system",
"value": "Add package version to output\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n\nimport RecompressJpegs from './recompress-jpegs';\nimport ImageMinifier from './image-minifier';\n\nconsole.log('Running JPEG recompression...\\n');\nnew RecompressJpegs().run('... | javascript | chosen |
[
{
"from": "system",
"value": "Remove multiline for node users\n"
},
{
"from": "human",
"value": "const through = require('through2');\nconst path = require('path');\nconst util = require('util');\n\nfunction injectReact() {\n return `\n ;const scope = window.__hmr = (window.__hmr || {});\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update ajax to remove overflow scrolling for embedded resume\n"
},
{
"from": "human",
"value": "$(document).on('ready', function() {\n\n $.ajax({\n cache: false,\n url: \"/partial-index.html\"\n }).done(function(response) {\n $('.main-container').html(res... | javascript | chosen |
[
{
"from": "system",
"value": "Rename data argument to args\n"
},
{
"from": "human",
"value": "\nseajs.config({\n base: './combo-map/'\n})\n\nseajs.on('fetch', function(data) {\n data.requestUri = data.uri.replace(/\\/(a|b|c)\\.js/, '/combo.js')\n})\n\n\ndefine(function(require) {\n\n var test... | javascript | chosen |
[
{
"from": "system",
"value": "Implement first draft of infinite scrolling for feeds\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport LoadingSpinner from '../utility/loading-spinner';\nimport PostItem from './post-item';\n\nclass PostList extends React.Component {\n should... | javascript | chosen |
[
{
"from": "system",
"value": "Make default page after signin the bolt page\n"
},
{
"from": "human",
"value": "angular.module('bolt.auth', [])\n\n.controller('AuthController', function ($scope, $window, $location, Auth) {\n $scope.user = {};\n\n $scope.signin = function () {\n Auth.signin($s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix create screen for visualisation\n"
},
{
"from": "human",
"value": "function loadCreateScreen(parentUrl, collectionId, type, collectionData) {\n var isDataVis = false; // Flag for template to show correct options in select\n\n // Load data vis creator or or... | javascript | chosen |
[
{
"from": "system",
"value": "Use PropTypes prop verification for well component.\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport { assertHas } from '../../helpers';\n\nexport default props => {\n assertHas(props, 'className');\n assertHas(props, 'icon');\n asser... | javascript | chosen |
[
{
"from": "system",
"value": "Add image with span wrapper and appendChild\n"
},
{
"from": "human",
"value": "(function(document){\n\n function setStyle(style, param) {\n var range, sel;\n\n if (window.getSelection) {\n sel = window.getSelection();\n if (sel.getRangeAt) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix filename case in require call\n"
},
{
"from": "human",
"value": "var AD = require('appdev');\nvar $ = require('jquery');\n\nmodule.exports = $.extend(AD.Comm, {\n pingServer: function(server) {\n return AD.Comm.HTTP.get({\n url: 'http://'+se... | javascript | chosen |
[
{
"from": "system",
"value": "Fix navigation was wrong when sharing equally\n"
},
{
"from": "human",
"value": "angular.module('app.controllers')\n\n.controller('optionsCtrl', function($scope, $location, OptionsService) {\n\n\t$scope.options = function(selectedOption){\n\t\tOptionsService.set(sel... | javascript | chosen |
[
{
"from": "system",
"value": "Create header refactoring of classes\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst CreateFormHeader = () => {\n const discard = () => {\n window.history.back();\n };\n\n return (\n <header className=\"challenge-create_... | javascript | chosen |
[
{
"from": "system",
"value": "Load the correct Npm tasks.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n\t// configure grunt\n\tgrunt.initConfig({\n\n\t\tpkg: grunt.file.readJSON('package.json'),\n\n\t});\n\n\t// Load plug-ins\n\t// grunt.loadNpmTasks(... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing JSDoc to getRoads\n"
},
{
"from": "human",
"value": "const getJSON = require('get-json');\nconst unique = require('array-unique');\n\n/** URL of the Overpass API being used */\nconst overpass = 'http://overpass-api.de/api/interpreter?data=';\n\n/**\n * \... | javascript | chosen |
[
{
"from": "system",
"value": "Add global object as another fallback.\n\nIn some JavaScript runtimes like NativeScript the `window` or `self` objects are not present, but the `global` is.\n\nNativeScript is using Karma as it its unit test runner and thus relies on socket.io for communication. The socket.io c... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.