conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove unnecessary filter from within .\n"
},
{
"from": "human",
"value": "/**\n * PageHeaderDateRange component.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this... | javascript | chosen |
[
{
"from": "system",
"value": "Allow watching changes in modules map for ymb dev mode\n"
},
{
"from": "human",
"value": "var fs = require('fs'),\n path = require('path'),\n _ = require('lodash'),\n gulp = require('gulp'),\n through = require('through2'),\n file = require('gulp-file... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong path to settings in production\n\n"
},
{
"from": "human",
"value": "import Helper from \"./Helper\";\n\nconst h = new Helper;\n\nexport let userItems;\n\nif (h.detectEnvironment() === \"development\") {\n userItems = \"./src/data/list.json\";\n} else if... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure GA events are not transmitted outside of production\n"
},
{
"from": "human",
"value": "import GoogleAnalytics from 'react-ga';\n\nGoogleAnalytics.initialize('UA-30688952-5', {\n debug: (process.env.NODE_ENV !== 'production'),\n titleCase: true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add saving & reading history functions\n"
},
{
"from": "human",
"value": "export default class Storage {\n \n}"
},
{
"from": "gpt",
"value": "import fs from 'fs'\n\nexport default class Storage {\n static async addHistoryItem (title, url) {\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Change keyboard shortcut defaults to shift+\n"
},
{
"from": "human",
"value": "export const TOOLTIP_DEFAULT_OPTION = true\nexport const POSITION_DEFAULT_OPTION = 'mouse'\nexport const HIGHLIGHTS_DEFAULT_OPTION = true\nexport const HIGHLIGHTS_STORAGE_NAME = 'memex_li... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Cannot set property 'mailer' of undefined error\n"
},
{
"from": "human",
"value": "const nodemailer = require('nodemailer')\nconst config = require('../config')\n\nlet opts = config.get('mailer.service')\n ? config.get('mailer')\n : config.get('nodemailer')\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Update request status to 'accepted'\n"
},
{
"from": "human",
"value": "Projects = new Mongo.Collection('projects');\n\nMeteor.methods({\n insertProject: function(projectAttributes) {\n check(Meteor.userId(), String);\n check(projectAttributes, {\n name: ... | javascript | chosen |
[
{
"from": "system",
"value": "Switch execFile out for spawn and flatten args in tests\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2017 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with th... | javascript | chosen |
[
{
"from": "system",
"value": "Convert debug info to string\n"
},
{
"from": "human",
"value": "var express = require('express'), app = express(), swig = require('swig');\nvar bodyParser = require('body-parser');\nvar https = require('https'), config = require('./config');\n\napp.engine('html', sw... | javascript | chosen |
[
{
"from": "system",
"value": "Add the event to the log\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar bunyan = require('bunyan');\nvar log = bunyan.createLogger({ name: 'app' });\n\nvar app = express();\n\nvar pkg = require('./index.js');\npkg.boot(app, 'somesecret');\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix server port for Heroku deployment\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst app = express();\nconst port = 3000;\n\nrequire('./middleware.js')(app, express);\n\napp.listen(port, function() {\n console.log('Now listening on po... | javascript | chosen |
[
{
"from": "system",
"value": "ADD https flags and flags improvement\n"
},
{
"from": "human",
"value": "var WebSocketServer = require('websocket').server;\nvar http = require('http');\nvar argv = require('yargs')\n\t.alias('e', 'exec')\n .default('port', 8080)\n .alias('p', 'password')\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure the subscribe form is available before running the script\n"
},
{
"from": "human",
"value": "/*\n * Mailchimp AJAX form submit VanillaJS\n * Vanilla JS\n * Author: Michiel Vandewalle\n * Github author: https://github.com/michiel-vandewalle\n * Github proje... | javascript | chosen |
[
{
"from": "system",
"value": "Use default pager for Markdown\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n'use strict';\n\nvar npmMan = require('./');\n\nvar help = require('help-version')(usage()).help,\n minimist = require('minimist'),\n manPager = require('man-pager'),\n d... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bad test for back-link helper\n"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('back-link', 'Integration | Component | back link', {\n integration: tr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix serializer to keep 'false' values\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport DS from 'ember-data';\n\n// Adapted from http://springember.blogspot.com.au/2014/08/using-ember-data-restadapter-with.html\nexport default DS.RESTSerializer.e... | javascript | chosen |
[
{
"from": "system",
"value": "[Add] Add Topic landing page route\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { Router, Route, IndexRoute, browserHistory } from 'react-router'\n\nimport App from '../containers/App'\nimport Article from '../containers/Article'\nimport Blan... | javascript | chosen |
[
{
"from": "system",
"value": "Load tld files completely async\n"
},
{
"from": "human",
"value": "'use babel';\n\nimport fs from 'fs';\nimport readInTld from '../readInTld';\nimport {add as addToRegistry} from '../registry';\n\n\nexport function register() {\n const userHome = process.env[(pro... | javascript | chosen |
[
{
"from": "system",
"value": "Add require_relative to work with Rails 4.1.5\n"
},
{
"from": "human",
"value": "//= require ../vis/module/header\n//= require moment\n//= require hammer\n//= require ../component/emitter\n\n//= require ../vis/shim\n//= require ../vis/util\n//= require ../vis/DataSe... | javascript | chosen |
[
{
"from": "system",
"value": "Fix travis hang on vendor file, change es6 to es5 style\n"
},
{
"from": "human",
"value": "L.Control.Div = L.Control.extend({\n initialize(element, options) {\n L.Control.prototype.initialize.call(this, options);\n this._container = element || L.DomUtil.creat... | javascript | chosen |
[
{
"from": "system",
"value": "Check if user is banned in /actions API\n"
},
{
"from": "human",
"value": "import * as actionCore from '../core/action-core';\nimport {createJsonRoute, throwStatus} from '../util/express';\nimport {assert} from '../validation';\nimport * as imageHttp from './image-h... | javascript | chosen |
[
{
"from": "system",
"value": "Handle dynamic insertion of page elements\n"
},
{
"from": "human",
"value": "(function() {\n var element = null;\n var nav_elements = document.querySelectorAll('.nav-item-container');\n\n for (var i = 0; i < nav_elements.length; i++) {\n var current ... | javascript | chosen |
[
{
"from": "system",
"value": "Update parseFields to handle `date` property\n"
},
{
"from": "human",
"value": "function parseFields (payload) {\n if (Array.isArray(payload)) {\n payload.forEach(parseFields);\n return;\n }\n\n if (typeof payload === 'object' && payload.hasOwnProperty('fie... | javascript | chosen |
[
{
"from": "system",
"value": "Fix search box with initial value after search\n"
},
{
"from": "human",
"value": "define(['jquery', 'DoughBaseComponent'], function($, DoughBaseComponent) {\n\n 'use strict';\n\n var ClearInput,\n uiEvents = {\n 'keydown [data-dough-clear-input]' : 'upda... | javascript | chosen |
[
{
"from": "system",
"value": "Test what happens in dockerhub when a node test fails\n\nSigned-off-by: Tobias Sjöndin <04a8cd48feee91827ce7c6d1356384bcca091996@op5.com>\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nlet chai = require('chai');\nlet expect = chai.expect;\n\nlet Stream = req... | javascript | chosen |
[
{
"from": "system",
"value": "Remove copyFileSync call from test\n"
},
{
"from": "human",
"value": "'use strict'\n\nlet cp = require('child_process'),\n\tfs = require('fs'),\n\tstarted = false\n\nmodule.exports.start = function (done) {\n\tif (started) {\n\t\treturn done()\n\t}\n\n\t// Fork serv... | javascript | chosen |
[
{
"from": "system",
"value": "Add Facebook login test 2\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('ngSocial.facebook', ['ngRoute','ngFacebook'])\n\n.config(['$routeProvider', function($routeProvider) {\n $routeProvider.when('/facebook', {\n templateUrl: 'facebook/fac... | javascript | chosen |
[
{
"from": "system",
"value": "Change the word \"feals\" to \"meals\" in error messaging.\n"
},
{
"from": "human",
"value": "// Meal Selection Page\n$('.meal-selection').click( function(event) {\n if( $('.meal-selection input:checked').length > 3) {\n alert(\"Please only pick 3 feals\");\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Hide button, enable timer for swal, note confirm color is white swal doesn't completely hide the button\n"
},
{
"from": "human",
"value": "var cancelAppointment = function(timeslot_id) {\n $(\"#modal_remote\").modal('hide');\n swal({\n title: \"Are you sure... | javascript | chosen |
[
{
"from": "system",
"value": "Remove deprecated notes from PropTypes helper\n"
},
{
"from": "human",
"value": "(function() {\n window.shared || (window.shared = {});\n\n // Allow a prop to be null, if the prop type explicitly allows this.\n // Then fall back to another validator if a value is... | javascript | chosen |
[
{
"from": "system",
"value": "Use $routeParams for retrieving project name\n"
},
{
"from": "human",
"value": "(function(angular) {\n\t'use strict';\n\t\n\tvar app = angular.module('bugminerApp', ['ngResource', 'ngRoute']);\n\t\n\tapp.config(['$routeProvider', function($routeProvider) {\n\t\t$rou... | javascript | chosen |
[
{
"from": "system",
"value": "Allow loading code from a CGI parameter\n\nCloses #62\n"
},
{
"from": "human",
"value": "/* global process:false */\n\nimport \"babel-polyfill\";\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { appl... | javascript | chosen |
[
{
"from": "system",
"value": "Use DNS for da-tiles server\n"
},
{
"from": "human",
"value": "export default {\n 'vt-source': 'http://52.207.244.74', // source of current vector tiles\n 'vt-hist-source': 'http://52.207.244.74', // source of historic vector tiles for compare feature\n}\n"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Remove case detail redirect to diagnosis as blocks deep linking into means test tabs\n"
},
{
"from": "human",
"value": "(function(){\n 'use strict';\n\n angular.module('cla.controllers')\n .controller('CaseEditDetailCtrl',\n ['$scope', 'AlternativeHelpServ... | javascript | chosen |
[
{
"from": "system",
"value": "Correct attachment with no condition"
},
{
"from": "human",
"value": "var Jailor;\n\n(function(GLOBAL) {\n\tvar conditions = [];\n\n\n\tJailor = {\n\t\tinit: function initJailor() {\n\t\t\tvar previousBeforeUnloadHandler = GLOBAL.onbeforeunload;\n\n\t\t\tGLOBAL.onbe... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to actual regexp and paths. Rather obvious demo that Jason was right about node_modules.\n"
},
{
"from": "human",
"value": "let tests = [\n // expect, string to match against\n [ true, 'foobar' ],\n [ false, 'foobaz' ],\n [ true, 'wheelbarrow' ],\n];\n\nl... | javascript | chosen |
[
{
"from": "system",
"value": "Change String.endsWith() calls with regex tests to make compatible with node 0.10+\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar load = require('../src/loader.js');\n\nfunction config(params) {\n var cfg = false;\n if ('object' == typeof params) cfg ... | javascript | chosen |
[
{
"from": "system",
"value": "Add route for updating thruster velocity\n"
},
{
"from": "human",
"value": "var shipSystems = require('../shipSystems.js');\r\nvar thrusters = shipSystems.getSystemById('thrusters');\r\n\r\nexports.registerRoutes = function (app, config) {\r\n app.post('/api/system... | javascript | chosen |
[
{
"from": "system",
"value": "Add spec tests for package activation and default setting values\n"
},
{
"from": "human",
"value": "\"use babel\";\n\nimport AtomExfmt from \"../lib/exfmt-atom\";\n\n// Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs.\n//\n// To run a specif... | javascript | chosen |
[
{
"from": "system",
"value": "Remove demo-related jQuery from library code\n"
},
{
"from": "human",
"value": "var tablePrefix = '__dear_';\n\nfunction createTable(tableName) {\n if (!localStorage[tableName]) {\n localStorage[tablePrefix + tableName] = '{}';\n }\n}\n\nfunction readTable(tabl... | javascript | chosen |
[
{
"from": "system",
"value": "Correct the usage of title as a component\n\nDocumentation for this feature can be found [here](https://github.com/nfl/react-helmet#as-react-components)"
},
{
"from": "human",
"value": "import React from 'react'\nimport Helmet from 'react-helmet'\nimport { prefixLin... | javascript | chosen |
[
{
"from": "system",
"value": "Load index earlier because it's safe now\n"
},
{
"from": "human",
"value": "import React from 'react';\n//import { createHistory } from 'history';\nimport createHistory from 'history/lib/createHashHistory';\n\n// Import components\nimport SearchBar from './SearchBar... | javascript | chosen |
[
{
"from": "system",
"value": "Use the inner div to render the chart\n"
},
{
"from": "human",
"value": "(function (angular) {\n 'use strict';\n\n function FlotDirective(eehFlot) {\n return {\n restrict: 'AE',\n scope: {\n dataset: '=',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove primaryKey def since default\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\n\nexport default DS.JSONSerializer.extend({\n primaryKey: 'id',\n attrs: {\n division: 'divisionID',\n },\n});\n"
},
{
"from": "gpt",
"va... | javascript | chosen |
[
{
"from": "system",
"value": "Set drawer size to 250 instead of 300, need space on mobile to close overlay\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Drawer from 'material-ui/Drawer';\nimport DrawerMenuItems from '../../containers/drawer-menu-items.js';\n\nexport defau... | javascript | chosen |
[
{
"from": "system",
"value": "Add check resources http status code\n"
},
{
"from": "human",
"value": "import fetch from '../default/fetch.js';\nimport checkMinifiedJs from './checkMinifiedJs.js';\n\nexport default function(urls) {\n return new Promise(function(resolve, reject) {\n let chain ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor the cancel logic - the extension will track the request id to cancel\n"
},
{
"from": "human",
"value": "var extend = require('cog/extend');\nvar OPT_DEFAULTS = {\n target: 'rtc.io screenshare'\n};\n\nmodule.exports = function(opts) {\n var lastRequestId;\... | javascript | chosen |
[
{
"from": "system",
"value": "Add more browser prefixes for rs-popover-message\n"
},
{
"from": "human",
"value": "angular.module('rs.popover', []).run(function () {\n 'use strict';\n\n var styleContent, styleTag;\n\n styleContent = document.createTextNode('.rs-popover-overlay { position: fixe... | javascript | chosen |
[
{
"from": "system",
"value": "Add 2 states for state machine\n"
},
{
"from": "human",
"value": "/**\n * Entry point for Step Functions Tasks Handler\n */\n'use strict';\n\nconst\n constants = require('../common/constants'),\n error = require('../services/error'),\n bottle = constants.BOTTLE_C... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for WebGL 2\n"
},
{
"from": "human",
"value": "\"use strict\"\n\nvar createVAONative = require(\"./lib/vao-native.js\")\nvar createVAOEmulated = require(\"./lib/vao-emulated.js\")\n\nfunction createVAO(gl, attributes, elements, elementsType) {\n var ext... | javascript | chosen |
[
{
"from": "system",
"value": "Add GitHub access token option\n"
},
{
"from": "human",
"value": "export default {\n authToken: process.env.AUTH_TOKEN || 'secret',\n env: process.env.NODE_ENV,\n host: process.env.HOST || 'localhost',\n github: {\n apiUrl: 'https://api.github.com',\n user... | javascript | chosen |
[
{
"from": "system",
"value": "Add more tests to href-type\n"
},
{
"from": "human",
"value": "describe('rules.href_type', function () {\n var rule = require('../lib/rules/href_type'),\n\t\thtmllint = require('../'),\n Parser = require('../lib/parser'),\n\t\tparser = null;\n\n describ... | javascript | chosen |
[
{
"from": "system",
"value": "Test front-to-back communication by socket.io API correctly\n"
},
{
"from": "human",
"value": "var assert = require('chai').assert;\nvar nodemock = require('nodemock');\n\nvar utils = require('./test-utils');\n\nvar express = require('express');\nvar socketAdaptor =... | javascript | chosen |
[
{
"from": "system",
"value": "Update config for Webpack 2.0\n"
},
{
"from": "human",
"value": "const { resolve } = require('path');\n\nmodule.exports = {\n entry: resolve(__dirname, '../src/index.js'),\n output: {\n path: resolve(__dirname, '../dist'),\n filename: '<%= initialComponentNa... | javascript | chosen |
[
{
"from": "system",
"value": "Delete cruft from trying a delta-based approach\n"
},
{
"from": "human",
"value": "const Quill = require('quill')\nconst Delta = require('quill-delta')\nconst { findAndMatchTimestampsOnTextChange } = require('./matchTimestamps')\nconst customBlots = ['Timestamp']\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add the type here too. This isn't entirely correct, we should be adding and subtracting ^ to the type, but it makes the test work for now.\n"
},
{
"from": "human",
"value": "var ffi = require('node-ffi')\n , core = require('./core')\n , types = require('./types')\... | javascript | chosen |
[
{
"from": "system",
"value": "Enable hover table styling only if row click handler is defined\n"
},
{
"from": "human",
"value": "import cc from 'classcat'\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport './style.scss'\n\nfunction DataTable ({\n className,\n click,\n col... | javascript | chosen |
[
{
"from": "system",
"value": "Use mode from the loader context\n\nSee https://github.com/webpack/webpack/pull/9140.\n"
},
{
"from": "human",
"value": "const build = require('../../tasks/serialize-workers').build;\n\nfunction loader() {\n const callback = this.async();\n\n let minify = false;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use register helper method in examples\n"
},
{
"from": "human",
"value": "var passport = require('passport'),\n Account = require('./models/account');\n\nmodule.exports = function (app) {\n \n app.get('/', function (req, res) {\n res.render('index', ... | javascript | chosen |
[
{
"from": "system",
"value": "Change the way of component initialization\n"
},
{
"from": "human",
"value": "dispatcher = require('edispatcher');\n\nvar component_map = {\n 'example': require('./component/example/example.js')\n};\n\ndocument.addEventListener('DOMContentLoaded', function() {\n v... | javascript | chosen |
[
{
"from": "system",
"value": "Store timestamp also in articles\n"
},
{
"from": "human",
"value": "var MongoClient = require(\"mongodb\").MongoClient;\n\nvar config = require(\"./config.json\");\n\nvar dbConnection = null;\nfunction getDB() {\n return new Promise(function(resolve, reject) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Call super-method from Mixin in sessionAuthenticated and sessionInvalidated\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin'\n\nexport default Ember.Route.extend( Appl... | javascript | chosen |
[
{
"from": "system",
"value": "Add required newline at end of file\n"
},
{
"from": "human",
"value": "// file: example/approle.js\n\nprocess.env.DEBUG = 'node-vault'; // switch on debug mode\n\nconst vault = require('./../src/index')();\nconst mountPoint = 'approle';\nconst roleName = 'test-role'... | javascript | chosen |
[
{
"from": "system",
"value": "chore: Comment out template koans to stop it showing in the test runner\n"
},
{
"from": "human",
"value": "describe(\"About <SubjectName>\", function () {\n\n describe(\"<SubjectPart>\", function () {\n\n beforeEach(function () {});\n afterEach(function () {}... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Mocha to run in browser and node tests. This is most likely a bug with karma-mocha.\n"
},
{
"from": "human",
"value": "// Make async.\nif (window.__karma__) {\n window.__karma__.loaded = function() {};\n}\n\n// Set the application endpoint and load the configu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix regex for non-story blocks require.context\n"
},
{
"from": "human",
"value": "/**\n * WordPress dependencies\n */\nimport { registerBlockType } from '@wordpress/blocks';\n\nconst context = require.context( './blocks', true, /index\\.js$/ );\n\ncontext.keys().for... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for requiring undefined deps\n"
},
{
"from": "human",
"value": "var chai = require('chai'),\n expect = chai.expect,\n sinon = require('sinon'),\n sinonChai = require(\"sinon-chai\");\n\nchai.use(sinonChai);\n\nvar introject = require('../lib');\n\ndescri... | javascript | chosen |
[
{
"from": "system",
"value": "Add rAF to sidebar animation\n"
},
{
"from": "human",
"value": "var sidebarOpen = false;\nvar menuText = [\"Menu\", \"Close\"];\nvar menuElement = document.querySelector(\".menu-link\");\nvar sidebarElement = document.querySelector(\".sidebar\");\nvar headerElement ... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for `user()` method.\n"
},
{
"from": "human",
"value": "const test = require('tape')\nconst miniplug = require('./mocks/mp')\nconst nock = require('nock')('https://plug.dj')\n\ntest('Retrieving a user', async (t) => {\n t.plan(1)\n\n nock.get('/_/users/1... | javascript | chosen |
[
{
"from": "system",
"value": "Add undefined instead of nan if only one number\n"
},
{
"from": "human",
"value": "inlist_module.directive('gdOnevarResults', function() { return {\n require:'^ngController', //input_list_ctrl\n templateUrl:'app/views/onevar_results_table.html',\n link: fun... | javascript | chosen |
[
{
"from": "system",
"value": "Remove log left in by mistake\n"
},
{
"from": "human",
"value": "var requirejs = require('requirejs');\n\nvar View = requirejs('extensions/views/view');\n\nmodule.exports = View.extend({\n\n render: function () {\n View.prototype.render.apply(this, arguments);\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the 'Translate this app' link\n"
},
{
"from": "human",
"value": "// Application found and translatable!\n$web_link = $(\".field-name-field-app-web-link\");\n\n$(\"<div class=\\\"field field-type-link-field field-label-inline clearfix\\\"><div class=\\\"field-... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct properties from predictions response\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport {\n StyleSheet,\n FlatList,\n View\n} from 'react-native';\nimport Prediction from './Prediction';\n\nclass Predictions ext... | javascript | chosen |
[
{
"from": "system",
"value": "Use data attribute instead of val()\n"
},
{
"from": "human",
"value": "var EDSN_THRESHOLD = 30;\n\nvar EdsnSwitch = (function(){\n var editing;\n var validBaseLoads = /^(base_load|base_load_edsn)$/;\n\n EdsnSwitch.prototype = {\n enable: function(){\n if(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix unnecessary encoding in poll function\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar utils = require(\"../utils\");\nvar log = require(\"npmlog\");\n\nmodule.exports = function(defaultFuncs, api, ctx) {\n return function createPoll(title, threadID, o... | javascript | chosen |
[
{
"from": "system",
"value": "Add contact form to about page\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport IntroBand from '../components/About/IntroBand';\nimport AboutBand from '../components/About/AboutBand';\nimport ProjectsBand from '../components/About/ProjectsBand... | javascript | chosen |
[
{
"from": "system",
"value": "Convert Hamburger component to stateless function\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport styled from 'styled-components';\nimport theme from 'theme';\n\nconst StyledHamburger = styled.div`\n position: relative;\n width: 15px;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "components: Remove unused isLoading function from Tab.\n\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst BaseComponent = require(__dirname + '/../components/base.js');\n\nclass Tab extends BaseComponent {\n\tconstructor(props) {\n\t\tsuper();\n\n\t\tthis.p... | javascript | chosen |
[
{
"from": "system",
"value": "Use idx as key for similar player avatars\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PlayerAvatar from './PlayerAvatar.js'\nimport '../style/components/SimilarPlayersCard.css';\n\nexport default function SimilarPlayersCard(props) {\n\n co... | javascript | chosen |
[
{
"from": "system",
"value": "Load plugin base styles at `@tailwind base`\n"
},
{
"from": "human",
"value": "import fs from 'fs'\nimport _ from 'lodash'\nimport postcss from 'postcss'\n\nfunction updateSource(nodes, source) {\n return _.tap(Array.isArray(nodes) ? postcss.root({ nodes }) : nodes... | javascript | chosen |
[
{
"from": "system",
"value": "Send www-authenticate header so browsers ask for a password.\n"
},
{
"from": "human",
"value": "var settings = require('../../settings');\n\nmodule.exports = function basic_auth(req, res, next){\n var username, password, auth_token, index_of_colon, auth_header, i, ... | javascript | chosen |
[
{
"from": "system",
"value": ":memo: Fix link typo in docs\n"
},
{
"from": "human",
"value": "import {rule, group} from '../../typography-fixer'\nimport html from '../html'\n\nlet frFR_HTML\n\n/**\n * The ruleset for HTML improvement on french typography\n *\n * It includes rules for:\n *\n * - ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Add custom launcher for karma\"\n\nThis reverts commit dd80f254f407429aeaf5ca5c4fb414363836c267.\n"
},
{
"from": "human",
"value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-file.h... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for sending client secret from the config\n"
},
{
"from": "human",
"value": "import xhr from 'proton-shared/lib/fetch/fetch';\nimport configureApi from 'proton-shared/lib/api';\n\nexport default ({ CLIENT_ID, APP_VERSION, API_VERSION, API_URL }) => (UID)... | javascript | chosen |
[
{
"from": "system",
"value": "Add error handling to battery check\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports.charging = function() {\n if ( process.platform === \"darwin\") {\n var osxBattery = require(\"osx-battery\");\n\n return osxBattery().then(res => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bad casing in import\n"
},
{
"from": "human",
"value": "import isPlainObject from 'lodash/isplainobject'\n\nfunction arrayify(fn) {\n return (...args) => {\n const ret = fn(...args)\n return Array.isArray(ret)\n ? ret\n : ret == null\n ? []... | javascript | chosen |
[
{
"from": "system",
"value": "Add environment variables for testing, database and database server port.\n"
},
{
"from": "human",
"value": "module.exports = function modelLoader(isParent) {\n 'use strict';\n\n if (isParent || process.env.MCTEST) {\n console.log('using mocks/model');\... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure the node module path is reported correctly"
},
{
"from": "human",
"value": "var path = require('path');\nvar moduleEntryPoint = require.resolve('incuna-sass');\n\nvar moduleDir = path.dirname(moduleEntryPoint);\n\nfunction includePaths() {\n return [modul... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor makeThumbNail to produce images with min400 x min400\n"
},
{
"from": "human",
"value": "makeThumbNail = function (fileBuffer, extenstion, callback) {\n var gmImageRessource = gm(fileBuffer, 'image.' + extenstion)\n, newImage = {\n side: 400\n }\n, sync... | javascript | chosen |
[
{
"from": "system",
"value": "Clean search (input, data, ...) when search view is disabled"
},
{
"from": "human",
"value": "var $ = require('jquery');\nvar _ = require('underscore');\nvar View = require('cdb/core/view');\nvar Model = require('cdb/core/model');\nvar PaginatorView = require('./pag... | javascript | chosen |
[
{
"from": "system",
"value": "Add details field to error\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Mixin = require('../../utils/mixin'),\n inherits = require('util').inherits;\n\nvar ErrorReportingMixinBase = module.exports = function (host, onParseError) {\n Mixin.call(this,... | javascript | chosen |
[
{
"from": "system",
"value": "Build gc-orders-server from commit bd221fb on branch master\n"
},
{
"from": "human",
"value": "let passport = require('passport');\nlet LocalStrategy = require('passport-local').Strategy;\n\nconst AUTH_ERROR = {message: 'Invalid email or password.'};\n\nlet localPas... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for cluster detail page\n"
},
{
"from": "human",
"value": "(function() {\n \"use strict\";\n\n var app = angular.module(\"TendrlModule\");\n\n app.controller(\"clusterDetailController\", clusterDetailController);\n\n /*@ngInject*/\n function clust... | javascript | chosen |
[
{
"from": "system",
"value": "Fix regexp to detect markdown file (URL with GET parameters)\n"
},
{
"from": "human",
"value": "window.addEventListener('load', function load(event) {\n\twindow.removeEventListener('load', load, false);\n\tMarkdownViewer.init();\n}, false);\n\n\nif (!MarkdownViewer)... | javascript | chosen |
[
{
"from": "system",
"value": "Add namespace for redux action for better scope\n"
},
{
"from": "human",
"value": "export const ADD: string = 'ADD'\nexport const SHOW: string = 'SHOW'\nexport const DISMISS: string = 'DISMISS'\n\nexport function add (item) {\n return {\n type: ADD,\n payload... | javascript | chosen |
[
{
"from": "system",
"value": "Test not just that there's no error, but also that there's a result\n"
},
{
"from": "human",
"value": "var RowConstants = require('./constants/row_constants.js'),\n QueryConstants = require('./constants/query_constants.js'),\n client = require('./client.js'),\... | javascript | chosen |
[
{
"from": "system",
"value": "Add route for getting books\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Router, Route, Switch } from 'react-router-dom';\nimport { hot } from 'react-hot-loader';\nimport SignUpPage from './SignUp/SignUpPage';\nimport LoginP... | javascript | chosen |
[
{
"from": "system",
"value": "Set token and fake liqen in redux middleware\n"
},
{
"from": "human",
"value": "import liqen from 'liqen'\nexport const CALL_API = Symbol('call api')\n\nexport default store => next => action => {\n const callAPI = action[CALL_API]\n\n if (typeof callAPI === 'unde... | javascript | chosen |
[
{
"from": "system",
"value": "Use \"instance\" instead of \"host\"\n"
},
{
"from": "human",
"value": "import Client from 'socket.io-client';\n\n/**\n * Registers the `connect` command.\n *\n * @param vorpal The Vorpal instance.\n */\nexport function connectFactory(vorpal) {\n vorpal\n .comma... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.