conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add functions for natural, integer\n" }, { "from": "human", "value": "// Chance.js 0.1\n// http://chancejs.com\n// (c) 2013 Victor Quinn\n// Chance may be freely distributed or modified under the MIT license.\n\n(function () {\n\n var Chance = {\n VERS...
javascript
chosen
[ { "from": "system", "value": "Add debug access to webpack modules.\n" }, { "from": "human", "value": "\nimport { ErrorPage } from './ErrorPage';\nimport { LoginPage } from './LoginPage';\nimport { App } from './actions';\nimport { Root } from './router';\n\n\n(function () {\n\nif (!history.pushS...
javascript
chosen
[ { "from": "system", "value": "Fix missing preventDefault on links in exam timetable\n" }, { "from": "human", "value": "define(['backbone.marionette', 'app', 'hbs!../templates/exam'],\n function (Marionette, App, template) {\n 'use strict';\n\n return Marionette.ItemView.extend({\n ta...
javascript
chosen
[ { "from": "system", "value": "Make the index route open\n" }, { "from": "human", "value": "import jwt from 'jsonwebtoken';\n/**\n * verifyToken: This verifies all routes that starts with /api\n * It checks if there is token and checks if the token is valid\n * if the token is valid then it ...
javascript
chosen
[ { "from": "system", "value": "Fix \"The `ember generate <entity-name>` command requires an entity name to be specified.\" error during installation" }, { "from": "human", "value": "module.exports = {\n description: '',\n\n afterInstall: function () {\n return this.addAddonsToProject({\n ...
javascript
chosen
[ { "from": "system", "value": "Fix timeout issue with newer version of Mocha\n" }, { "from": "human", "value": "/* eslint-env mocha */\nconst mockBot = require('../mockBot')\nconst assert = require('assert')\nconst mockery = require('mockery')\n\ndescribe('urban module', function () {\n before(f...
javascript
chosen
[ { "from": "system", "value": "Make vote count visible after upvoting\n" }, { "from": "human", "value": "$(document).ready(function() {\n MageHero_App.bindUpvote();\n $('table.listing').tablesorter({\n headers: {\n 1: { sorter: false },\n 2: { sorter: false },\n...
javascript
chosen
[ { "from": "system", "value": "Add jquery to change image on phone when scroll\n" }, { "from": "human", "value": "$(document).ready(function(){\n $(window).scroll(function(){\n if ($(this).scrollTop() >= $(\".section-3\").offset().top) {\n $(\".inner-phone\").css(\"background-co...
javascript
chosen
[ { "from": "system", "value": "Add boolean to specify which location is the headquarter\n" }, { "from": "human", "value": "'use strict';\n\nimport mongoose, {Schema} from 'mongoose';\n\nvar MdphSchema = new Schema({\n zipcode: { type: String, unique: true },\n name: { type: String ...
javascript
chosen
[ { "from": "system", "value": "Add floating button toggle to main\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-san...
javascript
chosen
[ { "from": "system", "value": "Fix language code returned by ManageIQ rest API\n\nWhen setting user language is self-service, we rely on user's language\npreference as returned by the rest api. In the case of language variants\n(such as zh_CN), the rest api returns the language name with underscores\n(i.e. a...
javascript
chosen
[ { "from": "system", "value": "Fix group toggle not showing\n" }, { "from": "human", "value": "import Polymer from '../polymer';\nimport hass from '../util/home-assistant-js-instance';\nimport canToggle from '../util/can-toggle';\n\nrequire('../components/ha-card');\nrequire('../components/entity...
javascript
chosen
[ { "from": "system", "value": "Add stub blocks to Docs page\n" }, { "from": "human", "value": "import React from 'react';\n\nimport PageTitle from '../components/layout/PageTitle';\n\nconst Documentation = () => {\n\n return (\n <div id='page-content-wrapper'>\n <div class='contain...
javascript
chosen
[ { "from": "system", "value": "Add layover on avatar image\n" }, { "from": "human", "value": "var React = require('react');\nvar Gravatar = require('react-gravatar');\n\nclass QueueItem extends React.Component{\n render(){\n return (\n <div className='col-sm-12'>\n <div className=...
javascript
chosen
[ { "from": "system", "value": "Set example component back to original state\nto keep the PR small and focused\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\n\nimport withTheme from '../hoc/withTh...
javascript
chosen
[ { "from": "system", "value": "Split cert as travis was not instantiating it\n" }, { "from": "human", "value": "const app = require('./server.js');\nconst http = require('http');\nconst https = require('https');\nconst port = process.env.PORT || 8080;\nconst httpsPort = process.env.HTTPS_PORT || ...
javascript
chosen
[ { "from": "system", "value": "Fix input submit, now clear itself after submit\n" }, { "from": "human", "value": "(function (angular){\n 'use strict';\n\n angular.module('app')\n .controller('counterController', counterController)\n .controller('todoController', todoController)\n\n\n c...
javascript
chosen
[ { "from": "system", "value": "Make sure Houkou won't attempt to add \"parameters\", \"pattern\" and \"build\" as globals when the user called it without using \"new\"" }, { "from": "human", "value": "function merge(a, b) {\n var r = {};\n for (var i=0;i<a.length;++i) {\n r[a[i]] = b[i];\n ...
javascript
chosen
[ { "from": "system", "value": "Send the amount of workers\n" }, { "from": "human", "value": "\"use strict\";\n\nvar Spawner = require(\"./spawner.js\");\n\nvar api = function(server) {\n var options = {};\n var port = 8000;\n if(typeof arguments[1] == \"object\") {\n options = arguments[1];...
javascript
chosen
[ { "from": "system", "value": "Add userLimit param to voice channel\n" }, { "from": "human", "value": "const ServerChannel = require('./ServerChannel');\nconst VoiceChannelDataStore = require('./datastore/VoiceChannelDataStore');\n\nclass VoiceChannel extends ServerChannel {\n constructor(guild,...
javascript
chosen
[ { "from": "system", "value": "Hide HireMe component on print\n" }, { "from": "human", "value": "import React from 'react';\n\nexport default class HireMe extends React.Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n if (!this.props.availableForWork) {\n ret...
javascript
chosen
[ { "from": "system", "value": "Reformat within demo to ensure equal results\n" }, { "from": "human", "value": "var esformatter = require( 'esformatter' );\nesformatter.register( require( '../lib/plugin' ) );\n\nvar fs = require( 'fs' );\nvar path = require( 'path' );\n\nvar files = fs.readdirSync...
javascript
chosen
[ { "from": "system", "value": "Add validation to show reactivate button to AdminUser list\n" }, { "from": "human", "value": "window.c.AdminUserDetail = (function(m, _, c){\n return {\n controller: function(){\n return {\n actions: {\n reset: ...
javascript
chosen
[ { "from": "system", "value": "Introduce redux-thunk for async actions\n" }, { "from": "human", "value": "import { createStore, combineReducers } from 'redux';\nimport header from './header';\nimport device from './device';\n\nconst types = {\n ACTIVE: 'module_active',\n LOGIN: 'app_login'\n};\...
javascript
chosen
[ { "from": "system", "value": "Correct reference to genomic tracks container\n\n\nFormer-commit-id: bc91aa4eea8bdffd85e21df019694a7d2e5da07d" }, { "from": "human", "value": "var goToUrlAndSetLocalStorage = require('../../../shared/specUtils').goToUrlAndSetLocalStorage;\nvar waitForPatientView = r...
javascript
chosen
[ { "from": "system", "value": ":white_check_mark: Fix react-dnd demo broken in react 15\n" }, { "from": "human", "value": "import demoTest from '../../../tests/shared/demoTest';\n\ndemoTest('table', {\n skip: process.env.REACT === '15' ? ['edit-row'] : [],\n});\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Disable custom rule instead of default one\n" }, { "from": "human", "value": "'use strict';\n\n// MODULES //\n\nvar root = require( 'system.global' )(); // eslint-disable-line no-redeclare\n\n\n// MAIN //\n\nvar nodeList = root.document && root.document.childNodes;\...
javascript
chosen
[ { "from": "system", "value": "Replace switch statement with an object literal.\n\nTechnically, there is little difference because a lookup is going to have to happen\nanyway, but I believe this option is cleaner and shorter.\n\nThis commit also removes the exception being thrown in the default case. Now, a ...
javascript
chosen
[ { "from": "system", "value": "Fix: Fix bot not shutting down.\n" }, { "from": "human", "value": "module.exports = async (client, message) => {\r\n if (message === 'shutdown') {\r\n await client.log.info(`Shuting down!${client.shard ? ` | Shard ID: ${client.shard.id}` : ''}`, 'Client')\r\n ...
javascript
chosen
[ { "from": "system", "value": "Clarify directory location of app\n" }, { "from": "human", "value": "// import libraries\n// react dom and app\n\n\n// reactdom.render(app, document.get by id)\n\nimport ReactDOM from 'react-dom';\nimport App from 'components/app';\n\nReactDOM.render(<App />, docume...
javascript
chosen
[ { "from": "system", "value": "Use req.malifi.utils to get hostname\n" }, { "from": "human", "value": "var site= '../site'\nvar map= {\n localhost: site\n ,'127.0.0.1': site\n}\nextractHostFromHost= /([^:]+).*/\n\nmodule.exports= function(req) {\n return map[req.headers.host.replace(extractHost...
javascript
chosen
[ { "from": "system", "value": "Add ajax -to success- for login\n" }, { "from": "human", "value": "$(document).ready(function() {\n \t\n \t$(\".login_btn\").on(\"click\", function(event){\n \t\t\tevent.preventDefault();\n \t\t\tconsole.log(\"YOU CLICKED\");\n \t\t\t$(\".login_form\").toggle();\n \...
javascript
chosen
[ { "from": "system", "value": "command: Fix comparaison of command (== 0x11) for half lx\n\nI assume author @circuitdb wanted this in:\nhttps://github.com/miroRucka/bh1750/pull/3\n\nChange-Id: Ic8666c0b735a970f0ff82fedc4e654969a1a0076\nOrigin: https://github.com/miroRucka/bh1750/pull/12\nSigned-off-by: Phil...
javascript
chosen
[ { "from": "system", "value": "Fix TTL for redis store of meat messages, to 24 hours\n" }, { "from": "human", "value": "var fs = require(\"fs\");\nvar shasum = require(\"sha1\");\nvar redis = require(\"redis\");\nvar client = redis.createClient();\nvar meatreader = requi...
javascript
chosen
[ { "from": "system", "value": "Fix issue with Vue not working\n" }, { "from": "human", "value": "/**\n * First we will load all of this project's JavaScript dependencies which\n * includes Vue and other libraries. It is a great starting point when\n * building robust, powerful web applications us...
javascript
chosen
[ { "from": "human", "value": "Test book and document imaging standards\n" }, { "from": "gpt", "value": "/*\n\n This module tests exif metadata against the standards set forth in UT Libraries' digitization standards (https://wiki.lib.utk.edu/pages/viewpage.action?pageId=11927581).\n\n */\n\nvar ex...
javascript
chosen
[ { "from": "system", "value": "Set default value for city\n" }, { "from": "human", "value": "var User = require('../models/user.js');\nvar TwitterStrategy = require('passport-twitter').Strategy;\n\nmodule.exports = function (passport) {\n passport.use(new TwitterStrategy({\n consumerKey: pr...
javascript
chosen
[ { "from": "system", "value": "Fix broadcast detection of various states\n" }, { "from": "human", "value": "const express = require('express');\nconst path = require('path');\n\n//const serverAddr = 'https://sheffield.spina.me:3002';\n\n/* Defines the application */\nlet app = express();\n\napp.s...
javascript
chosen
[ { "from": "system", "value": "Remove hack forcing HTTPS as it's no longer needed\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport SlideList from './components/slideList.js';\n\nfunction start() {\n const isDev = (location.hostname === 'l...
javascript
chosen
[ { "from": "system", "value": "Add a filter to convert seconds to readable duration\n" }, { "from": "human", "value": "var catalogApp = angular.module('catalogApp', []);\n" }, { "from": "gpt", "value": "var catalogApp = angular.module('catalogApp', []);\n\ncatalogApp.filter('readableD...
javascript
chosen
[ { "from": "system", "value": "Add a function to clear all localstorage values\n" }, { "from": "human", "value": "angular.module('BlueCube.utils', [])\n\n.factory('$localstorage', ['$window', function($window) {\n\treturn {\n\t\tset: function(key, value) {\n\t\t\t$window.localStorage[key] = value...
javascript
chosen
[ { "from": "system", "value": "Add starting point for factory test\n" }, { "from": "human", "value": "'use strict';\n\n// describe('controllers', function(){\n// var scope;\n\n// beforeEach(module('polyflix'));\n\n// beforeEach(inject(function($rootScope) {\n// scope = $rootScope.$new()...
javascript
chosen
[ { "from": "system", "value": "Remove printing raw value in battery voltage example\n" }, { "from": "human", "value": "var five = require('johnny-five');\nvar ChipIO = require('../index'); // or require('chip-io');\n\nvar board = new five.Board({\n io: new ChipIO()\n});\n\nboard.on('ready', func...
javascript
chosen
[ { "from": "system", "value": "Add very basic user authentication support\n" }, { "from": "human", "value": "module.exports = {\n\tgetConnection: getConnection\n};\n\nfunction getDbOpts(opts) {\n\topts = opts || {\n\t\thost: 'localhost',\n\t\tdb: 'my-app',\n\t\tport: 27017\n\t};\n\topts.port = op...
javascript
chosen
[ { "from": "system", "value": "Remove bash lang def for prismjs\n" }, { "from": "human", "value": "// Grunt configuration\nmodule.exports = {\n autoprefixer: {\n browsers: ['> 1%', 'last 2 versions']\n },\n concat: {\n src: [\n 'node_modules/svg4everybo...
javascript
chosen
[ { "from": "system", "value": "Normalize the FileSystemLoader paths to ensure proper path separators on windows.\n(for running the unittests in windows)\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\nvar lib = require('./lib');\nvar Object = require('./ob...
javascript
chosen
[ { "from": "system", "value": "Fix sort-of regression in `6.1.0` whether state changes in `componentDidUpdate()` resulted in synchronous re-renders.\n" }, { "from": "human", "value": "import options from './options';\nimport { defer } from './util';\nimport { renderComponent } from './vdom/compon...
javascript
chosen
[ { "from": "system", "value": "Add search page to router\n" }, { "from": "human", "value": "import Vue from 'vue'\nimport Router from 'vue-router'\nimport Welcome from '@/components/Welcome'\nimport Bundles from '@/components/bundles/Bundles'\nimport BundleItems from '@/components/bundles/BundleI...
javascript
chosen
[ { "from": "system", "value": "Improve iframe for xml parser\n" }, { "from": "human", "value": "import Component from './Component';\n\nconst type = 'iframe';\n\nexport default Component.extend(\n {\n defaults() {\n return {\n ...Component.prototype.defaults,\n type,\n ...
javascript
chosen
[ { "from": "system", "value": "Add node exports to Insertion sort.\n" }, { "from": "human", "value": "function InsertionSort (arr) {\n\tvar i,\n\t\tj,\n\t\tlen = arr.length,\n\t\tswap;\n\n\tfor (i = 0; i < len; i++) {\n\t\tfor (j = i; j > 0; j--) {\n\t\t\tif (arr[j] < arr[j - 1]) {\n\t\t\t\tswap ...
javascript
chosen
[ { "from": "system", "value": "Disable dev tools on production\n" }, { "from": "human", "value": "import { createStore, applyMiddleware, compose } from 'redux'\nimport createSagaMiddleware from 'redux-saga'\nimport { hashHistory } from 'react-router'\nimport { routerMiddleware } from 'react-route...
javascript
chosen
[ { "from": "system", "value": "Change font to system defaults\n" }, { "from": "human", "value": "// @flow\n\nconst type = {\n base: 'HelveticaNeue',\n bold: 'HelveticaNeue-Bold',\n emphasis: 'HelveticaNeue-Italic'\n}\n\nconst size = {\n h1: 38,\n h2: 34,\n h3: 30,\n h4: 26,\n h5: 20,\n h...
javascript
chosen
[ { "from": "system", "value": "Fix tamper with xcode 10\n" }, { "from": "human", "value": "'use strict';\n\n/* eslint no-console: 0, no-process-env: 0 */\n\nvar fs = require('fs');\nvar path = require('path');\n\nvar buildPath = path.join(process.env.ANTITAMPERING_TEST_DIR, 'platforms/ios/build/e...
javascript
chosen
[ { "from": "system", "value": "Revert \"make some changes that will be undone\"\n\nThis reverts commit 3dc921eddbcf2736e0ad853978fe305a35ceffd3.\n" }, { "from": "human", "value": "'use strict';\n/**\n * Module dependencies.\n */\nvar init = require('./config/init')(),\n\tconfig = require('./confi...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"Try child process\"\"\n\nThis reverts commit a192a4830ef8f719bdb6c6692b05ef22956439aa.\n" }, { "from": "human", "value": "module.exports = {\n onPreBuild({ utils: { status: { show } } }) {\n show({ summary: 'Test' })\n }\n}\n" }, { "fr...
javascript
chosen
[ { "from": "system", "value": "Add warning about prod needing full file paths" }, { "from": "human", "value": "module.exports = {\n uri: 'http://localhost:3000/',\n sessionSecret: 'sessionSecretString',\n trust_proxy: false,\n auth: {\n google: {\n clientId: 'googleC...
javascript
chosen
[ { "from": "system", "value": "Increase TAC maxteamsize to 3 (from 1)\n\n- Fixes #343\n- Opens #346, since the user cannot select the teamsize\n" }, { "from": "human", "value": "/**\n * TAC Presets: TAC rankings, followed by wins and numgames\n *\n * @return Presets\n * @author Erik E. Lorenz <er...
javascript
chosen
[ { "from": "system", "value": "Load noun and verb data.\n" }, { "from": "human", "value": "/**\n * Made without jQuery because arbitrary restrictions\n * are fun. I guess.\n */\nvar butter = (function(){\n /**\n * SHOW ME WHAT YOU GOT\n */\n function onPurposeRequest() {\n va...
javascript
chosen
[ { "from": "system", "value": ":fire: Remove unnecessary ESLint suppressions\nThey were no longer required since the transition from preact to react\n" }, { "from": "human", "value": "/* @flow */\n\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n// eslint-disable-next-line no-unused...
javascript
chosen
[ { "from": "system", "value": "Update redirect code not to add query parameters if they are not present.\n" }, { "from": "human", "value": "var CONTEXT_URI = process.env.CONTEXT_URI;\n\nexports.requiresSession = function (req, res, next) {\n if (req.session.encodedUsername) {\n res.cook...
javascript
chosen
[ { "from": "system", "value": "Use !! to convert variables to booleans\n\n" }, { "from": "human", "value": "var helper = require('../helper')\n\nvar Response = function(id, content, error, internal) {\n this.id = parseFloat(id)\n this.content = content\n this.error = error ? true : false...
javascript
chosen
[ { "from": "system", "value": "Use login screen instead of login modal\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n\n tagName: 'form',\n classNameBindings: [ 'isValid:valid:invalid' ],\n\n cancel: 'cancel',\n isValid: Ember.compute...
javascript
chosen
[ { "from": "system", "value": "Remove original templatecache, and inject templates module.\n" }, { "from": "human", "value": "'use strict';\n\nvar app = angular.module('2048App', ['Game', 'Grid', 'Keyboard']);\n\n// Save templates\napp.run(function($templateCache) {\n $templateCache.put('mainId....
javascript
chosen
[ { "from": "system", "value": "Fix reference error due to missing comma\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Main AngularJS Entry Point.\n *\n * @author Mohamed Mansour 2015 (http://mohamedmansour.com)\n */\nvar App = angular\n .module('personalDataDashboardApp', [\n ...
javascript
chosen
[ { "from": "system", "value": "plugins/defaults: Set permalink to false for posts\n" }, { "from": "human", "value": "'use strict';\n\n// Dependencies\nconst cssnext = require('cssnext')\nconst path = require('path')\n\n// Aliases\nvar basedir = __dirname\n\nmodule.exports = {\n paths: {\n des...
javascript
chosen
[ { "from": "system", "value": "Fix propFill when there're no props\n" }, { "from": "human", "value": "// When declaring a prop with no value it should be evaluated to true\n// but '' is falsy. As a solution add the\nexport default {\n beforeCompile () {\n for (let prop of Object.keys(this._pr...
javascript
chosen
[ { "from": "system", "value": "Use cluster to utilize multiple cores\n\nAdd cluster module to utilize multiple cores. Closes #54.\n" }, { "from": "human", "value": "// server.js\n//\n// entry point activity pump application\n//\n// Copyright 2011-2012, StatusNet Inc.\n//\n// Licensed under the Ap...
javascript
chosen
[ { "from": "system", "value": "Put sections in desired order\n" }, { "from": "human", "value": "import React from 'react'\n\nimport Page from '../../components/page'\nimport Header from './header'\nimport PreviousEpisodeSection from './sections/previous-episodes'\nimport EpisodesSection from './s...
javascript
chosen
[ { "from": "system", "value": "Change the topic name used in the test\n" }, { "from": "human", "value": "require('./harness');\nvar testName = __filename.replace(__dirname+'/','').replace('.js','');\n\nconnection.addListener('ready', function () {\n puts(\"connected to \" + connection.serverPr...
javascript
chosen
[ { "from": "system", "value": "Fix bug where the included template was unattached from it's data\n" }, { "from": "human", "value": "var angularMeteorTemplate = angular.module('angular-blaze-template', []);\n\n// blaze-template adds Blaze templates to Angular as directives\nangularMeteorTemplate.d...
javascript
chosen
[ { "from": "system", "value": "Fix the reducer's switch statement\n\n" }, { "from": "human", "value": "import { INCREMENT_COUNTER, DECREMENT_COUNTER } from '../actions/counter'\n\nconst counter = (state = 0, action) => {\n switch (action) {\n case INCREMENT_COUNTER:\n return state + 1\n ...
javascript
chosen
[ { "from": "system", "value": "Send a delete request during logout action\n" }, { "from": "human", "value": "var AuthManager = require('../config/auth_manager');\n\n// The default Route class for the main view of ember app\nvar ApplicationRoute = Ember.Route.extend({\n // Init an new authmanager...
javascript
chosen
[ { "from": "system", "value": "Add a console print during the build examples script\n" }, { "from": "human", "value": "var childProcess = require('child_process');\nvar fs = require('fs');\n\n// Build all of the example folders.\ndirs = fs.readdirSync('examples');\n\nfor (var i = 0; i < dirs.leng...
javascript
chosen
[ { "from": "system", "value": "Add first stateless function component\n" }, { "from": "human", "value": "var React = require('react');\n\nclass Popular extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n selectedLanguage: 'All'\n ...
javascript
chosen
[ { "from": "system", "value": "Change to `transitionTo` to `transitionToRoute`\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport { task } from 'ember-concurrency';\n\nconst {\n get,\n computed,\n isPresent\n} = Ember;\n\nexport default Ember.Controller.extend({\n flashMess...
javascript
chosen
[ { "from": "system", "value": "Sort bar elements properly to make sure that they are always visible.\n" }, { "from": "human", "value": "'use strict';\n\n// External\nimport * as d3 from 'd3';\n\n// Internal\nimport Bar from './bar';\nimport * as config from './config';\n\nconst BARS_CLASS = 'bars...
javascript
chosen
[ { "from": "system", "value": "Remove spl converter, was only an experiment with Gangnam Style.\n" }, { "from": "human", "value": "var abc = require('./converters/abc'),\n fs = require('fs'),\n p = require('path'),\n spl = require('./converters/spl'),\n converters = { abc: abc, spl: spl };\n\...
javascript
chosen
[ { "from": "system", "value": "Add Talk Time to details\n" }, { "from": "human", "value": "var HeaderViewTalk = function(dict) {\n\tvar obj = dict.obj || {};\n\n\tvar UI = require(\"/lib/UI/UI\");\n\tvar i18n = require(\"/lib/i18n/Remote\");\n\n\tvar self = UI.createView({\n\t\theight: Ti.UI.SIZE...
javascript
chosen
[ { "from": "system", "value": "Allow load mixin function to have no args\n" }, { "from": "human", "value": "(function (modFactory) {\n if (typeof module === 'object' && module.exports) {\n module.exports = modFactory(require('./scheme'), require('./parseScheme'));\n } else if (typeof define ...
javascript
chosen
[ { "from": "system", "value": "Load Symbol polyfill before any other code\n" }, { "from": "human", "value": "import 'regenerator-runtime/runtime';\nimport 'airbnb-js-shims';\n" }, { "from": "gpt", "value": "import 'regenerator-runtime/runtime';\nimport 'airbnb-js-shims';\nimport 'core...
javascript
chosen
[ { "from": "system", "value": "Add example 0 to build process.\n" }, { "from": "human", "value": "module.exports = {\n browserSync: {\n server: {\n // Serve up our build folder\n baseDir: './examples/dist'\n }\n },\n browserify: {\n // A separat...
javascript
chosen
[ { "from": "system", "value": "Use 340x260 For displaying the YouTube player.\n" }, { "from": "human", "value": "\nPostStreamLinkYoutube = {\n autoplay: 1,\n width: '400',\n height: '300',\n color: \"#FFFFFF\",\n\n play: function(video_key, id) {\n // remove any videos that are playing\n ...
javascript
chosen
[ { "from": "system", "value": "Update variable name for consistency.\n" }, { "from": "human", "value": "/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\nimport SiteKitRegistry from 'assets/js/googlesitekit/data';\n\nif ( typeof global.googlesitekit === 'undefined' ) {\n\t...
javascript
chosen
[ { "from": "system", "value": "Fix - Configuration is not displayed\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('<%=angularAppName%>')\n .config(function ($stateProvider) {\n $stateProvider\n .state('configuration', {\n parent: 'admin',\n...
javascript
chosen
[ { "from": "system", "value": "requireLineFeedAtFileEnd: Test to ensure IIFE case still reports\n\nRef #1568\n" }, { "from": "human", "value": "var Checker = require('../../../lib/checker');\nvar assert = require('assert');\n\ndescribe('rules/require-line-feed-at-file-end', function() {\n var ...
javascript
chosen
[ { "from": "system", "value": "Add missing semicolon to example to pass ESLint checks\n" }, { "from": "human", "value": "\"use strict\";\n\nvar bebop = require(\"../.\");\n\nvar drone = bebop.createClient();\n\ndrone.connect(function() {\n drone.GPSSettings.resetHome();\n drone.WifiSettings.out...
javascript
chosen
[ { "from": "system", "value": "Change port to 8080 to match with clevercloud requirement\n" }, { "from": "human", "value": "require('zone.js/dist/zone-node');\nrequire('reflect-metadata');\nconst express = require('express');\nconst fs = require('fs');\n\nconst { platformServer, renderModuleFacto...
javascript
chosen
[ { "from": "system", "value": "Set graphics parent for programmatically created shapes.\n" }, { "from": "human", "value": "/* -*- Mode: js; js-indent-level: 2; indent-tabs-mode: nil; tab-width: 2 -*- */\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\n/*\n * Copyright 2013 Mo...
javascript
chosen
[ { "from": "system", "value": "Add temporary signup callback to test styles\n" }, { "from": "human", "value": "import React, {Component} from \"react\";\nimport {\n View,\n Text\n} from \"react-native\";\n\nimport PageFrame from \"../components/PageFrame\";\nimport EventDetailView from \"../com...
javascript
chosen
[ { "from": "system", "value": "Add connect flash middleware setup\n" }, { "from": "human", "value": "var express = require('express');\nvar logger = require('morgan');\nvar bodyParser = require('body-parser');\nvar session = require('express-session'); // compatible stores at https://github.com/e...
javascript
chosen
[ { "from": "system", "value": "Add custom header for AJAX requests\n" }, { "from": "human", "value": "import config from '../../config';\n\nfunction formatUrl(path) {\n const adjustedPath = path[0] !== '/' ? '/' + path : path;\n const apiPath = `/api/${config.apiVersion}${adjustedPath}`;\n\n r...
javascript
chosen
[ { "from": "system", "value": "Remove global stream memoization to fix more tests\n\nMemoizing into a local variable doesn't work well the tests since\nthe tests mutate the value of the global. In theory we could\ndefine a test helper to work around this, but it doesn't seem\nlike its worth the effort since ...
javascript
chosen
[ { "from": "system", "value": "Change branchtitle reducer to have default key holding default values.\n" }, { "from": "human", "value": "const intialState = [\n { name: 'hotels', query: 'hotel' },\n { name: 'points of interest', query: 'point of interest' },\n { name: 'museums', query: 'museum...
javascript
chosen
[ { "from": "system", "value": "Add completion listeners earlier so we don't miss sync calls\n" }, { "from": "human", "value": "'use strict'\n\nimport MultiTask from 'chiffchaff-multi'\nimport PipeTask from 'chiffchaff-pipe'\nimport defaults from 'defaults'\nimport EventRegistry from 'event-regist...
javascript
chosen
[ { "from": "system", "value": "Add html title to guide list\n\nrefs #393\n" }, { "from": "human", "value": "/* globals MarkdownFilePaths: false */\n// MarkdownFilePaths are created in run.js and passed through webpack\n\nimport React from 'react';\nimport { Route, IndexRoute } from 'react-router'...
javascript
chosen
[ { "from": "system", "value": "Use black skybox for default web translator\n" }, { "from": "human", "value": "elation.require([], function() {\n elation.component.add('janusweb.translators.blank', function() {\n this.exec = function(args) {\n return new Promise(function(resolve, reject) ...
javascript
chosen
[ { "from": "system", "value": "Update index test case 1\n" }, { "from": "human", "value": "/**\n * util/core.spec.js\n *\n * @author Rock Hu <rockia@mac.com>\n * @license MIT\n */\n import Endpoints from '../../src/config/endpoints.json';\n import API from '../../src/config/api.json'...
javascript
chosen
[ { "from": "system", "value": "Remove the console.log from the user pub\n" }, { "from": "human", "value": "Meteor.publish('allPosts', function () {\n \"use strict\";\n var result = Posts.find({}, {\n limit: 50,\n fields: {\n oldChildren: false\n }\n });\n return result;\n});\n\n...
javascript
chosen
[ { "from": "system", "value": "Remove fancy quotations, thanks Gmail" }, { "from": "human", "value": "exports.TOKEN = ‘TOKEN HERE’;\nexports.SESSION_SECRET = ‘SESSION SECRET HERE’;\nexports.CLIENT_ID = ‘CLIENT ID HERE’;\nexports.CLIENT_SECRET = ‘CLIENT SECRET HERE’;\n" }, { "from": "gpt",...
javascript
chosen
[ { "from": "system", "value": "Use new constant file name\n" }, { "from": "human", "value": "import * as types from '../constants/ActionTypes'\n\nexport function selectKey(id) {\n return { type: types.SELECT_KEY, id }\n}\n\nexport function toggleCompose() {\n return { type: types.TOGGLE_COMPOSE...
javascript
chosen