conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update the js model to match the backend model\n" }, { "from": "human", "value": "define(['backbone'], function(Backbone) {\n return Backbone.Model.extend({\n urlRoot: '/paste',\n defaults: {\n \"id\": null,\n \"syntax\": 'none',\n \"ttl\": 432...
javascript
chosen
[ { "from": "system", "value": "Add Report class from Realm\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport Realm from 'realm';\n\nexport class Address extends Realm.Object {}\nexport class ItemCategory extends Realm.Object {}\nexpo...
javascript
chosen
[ { "from": "system", "value": "Resolve conflict merge by removing commentFrom variable containing html that is no longer needed.\n" }, { "from": "human", "value": "var commentForm = '<form id=\"comment_form\" action=\"/comments\" method=\"POST\" name=\"create_comment\">\n <textarea name=\"com...
javascript
chosen
[ { "from": "system", "value": "Add twitter email on twitter package\n" }, { "from": "human", "value": "Twitter = {};\n\nvar urls = {\n requestToken: \"https://api.twitter.com/oauth/request_token\",\n authorize: \"https://api.twitter.com/oauth/authorize\",\n accessToken: \"https://api.twitter.c...
javascript
chosen
[ { "from": "system", "value": "Make Settings object accessible through $rootScope\n" }, { "from": "human", "value": "Controllers.controller(\"ToolbarCtrl\", [\"$scope\", \"$rootScope\", \"Connection\", \"User\", \"Settings\", function ($scope, $rootScope, Connection, User, Settings)\n{\n $sco...
javascript
chosen
[ { "from": "system", "value": "Add MC version to !ip - Add alias !connect" }, { "from": "human", "value": "const Command = require('../Command');\n\nmodule.exports = Command.extend({\n commandName: 'ip',\n commandAliases: ['address', 'server'],\n processMessage: function (message, tokens...
javascript
chosen
[ { "from": "system", "value": "Use any version of rotonde-core\n" }, { "from": "human", "value": "import fs from 'fs-extra';\nimport path from 'path';\nimport { spawn } from 'child_process';\n\nconst directory = path.join(__dirname, '../dist');\nfs.mkdirs(directory, err => {\n if (err) {\n th...
javascript
chosen
[ { "from": "system", "value": "Add more field to search\n\n" }, { "from": "human", "value": "module.exports = function (models) {\n const {\n Photo,\n User\n } = models;\n\n return {\n searchPhotos(pattern) {\n return new Promise((resolve, reject) => {\n ...
javascript
chosen
[ { "from": "system", "value": "storage: Switch to storage 'whitelist' from 'blacklist'\n\nThis is to ensure we don't store more data than we need.\nNow we don't store any more:\n * alertWords\n * flags\n * presence\n * streams\n * unreadHuddles\n * unreadMentions\n * unreadPms\n * unreadStreams\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Add onclick handler for opening restricted windows.\n\nEvil, I tell ye. Evil! :japanese_ogre:" }, { "from": "human", "value": "$(document).ready(function () {\n var $container = $('section.more');\n\n if ($container.find('.js-tabs').length) {\n $container.tabs(...
javascript
chosen
[ { "from": "system", "value": "Convert a list of files.\n" }, { "from": "human", "value": "import {describe, it} from 'mocha';\nimport {\n assertThat, equalTo,\n} from 'hamjest';\nimport {\n buildFunctionSpy, wasNotCalled, callCountWas, wasCalledWith,\n} from 'hamjest-spy';\n\nconst toSrcDestPa...
javascript
chosen
[ { "from": "system", "value": "Remove a leftover reference to the Denque dependency\n\nThis dependency was removed quite some time ago, but the reference to it\nin the rollup configuration was never removed.\n" }, { "from": "human", "value": "var dependencies = {\n 'concurrify': 'concurrify',\n ...
javascript
chosen
[ { "from": "system", "value": "Fix error when clicking on an operation\n" }, { "from": "human", "value": "define([\n \"hr/hr\",\n \"models/operation\",\n \"collections/operations\",\n \"text!resources/templates/operations/operation.html\"\n], function(hr, Operation, Operations, templa...
javascript
chosen
[ { "from": "system", "value": "Update API URLs in web UI\n" }, { "from": "human", "value": "var default_settings = {\n /* Topology settings */\n show_unused_interfaces: true,\n show_disconnected_hosts: true,\n show_topology: true,\n topology_transformation: 'translate(0,0...
javascript
chosen
[ { "from": "system", "value": "Add newline to make github happy\n" }, { "from": "human", "value": "console.log(Intl.supportedValuesOf('calendar'));\nconsole.log(Intl.supportedValuesOf('collation'));\nconsole.log(Intl.supportedValuesOf('currency'));\nconsole.log(Intl.supportedValuesOf('numberingSy...
javascript
chosen
[ { "from": "system", "value": "Fix bug where pressing v to change view mode resulted in unstoppable constant viewmode changing\n" }, { "from": "human", "value": "s.Controls.Keyboard = function() {\n this.keyboard = new s.Keyboard();\n};\n\ns.Controls.Keyboard.prototype.update = function() {\n t...
javascript
chosen
[ { "from": "system", "value": "Hide admin menu if not authorized\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('adminApp')\n .directive('topMenu', ['$location', 'Menu', 'Auth', function ($location, Menu, Auth) {\n return {\n restrict: 'A',\n transclude: ...
javascript
chosen
[ { "from": "system", "value": "Use /store path instead of api\n" }, { "from": "human", "value": "var ntfd = require('ntfd')\n\nntfd({\n path: __dirname + '/tests',\n agent: 'test',\n plugin: [\n new ntfd.plugin.ConsoleEmitter(),\n new ntfd.plugin.HttpEmitter('http://localhost:8000/api/su...
javascript
chosen
[ { "from": "system", "value": "Move all jquery includes to one place in file\n" }, { "from": "human", "value": "// Factlink configuration\n//= require_tree ./globals\n\n// All the default libraries/files needed for all pages on Factlink\n//= require jquery_ujs\n//= require local_storage_polyfill\...
javascript
chosen
[ { "from": "system", "value": "Update regex and point to Jira\n" }, { "from": "human", "value": "(() => {\n const $title = document.querySelector('.js-issue-title');\n if (!$title) {\n return;\n }\n\n chrome.storage.local.get('inlineLinks', (options) => {\n let title = $title.innerHTML....
javascript
chosen
[ { "from": "system", "value": "Fix for IE + Edge\n" }, { "from": "human", "value": "'use strict';\n\n(function (document) {\n document.addEventListener('DOMContentLoaded', function () {\n const details = document.getElementsByTagName('details');\n\n if (details.length <= 0 || typ...
javascript
chosen
[ { "from": "system", "value": "Build source file path updated.\n" }, { "from": "human", "value": "module.exports = {\n\tpaths: {\n\t\thtml: {\n\t\t\tinline: {\n\t\t\t\tsrc: [ 'src/templates/**/*.html' ],\n\t\t\t\tdest: [ 'dist' ],\n\t\t\t},\n\t\t\tclean: {\n\t\t\t\tsrc: [ 'dist/**/*.html' ],\n\t\...
javascript
chosen
[ { "from": "system", "value": "Replace .bind with @bind decorator\n" }, { "from": "human", "value": "import { h, Component } from 'preact'\n\nexport default class extends Component {\n constructor() {\n super()\n this.state.show = false\n }\n linkState(key) {\n return e => this.setSta...
javascript
chosen
[ { "from": "system", "value": "Add Option.or(val), orNull() and given() test cases.\n" }, { "from": "human", "value": "var Canal = require('../canal.js');\nvar expect = require(\"expect.js\");\n\ndescribe(\"Test Option\", function(){\n\nit(\"Some()\", function()\n{\n\tvar result = Canal.Some(1).m...
javascript
chosen
[ { "from": "system", "value": "Reword macOS Catalina askpass message\n\nChange-type: patch\nChangelog-entry: Reword macOS Catalina askpass message\nSigned-off-by: Lorenzo Alberto Maria Ambrosi <85d02d3d73c7f11f17a7802a45c32c7e0695e46d@gmail.com>\n" }, { "from": "human", "value": "#!/usr/bin/env o...
javascript
chosen
[ { "from": "system", "value": "Fix review to define middleware as an array\n" }, { "from": "human", "value": "import { createStore, applyMiddleware } from 'redux'\nimport { routerMiddleware } from 'react-router-redux'\nimport TebukuroApp from '../reducers'\n\nexport default (preloadState = {}, hi...
javascript
chosen
[ { "from": "system", "value": "Load innovation story page based on QR code result\n" }, { "from": "human", "value": "\r\n\r\nvar DiscoverView = function() {\r\n\r\n this.initialize = function() {\r\n // 'div' wrapper to attach html and events to\r\n this.el = $('<div/>');\r\n ...
javascript
chosen
[ { "from": "system", "value": "Refactor to use generic `changeinside` in new retext\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Dependencies.\n */\n\nvar phonetics;\n\nphonetics = require('double-metaphone');\n\n/**\n * Change handler.\n *\n * @this {WordNode}\n */\n\nfunction onc...
javascript
chosen
[ { "from": "system", "value": "Add script file name to stack traces\n" }, { "from": "human", "value": "'use strict';\n\nvar extend = require('extend');\n\nvar repl = require('repl')\n , vm = require('vm')\n , fs = require('fs');\n\n\n/**\n * Start the REPL and expose variables in `context`.\n *...
javascript
chosen
[ { "from": "system", "value": "Implement import for component less file\n" }, { "from": "human", "value": "module.exports = function(source, map)\r\n{\r\n this.cacheable();\r\n\r\n source = '/* semantic-ui-react-loader */' + source;\r\n\r\n this.callback(null, source, map);\r\n};" }, { ...
javascript
chosen
[ { "from": "system", "value": "Choose random gif instead of 0th (giphy search order !rand)\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\"use strict\";\n\nconst login = require(\"facebook-chat-api\");\nconst giphy = require(\"giphy-api\")();\nconst confg = require(\"./config\");\n\nlo...
javascript
chosen
[ { "from": "system", "value": "Use `handle-event` in main plugin\n" }, { "from": "human", "value": "module.exports = robot => {\n // Your plugin code here\n console.log('Yay, the plugin was loaded!', robot);\n\n // For more information on building plugins:\n // https://github.com/probot/probo...
javascript
chosen
[ { "from": "system", "value": "Add a sigterm on error and better flag handling\n" }, { "from": "human", "value": "const nodemon = require(\"nodemon\")\n\nvar server\nvar started = false\nvar quit = false\n\nmodule.exports = function () {\n this.nodemon = function (opts) {\n return new Promise...
javascript
chosen
[ { "from": "system", "value": "Allow paths to be passed\n\nNo more `cd components`!" }, { "from": "human", "value": "var hbsDir = require('hbs-dir')\nvar change = require('change-case')\nvar path = require('path')\n\nmodule.exports = function (target, cb) {\n var opts = {\n origin: path.join(...
javascript
chosen
[ { "from": "system", "value": "Add support for protocol redirects\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict'\n\nvar url = require('url')\nvar normalizeUrl = require('normalize-url')\nvar chalk = require('chalk')\nvar arg = normalizeUrl(process.argv[2])\nvar http = requir...
javascript
chosen
[ { "from": "system", "value": "Fix notification about flushing the database\n" }, { "from": "human", "value": "var restify = require('restify');\n\nvar messenger = require('./lib/messenger');\nvar session = require('./lib/session');\n\nvar server = restify.createServer();\n\nserver.use(restify.qu...
javascript
chosen
[ { "from": "system", "value": "Fix import of bower script\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-highlight',\n\n included: function(app, parentAddon) {\n var target = (parentAddon || app);\n\n target.import('vendor/si...
javascript
chosen
[ { "from": "system", "value": "Correct usage of api now\n" }, { "from": "human", "value": "const mqtt = require('mqtt');\nconst mongoose = require('mongoose');\nconst Q = require('q');\n\nmongoose.Promise = Q.Promise;\nmongoose.connect('mongodb://localhost/home-data');\n\nconst client = mqtt.con...
javascript
chosen
[ { "from": "system", "value": "Allow the module to be seeded with an array of patterns\n" }, { "from": "human", "value": "'use strict';\n\nvar murl = require('murl');\n\nvar Patterns = module.exports = function (patterns) {\n if (!(this instanceof Patterns))\n return new Patterns(patterns);\n...
javascript
chosen
[ { "from": "system", "value": "FIX css path in treeForVendor\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\nvar path = require('path');\nvar fs = require('fs');\nvar Funnel = require('broccoli-funnel');\nvar log = require('broccoli-stew').log;\n\nprocess.setMaxListener...
javascript
chosen
[ { "from": "system", "value": "Add a constructor to PhonegapBoilerplate\n" }, { "from": "human", "value": "'use strict';\n\nvar options = {\n repository: 'https://github.com/dorian-marchal/phonegap-boilerplate',\n branch: 'master',\n};\n\n/**\n * Check that the cli is used in a phonegap boilerp...
javascript
chosen
[ { "from": "system", "value": "Use targeted method to set tree for vendor\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-collection',\n init: function(name) {\n var assets_path = require('path').join('layout-bin-packer','index.j...
javascript
chosen
[ { "from": "system", "value": "Add private API version property to client.\n" }, { "from": "human", "value": "/**\n * index.js\n * Client entry point.\n *\n * @author Francis Brito <fr.br94@gmail.com>\n * @license MIT\n */\n'use strict';\n\n/**\n * Client\n * Provides methods to access PrintHouse...
javascript
chosen
[ { "from": "system", "value": "Handle null overrides and same module overrides\n" }, { "from": "human", "value": "const loaderUtils = require('loader-utils');\nconst path = require('path');\nconst deepMerge = require('./lib/deep-merge');\n\nfunction _removeModuleSyntax (moduleSource) {\n return ...
javascript
chosen
[ { "from": "system", "value": "Disable add-module-exports if no module transformer is used.\n" }, { "from": "human", "value": "const defaultOptions = {\n modules: false,\n};\n\nmodule.exports = function buildPreset(context, options) {\n return {\n presets: [\n [require('babel-preset-lat...
javascript
chosen
[ { "from": "system", "value": "Move the app to the menubar :sparkles:\n" }, { "from": "human", "value": "const {app, BrowserWindow} = require('electron');\n\nlet win;\n\nfunction createWindow() {\n\twin = new BrowserWindow({width: 800, height: 600});\n\n\twin.loadURL(`file://${__dirname}/src/inde...
javascript
chosen
[ { "from": "system", "value": "Copy listeners array since it might be changed in one of the listeners, especially in Safari\n" }, { "from": "human", "value": "'use strict'\n\nfunction signal(options) {\n var listeners = []\n var api = {\n push: function(listener) {\n if (listeners.index...
javascript
chosen
[ { "from": "system", "value": "[fix] Use the correct property name\n" }, { "from": "human", "value": "module.exports = (function store() {\n 'use strict';\n\n function nope() { /* Fallback for when no store is supported */ }\n\n try {\n sessionStorage.setItem('foo', 'bar');\n if (session...
javascript
chosen
[ { "from": "system", "value": "Change debug flag to match module name\n" }, { "from": "human", "value": "var Busboy = require('busboy'),\n bytes = require('bytes'),\n concat = require('concat-stream'),\n debug = require('debug')('busboy-bodyparser');\n\nmodule.exports = function (setting...
javascript
chosen
[ { "from": "system", "value": "Make Components enumerable in CommonJS export\n" }, { "from": "human", "value": "/* jshint node:true */\n'use strict';\n\n// Expose `React` as a global, because the ReactIntlMixin assumes it's global.\nvar oldReact = global.React;\nglobal.React = require('react');\n...
javascript
chosen
[ { "from": "system", "value": "Set correct path to look for options file\n" }, { "from": "human", "value": "/**\n * @file index\n * @author Jim Bulkowski <jim.b@paperelectron.com>\n * @project Paperelectron.com\n * @license MIT {@link http://opensource.org/licenses/MIT}\n */\n\n\nvar pomegranate ...
javascript
chosen
[ { "from": "system", "value": "Fix action name and prop setting\n" }, { "from": "human", "value": "import { repeat, take, splitAt, map } from 'ramda';\nimport { handleActions } from 'redux-actions';\n\nimport { buildTrie, tokenizer } from '../parser/parser';\nimport dubliners from '../texts/dubli...
javascript
chosen
[ { "from": "system", "value": "Change default border colour to pink\n" }, { "from": "human", "value": "'use strict'\n/* exported defaultBorderSettings defaultSettings */\n\nconst defaultBorderSettings = Object.freeze({\n\tborderType: 'momentary',\n\tborderColour: '#008000',\n\tborderLabelFontSize...
javascript
chosen
[ { "from": "system", "value": "Update on click event to de added dynamically to the DOM\n" }, { "from": "human", "value": "$().ready(() => {\n loadContentSection().then(() =>{ \n $(\"#loader\").addClass(\"hide\");\n $(\"#real-body\").removeClass(\"hide\");\n $(\"#real-body\").addClass(\...
javascript
chosen
[ { "from": "system", "value": "Add commented-out code for Materialise dropdowns.\n" }, { "from": "human", "value": "$(document).ready(function () {\n $('#submit-button').click(function() {\n var day = parseInt($('#day').val(), 10);\n var month = parseInt($('#month').val(), 10);\n...
javascript
chosen
[ { "from": "system", "value": "Comment attachment of onLoad event\n" }, { "from": "human", "value": "var Game = require('./models/game'),\n bowlingGame,\n bowlingBtn,\n onBowl,\n onLoad;\n\n// Create instance of bowling game\nbowlingGame = new Game();\n\n/**\n * Set up bowling game on...
javascript
chosen
[ { "from": "system", "value": "Add a few quick test TODOs\n" }, { "from": "human", "value": "describe('service', function() {\n beforeEach(module('ngAuth'));\n\n\n describe('version', function() {\n it('should return current version', inject(function(ngAuth) {\n console.log(ngAuth);\n ...
javascript
chosen
[ { "from": "system", "value": "Add support for extra transforms to be provided in options" }, { "from": "human", "value": "var browserify = require('browserify')\n , shim = require('browserify-shim')\n , hbsfy = require('hbsfy')\n , envify = require('envify')\n , brfs = r...
javascript
chosen
[ { "from": "system", "value": "Add test similar artist result\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport { test } from 'ember-qunit';\nimport startApp from '../helpers/start-app';\nvar App;\n\nmodule(\"Artist recommendation tests\", {\n setup: function() {\n App = s...
javascript
chosen
[ { "from": "system", "value": "Add battery state to Temperature Sensor\n\nThese work the same as the body sensors, so we can simply import\nthe existing capability.\n" }, { "from": "human", "value": "'use strict';\n\n\nconst SubDevice = require('./subdevice');\nconst { Temperature, Humidity } = r...
javascript
chosen
[ { "from": "system", "value": "Test posts route model works now - wrapped model promise in run loop\n" }, { "from": "human", "value": "/* global ic */\nimport { test , moduleFor } from 'ghost/tests/helpers/module_for';\nimport PostsRoute from 'ghost/routes/posts';\n\nmoduleFor('route:posts', \"Un...
javascript
chosen
[ { "from": "system", "value": "Fix up indentation and other config fo cppp mode\n" }, { "from": "human", "value": "define(function (require) {\n 'use strict';\n var jquery = require('jquery');\n var monaco = require('monaco');\n var cpp = require('vs/basic-languages/src/cpp');\n\n ...
javascript
chosen
[ { "from": "system", "value": "test(lint): Extend eslint config from correct package\n" }, { "from": "human", "value": "module.exports = {\n \"extends\": \"airbnb\",\n \"plugins\": [\n \"import\"\n ],\n \"rules\": {\n \"complexity\": [2, 6]\n },\n \"env\": {\n \"browser\": true\n ...
javascript
chosen
[ { "from": "system", "value": "Resolve to local react-router for UMD\n" }, { "from": "human", "value": "import babel from 'rollup-plugin-babel'\nimport uglify from 'rollup-plugin-uglify'\nimport replace from 'rollup-plugin-replace'\nimport commonjs from 'rollup-plugin-commonjs'\nimport resolve fr...
javascript
chosen
[ { "from": "system", "value": "Add JSX-transform / Bower-Registry to Webpack\n\n - Ability to parse jsx & json\n - Ability to require bower-packages in webpack\n" }, { "from": "human", "value": "/**\n * scripts.js\n * @name - \"scripts\"\n * @task - Compiles & uglifies AMD modules\n */\n\nvar gul...
javascript
chosen
[ { "from": "system", "value": "Fix unused variable and url selection" }, { "from": "human", "value": "/**\n * Created by Andrew on 12/7/2015.\n */\nfunction LaughingMan() {\n\n this.laughingManImage = \"https://i.imgur.com/u6A3oCM.gif\";\n}\n\nLaughingMan.prototype.start = function() {\n if...
javascript
chosen
[ { "from": "system", "value": "Fix bug where details could load before summary and hence missing loading users\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash');\nvar glimpse = require('glimpse');\n\n// store Found Summary\n(function () {\n function processFoundSumm...
javascript
chosen
[ { "from": "system", "value": "Bring registration endpoint responses up to spec\n" }, { "from": "human", "value": "var passport, path, Rat, rat, User, user\n\n\n\n\n\npassport = require( 'passport' )\npath = require( 'path' )\n\nRat = require( '../models/rat.js' )\nUser = require( '../models/user...
javascript
chosen
[ { "from": "system", "value": "Add shopping-cart route with handler.\n" }, { "from": "human", "value": "let React = require('react');\nlet RouterMixin = require('react-mini-router').RouterMixin;\nlet ArticlesControllerView = require('./articles-controller-view.react.js');\n\nconst App = React.cre...
javascript
chosen
[ { "from": "system", "value": "Update up to changes in es5-ext\n" }, { "from": "human", "value": "// Date object that always reflects current time (with one second resolution)\n\n'use strict';\n\nvar curry = require('es5-ext/lib/Function/curry').call\n\n , update;\n\nupdate = function () {\n\tth...
javascript
chosen
[ { "from": "system", "value": "Put file in correct place\n" }, { "from": "human", "value": "const path = require('path');\nconst jetpack = require('fs-jetpack');\nconst archive = require('./archive');\nconst info = require('./info');\nconst manifest = require('./manifest');\nconst config = requir...
javascript
chosen
[ { "from": "system", "value": "Fix header menu, by setting test plans as active\n" }, { "from": "human", "value": "define([\n 'jquery',\n 'underscore',\n 'backbone',\n 'models/testplan/TestPlanModel',\n 'collections/testplan/TestPlansCollection',\n 'views/testplans/TestPlansList...
javascript
chosen
[ { "from": "system", "value": "Fix edit links for guides\n" }, { "from": "human", "value": "var path = require('path'),\r\n\tyfm = require('assemble-yaml'),\r\n\tgrunt = require('grunt');\r\n\r\nmodule.exports = function (type, root) {\r\n\tvar files = grunt.file.expand(path.join(type, root, '**...
javascript
chosen
[ { "from": "system", "value": "Use max limit allowed by Spotify.\n" }, { "from": "human", "value": "import ActionFactory from '../utils/actionFactory';\nimport ConstantFactory from '../utils/constantFactory';\n\nexport const USER_PLAYLIST_CONSTANTS = ConstantFactory.buildAsyncFor('USER_PLAYLISTS'...
javascript
chosen
[ { "from": "system", "value": "Remove to-do items that will not be done.\n" }, { "from": "human", "value": "/**\n * `TaskCtx` constructor.\n *\n * Task functions will be invoked within a context established by this class.\n * The context binds the task to the `rivet` instance, and exposes a share...
javascript
chosen
[ { "from": "system", "value": "Add first request error handler\n" }, { "from": "human", "value": "import axios from 'axios'\n\nimport draw from './draw'\nimport state from '../state'\nimport updateUI from './updateUI'\nimport showError from './showError'\nimport parseResposne from './parseRespons...
javascript
chosen
[ { "from": "system", "value": "Copy piwik for dev env too\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar gulpSequence = require('gulp-sequence');\n\ngulp.task('build:development', function(cb) {\n //gulpSequence('clean', 'copy', ['fonts', 'images'], ['html'], ['webpa...
javascript
chosen
[ { "from": "system", "value": "Fix typo in feedback model\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(sequelize, DataTypes) {\n var notifications = sequelize.define('notifications', {\n msg: DataTypes.STRING,\n region_code: DataTypes.STRING\n ...
javascript
chosen
[ { "from": "system", "value": "Add ajax call to get total preprints from SHARE\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport config from 'ember-get-config';\n\nexport default Ember.Route.extend({\n fileManager: Ember.inject.service(),\n model() {\n return Embe...
javascript
chosen
[ { "from": "system", "value": "Add PricePerSMeter from nestoria api\n" }, { "from": "human", "value": "define([\"backbone\", \"underscore\", \"jquery\"], function(Backbone, _, $) {\n return Backbone.Model.extend({\n \t// data attributes\n defaults: {\n \tage: null,\n \tgender...
javascript
chosen
[ { "from": "system", "value": "Fix bug with not calling verify\n" }, { "from": "human", "value": "var venmo = Venmo(1424);\n\nfunction signin() {\n if (venmo.isAuthorized()) {\n $('#signin').addClass('is-hidden');\n picture();\n }\n\n $('.signin-button').click(function () {\n venmo.au...
javascript
chosen
[ { "from": "system", "value": "Update Device schema to make serialNo a unique index." }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\nvar ObjectId = Schema.Types.ObjectId;\nvar Mixed = Schema.Types.Mixed;\n\nvar device = new Schema({\n serialNo...
javascript
chosen
[ { "from": "system", "value": "Fix an issue that table row shrinks when dragging\n" }, { "from": "human", "value": "require('jquery-ui/ui/widgets/sortable');\n\n$(document).ready(() => {\n $('.weight').hide();\n $('.reorder').show();\n\n $('.sidebar-items tbody').sortable({\n axis: 'y',\n ...
javascript
chosen
[ { "from": "system", "value": "fix: Allow spaces/special chars in application names\n\ncloses #534\n" }, { "from": "human", "value": "'use strict';\n\nconst joi = require('joi');\nconst { nameType } = require('./util');\n\nconst applicationSchema = joi\n .object()\n .options({ stripUnknown:...
javascript
chosen
[ { "from": "system", "value": "Add common to fix terrible, terrible crashc\n" }, { "from": "human", "value": "var _ = require('underscore');\n\nmodule.exports = function(name) {\n \n var nameConversions = [\n initials = /^(\\w).*\\s(\\w).*$/\n firstInitialAndLastName = /^(\\w).*\\s(\\w+)$...
javascript
chosen
[ { "from": "system", "value": ":sparkles: Build script + lots of fixes\n\n - Add a build script that build a minizied presentation with all dependencies\n - Remove node-emojis dependency\n - Remove cross-spawn dependency\n - Refactor: Use lib directly instead of calling scripts from scripts. This...
javascript
chosen
[ { "from": "system", "value": "Add test to cover the case where `needs` isn't an array\n" }, { "from": "human", "value": "describe('lib/rules/disallow-positionalparams-extend', function () {\n var checker = global.checker({\n plugins: ['./lib/index']\n });\n\n describe('not config...
javascript
chosen
[ { "from": "system", "value": "Hide feedback notification after 5 seconds (rather than 10)\n" }, { "from": "human", "value": "Atmo.Views.NotificationHolder = Backbone.View.extend({\n initialize: function() {\n Atmo.notifications.bind('add', this.add_notification, this);\n },\n add...
javascript
chosen
[ { "from": "system", "value": "Support array of tokens in HTTP response\n" }, { "from": "human", "value": "// http-delivery.js\n\nvar _ = require('underscore');\n\nvar wrapper = require('../src/javascript-wrapper.js');\n\n/**\n * This updater takes response content, response type, and a {req, res...
javascript
chosen
[ { "from": "system", "value": "Make resolve work with node v0.6.10 .\n" }, { "from": "human", "value": "var Module = require('module');\nvar dirname = require('path').dirname;\n\nmodule.exports = function requireLike(path, uncached) {\n var parentModule = new Module(path);\n parentModule.filena...
javascript
chosen
[ { "from": "system", "value": "Remove Hyphen from Observation Sub ID\n" }, { "from": "human", "value": "'use strict'\n\nexports.name = 'OBX'\n\nexports.fields = [\n 'SegmentType'\n , 'SetID'\n , 'ValueType'\n , 'ObservationIdentifier'\n , 'ObservationSub-ID'\n , 'ObservationValue'\n , 'U...
javascript
chosen
[ { "from": "system", "value": "Implement loop for menu items, but order is reversed\n" }, { "from": "human", "value": "console.log(\"menu-fill\");\n\nvar menu_env = $(\"#menu-env\");\n\n\nvar item1 = menu_env_data[0];\nvar item2 = menu_env_data[1];\n\nfunction createSingleLevelMenuItem (item) {\n...
javascript
chosen
[ { "from": "system", "value": "Add JSDoc comment for MembershipResource usage\n" }, { "from": "human", "value": "const Resource = require('../api-resource').Resource;\n\nclass MembershipResource extends Resource {\n static resourceName() {\n return 'membership';\n }\n}\n\nmodule.exports = Me...
javascript
chosen
[ { "from": "system", "value": "Set proxy port to right address\n" }, { "from": "human", "value": "/*\n | For up-to-date information about the options:\n | http://www.browsersync.io/docs/options/\n */\n\nmodule.exports = {\n \"ui\": false, // { \"port\": 8181, \"weinre\": { \"port\": 8080 } }...
javascript
chosen
[ { "from": "system", "value": "Send name back on sucess\n" }, { "from": "human", "value": "var pg = require( 'pg' ),\n\tdb = require( './db' );\n\t\nexports.add = function( req, res ) {\n\tvar client = new pg.Client( db.conn );\n\tclient.connect();\n\t\n\tvar queryString = \"INSERT INTO neighborh...
javascript
chosen
[ { "from": "system", "value": "Fix limit bug in create Initiative method\n" }, { "from": "human", "value": "Meteor.startup(function() {\n Meteor.methods({\n addComment: function(initiativeId, input) {\n var userId = Meteor.userId();\n Meteor.users.update(userId, { $addToSet: { comme...
javascript
chosen
[ { "from": "system", "value": "Use new _marqueeOnRender_ api to simplify divider code.\n\nEnyo-DCO-1.1-Signed-off-by: Chris Patalano <christopher.patalano@lge.com>\n" }, { "from": "human", "value": "/**\n\t_moon.Divider_ is a simple styled component that may be used as a separator\n\tbetween grou...
javascript
chosen
[ { "from": "system", "value": "Fix failing test in documents\n\nThe changes-view was moved to a separate file.\n" }, { "from": "human", "value": "// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License. You may obtai...
javascript
chosen
[ { "from": "system", "value": "Support both PhantomJS 1 and 2" }, { "from": "human", "value": "var page = require('webpage').create();\nvar url = phantom.args[0];\n\npage.onConsoleMessage = function (message) {\n console.log(message);\n};\n\nfunction exit(code) {\n setTimeout(function(){ phanto...
javascript
chosen
[ { "from": "system", "value": "Fix minification for morphFormAttributes directive\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.morph').directive('morphFormAttributes', function(morph, $document) {\n return {\n restrict: 'A',\n scope: {\n form: '=morph...
javascript
chosen