conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Correct the message on bluetooth alert\n"
},
{
"from": "human",
"value": "\nimport React, { PropTypes } from 'react';\n\nimport {\n Image,\n Alert,\n StyleSheet,\n} from 'react-native';\n\nimport WideButton from './wideButton';\n\nimport { OFF_WHITE, OFF_BLACK, T... | javascript | chosen |
[
{
"from": "system",
"value": "Add work on rc scripts.\n"
},
{
"from": "human",
"value": "\nvar monkeyscript = {\n\tversion: '0.0.0.0a',\n\trc: []\n};\n\n(function(_native) {\n\tdelete global._native;\n\t\n\t// Arguments\n\tvar args = Array.slice(_native.arguments);\n\tmonkeyscript.scriptName = a... | javascript | chosen |
[
{
"from": "system",
"value": "Add a log on client connection.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar WebSocketServer = require('ws').Server;\nvar wss = new WebSocketServer({ port: 8899 });\n\nwss.on('connection', function connection(ws) {\n ws.on('message', function incoming(me... | javascript | chosen |
[
{
"from": "system",
"value": "Support react-validation-mixin's new async-capable API.\n"
},
{
"from": "human",
"value": "import Joi from 'joi';\nimport union from 'lodash.union';\n\nexport default joiOptions => {\n return {\n validate: function(data = {}, joiSchema = {}, key) {\n const ... | javascript | chosen |
[
{
"from": "system",
"value": "QS-1056: Revert offline_access scope for spotify\n"
},
{
"from": "human",
"value": "export default {\n API_ROOT : 'http://brain.local.nekuno.com/index_dev.php/',\n IMAGES_ROOT : 'https://local.nekuno.com/',\n INSTANT_HOST : 'https://local.n... | javascript | chosen |
[
{
"from": "system",
"value": "Add universal Google Analytics code\n\nBecause Brexit, we've been asked to add a universal GA code to all\ngovernment services on a GOV.UK service domain. This does so for\nAPI calls to Registers APIs.\n"
},
{
"from": "human",
"value": "(function(i,s,o,g,r,a,m){i['G... | javascript | chosen |
[
{
"from": "system",
"value": "Add show field to UserRoom table\n"
},
{
"from": "human",
"value": "var Sequelize = require('sequelize');\nvar db = require('../db.js');\n\nvar UserRoom = db.define('UserRoom',\n {\n id: {\n type: Sequelize.UUID,\n defaultValue: Sequelize.UUIDV1,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make linter not complain, seems the JSX processor makes React needed."
},
{
"from": "human",
"value": "import assert from 'assert';\nimport Page from '../../src/components/page.js';\nimport KataGroups from '../../src/katagroups.js';\nimport {default as KataGroupsCom... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused dependencies from enviornment_browser.js\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar toplevel = global.window || global;\n\nfunction getPrefixedProperty (object, name) {\n if (object == null) {\n return;\n }\n var capitalizedName = ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove reliance on file path object\n\nRe: https://github.com/alex-ketch/metalsmith-renamer/issues/1\n\nThis means plugin has to be run before metalsmith-permalink or metalsmith-path so that those files receive correct file.path attributes.\nIt also means that this plugin now s... | javascript | chosen |
[
{
"from": "system",
"value": "Make resolvePath a little smarter\n\nUse a \"relative path\" approach:\n- if paths have common parts, make sure to not duplicate those parts\n- if there are no common parts, just append\n\nInspired by the functionality of Node's path.relative\n"
},
{
"from": "human",
... | javascript | chosen |
[
{
"from": "system",
"value": "Remove regexp.test call and fix destructuring.\n"
},
{
"from": "human",
"value": "const LESS_VARIABLE_REGEX = /^@([a-z0-9\\-_]*):(\\s*)([#\\(\\):,%a-z0-9]*);/i\n\nfunction parse(line) {\n if (LESS_VARIABLE_REGEX.test(line)) {\n const [all, variable, separator, v... | javascript | chosen |
[
{
"from": "system",
"value": "Remove async/await from example to comply with lts/boron lang support\n"
},
{
"from": "human",
"value": "const { expectRedux, storeSpy } = require(\"expect-redux\");\nconst { configureStore } = require(\"./store\");\n\nconst storeForTest = () => configureStore([stor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix irregular whitespace linter error.\n"
},
{
"from": "human",
"value": "import React, {PropTypes, Component} from 'react'\nimport Dropdown from 'shared/components/Dropdown'\n\nimport {showDatabases} from 'shared/apis/metaQuery'\nimport showDatabasesParser from 'sh... | javascript | chosen |
[
{
"from": "system",
"value": "Make one test depend on the Node.JS version\n\nFixes https://github.com/GoogleChromeLabs/confluence/issues/338.\n"
},
{
"from": "human",
"value": "// Copyright 2018 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style lic... | javascript | chosen |
[
{
"from": "system",
"value": "Use stateless function instead of class for counter implementation\n"
},
{
"from": "human",
"value": "import React, { PropTypes as RPT, Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport * as counte... | javascript | chosen |
[
{
"from": "system",
"value": "Add deprecated/unsupported runtimes (still working)\n"
},
{
"from": "human",
"value": "'use strict';\n\n// native runtime support for AWS\n// https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html\n\nmodule.exports = new Set([\n // .net\n // dotnetcore2... | javascript | chosen |
[
{
"from": "system",
"value": "Fix space list item mobilization\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react'\n\nimport './scss/mobilization-list-item-avatar.scss'\n\nconst MobilizationListItemAvatar = ({ image, facebook_share_image, imageSize }) => (\n <div classNa... | javascript | chosen |
[
{
"from": "system",
"value": "Check for null config settings a bit safer\n\nFixes https://github.com/vector-im/riot-web/issues/12254"
},
{
"from": "human",
"value": "/*\nCopyright 2017 Travis Ralston\nCopyright 2019 New Vector Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\... | javascript | chosen |
[
{
"from": "system",
"value": "Use experimentsService to add the chosen template to the task (on the backend).\n"
},
{
"from": "human",
"value": "angular.module('materialscommons').component('mcExperimentTaskDetails', {\n templateUrl: 'app/project/experiments/experiment/components/tasks/mc-exp... | javascript | chosen |
[
{
"from": "system",
"value": "Move nsp from prepublish to test for test-pages\n"
},
{
"from": "human",
"value": "const eslint = require(\"gulp-eslint\");\nconst gulp = require(\"gulp\");\nconst nsp = require(\"gulp-nsp\");\nconst path = require(\"path\");\n\nconst SRC = [\"**/*.js\", \"!node_mod... | javascript | chosen |
[
{
"from": "system",
"value": "Add ngModel scope watchers and update the model and settings\n"
},
{
"from": "human",
"value": "angular.module('angular-fullcalendar',[])\n .value('CALENDAR_DEFAULTS',{\n locale:'en'\n })\n .directive('fc',['CALENDAR_DEFAULTS',fcDirectiveFn]);\n\nfun... | javascript | chosen |
[
{
"from": "system",
"value": "Add other fields to posts new form\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Field, reduxForm } from 'redux-form';\n\nclass PostsNew extends React.Component {\n renderTitleField(field) {\n return (\n <div>\n <input\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Indent code after changing editor to netbeans."
},
{
"from": "human",
"value": "/*global angular*/\nangular.module('post')\n\t/**\n * @ngdoc controller\n * @name post.controller:PostMainController\n *\n * @description\n * # main post controller\n *... | javascript | chosen |
[
{
"from": "system",
"value": "test(helpers): Stop being nice about CI git garbage\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst path = require(\"path\");\nconst execa = require(\"execa\");\n\n// Contains all relevant git config (user, commit.gpgSign, etc)\nconst TEMPLATE = path.res... | javascript | chosen |
[
{
"from": "system",
"value": "Convert React.createClass to ES6 class\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {Motion} from 'react-motion';\n\n\nexport const ReactMotionLoop = React.createClass({\n propTypes: {\n styleFrom: React.PropTypes.object.isRequired,\n ... | javascript | chosen |
[
{
"from": "system",
"value": ":lock: Use isAuthenticated() method in LoggedIn middleware\n"
},
{
"from": "human",
"value": "const helpers = {\n /**\n * Express middleware to determine if the user is logged in\n * @param {Object} req\n * @param {Object} res\n * @param {Function} next\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Check for result in functional test.\n"
},
{
"from": "human",
"value": "/**\n * Created by zsolt on 3/31/14.\n */\n\n'use strict';\nif (typeof window === 'undefined') {\n\n // server-side setup\n var webgme = require('webgme');\n var CONFIG = require('../..... | javascript | chosen |
[
{
"from": "system",
"value": "Fix rootURL issue with docs\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(environment) {\n const ENV = {\n modulePrefix: 'dummy',\n environment,\n rootURL: '/',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add for prevent copyright problem and add more example on using\n"
},
{
"from": "human",
"value": "'use strict'\n\nlet username = \"Teerasej\";\nlet pokemonName = \"Pikachu\";\n\n// Use `` and ${} to insert string to text\nconsole.log( `${username}, you choose ${pok... | javascript | chosen |
[
{
"from": "system",
"value": "Check for 'close' event in timeout test\n"
},
{
"from": "human",
"value": "var common = require('../common');\nvar connection = common.createConnection();\nvar assert = require('assert');\n\nconnection.query('SET wait_timeout = 1');\n\nvar err;\nconnection.o... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong URL for remote calls\n\n"
},
{
"from": "human",
"value": "// Parameters for the application\n\nexport default {\n queryURL: 'https://unece-stardog.ichec.ie/annex/classifications/sparql/query'\n}"
},
{
"from": "gpt",
"value": "// Parameters for... | javascript | chosen |
[
{
"from": "system",
"value": "Allow keys to contain hyphens\n\nSee the [full length example](http://www.yaml.org/spec/1.2/spec.html#id2761803) from the yaml docs."
},
{
"from": "human",
"value": "// Contributed by ribrdb @ code.google.com\n\n/**\n * @fileoverview\n * Registers a language handler... | javascript | chosen |
[
{
"from": "system",
"value": "Rename component to follow convention\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport DeleteConfirmButtons from 'shared/components/DeleteConfirmButtons'\n\nconst DeleteTableCell = (props) => (\n <td className=\"text-right\" style={{width: \"85p... | javascript | chosen |
[
{
"from": "system",
"value": "Write the first working unit test \\o/\n"
},
{
"from": "human",
"value": "import { mount } from 'avoriaz'\nimport App from '@/App.vue'\n\ndescribe('App.vue', () => {\n it('should add and render a first participant', () => {\n const wrapper = mount(App)\n expe... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for use case when at least two neightbours are alive\n"
},
{
"from": "human",
"value": "\nvar GameOfLife = (function() {\n var ALIVE = \"alive\", DEAD = \"dead\";\n\n function Cell(initialState) {\n var state = initialState || DEAD;\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix listings controller issue of requiring model\n"
},
{
"from": "human",
"value": "var Listing = require('../models/listing.js');\nvar app = require('../../server/app.js');\n\nvar listings = {};\n\n//Controller method - retrieve all listings from DB\nlistings.getAl... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused require statement, and unnecessary state option.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar passport = require('passport');\nvar OpenIDConnectStrategy = require('passport-openidconnect');\nvar db = require('../db');\n\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Correct variable name to maxValues\n"
},
{
"from": "human",
"value": "const isDate = (key) => key === \"date\";\n\nmodule.exports = function (initialData, fields, maxValues) {\n if (initialData.length > maxValues) {\n initialData = initialData.slice(initia... | javascript | chosen |
[
{
"from": "system",
"value": "Fix breadcrumb for notification templates page\n\nIt didn't include the Settings crumb first\n"
},
{
"from": "human",
"value": "/*************************************************\n * Copyright (c) 2015 Ansible, Inc.\n *\n * All Rights Reserved\n ********************... | javascript | chosen |
[
{
"from": "system",
"value": "Change to [ and ]"
},
{
"from": "human",
"value": "var shouldAddEventListener;\n// define a handler\nfunction doc_keyUp(e) {\n // this would test if keyCode 85 (u) or keyCode 73 (i) was pressed\n if (e.keyCode == 85) {\n console.log(\"Keyboard for like tr... | javascript | chosen |
[
{
"from": "system",
"value": "Create a new object instead of modifying original\n\nFixing the root problem will require more severe changes, basically\navoiding passing objects by reference to prevent this kind of bugs.\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\nvar Style... | javascript | chosen |
[
{
"from": "system",
"value": "Add __dirname var for browser.\n"
},
{
"from": "human",
"value": "/** This code is to be ran on client side\n * so that the browser can execute JS for node correctly.\n */\n\n\nvar inherits = function (ctor, superCtor) {\n /** See nodejs lib sys.\n */\n var temp... | javascript | chosen |
[
{
"from": "system",
"value": "Change scrolling directive. It doesn't require separate element to scroll to.\n"
},
{
"from": "human",
"value": "angular.module('codebrag.commits')\n\n .directive('scrollCommitsList', function(events) {\n\n var idToScrollTo = '#commits-list-end';\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix index page to redirect new users to /welcome instead of /all\n"
},
{
"from": "human",
"value": "/*\n This file is a part of libertysoil.org website\n Copyright (C) 2016 Loki Education (Social Enterprise)\n\n This program is free software: you can redistribute i... | javascript | chosen |
[
{
"from": "system",
"value": "Remove selector method because it's not needed.\n"
},
{
"from": "human",
"value": "export default {\n /* jshint expr: true */\n create (opts) {\n var elem = document.createElement(opts.extends || opts.id);\n opts.extends && elem.setAttribute('is', opts.id);\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a redux-form onBlur related issue\n\nissue: onBlur causes redux-form to fetch raw value (for example\n12/08/2017) from DatePicker.\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport DatePicke... | javascript | chosen |
[
{
"from": "system",
"value": "Test Bubble Sort: Test for small arrays\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\nconst BubbleSort = require('../../../src').Algorithms.Sorting.BubbleSort;\nconst assert = require('assert');\n\ndescribe('BubbleSort', () => {\n it('should have no da... | javascript | chosen |
[
{
"from": "system",
"value": "Update to latest blacklight facet wrapping helper\n"
},
{
"from": "human",
"value": "/*global Blacklight */\n\n(function($) {\n 'use strict';\n \n Blacklight.doResizeFacetLabelsAndCounts = function() {\n // adjust width of facet columns to fit their contents\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add object types for orgs\n"
},
{
"from": "human",
"value": "'use strict';\nvar _ = require('lodash');\n\nvar objects = {\n user: {\n mutable: true,\n value: '0x01'\n },\n session: {\n mutable: true,\n value: '0x02'\n },\n app: {\n mutable: true,... | javascript | chosen |
[
{
"from": "system",
"value": "Add changing for loggerObject methods\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst {\n $\n} = Ember;\n\nconst log = [];\nconst addItem = (event, xhr, settings)=> log.push({ event, xhr, settings });\n\nlet getItemForSerializer = ()=> 'item'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JSCS in generated models\n"
},
{
"from": "human",
"value": "import { Model as <%= className %>Mixin<%if (projections) {%>, defineProjections<%}%> } from '../mixins/regenerated/models/<%= name %>';\nimport <%if(parentModelName) {%><%= parentClassName %>Model from... | javascript | chosen |
[
{
"from": "system",
"value": "Stop throwing yellew boxes when we warn from native\n\nSummary: This caused a bunch of stuff to break, reverting and will fix the problems before committing next time.\n\nReviewed By: fkgozali\n\nDifferential Revision: D4363398\n\nfbshipit-source-id: 55146c9da998f6a3883307c3642... | javascript | chosen |
[
{
"from": "system",
"value": "Use const in Users controller\n"
},
{
"from": "human",
"value": "var Router = require('koa-router')\nvar middleware = require('../../utils/middleware')\n\nmodule.exports = UsersController\nfunction UsersController () {\n var auth = middleware.auth()\n var routes =... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to css causing unneeded scroll bar being visible.\n"
},
{
"from": "human",
"value": "import { injectGlobal } from 'styled-components';\n\n/* eslint no-unused-expressions: 0 */\ninjectGlobal`\n html,\n body,\n #app {\n background-color: rgba(74, 74, 74, 0.5... | javascript | chosen |
[
{
"from": "system",
"value": "Add callback parameter to update function.\n"
},
{
"from": "human",
"value": "class Reservation {\n constructor(id, partySize) {\n this.id = id;\n this.party_of = partySize;\n}\n\n update() {\n var reservation = { reservation: this };\n $.ajax({\n m... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with restaurant div\n"
},
{
"from": "human",
"value": "$(document).ready(function(){\n $(\".restaurant-info\").hide();\n\n $(\".restaurant-tab-container\").on(\"click\", function(event) {\n var restaurant = $(this).find(\".restaurant-tab\").prop('id');\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove user key from generated databases.json file\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Node.js core.\nconst execSync = require('child_process').execSync;\nconst path = require('path');\n\n// Logger.\nconst logger = require('strapi-utils').logger;\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove an unused require statement\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar $ = require('jquery')\n , io = require('socket.io-client')\n , game = require('./game')\n , primus;\n\nconsole.log('connecting to server ...');\n\n/* global Primus */... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce height of mana curve chart\n\nSo that labels are visible\n"
},
{
"from": "human",
"value": "app.directive(\"manaCurveChart\", function($timeout) {\n return {\n restrict: \"E\",\n template: \"Mana curve<div></div>\",\n scope: {\n curve: \"=\"\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add improved logic to ignore errors in TrackJs\n"
},
{
"from": "human",
"value": "window._trackJs = {\n onError: function(payload, error) {\n\n // ignore an error caused by DealPly (http://www.dealply.com/) chrome extension\n if (payload.message.ind... | javascript | chosen |
[
{
"from": "system",
"value": "Update docs after building Travis build 219 of\nregro/regolith\n\nThe docs were built from the branch 'master' against the commit\n8c4a53f4fb596ffbe7d71fe82626587e81115aac.\n\nThe Travis build that generated this commit is at\nhttps://travis-ci.org/regro/regolith/jobs/353899815... | javascript | chosen |
[
{
"from": "system",
"value": "Use $onChanges to react to updated content\n"
},
{
"from": "human",
"value": "import markdown from \"markdown-it\";\nconst md = markdown({\n xhtmlOut: true,\n breaks: true\n});\n\nexport default class ExpandablePanelController {\n constructor($timeout, $sce) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow switching template and display for field\n"
},
{
"from": "human",
"value": "/**\n * Created by dmorina on 27/06/15.\n */\n\n/**\n * mdTemplateCompilerDirective\n * @namespace crowdsource.template.directives\n */\n(function () {\n 'use strict';\n angular\... | javascript | chosen |
[
{
"from": "system",
"value": "Use test helpers in InputObjectValuesHaveDescriptions tests\n"
},
{
"from": "human",
"value": "import assert from 'assert';\nimport { parse } from 'graphql';\nimport { validate } from 'graphql/validation';\nimport { buildASTSchema } from 'graphql/utilities/buildASTS... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console.log the invocation function\n"
},
{
"from": "human",
"value": "/*\r\n Free Code Camp Challenge - Mutations\r\n https://www.freecodecamp.com/challenges/mutations\r\n*/\r\n\r\nfunction mutation(arr) {\r\n var firstElement = arr[0].toLowerCase();\r\n... | javascript | chosen |
[
{
"from": "system",
"value": "Implement counter to keep track of what we already added to output array\n"
},
{
"from": "human",
"value": "// Program that identifies common element(s) that exist within both two arrays\n\nfunction intersection(firstArray, secondArray) {\n\tvar hashMap = {};\n\tvar... | javascript | chosen |
[
{
"from": "system",
"value": "Add new class to description\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport ReactCSSTransitionReplace from 'react-css-transition-replace';\nimport { connect } from 'react-redux';\nimport store from '../store.js';\n\n\nclass Desc... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneccessary Customer Dashboard navbar link\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Link } from 'react-router';\nimport { Menu, Segment } from 'semantic-ui-react';\nimport DynamicLinks from './DynamicLinks';\n\nconst Navbar = (... | javascript | chosen |
[
{
"from": "system",
"value": "Correct an use of the DrivedGroupDialog container\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport darkBaseTheme from 'material-ui/styles/baseThemes/darkBaseTheme'\nimport getMuiTheme from 'material-ui/styles/getMuiTheme'\nimport MuiThemeProvider... | javascript | chosen |
[
{
"from": "system",
"value": "Set ignoreHidden to false to allow TinyMCE editor validation to function properly.\n"
},
{
"from": "human",
"value": "/*\n---\n\ndescription: Monkey patching the Form.Validator to alter its behavior and extend it into doing more\n\nrequires:\n - MooTools More\n\nlic... | javascript | chosen |
[
{
"from": "system",
"value": ":recycle: Move `extends` and `env` up\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst path = require('path');\n\n/*\n * ECMAScript 6\n */\nmodule.exports = {\n\tparserOptions: {\n\t\tecmaVersion: 6,\n\t\tsourceType: 'module',\n\t\tecmaFeatures: {\n\t\t\tex... | javascript | chosen |
[
{
"from": "system",
"value": "Fix non existent env var and simplify string operations\n\n1. `DRSS_BOT_CONTROLLER` is missing in `app.json` manifest, maybe meant `DRSS_BOT_CONTROLLER_IDS` ?\n2. `.replace(' ', '')` doesn't make sense because it replaces only the first occurrence\n3. Simple array creation with... | javascript | chosen |
[
{
"from": "system",
"value": "Add a failing test simply to test Travis\n"
},
{
"from": "human",
"value": "describe(\"LogFmt\", function() {\n // API\n var LogFmt, $httpBackend;\n\n // Load required modules.\n beforeEach(angular.mock.module(\"logfmt\"));\n\n beforeEach(inject(function($injec... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for location undefined bug in mocha\n"
},
{
"from": "human",
"value": "if (!global.document || !global.window) {\n var jsdom = require('jsdom').jsdom;\n\n global.document = jsdom('<html><head><script></script></head><body></body></html>', null, {\n FetchExt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix admin ui for store promo rules\n\nThe data is nested under the \"stores\" attribute.\n\nCloses #11\n"
},
{
"from": "human",
"value": "$.fn.storeAutocomplete = function() {\n this.select2({\n minimumInputLength: 1,\n multiple: true,\n initSelection: fun... | javascript | chosen |
[
{
"from": "system",
"value": "Rename `options` param to `config` to bring it inline with other plugins\n\n"
},
{
"from": "human",
"value": "import onBackspace from './utils/onBackspace';\n\n// Block-Types to be handled will be stored here\nlet types = [];\nconst cleanupEmptyPlugin = (options = {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue when API wasn't returning correct service dialog results\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular.module('app.states')\n .run(appRun);\n\n /** @ngInject */\n function appRun(routerHelper) {\n routerHelper.confi... | javascript | chosen |
[
{
"from": "system",
"value": "Store canVote in state when user connects\n"
},
{
"from": "human",
"value": "import { ADMIN_SIGNED_IN, AUTH_SIGNED_IN, AUTH_AUTHENTICATED } from 'common/actionTypes/auth';\n\nconst defaultState = {\n id: '',\n username: '',\n fullName: '',\n permissions: 0,\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Correct method for listing Products in Angular Controller.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('products').controller('ProductsController', ['$scope', '$stateParams', '$location', 'Products',\n\tfunction($scope, $stateParams, $location... | javascript | chosen |
[
{
"from": "system",
"value": "Modify Textfiled component to not change background to dark grey when it is disabled.\n"
},
{
"from": "human",
"value": "function ComponentTextfield( id ) {\n\tvar self = _ComponentFormControl(id);\n\t\n\tself.setDefaultState('text-value');\n\tself.bind = function()... | javascript | chosen |
[
{
"from": "system",
"value": "Add temporary limit to Cover view to stop rebuilding artwork\n\nTODO: Implement lazy loading of images to that they aren't\nall fetched initially!"
},
{
"from": "human",
"value": "/** @jsx React.DOM */\n'use strict';\n\nvar React = require('react/addons');\n\nvar Co... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug where the search dropdown wouldn't toggle\n\nWhen clicking on the magnifying glass again, the dropdown wouldn't hide.\n"
},
{
"from": "human",
"value": "((function (App) {\n 'use strict';\n\n App.View.HeaderView = Backbone.View.extend({\n\n events: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add the filename to ejs for `include` directive\n\nEJS has a newer `include` directive to replace the old `partial` function in express. This just includes a file relative to the current. The engine has to know the path of the template in order for this to happen."
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Redux logs in production"
},
{
"from": "human",
"value": "import { applyMiddleware, createStore, compose } from 'redux';\nimport { routerMiddleware } from 'react-router-redux';\nimport thunk from 'redux-thunk';\nimport createLogger from 'redux-logger';\nimpor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where selected requests would pop open the details page even when not needed\n"
},
{
"from": "human",
"value": "var glimpse = require('glimpse'),\n requestRepository = require('../repository/request-repository.js'),\n // TODO: Not sure I need to store ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove message logic from player controller\n"
},
{
"from": "human",
"value": "define([ \n\n 'Backbone',\n\n 'text!templates/project-page/playerTemplate.html'\n], function( \n\n Backbone,\n\n playerTemplate\n){\n\n var PlayersController = Backbone.View.extend({... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor the code to use named exports\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nexport function isTopicValid(topic){\n const MAX_TITLE_LENGTH = 20;\n\n let isValid = !(topic.title.length > MAX_TITLE_LENGTH || topic.author.isBlocked);\n return isValid... | javascript | chosen |
[
{
"from": "system",
"value": "Use classnames helper to generate class string\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport './status-button.scss';\n\nclass StatusButton extends React.Component {\n getClass() {\n return `button -${this.props.type}`;\n }\n // Ideal se... | javascript | chosen |
[
{
"from": "system",
"value": "Correct the delete app functionality"
},
{
"from": "human",
"value": "function deleteApp(appName) {\n var result = window.confirm('Do you want to delete this app?' + \"\\n\\n\" + appName);\n if (result)\n {\n window.location = '/openmrs/module/owa/de... | javascript | chosen |
[
{
"from": "system",
"value": "678: Update variable name based on review comment\n"
},
{
"from": "human",
"value": "const expect = require('chai').expect\n\nconst workloadCapacityHelper = require('../helpers/data/aggregated-data-helper')\n\nvar workloadOwnerIds = []\n\ndescribe('View overview', (... | javascript | chosen |
[
{
"from": "system",
"value": "Update code to be compliant with node 0.10\n"
},
{
"from": "human",
"value": "'use strict'\r\n\r\nconst serilog = require('../src/core/structured-log.js');\r\nconst serilogCompactSink = require('../src/npm/serilog-compact-console-sink.js');\r\nconst assert = require... | javascript | chosen |
[
{
"from": "system",
"value": "Use different port in frontend\n"
},
{
"from": "human",
"value": "/**\n * Created by Tomasz Gabrysiak on 2016-03-12.\n */\n\nvar gulp = require('gulp');\nvar webserver = require('gulp-webserver');\n\ngulp.task('webserver', function () {\n gulp.src('./app/')\n .p... | javascript | chosen |
[
{
"from": "system",
"value": "Set identifier to undefined when setting geo in area filter reducer\n"
},
{
"from": "human",
"value": "import {\n FILTER_BY_AREA_TYPE,\n FILTER_BY_AREA_IDENTIFIER,\n FILTER_BY_AREA_CUSTOM,\n} from '../constants/action_types';\n\nconst defaultState = {\n area: 'C... | javascript | chosen |
[
{
"from": "system",
"value": "Put download stats behind !npmo feature flag\n"
},
{
"from": "human",
"value": "var P = require('bluebird');\n\nvar MINUTE = 60; // seconds\nvar MODIFIED_TTL = 1 * MINUTE;\nvar DEPENDENTS_TTL = 30 * MINUTE;\n\nmodule.exports = function(request, reply) {\n var Packa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix changelist footer fixed transition\n"
},
{
"from": "human",
"value": "var $ = require('jquery');\n\nvar ActionsUpdater = function($changelist) {\n this.$changelist = $changelist;\n};\n\nActionsUpdater.prototype = {\n removeLabel: function($actions) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update defer to work with multiple calls\n\nUpdated the defer object to work when the plugin is called more than once."
},
{
"from": "human",
"value": "//OpenWeatherMap-JQuery\n(function( $ ) {\n \n var settings = {};\n var defer = $.Deferred();\n\n // Plugin def... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to look for class binding when Aviary Editor has launched"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport startApp from '../helpers/start-app';\n\nvar App;\n\nmodule('Acceptance: Aviary Editor', {\n setup: function() {\n App = startA... | javascript | chosen |
[
{
"from": "system",
"value": "Modify commentInsert to add notifications after commenting\n"
},
{
"from": "human",
"value": "Comments = new Mongo.Collection('comments');\n\nMeteor.methods({\n commentInsert: function(commentAttributes) {\n check(this.userId, String);\n check(commentAttribut... | javascript | chosen |
[
{
"from": "system",
"value": "Add html placeholder option to search input\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $('#dataTable').DataTable();\n} );"
},
{
"from": "gpt",
"value": "$(document).ready(function() {\n $('#dataTable').dataTable( {\n ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.