conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Revert \"Minor - webpack client filename change\"\n\nThis reverts commit 8a687defb70b7c4bab6c5aac3be8867d8efd7542.\n"
},
{
"from": "human",
"value": "const webpack = require('webpack')\nconst merge = require('webpack-merge')\nconst base = require('./webpack.base.con... | javascript | chosen |
[
{
"from": "system",
"value": "Fix new line being included in an anchor\n"
},
{
"from": "human",
"value": "const axios = require('axios');\nconst chalk = require('chalk');\n\nconst helpers = require('../helpers');\n\nexports.listArticles = function (argv) {\n const articleCount = argv.limit > 1 ... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing initialNow for native\n"
},
{
"from": "human",
"value": "import 'react-native-browser-polyfill';\nimport App from './app/App.react';\nimport Component from 'react-pure-render/component';\nimport React, { AppRegistry, Platform } from 'react-native';\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary early exit for a condition that rarely/never occurs.\n"
},
{
"from": "human",
"value": "import options from './options';\nimport { defer } from './util';\nimport { renderComponent } from './vdom/component';\n\n/** Managed queue of dirty components... | javascript | chosen |
[
{
"from": "system",
"value": "Change import path of routes\n"
},
{
"from": "human",
"value": "/* eslint-disable no-unused-vars*/\nimport React from 'react';\n/* eslint-enable no-unused-vars*/\nimport { Router, Route, IndexRoute } from 'react-router';\nimport createBrowserHistory from 'history/li... | javascript | chosen |
[
{
"from": "system",
"value": "[docs] Use id for TodoApp example\n"
},
{
"from": "human",
"value": "var TODO_COMPONENT = `\nvar TodoList = React.createClass({\n render: function() {\n var createItem = function(itemText, index) {\n return <li key={index + itemText}>{itemText}</li>;\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Replace usage of merge with assign\n"
},
{
"from": "human",
"value": "import ObjectProxy from '@ember/object/proxy';\nimport { merge } from '@ember/polyfills';\n\n/**\n * @class Row\n * @extends Ember.ObjectProxy\n * @namespace SemanticUI\n */\nconst Row = ObjectPro... | javascript | chosen |
[
{
"from": "system",
"value": "Make it possible to extend from `Error` in Babel 6.\n"
},
{
"from": "human",
"value": "/**\n * A simple Error type to represent an error that occured while loading a\n * resource.\n *\n * @class LoadError\n * @extends Error\n */\nexport default class LoadError exten... | javascript | chosen |
[
{
"from": "system",
"value": "Test out having enter press bring up modal"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $('#voterloginbox').submit(function(event) {\n var formData = {\n 'voter_token' : $('input[name=voter_token]').val(),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a warning for sorting keys\n"
},
{
"from": "human",
"value": "module.exports = {\n \"extends\": [\n \"./index.js\",\n ],\n\n plugins: [\"fp\"],\n\n rules: {\n \"fp/no-arguments\": \"error\",\n \"fp/no-class\": \"warn\",\n \"fp/no-delete\": \"erro... | javascript | chosen |
[
{
"from": "system",
"value": "Add jquery ui to app.js\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": "Use Ember.isEqual instead of direct equality"
},
{
"from": "human",
"value": "import Em from 'ember';\n\nlet get = Em.get;\nlet defaultFilter = function(value) { return value; };\n\nexport default function(dependentKey, filter) {\n filter = filter || defaultFilter;... | javascript | chosen |
[
{
"from": "system",
"value": "Add methods to find team/stadium by abbreviation\n"
},
{
"from": "human",
"value": "import CoreObject from 'fantasy-weather/models/_core/core-object';\nimport Team from 'fantasy-weather/models/team';\n\nlet League = CoreObject.extend({\n\n // Set defaults and stub ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow script to be invoke from any directory\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nvar recast = require('recast');\nvar messages = require('./transform/messages');\nvar exec = require('child_process').exec;\nvar fs = require('fs');\nvar glob = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve menu positioning to keep it from going off screen\n\ntries to keep the menu from going off the bottom or right of screen"
},
{
"from": "human",
"value": "import React from \"react\";\nimport portal from \"react-portal-hoc\";\n\nconst MentionMenu = props => {... | javascript | chosen |
[
{
"from": "system",
"value": "Improve error names when running integration test\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar opbeat = require('../../');\nvar inquirer = require('inquirer');\n\nvar questions = [\n { name: 'app_id', message: 'App ID' },\n { name: 'organization_id', me... | javascript | chosen |
[
{
"from": "system",
"value": "Fix redirect when switch language.\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { Link } from 'react-router'\n\nimport Header from 'Components/Header'\nimport Footer from 'Components/Footer'\nimport zhcn from '../../../intl/zh-... | javascript | chosen |
[
{
"from": "system",
"value": "Add arcade.collide logic to App.Mob objects.\n"
},
{
"from": "human",
"value": "// namespace\nvar App = App || {};\n\nApp.Mob = (function () {\n \"use strict\";\n\n var fn = function (game, username, x, y) {\n Phaser.Sprite.call(this, game, x, y, 'alien... | javascript | chosen |
[
{
"from": "system",
"value": "Add an action to get species by family\n"
},
{
"from": "human",
"value": "/* global angular */\n\nangular\n .module('speciesApp')\n .factory('SpeciesService', [\n 'API_BASE_URL',\n '$resource',\n SpeciesService\n ])\n\nfunction SpeciesService (API_BASE_U... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in action types for filter by type fatality\n"
},
{
"from": "human",
"value": "export const START_DATE_CHANGE = 'START_DATE_CHANGE';\nexport const END_DATE_CHANGE = 'END_DATE_CHANGE';\n\nexport const FILTER_BY_AREA = 'FILTER_BY_AREA';\nexport const FILTER_B... | javascript | chosen |
[
{
"from": "system",
"value": "Annotate jsdoc for FilterBuilder class as private\n"
},
{
"from": "human",
"value": "import { cloneDeep } from 'lodash'\nimport filters from './index'\nimport { boolMerge } from '../utils'\n\nexport default class FilterBuilder {\n constructor () {\n this._filter... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in Licorice Mode name assignment\n"
},
{
"from": "human",
"value": "/* eslint-disable no-magic-numbers */\nimport LabeledMode from './LabeledMode';\nclass LicoriceMode extends LabeledMode {\n static id = 'LC';\n\n constructor(opts) {\n super(opts);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "BAP-251: Add design to email collection\n"
},
{
"from": "human",
"value": "jQuery(document).ready(function () {\n jQuery('#add-another-email').click(function () {\n var emailList = jQuery('#email-fields-list');\n var newWidget = emailList.attr('data... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude testing files from deploy\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n sass: {\n options: {\n includePaths: ['app/bower_components/foundation/scs... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify definition of jscs task\n"
},
{
"from": "human",
"value": "module.exports = function( grunt ) {\n \"use strict\";\n\n grunt.initConfig({\n bump: {\n options: {\n files: [ \"package.json\" ],\n\n // Commi... | javascript | chosen |
[
{
"from": "system",
"value": "Add preserve: false to dev as well\n"
},
{
"from": "human",
"value": "/* eslint global-require:0 */\n\nmodule.exports = {\n map: { inline: true },\n plugins: [\n require('postcss-custom-properties')({\n importFrom: 'src/css/00_variables.css'\n }),\n ]\... | javascript | chosen |
[
{
"from": "system",
"value": "Create destination directory if not exists\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\n\n/**\n * Themeleon helper constructor.\n *\n * See the functions from `factory.js` for variables signification.\n *\n * This constructor has ... | javascript | chosen |
[
{
"from": "system",
"value": "Add placeholders for new metrics.\n"
},
{
"from": "human",
"value": "Ext.define('TrackAnnot.view.Viewport', {\n renderTo: Ext.getBody(),\n extend: 'Ext.container.Viewport',\n items: [{\n \txtype: 'toolbar',\n \titems: [{\n \t\ttext: 'Metrics',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Stop using the deprecated knex.initialize\n"
},
{
"from": "human",
"value": "import Knex from 'knex';\nimport config from '../../config/config.json';\nconst knex = Knex.initialize(config.bookshelf.postgresql);\n\nexport default function () {\n knex.migrate.latest(c... | javascript | chosen |
[
{
"from": "system",
"value": "Add a history-clear function to conkeror\n"
},
{
"from": "human",
"value": "define_key(text_keymap, \"C-w\", \"cmd_deleteWordBackward\");\ndefine_key(content_buffer_normal_keymap, \"c\", \"copy\", $browser_object = browser_object_dom_node);\n"
},
{
"from": "... | javascript | chosen |
[
{
"from": "system",
"value": "Allow DATABASE_URL to override passed option\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n'use strict';\n\nvar assertSchema = require('./index');\nvar yargs = require('yargs');\n\nvar opts = yargs\n .demand(1)\n .usage(\n 'Usage: $0 [ -d database u... | javascript | chosen |
[
{
"from": "system",
"value": "Convert generator to the simple format\n"
},
{
"from": "human",
"value": "\nvar util = require('util'),\n yeoman = require('yeoman-generator');\n\n// mocha:app generator\n//\n// Setup the test/ directory.\n//\n\nmodule.exports = Generator;\n\nfunction Generator(arg... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing height prop to PropTypes.\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { assign } from \"lodash\";\nimport CommonProps from \"./common-props\";\n\nexport default class Box extends React.Co... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude index.html and tests from manifest"
},
{
"from": "human",
"value": "var path = require('path');\nvar fs = require('fs');\nvar mergeTrees = require('broccoli-merge-trees');\n\nvar manifest = require('./manifest');\n\nmodule.exports = {\n name: 'broccoli-ma... | javascript | chosen |
[
{
"from": "system",
"value": "Use interval in Chris button\n"
},
{
"from": "human",
"value": "var audio = document.getElementById(\"chris\");\n\nfunction pauseChris() {\n\taudio.pause();\n}\n\nfunction playChris() {\n\taudio.currentTime = 952;\n\taudio.play();\n\tsetTimeout(pauseChris, 331000);\... | javascript | chosen |
[
{
"from": "system",
"value": "Make server auth key configurable\n\nCan be provided with an env var or with a Docker secret named \"authkey\".\n"
},
{
"from": "human",
"value": "module.exports = {\n port: 3000,\n internalClientPort: 3001,\n authKey: 'ASDASD'\n};\n"
},
{
"from": "... | javascript | chosen |
[
{
"from": "system",
"value": "Use `!util/isLikeNumber(key)` instead of `key.match(/\\D/)`\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar Base = require('../base')\n\n/**\n * @function raw converts the Base object into a normal javascript wObject, removing internal properties.\n * It al... | javascript | chosen |
[
{
"from": "system",
"value": "Add localhost path for MongoDB\n"
},
{
"from": "human",
"value": "path = require('path');\n\nmodule.exports = {\n mongo: {\n dbUrl: 'https://api.mongolab.com/api/1', // The base url of the MongoLab DB server\n apiKey: 'gubV4zs5yN-ItUUQDpgUx0pUA98... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo, optional condition for hostname & port\n"
},
{
"from": "human",
"value": "var clientio = require(\"socket.io-client\");\nvar client = clientio.connect(process.env.HOST + \":\" + process.env.PORT);\nvar Gpio = require(\"onoff\").Gpio;\n\nvar slot = {}\nslot... | javascript | chosen |
[
{
"from": "system",
"value": "BHV-12598: Set content property before DOM is updated.\n\nEnyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>\n"
},
{
"from": "human",
"value": "(function (enyo, scope) {\n\t/**\n\t* {@link moon.Divider} is a simply styled component that may be used as a separ... | javascript | chosen |
[
{
"from": "system",
"value": "Make webpack dev server work for nested route paths.\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\n\nconst HtmlWebpackPl... | javascript | chosen |
[
{
"from": "system",
"value": "Make fire take coordinates, add function for aiming\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n function Weapon(game, x, y, coolDown, bulletSpeed, bullets, damage) {\n this.game = game;\n this.x = x;\n this.y = y;\n this.coolDo... | javascript | chosen |
[
{
"from": "system",
"value": "Add id to chrome.window api to remember position and size\n"
},
{
"from": "human",
"value": "'use strict';\n\nchrome.app.runtime.onLaunched.addListener(function() {\n\n chrome.runtime.getPlatformInfo(function(info) {\n // don't render statusbar over app UI... | javascript | chosen |
[
{
"from": "system",
"value": "Set URL action in newly created 2Do Task\n\nStill add any selected text as a note, but use the current tab's URL as the\n2Do action instead.\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction createTask(chrome, title, note) {\n let task = 'twodo://x-callb... | javascript | chosen |
[
{
"from": "system",
"value": "Disable the `prefer-named-capture-group` rule temporarily\n"
},
{
"from": "human",
"value": "'use strict';\nconst path = require('path');\n\nmodule.exports = {\n\textends: path.join(__dirname, 'index.js'),\n\trules: {\n\t\t'no-var': 'error',\n\t\t'object-shorthand':... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for initializing app with arguments\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar expect = require('chai').expect;\nvar App = require('../app/scripts/app');\n\ndescribe('app', function () {\n\n it('should initialize app with no arguments', functi... | javascript | chosen |
[
{
"from": "system",
"value": "Move ProgramLine style into head\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport Moment from 'react-moment'\nimport Link from 'next/link'\nimport generateUrl from 'utils/urlGenerator'\n\nimport EditButton from... | javascript | chosen |
[
{
"from": "system",
"value": "Initialize the select element for sending a message.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction Chat (p_session) {\n var _session;\n\n var self = this;\n\n this._queue = [];\n\n this.initialize = function (p_session) {\n // reg... | javascript | chosen |
[
{
"from": "system",
"value": "Rename rpc test queue and change rpc message\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar producer = require('../index')().producer;\nvar consumer = require('../index')().consumer;\nvar uuid = require('node-uuid');\n\nvar fixtures = {\n q... | javascript | chosen |
[
{
"from": "system",
"value": "Use import rather than require\n"
},
{
"from": "human",
"value": "const toolbox = require('sw-toolbox');\n\n// Try network but fallback to cache\ntoolbox.router.default = toolbox.networkFirst;\n\n// Data should query the network first\ntoolbox.router.any('/api/*', t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Remove banner still showing, use inline css instead.\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @author sk3dsu(Fadli Ishak)\n// @name MyLowyat\n// @version 0.2.1\n// @description Removing some elements of the forum to be... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Refactor rule to work with gonzales 3.2.1\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar helpers = require('../helpers');\n\nmodule.exports = {\n 'name': 'space-after-comma',\n 'defaults': {\n 'include': true\n },\n 'detect': function (ast, par... | javascript | chosen |
[
{
"from": "system",
"value": "build(webpack): Remove babel-polyfill from vendor bundle\n"
},
{
"from": "human",
"value": "/* eslint-disable global-require */\nconst path = require('path');\nconst CircularDependencyPlugin = require('circular-dependency-plugin');\nconst CleanWebpackPlugin = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Remove non CF specific files\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n client: {\n lib: {\n css: [\n 'public/lib/bootstrap/dist/css/bootstrap.min.css',\n 'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the count and added a feedback when started\n"
},
{
"from": "human",
"value": "var fs = require('fs');\n\nvar intervalId = setInterval(function() {\n fs.readFile('/sys/class/thermal/thermal_zone0/temp', function(err, data) {\n var date = new Date();... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments and fix formatting.\n"
},
{
"from": "human",
"value": " 'use strict';\n\napp.controller('party/profile', [\n '$scope', 'displayService', 'party', 'pageService',\n function ($scope, display, party, page) {\n $scope.clickUser = function(user){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Access reexports of externals safely when needed.\n"
},
{
"from": "human",
"value": "function propertyAccess ( name ) {\n\treturn name === 'default' ? `['default']` : `.${name}`;\n}\n\nexport default function getExportBlock ( bundle, exportMode, mechanism = 'return'... | javascript | chosen |
[
{
"from": "system",
"value": "Restructure the creation of the AST\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst fs = require('fs');\nconst util = require('util');\nconst _ = require('lodash');\nconst LineTokens = require('./LineTokens');\nconst AbstractSyntaxTree = require('./Abstrac... | javascript | chosen |
[
{
"from": "system",
"value": "Fix config unit tests with methods moved to _priv (see commit ef68784)\n"
},
{
"from": "human",
"value": "define(['config'],\nfunction(config) {\n 'use strict';\n\n describe('config module', function() {\n it('should allow values to be functions with returns', ... | javascript | chosen |
[
{
"from": "system",
"value": "Use build() result for test\n"
},
{
"from": "human",
"value": "!function (assert, path) {\n 'use strict';\n\n require('vows').describe('Integration test').addBatch({\n 'When minifying a CSS file': {\n topic: function () {\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Add changeyear() and commented on selected functions.\n"
},
{
"from": "human",
"value": "function editselection(adminname, adminusername, adminpassword, adminid){\n\tdocument.getElementById(\"inputadminname\").value = adminname;\n\tdocument.getElementById(\"inputadm... | javascript | chosen |
[
{
"from": "system",
"value": "Use Ember alias for jQuery\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\r\nimport ENV from '../config/environment';\r\n\r\nexport function initialize() {\r\n $.getScript('//js.honeybadger.io/v0.2/honeybadger.min.js').then(function() {\r\n if (wi... | javascript | chosen |
[
{
"from": "system",
"value": "Add ref to stub router component for accessibility"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport React from 'react/addons';\n\nvar stubRouterContext = (Component, props, stubs) => {\n return React.createClass({\n childContextTypes: {\n ge... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug in the mega-drop that prevented it opening.\n"
},
{
"from": "human",
"value": "Teikei.module(\"User\", function(User, App, Backbone, Marionette, $, _) {\n\n User.MegaDropView = Marionette.View.extend({\n\n el: \"#mega-drop\",\n\n ui: {\n toggle... | javascript | chosen |
[
{
"from": "system",
"value": "Add HtmlWebpackPlugin options for template and script injection\n"
},
{
"from": "human",
"value": "const HtmlWebpackPlugin = require('html-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n entry: './client/index.js',\n output: {\n path: p... | javascript | chosen |
[
{
"from": "system",
"value": "Create mapCategories on ndcs reducer\n"
},
{
"from": "human",
"value": "export const initialState = {\n loading: false,\n loaded: false,\n error: false,\n data: {}\n};\n\nconst setLoading = (state, loading) => ({ ...state, loading });\nconst setError = (state, e... | javascript | chosen |
[
{
"from": "system",
"value": "Change from 408 to 503 since it is a server error\n"
},
{
"from": "human",
"value": "function wrap(res, fn) {\n return function(...args) {\n if (res.timedout) {\n return res;\n } else {\n return fn.apply(res, args);\n }\... | javascript | chosen |
[
{
"from": "system",
"value": "Update config for plugin (still needs moving outside this lib)\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { render } from 'react-dom'\nimport { Provider } from 'react-redux'\nimport { Router, Route } from 'react-router'\nimport config from ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Component testing for permission-language component. The test passes three provider names to the component and verify that the returned results is correct.\n\nTicket ID: EOSF-403\n"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-... | javascript | chosen |
[
{
"from": "system",
"value": "Add watch to Canistreamit header.\n"
},
{
"from": "human",
"value": "function ddg_spice_canistreamit(movies) {\n // console.log(xk);\n\n var result,img,snippet,link,div;\n var items = new Array();\n for(var i = 0; i<movies.length; i++)\n {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add status code check for error handling\n"
},
{
"from": "human",
"value": "const fetch = require('node-fetch');\n\nclass BaseLoader {\n\n constructor(APIToken, baseURL) {\n this.APIToken = APIToken;\n this.fetch = fetch\n this.baseURL = baseURL\n }\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set title depending on boards statuses\n"
},
{
"from": "human",
"value": "import React, {PropTypes} from 'react';\n\nexport default class Header extends React.Component {\n _renderContent() {\n const { game } = this.props;\n\n return (\n <h1>Place your s... | javascript | chosen |
[
{
"from": "system",
"value": "Use 1 as a default value for the number of codes in a code list\n\nThis number is used to build the right number of responses when serializing the questionnaire. If we work with a code list specification, It's not trivial to get this information: we need to load the code list s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo startContanier should be startContainer.\n"
},
{
"from": "human",
"value": "define([], function() {\n var saveSelection, restoreSelection;\n if (window.getSelection && document.createRange) {\n saveSelection = function(el) {\n var se... | javascript | chosen |
[
{
"from": "system",
"value": "Rename click handler function so it’s more explicit what it does\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {\n Link\n} from 'react-router';\nimport './Menu.css';\nimport User from './User';\nimport language from '../language/language';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Revert accidental commit of debug logging\n"
},
{
"from": "human",
"value": "angular.module('webapp').factory('mp', function($q, $rootScope, $timeout, host) {\n\tvar socket = new WebSocket(\"ws://\" + host + \":8080/stomp\");\n\n\tvar stompClient = Stomp.over(socket... | javascript | chosen |
[
{
"from": "system",
"value": "Fix redirecting and back button bug\n"
},
{
"from": "human",
"value": "$().ready(() => {\n loadContentSection().then(() =>{ \n $(\"#loader\").addClass(\"hide\");\n $(\"#real-body\").removeClass(\"hide\");\n $(\"#real-body\").addClass(\"body\");\n\n $(\"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix React missing key iterator warning\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\nimport { logoutUser } from '../../redux/actions';\n\nconst NavBar = ({ isAuthent... | javascript | chosen |
[
{
"from": "system",
"value": "Use addEventListener instead of setting old onmouse* properties\n"
},
{
"from": "human",
"value": "var STATUSES = {\n UP: 0,\n DOWN: 1\n}\nvar mouseStatus = {\n left: STATUSES.UP,\n right: STATUSES.UP\n}\n\nvar BUTTONS = {\n LEFT: 1,\n RIGHT: 3\n};\n\ndocument... | javascript | chosen |
[
{
"from": "system",
"value": "Add handler for cntl+backspace/delete to be a crossout\n"
},
{
"from": "human",
"value": "define(['mathlive/mathlive'], \r\n function(mLive) {\r\n\t MathLive = mLive;\r\n\t MathLive.renderMathInDocument();\r\n\t TheActiveMathField = MathLive.makeMathField(\r\n... | javascript | chosen |
[
{
"from": "system",
"value": ":wheelchair: Add menu to open dev tools\n"
},
{
"from": "human",
"value": "const {app, BrowserWindow} = require('electron')\nconst path = require('path')\nconst url = require('url')\n\nlet win\n\nfunction createWindow () {\n win = new BrowserWindow({width: 650, hei... | javascript | chosen |
[
{
"from": "system",
"value": "Add more data to the report\n"
},
{
"from": "human",
"value": "var uuid = require('node-uuid');\nvar JSData = require('js-data');\n\nvar store;\nvar adapter;\nvar Report;\n\nfunction error(msg) {\n return new Promise(function(resolve, reject) {\n return resolve(... | javascript | chosen |
[
{
"from": "system",
"value": "Remove comments and source-map from the minified version.\n\n"
},
{
"from": "human",
"value": "const UglifyJsPlugin = require(\"uglifyjs-webpack-plugin\");\nconst path = require(\"path\");\n\nmodule.exports = {\n mode: \"development\",\n devtool: \"inline-sour... | javascript | chosen |
[
{
"from": "system",
"value": "Build styles apart from JS code\n"
},
{
"from": "human",
"value": "var ExtractTextPlugin = require('extract-text-webpack-plugin');\n\nmodule.exports = {\n entry: {\n index: './src/main/index.js'\n },\n output: {\n path: './target/out',\n filename: '[name... | javascript | chosen |
[
{
"from": "system",
"value": "Fix: Use node path from process.env._\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst path = require('path');\n\nconst exec = require('child_process').exec;\nconst version = process.versions.v8;\nconst tmpfile = path.join(__dirname, version+'.fla... | javascript | chosen |
[
{
"from": "system",
"value": "Change version string in control node.\n"
},
{
"from": "human",
"value": "// Modules\nvar http = require('http'),\n urllib = require('url'),\n RPCHandler = require('jsonrpc').RPCHandler,\n scheduler = require('./schedulerRpcWrapper');\n\n// Configuration\nv... | javascript | chosen |
[
{
"from": "system",
"value": "Allow CLI debugger to compile non-Solidity sources\n"
},
{
"from": "human",
"value": "const { Compile } = require(\"@truffle/compile-solidity\");\n\nclass DebugCompiler {\n constructor(config) {\n this.config = config;\n }\n\n async compile(sources = undefined... | javascript | chosen |
[
{
"from": "system",
"value": "Update AudioChannel.playSong to use noteToFreq\n"
},
{
"from": "human",
"value": "var AudioChannel = function(args) {\n this.context = AudioContext ? new AudioContext() : new webkitAudioContext();\n this.oscill = this.context.createOscillator();\n this.gain = thi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where images could not be created\n"
},
{
"from": "human",
"value": "/**\n * Image.js\n *\n * @description :: This represents a product image with file paths for different variations (original, thumb, ...).\n * @docs :: http://sailsjs.org/documentatio... | javascript | chosen |
[
{
"from": "system",
"value": "Add status fallback when an error does not expose one\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction createDefaultFormatter() {\n return function defaultFormatter(ctx, errors) {\n ctx.body = {};\n if (errors && errors.length) {\n ctx.stat... | javascript | chosen |
[
{
"from": "system",
"value": "Handle toJSON call with missing this.data\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar util = require(\"util\");\n\nvar AbstractError = require(\"./AbstractError.js\"),\n defaultRenderer = require(\"./defaultRenderer.js\");\n\n/**\n * generate Error-... | javascript | chosen |
[
{
"from": "system",
"value": "Enable fast refresh on mdx pages\n"
},
{
"from": "human",
"value": "const fm = require('gray-matter');\n\n// makes mdx in next.js suck less by injecting necessary exports so that\n// the docs are still readable on github\n// (Shamelessly stolen from Expo.io docs)\n/... | javascript | chosen |
[
{
"from": "system",
"value": "Set user name cookie only for the /page/ path where it is used.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n$(document).ready(function() {\n $(\"#link_play\").click(function (event) {\n $.cookie(\"user_name\", $(\"#credentials\").find(\"input#use... | javascript | chosen |
[
{
"from": "system",
"value": "Add overriding pattern from CLI\n"
},
{
"from": "human",
"value": "var program = require('commander');\nvar pkg = require('../package.json');\nvar GitterBot = require('../lib/GitterBot');\n\nprogram\n .version(pkg.version)\n .description('Gitter bot for evaluating... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up the portfolio imports\n"
},
{
"from": "human",
"value": "import echoRidge from './echo-ridge';\nimport fireflies from './fireflies';\n\nexport default [\n echoRidge,\n fireflies\n];\n"
},
{
"from": "gpt",
"value": "export default [\n require(... | javascript | chosen |
[
{
"from": "system",
"value": "Add checking if lastPropId is undefined\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = {\n rules: {\n \"sort-object-props\": function(context) {\n var caseSensitive = context.options[0].caseSensitive;\n var ign... | javascript | chosen |
[
{
"from": "system",
"value": "Allow middleware to be disabled.\n"
},
{
"from": "human",
"value": "module.exports = function (app) {\n // Default conf.\n app.conf.add({\n vhosts: {\n match: 'hostname',\n notFound: true\n }\n });\n\n // Depends on cantina-web.\n app.require('c... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Handle the default pattern with the last state when the command is not mathcing.\n"
},
{
"from": "human",
"value": "/*\n * redbloom\n * Copyright(c) 2016 Benjamin Bartolome\n * Apache 2.0 Licensed\n */\n\n'use strict';\n\nmodule.exports = redbloom;\n\nvar ee =... | javascript | chosen |
[
{
"from": "system",
"value": "Use the correct `host` when falling back\n"
},
{
"from": "human",
"value": "'use strict';\nconst net = require('net');\n\nconst isAvailable = options => new Promise((resolve, reject) => {\n\tconst server = net.createServer();\n\tserver.unref();\n\tserver.on('error',... | javascript | chosen |
[
{
"from": "system",
"value": "Validate if app.tests are available\n\nInstead of relying on the environment\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'telling-stories',\n\n included: function(app) {\n if (!this.shouldIncludeFiles(... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.