conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Revert \"add migration from local to sync\"\n\nThis reverts commit 24a1c5968f55122846ddc53973a446bfb4696180.\n" }, { "from": "human", "value": "import QuoteBackground from './quote';\nimport followThread from './followThread';\nimport startCleanTracker from './follo...
javascript
chosen
[ { "from": "system", "value": "Add React to include JSX in schema\n" }, { "from": "human", "value": "let SERVICE_SCHEMA = {\n type: 'object',\n properties: {\n General: {\n description: 'Configure your container',\n type: 'object',\n properties: {\n id: {\n def...
javascript
chosen
[ { "from": "system", "value": "Fix calls to delete image files\n" }, { "from": "human", "value": "Contacts.allow(Server.allow.owner);\n\nContacts.after.remove(function (userId, doc) {\n Server.upload.delete(doc.imageFile);\n});\n\nContacts.before.update(function(userId, doc, fieldNames, modifier...
javascript
chosen
[ { "from": "system", "value": "Apply active class in navigation for `home` page\n" }, { "from": "human", "value": "var React = require(\"react\");\nimport { Link } from \"react-router\";\nvar { baseUrl } = require(\"../baseUrl\");\n\nclass Navigation extends React.Component {\n render () {\n ...
javascript
chosen
[ { "from": "system", "value": "[WEB-331] Use shorthand for hiding empty textline\n" }, { "from": "human", "value": "import React from 'react';\nimport classNames from 'classnames';\n\nexport default ({ variant, theme, image, headline, textline, children }) => {\n const className = classNames({\...
javascript
chosen
[ { "from": "system", "value": "Comment out invalid propset examples.\n" }, { "from": "human", "value": "/**\n * Created by zsolt on 3/23/14.\n */\n\nvar person = {\n firstName: 'Jimmy',\n lastName: 'Smith',\n get fullName() {\n return this.firstName + ' ' + this.lastName;\n }\n...
javascript
chosen
[ { "from": "system", "value": "Update path in interchange partial.\n" }, { "from": "human", "value": "angular.module('foundation.panel', ['foundation.common.services']);\n\nangular.module('foundation.panel')\n .directive('zfPanel', ['FoundationApi', function(foundationApi) {\n return {\n res...
javascript
chosen
[ { "from": "system", "value": "STYLE: Change order parameter for module couch-provider\n" }, { "from": "human", "value": "var request = require('request');\nvar _ = require('underscore');\nvar Promise = require('bluebird');\nvar Stream = require('stream');\nvar Boom = require('boom');\n\nmodule.e...
javascript
chosen
[ { "from": "system", "value": "Refactor deleteNode to use .remove() for Mongoose hook support\n" }, { "from": "human", "value": "var Node = require('./nodeModel.js'),\n handleError = require('../../util.js').handleError,\n handleQuery = require('../queryHandler.js');\n\nmodule.export...
javascript
chosen
[ { "from": "system", "value": "Comment out footer until we have actual content\n" }, { "from": "human", "value": "import React from 'react';\nimport * as auth from './auth.js';\nimport * as data from './data.js';\n\nimport Header from './header.js';\nimport Footer from './footer.js';\nimport Load...
javascript
chosen
[ { "from": "system", "value": "Update streaming message repository to deal with heart beats\n" }, { "from": "human", "value": "'use strict';\n\nvar glimpse = require('glimpse');\nvar polyfill = require('event-source')\n\nvar socket = (function() {\n var connection;\n\n var setup = function(...
javascript
chosen
[ { "from": "system", "value": "Set sample server to test it's working\n" }, { "from": "human", "value": "$(function () {\n 'use strict';\n\n var peer = new Peer({ key: 'evycxpu0zuissjor' });\n\n peer.on('open', function (id) {\n $('h1').html('Hi ' + id + ' :)');\n peer.conn...
javascript
chosen
[ { "from": "system", "value": "Add ctrlAddItem function. Change some comments\n" }, { "from": "human", "value": "/*\n * Developed by Radu Puspana\n * Date August 2017\n * Version 1.0\n */\n\n// module that handles the budget data using the module pattern\n// IFEE creates a new scope. IFEE creates...
javascript
chosen
[ { "from": "system", "value": "Format page sorter with Prettier\n" }, { "from": "human", "value": "Alchemy.PageSorter = function() {\n var $sortables = $('ul#sitemap').find('ul.level_1_children');\n\n $sortables.nestedSortable({\n disableNesting: 'no-nest',\n forcePlaceholderSize: true,\n...
javascript
chosen
[ { "from": "system", "value": "Use google's CDN for jQuery\n" }, { "from": "human", "value": "\"use strict\";\n\n(function () {\n\n /* CUSTOM BINDING HANDLERS */\n ko.bindingHandlers.slideVisible = {\n init : function (element) {\n jQuery(element).hide();\n },\n update : function ...
javascript
chosen
[ { "from": "system", "value": "Add auth reducer to root reducer\n" }, { "from": "human", "value": "import { combineReducers } from 'redux';\nimport runtime from './runtime';\nimport intl from './intl';\n\nexport default combineReducers({\n runtime,\n intl,\n});\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Allow overriding default system theme values\n" }, { "from": "human", "value": "function MtkLabel (settings) {\n MtkXaml.call (this, \"<TextBlock/>\", settings);\n \n this.MapProperties ([ \n [ \"Text\", \"QueueResize\" ], \n [ \"FontFamily\", \...
javascript
chosen
[ { "from": "system", "value": "Update default dates for statistic view\n" }, { "from": "human", "value": "angular.module('zoomableApp').controller('statisticController', function($scope, moment){\n // VARIABLES\n $scope.criteria = 'DAY'; // default set to day for date criteria\n $scope.startD...
javascript
chosen
[ { "from": "system", "value": "Fix \"bem create\" as worcker invocation\n" }, { "from": "human", "value": "'use strict';\n\nvar U = require('../../util');\n\n// NOTE: process.once() doesn't guarantee that process\n// will exit after receiving first message from master\n// (node bug prior to 0.10)...
javascript
chosen
[ { "from": "system", "value": "Remove fade effect for navbar\n" }, { "from": "human", "value": "/*!\n * Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)\n * Code licensed under the Apache License v2.0.\n * For details, see http://www.apache.org/licenses/LICENSE-2.0.\n */\n\...
javascript
chosen
[ { "from": "system", "value": "Remove button code and duplicate About link\n" }, { "from": "human", "value": "// counter starts at 0\nMeteor.subscribe('isslocation');\n\nSession.setDefault('counter', 0);\n\nTemplate.home.helpers({\n counter: function () {\n return Session.get('counter');\n }...
javascript
chosen
[ { "from": "system", "value": "Allow ajax in sandboxed iframes? yay!" }, { "from": "human", "value": ";(function() {\n\nnow.ready(function() {\n now.setUrl = function(url) {\n console.log('Loading url in iframe');\n $('#container').html(\n $('<iframe>', {sandbox: true, src: url})\n ...
javascript
chosen
[ { "from": "system", "value": "Fix typo in startup message\n" }, { "from": "human", "value": "var connect = require('connect');\n\nvar app = connect()\n .use(connect.logger())\n .use(connect.static('dist'));\n\nvar port = process.env.PORT || 5000;\napp.listen(port, function() {\n console.log(\...
javascript
chosen
[ { "from": "system", "value": "Add Laravel Shopify API wrapper." }, { "from": "human", "value": "// Opt-in repos (case sensitive)\n// These repositories are loaded this way as a convenience, not because Disco has any special priority in this list.\n// Opting these repositories in here reduces the...
javascript
chosen
[ { "from": "system", "value": "Make demo examples more realistic\n" }, { "from": "human", "value": "(function() {\n var runs = [\n {\n input: 'input1 input1 input1 input1 input1 input1 input1 input1',\n output: 'output1 output1 output1 output1 output1 output1 outpu...
javascript
chosen
[ { "from": "system", "value": "Add loading when videos are still loading\n" }, { "from": "human", "value": "import React from 'react';\n// import VideoListItem from './video_list_item';\n\nconst VideoDetail = ({video}) => {\n const videoId = video.id.videoId;\n const url = `https://www.youtube....
javascript
chosen
[ { "from": "system", "value": "Add npm config set scripts-prepend-node-path true in tests\n" }, { "from": "human", "value": "import child from \"child_process\";\nimport { oneLine } from \"common-tags\";\n\nexport default () => {\n\tchild.execSync(oneLine`\n\t\tgit init\n\t\t&& git config user.em...
javascript
chosen
[ { "from": "system", "value": "Allow mode to be changed\n" }, { "from": "human", "value": "import { applyOptionsMiddleware } from \"./../middleware\";\nimport setTemplate from \"./setTemplate\";\nimport setStyles from \"./setStyles\";\n\nexport default options => original => {\n const cb = origi...
javascript
chosen
[ { "from": "system", "value": "Add test for go to page\n\nAdd test for go to page" }, { "from": "human", "value": "(function() {\n 'use strict';\n describe('pagination directive', function() {\n var elementCompile,\n scope,\n directiveScope;\n\n beforeEach(\n ...
javascript
chosen
[ { "from": "system", "value": "Create route for student post to chat app\n" }, { "from": "human", "value": "var studentsController = require('../controllers/students');\nvar teachersController = require('../controllers/teachers');\nvar authenticationController = require('../controllers/authentica...
javascript
chosen
[ { "from": "system", "value": "Fix jest tests (jest in different platforms do not result the same log)\n" }, { "from": "human", "value": "'use strict';\n\nimport { runCommand, extendJasmineTimeout } from '../../../utils/helper-tests';\nimport { join } from 'path';\n\njest.unmock('../../../utils/h...
javascript
chosen
[ { "from": "system", "value": "Copy uploads from correct source\n" }, { "from": "human", "value": "var config = require('../src/config/config')\nvar client = require('mongodb').MongoClient\nvar fs = require('fs-extra')\n\nclient.connect(config.database.host+'vegodev', function(err, db){\n if (er...
javascript
chosen
[ { "from": "system", "value": "Use Pager.Item instead of PageItem.\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport {Pager} from 'react-bootstrap';\n\n\nconst Paging = ({pending, paging, onSelect}) => {\n let newer, older;\n\n if (!p...
javascript
chosen
[ { "from": "system", "value": "Change default mac exec to zsh\n" }, { "from": "human", "value": "/**\n * default setting\n */\n\nmodule.exports = exports.default = {\n hotkey: 'Control+2',\n sshReadyTimeout: 50000,\n scrollback: 3000,\n onStartSessions: [],\n fontSize: 16,\n fontFamily: 'mo...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect link for avatars in messages.\n" }, { "from": "human", "value": "angular.module('proxtop').controller('MessagesController', ['$scope', 'ipc', '$state', function($scope, ipc, $state) {\n ipc.on('conversations', function(conversations) {\n $sco...
javascript
chosen
[ { "from": "system", "value": "Add `no-var` rule to eslint config\n" }, { "from": "human", "value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"es2021\": true,\n \"node\": true\n },\n \"extends\": [\n \"eslint:recommended\",\n \"plugin:rea...
javascript
chosen
[ { "from": "system", "value": "Multiply rss parsed from ps on OSX by 1024 to convert to bytes" }, { "from": "human", "value": "var exec = require('child_process').exec;\n\nmodule.exports = function(sysinfo) {\n\n return new MacProvider(sysinfo);\n};\n\nfunction MacProvider(sysinfo) {\n\n th...
javascript
chosen
[ { "from": "system", "value": "Allow canary to fail without failing all tests\n" }, { "from": "human", "value": "/*jshint node:true*/\nmodule.exports = {\n scenarios: [\n {\n name: 'default',\n bower: {\n dependencies: { }\n }\n },\n {\n name: 'ember-1.13',\n ...
javascript
chosen
[ { "from": "system", "value": "Set limit for better sizing.\n\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from 'react';\nimport CakeChart from 'cake-chart';\n\nfunction findParentNode(node, child, parent = null) {\n if (node === child) return parent;\n for (let c o...
javascript
chosen
[ { "from": "system", "value": "Add rest of archetypes and clans\n" }, { "from": "human", "value": "export const archetypes = ['Architect', 'Artist', 'Bully']; // TODO\n\nexport const clans = ['Assamite', 'Brujah']; // TODO\n" }, { "from": "gpt", "value": "export const archetypes = [\n...
javascript
chosen
[ { "from": "system", "value": "Add plenty of link usability to motion card.\n" }, { "from": "human", "value": "import React from 'react';\nimport { Link } from 'react-router-dom';\n\nfunction voteValueDescription(value) {\n switch (value) {\n case 1:\n return 'kyllä';\n case 0:\n ret...
javascript
chosen
[ { "from": "system", "value": "Add Object.map util for easily mapping key/value pairs to an array\n" }, { "from": "human", "value": "import * as changeCase from 'change-case'\nimport pluralize from 'pluralize'\n\nexport default {\n\t...changeCase,\n\tpluralize,\n\tresourceize: function(string) {\...
javascript
chosen
[ { "from": "system", "value": "Handle \"enter\" key in the search box\n\nFix #35" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { sparqlConnect } from '../sparql/configure-sparql'\nimport { LOADING, LOADED, FAILED } from 'sparql-connect'\nimport { browserHistory...
javascript
chosen
[ { "from": "system", "value": "Add mesh platform names to particle list\n" }, { "from": "human", "value": "const platformsByName = {\n\tcore: 0,\n\tc: 0,\n\tphoton: 6,\n\tp: 6,\n\tp1: 8,\n\telectron: 10,\n\te: 10,\n\tduo: 88,\n\td: 88,\n\tbluz: 103,\n\tb: 103\n};\n\nconst platformsById = {\n\t0: ...
javascript
chosen
[ { "from": "system", "value": "Replace out of date library\n" }, { "from": "human", "value": "requirejs.config({\r\n paths: {\r\n 'text': '../lib/require/text',\r\n 'durandal':'../lib/durandal/js',\r\n 'plugins' : '../lib/durandal/js/plugins',\r\n 'transitions' : '....
javascript
chosen
[ { "from": "system", "value": "Fix case of directory to keys. Add another non-working, but not-failing test.\nYay TDD.\n" }, { "from": "human", "value": "var helper = require('./specHelper');\nvar tls = require('tls');\nvar fs = require('fs');\n\ndescribe('tls', function(){\n\n it( 'shou...
javascript
chosen
[ { "from": "system", "value": "Add documentation to JavaScript code\n" }, { "from": "human", "value": "function playAudio(keyCode) {\n let soundToPlay = document.querySelector(`audio[data-key=\"${keyCode}\"]`);\n let keyToAnimate = document.querySelector(`div[data-key=\"${keyCode}\"]`);\n ...
javascript
chosen
[ { "from": "system", "value": "Remove zero width joining thing\n" }, { "from": "human", "value": "const crypto = require('crypto');\n\nmodule.exports.alias = [\n\t'rate',\n\t'rank'\n];\n\nmodule.exports.command = function screenshot(message) {\n\tif (!message.input) return message.channel.createM...
javascript
chosen
[ { "from": "system", "value": "Remove intermediate variables since `require` will return the necessary objects." }, { "from": "human", "value": "var express = require('express');\nvar app = express();\n\n// Serve assets in /public\nvar path = require('path');\napp.use(express.static(path.join(__d...
javascript
chosen
[ { "from": "system", "value": "Enable preventChanges hook to delete fields containing dots." }, { "from": "human", "value": "\nconst existsByDot = require('../common/exists-by-dot');\nconst deleteByDot = require('../common/delete-by-dot');\nconst checkContext = require('./check-context');\nconst ...
javascript
chosen
[ { "from": "system", "value": "Load test 200MB per process\n" }, { "from": "human", "value": "'use strict';\n\nconst config = {};\n/**\n * Heroku makes it available to help calculate correct concurrency\n * @see https://devcenter.heroku.com/articles/node-concurrency#tuning-the-concurrency-level\n...
javascript
chosen
[ { "from": "system", "value": "Add cors to prevent cross origin issues\n" }, { "from": "human", "value": "require('dotenv').load();\nvar express = require('express'),\n jwt = require('jsonwebtoken');\n morgan = require('morgan'),\n bodyParser = require('body...
javascript
chosen
[ { "from": "system", "value": "Adjust help request to conform to new spec format.\n" }, { "from": "human", "value": "var http = require('http');\nvar r = require('request');\n\nvar config = require('./config.json');\n\n\nvar doneUrl;\nvar userUrl;\n\n\n\nhttp.createServer(function(request, respon...
javascript
chosen
[ { "from": "system", "value": "Improve the mapping for the image backend\n\nThe old mapping would have prevented the regular image pages from working later.\n\nRefs #78\n" }, { "from": "human", "value": "module.exports = {\n\t'lintOnSave': false,\n\n\tdevServer: {\n\t\t// Route requests to unknow...
javascript
chosen
[ { "from": "system", "value": "Add functions to create a new database and a collection\n" }, { "from": "human", "value": "var config = require(\"./config\");\nvar documentDbClient = require(\"documentdb\").DocumentClient;\n\nconsole.log(config.primaryKey);\nvar client = new documentDbClient(conf...
javascript
chosen
[ { "from": "system", "value": "Add a test for setting config value to false\n\nFixes #117\n" }, { "from": "human", "value": "import configure from './configure';\n\ndescribe(`configure()`, () => {\n test(`It is a function.`, () => {\n expect(typeof configure).toBe(`function`);\n });\n\n tes...
javascript
chosen
[ { "from": "system", "value": "Fix detection of request type in IE\n" }, { "from": "human", "value": "/*\n==================================================================================================\n\tLowland - JavaScript low level functions\n\tCopyright (C) 2012 Sebatian Fastner\n========...
javascript
chosen
[ { "from": "system", "value": "Fix test coverage being horribly useless\n" }, { "from": "human", "value": "var path = require('path');\nvar coffeeCoverage = require('coffee-coverage');\nvar projectRoot = path.normalize(__dirname);\nvar coverageVar = coffeeCoverage.findIstanbulVariable();\n// Only...
javascript
chosen
[ { "from": "system", "value": "Fix apply of async html modifiers\n" }, { "from": "human", "value": "var cheerio = require('cheerio');\nvar Promise = require('../../utils/promise');\n\n/**\n Apply a list of operations to a page and\n output the new page.\n\n @param {Page}\n @param {Lis...
javascript
chosen
[ { "from": "system", "value": "Remove plugins pagination and visibility included in bookshelf core\n" }, { "from": "human", "value": "import knexJs from 'knex';\nimport bookshelfJs from 'bookshelf';\n\nimport knexConfig from './knexfile';\n\n/**\n * Database connection.\n */\nconst knex = knexJs(...
javascript
chosen
[ { "from": "system", "value": "Make tests for class cluttering consistent\n\n* Remove the extra level of `describe`\n* use should to begin test names\n" }, { "from": "human", "value": "'use strict';\n\ndescribe('block class names', function() {\n it('should add language class name to block', fun...
javascript
chosen
[ { "from": "system", "value": "Remove submission route (is now handled by playback flow)\n" }, { "from": "human", "value": "import RecordFlow from '../RecordFlow';\nimport PlaybackFlow from '../PlaybackFlow';\nimport Submission from '../Submission';\n\nexport default {\n '/record/:roomId?/:hideH...
javascript
chosen
[ { "from": "system", "value": "Add secret key to the MD5 process\n" }, { "from": "human", "value": "const crypto = require('crypto');\n\nmodule.exports.alias = [\n\t'rate',\n\t'rank'\n];\n\nmodule.exports.command = function screenshot(message) {\n\tif (!message.input) return message.channel.creat...
javascript
chosen
[ { "from": "system", "value": "Make incorrect signup error more helpful\n" }, { "from": "human", "value": "angular.module('bolt.auth', [])\n\n.controller('AuthController', function ($scope, $window, $location, Auth) {\n $scope.user = {};\n\n $scope.signin = function () {\n Auth.signin($scope...
javascript
chosen
[ { "from": "system", "value": "Use chrome without sandbox (fixes CI).\n" }, { "from": "human", "value": "/* eslint-env node */\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: [\n 'Chrome'\n ],\n launch_in_dev: [\n 'Chrome'\n ],...
javascript
chosen
[ { "from": "system", "value": "Rearrange methods to follow route setup\n" }, { "from": "human", "value": "// global_config.js\n\nvar Parse = require('parse/node').Parse,\n PromiseRouter = require('./PromiseRouter');\n\nvar router = new PromiseRouter();\n\nfunction updateGlobalConfig(req) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add very simple polyfill of `Array.from`\n" }, { "from": "human", "value": "/**\n * Copyright 2015 Vivliostyle Inc.\n * @fileoverview Utilities\n */\ngoog.provide(\"vivliostyle.util\");\n\n(function() {\n if (!Object.assign) {\n /**\n * Very simple...
javascript
chosen
[ { "from": "system", "value": "Handle unknown gene in dense matrix.\n" }, { "from": "human", "value": "'use strict';\n\nvar multi = require('./multi');\nvar parsePos = require('./parsePos');\n\nvar fieldTypeSelector = x => x.fieldType;\nvar columnFieldTypeSelector = x => x.column.fieldType;\nvar ...
javascript
chosen
[ { "from": "system", "value": "Update js to set also time (not just date)\n" }, { "from": "human", "value": "function getDatePicker() {\n var languageUA = {\n days: ['Неділя','Понеділок','Вівторок','Середа','Четвер','Пятниця','Субота'],\n daysShort: ['Нед','Пон','Вів','Сер','Чет'...
javascript
chosen
[ { "from": "system", "value": "Fix js bug for heroku\n" }, { "from": "human", "value": "var map;\nfunction initMap() {\n map = new google.maps.Map(document.getElementById('map'), {\n center: centerFinder(),\n zoom: 12\n });\n\n window.placesInfo.forEach(function(location_obj){\n retur...
javascript
chosen
[ { "from": "system", "value": "Hide the button after adding the page\n" }, { "from": "human", "value": "$('#likes').click(function() {\n var catid;\n catid = $(this).attr('data-catid');\n $.get('/rango/like_category/', {category_id: catid}, function(data) {\n $('#like_count').html(data);\n ...
javascript
chosen
[ { "from": "system", "value": "Fix test failure on Material UI\n" }, { "from": "human", "value": "'use strict';\n\nlet mock = jest.genMockFromModule('inline-style-prefixer');\n\nmodule.exports = mock;\n" }, { "from": "gpt", "value": "'use strict';\n\nlet mock = jest.genMockFromModule(...
javascript
chosen
[ { "from": "system", "value": "Add new engagement to household only if one not created\n" }, { "from": "human", "value": "export default (state = [], action) => {\n switch (action.type) {\n case \"FETCH_HOUSEHOLDS_SUCCESS\": {\n return action.households\n }\n case \"ADD_HOUSEHOLD_S...
javascript
chosen
[ { "from": "system", "value": "Edit model associations using new syntax\n" }, { "from": "human", "value": "module.exports = (sequelize, DataTypes) => {\n const Message = sequelize.define('Message', {\n content: DataTypes.STRING,\n userId: DataTypes.INTEGER,\n groupId: DataTypes.INTEGER\...
javascript
chosen
[ { "from": "system", "value": "Add icons to subreddit list\n" }, { "from": "human", "value": "import React from 'react';\nimport { List, ListItem } from 'material-ui';\nimport { BaseViewComponent } from '../wrappers/index.js';\n\nclass RedditSubreddits extends BaseViewComponent {\n constructor(p...
javascript
chosen
[ { "from": "system", "value": "Read info.json files into master run list\n" }, { "from": "human", "value": "var fs = require('fs');\n\nvar jobs = [];\n\nfs.readdirSync('runs').forEach(function(run_id) {\n var job = {}\n job.run_id = run_id;\n job.tasks = fs.readdirSync('runs/'+run_id);\n var ...
javascript
chosen
[ { "from": "system", "value": "Fix test involving character class range\n\nThanks to @anba for spotting this: https://github.com/tc39/test262/pull/1014/files/4843f049fafb6cdd61e3be011e3701cc94a9fe46#r116528031\n" }, { "from": "human", "value": "// Copyright 2017 Mathias Bynens. All rights reserve...
javascript
chosen
[ { "from": "system", "value": "Fix - key error on post\n" }, { "from": "human", "value": "var React = require(\"react\");\nvar { Link } = require(\"react-router\");\n\nclass Post extends React.Component {\n render () {\n var {\n post : {\n title: title,\n content: content,\...
javascript
chosen
[ { "from": "system", "value": "Fix for memory leak due to closing the web view too early.\n" }, { "from": "human", "value": "var globals = require('lib/globals');\nexports.staticPageWindow = function(opts) {\n var instance = Ti.UI.createWindow({\n title: opts.title,\n backgroundColor: '#ee...
javascript
chosen
[ { "from": "system", "value": "Fix generated css when auto is selected\n\n" }, { "from": "human", "value": "// getters are functions\nimport * as utils from '../utils'\n\nexport const areas = state => {\n return state.areas\n}\nexport const rows = state => {\n return state.rows\n}\nexport const...
javascript
chosen
[ { "from": "system", "value": "Fix listener bug in form-selector\n\nThe text is not updated when a second form is selected in the old\nversion.\n" }, { "from": "human", "value": "\"use strict\";\n\nannotationApp.directive('formSelector', function() {\n return {\n restrict: 'E',\n replace: ...
javascript
chosen
[ { "from": "system", "value": "Use child image in header image component" }, { "from": "human", "value": "import React from 'react';\n \nclass HeaderImg extends React.Component {\n render() {\n return (\n <div className=\"header-img\">\n <img className=\"imgix-fluid\" data-src=\"/...
javascript
chosen
[ { "from": "system", "value": "Rename config to req to avoid confusion\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('offlineMode', [])\n\t.config(function ($httpProvider) {\n\t\t$httpProvider.interceptors.push('httpInterceptor');\n\t})\n\t.factory('httpInterceptor', function...
javascript
chosen
[ { "from": "system", "value": "Fix issue with NpcStats with methods being static.\n" }, { "from": "human", "value": "'use strict';\n\nvar NPC_DATA = {\n ATK_SPEED: 14,\n ATK_DISTANCE: 26\n};\n\nfunction NpcStats(npcObj) {\n this.object = npcObj;\n\n var npcList = GDM.getNow('list_npc');\n th...
javascript
chosen
[ { "from": "system", "value": "Implement tests to check if functions exist\n" }, { "from": "human", "value": "describe('Services', function() {\n // Import the corresponding module\n beforeEach(module('foodfood'));\n\n describe('RestaurantAndRoute factory')\n var $httpBackend, Links;\n\n b...
javascript
chosen
[ { "from": "system", "value": "DevTools: Add tooltip hint about overrides\n\nChange-Id: If85c60d7f52cdc0a3acc8addf9d7e1995195295b\nReviewed-on: https://chromium-review.googlesource.com/1046106\nReviewed-by: Pavel Feldman <e1161d7019a0d5c7981e3c3ffc69c76f4b09679a@chromium.org>\nCommit-Queue: Paul Irish <5f672...
javascript
chosen
[ { "from": "system", "value": "Fix modals by making spinner_options accessible\n\nThis patch makes the spinner_options variable accessible to the modal functions\nagain.\n\nChange-Id: I84b6c7e5813d5818b18675e385214feda178c482\nCloses-Bug: 1459115\n" }, { "from": "human", "value": "/*global angula...
javascript
chosen
[ { "from": "system", "value": "Return true if after iterating through and conditions are satisfied\n" }, { "from": "human", "value": "// Check if two strings are isomorphic\n\nfunction isIsomorphic(stringOne, stringTwo) {\n\t\n\t// check if strings are of the same length (if not, cannot be isomor...
javascript
chosen
[ { "from": "system", "value": "Fix findRoot functions for git mode\n" }, { "from": "human", "value": "'use strict';\n\nvar partial = require('es5-ext/lib/Function/prototype/partial')\n , isGitrepoRoot = require('./is-gitrepo-root')\n , findRoot = require('./find-root')\n\nmodule.expo...
javascript
chosen
[ { "from": "system", "value": "Support fabrik internal services with the postfix\n\nThe fabrik internal services have the postfix -fabrik-internal\n" }, { "from": "human", "value": "'use strict';\n\nconst _ = require('lodash');\nconst config = require('../config');\nconst errors = require('../err...
javascript
chosen
[ { "from": "system", "value": "Upgrade to new Mongoose URL parser\n" }, { "from": "human", "value": "// This script connects the app to the database\n\n// Load external dependencies\nvar mongoose = require('mongoose')\n\n// Load internal modules\nvar config = require('./config.js')\n\n// Connect ...
javascript
chosen
[ { "from": "system", "value": "Fix bug with date format minutes\n\nAdd leading zero.\n" }, { "from": "human", "value": "(function() {\n\tvar d = new Date();\n\tvar date_string = \n\t\td.getFullYear() \n\t\t+ '' \n\t\t+ ('0' + (d.getMonth() + 1)).slice(-2) \n\t\t+ '' \n\t\t+ ('0' + d.getDate()).sl...
javascript
chosen
[ { "from": "system", "value": ":shirt: Resolve 'unnecessary escape character' violations\n\nResolves the following linter violations:\n\n lib/toggle-markdown-task.js:43:31: Unnecessary escape character: \\-.\n lib/toggle-markdown-task.js:43:33: Unnecessary escape character: \\*.\n lib/toggle-markdown-task...
javascript
chosen
[ { "from": "system", "value": "Change the background, and default style\n" }, { "from": "human", "value": "require('script!3Dmol/release/3Dmol.js');\nrequire('style/3dmol.styl');\n\nangular.module('chemPhyWebApp')\n .directive('chemPhyWeb3dmol', ['$http', '$log', function($http, $log) {\n\n ...
javascript
chosen
[ { "from": "human", "value": "Initialize event emitter and add ability to register event handlers.\n" }, { "from": "gpt", "value": "\"use strict\";\n\nvar EventEmitter = require('events').EventEmitter;\nvar util = require('util');\n\nfunction AlexaRequestEmitter() {\n EventEmitter.call(this);\...
javascript
chosen
[ { "from": "system", "value": "Remove redundant import of def/babel-core.js (included by def/babel.js).\n" }, { "from": "human", "value": "module.exports = require('./fork')([\n // This core module of AST types captures ES5 as it is parsed today by\n // git://github.com/ariya/esprima.git#master...
javascript
chosen
[ { "from": "system", "value": "Change Elron max time to 10min\n" }, { "from": "human", "value": "const got = require('got');\n\nconst cache = require('../utils/cache.js');\nconst time = require('../utils/time.js');\n\n// Get trips for stop.\nasync function getTrips(id) {\n\t\n\tconst now = time.g...
javascript
chosen
[ { "from": "system", "value": "Fix processJSON() and add comments\n" }, { "from": "human", "value": "\nmodule.exports = function processJSON (object) {\n // Temporary patch for bug with nested maps in Alpaca.\n // See https://github.com/gitana/alpaca/issues/444\n if (object.paths === undefined...
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 fs = require(\"fs\");\nvar path = require(\"path\");\n\ndescribe(\"Scenarios\", function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix file path to the cloud-config template\n" }, { "from": "human", "value": "// Copyright (c) 2014 The Virtual Vulcano authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that\n// can be found in the LICENSE.md file.\n\n'use...
javascript
chosen