conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix JavaScript file indentation inconsistency.\n" }, { "from": "human", "value": "$(function () {\n\t\tvar date = new Date();\n\t\tvar d = date.getDate();\n\t\tvar m = date.getMonth();\n\t\tvar y = date.getFullYear();\n\t\t\n\t\t$('#calendar-holder').fullCalendar({\...
javascript
chosen
[ { "from": "system", "value": "Revert \"Keep project-scripts dependency after adding package.json template data.\"\n\nThis reverts commit 1ae48aa9a8166b97b5942396cb5b821927f0e513.\n" }, { "from": "human", "value": "var path = require('path') \nvar fs = require('fs-extra')\nvar spawn = require('cr...
javascript
chosen
[ { "from": "system", "value": "Add appcontext to router history\n" }, { "from": "human", "value": "\"use strict\";\n//This JS file simply bootstraps the app from the root component when the window loads\n\nvar AppRoot = require('./components/AppRoot.jsx');\nvar Home = require('./components/Home.j...
javascript
chosen
[ { "from": "system", "value": "Update to NuGet v3.4.2 to allow use of environment variables\n" }, { "from": "human", "value": "const fs = require('fs');\nconst request = require('request');\n\nconst nuget = './nuget.exe';\n\nconsole.info(`Downloading 'nuget.exe'...`);\nconsole.info();\n\nrequest\...
javascript
chosen
[ { "from": "system", "value": "Fix webpack builds on windows\n" }, { "from": "human", "value": "var webpack = require('webpack');\nvar poststylus = require('poststylus');\n\nmodule.exports = {\n\tdevtool: 'source-map',\n\tentry: __dirname + '/src',\n\toutput: {\n\t\tpath: 'public/builds/',\n\t\tf...
javascript
chosen
[ { "from": "system", "value": "Change node build target libraryTarget from AMD to UMD\n" }, { "from": "human", "value": "const webpack = require('webpack');\nconst path = require('path');\nconst fs = require('fs');\nconst webpackMerge = require('webpack-merge');\n\nconst defaultConfig = {\n targ...
javascript
chosen
[ { "from": "system", "value": "Switch deprecated function from util.print to process.stdout.write\n" }, { "from": "human", "value": "'use strict';\n\nvar exec = require('child_process').exec;\nvar util = require('util');\nvar fs = require('fs');\nvar rimraf = require('rimraf');\n\nvar repos = [\n...
javascript
chosen
[ { "from": "system", "value": "Stop gulp from hiding errors during compilation\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\n\ngulp.task('compile', function () {\n return gulp.src('./scss/*.scss')\n .pipe(sass().on('error', ...
javascript
chosen
[ { "from": "system", "value": "Fix gulp script to watch src file change\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n uglify = require('gulp-uglify'),\n prefix = require('gulp-autoprefixer'),\n minifyCSS = require('gulp-minify-css'),\n umd_wrap = require...
javascript
chosen
[ { "from": "system", "value": "Update comment RE: --cookie syntax\n" }, { "from": "human", "value": "#!/usr/bin/env phantomjs\n/**\n * PhantomJS-based web performance metrics collector\n *\n * Usage:\n * ./phantomas.js\n * --url=<page to check>\n * [--format=json|csv|plain]\n * [--timeo...
javascript
chosen
[ { "from": "system", "value": "Increase test coverage: Add unit tests to the login module part 2\n\nChange-Id: I02ffbec59100992d709e0de6eb666813fef29f04\nSigned-off-by: Maxime Millette-Coulombe <b285d4cbf4325435252f66fa223af3055d88bdb9@inocybe.com>\n" }, { "from": "human", "value": "define(['comm...
javascript
chosen
[ { "from": "system", "value": "Set title when route changed\n" }, { "from": "human", "value": "(function (Shreds) { 'use strict';\n var name = 'feeds';\n var container = $('.span-fixed-sidebar');\n\n Shreds.components.push(name);\n Shreds[name] = {\n init: function () { },\n render: fun...
javascript
chosen
[ { "from": "system", "value": "SFX: Fix issue where sound effects could be loaded more than once\n" }, { "from": "human", "value": "var Sfx = {\n sounds: { },\n\n preload: function() {\n this.load('pickup_donut');\n this.load('pickup_veggie');\n this.load('omnom');\n ...
javascript
chosen
[ { "from": "system", "value": "Allow region name in region part of url\n" }, { "from": "human", "value": "import {NAVIGATE} from './actions'\nimport {loadRegionByCode} from './region'\n\n/* Action creators */\nexport function navigate(match = {}) {\n return dispatch => {\n const {params} = ma...
javascript
chosen
[ { "from": "system", "value": "Add advanced example with remote webview, including back, forward, and reload buttons.\n" }, { "from": "human", "value": "W.WebviewAdvanced = function() {\n var win = UI.Win({\n title:'Better Web View'\n });\n \n var webview = Ti.UI.createWebView({\n url:'...
javascript
chosen
[ { "from": "system", "value": "Add button title to the footer \"Title\"\n" }, { "from": "human", "value": "import { h } from 'preact'\nimport InfoIcon from '../icons/InfoIcon'\nimport DescriptionIcon from '../icons/DescriptionIcon'\n\nfunction Footer({\n title,\n date,\n showTitle,\n showInfo...
javascript
chosen
[ { "from": "system", "value": "Add botkit and listener for RTC based messages\n" }, { "from": "human", "value": "/*eslint-env node*/\n\n//------------------------------------------------------------------------------\n// node.js starter application for Bluemix\n//---------------------------------...
javascript
chosen
[ { "from": "system", "value": "Refactor sending slack response to its own function\n" }, { "from": "human", "value": "'use strict';\n\nrequire('dotenv').load();\nconst _ = require('lodash');\nconst Slack = require('slack-client');\nconst responses = require('./responses.js');\n\nconst slackToken ...
javascript
chosen
[ { "from": "system", "value": "Make sure the name is up to date\n" }, { "from": "human", "value": "'use strict';\nvar config = {\n channels: [ '#kokarn' ],\n server: 'irc.freenode.net',\n botName: 'KokBot'\n },\n irc = require( 'irc' ),\n bot = new irc.Client( config...
javascript
chosen
[ { "from": "system", "value": "Complete Lesson 2 - Read a file\n" }, { "from": "human", "value": "var result = 0; \nfor (var i = 2; i < process.argv.length; i++) {\n\tresult += Number(process.argv[i]);\n};\n\nconsole.log(result)" }, { "from": "gpt", "value": "var fs = require('fs');\n...
javascript
chosen
[ { "from": "system", "value": "Add With Custom Error Message story.\n" }, { "from": "human", "value": "/**\n * MediaErrorHandler Component Stories.\n *\n * Site Kit by Google, Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use t...
javascript
chosen
[ { "from": "system", "value": "Allow edit-in command even without a current record" }, { "from": "human", "value": "/**\n * DNet eBusiness Suite. Copyright: Nan21 Electronics SRL. All rights reserved.\n * Use is subject to license terms.\n */\nExt.define(\"e4e.dc.command.DcEditInCommand\", {\n\te...
javascript
chosen
[ { "from": "system", "value": "Make it a bit more talkative\n" }, { "from": "human", "value": "var childProcess = require('child_process');\nvar rimraf = require('rimraf');\nvar jscs = require('jscs');\nvar fs = require('fs');\nvar os = require('os');\n\nvar tmpDir = process.cwd() + '/'; //os.tmp...
javascript
chosen
[ { "from": "system", "value": "Add code for send POST request\n" }, { "from": "human", "value": "const BASEURL = \"http://0.0.0.0:3000\";\n\n$(function(){\n $(\"#get-btn\").click(function(){\n console.log(\"GET\");\n $.get(\"http://mean-quote-machine.herokuapp.com/get_random_quot...
javascript
chosen
[ { "from": "system", "value": "Fix initializer warning when testing against Ember 2.1.\n" }, { "from": "human", "value": "export default function(app, files) {\n const login = \"Gaurav0\";\n const gist_id = \"35de43cb81fc35ddffb2\";\n const commit = \"f354c6698b02fe3243656c8dc5aa0303cc7ae81c\"...
javascript
chosen
[ { "from": "system", "value": "Correct typo in logging count of items\n" }, { "from": "human", "value": "const logger = require('logger');\nconst weapon = require('weapon.js');\n\nclass ItemDatabase {\n\n constructor(itemType) {\n this.itemType = itemType;\n this.itemMap = new Map();\n ...
javascript
chosen
[ { "from": "system", "value": "Update to the loading dependencies...load the core rendering before the text rendering.\n" }, { "from": "human", "value": "/* globals Demo, console, require */\n\nDemo = {\n\tinput: {},\n\tcomponents: {},\n\trenderer: {}\n};\n\n\nDemo.loader = (function() {\n\t'use ...
javascript
chosen
[ { "from": "system", "value": "Use property access instead of 'in' to detect SW\n" }, { "from": "human", "value": "'use strict';\n\nvar m = require('mithril');\nvar attachFastClick = require('fastclick');\nvar GameComponent = require('./components/game');\n\nm.mount(document.getElementById('app')...
javascript
chosen
[ { "from": "system", "value": "Add wef.extend(). Only handle plain objects\n" }, { "from": "human", "value": "/*!\n * Wef\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\n\n/**\n * wef module\n */\n(function(global) {\n var wef = {\n version: \"0.0.1\"\n };\n\n //regis...
javascript
chosen
[ { "from": "system", "value": "Add new constans for auth-card actions and shop actions\n" }, { "from": "human", "value": "// auth constants\nexport const AUTH_USER = 'AUTH_USER';\nexport const UNAUTH_USER = 'UNAUTH_USER';\nexport const AUTH_ERROR = 'AUTH_ERROR';\nexport const SET_USER_DATA = 'SET...
javascript
chosen
[ { "from": "system", "value": "Kill UI.insert, make UI.render require DOM node" }, { "from": "human", "value": "\nTinytest.add(\"stylus - presence\", function(test) {\n\n var div = document.createElement('div');\n UI.insert(UI.render(Template.stylus_test_presence), div);\n div.style.display = ...
javascript
chosen
[ { "from": "system", "value": "Add client side link action\n" }, { "from": "human", "value": "const Index = () => (\n <div>\n <p>Hello Next.js</p>\n </div>\n)\n\nexport default Index\n" }, { "from": "gpt", "value": "// This is the Link API\nimport Link from 'next/link'\n\nconst I...
javascript
chosen
[ { "from": "system", "value": "[TASK] Return hash with contract metadata\n" }, { "from": "human", "value": "var Token = require('../models/token').model;\nvar Bitcoin = require('../lib/bitcoin');\nvar config = require('../lib/config');\n\nmodule.exports = function(manager, req, res, next) {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Change to accommodate model change" }, { "from": "human", "value": "'use strict';\r\nmodule.exports = function(app) {\r\n var fintech = require('../controllers/fintechController');\r\n\r\n // fintech Routes\r\n app.route('/tickers')\r\n .get(fintech.list_ticke...
javascript
chosen
[ { "from": "system", "value": "Add lists state to stateProvider\n" }, { "from": "human", "value": "(function(){\n'use strict';\n\nangular\n .module('secondLead', \n \t['ngDragDrop', \n \t'ui.bootstrap',\n \t'ui.router', \n \t'gridster',\n \t'restangular',\n 'angularUtils.directives.dirPa...
javascript
chosen
[ { "from": "system", "value": "Add reddit service, main ctrl\n" }, { "from": "human", "value": "'use strict';\n\nvar app = angular\n .module('seenitApp', [\n 'ngAnimate',\n 'ngCookies',\n 'ngResource',\n 'ngRoute',\n 'ngSanitize',\n 'ngTouch'\n ])\n .config(function ($routePr...
javascript
chosen
[ { "from": "system", "value": "Change the hide function to work in a better way to not brake other functionallity.\n" }, { "from": "human", "value": "/* Magic Mirror\n * Node Helper: MotionEye\n *\n * By Cato Antonsen (https://github.com/CatoAntonsen)\n * MIT Licensed.\n */\n\nvar NodeHelper = re...
javascript
chosen
[ { "from": "system", "value": "Add comment to explain why we render a single field sometimes\n" }, { "from": "human", "value": "import React from 'react';\nimport { InputGroup, InputGroupAddon, InputGroupText } from 'reactstrap';\nimport fieldHolder from 'components/FieldHolder/FieldHolder';\n\nc...
javascript
chosen
[ { "from": "system", "value": "Revert \"safari faq bug test\"\n\nThis reverts commit face5c813634c1a5b0469943492f7ed16f1061c6.\n" }, { "from": "human", "value": "$(\"body\").backstretch(\"assets/img/background1.png\");\n\n$(document).ready(function() {\n $('.faqelem').click(function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add newline and request to play again to confirm box\n" }, { "from": "human", "value": "function Game(){\n this.$track = $('#racetrack');\n this.finishLine = this.$track.width() - 54;\n}\n\nfunction Player(id){\n this.player = $('.player')[id - 1];\n this.positi...
javascript
chosen
[ { "from": "system", "value": "Fix for .indexOf on Number\n" }, { "from": "human", "value": "/* ===============================================================================\n************ Infinite Scroll ************\n=========================================================================...
javascript
chosen
[ { "from": "system", "value": "Remove actor/movieimage styles, add to staticimagestyle\n" }, { "from": "human", "value": "import { StyleSheet, Dimensions } from 'react-native';\n\nexport default StyleSheet.create({\n mainContainer: {\n // flex: 3,\n width: Dimensions.get('window').width * ...
javascript
chosen
[ { "from": "system", "value": "Add var declaration to avoid global variable scope" }, { "from": "human", "value": "var addTextLabel = require(\"./add-text-label\"),\n addHtmlLabel = require(\"./add-html-label\"),\n addSVGLabel = require(\"./add-svg-label\");\n\nmodule.exports = addLabel;\n...
javascript
chosen
[ { "from": "system", "value": "Add missing use babel directive\n" }, { "from": "human", "value": "import configSchema from './config-schema'\nimport {toggleQuotes} from './toggle-quotes'\n\nexport default {\n config: configSchema,\n\n activate: () => {\n this.subscription = atom.commands.add...
javascript
chosen
[ { "from": "system", "value": "Load env in mongo config\n" }, { "from": "human", "value": "export default {\n user: process.env.MONGO_USER || '',\n password: process.env.MONGO_PASSWORD || '',\n host: process.env.MONGO_HOST || 'localhost',\n port: process.env.MONGO_PORT || '27017',\n database...
javascript
chosen
[ { "from": "system", "value": "Fix JSCS for generated model's mixin\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport DS from 'ember-data';\n<%if(projections) {%>import { Projection } from 'ember-flexberry-data';<%}%>\nexport let Model = Ember.Mixin.create({\n<%= model %>\n});...
javascript
chosen
[ { "from": "system", "value": "Change selector string so the query only returns headings with ids\n" }, { "from": "human", "value": "var addHeadingAnchors = {\n\n init: function (selector) {\n this.target = document.querySelector(selector);\n if (this.target) {\n this.addAnchorsToHead...
javascript
chosen
[ { "from": "system", "value": "Remove seneca logging (to be like all the other services)\n" }, { "from": "human", "value": "'use strict';\nvar assert = require('assert');\nvar LogEntries = require('le_node');\n\nfunction log () {\n // seneca custom log handlers\n\n if (process.env.LOGENTRIES_EN...
javascript
chosen
[ { "from": "system", "value": "Add max len for client\n" }, { "from": "human", "value": "const OFF = 0;\nconst WARN = 1;\nconst ERROR = 2;\n\nmodule.exports = {\n extends: \"../.eslintrc.js\",\n rules: {\n \"arrow-parens\": [ ERROR, \"as-needed\" ],\n \"no-confusing-arrow\": [ OFF ],\n ...
javascript
chosen
[ { "from": "system", "value": "Split IP and port from input.\n" }, { "from": "human", "value": "#!/usr/bin/env/node\n\n/*\n\n Provide a command-line interface for `reconfigure`.\n ___ greeting, usage ___ en_US ___\n usage: node.bin.js\n\n ___ serve, usage ___ en_US ___\n usage: node bin.js ...
javascript
chosen
[ { "from": "system", "value": "Use utility to get a value's native class\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var v = isA...
javascript
chosen
[ { "from": "system", "value": "Implement routing for all strings\n" }, { "from": "human", "value": "const express = require('express');\nconst app = express();\nconst manipulateString = require('./stringManipulator');\n\napp.get('/:unix(\\\\d+)', (req, res) => {\n res.send(manipulateString(req.p...
javascript
chosen
[ { "from": "system", "value": "typing-status: Initialize lastTypingStart as \"long ago\", not \"now\".\n\nSimilarly to the parent commit for presence, this was causing us\nnot to report the user typing in the first 15 seconds after\nstarting the app.\n" }, { "from": "human", "value": "/* @flow st...
javascript
chosen
[ { "from": "system", "value": "Fix submitting query builder form params.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n tz: jstz.determine().name(),\n search: null,\n interval: 'day',\n prefix: '0/',\n region: 'world',\n start_at:...
javascript
chosen
[ { "from": "system", "value": "Remove empty lines in preprocessing\n" }, { "from": "human", "value": "define(['util'], function(util) {\n 'use strict';\n\n\tvar Parser = function () {\n\t}\n\n\tParser.prototype.parse = function () {\n\t\tconsole.log('Error: Pure virtual parse called!');\n\t\tr...
javascript
chosen
[ { "from": "system", "value": "Read from the tags array when saving\n" }, { "from": "human", "value": "const config = require('collections-online/lib/config');\nconst cip = require('../services/cip');\n\nconst CROWD_TAGS = '{73be3a90-a8ef-4a42-aa8f-d16ca4f55e0a}';\n\nfunction saveToCip(catalog, i...
javascript
chosen
[ { "from": "system", "value": "Modify CLI to copy index.html\n" }, { "from": "human", "value": "#!/usr/bin/env node\nrequire(\"./index.js\");\n" }, { "from": "gpt", "value": "#!/usr/bin/env node\n\n// Copy over the index.html\nvar fs = require(\"fs\");\nvar path = require(\"path\");\n...
javascript
chosen
[ { "from": "system", "value": "Add flags for comparing and displaying\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\nvar meow = require('meow');\nvar sha1Cli = require('./');\n\nvar cli = meow([\n\t'Usage',\n\t' $ sha1-cli [input]',\n\t'',\n\t'Options',\n\t' --foo Lorem...
javascript
chosen
[ { "from": "system", "value": "Allow webpack to resolve to ts/tsx files\n" }, { "from": "human", "value": "'use strict'\n\nconst path = require('./path')\n\nmodule.exports = {\n alias: {\n bemuse: path('src'),\n },\n extensions: ['.webpack.js', '.web.js', '.js', '.jsx'],\n}\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Create logs directory on first launch\n" }, { "from": "human", "value": "\nimport env from '../env'\nconst full = (process.type !== 'renderer' && env.name !== 'test')\n\nimport pathmaker from '../util/pathmaker'\nimport mklog from '../util/log'\nconst loggerOpts = {...
javascript
chosen
[ { "from": "system", "value": "Add touchstart to support touch devices\n" }, { "from": "human", "value": "function Prefetch() {\n this.hooks();\n}\n\nPrefetch.prototype.hooks = function () {\n var links = document.querySelectorAll('a');\n\n for (var n = 0; n < links.length; n++) {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Fix page boundary hit detection\n" }, { "from": "human", "value": "import BaseRoute from '../_base';\n\nexport default BaseRoute.extend({\n model: function() {\n return this.modelFor('page');\n },\n setupController: function(controller, page) {\n this.set('...
javascript
chosen
[ { "from": "system", "value": "Remove had a bug due to bad reference.\n" }, { "from": "human", "value": "'use strict';\nconst util = require('util');\n\nconst CommandUtil = require('../src/command_util').CommandUtil;\nconst l10nFile = __dirname + '/../l10n/commands/remove.yml';\nconst l10n = requ...
javascript
chosen
[ { "from": "system", "value": "Substitute the default prelude in browser-pack, brfs doesn't seem to pick it up\n" }, { "from": "human", "value": "var browserify = require('browserify');\nvar brfs = require('brfs');\nvar through = require('through');\nvar fs = require('fs');\n\nrequire('browserify...
javascript
chosen
[ { "from": "system", "value": "Fix source for task and remove SCSS syntax support\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp'),\n config = require('../../config'),\n postcss = require('gulp-postcss'),\n colorguard = require('colorguard'),\n filterstr...
javascript
chosen
[ { "from": "system", "value": "Change regex to find the css import directly after the template.\nFix bug in path to custom-component element.\n" }, { "from": "human", "value": "const express = require('express');\nconst path = require('path');\nconst fs = require('fs');\nconst router = express.R...
javascript
chosen
[ { "from": "system", "value": "Add tests for keepOnRouteChange property\n" }, { "from": "human", "value": "var handleModalsRoute = require('cartodb3/routes/handle-modals-route');\n\ndescribe('routes/handleModalsRoute', function () {\n it('should handle modals route', function () {\n var modal...
javascript
chosen
[ { "from": "system", "value": "Test - Update proxy tests.\n" }, { "from": "human", "value": "import http from 'http'\nimport request from 'request'\nimport createProxy from '../../src/lib/proxy'\nimport tap from 'tap'\n\nfunction setup (options, cb) {\n if (typeof options === 'function') {\n ...
javascript
chosen
[ { "from": "system", "value": "Allow Netimage option to be optional\n" }, { "from": "human", "value": "// Copyright 2015, EMC, Inc.\n\n'use strict';\n\nmodule.exports = {\n friendlyName: 'Install Ubuntu',\n injectableName: 'Task.Os.Install.Ubuntu',\n implementsTask: 'Task.Base.Os.Install...
javascript
chosen
[ { "from": "system", "value": "Reformat code post prettier update :memo:\n" }, { "from": "human", "value": "const createFixer = ({range, left, right, operator}, source) => fixer => {\n const [leftStart, leftEnd] = left.range;\n const [rightStart] = right.range;\n const operatorRange = [leftEnd...
javascript
chosen
[ { "from": "system", "value": "Make this work in internet explorer.\n\n\nsvn commit r1709\n" }, { "from": "human", "value": "function SwatForm(id)\n{\n\tthis.id = id;\n\tthis.form_element = document.getElementById(id);\n}\n\nSwatForm.prototype.setDefaultFocus = function(element_id)\n{\n\t// TODO:...
javascript
chosen
[ { "from": "system", "value": "Use sendAction when no return value is needed\n\n[skip ci]\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from './template';\n\nimport permissions from 'ember-osf/const/permissions';\n\nexport default Ember.Component.extend({\n READ:...
javascript
chosen
[ { "from": "system", "value": "Add light service and unit tests\n" }, { "from": "human", "value": "'use strict';\n\nexports.seed = function (knex, Promise) {\n return Promise.join(\n // Deletes ALL existing entries\n knex('lights').del(),\n\n // Inserts seed entries\n ...
javascript
chosen
[ { "from": "system", "value": "Fix url to transaciton sound\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('insight.address').controller('AddressController',\n function($scope, $rootScope, $routeParams, $location, Global, Address, getSocket) {\n $scope.global = Global;\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix sort order for refreshed movies list\n" }, { "from": "human", "value": "import {Meteor} from 'meteor/meteor';\nimport {autorun, toJS} from 'mobx';\nimport Movies from '../../api/documents/documents'\n\n\nexport default class Mongo2Mobx {\n constructor(store) ...
javascript
chosen
[ { "from": "system", "value": "Create example keys for aws\n" }, { "from": "human", "value": "module.exports = {\n facebook: {\n FACEBOOK_APP_ID: 'YOUR_FACEBOOK_APP_ID',\n FACEBOOK_APP_SECRET: 'YOUR_FACEBOOK_APP_SECRET'\n }\n};\n" }, { "from": "gpt", "value": "module.exports =...
javascript
chosen
[ { "from": "system", "value": "Comment out show file for now\n" }, { "from": "human", "value": "class MCProcessFilesTableComponentController {\n /*@ngInject*/\n constructor() {\n this.state = {\n files: [],\n };\n }\n\n $onChanges(changes) {\n if (chang...
javascript
chosen
[ { "from": "system", "value": "Rework undefined test & fix v2 typo\n" }, { "from": "human", "value": "'use strict';\n\nlet cli = require('heroku-cli-util');\nlet shellescape = require('shell-escape');\nlet co = require('co');\n\nfunction* run (context, heroku) {\n let configVars...
javascript
chosen
[ { "from": "system", "value": "Fix error when column exists.\n" }, { "from": "human", "value": "'use strict';\n\nvar dbm;\nvar type;\nvar seed;\n\n/**\n * We receive the dbmigrate dependency from dbmigrate initially.\n * This enables us to not have to rely on NODE_PATH.\n */\nexports.setup = f...
javascript
chosen
[ { "from": "system", "value": "Use standard \"result\" layout, and add divider title to sample.\n\nEnyo-DCO-1.1-Signed-off-by: Kevin Schaaf kevin.schaaf@lge.com\n" }, { "from": "human", "value": "enyo.kind({\n\tname: \"moon.sample.IntegerScrollPickerSample\",\n\tclasses: \"moon enyo-unselectable ...
javascript
chosen
[ { "from": "system", "value": "Remove RSA password from repo.\n" }, { "from": "human", "value": "module.exports = {\n\talgorithm \t: 'aes-256-ctr',\n\tpassword \t: 'qmAXae3Ofx9K0NpX4ODB4Dt9l9QhEW',\n\tfilename \t: '.data.db'\n}\n\n\n" }, { "from": "gpt", "value": "module.exports = {\...
javascript
chosen
[ { "from": "system", "value": "Update divs to ExampleContainer component\n" }, { "from": "human", "value": "import React from 'react';\nimport CentralColumnLayout from '../../containers/CentralColumnLayout/CentralColumnLayout';\n\nimport { SprkDivider } from '@sparkdesignsystem/spark-core-react';...
javascript
chosen
[ { "from": "system", "value": "Fix the score on the Score Screen\n" }, { "from": "human", "value": "import html from \"innerself\";\nimport { connect } from \"./store\";\n\nfunction ScoreScreen({results, target_snapshot}) {\n const score = Math.floor(results[results.length - 1]) * 100;\n return...
javascript
chosen
[ { "from": "system", "value": "Use the bodyParser middleware for `/assets`.\n" }, { "from": "human", "value": "// Handlers\nvar\n version = require('./version'),\n content = require('./content'),\n assets = require('./assets');\n\nexports.loadRoutes = function (server) {\n server.get('/versio...
javascript
chosen
[ { "from": "system", "value": "Allow to use HTTPS in url" }, { "from": "human", "value": "var session = require('../env/session'),\n url = require('url');\n\nmodule.exports = {\n\n visit: function (query) {\n var config = require('moonraker').config;\n var path = url.parse(this.url....
javascript
chosen
[ { "from": "system", "value": "Update URLs to match best practice of the resource name not being plural\n" }, { "from": "human", "value": "import express from 'express';\nimport bodyParser from 'body-parser';\n\nimport log from './log';\nimport database from './database';\nimport configureHelmet ...
javascript
chosen
[ { "from": "system", "value": "Include study view screenshot references\n\n\nFormer-commit-id: e016cb052abecda7dc1c0cd1391edac077634e2a" }, { "from": "human", "value": "var assert = require('assert');\nvar expect = require('chai').expect;\nvar waitForOncoprint = require('./specUtils').waitForOnco...
javascript
chosen
[ { "from": "system", "value": "Swap out 'for' for 'htmlFor'\n" }, { "from": "human", "value": "import React from 'react';\nimport resumeStructures from './resume-structures';\nimport { capitalize } from 'lodash';\n\nconst buildForm = ([section, attributes]) => props => {\n\n const handleSubmit =...
javascript
chosen
[ { "from": "system", "value": "Remove race condition in tests\n" }, { "from": "human", "value": "'use strict';\n\nprocess.stdin.pipe(require('fs').createWriteStream(__dirname + '/output.txt'));\nprocess.stdout.write('output written');\nprocess.stderr.write('error log exists');\n\nsetTimeout(funct...
javascript
chosen
[ { "from": "system", "value": "Use forever instead of forever-mac.\n" }, { "from": "human", "value": "var forever = require('forever-mac');\nvar config = require('./config');\n\nfunction start () {\n forever.list('array', function (err, processes) {\n \n // stop all forever\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unused element from demo\n" }, { "from": "human", "value": "import { coreInit } from 'isolated-core'\n\nconst CSS2 = { __html: require('./style2.less') }\n\ncoreInit({\n scriptURL: 'green.js',\n run: core => {\n const React = require('react')\n const ...
javascript
chosen
[ { "from": "system", "value": "Fix error in top navigation not being able to find about us section\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular\n .module('app.layout')\n .directive('pvTopNav', pvTopNav);\n\n /* @ngInject */\n function pvTo...
javascript
chosen
[ { "from": "system", "value": "Return null not undefined from getViewFromNode\n" }, { "from": "human", "value": "import Obj from '../foundation/Object';\n\n/**\n Property: O.activeViews\n Type: O.Object\n\n Maps from id to the view object for all views currently in a document.\n\n Vie...
javascript
chosen
[ { "from": "system", "value": "Support user timezones (and discover JS date fails).\n" }, { "from": "human", "value": "// Source Server Stats\n// File: sourcestats/webpack/util.js\n// Desc: utility functions for the frontend\n\n\nexport function timeAgo(dateString) {\n const date = new Date(da...
javascript
chosen
[ { "from": "system", "value": "Add some hackish server-side throttling and use named events\n" }, { "from": "human", "value": "var nfc = require('nfc').nfc;\nvar n = new nfc();\n\nvar middleware = function (req, res, next) {\n res.sseSetup = function() {\n res.writeHead(200, {\n ...
javascript
chosen
[ { "from": "system", "value": "Hide basket table if no search assets.\n" }, { "from": "human", "value": "export class BasketTemplate {\n static update(render, state, events) {\n const headerClasses = \"fw6 bb b--black-20 tl pb1 pr1 bg-white\";\n const trClasses = \"pv1 pr1 bb b--...
javascript
chosen
[ { "from": "system", "value": "Build string of description plus tags for editing\n" }, { "from": "human", "value": "function getDescriptionAndTags(input) {\n const pieces = input.split(' ');\n\n const descriptionPieces = [];\n const tags = [];\n\n pieces.forEach(piece => {\n if (piece[0] =...
javascript
chosen
[ { "from": "system", "value": "Add source title to messages\n" }, { "from": "human", "value": "'use strict';\nconst config = require('./config');\nconst gooGl = require('goo.gl');\nconst moment = require('moment-timezone');\nconst removeUrlGarbage = require('link-cleaner');\n\nif (config.shortenL...
javascript
chosen
[ { "from": "system", "value": "Fix integration tests for InstallPackageModal\n" }, { "from": "human", "value": "xdescribe('Install Package Modal', function () {\n\n beforeEach(function () {\n cy\n .configureCluster({\n mesos: '1-task-healthy',\n universePackages: true\n ...
javascript
chosen
[ { "from": "system", "value": "[RN] Make the audio muted icon consistent with the web\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport Icon from 'react-native-vector-icons/FontAwesome';\n\nimport styles from './styles';\n\n/**\n * Thumbnail badge for displaying...
javascript
chosen