conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add a reference to jasmine typings\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('javaScript', function () {\n it('Revealing prototype pattern', function () {\n var Calculator = function(seed){\n this.seed = seed;\n };\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Check currentUser before calling id method\n"
},
{
"from": "human",
"value": "function PostController(post, Auth, PostsService, $stateParams, categories, Flash) {\n var ctrl = this;\n\n if (post) {\n ctrl.data = post.data;\n }\n\n if (categories) {\n ctrl.... | javascript | chosen |
[
{
"from": "system",
"value": "Add reload and replies commands\n"
},
{
"from": "human",
"value": "var util = require('util')\n , twitter = require('twitter')\n , colors = require('colors')\n , repl = require('repl')\n , keys = require('./keys')\n , local = repl.start()\n , first = true\n\nv... | javascript | chosen |
[
{
"from": "system",
"value": "Update guide group util to include layout option.\n"
},
{
"from": "human",
"value": "import {GroupMark} from '../marks/marktypes';\n\nexport default function(role, style, name, dataRef, interactive, encode, marks) {\n return {\n type: GroupMark,\n name: name,... | javascript | chosen |
[
{
"from": "system",
"value": "Add ignore for 303 Intercom error not related to us\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.messag... | javascript | chosen |
[
{
"from": "system",
"value": "Add configurable numberOfDepartments to RandomUsersRetriever getUsers\n"
},
{
"from": "human",
"value": "export default class RandomUsersRetriever {\n getUsers(numberOfUsers) {\n const users = [];\n\n // Add nodes to random parents\n for (let i = 0; i < nu... | javascript | chosen |
[
{
"from": "system",
"value": "Use test helpers in FieldsAreCamelCased tests\n"
},
{
"from": "human",
"value": "import assert from 'assert';\nimport { parse } from 'graphql';\nimport { validate } from 'graphql/validation';\nimport { buildASTSchema } from 'graphql/utilities/buildASTSchema';\n\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Move button to top nav bar\nChange styling to match Toggl color scheme\n"
},
{
"from": "human",
"value": "/*jslint indent: 2 */\n/*global $: false, document: false, togglbutton: false*/\n'use strict';\n\n\ntogglbutton.render('#layout-container:not(.toggl)', {observe... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for compiling mustache and block nodes\n"
},
{
"from": "human",
"value": "import { compile } from '../../emblem/template-compiler'\n\nQUnit.module(\"template compiler\");\n\n\nQUnit.test(\"compiles text node AST\", function(assert){\n var ast = {\n typ... | javascript | chosen |
[
{
"from": "system",
"value": "Add footnotes to markdown parser\n"
},
{
"from": "human",
"value": "import angular from 'angular';\nimport mdfigcaption from 'mdfigcaption';\nimport deflist from 'markdown-it-deflist';\nimport attrs from 'markdown-it-attrs';\nexport default /*@ngInject*/class Markdo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix masonry bulk loader in the about page\n"
},
{
"from": "human",
"value": "(function(App) {\n\n 'use strict';\n\n App.Controller = App.Controller || {};\n\n App.Controller.About = App.Controller.Page.extend({\n\n index: function() {\n new App.View.Ancho... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for providing a custom description key\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport ValidatorsMessages from 'ember-cp-validations/validators/messages';\n\nconst { Logger:logger } = Ember;\n\nexport default function() {\n Validat... | javascript | chosen |
[
{
"from": "system",
"value": "Make interpolate filter support {area|...} tags and briefly document what it does\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('occupied.filters', ['occupied.services'])\n\n .filter('interpolate', ['$filter', 'basePopulation', function($filt... | javascript | chosen |
[
{
"from": "human",
"value": "Add markup for video detail.\n"
},
{
"from": "gpt",
"value": "import React from 'react';\n\nconst VideoDetail = (props) => {\n\treturn (\n\t\t<div className=\"video-detail col-md-8\">\n\t\t\t<div className=\"embed-responsive embed-responsive-16by9\">\n\t\t\t\t<iframe... | javascript | chosen |
[
{
"from": "system",
"value": "Use single var for requires"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar config = require('../config');\n\nvar plumber = require('gulp-plumber');\nvar jscs = require('gulp-jscs');\nvar jshint = require('gulp-jshint');\nvar stylish = require('jsh... | javascript | chosen |
[
{
"from": "system",
"value": "Improve download speed by using non-blocking. Also adding upper limit 365.\n"
},
{
"from": "human",
"value": "var cheerio = require('cheerio'),\n\trequest = require('request'),\n\tfs = require('fs');\n\nvar savePath = process.argv[2];\n\nif(typeof savePath === 'unde... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JS compatibility for PS 1.4\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\n function displaySellermaniaCredentials()\n {\n if ($('#sm_import_orders_yes').attr('checked') == 'checked')\n $('#sm_import_orders_credentia... | javascript | chosen |
[
{
"from": "system",
"value": "Add new icons to tests\n"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-qunit'\nimport hbs from 'htmlbars-inline-precompile'\n\nmoduleForComponent('svg-icon', 'Integration | Component | svg icon', {\n integration: true\n})\n\nconst... | javascript | chosen |
[
{
"from": "system",
"value": "Set content type mainField to be a string if possible else id\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst _ = require('lodash');\nconst { isSortable } = require('./attributes');\n\nconst getDefaultMainField = schema => {\n if (schema.modelType == 'gro... | javascript | chosen |
[
{
"from": "system",
"value": "Add container for user suggestions in chat\n"
},
{
"from": "human",
"value": "/* @flow */\n\n// TODO\n"
},
{
"from": "gpt",
"value": "/* @flow */\n\nimport React, { Component, PropTypes } from 'react';\nimport Connect from '../../../modules/store/Connect... | javascript | chosen |
[
{
"from": "system",
"value": "Fix styles of new message notification\n"
},
{
"from": "human",
"value": "(function($){\n\tvar $bar;\n\twindow.xeNotifyMessage = function(text, count){\n\t\t$bar = $('div.message.info');\n\t\tif(!$bar.length) {\n\t\t\t$bar = $('<div class=\"message info\" />')\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Add sync version of json ref resolver\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst should = require('should');\n\nconst refResolver = require('./../../lib/ref_resolver');\n\nconst schema = require('./schema.json');\n\ndescribe('RefResolver', () => {\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add results from load more to matches prop\n"
},
{
"from": "human",
"value": "import { connect } from 'react-redux';\nimport Matches from '../components/Matches.jsx';\nimport { unmountMatch, removeMatch, incrementOffset, addMatches } from '../actions/index.js';\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Send player login info on websocket connection\n"
},
{
"from": "human",
"value": "function Network() {\n function sendGameRequest(numPlayers) {\n var message = {\"NumPlayers\": numPlayers}\n sendMessage(GAMEREQUEST, message)\n }\n\n GAMEREQUES... | javascript | chosen |
[
{
"from": "system",
"value": "Increase limit for display of affiliations.\n"
},
{
"from": "human",
"value": "/* eslint-disable prefer-arrow-callback */\nimport { Meteor } from 'meteor/meteor';\nimport { check } from 'meteor/check';\n\nimport { Affiliations } from '../affiliations.js';\n\nMeteor.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the extent in the regions query for DO to get all the available regions without filtering\n"
},
{
"from": "human",
"value": "var BaseCollection = require('./data-observatory-base-collection');\nvar BaseModel = require('../../components/custom-list/custom-list... | javascript | chosen |
[
{
"from": "system",
"value": "Remove broken 'prettify' button for catalog queries.\n"
},
{
"from": "human",
"value": "var $ = django.jQuery;\n\n\n$(function () {\n var $prettifyBtn,\n $previewBtn,\n $previewRow,\n $queryRow = $('.form-row.field-query'),\n $queryFie... | javascript | chosen |
[
{
"from": "system",
"value": "Check for existence before removal\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Table = require('./Table');\nvar TableSchema = Table.schema;\nvar Schema = mongoose.Schema;\n\n\nvar handleError = function(err){\n if... | javascript | chosen |
[
{
"from": "system",
"value": "Remove readmore after-collapse scroll effect\n"
},
{
"from": "human",
"value": "$(function(){\n $('.step-section').readmore({\n collapsedHeight: 300,\n heightMargin: 300,\n speed: 250,\n moreLink: '<a href=\"#\" class=\"readmore text-center\"><span clas... | javascript | chosen |
[
{
"from": "system",
"value": "chore(sinon-doublist): Update use to latest API\n"
},
{
"from": "human",
"value": "var sinon = require('sinon');\nvar chai = require('chai');\n\nvar should = chai.should();\nchai.Assertion.includeStack = true;\nchai.use(require('sinon-chai'));\n\nvar nc = require('.... | javascript | chosen |
[
{
"from": "system",
"value": "Update remove user for manage code project\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @module manage-code-project/handler/removeUser\n */\n\n /**\n * Allows user to remove a member from a code project\n * @param {Request} request - Hapi request\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor how location is shown\n"
},
{
"from": "human",
"value": "import React, {PureComponent} from 'react';\nimport classNames from 'classnames';\nimport {isPast, parse} from 'date-fns';\n\nimport {formatDate, generateEventJSONLD} from './utils';\nimport Heading f... | javascript | chosen |
[
{
"from": "system",
"value": "Connect actions to props and add onSubmit function\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react'\n\n\nclass Login extends Component {\n constructor(props) {\n super();\n this.state = {\n email: '',\n password: ''\n }\n... | javascript | chosen |
[
{
"from": "system",
"value": "[DevTools] Add getPropertyCSSValue polyfill for old frontends.\n\nBUG=436037\n\nReview URL: https://codereview.chromium.org/783163002\n\ngit-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@186713 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n"
},
{
"from": "human",
"value"... | javascript | chosen |
[
{
"from": "system",
"value": "Add log statement in readJson\n"
},
{
"from": "human",
"value": "\nmodule.exports = readJson;\n\nvar fs = require(\"fs\"),\n semver = require(\"./semver\");\n\nfunction readJson (jsonFile, cb) {\n fs.readFile(jsonFile, function (er, jsonString) {\n if (er) retu... | javascript | chosen |
[
{
"from": "system",
"value": "Add millis to human readable\n"
},
{
"from": "human",
"value": "class TimeSync {\n constructor() {\n this.ts = timesync.create({\n server: '/timesync'\n });\n }\n\n now() {\n return parseInt(this.ts.now().toFixed());\n }\n\n humanTime(millisec) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Use the column module and just extend from that.\n"
},
{
"from": "human",
"value": "define([\n 'extensions/collections/collection'\n],\nfunction (Collection) {\n return {\n requiresSvg: true,\n collectionClass: Collection,\n\n collectionOptions: function ... | javascript | chosen |
[
{
"from": "system",
"value": "Deal with HEAD possibly not existing\n"
},
{
"from": "human",
"value": "var merge = require('webpack-merge')\nvar shell = require('shelljs')\nvar prodEnv = require('./prod.env')\nvar hash = shell.cat('HEAD').exec('cut -d \" \" -f2', {silent: true}).stdout\n\nmodule.... | javascript | chosen |
[
{
"from": "system",
"value": "Make Google OAuth2 state parameter configurable\n"
},
{
"from": "human",
"value": "/**\n * This class implements authentication against google\n * using the OAuth2 authorization flow in a popup window.\n */\n\nimport Oauth2 from 'torii/providers/oauth2-code';\nimpor... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment showing what error is thrown\n"
},
{
"from": "human",
"value": "export default function apply(issues, jiraClientAPI) {\n let issueMap = issues.map(issue => {\n return jiraClientAPI.findIssue(issue);\n });\n\n return Promise.all(issueMap)\n .then(... | javascript | chosen |
[
{
"from": "system",
"value": "Add req.files to params object\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar passport = require('passport'),\n nconf = require('nconf'),\n utils = require('../lib/utils'),\n geboSchema = require('../schemata/gebo'),\n agentSchema = require('../... | javascript | chosen |
[
{
"from": "system",
"value": "Add some effects for the Owner and Tag associations.\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"
},
{
"from": "gpt",... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor mutation to only return connection\n"
},
{
"from": "human",
"value": "import Relay from 'react-relay';\n\nexport default class extends Relay.Mutation {\n getMutation() {\n return Relay.QL`mutation{ ConnectOauth }`;\n }\n\n getFatQuery() {\n return ... | javascript | chosen |
[
{
"from": "system",
"value": "Change methods from tasks to giblets\n"
},
{
"from": "human",
"value": "Meteor.methods({\n addTask: function (text) {\n console.log('add task tset');\n // Make sure the user is logged in before inserting a task\n // if (! Meteor.userId()) {\n // throw... | javascript | chosen |
[
{
"from": "system",
"value": "Update angular+jasmine externs to have the module function accept an Object value map.\n\n-------------\nCreated by MOE: https://github.com/google/moe\nMOE_MIGRATED_REVID=195101380\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2015 The Closure Compiler Authors... | javascript | chosen |
[
{
"from": "system",
"value": "Add userId to google Analytics\n"
},
{
"from": "human",
"value": "import * as Sentry from '@sentry/browser';\nimport { getSetting } from 'meteor/vulcan:core'\n\nconst sentryUrl = getSetting('sentry.url');\nconst sentryEnvironment = getSetting('sentry.environment');\... | javascript | chosen |
[
{
"from": "system",
"value": "Implement AJAX for showing comments.\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $(\"body\").on(\"click\", \"#signup\", function(event){\n event.preventDefault();\n var $target = $(event.target);\n $.ajax({\n type: \"GET\",\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Implement checkString to return correct date object for unix timestamps\n"
},
{
"from": "human",
"value": "const checkString = (string) => {\n if (typeof string == 'string') {\n if (isNaN(Date.parse(string)) == false) {\n const unix = Date.parse(string) / 1... | javascript | chosen |
[
{
"from": "system",
"value": "Remove reference to prettify from js manifest\n"
},
{
"from": "human",
"value": "//= require jquery\n//= require jquery-ui\n//= require jquery_ujs\n//= require jquery.cookie\n//= require faye-browser\n//= require prettify\n//= require twitter/bootstrap\n//= require ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix import and type file\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react'\nimport {StyleSheet, Text, TouchableHighlight, View} from 'react-native'\n\nimport commonStyles from '../../../styles/common'\n\nexport default class ExistingDeviceRen... | javascript | chosen |
[
{
"from": "system",
"value": "Make whole feat gene thumb clickable\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\nimport { primary } from '@artsy/reaction-force/dist/Assets/Fonts'\n\nconst propTypes = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update the Issue Summary navigation bar\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Navbar, NavItem, Nav, Jumbotron, Button, Input} from 'react-bootstrap';\n\nimport {\n BrowserRouter as Router,\n Route,\n Link,\n Redirect,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Make normalize urls to not remove trailing slash\n"
},
{
"from": "human",
"value": "const cheerio = require('cheerio')\nconst normalizeUrl = require('normalize-url')\n\nconst request = require('../request')\n\nmodule.exports = async function findFeed ({ url }) ... | javascript | chosen |
[
{
"from": "system",
"value": "Add override of winston logging to end-to-end test"
},
{
"from": "human",
"value": "\n'use strict';\n\nvar path = require('path');\nvar core = require('thehelp-core');\ncore.env.merge(path.join(__dirname, '../../env.json'));\n\nvar cluster = require('../../src/serve... | javascript | chosen |
[
{
"from": "system",
"value": "[Fix] Add additional checks for no-hardrcoded-password rule\n"
},
{
"from": "human",
"value": "\nmodule.exports = context => {\n function inspectHardcodedPassword(node, value) {\n const isHardcoded = value.toLowerCase().includes('passw');\n\n if (is... | javascript | chosen |
[
{
"from": "system",
"value": "Modify test to print expected and actual values\n"
},
{
"from": "human",
"value": "'use strict';\n\n// MODULES //\n\nvar tape = require( 'tape' );\nvar ksa = require( './../lib/ksa.js' );\n\n\n// FIXTURES //\n\nvar byte_array = require( './fixtures/ksa.json' );\n\n\... | javascript | chosen |
[
{
"from": "system",
"value": "ADD compiler to loader as per docs\n"
},
{
"from": "human",
"value": "export function webpack(config) {\n return {\n ...config,\n module: {\n ...config.module,\n rules: [\n ...config.module.rules,\n {\n test: /\\.marko$/,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Load next page if scrollHeight <= clientHeight\n\ncloses #4764\n- call loadNextPage in attachCheckScroll, if element scrollHeight <=\nclientHeight\n"
},
{
"from": "human",
"value": "var PaginationViewInfiniteScrollMixin = Ember.Mixin.create({\n\n /**\n * Dete... | javascript | chosen |
[
{
"from": "system",
"value": "Fix removing a sentence from a list\n\nUsing the old design, after adding a sentence to\na list from the list page, the \"remove sentence\nfrom list\" button of that newly-added sentence\ndid not work until the page was reloaded.\n"
},
{
"from": "human",
"value": "/... | javascript | chosen |
[
{
"from": "system",
"value": "Fix after upgrade node v7\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar restify = require('restify');\nvar js2xmlparser = require('js2xmlparser');\nvar server = restify.createServer({\n formatters: {\n 'application/json; q=5': function format(req... | javascript | chosen |
[
{
"from": "system",
"value": "Add code from Slack SDK examples\n"
},
{
"from": "human",
"value": "#!node\n\n"
},
{
"from": "gpt",
"value": "#!node\n\nvar SlackClient = require(\"@slack/client\");\nvar RtmClient = SlackClient.RtmClient;\nvar RTM_EVENTS = SlackClient.RTM_EVENTS;\n\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Add summary after downloads list.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nif (!process.argv[2]) return console.error(\n 'Usage: npm-me <username>'\n)\n\nvar columnify = require('columnify')\n\nrequire('./')(process.argv[2], function(err, downloads... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken pagination with Elasticsearch and Undertow\n\nThanks @ashakhov for the solution\n\nFix #4158\n"
},
{
"from": "human",
"value": "(function(){\n 'use strict';\n\n angular\n .module('<%=angularAppName%>')\n .factory('ParseLinks', ParseLi... | javascript | chosen |
[
{
"from": "system",
"value": "Allow overriding of date error fields\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst debug = require('debug')('hmpo:fields:Select');\nconst InputDate = require('./input-date');\nconst ErrorGroup = require('./error-group');\n\nclass InputDateGroup extends ... | javascript | chosen |
[
{
"from": "system",
"value": "Set progress back to zero when stopping\n"
},
{
"from": "human",
"value": "Spotbox.Controllers.Player = Ember.Object.create({\n content: null,\n init: function() {\n var self = this;\n Spotbox.socket.on(\"tracks/current\", function(track) {\n self.set(\... | javascript | chosen |
[
{
"from": "system",
"value": "Test jetzt erfolgreich: der datenplatzhalter wird durch die gewΓΌnschten karyodaten ersetzt, interessanterweise mΓΌssen diese nicht extra eingeladen werden, da sie wohl noch im JavaScript-Sumpf herumwabern???\n"
},
{
"from": "human",
"value": "describe('Testing the fi... | javascript | chosen |
[
{
"from": "system",
"value": "Add index.json to content fetch path to be able to omit url rewriting\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { init } from './redux/page';\nimport Page from './component... | javascript | chosen |
[
{
"from": "system",
"value": "Change number of messages to show in the UI to 500 from 10\n"
},
{
"from": "human",
"value": "// strip the last dir... essentially the same as __dirname/..\nvar root = __dirname.replace(/\\/[^\\/]+\\/?$/,'');\n\nmodule.exports = {\n\t port: 8001\n\t, public_dir: r... | javascript | chosen |
[
{
"from": "system",
"value": "Add alert and logout when no login details given\n"
},
{
"from": "human",
"value": "/**\n * Generic error handler method for ajax responses.\n * Apply your specific requirements for an error response and then call this method to take care of the rest.\n * @param res... | javascript | chosen |
[
{
"from": "system",
"value": "Add queue to the toasts.\n"
},
{
"from": "human",
"value": "import { Util } from \"../../util.js\";\n\nexport class ToastsTemplate {\n static update(render, { message = \"\" } = {}) {\n const now = Util.formatDate(new Date());\n\n if (message) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a registration button to the logged-out handler.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {connect} from 'react-redux';\nimport {bindActionCreators} from 'redux';\n\nimport {fxaLoginBegin, login} from '../actions/login';\nimport {Log... | javascript | chosen |
[
{
"from": "system",
"value": "Fix duration formatting in status chart\n\nNumbers were not zero padded.\n"
},
{
"from": "human",
"value": "angular.module('ocWebGui.statusChart.service', ['ngResource'])\n .factory('AgentStatusStats', function ($http) {\n return {\n stats: function (startD... | javascript | chosen |
[
{
"from": "system",
"value": "Use proper fixtures in project tests\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst expect = require('chai').expect;\nconst getProjectConfig = require('../../src/config/android').projectConfig;\nconst mockFs = require('mock-fs');\nconst depe... | javascript | chosen |
[
{
"from": "system",
"value": "Handle case where function caller is null\n"
},
{
"from": "human",
"value": "(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typ... | javascript | chosen |
[
{
"from": "system",
"value": "Add new user on reset\n"
},
{
"from": "human",
"value": "(function () {\n\n 'use strict';\n\n // Process for new user:\n // Make sure that\n\n Meteor.methods({\n 'reset' : function() {\n console.log('reset()')\n }\n });\n\n})();"
},
{
"from":... | javascript | chosen |
[
{
"from": "system",
"value": "Use literal plus character as IE6-8 doesn't like HTML entity\n"
},
{
"from": "human",
"value": "define([\n 'extensions/views/table/table'\n],\nfunction (Table) {\n var FailuresTable = Table.extend({\n \n columns: [\n {\n id: 'description',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure that state is correctly set\n"
},
{
"from": "human",
"value": "import expect from 'expect';\nimport Redux from '../src/Redux';\n\nconst fakeState = { foo: 'bar' };\n\nfunction fakeStore() {\n return fakeState;\n}\n\ndescribe('Redux', () => {\n\n let redu... | javascript | chosen |
[
{
"from": "system",
"value": "Change navigator.vendor to return Apple instead of Google\n\nThis is required per spec and the latest tests since we don't advertise Chrome in our fake User-Agent string.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nexports.implementation = class NavigatorI... | javascript | chosen |
[
{
"from": "system",
"value": "Add error logs to /api/auth\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst sgAuthApi = require('sg-auth-api').boot;\n\nmodule.exports = function (server) {\n server.use(sgAuthApi({\n models: {\n user: () => server.models.SgUser,\n token: () ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix numero secu input value\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('impactApp').directive('numeroSecu', function() {\n return {\n require: 'ngModel',\n link: function(scope, elem, attr, ngModel) {\n const isValid = (value) => ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace for loop with array.some\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2018 Studentmediene i Trondheim AS\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for missing arguments param;\n"
},
{
"from": "human",
"value": "var exec = require('cordova/exec');\n\nexports.attachHandlers = function(cb, scope) {\n\tvar fn = this._createCallbackFn(cb, scope);\n\n\texec(fn, null, 'BarcodeScanner', 'handleEvents');\n};\n\nexp... | javascript | chosen |
[
{
"from": "system",
"value": "Add packages to distribution namespace\n"
},
{
"from": "human",
"value": "'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@std... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing key prop to blog post list\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {Helmet} from 'react-helmet';\n\nimport Logo from '../../common/Logo';\nimport StyledLink from '../../common/StyledLink';\nimport NewsletterSignupForm from '... | javascript | chosen |
[
{
"from": "system",
"value": "Use hideMargin to reuse component on pages without sidebar\n"
},
{
"from": "human",
"value": "import m from 'mithril';\nimport h from '../h';\n\nconst projectEditSaveBtn = {\n view(ctrl, args) {\n return m('.w-section.save-draft-btn-section', [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix google analytics tracking page change\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('core').controller('HeaderController', ['$scope', '$state', 'Authentication', 'Menus',\n function($scope, $state, Authentication, Menus) {\n // Expose vi... | javascript | chosen |
[
{
"from": "system",
"value": "Add title to e2e screen for testing purposes\n"
},
{
"from": "human",
"value": "const React = require('react');\nconst { Component } = require('react');\nconst { View, Button } = require('react-native');\nconst { Navigation } = require('react-native-navigation');\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Add docs to the method signature\n"
},
{
"from": "human",
"value": "RocketChat.API.v1.addRoute('spotlight', { authRequired: true }, {\n\tget() {\n\t\tcheck(this.queryParams, {\n\t\t\tquery: String\n\t\t});\n\n\t\tconst { query } = this.queryParams;\n\n\t\tlet result... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Merged branch master into master\"\n\nThis reverts commit 8de34a3f733d4a270ec4d1869f543c8ccd220cf9."
},
{
"from": "human",
"value": "module.exports = function(app) {\n\n app.get('/voz/api/samplePhrase', function(req, res) {\n // Sample phrases\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve equalizer fixes: avoid flickering\n"
},
{
"from": "human",
"value": "import $ from 'jquery';\n\n/**\n * data-equalizer-ignore-class takes a string of classes that should be applied to an element that\n * uses data-equalizer-watch, but which should be ignored... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to close a tab after the task has been executed\n"
},
{
"from": "human",
"value": "Ext.namespace('ui', 'ui.task');\n\n// config - {prefix, ftype, fid, fpath, fname, lang, storeRecord}\nui.task.ChangeFileOwner = function(config)\n{\n Ext.apply(this, config);... | javascript | chosen |
[
{
"from": "system",
"value": "Remove foolish version constraint on npm-bcrypt.\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'verody:groupaccount',\n version: '0.3.0',\n summary: 'Provides qualified access to a single Meteor user account from one or more sets of credenti... | javascript | chosen |
[
{
"from": "system",
"value": "Add vacancy check to housing.\n"
},
{
"from": "human",
"value": "function House(x, y) {\n return {\n id: guid(),\n type: 'house',\n position: {\n x: x,\n y: y\n },\n materials: {\n wood: 2\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Put the fs read in a format that browserify/brfs can understand"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar InputParser = function (options) {\n options = options || {};\n\n var PEG = require(\"pegjs\");\n var fs = require(\"fs\");\n var pat... | javascript | chosen |
[
{
"from": "system",
"value": "Allow trailing new paragraphs in the end of the slate document\n"
},
{
"from": "human",
"value": "import {SLATE_TEXT_BLOCKS, SLATE_DEFAULT_NODE} from '../constants'\n\nfunction onKeyDown(event, data, state, editor) {\n if (data.key !== 'enter') {\n return null\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add Google Analytics tracking code.\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically\n// be i... | javascript | chosen |
[
{
"from": "system",
"value": "Fix port config for Heroku\n"
},
{
"from": "human",
"value": "module.exports = {\n database: process.env.MONGOLAB_URI\n , server_port: '80'\n}"
},
{
"from": "gpt",
"value": "module.exports = {\n database: process.env.MONGOLAB_URI\n , server_port:... | javascript | chosen |
[
{
"from": "system",
"value": "Handle hebrewMorph as language as well\n"
},
{
"from": "human",
"value": "'use strict';\nangular.module('arethusa.core').directive('foreignKeysHelp', [\n 'keyCapture',\n function(keyCapture) {\n return {\n restrict: 'AE',\n link: function(scope, eleme... | javascript | chosen |
[
{
"from": "system",
"value": "Remove EB token when snake_case (search_nearest/bounding)\n"
},
{
"from": "human",
"value": "module.exports = function (dojo) {\n if (dojo.eventbriteToken && dojo.eventbriteWhId) dojo.eventbriteConnected = true;\n delete dojo.eventbriteToken;\n delete dojo.eventb... | javascript | chosen |
[
{
"from": "system",
"value": "Fix status error not set in error responses\n"
},
{
"from": "human",
"value": "'use strict';\n\n\nconst { processError } = require('../../../error');\nconst { httpProcessError } = require('./http');\n\n\n// Error handler adding protocol-related information to except... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.