conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Add context to list upon start event\n"
},
{
"from": "human",
"value": "angular.module('contextModule').controller('Context.ListController', [\n '$scope',\n '$http',\n '$filter',\n '$routeParams',\n 'FoundationApi',\n 'Event.Service',\n\nfunction ($scope, $htt... | javascript | chosen |
[
{
"from": "system",
"value": "Add method for limited coin retreival\n"
},
{
"from": "human",
"value": "\n/**\n * First we will load all of this project's JavaScript dependencies which\n * includes Vue and other libraries. It is a great starting point when\n * building robust, powerful web applic... | javascript | chosen |
[
{
"from": "system",
"value": "Remove pc.DepthMaterial from API ref.\n"
},
{
"from": "human",
"value": "pc.extend(pc, function () {\r\n\r\n /**\r\n * @name pc.DepthMaterial\r\n * @class A Depth material is is for rendering linear depth values to a render target.\r\n * @author Will ... | javascript | chosen |
[
{
"from": "system",
"value": "Use an env var to determine whether spec output should colorize\n"
},
{
"from": "human",
"value": "var scanner = require('./scanner');\n\nmodule.exports = {\n run: function(pattern) {\n\n // load jasmine and a terminal reporter into global\n load(\"jasmine-1.... | javascript | chosen |
[
{
"from": "system",
"value": "Rename server request logger request id header name option and make the config object optional\n"
},
{
"from": "human",
"value": "const uuid = require('uuid');\n\nconst DEFAULT_HEADER_NAME = 'x-request-id';\n\n/**\n * Create a request loging express middleware\n * @... | javascript | chosen |
[
{
"from": "system",
"value": "Use ember-data-relationship-tracker in cards editor"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { inject as service } from '@ember/service';\n\nimport layout from '../../templates/components/field-editors/cardstack-cards-editor... | javascript | chosen |
[
{
"from": "system",
"value": "Prepare for new Yeoman Generator prompt()s.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Generator = module.exports = function () {\n\tvar cb = this.async();\n\tvar ignores = [\n\t\t'.git',\n\t\t'CHANGELOG.md',\n\t\t'CONTRIBUTING.md',\n\t\t'LICENSE.md',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Rename the state from 'Task' to 'tasks'.\n"
},
{
"from": "human",
"value": "import { createStore, combineReducers } from 'redux'\n\nimport Task from './reducers/Task'\n\nexport default createStore(\n combineReducers(\n {\n Task\n }\n )\n)\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Enable line numbers on result view\"\n\nThis reverts commit cba57c3ab39796c9ac007d4e26f9c4ad94aa7a3f.\n\nStill broken on FF\n"
},
{
"from": "human",
"value": "var LanguageMap = {\n \"crystal\": \"ruby\",\n \"gcc\": \"c++\"\n};\n\nexport default Ember.Comp... | javascript | chosen |
[
{
"from": "system",
"value": "Change $ selector to new element\n"
},
{
"from": "human",
"value": "$(function() {\n\t$('a.white-text').on('click', function() {\n\t\t$(this).addClass('animated bounceOutUp');\n\t\tvar href = $(this).attr('href');\n\t\tsetTimeout(function() {window.location = href},... | javascript | chosen |
[
{
"from": "system",
"value": "Check that module is an object, rather than that it's defined\n"
},
{
"from": "human",
"value": "goog.require('fontface.Observer');\n\nif (typeof module !== 'undefined') {\n module.exports = fontface.Observer;\n} else {\n window['FontFaceObserver'] = fontface.Obse... | javascript | chosen |
[
{
"from": "system",
"value": "Add skip support to shim"
},
{
"from": "human",
"value": "// Temporary Shim File for use while migrating from QUnit to Mocha\n/*global chai */\nfunction qunitShim() {\n var _currentTest,\n _describe = describe;\n\n function emitQUnit() {\n if (_currentTest... | javascript | chosen |
[
{
"from": "system",
"value": "Make forever.monitor watch source for modifications\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nvar forever = require('forever-monitor');\n\nvar server = new (forever.Monitor)('server.js', {\n options: process.argv.slice(2)\n});\n\nserver.on('exit', f... | javascript | chosen |
[
{
"from": "system",
"value": "Use token reference from env\n"
},
{
"from": "human",
"value": "import Telegraf from 'telegraf';\nimport config from 'config';\nimport feedReader from './feed';\n/* commands */\nimport commands from './commands';\n/* helpers */\nimport { sendIntervalMessages } from ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable eslint import/no-unresolved rule in bin script\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nconst program = require('commander');\nconst pkg = require('../package.json');\nconst addCommands = require('../lib/commands');\n\n// Begin command-line ar... | javascript | chosen |
[
{
"from": "system",
"value": "Add datahub specific session key\n\nThis changes brings back in the datahub.sid key for our session, I\npreviously removed this and have noticed that it is needed back as we\nclear the cookie via \"datahub.sid\".\nThis changes the default \"connect.sid\" to \"datahub.sid\"\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix build systems example title "
},
{
"from": "human",
"value": "var express = require(\"express\"),\n app = express()\n\napp.get(\"/\", function (req, res) {\n res.send(\"<!DOCTYPE html>\" +\n \"<html>\" +\n \"<head>\" +\n \"<title>2.x basic usage... | javascript | chosen |
[
{
"from": "system",
"value": "Fix uglify-js TypeError with emcc -O3, no ES6. Closes GH-58\n"
},
{
"from": "human",
"value": "const args = unescape(document.location.hash).substring(1);\nlet argv = args === \"\" ? [] : args.split(' ');\nif (argv.length === 0 && window.DEFAULT_ARGV) argv = window.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix redeclared var & change to let\n"
},
{
"from": "human",
"value": "var selftest = require('../tool-testing/selftest.js');\nvar Sandbox = selftest.Sandbox;\nvar files = require('../fs/files.js');\n\nselftest.define(\"add cordova platforms\", [\"cordova\"], functio... | javascript | chosen |
[
{
"from": "system",
"value": "Add sinon.spy for event handlers\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport {shallow} from 'enzyme'\nimport toJson from 'enzyme-to-json'\nimport SummaryButton from './SummaryButton'\n\ndescribe('<SummaryButton />', () => {\n it('should ren... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for using the csrf token in xhr requests\n"
},
{
"from": "human",
"value": "<script type=text/javascript>\n $SCRIPT_ROOT = {{ request.script_root|tojson|safe }};\n function add(app_id) {\n var url = $SCRIPT_ROOT + \"/admin/featured/\" + app_id;\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Use YTSearch to search Youtube.\nRefactor App into class.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport SearchBar from './components/search_bar';\n\nimport secret from './_secret.js';\n\nconst YOUTUBE_API_... | javascript | chosen |
[
{
"from": "system",
"value": "Change page title with window visibility\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport './index.scss';\n\nReactDOM.render(\n <App />,\n document.getElementById('root')\n);\n"
},... | javascript | chosen |
[
{
"from": "system",
"value": "Support any object and property name given with options\n"
},
{
"from": "human",
"value": "export default ({ types: t }) => {\n const buildPropertyAssignment = (objName, propName, valueNode) =>\n t.assignmentExpression(\n '=',\n t.memberExpression(t.id... | javascript | chosen |
[
{
"from": "system",
"value": "Switch from jquery_ujs to rails-ujs\n\nThis has been done with the expectation that jQuery will soon be removed\nfrom the govuk_publishing_components and that we will need to use the\nvanilla JS equivalent of Rails unobtrusive JavaScript.\n"
},
{
"from": "human",
"v... | javascript | chosen |
[
{
"from": "system",
"value": "Improve HTML re-rendering after marked as attended\n\nThis change will slightly improve the time we have to wait when\nchecking someone in for a workshop. In order to get faster times,\nthe whole technique has to be replaced by something different.\nAt the moment, there are a l... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue for Samsung Android Stock Browser\n\nSome Android Samsung Stock Browsers have window.chrome defined but no \"app\" property underneath."
},
{
"from": "human",
"value": "var formatLocale = require('./utils').formatLocale\n\nfunction getLocale(locale) {\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Object.keys polyfill (supported since IE9)\n"
},
{
"from": "human",
"value": "import \"core-js/fn/array/from\";\nimport \"core-js/fn/object/get-own-property-symbols\";\nimport \"core-js/fn/object/keys\";\nimport \"core-js/fn/set\";\nimport Helmet from \"./Hel... | javascript | chosen |
[
{
"from": "system",
"value": "Fix dev environment web3 loading\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport Web3 from 'web3'\nimport App from './App';\nimport registerServiceWorker from './registerServiceWorker';\nimport { useStrict } f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Ember 2.1 deprecation warning\n\nUpdates the initializer to remove the deprecation warning in Ember 2.1 caused by having two arguments (container, app) in the initialize function. This uses the backwards compatible safe method described in the deprecation pages (http://e... | javascript | chosen |
[
{
"from": "system",
"value": "Fix champ address on repetitions\n"
},
{
"from": "human",
"value": "import autocomplete from 'autocomplete.js';\nimport { getJSON, fire } from '@utils';\n\nconst sources = [\n {\n type: 'address',\n url: '/address/suggestions'\n },\n {\n type: 'path',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spelling error with shutdown"
},
{
"from": "human",
"value": "import React from 'react';\n\nexport let IntercomAPI = window.Intercom || function() { console.warn('Intercome not initialized yet') };\n\nexport default class Intercom extends React.Component {\n st... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with who we were checking if a user exists\n"
},
{
"from": "human",
"value": "const logger = require('logfilename')(__filename);\n\nconst { User, PendingUser } = require('../models');\n\nmodule.exports = (req, res, next) => {\n const username = req.body.use... | javascript | chosen |
[
{
"from": "system",
"value": "Put React lifecycle hooks on the prototype\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\n/**\n * @param {ReactClass} Target The component that defines `onOutsideEvent` handler.\n * @param {String[]} supportedEven... | javascript | chosen |
[
{
"from": "system",
"value": "Disable a minifier option that broke stuff\n"
},
{
"from": "human",
"value": "var minify = require('html-minifier');\nvar fs = require('fs');\n\nvar html = fs.readFileSync('build/frontend.vulcan.html').toString();\n\nvar minifiedHtml = minify.minify(html, {\n cus... | javascript | chosen |
[
{
"from": "system",
"value": "Set highlighted background color on the newly added evidence\n"
},
{
"from": "human",
"value": "window.FactRelationView = Backbone.View.extend({\n tagName: \"li\",\n className: \"fact-relation\",\n\n events: {\n \"click .relation-actions>.weakening\": \"disbel... | javascript | chosen |
[
{
"from": "system",
"value": "Add Users library to main script.\n"
},
{
"from": "human",
"value": "var app = require('express').createServer();\nvar sys = require('sys');\n\nvar client = require(\"./lib/redis-client\").createClient();\nvar books = require(\"./books\");\n\napp.listen(8124);\n\nap... | javascript | chosen |
[
{
"from": "system",
"value": "Set ember-data versions in ember try config to canary to make tests pass for each scenario\n"
},
{
"from": "human",
"value": "module.exports = {\n scenarios: [\n {\n name: 'default',\n dependencies: { }\n },\n {\n name: 'ember-release',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the typeof check in prepareParams()\n\nIt is unnecessary because node-sqlite3 supports passing a single\nparameter directly in the arguments:\n\"There are three ways of passing bind parameters: directly in the\nfunction's arguments, as an array, and as an object for name... | javascript | chosen |
[
{
"from": "system",
"value": "Support multiple concurrent test sessions\n"
},
{
"from": "human",
"value": "const net = require('net')\nconst readline = require('readline')\nconst { app, BrowserWindow } = require('electron')\napp.commandLine.appendSwitch('--disable-http-cache')\n\nrequire('electr... | javascript | chosen |
[
{
"from": "system",
"value": "Create app dir before initializing internals.\n"
},
{
"from": "human",
"value": "require('./src/app/global');\nvar app = require('app');\nvar BrowserWindow = require('browser-window');\nvar winston = require(\"winston\");\nvar Proxtop = require('./src/app/proxtop');... | javascript | chosen |
[
{
"from": "system",
"value": "Fix var reference (caused infinite loop)\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar isCallable = require('es5-ext/lib/Object/is-callable')\n\n , name, now, round, dateNow;\n\nif ((typeof performance !== 'undefined') && performance) {\n\tif (isCallable(... | javascript | chosen |
[
{
"from": "system",
"value": "Add test case about request failure.\n\n- Extract the `env` environment variable to a separated object.\n"
},
{
"from": "human",
"value": "import test from 'blue-tape';\nimport request from 'superagent';\nimport mocker from 'superagent-mocker';\n\nimport cli from '.... | javascript | chosen |
[
{
"from": "system",
"value": "Use new json format function\n"
},
{
"from": "human",
"value": "var EOL = '\\n';\nvar compile = require('./utils/json/compiler');\n\nmodule.exports = function(serializers) {\n var f = compile(serializers || {});\n return function(record) {\n return f(record) + ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix incorrect props to ChipsArray during test\n"
},
{
"from": "human",
"value": "// @format\nimport { shallow, mount } from 'enzyme'\nimport React from 'react'\nimport Chip from 'material-ui/Chip'\n\nimport { ChipsArray } from './ChipsArray'\n\ndescribe('ChipsArray'... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicate declaration of componentWillUnmount\n\nRemove duplicate declaration of componentWillUnmount and move `this._isMounted = true` inside componentDidMount"
},
{
"from": "human",
"value": "/* @flow */\n\nimport React, {Component} from 'react';\n\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Add resource giving button for debugging\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function() {\n\tvar app = angular.module('idleTown');\n\n\tapp.controller('ResourceController', ['resourceService', function(resourceService) {\n\t\tthis.resources = resour... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant import from test\n"
},
{
"from": "human",
"value": "const { describe, it, beforeEach } = require('mocha')\nconst assert = require('assert')\n\nconst ECPair = require('../src/ecpair')\nconst Psbt = require('..').Psbt\n\nconst fixtures = require('./fi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spacing in chat js\n"
},
{
"from": "human",
"value": "var createBetNotification = function(bet){\n var bet = Bets.findOne({ _id: bet });\n\n BetNotifications.insert({\n toNotify: bet.bettors[1],\n betBy: bet.bettors[0]\n });\n}\n\nTemplate.createBetForm... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Added methods to get links\"\n\nThis reverts commit b38f74d23e23a1d1301a803e83ed0e6f442de558.\n"
},
{
"from": "human",
"value": "var request = require(\"request\");\nvar assert = require('assert');\nvar origin = \"http://localhost:3000/\"\nvar http = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Add official support for btoa\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar chai = require('chai');\nvar assert = chai.assert;\n\nvar caniuse = require('../lib/api.js');\n\ndescribe('Supported Features', function () {\n it('window.atob',\n function (do... | javascript | chosen |
[
{
"from": "system",
"value": "Fix up libre.fm doRequest due to $.param() encode\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Module for all communication with libre.fm\n */\ndefine([\n\t'scrobblers/baseScrobbler'\n], function (BaseScrobbler) {\n\n\tvar LibreFM = new BaseScrobbler(... | javascript | chosen |
[
{
"from": "system",
"value": "Move overlay 100% when offscreen rather than -100%\n"
},
{
"from": "human",
"value": "'use strict';\n\nlet styles = {\n\n overlay(isOpen) {\n return {\n position: 'fixed',\n zIndex: 1,\n width: '100%',\n height: '100%',\n background: 'rg... | javascript | chosen |
[
{
"from": "system",
"value": "Add second line of message display.\n"
},
{
"from": "human",
"value": "import _ from 'lodash'\nimport spark from 'spark'\n\nconst debug = require('debug')('sentry:routes:devices:publish')\nconst Membership = require('mongoose').model('Membership')\n\nexport default ... | javascript | chosen |
[
{
"from": "system",
"value": "Mark document to recognize panel\n"
},
{
"from": "human",
"value": "(function(w, d){\n\tvar identificator = 'fucking-eu-cookies';\n\n\tvar config = <%= JSON.stringify({\n\t\t\t\tversion: pkg.version,\n\t\t\t\tl18n: l18n\n\t\t\t}, null, '\\t') %>;\n\n\tfunction shutd... | javascript | chosen |
[
{
"from": "system",
"value": "Add a logging message to indicate start.\n"
},
{
"from": "human",
"value": "/*\n\n ___ usage ___ en_US ___\n mingle static [address:port, address:port...]\n\n options:\n\n -b, --bind <address:port> address and port to bind to\n --help ... | javascript | chosen |
[
{
"from": "system",
"value": "Check dropped file is a GPX file\n"
},
{
"from": "human",
"value": "( function() {\n\n var runMaker = new RunMaker();\n var fileDropArea = document.getElementById( 'drop_zone' );\n\n fileDropArea.addEventListener( 'drop', dropFile, false );\n fileDropAre... | javascript | chosen |
[
{
"from": "system",
"value": "Change eslint indentation style to 2 spaces\n"
},
{
"from": "human",
"value": "module.exports = {\n \"env\": {\n \"es6\": true,\n \"node\": true\n },\n \"extends\": \"airbnb-base\",\n \"parserOptions\": {\n \"sourceType\": \"module\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add the models to the global namespace when loaded to the shell\n"
},
{
"from": "human",
"value": "// Require this file to load all the models into the \n// interactive note console\n\nprocess.env.NODE_ENV = 'development'\nrequire('coffee-script')\no = require('./mo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Vulcanize task to watch all elements\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport cache from 'gulp-cached';\nimport gulp from 'gulp';\nimport remember from 'gulp-remember';\nimport size from 'gulp-size';\nimport vulcanize from 'gulp-vulcanize';\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Allow different DB password for private instance\n\nNow the private instance password can be set with the\nMYSQL_PASSWORD_PRIVATE or MYSQL_PASSWORD_PVT environment variables. If\nneither of those are set, it defaults to the same password as the public\ndatabase (MYSQL_PASSWORD ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test models to generator.\n"
},
{
"from": "human",
"value": "var generators = require('yeoman-generator');\n\nmodule.exports = generators.Base.extend({\n\n constructor: function () {\n generators.Base.apply(this, arguments);\n },\n\n prompting: function ()... | javascript | chosen |
[
{
"from": "system",
"value": "Include number of expected assertions\n\nWithout specifying the number of expected assertions, the callback might\nnever be evaluated, and the test might pass, acting as a false positive.\n"
},
{
"from": "human",
"value": "import run from 'ember-metal/run_loop';\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove freewall plugin destroy() call.\n"
},
{
"from": "human",
"value": "module.exports = Zeppelin.CollectionView.extend({\n tagName: 'ol',\n\n className: 'cards-list list-unstyled clearfix',\n\n subscriptions: {\n 'cardsList:layout': 'triggerLayout'\n },\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Update return value annotations and update example\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Sample elements from an array-like object.\n*\n* @module @stdlib/math/generics/random/sample\n*\n* @example\n* var sample = require( '@stdlib/math/generics/... | javascript | chosen |
[
{
"from": "system",
"value": "Disable field fetch unit test\n"
},
{
"from": "human",
"value": "/*global require: false */\nrequire('babel-polyfill');\n// This needs refactor. Might want to return mutationVector methods in exports,\n// and call widget.*.add elsewhere, so we can test the methods w... | javascript | chosen |
[
{
"from": "system",
"value": "Use config to build paths\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) 2013-2015 Memba Sarl. All rights reserved.\n * Sources at https://github.com/Memba\n */\n\n/* jshint node: true, expr: true */\n/* globals describe: false, before: false, it: false */... | javascript | chosen |
[
{
"from": "system",
"value": "Add currency symbol to price information response\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\nconst models = require('../models/index')\nconst fuzz = require('fuzzball')\n\nasync function... | javascript | chosen |
[
{
"from": "system",
"value": "[test] Update the test on the list metadata parser..\n"
},
{
"from": "human",
"value": "require('../initialize-globals').load();\nvar listMetadataParser = require('../../lib/core/list_metadata_parser');\ndescribe('# list_metadata_parser', function() {\n describe(\"... | javascript | chosen |
[
{
"from": "system",
"value": "[api] Throw an error if no or wrong argument is provided\n\nFixes #1.\n"
},
{
"from": "human",
"value": "module.exports = function parse(auth) {\n var result = {}, parts, decoded, credentials;\n\n parts = auth.split(' ');\n\n result.scheme = parts[0];\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Autoprefixer target name and comment\n"
},
{
"from": "human",
"value": "module.exports = {\n options: {\n // Options we might want to enable in the future.\n diff: false,\n map: false\n },\n multiple_files: {\n // Prefix all CSS files found in `sr... | javascript | chosen |
[
{
"from": "system",
"value": "Check from/to for validating message ownership\n"
},
{
"from": "human",
"value": "var Promise = require('bluebird'),\n mongoose = Promise.promisifyAll(require('mongoose')),\n Message = mongoose.model('Message'),\n UserUtils = require('utils/users'),\n Me... | javascript | chosen |
[
{
"from": "system",
"value": "Add routes for Aksels further development\n"
},
{
"from": "human",
"value": "// Import libraries\nimport 'rxjs'\nimport { Provider } from 'react-redux'\nimport React, { PureComponent } from 'react'\nimport { syncHistoryWithStore } from 'react-router-redux'\nimport {... | javascript | chosen |
[
{
"from": "system",
"value": "Move path logic out of switch statements\n"
},
{
"from": "human",
"value": "import undoable from 'redux-undo-immutable';\nimport { fromJS } from 'immutable';\nimport { findPathByNodeId } from '../utils/vertTreeUtils';\n\nconst defaultState = fromJS([{ value: undefin... | javascript | chosen |
[
{
"from": "system",
"value": "Change host to hostname for IE compatibility"
},
{
"from": "human",
"value": ";(function($) {\n \n $.fn.externalLinkWarning = function() {\n $('a').on('click', function(e) {\n // create temporary anchor\n var tmpLink = document.cre... | javascript | chosen |
[
{
"from": "system",
"value": "Handle audience as an array\n\nAccording to RFC7519, `aud` claim is an array of strings; only in case there's one audience, `aud` can be a string.\nSee https://tools.ietf.org/html/rfc7519#page-9\n\nThis fix allows for audience claim to be both string and array of strings."
},... | javascript | chosen |
[
{
"from": "system",
"value": "Add field `active` for Barman\n"
},
{
"from": "human",
"value": "const { DataTypes, Model } = require('sequelize');\n\n/**\n * This class represents a barman.\n */\nclass Barman extends Model {\n\n /**\n * Initialization function.\n *\n * @param seque... | javascript | chosen |
[
{
"from": "system",
"value": "Make API data type configurable.\n"
},
{
"from": "human",
"value": "(function ($) {\n var settings = {},\n defaults = {\n api: \"http://api.ihackernews.com/post/%s?format=jsonp\",\n };\n\n $.fn.ycomments = function (options) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set the baseURL for development\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'hash',\n EmberE... | javascript | chosen |
[
{
"from": "system",
"value": "Use `initialize` event to start up\n\nInitialize event is fired after other scripts have initialized. Which means they can listen for fb:init event."
},
{
"from": "human",
"value": "(function () {\n var _fb = false;\n var _pc = false;\n var _inst = null;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test spec for old browsers\n"
},
{
"from": "human",
"value": "define(function(require) {\n\n var test = require('../../../test')\n var n = 0\n\n\n // 404\n var a = require('./a')\n test.assert(a === null, '404 a')\n\n // exec error\n setTimeout(function()... | javascript | chosen |
[
{
"from": "system",
"value": "Extend timeout on travis Mocha tests\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = function(config) {\n config.set({\n frameworks: [ \"mocha\" ],\n files: [ \"dist/jsonapi-client-test.js\" ],\n reporters: [ \"spec\" ],\n plugins... | javascript | chosen |
[
{
"from": "system",
"value": "Change the value of revealBtn when clicked\n"
},
{
"from": "human",
"value": "var questions = [\n Q1 = {\n\t\tquestion: \"What does HTML means?\",\n\t\tanswer: \"HyperText Markup Language\"\n },\n Q2 = {\n\t\tquestion: \"What does CSS means?\",\n\t\tanswer: \"Cas... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Tim's dumbass broken test"
},
{
"from": "human",
"value": "console.log('1..4');\nconsole.log([1,2,3].join() == '1,2,3' ? 'ok' : 'not ok');\nconsole.log([1,2,3].join('###') == '1###2###3' ? 'ok' : 'not ok');\nconsole.log([1,2,3].join(1) == '11213' ? 'ok' : 'not o... | javascript | chosen |
[
{
"from": "system",
"value": "Fix timeline tabs to work on mozilla (for instead of forEach to nodelist)\n"
},
{
"from": "human",
"value": "var tabs = document.querySelectorAll('.tab');\nvar allPanels = document.querySelectorAll(\".schedule\");\n\nfunction activateTab(tab) {\n //remove active de... | javascript | chosen |
[
{
"from": "system",
"value": "Handle of the case of debug-config being a bool"
},
{
"from": "human",
"value": "var config = require('./config')\n\nvar logStack = []\n\nmodule.exports = {\n getLogStack: function () {\n return logStack\n },\n\n log: function (message, data) {\n var isDebu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix startApp for older ember versions\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport Application from '../../app';\nimport config from '../../config/environment';\n\nexport default function startApp(attrs) {\n let application;\n\n // use def... | javascript | chosen |
[
{
"from": "system",
"value": "Switch from filter to backdrop-filter to blur background"
},
{
"from": "human",
"value": "// Show message\n// ---------------------------------------------------------------------\nclass Message\n{\n\tshow(msg, timing, animations, new_game_btn, field)\n\t{\n\t\tif (... | javascript | chosen |
[
{
"from": "system",
"value": "Remove logging and add globals for jshint.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assert = require('assert'),\n Selector = require('./');\n\ndescribe('Selector', function () {\n it('should return an object', function () {\n var selector... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for active nav links when URL has hash"
},
{
"from": "human",
"value": "$(function(){$(\"#side-menu\").metisMenu()}),$(function(){$(window).bind(\"load resize\",function(){topOffset=50,width=this.window.innerWidth>0?this.window.innerWidth:this.screen.width,768>w... | javascript | chosen |
[
{
"from": "system",
"value": "Fix copy paste typo in queryWithCurrentUser hook."
},
{
"from": "human",
"value": "const defaults = {\n idField: '_id',\n as: 'userId'\n};\n\nexport default function(options = {}) {\n return function(hook) {\n if (hook.type !== 'before') {\n throw new Err... | javascript | chosen |
[
{
"from": "system",
"value": "Fix too long line issue\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Node = require('../node');\nvar dot = require('dot');\n\nvar TYPE = 'weighted-centroid';\n\nvar PARAMS = {\n source : Node.PARAM.NODE(Node.GEOMETRY.POINT),\n weight_column : Node.P... | javascript | chosen |
[
{
"from": "system",
"value": "Use automatic form data serialization\n\nStarting from 0.27.0, axios supports automatic serialization to the form data format for requests with a `multipart/form-data` content type.\n"
},
{
"from": "human",
"value": "import { endpoint } from 'app/api';\nimport async... | javascript | chosen |
[
{
"from": "system",
"value": "Fix directory \"Copy name\" function\n"
},
{
"from": "human",
"value": "'use babel';\n\nconst init = () => {\n const copyEnabled = () => atom.config.get('remote-ftp.context.enableCopyFilename');\n const contextMenu = {\n '.remote-ftp-view .entries.list-tree:not... | javascript | chosen |
[
{
"from": "system",
"value": "Allow multiple elements, and their children, to be watched to determine if the clickAwayAction should be called.\n"
},
{
"from": "human",
"value": "(function (angular) {\n \"use strict\";\n\n\tvar module = angular.module('net.enzey.services', []);\n\n\tmodule.ser... | javascript | chosen |
[
{
"from": "system",
"value": "Check match exists before extracting latestYear\n"
},
{
"from": "human",
"value": "module.exports = function (licenseContent, done) {\n var thisYear = (new Date()).getFullYear();\n var latestYear, originalYearInfo, updatedYearInfo, match, updatedLicenseContent;\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Handle error case for username shortening\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc function\n * @name dockstore.ui.controller:NavbarCtrl\n * @description\n * # NavbarCtrl\n * Controller of the dockstore.ui\n */\nangular.module('dockstore.ui... | javascript | chosen |
[
{
"from": "system",
"value": "Use indices for faster column lookup.\n"
},
{
"from": "human",
"value": "import {Table} from 'apache-arrow';\n\nconst RowIndex = Symbol('rowIndex');\n\nexport default function arrow(data) {\n const table = Table.from(Array.isArray(data) ? data : [data]),\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Update loadConfig to allow duplicates\n"
},
{
"from": "human",
"value": "/* jshint node:true */\n'use strict';\nmodule.exports = function (grunt) {\n\n var config = {\n pkg: grunt.file.readJSON('package.json'),\n srcDir: 'src',\n destDir: 'dist',\n temp... | javascript | chosen |
[
{
"from": "system",
"value": "Add routes for various get responses.\n"
},
{
"from": "human",
"value": "const util = require('util');\nconst express = require('express');\nconst app = express();\nconst router = express.Router();\n\nconst Config = require('./Config');\n\n\nclass WebInterfa... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.