conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add redeclaration check for module export names matching Ramda functions.\n" }, { "from": "human", "value": "\nconst isDeclaration = (node, parent) => {\n\n if (\n (node.type === 'Identifier') && (\n (parent.type === 'VariableDeclarator' && parent.id.name =...
javascript
chosen
[ { "from": "system", "value": "Replace '五輕關廠' with '走入同志家庭' in subnav\n\nReplace the '五輕關廠' link with '走入同志家庭' in sub-navigation menu" }, { "from": "human", "value": "export const categoryPath = {\n taiwanPath: '/category/taiwan',\n reviewPath: '/category/review',\n photographyPath: '/photogra...
javascript
chosen
[ { "from": "system", "value": "Set JSON mode as a requirement explicitly\n" }, { "from": "human", "value": "hqDefine('hqwebapp/js/base_ace', [\n 'jquery',\n 'ace-builds/src-min-noconflict/ace',\n], function (\n $,\n ace\n) {\n\n if (!ace.config.get('basePath')) {\n var baseP...
javascript
chosen
[ { "from": "system", "value": "Set minimum IE version to IE10\n" }, { "from": "human", "value": "function addLoadEvent(func) {\n var oldonload = window.onload;\n if (typeof window.onload != 'function') {\n window.onload = func;\n } else {\n window.onload = function() {\n if (oldonlo...
javascript
chosen
[ { "from": "system", "value": "FIX: Use entwine so that a new link has the correct settigns in the GUI\n" }, { "from": "human", "value": "/*jslint white: true */\n(function($) {\n\t$(document).ready(function() {\n\t\t// Find the select box, named differently on the update and add forms\n\t\tvar s...
javascript
chosen
[ { "from": "system", "value": "Add some more padding to login screen\n" }, { "from": "human", "value": "var zk = {\n \n toMonthCalendar: function() {\n $.fn.fullpage.moveSlideRight();\n $(window).scrollTop(0);\n },\n \n toMain: function() {\n $.fn.fullpage.mov...
javascript
chosen
[ { "from": "system", "value": "INCLUDE sync on model .\n" }, { "from": "human", "value": "const path = require('path');\nconst sequelize = require(path.resolve('src/utils/connection'));\nconst Sequelize = require('sequelize');\n\nconst pokemon = sequelize.define('pokemon', {\n\tname: {\n\t\ttype:...
javascript
chosen
[ { "from": "system", "value": "Change check for WebSocket existence\n\nSafari identifies its WebSocket as \"object\", whereas Chrome is\n\"function\". By switching our check, we're forcing Chrome to use\nlong polling. This cheats us around the Chrome-14 issue, while\nenabling WebSockets for Safari.\n" }, ...
javascript
chosen
[ { "from": "system", "value": "Set query to empty string so 'undefined' isn't being sent through API\n" }, { "from": "human", "value": "export default class BaseApiService {\n\tconstructor($http, $log, appConfig, websocket, path) {\n\t\t'ngInject';\n\n\t\tthis.$http = $http;\n\t\tthis.$log = $log...
javascript
chosen
[ { "from": "system", "value": "Make border of imagery graphics transparent\n" }, { "from": "human", "value": "import SimpleFillSymbol from 'esri/symbols/SimpleFillSymbol';\nimport SimpleLineSymbol from 'esri/symbols/SimpleLineSymbol';\nimport Color from 'esri/Color';\n\nlet customSymbol;\nlet ima...
javascript
chosen
[ { "from": "system", "value": "Remove check for https on production environment. The developer should be careful enough to secure their application.\n" }, { "from": "human", "value": "var localProtocol = require('../services/protocols/local');\n/**\n * basicAuth\n *\n * If HTTP Basic Auth credent...
javascript
chosen
[ { "from": "system", "value": "Add Google Analytics tracking on events\n" }, { "from": "human", "value": "angular.module('npmalerts', ['ui.bootstrap']);\nfunction SignUpCtrl($scope, $http) {\n $scope.alerts = [];\n\n $scope.closeAlert = function(index) {\n $scope.alerts.splice(index,...
javascript
chosen
[ { "from": "system", "value": "Use dynamically generated airbnb config instead of dist\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash');\nvar airbnbEslintrc = require('../../../dist/airbnb-eslintrc');\nvar babelEslintrc = require('./babel').json;\nvar browserEslintrc ...
javascript
chosen
[ { "from": "system", "value": "Allow latest targets, map to '*'-\n" }, { "from": "human", "value": "var semver = require('semver');\nvar createError = require('./createError');\n\nfunction decompose(endpoint) {\n var regExp = /^(?:([\\w\\-]|(?:[\\w\\.\\-]+[\\w\\-])?)=)?([^\\|#]+)(?:#(.*))?$/;\...
javascript
chosen
[ { "from": "system", "value": "Stop test run if config loading errors\n" }, { "from": "human", "value": "#! /usr/bin/env node\n'use strict';\n\nvar doctest = require('../lib/doctest');\n\nvar fs = require('fs');\n\nvar glob = require('glob');\n\nvar CONFIG_FILEPATH = process.cwd() + '/.markdown-d...
javascript
chosen
[ { "from": "system", "value": "Set opacity for drag preview\n" }, { "from": "human", "value": "import React from 'react'\nimport { inject, observer } from 'mobx-react'\nimport Tab from 'components/Tab/Tab'\nimport { focusedColor } from 'libs/colors'\n\n@inject('tabStore')\n@observer\nexport defau...
javascript
chosen
[ { "from": "system", "value": "Replace functions for ES6 arrow functions\n" }, { "from": "human", "value": "const options = {\n animationDuration: 0.5,\n callbacks: {\n onFilteringStart: function() { },\n onFilteringEnd: function() { },\n onShufflingStart: function() { },\n onShuffl...
javascript
chosen
[ { "from": "system", "value": "Make meteor/server-render lazy on the client.\n" }, { "from": "human", "value": "Package.describe({\n name: \"server-render\",\n version: \"0.3.0\",\n summary: \"Generic support for server-side rendering in Meteor apps\",\n documentation: \"README.md\"\n});\n\nN...
javascript
chosen
[ { "from": "system", "value": "Delete movie using Ember Data\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n actions: {\n deleteMovie: function(movie) {\n console.log('deleteMovie', movie);\n }\n }\n});" }, { "from":...
javascript
chosen
[ { "from": "system", "value": "Define function for registering custom models\n" }, { "from": "human", "value": "function App() {\n this.customModels = [];\n}\n\nApp.prototype.registerSite = function(){\n\n};\n\nApp.prototype.registerWidget = function(){\n\n};\n\nmodule.exports = App;\n" }, ...
javascript
chosen
[ { "from": "system", "value": "Add controller to create project\n" }, { "from": "human", "value": "var router = module.exports = new (require('koa-router'))();\n\nrouter.get('/:projectId/collections/:collectionId', function *() {\n yield this.render('index');\n});\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Remove `id-blacklist` rule and use AirBnb's setting\n" }, { "from": "human", "value": "module.exports = {\n rules: {\n // require the use of === and !==\n // http://eslint.org/docs/rules/eqeqeq\n eqeqeq: 'error',\n // Blacklist certain identifiers to pr...
javascript
chosen
[ { "from": "system", "value": "Revert \"conditionally adds nav links to textbook page\"\n\nThis reverts commit 992e129eeabbb639d364fcb1469b516c8a079d1a.\n" }, { "from": "human", "value": "var RenderPage = function () {\n if (myuwFeatureEnabled('instructor_schedule')) {\n $(\"#app_naviga...
javascript
chosen
[ { "from": "system", "value": "Allow inspection of Delegate's handlers and clean up.\n" }, { "from": "human", "value": "var util = require('./util');\n\n\n// Returns a callable object that, when called with a function, subscribes\n// to the delegate. Call invoke on this object to invoke each hand...
javascript
chosen
[ { "from": "system", "value": "Set min donation to 1\n" }, { "from": "human", "value": "const config = {\n logLevel: process.env.LOG_LEVEL || 'info',\n couchDb: {\n url: process.env.COUCHDB_URL,\n dbName: 'q'\n },\n http: {\n port: 3000\n },\n business: {\n adminFee: 0.15,\n ...
javascript
chosen
[ { "from": "system", "value": "Add first api version (insight)\n" }, { "from": "human", "value": "'use strict';\n\nvar express = require('express');\n\nfunction initRouter(backend) {\n var router = express.Router();\n\n router.get('/blocks', function(req, res, next) {\n res.send('blocks v1' ...
javascript
chosen
[ { "from": "system", "value": "Add js function to apply code block wrapper to pre>code\n" }, { "from": "human", "value": "/**\n * main.js\n *\n * Author: Marian Friedmann\n *\n */\n\n$(function() {\n var $headerNav = $('.header-archive'),\n $archiveToggle = $('.archive-toggle'),\n $tit...
javascript
chosen
[ { "from": "system", "value": "Fix a few lint issues that got in.\n\nCloses #168\n" }, { "from": "human", "value": "var webpack = require('webpack');\nvar webpackTargetElectronRenderer = require('webpack-target-electron-renderer');\n\nvar config = {\n entry: [\n 'webpack-hot-middleware/client...
javascript
chosen
[ { "from": "system", "value": "Use hashbang routing while on github pages\n" }, { "from": "human", "value": "// This config file does not define any routes.\n// For module-level route definitions, use the *Routes.js files found in the module folders.\n\n'use strict';\n\nfunction appConfig($urlRou...
javascript
chosen
[ { "from": "system", "value": "Optimize package for dev and prod\n" }, { "from": "human", "value": "import webpack from 'webpack';\nimport path from 'path';\n\nconst production = process.env.NODE_ENV === 'production';\nmodule.exports = {\n devtool: 'source-map',\n watch: !production,\n module:...
javascript
chosen
[ { "from": "system", "value": "Add Models and Collections to the window app namespace to persist data between routes.\n" }, { "from": "human", "value": "module.exports = (function() {\n var Router = require('router'),\n Connection = require('lib/connection');\n\n // App namespace.\n windo...
javascript
chosen
[ { "from": "system", "value": "Add ajax to get IAM credentials when server is starting.\n" }, { "from": "human", "value": "// TODO: stub out UI functionality\n//window.setTimeout(func, delay);\n\n$(function() {\n $('#start-button').click( function() {\n $(this).html(\"Booting...\");\n })...
javascript
chosen
[ { "from": "system", "value": "Fix master branch build error.\n\nmaster branch build failing with error\n\n```\n[INFO] Running \"jshint:all\" (jshint) task\n[INFO]\n[INFO] src/app/home/home.controller.js\n[INFO] line 27 col 4 Missing semicolon.\n[INFO]\n[INFO] ✖ 1 problem\n[INFO]\n[INFO] Warning: Task \"...
javascript
chosen
[ { "from": "system", "value": "Disable downloader for non-existing tile test\n" }, { "from": "human", "value": "var test = require('tape'),\n almostEqual = function(t, actual, expected, delta, msg) {\n var d = Math.abs(actual - expected);\n delta = delta || 1e-9;\n msg = m...
javascript
chosen
[ { "from": "system", "value": "Stop the HRM when display is off\n" }, { "from": "human", "value": "/*\n Returns the Heart Rate BPM, with off-wrist detection.\n Callback rasied to update your UI.\n*/\nimport { display } from \"display\";\nimport { HeartRateSensor } from \"heart-rate\";\nimport {...
javascript
chosen
[ { "from": "system", "value": "Fix(lintstaged): Correct file mask for .js files\n" }, { "from": "human", "value": "'use strict';\n\nconst { json, install } = require('mrm-core');\n\nconst packages = [\n\t'lint-staged',\n\t'pre-commit',\n];\n\nmodule.exports = function() {\n\t// .lintstagedrc\n\tj...
javascript
chosen
[ { "from": "system", "value": "Add missing test line for multiply\n" }, { "from": "human", "value": "// A unit for each method.\nconst almostEqual = require('./almostEqual.test')\nconst create = require('./create.test')\nconst createFromArray = require('./createFromArray.test')\nconst createFromP...
javascript
chosen
[ { "from": "system", "value": "Add a remove statement to the insert test case." }, { "from": "human", "value": "var assert = require('assert');\nvar mongojs = require('../index');\nvar db = mongojs('test', ['a','b']);\n\ndb.a.insert([{name: \"Squirtle\"}, {name: \"Charmander\"}, {name: \"Bulbasau...
javascript
chosen
[ { "from": "system", "value": "Improve code efficiency using hover method\n" }, { "from": "human", "value": "$(document).ready(function(){\n var box = document.getElementsByTagName('a-box');\n\n var changeColor = function() {\n console.log('change');\n this.setAttribute('color...
javascript
chosen
[ { "from": "system", "value": "Remove help message from comemanderjs\n" }, { "from": "human", "value": "#!/usr/bin/env node\nconst program = require('commander');\nconst pkg = require('../package.json');\n\nprogram.cwd = process.cwd();\n\nprogram\n .version(pkg.version)\n .description('Find...
javascript
chosen
[ { "from": "system", "value": "Include JSX in browserified bundle for Karma\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function (config) {\n config.set({\n basePath: '',\n frameworks: ['browserify', 'mocha', 'sinon'],\n files: [\n // Source\n // 'src/...
javascript
chosen
[ { "from": "system", "value": "Create map before getting current location\n" }, { "from": "human", "value": "var michishiki = {};\nmichishiki.mode = null;\n\n$(document).on('pageshow', '#main-map', function() {\n initMap();\n\n // navbar event\n $('div[data-role=\"navbar\"] ul li a').on(...
javascript
chosen
[ { "from": "system", "value": "Change your nickname when you leave nickname field\n" }, { "from": "human", "value": "Template['chat'].helpers({\n chatroom: function(){\n return Session.get(\"name\")\n },\n nickname: function(){\n return Session.get('nickname') || 'Anonymous'\n }\n});\n\...
javascript
chosen
[ { "from": "system", "value": "Add quotes around a query variable to work better with Mongo.\n" }, { "from": "human", "value": "Template.foundbill.created = function(){\n Meteor.subscribe(\"allbills\");\n Session.set('message', '');\n};\n\nTemplate.foundbill.events({\n \"submit form\": functio...
javascript
chosen
[ { "from": "system", "value": "Fix typo in created-by attribute filename\n" }, { "from": "human", "value": "Package.describe({\n name: 'orionjs:attributes',\n summary: 'Orion attributes',\n version: '1.0.0',\n git: 'https://github.com/orionjs/orion'\n});\n\nPackage.onUse(function(api) {\n ap...
javascript
chosen
[ { "from": "system", "value": "Remove theme from the ghost settings;\n\n... to avoid interference with a migration that loads all the settings,\nand finds the theme setting in base, while it shouldn't.\n" }, { "from": "human", "value": "// A list of all the settings that are implied at runtime an...
javascript
chosen
[ { "from": "system", "value": "Fix autoformat issue on new file\n" }, { "from": "human", "value": "/*global atom*/\n\nmodule.exports = {\n formatter: function () {\n if (!this.standardFormat) {\n this.standardFormat = require('standard-format')\n }\n return this.standardFormat\n }...
javascript
chosen
[ { "from": "system", "value": "Verify contents of user object.\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { Route, Redirect } from 'react-router-dom'\nimport configureStore from '../store/ConfigureStore'\n\nlet store = configureStore()\nconst ProtectedRout...
javascript
chosen
[ { "from": "system", "value": "Declare functions before using them\n\n- retrieveItem was used before it was defined.\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Retrieve a localized configuration value or the default if the localization\n * is unavailable.\n *\n * @param {String} ...
javascript
chosen
[ { "from": "system", "value": "Add bower_components to the default excludes.\n" }, { "from": "human", "value": "var fs = require('fs-extra');\nvar assign = require('lodash-node/modern').assign;\nvar union = require('lodash-node/modern').union;\n\nvar defaults = {\n\n // build options\n source: ...
javascript
chosen
[ { "from": "system", "value": "Move analytics ids out to project settings.json\n" }, { "from": "human", "value": "Meteor.startup(function () {\n analytics.initialize({\n 'Google Analytics' : {trackingId: 'UA-58359748-2'},\n 'Mixpanel' : {\n token : '',\n identify : false,\n ...
javascript
chosen
[ { "from": "system", "value": "Add check for Microsoft Edge\n" }, { "from": "human", "value": "/**\n* @name checkIEVersion\n* @author chrisonntag\n* @desc checks if a user uses MSIE \n*/\n\n$(document).ready({\n\n\tfunction checkIEVersion() {\n\t var agent = window.navigator.userAgent;\n\t var ...
javascript
chosen
[ { "from": "system", "value": "Add proptype validation to StatusCounter component\n" }, { "from": "human", "value": "import React from 'react';\nimport './status-counter.scss';\n\nexport default (props) => (\n <div className=\"status-counter\">\n <ul>\n <li>\n <span cl...
javascript
chosen
[ { "from": "system", "value": "Edit modes for go, clojure, java and xml\n" }, { "from": "human", "value": "import 'brace/mode/jsx'\nimport 'brace/mode/json'\nimport 'brace/mode/css'\nimport 'brace/mode/html'\nimport 'brace/mode/markdown'\nimport 'brace/mode/yaml'\n\nexport default filename => {\n...
javascript
chosen
[ { "from": "system", "value": "Use method signature for child class wrapper.\n" }, { "from": "human", "value": "const util = require('util');\nconst Datastore = require('nedb');\n\nmodule.exports = class extends Datastore {\n\tloadDatabase = util.promisify(Datastore.prototype.loadDatabase);\n\tfi...
javascript
chosen
[ { "from": "system", "value": "Fix issue in IE due to use of reserved word 'class'\n" }, { "from": "human", "value": "(function($) {\n $.fn.externalLinks = function(options) {\n options = options || {};\n var re = options.re || new RegExp(window.location.hostname.split('.').join(...
javascript
chosen
[ { "from": "system", "value": "Fix a bug with new version of anyfetch-provider\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\n\nvar retrieveFiles = require('./helpers/retrieve.js').delta;\n\n/**\n * Build a uuid for each DB file.\n *\n * @param {int} uid User ID ...
javascript
chosen
[ { "from": "system", "value": "Fix unit tests for history\n" }, { "from": "human", "value": "import { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('service:history');\n\ntest('captures a transition', function(assert) {\n var history = this.subject();\n history.clear();\n var firstTransit...
javascript
chosen
[ { "from": "system", "value": "Delete teh console log comment.\n" }, { "from": "human", "value": "'use strict';\nvar easySession = require('easy-session');\n\nvar reqRoute = function() {\n\t\n\treturn function(req, res, next){\n\t\t\t\t\n\t\tif(req.session.isLoggedIn()) {\n\t\t\t\n\t\t\tif(req.se...
javascript
chosen
[ { "from": "system", "value": "Remove timing function, which was causing issues. Fixed some eslint configuration recommendations for the codebase.\n\n* Note: right now the scroll is working with chrome and firefox but not safari.\n" }, { "from": "human", "value": "function scrollTo(e) {\n var ...
javascript
chosen
[ { "from": "system", "value": "Use ES6 class syntax for MetaDomain. Add documentation.\n\nRelated issues:\nhttps://github.com/vigetlabs/microcosm/issues/305\n" }, { "from": "human", "value": "import { merge } from './utils'\n\nimport { RESET, PATCH, ADD_DOMAIN } from './lifecycle'\n\nexport defau...
javascript
chosen
[ { "from": "system", "value": "Increase timeout to improve test consistency\n" }, { "from": "human", "value": "/* eslint-disable no-console */\n\nconst {\n\tServiceBroker,\n\tTransporters: { AMQP: AmqpTransport }\n} = require(\"../../../..\");\nconst AMQP_URL = process.env.AMQP_URI || \"amqp://gu...
javascript
chosen
[ { "from": "system", "value": "Fix grid scroll position resetting to 0\n\nThe problem was that the index of the scrollbars was not being updated.\nTherefore, it was always being reset to 0 each time the animation frame\nis requested.\n\nFixed this by updating the index of the scrollbars. This also eliminates...
javascript
chosen
[ { "from": "system", "value": "Correct settings for single run in browserstack\n" }, { "from": "human", "value": "const base = require('./karma.base.conf');\n\nmodule.exports = function(config) {\n\tconfig.set(Object.assign(base, {\n\t\tbrowserStack: {\n\t\t\tusername: process.env.BROWSERSTACK_US...
javascript
chosen
[ { "from": "system", "value": "Update initializer to be Ember.js 2.1.x compliant.\n\nSince 2.1.x the `initializer` get strictly 1(!) argument (`Ember.ApplicationInstance`) --> see http://emberjs.com/deprecations/v2.x/#toc_ember-applicationinstance-container\r\n\r\nPreviously, the following deprecation messag...
javascript
chosen
[ { "from": "system", "value": "Change function name to verb\n\nConsistent with changes made on step-02\n" }, { "from": "human", "value": "'use strict';\n\n// On this codelab, you will be streaming only video (video: true).\nconst mediaStreamConstraints = {\n video: true,\n};\n\n// Video element ...
javascript
chosen
[ { "from": "system", "value": "Write what to do when there is a match: add to the repeated count\n" }, { "from": "human", "value": "// Method that performs basic string compression using the counts of repeated characters\n\nfunction compressStr(str) {\n\tvar output = \"\", // will return this var...
javascript
chosen
[ { "from": "system", "value": "Comment generation of user id\n" }, { "from": "human", "value": "'use strict';\n\nvar uuid = require('node-uuid');\n\nmodule.exports = function (email, password, nickname, email_verified, employee_id, company_code) {\n this.id = uuid.v1();\n this.email = email;\n ...
javascript
chosen
[ { "from": "system", "value": "Read contents of files in archive as well\n" }, { "from": "human", "value": "import {useCallback} from 'react';\nimport {useDropzone} from 'react-dropzone';\nimport JSZip from 'jszip';\n\nexport default function Dropzone() {\n const onDrop = useCallback(async accep...
javascript
chosen
[ { "from": "system", "value": "Convert snapshot date to format complying with ISO 8601\n" }, { "from": "human", "value": "var PHRAGILE = PHRAGILE || {};\n\n(function (PHRAGILE) {\n /**\n * Same as Graph but also renders graph areas under the line.\n * ProgressGraph will be limited to d...
javascript
chosen
[ { "from": "system", "value": "FIX Does not update list on nested change\n" }, { "from": "human", "value": "import { COMPONENT } from '../symbols';\nimport { defer } from '../utils';\n\nfunction walk(node, Component, options, items = []) {\n Array.from(node.children).forEach((child) => {\n co...
javascript
chosen
[ { "from": "system", "value": "[BUGFIX] Fix the bug caused by none array value of tasks path\n\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2014-present, San Wei Ju Yuan Tech Ltd. <https://www.3vjuyuan.com>\n * All rights reserved.\n *\n * This file is part of node-dev-tools, licensed...
javascript
chosen
[ { "from": "system", "value": "Clear electron-link's snapshot cache in script/clean\n" }, { "from": "human", "value": "'use strict'\n\nconst fs = require('fs-extra')\nconst os = require('os')\nconst path = require('path')\n\nconst CONFIG = require('../config')\n\nmodule.exports = function () {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix error when docs isn't set\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\nvar Fact = require('../db').Fact;\n\n// API information routes\nrouter.get('/', function(req, res, next) {\n res.render('api', { ti...
javascript
chosen
[ { "from": "system", "value": "Fix \"getDefaultProps\" warning appearing after update to react@16.x.x\n" }, { "from": "human", "value": "'use strict';\nconst packageVersion = require('./package.json').version;\nconst path = require('path');\nconst webpack = require('webpack');\n\nlet config = req...
javascript
chosen
[ { "from": "system", "value": "Change the \"user\" variable to \"doc\"\n" }, { "from": "human", "value": "Template.Users.events({\n 'click [name=add]': function(e, tmpl) {\n Router.go('add');\n }\n});\n\nTemplate.User.events({\n 'click .remove': function(e, tmpl) {\n if (confirm('Are you...
javascript
chosen
[ { "from": "system", "value": "Implement hbs partial auto detecting and registering\n" }, { "from": "human", "value": "const fs = require(`fs`);\nconst Handlebars = require(`handlebars`);\nconst htmlclean = require(`htmlclean`);\nconst mkdir = require(`mkdirp`);\nconst path = require(`path`);\n\n...
javascript
chosen
[ { "from": "system", "value": "Add better MongoDB error handling as in new generator commit\n" }, { "from": "human", "value": "/**\n * Main application file\n */\n\n'use strict';\n\n// Set default node environment to development\nprocess.env.NODE_ENV = process.env.NODE_ENV || 'development';\n\nva...
javascript
chosen
[ { "from": "system", "value": "Remove warning for required property\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react'\nimport { compose } from 'redux'\nimport { connect } from 'react-redux'\n\nimport CustomerForm from './CustomerForm'\n\nconst mapStateToProps ...
javascript
chosen
[ { "from": "system", "value": "Use button instead of NavbarToggler\n" }, { "from": "human", "value": "import './header.scss';\nimport React from 'react';\nimport {Link} from 'react-router';\n\nimport FontAwesome from 'react-fontawesome';\nimport { Navbar, NavbarBrand, Nav, NavItem, NavLink, Navba...
javascript
chosen
[ { "from": "system", "value": "Fix bug with travis CI\n" }, { "from": "human", "value": "import fs from 'fs';\nimport path from 'path';\nimport Sequelize from 'sequelize';\nimport configs from '../config/config.json';\n\nconst basename = path.basename(module.filename);\nconst env = process.env.NO...
javascript
chosen
[ { "from": "system", "value": "docs: Add some more simple docs.\n" }, { "from": "human", "value": "/** @jsx h */\n\nimport { Component, define, h } from \"../src\";\nimport { Code } from \"./components/code\";\nimport { Heading } from \"./components/heading\";\n\nexport default define(\n class e...
javascript
chosen
[ { "from": "system", "value": "Check in and out is not required\n" }, { "from": "human", "value": "var Mongoose = require('mongoose');\nvar Schema = Mongoose.Schema;\n\nvar BookSchema = new Schema({\n title: {type: String, required: true},\n year: {type: Number, required: true},\n isbn: {type:...
javascript
chosen
[ { "from": "system", "value": "Create promise-based handler for creation of high ridership (\"top routes\") data.\n" }, { "from": "human", "value": "/**\n * Index Route.\n *\n * @module routes/index\n */\nimport Ember from 'ember';\n\n/**\n * Exports extension of Ember's Route class.\n */\nexport...
javascript
chosen
[ { "from": "system", "value": "Remove a check to identify window's location\n" }, { "from": "human", "value": "if (window.location.href.indexOf(\"pct.bike\") !== -1){\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[...
javascript
chosen
[ { "from": "system", "value": "Set activity timeout before test to improve speed index accuracy.\n" }, { "from": "human", "value": "const Pagetest = require('./Pagetest');\n\nexports.call = function (db, data, req) {\n const API = new Pagetest.API('ec2-52-57-25-151.eu-central-1.compute.amazona...
javascript
chosen
[ { "from": "system", "value": "chore: Update to Inheritance Inversion HOC\n" }, { "from": "human", "value": "// core\nimport React, { PropTypes, Component } from 'react';\nimport { BackAndroid } from 'react-native';\n// utils\nimport isAndroid from '../utils/isAndroid.js';\n\nexport default funct...
javascript
chosen
[ { "from": "system", "value": "Add a disclaimer for the shameness\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { BrowserRouter, Match, Miss } from 'react-router';\nimport App from './App';\nimport './index.css';\n\nconst getBaseUrl = () ...
javascript
chosen
[ { "from": "system", "value": "Set slack api uri back to default\n" }, { "from": "human", "value": "/**\n * Created by myth on 2016-08-14.\n */\n\nconst API_EVENTS_URL = '/api/v1/splash-events/?start_time__gte=2016-08-01';\nconst API_SLACK_URL = 'https://online.ntnu.no/api/v1/slack/';\n\nexport {...
javascript
chosen
[ { "from": "system", "value": "server: Print GitHub authentications to log\n" }, { "from": "human", "value": "import Express from 'express';\nimport Passport from 'passport';\nimport request from 'request-promise-native';\nimport { Strategy as GitHubStrategy } from 'passport-github';\n\nconst rou...
javascript
chosen
[ { "from": "system", "value": "Add modal state to ui router\n" }, { "from": "human", "value": "var myApp = angular.module('myApp', ['ui.router', 'dndLists'])\nmyApp.config(function($stateProvider, $urlRouterProvider) {\n //\n // For any unmatched url, redirect to /\n $urlRouterProvider.otherwi...
javascript
chosen
[ { "from": "system", "value": "Rhymes: Fix \"More at ...\" link and move to group \"base\".\n" }, { "from": "human", "value": "function ddg_spice_rhymes ( api_result ) {\n \"use strict\";\n\n var query = DDG.get_query()\n .replace(/^(what|rhymes?( with| for)?) |\\?/gi, \"\");...
javascript
chosen
[ { "from": "system", "value": "Remove a left over comment from when getConfigValidityReport just returned a true/false rather than actual error messages.\n" }, { "from": "human", "value": "'use strict';\nmodule.exports = {\n port: 8080,\n googlePlacesApiKey: '', // define this in local.js\n\n ...
javascript
chosen
[ { "from": "system", "value": "Use edit controller as the default controller for OMIS edit app\n" }, { "from": "human", "value": "const path = require('path')\nconst i18nFuture = require('i18n-future')\nconst { reduce } = require('lodash')\n\nconst steps = require('../steps')\nconst fields = requ...
javascript
chosen
[ { "from": "system", "value": "Add IE and Opera Mini\n" }, { "from": "human", "value": "var GOVUK = GOVUK || {};\nGOVUK.UserSatisfaction = GOVUK.UserSatisfaction || function () {};\n\nGOVUK.UserSatisfaction.prototype = {\n cookieNameSeenBar: \"seenSurveyBar\",\n cookieNameTakenSurvey: \"takenUs...
javascript
chosen
[ { "from": "system", "value": "Check inclusion using non-strict equality\n\nBecause the list of selected ids can come from checkboxes, whose values are always strings\n" }, { "from": "human", "value": "import { CRUD_GET_MATCHING_SUCCESS } from '../../actions/dataActions';\n\nconst initialState = ...
javascript
chosen
[ { "from": "system", "value": "Support URI without authentication informations\n" }, { "from": "human", "value": "\"use strict\";\n\n/**\n * Initialize client service with the redis connection\n * @example\n client: {\n port: 6379,\n host: '127.0.0.1',\n options: {}\n }...
javascript
chosen
[ { "from": "system", "value": "Add resource for listing teams\n" }, { "from": "human", "value": "(function(){\n var app = angular.module('ng-attendance', ['ngResource', 'ui.router']);\n\n app.config(function($stateProvider, $urlRouterProvider) {\n $urlRouterProvider.otherwise(\"/\");\n\n ...
javascript
chosen
[ { "from": "system", "value": "Remove some text written by accident.\n" }, { "from": "human", "value": "import { OutputMatrix1D,OutputMatrix2D } from './OutputMatrix';\nimport { OutputScatterPlot,OutputGanttChart } from './OutputCharts';\nimport { OutputBox } from './OutputBox';\n\nexport const A...
javascript
chosen
[ { "from": "system", "value": "Return if note is null.\n" }, { "from": "human", "value": "angular.module('materialscommons').component('mcExperimentTaskDetails', {\n templateUrl: 'app/project/experiments/experiment/components/tasks/mc-experiment-task-details.html',\n controller: MCExperimen...
javascript
chosen