conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Handle one or more folders being inaccessible while listing\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst stat = require('./stat')\nconst readdir = require('./readdir')\n\n// based on http://stackoverflow.com/a/38314404/2533525\nconst getFol... | javascript | chosen |
[
{
"from": "system",
"value": "Set minified true in the babel preset"
},
{
"from": "human",
"value": "module.exports = {\n plugins: [\n require('babel-plugin-minify-constant-folding'),\n require('babel-plugin-minify-dead-code-elimination'),\n require('babel-plugin-minify-mangle-names'),... | javascript | chosen |
[
{
"from": "system",
"value": "Update Crosswalk plugin to latest version\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"Makes your Cordova application use the Crosswalk WebView \\\ninstead of the System WebView on Android\",\n version: '1.7.0',\n documentation: null\n});\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Disable encoding loader string due to error in Babel 6\n"
},
{
"from": "human",
"value": "var qs = require('qs');\n\nfunction combineLoaders(loaders) {\n return loaders.map(function(loaderEntry) {\n var query = qs.stringify(loaderEntry.query, { arrayFormat: 'bra... | javascript | chosen |
[
{
"from": "system",
"value": "LinkedIn: Hide 'Send [NAME] InMail' button\n\nCloses https://github.com/fureigh/unbias-me/issues/17.\n"
},
{
"from": "human",
"value": "// LinkedIn:\n$('title').remove();\n$('#name-container').hide();\n$('.profile-picture').hide();\n\n// Logged out:\n$('h1#name').hi... | javascript | chosen |
[
{
"from": "system",
"value": "Update up to changes in es5-ext\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar isObject = require('es5-ext/object/is-object')\n , forEach = require('es5-ext/object/for-each')\n , toPlain = require('es5-ext/object/to-plain-object')\n\n , isArray = Array... | javascript | chosen |
[
{
"from": "system",
"value": "Add redis and key names\n"
},
{
"from": "human",
"value": "var RateLimiter = function(sourceName, globalDailyLimit, globalHourlyLimit, userDailyLimit, userHourlyLimit) {\n\n\t// Initialize instance variables\n\tthis.sourceName = sourceName || \"undefinedSource\";\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix command line options for join group.\n"
},
{
"from": "human",
"value": "/* Copyright 2017 Streampunk Media Ltd.\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary stuff from webpack test confs\n"
},
{
"from": "human",
"value": "/* eslint-disable no-var */\n\nvar path = require('path');\nvar merge = require('webpack-merge');\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\n\nvar common = require('./... | javascript | chosen |
[
{
"from": "system",
"value": "Disable lints for built vendor files.\n"
},
{
"from": "human",
"value": "/* eslint-env node */\nvar path = require(\"path\");\nvar ConcatSource = require(\"webpack-sources\").ConcatSource;\nvar LicenseWebpackPlugin = require(\"license-webpack-plugin\");\n\nmodule.ex... | javascript | chosen |
[
{
"from": "system",
"value": "Send a \\xFE\\xFD challenge request\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst net = require('net');\nconst process = require('process');\n\nif (process.argv.length < 4) {\n console.log('Usage: node mcping16.js <host> <port>');\n process.exit(1);\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Add a banner to prepend to builds.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n lint: {\n files: ['grunt.js', 'lib/**/*.js', 'spec/**/*.js']\n },\n min: {\n dist: {\n src: 'lib/rivets.js',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make Util usable in the browser\n"
},
{
"from": "human",
"value": "util = exports;\n\nutil.mergeDeep = function (A, B, depth) {\n\tvar forever = depth == null;\n\tfor (var p in B) {\n\t\tif (B[p] != null && B[p].constructor==Object && (forever || depth > 0)) {\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix undefined images when there is file index out of range of available files\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { assetClick } from '../../actions/assets';\nimport map from 'l... | javascript | chosen |
[
{
"from": "system",
"value": "Add test task to Gulp default task.\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst gutil = require('gulp-util');\nconst uglify = require('gulp-uglify');\nconst concat = require('gulp-concat');\nconst server = require('karma').Server;\n\n\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to sendFile; squash deprecation notices\n"
},
{
"from": "human",
"value": "var app = require('express')();\nvar http = require('http').Server(app);\nvar io = require('socket.io')(http);\n\napp.get('/', function(req, res){\n res.sendfile('./public/index.html'... | javascript | chosen |
[
{
"from": "system",
"value": "Add calls to domains functionality\n"
},
{
"from": "human",
"value": "var digio_api = require('../digio-api')\n, config = require('./config')\n\n\nvar api = new digio_api(config.token)\n\napi.droplets.list_droplets(function (err, data) {\n console.log(data);\n});\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for Markdown toolbar and menubar entries.\n"
},
{
"from": "human",
"value": "//\n// Test that a Markdown cell is rendered to HTML.\n//\ncasper.notebookTest(function () {\n var output = this.evaluate(function() {\n // Does it make more sense to te... | javascript | chosen |
[
{
"from": "system",
"value": "Update requires to be compatible with ES6\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Platform = require('Platform');\nvar I18n = require('./vendor/i18n');\nvar { RNI18n } = require('react-native').NativeModules;\n\nif (Platform.OS === 'android') {\n RN... | javascript | chosen |
[
{
"from": "system",
"value": "Update to work with current-content key\n\nThis key is populated by ember deploy by default now and is a simpler\nway to get the current revision's content.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst redis = require('redis'),\n co = require('co'),\... | javascript | chosen |
[
{
"from": "system",
"value": "Add model skeletons and setup ko component\n\nAlso exporting component property model for user\nextension purposes\n"
},
{
"from": "human",
"value": "\n;(function ( factory ) {\n \"use strict\";\n\n if (\"function\" === typeof define && define.amd) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update error messages to be more descriptive and correct\n"
},
{
"from": "human",
"value": "var isString = require('./lib/isstring')\n\nmodule.exports = function frameguard (options) {\n options = options || {}\n\n var domain = options.domain\n var action = optio... | javascript | chosen |
[
{
"from": "system",
"value": "Use `-w` flag to display password directly\n\nFixes #2.\n"
},
{
"from": "human",
"value": "'use strict';\nvar execFile = require('child_process').execFile;\nvar wifiName = require('wifi-name');\n\nfunction getPassword(ssid, cb) {\n\tvar cmd = 'security';\n\tvar args... | javascript | chosen |
[
{
"from": "system",
"value": "Use the function form of \"use strict\".\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gutil = require('gulp-util');\nvar through = require('through2');\nvar juice = require('juice');\n\nmodule.exports = function(opt){\n return through.obj(function (fil... | javascript | chosen |
[
{
"from": "system",
"value": "Make regex test strings smaller\n\nby only evaluating the last path section on each pass\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\nvar isglob = require('is-glob');\n\nmodule.exports = function globParent(str) {\n\twhile (isglob... | javascript | chosen |
[
{
"from": "system",
"value": "Add config for exclude, client ID, version\n\n- 'exclude' option to prevent addon from inserting the google maps API script tag\r\n- 'version' option to specify a version of the google maps API\r\n- 'client' option to use a Client ID instead of a key (for Google Maps API Premiu... | javascript | chosen |
[
{
"from": "system",
"value": "Add help at / and /:package endpoint\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\n\nvar npm = new require('npm-api')();\nvar repo = npm.repo('gulp')\n\napp.get('/', function (req, res) {\n repo.package()\n .then(f... | javascript | chosen |
[
{
"from": "system",
"value": "Add better explanation to some paths\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = [\n 'testproxy.php', // Proxy finder\n 'tmUnblock.cgi',\n 'getheaders9.php',\n 'getheaders2.php',\n 'cgi-bin/common/attr',\n 'scripts/setup.ph... | javascript | chosen |
[
{
"from": "system",
"value": "Remove support for ember-cli < 2.0.0\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst VersionChecker = require('ember-cli-version-checker');\n\nmodule.exports = {\n name: require('./package.json').name,\n\n emberResolverFeatureFlags() {\n const resolve... | javascript | chosen |
[
{
"from": "system",
"value": "Add option to remove keys.\n"
},
{
"from": "human",
"value": "var yaml = require('js-yaml');\n\nmodule.exports = function (source) {\n var loader = this;\n\n loader.cacheable && loader.cacheable();\n var value = yaml.safeLoad(source, {\n filename: loader.resou... | javascript | chosen |
[
{
"from": "system",
"value": "[FEATURE] Put commonly used constants on main export\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar TypeDecorator = require( \"./lib/type/decorator\" );\nvar TypeHelper = require( \"./lib/type/helper\" );\nvar TypeInfo = require( \"./lib/type/info... | javascript | chosen |
[
{
"from": "system",
"value": "Update Blizzard instance function signature\n"
},
{
"from": "human",
"value": "/**\n * @file Blizzard.js\n * @description A Node.js wrapper for the Blizzard Battle.net Community Platform API\n * @copyright Copyright(c) 2016 Ben Weier <ben.weier@gmail.com>\n * @licen... | javascript | chosen |
[
{
"from": "system",
"value": "Edit error message to include ✨ emoji. V important\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst characters = require('./characters');\nconst express = require('express');\nconst bodyParser = require('body-parser');\n\nconst app = express();\napp.use(bod... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite plugin to be buffer-only and with error handling\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\nvar through = require('through2');\nvar Parker = require('parker');\n\nmodule.exports = function(options) {\n options = _.defaults(options || {},... | javascript | chosen |
[
{
"from": "system",
"value": "Add override for comma-dangle in functions\n"
},
{
"from": "human",
"value": "/**\n* Copyright 2016 Arundo Inc. All rights reserved.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the Li... | javascript | chosen |
[
{
"from": "system",
"value": "Replace complex nconf usage to simple open and parse json configuration file via fsExtra module\n"
},
{
"from": "human",
"value": "var path = require('path'),\n config = require('nconf'),\n SnapshotCleaner = require('./lib/cleaner');\n\nconfig.env();\nconfig.a... | javascript | chosen |
[
{
"from": "system",
"value": "Remove deprecated excludeKeys prop for exportCsv\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport { deprecated } from 'prop-types-extra';\nimport exportToCsv fr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with Sass encoding\n\nSass::SyntaxError on line LINE of FILE: Invalid US-ASCII character CHAR\n"
},
{
"from": "human",
"value": "/**\n * Compass task config\n */\n\nexports.task = function () {\n return {\n dist: {\n options: {\n importPat... | javascript | chosen |
[
{
"from": "system",
"value": "Choose the correct build directory\n\n- We get it from the process.config.default_configuration\n"
},
{
"from": "human",
"value": "var util = require('util');\nvar Socket = require('net').Socket;\n\nvar bindings = require(__dirname + '/../build/Debug/unix_stream.nod... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to ensure all the views have assigned an eventManager\nThis test ensure that current eventManager bubbling logic performs correctly\n"
},
{
"from": "human",
"value": "var set = Em.set;\nvar get = Em.get;\n\nmodule(\"Em.View extensions\", {\n setup: functio... | javascript | chosen |
[
{
"from": "system",
"value": "Remove client cert stuff that never mattered\n"
},
{
"from": "human",
"value": "if (Meteor.isServer) {\n\n Meteor.startup(function () {\n // Validate that the config file contains the data we need.\n validateSettings();\n\n // Create our DNS zone for Power... | javascript | chosen |
[
{
"from": "system",
"value": "Fix content type detection for GraphQL *many actions\n"
},
{
"from": "human",
"value": "'use strict';\n\n\nconst { makeImmutable } = require('../utilities');\n\n\nconst CONTENT_TYPES = [\n {\n name: 'model',\n test({ content }) {\n return content && cont... | javascript | chosen |
[
{
"from": "system",
"value": "Add simple support for ajax\n"
},
{
"from": "human",
"value": "(function (load, morgen, __morgen) {\n 'use strict';\n\n morgen.uid = function () {\n return __morgen.uid++;\n };\n\n morgen.run = function (options) {\n load('__morgen_broadcas... | javascript | chosen |
[
{
"from": "system",
"value": "Expire mobile guide cookie after 24 hours\n\nSee https://github.com/vector-im/riot-web/issues/9360\n\nThis is to prevent it from always working. Cookies without an expiration are supposed to expire at the end of the session, however the nature of mobile browsers means that the ... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify done call as per PR review\n"
},
{
"from": "human",
"value": "import ExecutorAbstract from '../ExecutorAbstract';\nimport {sleep} from '../util/function';\n\nclass SleepExecutor extends ExecutorAbstract {\n //-----------------------------------\n // Const... | javascript | chosen |
[
{
"from": "system",
"value": "Use crossorigin.me and npm to get latest version\n"
},
{
"from": "human",
"value": "import http from 'http';\n\nlet pkgUrl = {\n host: 'rawgit.com',\n path: '/videojs/video.js/master/package.json'\n};\n\nfunction getPackage(cb) {\n http.get({host: pkgUrl.host, pa... | javascript | chosen |
[
{
"from": "system",
"value": "Put the original Monitor on statics\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { ActionCreators } from './devTools';\n\nexport default function connectMonitor(Monitor) {\n const Conne... | javascript | chosen |
[
{
"from": "system",
"value": "Add button to remove completed todos\n\n"
},
{
"from": "human",
"value": "import React, { PropTypes, Component } from 'react'\nimport { connect } from 'react-redux'\n\nimport { fetchTodos, completeTodo } from '../../actions/todos'\n\nimport TodoList from '../../comp... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up unused underscore mixin function.\n"
},
{
"from": "human",
"value": "/**\n*\tUnderscore Mixins\n*\t@author Patricio Ferreira <3dimentionar@gmail.com>\n**/\ndefine(['underscore', 'jquery'], function() {\n\n\t_.mixin({\n\n\t\t/**\n\t\t*\tReturns true if a giv... | javascript | chosen |
[
{
"from": "system",
"value": "Allow passing cookies instance in client\n\nThis allows the client to add onSet/onRemove cookies\n"
},
{
"from": "human",
"value": "import { Component } from 'react';\nimport { instanceOf, node } from 'prop-types';\nimport Cookies from 'universal-cookie';\nimport { ... | javascript | chosen |
[
{
"from": "system",
"value": "Update coverage of unit testing\n"
},
{
"from": "human",
"value": "import Vue from 'vue';\n\nVue.config.productionTip = false;\n\n// require all test files (files that ends with .spec.js)\nconst testsContext = require.context('./specs', true, /\\.spec$/);\ntestsCont... | javascript | chosen |
[
{
"from": "system",
"value": "Delete name nad email also\n"
},
{
"from": "human",
"value": "const initialState = {\n readMore: false,\n jwToken: null,\n myEmail: null,\n myName: null,\n myFetch: null\n}\n\nexport default function update (state = initialState, action) {\n switch (action.typ... | javascript | chosen |
[
{
"from": "system",
"value": "chore(analytics): Fix client ID not being sent to GA\n"
},
{
"from": "human",
"value": "import nanoid from 'nanoid';\n\nconst GA_KEY = 'GA:clientID';\nlet clientId = localStorage.getItem(GA_KEY);\n\nexport default class Ga {\n constructor (db) {\n this.db = db;\... | javascript | chosen |
[
{
"from": "system",
"value": ":ambulance: Fix bug with async YT script load & any subdomains\n"
},
{
"from": "human",
"value": "//\nchrome.webNavigation.onBeforeNavigate.addListener((details) => {\n if(details.url.indexOf(\"youtube.com\") !== -1 && details.url.indexOf(\"disable_polymer=true\") ... | javascript | chosen |
[
{
"from": "system",
"value": "Update Game view on each animation frame\n"
},
{
"from": "human",
"value": "(function(stopwatch){\n if (!stopwatch) { throw new Error('stopwatch namespace not found'); }\n console.log('Ready to play!');\n\n var game = new stopwatch.Game(5);\n new stopwat... | javascript | chosen |
[
{
"from": "system",
"value": "Set title instead of desc.\n"
},
{
"from": "human",
"value": "const { Command } = require('discord-akairo');\nconst { RichEmbed } = require('discord.js');\n\nfunction exec(message, args){\n args.content = isNaN(args.content) ? args.content : parseInt(args.content... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Node.js Admin SDK snippet\n\nChange-Id: Ib79a490e48e418c08ff70d3b2a31b32ec9c3b654\n"
},
{
"from": "human",
"value": "// [START get_service_account_tokens]\nvar admin = require(\"firebase-admin\");\n\nvar serviceAccount = require(\"path/to/serviceAccountKey.json\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove image on backspace key event\n"
},
{
"from": "human",
"value": "define([\n 'summernote/base/core/func',\n 'summernote/base/core/list',\n 'summernote/base/core/dom'\n], function (func, list, dom) {\n var ImagePopover = function (context) {\n var ui = $.... | javascript | chosen |
[
{
"from": "system",
"value": "Add data attribute and set value when nil to input replacing of progress\n"
},
{
"from": "human",
"value": "window.GobiertoAdmin.GobiertoCommonCustomFieldRecordsProgressPluginController = (function() {\n\n function GobiertoCommonCustomFieldRecordsProgressPluginCont... | javascript | chosen |
[
{
"from": "system",
"value": "Rebuild for file changes, along with removing and renaming files\n"
},
{
"from": "human",
"value": "const http = require('http');\nconst chokidar = require('chokidar');\n\nconst constructHierarchy = require('./roblox-tree.js');\n\nmodule.exports = function startServ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle error in state properly\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport { bus, cache } from '../../core-client';\n\ncache.onChange(changes => bus.emit('postchange', changes));\n\nbus.on('change', changes => cache.put(changes));\nbus.on('error', chang... | javascript | chosen |
[
{
"from": "system",
"value": "Correct timestamp & pretty print JSON\n\nTimestamp format in demo.js was not in ISO-8601 format. Replaced dash\n(-) with 'T' between date and time parts and added a 'Z' at the end to\nindicate UTC.\n\nAlso, added some decoration to the output and changed JSON to formatted\nfor ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix calendar modal default value\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport { TransitionView, Calendar } from 'react-date-picker';\n\nimport Modal from '../Modal';\n\n\nconst propTypes = {\n open: PropTypes.bool.isRequired,... | javascript | chosen |
[
{
"from": "system",
"value": "Improve proxy web page example\n"
},
{
"from": "human",
"value": "// Web page retrieval using server-side proxy support to get around CORS restrictions\n\nrequirejs([\"sanitizeHTML\", \"vendor/purify\"], function(sanitizeHTML, DOMPurify) {\n\n let content\n \n... | javascript | chosen |
[
{
"from": "system",
"value": "Update Project Quick View directive"
},
{
"from": "human",
"value": "angular\n .module('app')\n .directive('projectQuickView', function() {\n return {\n restrict: 'E',\n replace: false,\n templateUrl: 'app/templates/partials/projectQuickView.html... | javascript | chosen |
[
{
"from": "system",
"value": "[Fix] Fix some fields being overwritten by undefined\n\nWhen a required field is absent, it's substitute, even when existing, was being overwritten with\nundefined or [undefined]\n"
},
{
"from": "human",
"value": "const sanitizer = require('../../../sanitizer');\n/*... | javascript | chosen |
[
{
"from": "system",
"value": "Change navbar to use scope: '&' to prevent a unnecessary watch\n"
},
{
"from": "human",
"value": "class NavbarDirective {\n constructor () {\n 'ngInject';\n\n let directive = {\n restrict: 'E',\n templateUrl: 'app/layout/navbar/navbar.html',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update to latest sync api\n"
},
{
"from": "human",
"value": "var fab = require('fabulous');\nvar rest = require('fabulous/rest');\nvar Document = require('fabulous/Document');\n\nvar TodosController = require('./TodosController');\n\nexports.main = fab.run(document.... | javascript | chosen |
[
{
"from": "system",
"value": "Use placeholder for empty captions.\n"
},
{
"from": "human",
"value": "import { Component } from 'substance'\n\nexport default class CaptionComponent extends Component {\n\n render($$) {\n const node = this.props.node\n\n let el = $$('div')\n .addClass('... | javascript | chosen |
[
{
"from": "system",
"value": "Switch from render to hydrate on the client side\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {\n ApolloClient,\n ApolloProvider,\n createNetworkInterface,\n} from 'react-apollo';\nimport ReactDOM from 'react-dom';\nimport { Browser... | javascript | chosen |
[
{
"from": "system",
"value": "Fix warning about deprecated controllers support\n\nThis happens at startup, fixed by changing binding to\nuse app property directly.\n\nEnyo-DCO-1.1-Signed-Off-By: Ben Combee (ben.combee@lge.com)\n"
},
{
"from": "human",
"value": "enyo.kind({\n\tname: \"MyApp.MainV... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce verbosity of Bower install log to warnings only\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport gulp from 'gulp';\nimport shell from 'gulp-shell';\n\n// import config from './_config.babel.js';\n\ngulp.task('bower-install', shell.task([\n 'bower i... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Ctrl-/ shortcut on AZERTY keyboards\n"
},
{
"from": "human",
"value": "import { ACTIVE_IN_INPUT } from '../../application/keyboardShortcuts.js';\nimport { Class } from '../../core/Core.js';\nimport { ButtonView } from './ButtonView.js';\n\nconst ClearSearchButto... | javascript | chosen |
[
{
"from": "system",
"value": "Fix select values for stars\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n var React = require('react');\n var $ = require('jquery');\n\n var RatingForm = React.createClass({\n handleSubmit: function (event) {\n event.preventDefaul... | javascript | chosen |
[
{
"from": "system",
"value": "Remove last usage of jQuery\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n // fix for printing bug in Windows Safari\n var windowsSafari = (window.navigator.userAgent.match(/(\\(Windows[\\s\\w\\.]+\\))[\\/\\(\\s\\w\\.\\,\\)]+(Version\\/[\\d\\.... | javascript | chosen |
[
{
"from": "system",
"value": "Update regex used to check for codegenNativeComponent\n\nSummary: Updates regex to allow for type casts\n\nReviewed By: TheSavior\n\nDifferential Revision: D16717249\n\nfbshipit-source-id: f22561d5cd33ab129fc0af4490692344726d7d71\n"
},
{
"from": "human",
"value": "/... | javascript | chosen |
[
{
"from": "system",
"value": ":hankey: Replace inactive postcode with active one\n"
},
{
"from": "human",
"value": "const chai = require('chai');\nconst lookup = require('../../app/lib/postcodes').lookup;\n\nconst expect = chai.expect;\n\ndescribe('Postcode to lat long', () => {\n it('Should re... | javascript | chosen |
[
{
"from": "system",
"value": "Move /collection to path prepended to emoticonRoutes\n"
},
{
"from": "human",
"value": "const express = require('express'),\n app = express(),\n bodyParser = require('body-parser'),\n methodOverride = require('method-override'),\n mongoose = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for metaData mapper\n"
},
{
"from": "human",
"value": "'use strict'\nconst {expect} = require('chai')\n\ndescribe('meta data mapper', () => {\n const {metaData} = require('../lib/mapper')\n\n it('should treat ../../ as design name', () => {\n const fil... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for request ids\n"
},
{
"from": "human",
"value": "'use strict';\n\nrequire('./testUtils');\n\nvar Error = require('../lib/Error');\nvar expect = require('chai').expect;\n\ndescribe('Error', function() {\n\n it('Populates with type and message params', fu... | javascript | chosen |
[
{
"from": "system",
"value": "Add source map support to CSS\n"
},
{
"from": "human",
"value": "const path = require(\"path\");\nconst merge = require(\"webpack-merge\");\nconst webpack = require(\"webpack\");\nconst common = require(\"./webpack.common.js\");\n\nconst postCSSPlugins = [\n requir... | javascript | chosen |
[
{
"from": "system",
"value": "Sort strings and join each resulting array to a string\n"
},
{
"from": "human",
"value": "// Program that returns true if two strings are anagrams of one another\n\nfunction isAnagram(firstStr, secondStr) {\n\t// lower case both strings to account for case insensiti... | javascript | chosen |
[
{
"from": "system",
"value": "Fix an issue where the latest Node-RED no longer requires RED.init() and RED.nodes.init() prior to running tests\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport { assert } from 'chai';\nimport RED from 'node-red';\nimport asakusaGikenModule from '../../..... | javascript | chosen |
[
{
"from": "system",
"value": "Use React app in the injected page\n"
},
{
"from": "human",
"value": "import configureStore from '../../../app/store/configureStore';\n\nconst store = configureStore({counter: {count: 0}}, false, () => injectContent(store.getState()));\n\nconst injectContent = (stat... | javascript | chosen |
[
{
"from": "system",
"value": "Fix race condition in app startup\n"
},
{
"from": "human",
"value": "//Load in the require.js config file\nrequire([\n\t'require-config'\n\t, 'app'\n], function(conf, App) {\n\tnew App()\n})\n"
},
{
"from": "gpt",
"value": "//Load in the require.js confi... | javascript | chosen |
[
{
"from": "system",
"value": "Remove x tags during fn-group conversion.\n"
},
{
"from": "human",
"value": "export default class FnGroupConverter {\n import(dom) {\n let fnGroups = dom.findAll('fn-group')\n if(fnGroups.length === 0) {\n let back = dom.find('back')\n back.append(\... | javascript | chosen |
[
{
"from": "system",
"value": "Move broadcast test to use oauth\n"
},
{
"from": "human",
"value": "const { expect } = require('chai')\nconst nockHelper = require('./helpers/nock_helper')\nconst Hubspot = require('..')\n\ndescribe('broadcasts', function() {\n describe('get', function() {\n bef... | javascript | chosen |
[
{
"from": "human",
"value": "Add observable properties for all char attributes.\n"
},
{
"from": "gpt",
"value": "function AppViewModel() {\n this.statStrength = ko.observable();\n this.statEndurance = ko.observable();\n this.statAgility = ko.observable();\n this.statSpeed = ko.observ... | javascript | chosen |
[
{
"from": "system",
"value": "Set a valid default path\n"
},
{
"from": "human",
"value": "/* global window, document */\n\n// TODO: Add default/missing icon path\nvar _DEFAULT_ICON_PATH = 'Need a real path...';\nvar _paths = {};\n\nvar IconStore = {\n\tgetPath: function(iconName) {\n\t\tif (_pat... | javascript | chosen |
[
{
"from": "system",
"value": "Handle the params sent by result page\n"
},
{
"from": "human",
"value": "class PlaceController {\n constructor() {\n 'ngInject';\n }\n}\n\nexport default PlaceController;\n"
},
{
"from": "gpt",
"value": "class PlaceController {\n constructor($log, ... | javascript | chosen |
[
{
"from": "system",
"value": "Make sequence editor text area\n"
},
{
"from": "human",
"value": "$(function() {\n var dt = {sPaginationType: 'full_numbers',\n bProcessing: true,\n bServerSide: true,\n sAjaxSource: '/sample/ajax/pid/'+pid+'/',\n bAutoWi... | javascript | chosen |
[
{
"from": "system",
"value": "Add wait before switching iframe. This will stablize the e2e tests.\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2019 The Subscribe with Google Authors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you ma... | javascript | chosen |
[
{
"from": "system",
"value": "Change from addWysiwyg to addCheckboxType\n\n"
},
{
"from": "human",
"value": "export default ngModule => {\n ngModule.config(addWysiwyg);\n\n function addWysiwyg(formlyConfigProvider) {\n formlyConfigProvider.setType({\n name: 'wysiwyg',\n template: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add delete method on router api"
},
{
"from": "human",
"value": "'use strict';\n\nvar express = require('express');\nvar bodyParser = require('body-parser');\n\nmodule.exports = entityRouter;\n\nfunction entityRouter(entities, accessToken) {\n var router = express.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary braces from spinner\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst Spinner = () => {\n return (\n <div className=\"loader\">Loading...</div>\n );\n};\n\nexport default Spinner;\n"
},
{
"from": "gpt",
"value... | javascript | chosen |
[
{
"from": "system",
"value": "Update CommonJS importing to ES6\n"
},
{
"from": "human",
"value": "window.axios = require('axios')\n\nwindow.Vue = require('vue')\n\nVue.component('chrome-picker', require('vue-color').Chrome)\n\nVue.component('button-dropdown', require('./components/ButtonDropdown... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Increase percent of instances having clustering\n"
},
{
"from": "human",
"value": "export const DEFAULT_PERIOD = 'all'\nexport const DEFAULT_MODE = 'default'\nexport const SETTING_TYPE = 'clustering'\nexport const DEFAULT_MAX_BOUND = 48\nexport const DEFAULT_E... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console.log from responce time\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar config = require('../config').default;\nvar metrics = null;\n\nif (config.metrics) {\n var StatsD = require('node-statsd');\n metrics = new StatsD({\n host: config.met... | javascript | chosen |
[
{
"from": "system",
"value": "Use released as search detail\n"
},
{
"from": "human",
"value": "'use strict';\n\n// @ngInject\nvar DatasetSearchController = function ($scope, $location, $controller, Dataset, npdcAppConfig) {\n\n $controller('NpolarBaseController', { $scope: $scope });\n $scope.... | javascript | chosen |
[
{
"from": "system",
"value": "Correct casper syntax for test suite\n"
},
{
"from": "human",
"value": "// Configured in Gruntfile.js\nvar url = 'http://localhost:4242/index.html';\nvar sinon = require('../../../node_modules/sinon/lib/sinon');\n\ncasper.test.begin('The app should load flawlessly',... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.