conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Create SVG containing a rectangle\nas SVG is performance wise the best option for animation\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\n\nclass LoadingBar extends PureComponent {\n render() {\n return null;\n }\n}\n\nexport...
javascript
chosen
[ { "from": "system", "value": "Add some fields to local file header" }, { "from": "human", "value": "define(function() {\n\n 'use strict';\n \n function open(item) {\n console.log(item);\n }\n \n return open;\n\n});\n" }, { "from": "gpt", "value": "define(['msdos/util'], func...
javascript
chosen
[ { "from": "system", "value": "Fix search action snippet layout\n\n\"Selected '...'\" text was behind the button as both were centered\nhorizontally and vertically on the screen. Wrap them in a centered\ncontainer instead.\n\nChange-Id: I71ee80f5b7ba00cdb3cbf279c8fd1a413746ef28\n" }, { "from": "human...
javascript
chosen
[ { "from": "system", "value": "Add section notes form to interims manager\n" }, { "from": "human", "value": "Ext.define('SlateAdmin.view.progress.interims.Manager', {\n extend: 'Ext.Container',\n xtype: 'progress-interims-manager',\n requires: [\n 'SlateAdmin.view.progress.interim...
javascript
chosen
[ { "from": "system", "value": "Add failing test case regarding input.value($Element)\n" }, { "from": "human", "value": "describe(\"value\", function() {\n \"use strict\";\n\n var div, input;\n\n beforeEach(function() {\n div = DOM.create(\"div>a+a\");\n input = DOM.create(\"input[value=f...
javascript
chosen
[ { "from": "system", "value": "Use pipe instead util.pump for file streaming\n" }, { "from": "human", "value": "// Copy file\n// Credit: Isaac Schlueter\n// http://groups.google.com/group/nodejs/msg/ef4de0b516f7d5b8\n\n'use strict';\n\nvar util = require('util')\n , fs = require('fs');\n\nmodu...
javascript
chosen
[ { "from": "system", "value": "Check for process before accessing" }, { "from": "human", "value": "var defaultEncoding\n/* istanbul ignore next */\nif (process.browser) {\n defaultEncoding = 'utf-8'\n} else if (process.version) {\n var pVersionMajor = parseInt(process.version.split('.')[0].slic...
javascript
chosen
[ { "from": "system", "value": "Use port 6337 for the test redis server\n" }, { "from": "human", "value": "var _ = require('underscore');\n\nmodule.exports = function(opts) {\n\n var config = {\n redis_pool: {\n max: 10, \n idleTimeoutMillis: 1, \n reapIn...
javascript
chosen
[ { "from": "system", "value": "Rename the Facebook service to userService\n\nSigned-off-by: Henrique Vicente <d390f26e2f50ad5716a9c69c58de1f5df9730e3b@gmail.com>\n" }, { "from": "human", "value": "/*global angular */\n/*jslint browser: true */\n(function () {\n 'use strict';\n\n var app;\n\...
javascript
chosen
[ { "from": "system", "value": "Fix mistake where not adding github info when needed\n" }, { "from": "human", "value": "//TODO setup deploySettings.json\nMeteor.startup(function () {\n var githubServiceSetup = Accounts.loginServiceConfiguration.find({service: \"github\"}).count() === 1;\n if...
javascript
chosen
[ { "from": "system", "value": "Add API and frontend routes\n" }, { "from": "human", "value": "var proxy = require('redbird')({port: 8080});\n\nproxy.register('localhost/event/api/user', \"http://localhost:3001/user\");" }, { "from": "gpt", "value": "var proxy = require('redbird')({por...
javascript
chosen
[ { "from": "system", "value": "Fix inline source maps in meteor/tools code.\n" }, { "from": "human", "value": "// This file exists because it is the file in the tool that is not automatically\n// transpiled by Babel\n\n\"use strict\";\n\nfunction babelRegister() {\n const meteorBabel = require(\...
javascript
chosen
[ { "from": "system", "value": "Add actions to start vs computer\n\nChange onClick action handlers for buttons\n" }, { "from": "human", "value": "import React from \"react\";\n\nimport Container from \"./Container.js\";\nimport Button from \"./../Shared/Button.js\";\n\nimport setCurrentScreenActio...
javascript
chosen
[ { "from": "system", "value": "Set interval to 5 seconds instead of 10\n" }, { "from": "human", "value": "\"use strict\";\n\nlet https = require('https');\n\n\nlet keys = require(\"./secretKeys.js\");\n\nexports.init = function (mainCallback) {\n\n\tlet options = {\n\t\thost: \"api.carriots.com\"...
javascript
chosen
[ { "from": "system", "value": "Use native Promise instead of $q\n" }, { "from": "human", "value": "/* global angular, require */\n\nimport 'ionic-sdk/release/js/ionic.bundle';\nimport platformInfo from './platform-info.js';\n\nangular.module('app.service.ledger-nano', [])\n.factory('LedgerNano', ...
javascript
chosen
[ { "from": "system", "value": "Increase contrast and color variation.\n" }, { "from": "human", "value": "export default {\n 'CORE - METRORAIL': 'red',\n 'CORE - METRORAPID': '#f24d6e',\n 'CORE - LIMITED': '#649dce',\n 'CORE - RADIAL': '#5190c8',\n 'CORE - FEEDER': '#3d84c2',\n 'CORE - EXPRE...
javascript
chosen
[ { "from": "system", "value": "Patch GOVUK.Analytics to add 'allowLinker' option\n\nThe GOVUK.Analytics interface doesn't set the\n'allowLinker' option when creating a ga tracker.\n\nIn order to preserve a vendor-agnostic\ninterface it also doesn't allow this to be sent\nthrough when creating a new GOVUK.Ana...
javascript
chosen
[ { "from": "system", "value": "Change the URL of Facebook Like\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('angularjsRundownApp')\n .factory('facebookApi', ['$q', 'facebookAppId', function($q, facebookAppId) {\n // Public API here\n return {\n favoriteMovie: fun...
javascript
chosen
[ { "from": "system", "value": "Add navigation test after clicking.\n" }, { "from": "human", "value": "import ghost from 'ghostjs'\nimport assert from 'assert'\n\nimport localServer from './fixtures/server.js'\n\ndescribe('Navigation', () => {\n\n localServer()\n\n it('navigates', async () => {\...
javascript
chosen
[ { "from": "system", "value": "Implement enabling/disabling an option in OptionsDisplayTableRow\n" }, { "from": "human", "value": "import m from 'mithril';\n\nexport const OptionsDisplayTableHeader = () => ({\n view() {\n return m('thead', [\n m('tr', [\n m('th', 'Name'),\n ...
javascript
chosen
[ { "from": "system", "value": "Fix data being blown away on profile screen when fetching projects\n\nfbshipit-source-id: 1aeab38\n" }, { "from": "human", "value": "import gql from 'graphql-tag';\nimport { graphql } from 'react-apollo';\n\nimport Profile from '../components/Profile';\n\nconst ownP...
javascript
chosen
[ { "from": "system", "value": "Fix for possible deref of cleaned up source component\n\n@rev dwidjaja@" }, { "from": "human", "value": "/*\n * Copyright (C) 2012 salesforce.com, inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in ...
javascript
chosen
[ { "from": "system", "value": "Add getAllLikedRecipes method, to get all liked recipes for a single user\n" }, { "from": "human", "value": "import { postgresConnection as cn } from '../../config/helpers.js';\nconst pgp = require('pg-promise')();\nconst db = pgp(cn);\n" }, { "from": "gpt",...
javascript
chosen
[ { "from": "system", "value": "Add database port in the config file.\n" }, { "from": "human", "value": "var Sequelize = require('sequelize');\nvar sequelize = new Sequelize('c-far', 'root', '123456@', {\n host: '192.168.99.100',\n dialect: 'mysql',\n\n pool: {\n max: 5,\n min: 0,\n id...
javascript
chosen
[ { "from": "system", "value": "Use docker connect env vars\n" }, { "from": "human", "value": "'use strict';\n\nvar fs = require('fs');\nvar crypto = require('crypto');\n\nmodule.exports = {\n\troot: '',\n\tdb: {\n\t\thost: 'localhost',\n\t\tdb: 'gandhi'\n\t},\n\tpool: {\n\t\tmax: 1,\n\t\tmin: 1,\...
javascript
chosen
[ { "from": "system", "value": "Use `app.bowerDirectory` instead of hardcoded `bower_components`\n" }, { "from": "human", "value": "/* jshint node: true */\n/* global require, module */\n\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nvar app = new EmberAddon();\n\n// Use `app...
javascript
chosen
[ { "from": "system", "value": "Add global to export config\n" }, { "from": "human", "value": "var global = {\n domain: 'http://subdomain.yourdomain.com/',\n secretUrlSuffix: 'putSomeAlphanumericSecretCharsHere'\n};\n\nvar projects = [\n {\n repo: {\n owner: 'yourbitbucketusername',\n ...
javascript
chosen
[ { "from": "system", "value": "Remove console.log that we use for debugging\n" }, { "from": "human", "value": "/* eslint-env jquery */\n\nstart();\nfunction start () {\n 'use strict';\n\n $(document).ready(() => {\n $('form').submit(event => {\n event.preventDefault();\n const user...
javascript
chosen
[ { "from": "system", "value": "Revert \"Only ask for public privileges\"\n\nThis reverts commit 47b95cb58a00364fd3146c10e12ba4b93ed45f60.\n" }, { "from": "human", "value": "import * as ACTION_TYPES from '../constants/action_types'\n\nfunction extractToken(hash, oldToken) {\n const match = hash.m...
javascript
chosen
[ { "from": "system", "value": "Set user's activity tracking on tab events\n\nUpdate user's activity tracking on any tab opening or closing.\n" }, { "from": "human", "value": "import log from \"../../shared/library/log.js\";\nimport { dispatch } from \"../redux/index.js\";\nimport { setAuthToken }...
javascript
chosen
[ { "from": "system", "value": "Fix CORS behavior to not freeze\n" }, { "from": "human", "value": "// Importing Node modules and initializing Express\nconst express = require('express'),\n app = express(),\n bodyParser = require('body-parser'),\n logger = require('morgan'),\n mongoose ...
javascript
chosen
[ { "from": "system", "value": "Replace missing '/' for path\n" }, { "from": "human", "value": "const router = require('express').Router()\n\nconst { allPermissionsOr403 } = require('../../../../middleware/conditionals')\nconst { submit, renderAdvisers, form } = require('./controllers/advisers')\n...
javascript
chosen
[ { "from": "system", "value": "Add .se using redirect if neccessary\n" }, { "from": "human", "value": "const router = require('express').Router();\n\nrouter.get('/*', (req, res, next) => {\n const seFree = require('se-free'),\n domainName = parseDomainFromUrlPath(req.originalUrl),\n ...
javascript
chosen
[ { "from": "human", "value": "Create initial color & horse arrays\n" }, { "from": "gpt", "value": "var colors = [\"red\", \"blue\", \"magenta\", \"yellow\"]\nvar names = [\"Dan\", \"Dave\", \"Eleanor\", \"Rupert\"]\n\ncolors.push(\"green\")\nnames.push(\"Nathaniel\")" } ]
javascript
chosen
[ { "from": "system", "value": "Fix issue with wrong features format in .yo-rc file\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash');\n\nmodule.exports = function (answers) {\n this.prompts = {};\n this.prompts.projectName = answers.projectName;...
javascript
chosen
[ { "from": "system", "value": "Fix ancien appel de fonction\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar _ = require('lodash');\n\nvar AcceptanceTestExecution = mongoose.model('AcceptanceTestExecution');\n\nexports.list = function(req, res, next) {\n AcceptanceTe...
javascript
chosen
[ { "from": "system", "value": "Add NPM version as a global variable\n" }, { "from": "human", "value": "module.exports.globals = {\n proxy: process.env.PROXY_URL || 'http://localhost:4200',\n proxyEnabled: process.env.PROXY_ENABLED === undefined ? false : process.env.PROXY_ENABLED === 'true',\n\...
javascript
chosen
[ { "from": "system", "value": "Change endpoint + include pattern\n\nhappo.io is now working.\n\nI've decided to use `-happo.js*` as the file naming format instead of\n-snaps.\n" }, { "from": "human", "value": "import reactDOMRunner from './reactDOMRunner';\n\nexport const endpoint = 'https://happ...
javascript
chosen
[ { "from": "system", "value": "Fix async vendor lib AMD path\n" }, { "from": "human", "value": "require.config({\n baseUrl: '../src',\n\n paths: {\n // Vendor libraries\n async: '../bower_components/requirejs-plugins/async',\n sinon: '../bower_components/sinon/index',\n jasmine: '.....
javascript
chosen
[ { "from": "system", "value": "Change value in \"should assert equality with ===\" block\n" }, { "from": "human", "value": "describe(\"About Expects\", function() {\n\n //We shall contemplate truth by testing reality, via spec expectations. \n it(\"should expect true\", function() {\n expec...
javascript
chosen
[ { "from": "system", "value": "Use 24h based datepicket and prevent dates in the past\n" }, { "from": "human", "value": "$(function() {\n // apply datetimepicker initialization\n $('.datetimepicker').datetimepicker({\n sideBySide: true, // show the time picker and date picker at the same tim...
javascript
chosen
[ { "from": "system", "value": "Load a copy of a note into the form, rather than the actual object from the array.\n" }, { "from": "human", "value": "angular.module('notely')\n .service('NotesService', NotesService);\n\n// NotesService\n// Handle CRUD operations against the server.\nNotesService....
javascript
chosen
[ { "from": "system", "value": "Initialize log using `name` and `version`\n" }, { "from": "human", "value": "import { initLog } from 'roc';\nimport Dredd from 'dredd';\n\nconst log = initLog();\n\nexport default ({ context: { config: { settings } } }) => () => {\n const port = process.env.PORT ...
javascript
chosen
[ { "from": "system", "value": "Fix hometask disabled for admin\n" }, { "from": "human", "value": "angular\n .module('app')\n .controller('LessonModalController', LessonModalController);\n\nfunction LessonModalController(self, $mdDialog, lesson, AuthService) {\n if (lesson && lesson.start...
javascript
chosen
[ { "from": "system", "value": "Hide the flippin' status bar on android\n" }, { "from": "human", "value": "import React from 'react';\nimport { StyleSheet, Text, View, TextInput, Button } from 'react-native';\nimport { SearchBar } from 'react-native-elements'\n\nexport let SEARCH_QUERY = ''\nconst...
javascript
chosen
[ { "from": "system", "value": "Return a proper relative path\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nexports.command = {\n description: 'resolve a path to a project',\n arguments: '<path>'\n};\n\nif (require.main !== module) {\n return;\n}\n\nvar path = require('path');\nvar ...
javascript
chosen
[ { "from": "system", "value": "Add example but this is failed.\n" }, { "from": "human", "value": "import Board from '../../../../frontend/src/shogi/board';\nimport Piece from '../../../../frontend/src/shogi/piece';\nimport memo from 'memo-is';\nimport _ from 'lodash';\n\ndescribe('black', () => {...
javascript
chosen
[ { "from": "system", "value": "Check type of options more carefully\n" }, { "from": "human", "value": "module.exports = ({types: t}) => {\n return {\n pre(file) {\n const opts = this.opts;\n if (\n !(\n opts &&\n typeof opts === 'object' &&\n Object...
javascript
chosen
[ { "from": "system", "value": "Make the port overridable from the environment\n" }, { "from": "human", "value": "const express = require('express');\nconst bodyParser = require('body-parser');\nconst morgan = require('morgan');\n\nconst logger = require('./logger');\nconst streamClient = require(...
javascript
chosen
[ { "from": "system", "value": "Update to new Cervus API\n" }, { "from": "human", "value": "import { Game } from 'cervus/modules/core'; \nimport { Plane, Box } from 'cervus/modules/shapes';\nimport { basic } from 'cervus/modules/materials';\n\nconst game = new Game({\n width: window.innerWidth,\n...
javascript
chosen
[ { "from": "system", "value": "Fix plugin scaling when player size is set in percents or player is resized at runtime\n" }, { "from": "human", "value": "\nimport {Video} from 'kaleidoscopejs';\nimport {ContainerPlugin} from 'clappr';\n\nexport default class Video360 extends ContainerPlugin {\n c...
javascript
chosen
[ { "from": "system", "value": "Comment unwanted but relevant modules\n" }, { "from": "human", "value": "// @flow\n\nimport 'source-map-support/register';\nimport 'babel-polyfill';\nimport 'colors';\n// import async from 'async';\n// import _ from 'lodash';\nimport console from 'better-console';\n...
javascript
chosen
[ { "from": "system", "value": "Add test for extend option\n" }, { "from": "human", "value": "module.exports = {\n router: {\n base: '/test/'\n },\n cache: true,\n plugins: ['~plugins/test.js'],\n loading: '~components/loading',\n env: {\n bool: true,\n num: 23,\n string: 'Nuxt.j...
javascript
chosen
[ { "from": "system", "value": "Add simple youtube api call\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport SearchBar from './components/search_bar'\n\nconst API_KEY = 'AIzaSyBKBu77HCUT6I3oZiFXlaIdou8S_3voo5E';\n\nconst App = () => {\n re...
javascript
chosen
[ { "from": "system", "value": "Add checks for currentTarget defined\n" }, { "from": "human", "value": "module.exports = function (creep) {\n\t// Aquire target\n\tif(creep.memory.currentTarget.ticksToRegeneration === undefined || !creep.memory.currentTarget.energy || !creep.memory.movement.path.le...
javascript
chosen
[ { "from": "system", "value": "Load Metadata and Utils in node\n" }, { "from": "human", "value": "'use strict';\n\n(function () {\n var Peeracle = {};\n Peeracle.Media = require('./media');\n Peeracle.Peer = require('./peer');\n Peeracle.Tracker = require('./tracker');\n module.exports = Pee...
javascript
chosen
[ { "from": "system", "value": "[Chore] Remove unneccessary paren in flag review statement\n" }, { "from": "human", "value": "const reviews = (state=[], action) => {\n switch (action.type) {\n case 'ADD_REVIEW':\n return [\n ...state, { \n id: action.id,\n reviewer: actio...
javascript
chosen
[ { "from": "system", "value": "Fix title rendering in redux example\n" }, { "from": "human", "value": "/* @flow */\nimport React from 'react';\nimport { Route, IndexRoute } from 'react-router';\n\nimport { App, NotFound } from './components/App.js';\nimport Home, { Who, How } from './components/P...
javascript
chosen
[ { "from": "system", "value": "Fix issue with old express usage\n" }, { "from": "human", "value": "//var http = require('http');\nvar express = require('express');\n\nvar app = module.exports = express();\n\n/*http.createServer(function (req, res) {\n res.writeHead(200, {'Content-Type': 'text/...
javascript
chosen
[ { "from": "system", "value": "Remove extra debug lines in item test\n" }, { "from": "human", "value": "describe(\"Zotero.Item\", function() {\n\tdescribe(\"#getField()\", function () {\n\t\tit(\"should return false for valid unset fields on unsaved items\", function* () {\n\t\t\tvar item = new Z...
javascript
chosen
[ { "from": "system", "value": "Add user helpers to test service\n" }, { "from": "human", "value": "'use strict';\n\nclass TwitterService {\n // House Keeping of our connection/server\n constructor() {\n this.server = undefined;\n }\n\n start(done) {\n require('../server').then((server) ...
javascript
chosen
[ { "from": "system", "value": "Add support for new @mention command syntax\n" }, { "from": "human", "value": "/* Require modules */\n\nvar nodeTelegramBot = require('node-telegram-bot')\n , config = require('./config.json')\n , request = require(\"request\")\n , cheerio = require(\"cheer...
javascript
chosen
[ { "from": "system", "value": "Add license header for MPL 2.0\n" }, { "from": "human", "value": "var BASE = 'extensions.auto-confirm@myokoym.net.';\nvar prefs = require('lib/prefs').prefs;\n\nfunction log(message) {\n if (prefs.getPref(BASE + 'debug')) {\n console.log(\"auto-confirm: \" + mes...
javascript
chosen
[ { "from": "system", "value": "Add UMD dist file building\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar stylish = require('jshint-stylish');\nvar mocha = require('gulp-mocha');\n\ngulp.task('lint', function() {\n gulp.src(['src/**/*.j...
javascript
chosen
[ { "from": "system", "value": "Revert \"Prepare branch for section 2.4 tutorial\"\n\nThis reverts commit 169e11232511209548673dd769a9c6f71d9b8498.\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\nvar JsonDB = require('node-json-db');\nvar _ = r...
javascript
chosen
[ { "from": "system", "value": "Add \"forDOM\" var when rendering for DOM\n" }, { "from": "human", "value": "var getDefaultHistory = require('./history/getHistory');\n\n\n/**\n * Bootstraps the app by getting the initial state.\n */\nfunction attach(Router, element, opts) {\n if (!opts) opts = {}...
javascript
chosen
[ { "from": "system", "value": "Fix gulp server root (for some reason started defaulting to dist)\n" }, { "from": "human", "value": "/**\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can...
javascript
chosen
[ { "from": "system", "value": "Update maxBuffer limit to 100Mib" }, { "from": "human", "value": "#!/usr/bin/env node\n/*\n *\n * Copyright 2015 gRPC authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Licen...
javascript
chosen
[ { "from": "system", "value": "Change error message when caching fails\n\nsee also: http://stackoverflow.com/questions/27722349/less-js-error-msg-failed-to-save/27750286" }, { "from": "human", "value": "// Cache system is a bit outdated and could do with work\n\nmodule.exports = function(window, ...
javascript
chosen
[ { "from": "system", "value": "Clean up figlet font loading for node\n" }, { "from": "human", "value": "/**\n * Figlet JS node.js module\n * \n * Copyright (c) 2010 Scott González\n * Dual licensed under the MIT (MIT-LICENSE.txt)\n * and GPL (GPL-LICENSE.txt) licenses.\n * \n * http://github.com/...
javascript
chosen
[ { "from": "system", "value": "Sort allocation tables by modify index\n" }, { "from": "human", "value": "import Controller from '@ember/controller';\n\nexport default Controller.extend({\n actions: {\n gotoAllocation(allocation) {\n this.transitionToRoute('allocations.allocation', alloca...
javascript
chosen
[ { "from": "system", "value": "Add code framework to return data from test\n" }, { "from": "human", "value": "/*\n * Test-unit framework for sqlCommands.js\n */\n\nconst assert = require('assert');\n\nconst vows = require('vows');\n\nconst Sql = require('../../src/database/sql-related/sqlCommands...
javascript
chosen
[ { "from": "system", "value": "fix: Add parser to ts overrides\n" }, { "from": "human", "value": "module.exports = {\n plugins: ['@typescript-eslint'],\n overrides: [\n {\n files: ['**/*.ts', '**/*.tsx'],\n rules: {\n // typescript will handle this so no need for it\n ...
javascript
chosen
[ { "from": "system", "value": "Remove temporary file after upload\n" }, { "from": "human", "value": "const db = require('../lib/db')\nconst mongoose = db.goose\nconst conn = db.rope\n\nconst fs = require('fs')\nconst router = require('koa-router')()\nconst File = require('../lib/models/file')\nco...
javascript
chosen
[ { "from": "system", "value": "Add simple location to Geolocation package\n" }, { "from": "human", "value": "var locationDep = new Deps.Dependency();\nvar location = null;\nvar locationRefresh = false;\n\nvar options = {\n enableHighAccuracy: true,\n maximumAge: 0\n};\n\nvar errCallback = funct...
javascript
chosen
[ { "from": "system", "value": "Add close icon to modal window\n" }, { "from": "human", "value": "import React from 'react'\nimport styled from 'styled-components'\n\nconst Modal = props =>\n props.isOpen ? (\n <ModalContainer>\n <ModalContent>{props.children}</ModalContent>\n </ModalC...
javascript
chosen
[ { "from": "system", "value": "Fix single event class bindings\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport { default as CalendarEvent } from 'el-calendar/components/calendar-event';\nimport layout from '../templates/components/ilios-calendar-event';\nimport moment from '...
javascript
chosen
[ { "from": "system", "value": "Save 'lifetime' preference for created default containers\n" }, { "from": "human", "value": "import {formatString} from './utils';\nimport HostStorage from './Storage/HostStorage';\nimport ContextualIdentities from './ContextualIdentity';\nimport ExtendedURL from '....
javascript
chosen
[ { "from": "system", "value": "Remove leftover `console.log` in `clever env import`" }, { "from": "human", "value": "'use strict';\n\nconst readline = require('readline');\n\nconst _ = require('lodash');\nconst Bacon = require('baconjs');\n\nfunction parseLine (line) {\n const p = line.split('='...
javascript
chosen
[ { "from": "system", "value": "Fix suggestedMax in chart when there is no data to display" }, { "from": "human", "value": "\n\"use strict\";\n\n$(function () {\n \n//-----------------------\n //- Dashboard > Authentication Requests Chart -\n //-----------------------\n\ttry{\n\t\n\n var authC...
javascript
chosen
[ { "from": "system", "value": "Stop if there's an error\n" }, { "from": "human", "value": "Template.postSubmit.events({\n 'submit form': function(e) {\n e.preventDefault();\n\n var post = {\n url: $(e.target).find('[name=url]').val(),\n title: $(e.target).find('[name=title]').val...
javascript
chosen
[ { "from": "system", "value": "fix/webFetch-encoding: Add content-encoding headers for webfetch response. Set 'chunked'\n" }, { "from": "human", "value": "import logger from 'logger';\n\nimport { getAppObj } from '../network';\n\nconst safeRoute = {\n method : 'GET',\n path : '/safe/{li...
javascript
chosen
[ { "from": "system", "value": "Adjust minimal-example to new API\n" }, { "from": "human", "value": "// Test functions\nfunction multiply (a, b) {\n 'use strict'\n return a * b\n}\n\nfunction divide (a, b) {\n 'use strict'\n try {\n return multiply(add(a, b), a, b) / c\n } catch (e) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix a jasmine test in CommentToggler\n" }, { "from": "human", "value": "/* Copyright (c) 2010, Diaspora Inc. This file is\n * licensed under the Affero General Public License version 3 or later. See\n * the COPYRIGHT file.\n */\n\ndescribe(\"Diaspora.Widgets...
javascript
chosen
[ { "from": "system", "value": "Use imagepicker for all forms\n" }, { "from": "human", "value": "$(document).on('turbolinks:load', function () {\n $(\"#selectImage\").imagepicker({\n hide_select: true,\n show_label : true\n });\n\n var $container = $('.image_picker_selector...
javascript
chosen
[ { "from": "system", "value": "Disable convertion to divs, preserve paragraphs." }, { "from": "human", "value": "/**\n * Wysiwyg related javascript\n */\n\n// =require ./lib/redactor.js\n\n(function($){\n $(document).ready( function() {\n /**\n * Minimal wysiwyg support\n */\n $('....
javascript
chosen
[ { "from": "system", "value": "Fix lightsoff to not use signal this..\n\nsvn path=/trunk/; revision=452\n" }, { "from": "human", "value": "function pushed_arrow()\n{\n\tif(animating_board)\n\t\treturn true;\n\t\t\n\t// TODO: Need to check that click count is 1\n\tvar direction = (this.flipped ? 1...
javascript
chosen
[ { "from": "system", "value": "Remove extraneous directory creation in examples environment.\n" }, { "from": "human", "value": "const fs = require('fs')\nconst { promisify } = require('util')\nconst request = require('sync-request')\nconst AdmZip = require('adm-zip')\nconst lockfile = require('lo...
javascript
chosen
[ { "from": "system", "value": "Update for new Moment.js API\n" }, { "from": "human", "value": "/*\n * Clock plugin using Moment.js (http://momentjs.com/) to\n * format the time and date.\n *\n * The only exposed property, 'format', determines the\n * format (see Moment.js documentation) to displa...
javascript
chosen
[ { "from": "system", "value": "Add additional property to pass to weatherCard.\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport $ from 'jquery';\nimport CurrentWeatherCard from './CurrentWeatherCard';\n\nexport default class App extends Component {\n constructor...
javascript
chosen
[ { "from": "system", "value": "Remove line break in includes params\n\nThis was causing a 400 Invalid Request on the organizations page.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport TravisRoute from 'travis/routes/basic';\nimport config from 'travis/config/environment';\n...
javascript
chosen
[ { "from": "system", "value": "Fix 'template' error replacing View with Template\n(suggested in blog comments)\n" }, { "from": "human", "value": "import {Component, View, bootstrap} from 'angular2/angular2';\n\n// Annotation section\n@Component({\n selector: 'my-app'\n})\n@View({\n inline: ...
javascript
chosen
[ { "from": "system", "value": "Add master to admins when added to group\n" }, { "from": "human", "value": "'use strict';\n\n// Bot\nconst bot = require('../../bot');\nconst { replyOptions } = require('../../bot/options');\n\nconst { addGroup, managesGroup } = require('../../stores/group');\nconst...
javascript
chosen
[ { "from": "system", "value": "Fix hook to remove build.gradle config on uninstall.\n" }, { "from": "human", "value": "\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nvar utilities = require(\"./utilities\");\n\nmodule.exports = {\n\n addFabricBuildToolsGradle: function() {\n\n ...
javascript
chosen
[ { "from": "system", "value": ":art: Make benchmark result electron output friendly\n" }, { "from": "human", "value": "'use babel'\n\nimport {MessageRegistry} from '../lib/message-registry'\nimport {getLinter, getMessage} from '../spec/common'\nimport {timeNow, timeDiff, getMessages} from './comm...
javascript
chosen
[ { "from": "system", "value": "Add password validation to client side\n\nSince the password is getting hashed before it's sent to the server I\ncouldn't do any validations on the presence or length of the password on\nthe server side.\n" }, { "from": "human", "value": "$(function() {\n $(\"#regi...
javascript
chosen
[ { "from": "system", "value": "Handle 404 from BitBucket API\n" }, { "from": "human", "value": "var BitBucket = {\n\n hasLogin: function () {\n return !!localStorage['bitbucketLogin'] && !!localStorage['bitbucketRepo'];\n },\n\n getLastChangeset: function (user, repo, callback, fail) {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove city 'Other' using removeIfExists\n\n" }, { "from": "human", "value": "var util = require('../src/util/seeds');\n\n\nexports.seed = function(knex, Promise) {\n return util.insertOrUpdate(knex, 'cities', {\n id: 1,\n name: 'Otaniemi',\n })\n .then(() ...
javascript
chosen
[ { "from": "system", "value": "Fix websocket URL from localhost to the real one\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('app').controller('LoginCtrl', function($scope, $uibModal, mafenSession, alertify, PATHS) {\n 'ngInject';\n\n $scope.mafenSession = mafenSession;\n\...
javascript
chosen
[ { "from": "system", "value": "Revert \"style(webpack_config/server): rewrite prod conf in functional style\"\n\nThis reverts commit bc707a71f85e918a2d95acd7ce1f15beb191525b.\n" }, { "from": "human", "value": "import webpack from 'webpack'\nimport baseWebpackConfig from './webpack.base'\nimport U...
javascript
chosen