conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "groupItemsById: Tweak type to accept read-only objects, too.\n"
},
{
"from": "human",
"value": "/* @flow strict */\n\nexport const caseInsensitiveCompareFunc = (a: string, b: string): number =>\n a.toLowerCase().localeCompare(b.toLowerCase());\n\nexport const numbe... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak logic used by UI to detect language\n\nChromium and WebKit based browsers have the window.navigator.languages attribute, which is an ordered array of preferred languages as configured in the browser’s settings.\n\nAlthough changing the language in Chrome results in an Acc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the signature of Visualizer\n\n ref #1\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst visualizeBoardS = Symbol('visualizeBoard')\nconst visualizeOrdersS = Symbol('visualizeOrders')\n\nmodule.exports = class Visualizer {\n constructor (mapSvg, visuali... | javascript | chosen |
[
{
"from": "system",
"value": "Remove force exclusion for rubocop\n\nFixes https://github.com/rubyide/vscode-ruby/issues/175"
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction RuboCop(opts) {\n\tthis.exe = \"rubocop\";\n\tthis.ext = process.platform === 'win32' ? \".bat\" : \"\";\n\tthi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo and add TODO\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\nconst Lint = require(\"tslint\");\n\nclass Rule extends Lint.Rules.AbstractRule {\n\tapply(sourceFile) {\n\t\treturn this.... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests to confirm message retrieval\n"
},
{
"from": "human",
"value": "var chai = require('chai');\nvar expect = chai.expect;\nvar db = require('../server/db/config');\nvar models = require('../server/db/models');\n\ndescribe('database storage', function() {\n v... | javascript | chosen |
[
{
"from": "system",
"value": "Change boolean to reporter for block with dropdowns\n"
},
{
"from": "human",
"value": "(function(ext) {\n // Cleanup function when the extension is unloaded\n ext._shutdown = function() {};\n \n\n // Status reporting code\n // Use this to report missi... | javascript | chosen |
[
{
"from": "system",
"value": "fix(cli): Read files relative from script's directory\n"
},
{
"from": "human",
"value": "const nunjucks = require('nunjucks');\nconst fs = require('fs-promise');\nconst path = require('path');\nconst yaml = require('js-yaml');\nconst Promise = require('bluebird');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix returned result and variable declaration\n"
},
{
"from": "human",
"value": "angular.module('aGeolocator', [])\n .factory('Geolocator', ['$http', '$q', function($http, $q){\n GEOIP_URL = \"https://www.telize.com/geoip\"\n\n _getIPLocation = function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix image size in chat\n"
},
{
"from": "human",
"value": "import React from \"react-native\";\n\nconst {\n\tDimensions,\n\tImage\n} = React;\n\nexport default class EmbedImage extends React.Component {\n\tshouldComponentUpdate(nextProps) {\n\t\treturn (\n\t\t\tthis.... | javascript | chosen |
[
{
"from": "system",
"value": "Swap Link to Navlink for settings active class\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Link } from 'react-router-dom';\n\nexport const Menubar = () => (\n <div className=\"sub-navigation\">\n <div className=\"limit-width\">\... | javascript | chosen |
[
{
"from": "system",
"value": "Add github programming language colrs\n"
},
{
"from": "human",
"value": "const LANGUAGE_COLORS = {\n Scala: '#BB0017',\n Clojure: '#00AA00',\n JS: '#CCAA00',\n JavaScript: '#CCAA00',\n CoffeeScript: '#CCAA00',\n Ruby: '#9B111E',\n VB: '#663300',\n 'C#': '#76... | javascript | chosen |
[
{
"from": "system",
"value": "Update application cache on device resume\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Load only within android app: cordova=android\nif (window.location.search.search('cordova') > 0) {\n (function(d, script) {\n script = d.createElement('script');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Extend the CalendarHelper with global allowEmpty from config."
},
{
"from": "human",
"value": "export { default, momentCalendar } from 'ember-moment/helpers/moment-calendar';\n"
},
{
"from": "gpt",
"value": "import Ember from 'ember';\nimport config from... | javascript | chosen |
[
{
"from": "system",
"value": "Add more fullTitles for Item\n- The Blind Side was returing Blind Side\n- The Avengers was returning Avenged\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 ... | javascript | chosen |
[
{
"from": "system",
"value": "Add note on how to fetch closest stations from the ruter API\n"
},
{
"from": "human",
"value": "var proj4 = require('proj4');\nproj4.defs('EPSG:25832', '+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs');\n\nvar lat = 59.932624;\nvar lng = 10.734738;\nvar xy = proj... | javascript | chosen |
[
{
"from": "system",
"value": "Fix month of last update\n"
},
{
"from": "human",
"value": "var months = [\"enero\", \"febrero\", \"marzo\",\n\"abril\", \"mayo\", \"junio\",\n\"julio\", \"agosto\", \"septiembre\",\n\"octubre\", \"noviembre\", \"diciembre\"];\n\nvar footer = document.getElementById... | javascript | chosen |
[
{
"from": "system",
"value": "Add Emoji list of `Binary_Property`s\n"
},
{
"from": "human",
"value": "const {\n assemble,\n writeFile,\n unicodeVersion\n} = require('./utils.js');\n\n// This includes only the binary properties required by UTS18 RL1.2 for level 1 Unicode regex\n// suppor... | javascript | chosen |
[
{
"from": "human",
"value": "Add a functioning service worker\n"
},
{
"from": "gpt",
"value": "self.addEventListener('install', function _installHandler(e) {\n e.waitUntil(\n caches.open('static')\n .then(function _addToCache(cache) {\n cache.addAll([\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove AppContainer layout from 404 page\n"
},
{
"from": "human",
"value": "import { Meteor } from 'meteor/meteor';\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Router, Route, browserHistory, IndexRoute } from 'react-router';\n\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test-projects install/build: webpack 4 changes\n"
},
{
"from": "human",
"value": "module.exports = [\n {\n mode: \"development\",\n entry: ['./src/main.js'],\n output: { filename: 'main.js' },\n target: 'electron-main',\n module: {\n rules: ... | javascript | chosen |
[
{
"from": "system",
"value": "Send console mode - code or story."
},
{
"from": "human",
"value": "function eval_clojure(code) {\n var data;\n $.ajax({\n url: \"eval.json\",\n data: { expr : code },\n async: false,\n success: function(res) { data = res; }\n })... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Update CORS provider, again...\"\n\nThis reverts commit cdd91c9eca4ea4675296e96c8ede6c8f8d7a3236.\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\n var menuUrl = \"https://www.bin4burgerlounge.com/our-downtown-menu/\";\n $.ajax({\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add case sensitive test for format in response parser\n"
},
{
"from": "human",
"value": "var ResponseParser = require('../lib/responseparser'),\n\twinston = require('winston'),\n\tfs = require('fs'),\n\tpath = require('path');\n\ndescribe('responseparser', function(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error when tick history is empty\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport EChart from './EChart';\nimport SizeProvider from '../_common/SizeProvider';\nimport createOptions from './options/MobileChartOptions';\n\nconst... | javascript | chosen |
[
{
"from": "system",
"value": "Update scatter chart default config to hide lines\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar defaultConfig = {\n\t\thover: {\n\t\t\tmode: 'single'\n\t\t},\n\n\t\tscales: {\n\t\t\txAxes: [{\n\t\t\t\ttype: 'linear',... | javascript | chosen |
[
{
"from": "system",
"value": "Add full stop to comment.\n"
},
{
"from": "human",
"value": "import * as React from \"react\";\nimport {Header} from \"./components/Header\";\nimport {Wrapper} from \"./components/Wrapper\";\nimport {BuildSnapshotContainer} from \"./components/BuildSnapshotContainer... | javascript | chosen |
[
{
"from": "system",
"value": "Handle expired projects in join lookup\n\nIf a project is expired, notify the user but do not carry on to the\njoin-this-project page.\n"
},
{
"from": "human",
"value": "function handle_lookup(data) {\n if (data.code == 0) {\n // Project lookup was successful\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move code around to put functions at bottom.\n"
},
{
"from": "human",
"value": "Application.Controllers.controller('projectsProject',\n [\"$scope\", \"provStep\", \"ui\",\n \"project\", \"current\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add some syntactic sugar to the import command to shorten the class exstension.\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nclass SearchBar extends React.Component {\n\trender() {\n\t\treturn <input />;\n\t}\n}\n\nexport default SearchBar;"
},... | javascript | chosen |
[
{
"from": "system",
"value": "Enable refresh on focus by env var.\n\nSo in dev and staging we can try to fix bugs without losing critical\nstate.\n"
},
{
"from": "human",
"value": "const REFRESH_PERIOD = 30 * 60 * 1000 // 30 minutes in microseconds\nconst focusSupported = typeof document !== 'un... | javascript | chosen |
[
{
"from": "system",
"value": "Remove window.location.href in advanced search js\n"
},
{
"from": "human",
"value": "Blacklight.onLoad(function() {\n $(window).on('load', function(){\n\n //remove default mast search to fix duplicate IDs\n $(\".blacklight-catalog-advanced_search #search-navb... | javascript | chosen |
[
{
"from": "system",
"value": "PUT API route is now working in postman\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst { Router } = require('express')\nconst router = Router()\nconst Item = require('../models/Item')\n\nrouter.get('/api/items', (req, res, err) =>\n Item\n .find()\n... | javascript | chosen |
[
{
"from": "system",
"value": "Replace `\\` with `/` in resolved path\n\nThis fixes url rebasing on windows. We probably should use something\nother than the `path` module for resolving, but that can come at\na later time – this'll do for now.\n"
},
{
"from": "human",
"value": "import postcss fro... | javascript | chosen |
[
{
"from": "system",
"value": "Fix order of headers in response\n"
},
{
"from": "human",
"value": "/**\n * @package admiral\n * @author Andrew Munsell <andrew@wizardapps.net>\n * @copyright 2015 WizardApps\n */\n\nexports = module.exports = function(app, config, fleet) {\n /**\n * Get the ... | javascript | chosen |
[
{
"from": "system",
"value": "Update Raft web site link"
},
{
"from": "human",
"value": "\n\"use strict\";\n/*jslint browser: true, nomen: true*/\n/*global define*/\n\ndefine([], function () {\n return function (frame) {\n var player = frame.player(),\n layout = frame.layout... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error, need to add PressAddStory button\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nimport {\n StyleSheet,\n Text,\n View,\n TouchableHighlight,\n} from 'react-native';\n\nimport I18n from 'react-native-i18n'\n\nclass Prof... | javascript | chosen |
[
{
"from": "system",
"value": "Add helper for converting dashed words to lower camel case\n"
},
{
"from": "human",
"value": "export default function dashesToCamelCase(str) {\n\n return str.charAt(0).toUpperCase() + str.slice(1);\n};"
},
{
"from": "gpt",
"value": "export default fun... | javascript | chosen |
[
{
"from": "system",
"value": "Update HTML Webpack Plugin to use index.html as template\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst ExtractTextPlugin = require(\"extract-text-webpack-plugin\")\nconst HtmlWebpackPlugin = require('html-webpack-plugin')\n\nfunction resolve... | javascript | chosen |
[
{
"from": "system",
"value": "Create a collection for Forms\n"
},
{
"from": "human",
"value": "define(\n ['data/data', 'collections/v3/interactions', 'collections/v3/datasuitcases', 'models/v3/DataSuitcase', 'collections/v3/forms', 'models/v3/form'],\n function (Backbone, InteractionCollection... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for Record Batch compression codec flag\n"
},
{
"from": "human",
"value": "const { KafkaJSNotImplemented } = require('../../../errors')\n\nconst Types = {\n None: 0,\n GZIP: 1,\n Snappy: 2,\n LZ4: 3,\n}\n\nconst Codecs = {\n [Types.GZIP]: () => requ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable resize of wallpaper picker\n\nBUG=149937\n\nReview URL: https://codereview.chromium.org/11411244\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@170467 0039d316-1c4b-4281-b951-d872f2087c98\n"
},
{
"from": "human",
"value": "// Copyright (c) 2012 The ... | javascript | chosen |
[
{
"from": "system",
"value": "Update strict to error if present since it is redundant in modules, and not really necessary in demo pages.\n"
},
{
"from": "human",
"value": "module.exports = {\n \"extends\": \"./index.js\",\n \"parser\": \"babel-eslint\",\n \"env\": {\n \"browser\": true\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use a transparent pixel to hold the height\n"
},
{
"from": "human",
"value": "Photo = function (doc) {\n _.extend(this, doc);\n};\n\n_.extend(Photo.prototype, {\n\tgetImgTag: function (dimension) {\n\t\treturn {\n\t\t\t'class': 'lazy',\n\t\t\t'data-src': _.str.spri... | javascript | chosen |
[
{
"from": "system",
"value": "Split multiline tests to actual multiple lines\n\nFor better readability.\n"
},
{
"from": "human",
"value": "import createTestHelpers from '../createTestHelpers';\nconst {expectTransform, expectNoChange} = createTestHelpers(['no-strict']);\n\ndescribe('Removal of \"... | javascript | chosen |
[
{
"from": "system",
"value": "Remove space from generated unit-tests\n"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-qunit';<% if (testType === 'integration') { %>\nimport hbs from 'htmlbars-inline-precompile';<% } %>\n\nmoduleForComponent('<%= componentPathNam... | javascript | chosen |
[
{
"from": "system",
"value": "mirage: Add basic `GET /api/notifications` route handler\n"
},
{
"from": "human",
"value": "export default function () {\n this.passthrough('/translations/**');\n\n this.get('/api/locale', { locale: 'en' });\n}\n"
},
{
"from": "gpt",
"value": "export d... | javascript | chosen |
[
{
"from": "system",
"value": "feat(form): Change color of mode button checkboxes to green\n"
},
{
"from": "human",
"value": "import React, {PropTypes, Component} from 'react'\n\nimport { getModeIcon } from '../../util/itinerary'\n\nexport default class ModeButton extends Component {\n static pr... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing prop validation for readId\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport React from 'react';\n\nimport ActivityIndicator from './pure/activityIndicator';\n\nimport ui from '../../ui';\n\nclass Loading extends React.Component {\n\n static pr... | javascript | chosen |
[
{
"from": "system",
"value": "Add events handler on selected ingredients\n"
},
{
"from": "human",
"value": "var mode = 0; //primary\n\nfunction calc_mode() {\n\tvar modes = [\"primary\", \"secondary\", \"tertiary\"];\n\treturn modes[mode];\n}\n\n$(function() {\n\t$(\".add\").button();\n\t$(\".ed... | javascript | chosen |
[
{
"from": "system",
"value": "Add stop command to openAssets\n"
},
{
"from": "human",
"value": "export default {\n run(editor, sender, opts = {}) {\n const modal = editor.Modal;\n const am = editor.AssetManager;\n const config = am.getConfig();\n const title = opts.modalTitle || edi... | javascript | chosen |
[
{
"from": "system",
"value": "Enforce that defaultProps sit next to statics\n"
},
{
"from": "human",
"value": "module.exports = {\n 'root': true,\n\n 'parser': 'babel-eslint',\n\n 'extends': [\n 'airbnb',\n 'plugin:import/errors'\n ],\n\n 'rules': {\n 'space-before-function-paren':... | javascript | chosen |
[
{
"from": "system",
"value": "Add prettier as eslint plugin\n"
},
{
"from": "human",
"value": "module.exports = {\n root: true,\n parserOptions: {\n ecmaVersion: 2017,\n sourceType: \"module\"\n },\n plugins: [\"ember\"],\n extends: [\n \"eslint:recommended\",\n \"plugin:ember/r... | javascript | chosen |
[
{
"from": "system",
"value": "Align as an option isn't ideal, include inline style example instead\n\nThere are two ways to center align in CSS, neither work well to\nintegrate into the card system\n\n1) text-align: center\nthis cascades into all children, and would force the consumer to\noverride text-alig... | javascript | chosen |
[
{
"from": "system",
"value": "Change messega for unlinking account\n"
},
{
"from": "human",
"value": "import { unlinkUser } from '../lib/postgres';\n\nexport default (bot) => {\n return async (payload, reply) => {\n const page_scoped_id = payload.sender.id;\n\n await unlinkUser(page_scope... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug that meant member details not displaying if no first name had been entered.\n"
},
{
"from": "human",
"value": "/* @flow */\nimport { FETCHED_MEMBER } from '../../../shared/redux/modules/member.js'\nimport { mergeAll, converge, unapply, compose, objOf, prop }... | javascript | chosen |
[
{
"from": "system",
"value": "Fix saving of top level panel properties\n"
},
{
"from": "human",
"value": "define([\n 'angular'\n],\nfunction (angular) {\n 'use strict';\n\n angular\n .module('kibana.directives')\n .directive('configModal', function($modal,$q) {\n return {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add chapter 4, exercise 3\n"
},
{
"from": "human",
"value": "function arrayToList(array) {\n let list = null;\n for (let i = array.length - 1; i >= 0; --i) {\n list = {value: array[i], rest: list};\n }\n return list;\n}\n\nfunction listToArray(lis... | javascript | chosen |
[
{
"from": "system",
"value": "Add category mapping for exhibitions\n\nToo many exhibition events from TRDEvents got the \"other\"-category\n"
},
{
"from": "human",
"value": "module.exports = {\n \"Dagens bedrift\": \"PRESENTATIONS\",\n \"Fest og moro\": \"NIGHTLIFE\",\n \"Konsert\": \"M... | javascript | chosen |
[
{
"from": "system",
"value": "Change implementation of `render` route\n"
},
{
"from": "human",
"value": "function render(viewName, layoutPath) {\n if (!layoutPath) {\n return function (req, res) {\n res.render(viewName);\n };\n }\n else {\n return functio... | javascript | chosen |
[
{
"from": "system",
"value": "Add HTML5 doctype to all rendered pages.\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar url = require('url');\n\nvar compression = require('compression');\nvar express = require('express');\n\nvar ssr = require('../index');\nvar xhr = require('.... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust selection merge method to D3 v4.\n"
},
{
"from": "human",
"value": "// External\nimport * as d3 from 'd3';\n\nexport function mergeSelections (selections) {\n // Create a new empty selection\n const mergedSelection = d3.selectAll('.d3-list-graph-not-existen... | javascript | chosen |
[
{
"from": "system",
"value": "Use the DefaultScheduler if none is assigned\n\nFixes #1"
},
{
"from": "human",
"value": "let scheduler = null\n\nexport function setScheduler (customScheduler) {\n if (customScheduler) {\n scheduler = customScheduler\n } else {\n scheduler = new DefaultSche... | javascript | chosen |
[
{
"from": "system",
"value": "Fix map types class formatting\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Li... | javascript | chosen |
[
{
"from": "system",
"value": "Remove hardcoded localhost in one more place.\n"
},
{
"from": "human",
"value": "\n/*\n * Exporst function that checks if given emails of users are shown\n * on the Teamview page. And if so how they are rendered: as text or link.\n *\n * It does not check exact emai... | javascript | chosen |
[
{
"from": "system",
"value": "Add simple test on employee relation\n"
},
{
"from": "human",
"value": "import {\n moduleForModel,\n test\n} from 'ember-qunit';\n\nmoduleForModel('employee', {\n // Specify the other units that are required for this test.\n needs: []\n});\n\ntest('it exists', f... | javascript | chosen |
[
{
"from": "system",
"value": "Disable XYZ testing. Unclear if the tests or the implementation is wrong\n"
},
{
"from": "human",
"value": "var vows = require('vows'),\n assert = require('assert'),\n namedColorSamples = require('./samples'),\n spaces = [\n 'rgb',\n 'hsl',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Test against string version of ID.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst assert = require('assert');\n\nconst mongoose = require('mongoose');\n\nmongoose.Promise = global.Promise;\n\nconst dataSchema = new mongoose.Schema({\n 'contents': Strin... | javascript | chosen |
[
{
"from": "system",
"value": "Test for a french file (fails)\n"
},
{
"from": "human",
"value": "/*global after, before, describe, it*/\n'use strict';\nvar assert = require('assert');\nvar grunt = require('grunt');\nvar path = require('path');\nvar sinon = require('sinon');\n\nvar statici18n = r... | javascript | chosen |
[
{
"from": "system",
"value": "Change deprecated config for USM"
},
{
"from": "human",
"value": "import resolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\nimport angular from 'rollup-plugin-angular';\nimport typescript from 'rollup-plugin-typescript';\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests to implement TODO comment\n"
},
{
"from": "human",
"value": "import test from 'ava';\nimport 'babel-core/register';\n\nimport AnalyzerResult from '../src/lib/analyzer-result';\n\ntest('addMessage adds expected message', t => {\n const testMessageType = 't... | javascript | chosen |
[
{
"from": "system",
"value": "Make <PromptBuffer> a special case of <Prompt>\n"
},
{
"from": "human",
"value": "// @flow\n\nimport * as React from \"react\";\nimport css from \"styled-jsx/css\";\n\nconst promptStyle = css`\n .prompt {\n font-family: monospace;\n font-size: 12px;\n line... | javascript | chosen |
[
{
"from": "system",
"value": "Add enabled key, and if all other keys are empty use default vals\n"
},
{
"from": "human",
"value": "const mongoose = require('mongoose')\nconst middleware = require('./middleware/Feed.js')\nconst path = require('path')\nconst fs = require('fs')\nconst packageVersio... | javascript | chosen |
[
{
"from": "system",
"value": "Add filters to snapshot preview\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar fs = require('fs')\nvar path = require('path')\nvar chalk = require('chalk')\n\nfunction show (result) {\n Object.keys(result).sort().reverse().forEach(file => {\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix unused and undefined vars"
},
{
"from": "human",
"value": "var bot = require( 'nodemw' ),\n\treadline = require( 'readline' ),\n\trl = readline.createInterface( {\n\t\tinput: process.stdin,\n\t\toutput: process.stdout\n\t} ),\n\tclient = new Bot( {\n\t\tprotocol... | javascript | chosen |
[
{
"from": "system",
"value": "Revert remote origin to 'origin' for deploy github pages\n"
},
{
"from": "human",
"value": "module.exports = {\n // Autoprefixer\n autoprefixer: {\n // https://github.com/postcss/autoprefixer#browsers\n browsers: [\n 'Explorer >= 10',\n 'ExplorerMo... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing import of insecurity lib"
},
{
"from": "human",
"value": "const utils = require('../lib/utils')\nconst challenges = require('../data/datacache').challenges\nconst db = require('../data/mongodb')\n\nmodule.exports = function trackOrder () {\n return (req... | javascript | chosen |
[
{
"from": "system",
"value": "Remove logging messages cluttering the output log.\n"
},
{
"from": "human",
"value": "var keystone = require('keystone'),\n\t_ = require('underscore');\n\n// Load models to allow fetching of slideshow data\nvar Slideshow = keystone.list('Slideshow'),\n\tSlideshowIte... | javascript | chosen |
[
{
"from": "system",
"value": "Put a connected visual help\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { Chance }from \"chance\";\n\nimport WriteMessage from \"./components/WriteMessage\";\nimport Messages from \"./components/Messages\";\n\nexport default class App ext... | javascript | chosen |
[
{
"from": "system",
"value": ":page_facing_up: Improve semantics of submit button\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport classnames from 'classnames';\nimport './Button.scss';\n\nexport default class Button extends Component {\n static pr... | javascript | chosen |
[
{
"from": "system",
"value": "Add balancing for cleaver scripts.\n"
},
{
"from": "human",
"value": "exports.listeners = {\n\n wield: function (l10n) {\n return function (location, player, players) {\n player.say('You ready the weighty cleaver.');\n player.combat.addToHitMod({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue where data was not being cleared upon logout\n"
},
{
"from": "human",
"value": "const initialState = {\n\tprofile: { data: null },\n\tname: { data: null },\n\timage: { data: null },\n\tbarcode: { data: null }\n}\n\nfunction studentProfileReducer(state = in... | javascript | chosen |
[
{
"from": "system",
"value": "Add closing ) that got removed by acident2\n"
},
{
"from": "human",
"value": "import test from 'ava';\nimport TweetCardContent from '../lib/tweet-card-content';\n\nconst META_SECTION = \"Tweet should be about\";\n\ntest(\"Test static exports\", (t) => {\n t.true(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix casing in file import\n"
},
{
"from": "human",
"value": "import { connect } from 'react-redux';\nimport Timeline from '../components/map/timeline';\nimport { updateFilters } from '../actions/filters';\n\nconst mapStateToProps = state => {\n return {\n filter... | javascript | chosen |
[
{
"from": "system",
"value": "Add helpers functions to generate SQL for 'field [NOT] IN somelist'\n\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\n\n\nexport const unexistedUID = '00000000-0000-0000-C000-000000000046';\n\nexport function initObject(classDef, attrs, id, params) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix admin checking throwing error if not logged in\n"
},
{
"from": "human",
"value": "export default function authRequired(req, res, next) {\n if (req.user.isAdmin) {\n next();\n } else {\n res.status(403);\n res.json({\n id: 'AUTH_FORBIDDEN',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make a user create video button\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport {connect} from 'react-redux'\nimport {Link} from 'react-router-dom'\nimport {compose} from 'recompose'\n\nimport {updateUserVideos} from '../actions/userVideos'\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Use the new `url` property."
},
{
"from": "human",
"value": "import React from 'react';\nimport {default as KataGroupsData} from '../katagroups.js';\n\nexport default class KataGroupsComponent extends React.Component {\n\n static propTypes = {\n kataGroups: Reac... | javascript | chosen |
[
{
"from": "system",
"value": "Stop passing radiumConfig prop to div\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport React, {Component, PropTypes} from 'react';\n\nimport Enhancer from '../enhancer';\nimport StyleKeeper from '../style-keeper';\nimport StyleSheet from './style-sheet';\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add default value for `experimental` option\n"
},
{
"from": "human",
"value": "import Instance from './instance';\nimport instances from './instances';\n\nexport default (node, options = {}) => {\n\t// Stream was passed instead of `options` object\n\tif (typeof opti... | javascript | chosen |
[
{
"from": "system",
"value": "Fix params with period not being passed to callback\n"
},
{
"from": "human",
"value": "(function(win){\n 'use strict';\n\n var paramRe = /:([^\\/.\\\\]+)/g;\n\n function Router(){\n if(!(this instanceof Router)){\n return new Router();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix js manifest for older jquery ui\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascr... | javascript | chosen |
[
{
"from": "system",
"value": "Remove last of the gem\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for conversion from coffee->js\n"
},
{
"from": "human",
"value": "# Place all the behaviors and hooks related to the matching controller here.\n# All this logic will automatically be available in application.js.\n# You can use CoffeeScript in this file: http://j... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem with null selectedSquare\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport classNames from \"classnames\";\n\nimport { selectPiece } from \"store/actions\";\n\nclass ChessBoardSquare extends React.Component {\n constructor(props) {... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dynamic import in client source\n"
},
{
"from": "human",
"value": "import Session from \"./Session.js\";\n\nlet session = new Session();\n\nloadPlugins()\n .then(() => session.connect());\n\nasync function loadPlugins()\n{\n let pluginEntryScripts = <%- JSO... | javascript | chosen |
[
{
"from": "system",
"value": "Add pause after button click to handle delays\n"
},
{
"from": "human",
"value": "function createDoc(browser, docType) {\n const devServer = browser.globals.devServerURL;\n\n browser.url(`${devServer}/`);\n browser.expect.element('#app').to.be.visible.before(5000)... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in logging results on error.\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n var _ = require('lodash'),\n scsslint = require('./lib/scss-lint').init(grunt);\n\n grunt.registerMultiTask('scsslint', 'Validate `.scss` files with... | javascript | chosen |
[
{
"from": "system",
"value": "Use / as a separator for urls\n"
},
{
"from": "human",
"value": "var async = require(\"async\");\nvar path = require(\"path\");\nvar url = require(\"url\");\n\nvar utils = require(\"./lib/utils\");\n\nmodule.exports = function(options, callback) {\n utils.list_file... | javascript | chosen |
[
{
"from": "system",
"value": "Add block \"markdown\", \"asciidoc\" and \"markup\"\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\n\nmodule.exports = {\n // Return non-parsed html\n // since blocks are by default non-parsable, a simple identity method works fine\n html: _.... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.