conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix error when no loading analytics\n" }, { "from": "human", "value": "if (document.location.hostname === \"josephduffy.co.uk\") {\n // Don't load analytics for noanalytics.josephduffy.co.uk or onion service\n return;\n}\n\nvar _paq = window._paq || [];\n/* tracke...
javascript
chosen
[ { "from": "system", "value": "Clean up some code mess\n" }, { "from": "human", "value": "import { expect, getRenderedComponent, sinon } from '../../spec_helper'\nimport { routeActions } from 'react-router-redux'\n// import * as MAPPING_TYPES from '../../../src/constants/mapping_types'\nimport Co...
javascript
chosen
[ { "from": "system", "value": "Update - sáb nov 11 19:54:37 -02 2017\n" }, { "from": "human", "value": "---\nlayout: null\n---\n\njQuery(document).ready(function($) {\n /* Method 2: */\n /* var isFirefox = /^((?!chrome|android).)*firefox/i.test(navigator.userAgent); */\n $(\"#btn-print\").clic...
javascript
chosen
[ { "from": "system", "value": "Put proper path to project tests\n" }, { "from": "human", "value": "const path = require('path')\n\nmodule.exports = {\n globals: {\n 'ts-jest': {\n tsConfig: '<rootDir>/src/tsconfig.test.json'\n }\n },\n setupFiles: ['<rootDir>/src/bp/jest-before.ts']...
javascript
chosen
[ { "from": "system", "value": "Add two way textarea binding.\n" }, { "from": "human", "value": "'use strict';\n\n// Declare app level module which depends on views, and components\nangular.module('myApp', [\n 'ngRoute',\n 'drupalService',\n 'myApp.node_add',\n 'myApp.node_nid',\n '...
javascript
chosen
[ { "from": "system", "value": "Add root to prevent infinite loop in watch\n" }, { "from": "human", "value": "module.exports = {\n testEnvironment: 'node',\n preset: '@shelf/jest-mongodb'\n}\n" }, { "from": "gpt", "value": "module.exports = {\n testEnvironment: 'node',\n preset: '@...
javascript
chosen
[ { "from": "system", "value": "Enable image/file/url embedding with hubot scripts\n" }, { "from": "human", "value": "var http = require('scoped-http-client');\n\nvar Responder = function (api, event, match, message) {\n this.api = api;\n this.event = event;\n this.match = match;\n th...
javascript
chosen
[ { "from": "system", "value": "Refactor some of the form CSS\n" }, { "from": "human", "value": "import Module from '../Module'\n\nexport default class Label extends Module {\n\n constructor(el, name, options) {\n\n const defaults = {\n \"once\": false,\n \"activeClass\": \"is-active...
javascript
chosen
[ { "from": "system", "value": "feat: Add in required argument name for new command\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar program = require('commander');\nvar prompt = require('inquirer');\nvar path = require('path');\n\nvar pkg = require(path.resolve(__dirname, '..', 'pack...
javascript
chosen
[ { "from": "system", "value": "Edit comment to describe the difficulty more clearly.\n" }, { "from": "human", "value": "/*\n * site: codemelon2012\n * file:\tscripts/main.js\n * author:\tMarshall Farrier\n * date:\t8/24/2012\n * description:\n * main JavaScript for codemelon2012\n * links:\n...
javascript
chosen
[ { "from": "system", "value": "Correct bug when compiling JavaScript sources\n\nCompiled JavaScript files were empty due to previous modifications on routes architecture. Configuration of grunt concat task wasn't conform to this new architecture.\n" }, { "from": "human", "value": "'use strict';\n...
javascript
chosen
[ { "from": "system", "value": "Remove jquery from the window resize helper\n" }, { "from": "human", "value": "import Mixin from '@ember/object/mixin';\nimport { run } from '@ember/runloop';\nimport { assert } from '@ember/debug';\nimport { on } from '@ember/object/evented';\nimport $ from 'jquery...
javascript
chosen
[ { "from": "system", "value": "Update google analytics tracking code\n" }, { "from": "human", "value": "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\r\n(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\r\nm=s.getElementsByTagName(o)[0];...
javascript
chosen
[ { "from": "system", "value": "S-53159: Change the error message to not be so implementy in lingo\n" }, { "from": "human", "value": "(function() {\n var csError = require('./csError');\n\n var MalformedPushEventError = csError.createCustomError('MalformedPushEventError', function() {\n var m...
javascript
chosen
[ { "from": "system", "value": "Update cookie when user changes password." }, { "from": "human", "value": "'use strict';\n\nfunction AccountCtrl($scope, $http, $cookieStore, flash, AccountService, LoginService, ServerErrorResponse, Base64) {\n $scope.currentAccount = angular.copy(AccountService...
javascript
chosen
[ { "from": "system", "value": "Fix an issue with the map being empty on a page transition\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport Map from '../map';\n\nexport default Ember.Component.extend({\n setupMap: Ember.on('init', function() {\n this.map = new Map();\n ...
javascript
chosen
[ { "from": "system", "value": "Simplify the Flow declarations for Redux\n" }, { "from": "human", "value": "// @flow\n\ndeclare module 'redux' {\n declare type Enhancer<Action, State> = mixed;\n\n declare type ReduxStore<Action, State> = {\n dispatch: (action: Action) => void | Promise<void>,...
javascript
chosen
[ { "from": "system", "value": "Set Flamsteed `schema` to `Flamsteed` instance" }, { "from": "human", "value": "require([ \"jquery\" ], function($) {\n\n \"use strict\";\n\n require([\n \"lib/core/base\",\n \"lib/page/scroll_perf\",\n \"flamsteed\",\n \"trackjs\",\n \"polyfills/fu...
javascript
chosen
[ { "from": "system", "value": "Add a missing test case\n" }, { "from": "human", "value": "var expect = require('chai').expect;\nvar helper = require('./helper');\n\ndescribe('helper', function () {\n it('should camelCase text', function () {\n expect(helper.camelCase('snake_case')).to.be.equa...
javascript
chosen
[ { "from": "system", "value": "Read from the same object\n" }, { "from": "human", "value": "const generators = require('yeoman-generator')\nconst fs = require('fs')\n\nmodule.exports = generators.Base.extend({\n constructor: function () {\n generators.Base.apply(this, arguments)\n this.sou...
javascript
chosen
[ { "from": "system", "value": "Allow minimatch match slashes too\n" }, { "from": "human", "value": "var minimatch = require('minimatch');\nvar is = require('annois');\nvar fp = require('annofp');\nvar zip = require('annozip');\n\n\nmodule.exports = function(model, query, cb) {\n if(!is.object(...
javascript
chosen
[ { "from": "system", "value": "Fix playlist table name spelling mistake\n\n" }, { "from": "human", "value": "/**\n * A list of database constants.\n *\n * @type {Object}\n */\nconst DATABASE_CONSTANTS = Object.freeze({\n GUILD_TABLE_NAME: 'guilds',\n PLAYLIST_TABLE_NAME: 'playllists',\n ...
javascript
chosen
[ { "from": "system", "value": "Connect error state adn signupRequest action\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport Helmet from 'react-helmet';\n\nimport Header from 'components/Header';\nimport SignupCard from '...
javascript
chosen
[ { "from": "system", "value": "Address comment about closure variable lookup." }, { "from": "human", "value": "define(function () {\n\n var _toString = Object.prototype.toString;\n\n /**\n * Gets the \"kind\" of value. (e.g. \"String\", \"Number\", etc)\n */\n function kindOf(val...
javascript
chosen
[ { "from": "system", "value": "Change package creation skeleton to import properly\n\nThe package skeleton test example was omitting the first part of the package name and thus failing to find it within the test package.\n\nFixes meteor/meteor#6653\n" }, { "from": "human", "value": "// Import Tin...
javascript
chosen
[ { "from": "system", "value": "Return file as part of upload\n" }, { "from": "human", "value": "import Plugin from './Plugin';\n\nexport default class Multipart extends Plugin {\n constructor(core, opts) {\n super(core, opts);\n this.type = 'uploader';\n }\n\n run(results) {\n console...
javascript
chosen
[ { "from": "system", "value": "Fix login with oauth services\n" }, { "from": "human", "value": "global.IPC = require('ipc')\n\nvar events = ['unread-changed'];\n\nevents.forEach(function(e) {\n\twindow.addEventListener(e, function(event) {\n\t\tIPC.send(e, event.detail);\n\t});\n});\n\nrequire('....
javascript
chosen
[ { "from": "system", "value": "Add JavaScript function for scrollable sections after clicking navbar links.\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file ...
javascript
chosen
[ { "from": "system", "value": "Refactor out character creation scripts.\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/ja...
javascript
chosen
[ { "from": "system", "value": "Modify help text on page header component to not use bootstrap js\n" }, { "from": "human", "value": "define(['react', 'components/common/glyphicon'], function(React, Glyphicon) {\n\n var PageHeader = React.createClass({\n render: function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix repeated inserts of \"Code\" team notices.\n" }, { "from": "human", "value": "import DashboardWidgetComponent from 'appkit/components/dashboard-widget';\n\nvar GithubTeamNotices = DashboardWidgetComponent.extend({\n\n init: function() {\n this._super();\n ...
javascript
chosen
[ { "from": "system", "value": "Add tacticDetailsSelector that returns denormalized data\n" }, { "from": "human", "value": "import { createSelector } from 'reselect';\n\nconst getTactics = state => state.entities.tactics;\n\nexport const tacticsSelector = createSelector(\n [getTactics], tactics =...
javascript
chosen
[ { "from": "system", "value": "Read empty csv cells as undefined" }, { "from": "human", "value": "// objectifier\n\n\"use strict\"\n\n// readObject :: [String] -> [String] -> Object String a\nconst readObject = keys => values => {\n var i, obj, value\n\n obj = {}\n for (i = 0; i < keys.length;...
javascript
chosen
[ { "from": "system", "value": "Add placeholder htmlbars flag in dummy app for packaging to toggle" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n ...
javascript
chosen
[ { "from": "system", "value": "Use destructuring while using config\n" }, { "from": "human", "value": "import React from 'react';\nimport { BrowserRouter, Route, Switch } from 'react-router-dom';\n\nimport config from './config';\nimport routeConstants from './constants/routeConstants';\n\nimport...
javascript
chosen
[ { "from": "system", "value": "Add null check to property generator\n" }, { "from": "human", "value": "// @flow\n\nimport * as React from 'react';\nimport { Helmet } from 'react-helmet';\nimport config from 'app/config';\nimport { type ComponentType, createElement } from 'react';\n\n/**\n * A hig...
javascript
chosen
[ { "from": "system", "value": "Use correct module for stress command\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nimport \"babel-polyfill\";\nimport yargs from \"yargs\";\n\nimport * as analyse from \"../commands/analyse\";\nimport * as measure from \"../commands/measure\";\n\nyargs\...
javascript
chosen
[ { "from": "system", "value": "Check that regex matching template vars is not null\n" }, { "from": "human", "value": "JSONEditor.defaults.templates[\"default\"] = function() {\n return {\n compile: function(template) {\n var matches = template.match(/{{\\s*([a-zA-Z0-9\\-_\\.]+)\\s*}}/g);...
javascript
chosen
[ { "from": "human", "value": "Add ADD_TODO and TOGGLE_TODO actions\n" }, { "from": "gpt", "value": "let todoId = 0;\n\nexport const addTodo = (text) => (\n {\n type: 'ADD_TODO',\n id: todoId++,\n text\n }\n);\n\nexport const toggleTodo = (id) => (\n {\n type: 'TOGGLE_TODO',\n id...
javascript
chosen
[ { "from": "system", "value": "Update store template to match the rules of Prettier" }, { "from": "human", "value": "{{#if mutations}}\n{{#each mutations}}\nexport const {{this}} = '{{camelcase this}}';\n{{/each}}\n{{/if}}\n\nexport default {\n namespaced: true,\n state: {\n },\n getters: {\n...
javascript
chosen
[ { "from": "system", "value": "Replace regex with faster check\n" }, { "from": "human", "value": "import { utils } from \"stylelint\"\n\nexport const ruleName = \"extend-require-placeholder\"\n\nexport const messages = utils.ruleMessages(ruleName, {\n rejected: \"Use a placeholder selector (e.g....
javascript
chosen
[ { "from": "system", "value": "Replace Panel in home component\n\n" }, { "from": "human", "value": "import { get } from \"lodash-es\";\nimport React from \"react\";\nimport { connect } from \"react-redux\";\nimport { Icon, Panel } from \"../../base\";\n\nconst Welcome = props => {\n let versio...
javascript
chosen
[ { "from": "system", "value": "v0.1.2: Use relative URL for jQuery\n" }, { "from": "human", "value": "requirejs.config({\n paths: {\n jquery: \"/vendor/jquery\",\n }\n});\n\ndefine(['jquery'], function ($) {\n var _ = window._,\n Map = function(svg) {\n this.svg = $(svg);\n ...
javascript
chosen
[ { "from": "system", "value": "Fix access error when detection fails\n" }, { "from": "human", "value": "var browsers = [\n [ 'chrome', /Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/ ],\n [ 'firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/ ],\n [ 'opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/ ],\n [ 'ie', /Triden...
javascript
chosen
[ { "from": "system", "value": "[Web][CI] Add mock function implementations (navigator.getGamepads())\n" }, { "from": "human", "value": "Module.preRun = [\n function () \n {\n FS.mkdir('/test');\n FS.mount(NODEFS, { root: '../../Test/test' }, '/test');\n\n FS.mkdir('/resources');\n F...
javascript
chosen
[ { "from": "system", "value": "Fix async logic in integration test runner\n" }, { "from": "human", "value": "/**\n * Run each test under ./integration, one at a time.\n * Each one will likely need to pollute global namespace, and thus will need to be run in a forked process.\n */\n\nvar fs = requ...
javascript
chosen
[ { "from": "system", "value": ":new: Add writeJSON method in motion-fs\n" }, { "from": "human", "value": "'use strict'\n\n/* @flow */\n\nimport FS from 'fs'\nimport Path from 'path'\nimport promisify from 'sb-promisify'\n\nexport const readFile = promisify(FS.readFile)\nexport const writeFile = p...
javascript
chosen
[ { "from": "system", "value": "Make variable name more consistent\n" }, { "from": "human", "value": "// This file makes all join table relationships\nconst database = process.env.DB_DATABASE;\nconst dbHost = process.env.DB_HOST;\nconst dbUser = process.env.DB_USER;\nconst dbPassword = process.env...
javascript
chosen
[ { "from": "system", "value": "Fix defaults, fix `export` arg name\n" }, { "from": "human", "value": "export default function createTypeAlias(j, flowTypes, { name, export } = { name: 'Props', export: false }) {\n const typeAlias = j.typeAlias(\n j.identifier(name), null, j.objectTypeAnnotatio...
javascript
chosen
[ { "from": "system", "value": "Clarify the role of each test in the simple relationships acceptance tests\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport { test } from 'qunit';\nimport moduleForAcceptance from '../../tests/helpers/module-for-acceptance';\n\nconst { get } = E...
javascript
chosen
[ { "from": "system", "value": "Implement positive exit code if feed is not valid\n" }, { "from": "human", "value": "/**\n * @file\n * Run validation by CLI\n */\nvar Q = require('q');\n\nvar getOptions = require('../actions/cli/get-options');\nvar suppressMessages = require('../actions/suppress')...
javascript
chosen
[ { "from": "system", "value": "Send a different message when no one is in the Lab\n" }, { "from": "human", "value": "module.exports = function(ircbot, config) {\n\tvar request = require('request');\n\t\n\tircbot.addListener('message', function (from, to, message) {\n\t\tif (to !== config.irc.anno...
javascript
chosen
[ { "from": "system", "value": "js/jquery: Make open() methods tab parameter optional\n\nThe last three commits are closing #3\n" }, { "from": "human", "value": "$.fn.sidebar = function() {\n var $sidebar = this;\n var $tabs = $sidebar.children('.sidebar-tabs').first();\n var $container =...
javascript
chosen
[ { "from": "system", "value": "Fix typo win -> won\n" }, { "from": "human", "value": "const h = require('virtual-dom/h');\n\nmodule.exports = function (data) {\n const {gameID, game} = data;\n return h('div', {className: 'room'}, [\n game.playing ? null : h('a', {href: '/new-player/' + gameI...
javascript
chosen
[ { "from": "system", "value": "Add ownedJobs reducer in combineReducers\n" }, { "from": "human", "value": "import account from './account';\nimport person from './person';\nimport languages from './languages';\nimport jobTypes from './jobTypes';\nimport creditCards from './creditCards';\n\nconst ...
javascript
chosen
[ { "from": "system", "value": "Update default views folder so it's relative to the current project, instead of being `/views` at the root of the filesystem.\n" }, { "from": "human", "value": "var path = require('path');\n\nmodule.exports = function initViewEngine (keystone, app) {\n\t// Allow usa...
javascript
chosen
[ { "from": "system", "value": "Fix a bug in the initializer\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport NamingStrategyFactory from 'ember-cli-bem/naming-strategies/factory';\n\nconst {\n Component,\n} = Ember;\n\nexport default {\n\n name: 'ember-cli-bem',\n\n initial...
javascript
chosen
[ { "from": "system", "value": "Discard plugin should run on queue_outbound as well\n" }, { "from": "human", "value": "// discard\n\nexports.register = function () {\n this.register_hook('queue','discard');\n}\n\nexports.discard = function (next, connection) {\n var transaction = connection....
javascript
chosen
[ { "from": "system", "value": "Add Chapter 09, exercise 1\n" }, { "from": "human", "value": "verify(/ca[rt]/,\n [\"my car\", \"bad cats\"],\n [\"camper\", \"high art\"]);\n\nverify(/pr?op/,\n [\"pop culture\", \"mad props\"],\n [\"plop\"]);\n\nverify(/ferr[et|y|ari]/,\...
javascript
chosen
[ { "from": "system", "value": "Fix JSON parsing bug, ingredients displayed correctly again.\n" }, { "from": "human", "value": "$('#suggestions').typed({\n strings: [\"chocolate chip cookies\", \"brownies\", \"pancakes\"],\n typeSpeed: 50,\n backSpeed: 15,\n backDelay: 1500,\n loop:...
javascript
chosen
[ { "from": "system", "value": "Add demo for options r404work\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\nvar bigrest = require('../index');\n\nvar http = bigrest.listen(18080, {\n debug: true,\n basepath: __dirname,\n static: {\n urlpath: '/fil...
javascript
chosen
[ { "from": "system", "value": "Make alarm go off at 3pm instead of 4pm\n\n- Moment dates are 0 indexed\n" }, { "from": "human", "value": "import moment from 'moment'\n\nexport default class NextFridayProvider {\n static formattedDate() {\n return momentNextFriday().format('M/D');\n }...
javascript
chosen
[ { "from": "system", "value": "Clear the status only when the timeout is valid\n" }, { "from": "human", "value": "'use strict';\n\nimport { StatsCollector } from './lib/stats';\n\nexport default function(RED) {\n\n class DeviceStatsNode {\n constructor(n) {\n RED.nodes.createNode(this, n...
javascript
chosen
[ { "from": "system", "value": "Test that it returns the same string it is given\n" }, { "from": "human", "value": "const assert = require('assert');\nconst configMergeLoader = require('../index.js');\n\ndescribe('Config Merge Loader', function() {\n it('should return a function', function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove event-related tests since we're now simply extending the EventEmitter class\n" }, { "from": "human", "value": "const { expect } = require('chai');\nconst Plexacious = require('../js/Plexacious');\n\nconst plex = new Plexacious();\n\ndescribe('Plexacious:', ()...
javascript
chosen
[ { "from": "system", "value": "Add ability to add your own data in export (exporter.getJSON)\n" }, { "from": "human", "value": "export default class Exporter {\n constructor(editor) {\n this.editor = editor;\n }\n\n getData() {\n var tweenTime = this.editor.tweenTime;\n var domain = t...
javascript
chosen
[ { "from": "system", "value": "Revert \"Add a fake test failure\"\n\nThis reverts commit 564dc61d02b854a278b07e21c65c33859ee82dbc.\n" }, { "from": "human", "value": "const JSUnit = imports.jsUnit;\n// application/javascript;version=1.8\nfunction testBasic1() {\n var foo = 1+1;\n JSUnit.asse...
javascript
chosen
[ { "from": "system", "value": "Fix critical bug with Router\n" }, { "from": "human", "value": "/* global Node */\n\nimport { ensureEl } from './util.js';\nimport { setChildren } from './setchildren.js';\n\nexport function router (parent, Views, initData) {\n return new Router(parent, Views, init...
javascript
chosen
[ { "from": "system", "value": "Make sure to trigger \"change\" event when filling in passwords, webpage logic might rely on it\n" }, { "from": "human", "value": "/*\n * This Source Code is subject to the terms of the Mozilla Public License\n * version 2.0 (the \"License\"). You can obtain a copy ...
javascript
chosen
[ { "from": "system", "value": "Use an Express app instead\n" }, { "from": "human", "value": "// Copyright 2011 Iris Couch\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a co...
javascript
chosen
[ { "from": "system", "value": "Fix the export window options\n\nThe window should be minimizable but not fullscreenable.\n" }, { "from": "human", "value": "'use strict';\n\nconst {BrowserWindow, app} = require('electron');\nconst loadRoute = require('./utils/routes');\n\nlet exportsWindow = null;...
javascript
chosen
[ { "from": "system", "value": "Remove zombie code, .then for useless promise\n" }, { "from": "human", "value": "angular.module('bolt.profile', ['bolt.auth'])\n\n.controller('ProfileController', function ($scope, $rootScope, $window, Auth, Profile) {\n $scope.newInfo = {};\n $scope.session = win...
javascript
chosen
[ { "from": "system", "value": "Add visit counter for rooms." }, { "from": "human", "value": "Meteor.methods({\n userAddVisitedRoom: function(roomId) {\n var rooms = Rooms.find({\n _id: roomId\n }, {\n _id: 1\n });\n if (rooms.count() === 0) {\n...
javascript
chosen
[ { "from": "system", "value": "Hide frame on Chrome App\n" }, { "from": "human", "value": "chrome.app.runtime.onLaunched.addListener(function () {\n\n chrome.app.window.create('app/index.html', {\n bounds: {\n width: 800,\n height: 600,\n left: 100,\n top: 100\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Remove redundant data (error time and events)\n" }, { "from": "human", "value": "\nErrorModel = function (appId) {\n var self = this;\n this.appId = appId;\n this.errors = {};\n this.startTime = Date.now();\n}\n\n_.extend(ErrorModel.prototype, KadiraModel.protot...
javascript
chosen
[ { "from": "system", "value": "Add target blank for footer links\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n\nclass Footer extends Component {\n render() {\n if (this.props.data) {\n var networks = this.props.data.social.map(function (network) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use port 80 as default\n" }, { "from": "human", "value": "const express = require('express');\nconst http = require('http');\nconst socketIO = require('socket.io');\nconst path = require('path');\n\nconst app = express();\nconst server = http.Server(app);\nconst io ...
javascript
chosen
[ { "from": "system", "value": "Add link to GitHub project" }, { "from": "human", "value": "export default () =>\n <div>\n <h1>\n react-todo{' '}\n <small>by <a href=\"https://github.com/pmdarrow\">pmdarrow</a></small>\n </h1>\n <style>{`\n h1 {\n margin: 2rem;\n ...
javascript
chosen
[ { "from": "system", "value": "Disable animations in bridgeless mode\n\nSummary:\nBridgeless mode requires all native modules to be turbomodules. The iOS animated module was converted to TM, but reverted due to perf issues. RSNara is looking into it, but it may be an involved fix. As a short term workaround,...
javascript
chosen
[ { "from": "system", "value": "Switch back to the master branch\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n github: {\n username: 'maker-of-life',\n repo: 'maker-of-life/game-of-life',\n branch: 'game',\n localPath: 'tmp',\n },\n\n commit: {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix for missing comma from merging branches\n" }, { "from": "human", "value": "import { combineReducers } from 'redux'\nimport {\n REQUEST_WORKSPACES, RECEIVE_WORKSPACES,\n SELECT_WORKSPACE, REQUEST_RESULTS,\n RECEIVE_RESULTS, SELECT_RESULT,\n REQUEST_QUERIES, R...
javascript
chosen
[ { "from": "system", "value": "Add req.method to error message on not found\n" }, { "from": "human", "value": "/*\n * Ensures something has been found during the request. Returns 404 if\n * res.template is unset, res.locals is empty and statusCode has not been set\n * to 204.\n *\n * Should be p...
javascript
chosen
[ { "from": "system", "value": "Add audio type checks for MP3 and OGG Vorbis\n" }, { "from": "human", "value": "/*global _:true, App:true, Backbone:true */\n/*jshint forin:false, plusplus:false, sub:true */\n'use strict';\n\ndefine([\n 'zepto',\n 'install',\n 'datastore',\n 'collection...
javascript
chosen
[ { "from": "system", "value": "Fix usage of new LaunchScreen API in Todos\n" }, { "from": "human", "value": "Router.configure({\n // we use the appBody template to define the layout for the entire app\n layoutTemplate: 'appBody',\n\n // the appNotFound template is used for unknown routes and ...
javascript
chosen
[ { "from": "system", "value": "Add CRUD forms on community controller\n" }, { "from": "human", "value": "/**\n * @fileOverview Communities CRUD controller.\n */\n\n// var log = require('logg').getLogger('app.ctrl.city.Dashboard');\nvar ControllerBase = require('nodeon-base').ControllerBase;\nvar ...
javascript
chosen
[ { "from": "system", "value": "Fix Space and comment issues.\n" }, { "from": "human", "value": "var http = require('http');\nvar url = require('url');\nvar port = 8000;\n\nvar server = http.createServer(function (request, response){\n\n try {\n\t\t//go to http://127.0.0.1:8000/?req=Monty\n\t\t...
javascript
chosen
[ { "from": "system", "value": "Set the navbar to reload, no matter the url.\n" }, { "from": "human", "value": "/*\n * @flow\n */\n\nimport React from 'react';\n\nexport default function Navbar() {\n return (\n <nav className=\"navbar navbar-default navbar-fixed-top navbar-inverse\">\n <d...
javascript
chosen
[ { "from": "system", "value": "Create modal for withdraw form\n" }, { "from": "human", "value": "( function() {\n\n\t\"use strict\";\n\n\tangular.module('ACBank')\n\t\t.controller('AccountsController', AccountsController);\n\n\tAccountsController.$inject = [ '$scope', '$ionicModal' ];\n\n\tfuncti...
javascript
chosen
[ { "from": "system", "value": "Convert Non-strict to strict equality checking\nConvert non-strict equality checking, using `==`, to the strict version, using `===`." }, { "from": "human", "value": "var SolidityUtils = {\n\n getCharacterOffsetToLineAndColumnMapping: function(source) {\n var ma...
javascript
chosen
[ { "from": "system", "value": "Make sure we gzip our assets for deployment\n" }, { "from": "human", "value": "import gulpLoadPlugins from 'gulp-load-plugins';\nimport runSequence from 'run-sequence';\n\nimport * as paths from './paths';\nimport gulp from './_gulp';\nimport jspmBuild from './utils...
javascript
chosen
[ { "from": "system", "value": "Fix error message logging in Safari bandaid\n" }, { "from": "human", "value": "'use strict';\n\nconst\n RELOAD_KEY = 'safari-reload-193289123',\n WAIT_TIME = 100; // Does it matter how long to wait?\n\n/**\n * Safari desktop audio is being dumb and won't play ...
javascript
chosen
[ { "from": "system", "value": "Use render.page for full-page reload\n" }, { "from": "human", "value": "'use strict';\n\n\n/**\n * client\n **/\n\n/**\n * client.common\n **/\n\n/**\n * client.common.auth\n **/\n\n/**\n * client.common.auth.register\n **/\n\n\n/*global $, _, nodeca, window*/\n...
javascript
chosen
[ { "from": "system", "value": "Revert \"fix: chunk load errors on legacy map\"\n\nThis reverts commit 8f3220c2a95d1ec9ed6d1cbb742d579a019b7e36.\n" }, { "from": "human", "value": "import \"ol/ol.css\";\nimport \"./style.css\";\nimport listMap from \"./listMap\";\nimport itemMap from \"./itemMap\";...
javascript
chosen
[ { "from": "system", "value": "Update battle map with input handling\n" }, { "from": "human", "value": "import loop from 'loop';\nimport StatusBar from 'statusBar';\nimport BattleMap from 'map';\nimport state from 'state';\nimport { subtractSet } from 'pura/vector/tuple';\nimport { canvasOffsetLe...
javascript
chosen
[ { "from": "system", "value": "Add user-name as parameter, rather than hardcoding\n\nTODO check for user-name before attempting to issue request\n" }, { "from": "human", "value": "'use strict';\n\nvar request = require('request');\n\nvar opts = {\n uri: 'https://api.github.com' + '/users/jm-ja...
javascript
chosen
[ { "from": "system", "value": "Write globalPause and globalPlay methods for Mixer model\n" }, { "from": "human", "value": "Mixer = function () {\n\tthis.mix = []\n}\n\n//Adds a track to the mix. Takes args = {url: sound.aws.com, divId: 1}\nMixer.prototype.addTrack = function (args) {\n\tvar newTr...
javascript
chosen
[ { "from": "system", "value": "Change password reset error message\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('arachne.controllers')\n\n/**\n * Set new password.\n *\n * @author: Daniel M. de Oliveira\n */\n .controller('PwdActivationController',\n ['$scope', '$s...
javascript
chosen
[ { "from": "system", "value": "Use react key list container\n" }, { "from": "human", "value": "'use strict';\n\nimport React, { Component } from 'react';\nimport ReactCSS from 'reactcss';\n\nimport colors from '../styles/variables/colors';\nimport 'normalize.css';\nimport '../fonts/work-sans/Work...
javascript
chosen
[ { "from": "system", "value": "Change a title of the option\n" }, { "from": "human", "value": "module.exports = function() {\n\n return this\n .title('Benchmarks')\n .helpful()\n .arg()\n .name('treeish-list')\n .title('List of rev...
javascript
chosen
[ { "from": "system", "value": "Configure custom karma browser launcher for travis\n" }, { "from": "human", "value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n config....
javascript
chosen