conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use requestAnimationFrame instead of setTimeout.\n\nPerformance is finally reasonable enough in Chrome that it's better to\nuse rAF than fancy setTimeout tick timing.\n" }, { "from": "human", "value": "!function(exports) {\n 'use strict';\n\n var TARGET_FPS = 60,\...
javascript
chosen
[ { "from": "system", "value": "Fix the bugs in the main code\n\n ref #58\n" }, { "from": "human", "value": "'use babel';\n\nlet InteractiveConfigurationPanel = null;\nlet RandomTipPanel = null;\n\ninitializeInteractiveConfiguration() {\n if (InteractiveConfigurationPanel !== null) return ;\n\n ...
javascript
chosen
[ { "from": "system", "value": "Fix teams screen throwing error and not loading\n" }, { "from": "human", "value": "function viewTeams() {\n\n getTeams(\n success = function (data) {\n populateTeamsTable(data.teams);\n },\n error = function (jqxhr) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add non-breaking spaces to navigation bar\n" }, { "from": "human", "value": "/**\n *\n * Nav.react.js\n *\n * This component renders the navigation bar\n *\n */\n\nimport React, { Component } from 'react';\nimport { Link } from 'react-router';\nimport { logout } fro...
javascript
chosen
[ { "from": "system", "value": "[FIND-46] Add click types to Javascript\n\n[rev: matthew.gordon]\n" }, { "from": "human", "value": "/*\n * Copyright 2014-2016 Hewlett-Packard Development Company, L.P.\n * Licensed under the MIT License (the \"License\"); you may not use this file except in complia...
javascript
chosen
[ { "from": "system", "value": "Call pushObject rather than addObject\n" }, { "from": "human", "value": "App.InvestigationsController = Ember.ArrayController.extend({\n needs: ['project'],\n \n actions: {\n createInvestigation: function () {\n var investigation = this.store.createRecord...
javascript
chosen
[ { "from": "system", "value": "Revert \"Try sending the full hash to api\"\n\nThis reverts commit 25e7790b9a3d00d22d866fc0e5b99f0f6a6ed04b.\n" }, { "from": "human", "value": "function submit_score(score) {\n auth_data = get_auth_data()\n submit_data = auth_data + \"&\" + score\n call_api...
javascript
chosen
[ { "from": "system", "value": "Use keys from filter object in allowed properties.\n" }, { "from": "human", "value": "var evals = [ 'undefined', 'null', 'false', 'true' ];\n\nvar _filters = {\n\tregex: function(value) {\n\t\treturn new RegExp(value, 'i');\n\t},\n\n\texists: function(value) {\n\t\t...
javascript
chosen
[ { "from": "system", "value": "Refactor to use method calls rather than direct def calls.\n" }, { "from": "human", "value": "module.exports = (function() {\n\n var def = require('./def');\n var Handler = require('./Handler');\n\n var Jokes = def.type();\n\n Jokes.def_method(function match(msg...
javascript
chosen
[ { "from": "system", "value": "Change font for the whole app\n" }, { "from": "human", "value": "import React from 'react';\n\nimport AddTodoForm from './AddTodoForm';\nimport TodoList from './TodoList';\n\nexport default class App extends React.Component {\n state = {\n todos: []\n }\n\n re...
javascript
chosen
[ { "from": "system", "value": "Update component name after rebase\n" }, { "from": "human", "value": "import Vue from \"vue/dist/vue.esm\";\nimport VueRouter from 'vue-router';\nVue.use(VueRouter);\nVue.config.productionTip = process.env.NODE_ENV == \"development\";\n\nimport store from \"../store...
javascript
chosen
[ { "from": "system", "value": "Update tests to match classic tinkerpop graph\n" }, { "from": "human", "value": "/*jshint -W030 */\nvar gremlin = require('../');\n\ndescribe('Nashorn syntax', function() {\n it('should handle .localeCompare() in lieu of <=> operator', function() {\n var client ...
javascript
chosen
[ { "from": "system", "value": "Rewrite branch URLs that match patterns set from options\n" }, { "from": "human", "value": "(function () {\n var empty = { branches: [] };\n\n function findPullRequestLinks() {\n\tvar links = document.getElementsByTagName(\"a\");\n\treturn links;\n }\n f...
javascript
chosen
[ { "from": "system", "value": "Add source roots for source maps\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar smaps = require('gulp-sourcemaps');\n\ngulp.task('default', ['build']);\n\ngulp.task('build', function() {\n var babel = require('gulp-babel');\n...
javascript
chosen
[ { "from": "system", "value": "Add NumericLiteralNode to ast constructors\n" }, { "from": "human", "value": "function KIFNode(kifExpressions) {\n this.type = 'KIFNode';\n this.expressions = this.expressions || [];\n this.expressions = this.expressions.concat(kifExpressions);\n}\n\nfunction Wor...
javascript
chosen
[ { "from": "system", "value": "build: Enable classes transform for react-hot-loader interop.\n" }, { "from": "human", "value": "const env = process.env.BABEL_ENV || process.env.NODE_ENV || 'development';\nconst browsers = process.env.BROWSERSLIST;\n\nconst targets = {};\nif (browsers) {\n target...
javascript
chosen
[ { "from": "system", "value": "Improve the assertion error for fixture diff\n" }, { "from": "human", "value": "'use strict';\n\nconst assert = require('assert');\nconst readFileSync = require('fs').readFileSync;\nconst joinPath = require('path').join;\nconst jscodeshift = require('jscodeshift');\...
javascript
chosen
[ { "from": "system", "value": "Add some vertical space to the tests\n" }, { "from": "human", "value": "/**\n * grimoire-skill\n *\n * @license MIT\n * @copyright Voxable 2016\n */\n\n'use strict';\n\n/*eslint-env node, mocha*/\n\nlet expect = require( 'chai' ).expect;\nlet Skill = require( '../' ...
javascript
chosen
[ { "from": "system", "value": "Add ability to say goodbye\n" }, { "from": "human", "value": "'use strict';\n\nvar util = require('util');\n\nvar chat = require('../api/chat');\n\nvar handleMessage = function (message) {\n\n console.log(message);\n\n if (process.env.user_id === message.user)...
javascript
chosen
[ { "from": "system", "value": "Configure Raven with a fake DSN to prevent errors in output\n" }, { "from": "human", "value": "// Generate a single webpack bundle for all tests for faster testing\n// See https://github.com/webpack/karma-webpack#alternative-usage\n\n// Include all files that end wi...
javascript
chosen
[ { "from": "system", "value": "Fix bug in DateUtilities test suite.\n" }, { "from": "human", "value": "'use strict';\n\ndescribe(\"Date Utilities\", function() {\n\n describe(\"Function 'roundToFollowingHalfHour'\", function() {\n\n it(\"Before half hours\", function() {\n va...
javascript
chosen
[ { "from": "system", "value": "Add lint and reformat target.\n\nThis is part of the ground work to have a consistent style to the template\nJSON documents. Two targets are defined.\n\n * Lint - verify all JSON templates follow the approved style.\n * Reformat - modify all JSON templates to follow the approv...
javascript
chosen
[ { "from": "system", "value": "Set grunt watch use default task to generate .min.js file\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n concat: {\n options: {\n s...
javascript
chosen
[ { "from": "system", "value": "Change build script to node\n" }, { "from": "human", "value": "var builder = require('./lib/nebula-builder');\nvar baseConfig = require('./lib/base-config');\nvar configBuilder = require('./lib/config-builder');\nvar fs = require('fs');\n\nmodule.exports = function(...
javascript
chosen
[ { "from": "system", "value": "Add FF, Safari and Chrome to tests\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n var browsers = [\n {\n browserName: 'internet explorer',\n platform: 'Windows 10',\n version: '11.285'\n }\n ...
javascript
chosen
[ { "from": "system", "value": "Switch default branch to survival\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.loadNpmTasks('grunt-screeps');\n\n grunt.initConfig({\n screeps: {\n options: {\n email: '<EMAIL>',\n ...
javascript
chosen
[ { "from": "system", "value": "Update grunt for bin file" }, { "from": "human", "value": "module.exports = function(grunt) {\n var path = require('path');\n\n grunt.initConfig({\n clean: [\n 'dist'\n ],\n transpile: {\n app: {\n type: 'cjs',\n files: [{\n ...
javascript
chosen
[ { "from": "system", "value": "Change an option for a grunt task\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // Load tasks\n grunt.loadNpmTasks('grunt-nodemon');\n grunt.loadNpmTasks('grunt-contrib-less');\n grunt.loadNpmTasks('grunt-contrib-watch');\n ...
javascript
chosen
[ { "from": "system", "value": "Add missing [] from url\n" }, { "from": "human", "value": "'use strict';\n\nvar express = require('express'),\n request = require('superagent'),\n app = express(),\n config = require('./config');\n\napp.get('*', function(req, res){\n var endpoint = co...
javascript
chosen
[ { "from": "system", "value": "Change where badEmailToken error is declared\n" }, { "from": "human", "value": "const Boom = require('boom');\nconst bookshelf = require('../../bookshelf');\n\nmodule.exports = (server, ValidationError) => async (value, options) => {\n const tokenQuery = bookshelf....
javascript
chosen
[ { "from": "system", "value": "Update HB.Session.signIn to modern standards\n\n * Update signIn to use ic.ajax (and leave redirecting as an exercise for the reader)\r\n * Remove getAuthToken, signInWithOptionalRedirect (lol) and signIn aliases\r\n * Change url for signIn to /sign-in to match the signOut path...
javascript
chosen
[ { "from": "system", "value": "Add underscore dependency to data loader\n" }, { "from": "human", "value": "\"use strict\";\n\nvar $ = require('jquery');\n\nvar DataLoader = function() {\n\treturn {\n\t\tget: function(uniprotID) {\n\t\t\treturn $.ajax('http://ves-ebi-ca:8082/us/rest/features/' + u...
javascript
chosen
[ { "from": "system", "value": "Add tests for setting prefix\n" }, { "from": "human", "value": "import { expect } from 'chai';\n\nimport { Tags, addOrRemoveTag } from '../extra-keys';\n\n// see: https://github.com/mochajs/mocha/issues/1847\nconst { describe, it } = global;\n\n\ndescribe('Markdown/...
javascript
chosen
[ { "from": "system", "value": "Add check for global notification toggle\n" }, { "from": "human", "value": "'use strict'\n\nconst config = require(__dirname + '/../config')\nconst SparkPost = require('sparkpost')\n\nconst Notification = function () {\n this.sparkpost = new SparkPost(config.get('e...
javascript
chosen
[ { "from": "system", "value": "Use interface instead of refinement.\n" }, { "from": "human", "value": "\"use strict\";\n\nconst T = require(\"tcomb\");\nconst assign = require(\"lodash.assign\");\nconst rootDir = require(\"app-root-dir\");\n\nconst Options = T.refinement(T.Object, function...
javascript
chosen
[ { "from": "system", "value": "Change how port is determined\n" }, { "from": "human", "value": "var http = require('http');\nvar config = require('./config');\n\nvar server = http.createServer(function (req, res) {\n res.writeHead(200, {'Content-Type': 'text/plain'});\n res.end('Hello World\\n'...
javascript
chosen
[ { "from": "system", "value": "Use relative path to avoid problems in gh-pages\n" }, { "from": "human", "value": "// Worker initialisation\nvar worker = new SharedWorker('/worker.js');\nworker.port.addEventListener('message', function(evt) {\n onMessage(evt.data);\n});\nworker.addEventListener('...
javascript
chosen
[ { "from": "system", "value": "Update SpecRole to not lower case first char.\n\nRoles should start with lowercase, but we dont need to enforce.\nFor now keep SpecRole class even though its just a wrapper of a string to show that this is important concept in our DI.\n" }, { "from": "human", "value...
javascript
chosen
[ { "from": "system", "value": "Remove unused name in Statistics constructor.\n" }, { "from": "human", "value": "'use strict';\n\nconst Stats = require('fast-stats').Stats;\n\nfunction percentileName(percentile) {\n if (percentile === 0) {\n return 'min';\n } else if (percentile === 100) {\n ...
javascript
chosen
[ { "from": "system", "value": "Change native Object.assign with lodash assign\n" }, { "from": "human", "value": "/**\n * Construct a function_score query\n * https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html\n * @param {Array} functions Array o...
javascript
chosen
[ { "from": "system", "value": "Support setLevel() with a stub\n" }, { "from": "human", "value": "// Miscellaneous helpers\n//\n\n// log4js is optional.\nfunction getLogger(label) {\n var log;\n try {\n log = require('log4js')().getLogger(scrub_creds(label || 'audit_couchdb'));\n log.setLe...
javascript
chosen
[ { "from": "system", "value": "Support apps in organisations for Application.get\n" }, { "from": "human", "value": "var _ = require(\"lodash\");\nvar Bacon = require(\"baconjs\");\n\nvar Logger = require(\"../logger.js\");\n\nvar Application = module.exports;\n\nApplication.getInstanceType = func...
javascript
chosen
[ { "from": "system", "value": "[api] Allow for `construct` to be a function.\n" }, { "from": "human", "value": "var assert = require('assert');\n\nmodule.exports = function (options) {\n options = options || {};\n\n var Transport = options.Transport;\n var name = Transport.name || options.name...
javascript
chosen
[ { "from": "system", "value": "Sort cover by names.fr 1\n" }, { "from": "human", "value": "Template.home.helpers({\n\tcovers: function() {\n\t\treturn MangasData.find({});\n\t}\n});\n" }, { "from": "gpt", "value": "Template.home.helpers({\n\tcovers: function() {\n\t\treturn MangasData...
javascript
chosen
[ { "from": "system", "value": "Fix autologin for versioned feeds.\n" }, { "from": "human", "value": "/**\n * Automatically log in a user with a userId and key, so they can view/upload to a feedsource.\n */\n\nvar app = require('application');\n\nmodule.exports = function () {\n var feedSourceI...
javascript
chosen
[ { "from": "system", "value": "Add - Simplest code to turn the Given into concrete actions (HTTP request to check that a POST resource exists)\n" }, { "from": "human", "value": "/*\nWe use the output messages from the cucumber runner to create Step Definitions:\nthe glue between features written ...
javascript
chosen
[ { "from": "system", "value": "Add feedback js to search page\n\nThis was missing so the feedback component fell back to the no JS version.\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//...
javascript
chosen
[ { "from": "system", "value": "Revert \"Added a more reliable css selector and fixed parsing bug\"\n\nThis reverts commit 19b98b00ca4fdc04f650570062de16c771063741.\n" }, { "from": "human", "value": "(function removeZeroCategoriesFromCoverOverbudgeting() {\r\n\r\n if (typeof Em !== 'undefined' &&...
javascript
chosen
[ { "from": "system", "value": "Fix promise test using a worker/semaphore hack\n\n(looks like we need support for async tests)\n" }, { "from": "human", "value": "var assert = require(\"assert\");\nvar {defer, promises} = require(\"ringo/promise\");\n\nexports.testPromiseList = function() {\n va...
javascript
chosen
[ { "from": "system", "value": "Improve code style in jsx-seconds-elapsed example\n" }, { "from": "human", "value": "/** @jsx hJSX */\nimport {run, Rx} from '@cycle/core';\nimport {makeDOMDriver, hJSX} from '@cycle/dom';\n\nfunction main(drivers) {\n let secondsElapsed$ = Rx.Observable.interval(1...
javascript
chosen
[ { "from": "system", "value": "Fix js for photo deletion. When the user chooses “Cancel”, he doesn't see anymore a page with the word “false” on it.\n" }, { "from": "human", "value": "/* $This file is distributed under the terms of the license in /doc/license.txt$ */\nfunction delete_photo(passUr...
javascript
chosen
[ { "from": "system", "value": "Use dedicated indexeddb worker import\n" }, { "from": "human", "value": "/*\nCopyright 2017 Vector Creations Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a ...
javascript
chosen
[ { "from": "system", "value": "Support for a LOT of tests\n" }, { "from": "human", "value": "var stresstest = require('stresstest');\nvar timeouttest = require('timeouttest');\n\nvar win = Ti.UI.createWindow({});\n\nvar list = Ti.UI.createView({\n width: Ti.UI.SIZE,\n height: Ti.UI.SIZE,\n lay...
javascript
chosen
[ { "from": "system", "value": "Add single-line-stringified error to error.message case\n" }, { "from": "human", "value": "'use strict';\nvar inherits = require('inherits');\n\ninherits(APIError, Error);\nmodule.exports = APIError;\nfunction APIError (error, request) {\n if (!(this instanceof API...
javascript
chosen
[ { "from": "system", "value": "Add useful info in source\n\ngit-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@61378 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "human", "value": "/* \n * $Id$\n * (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project\n * \n * All Ri...
javascript
chosen
[ { "from": "system", "value": "Handle null case for client id\n" }, { "from": "human", "value": "\"use strict\";\n\nvar restify = require('restify');\nvar async = require('async');\nvar Anyfetch = require('anyfetch');\n\n\nmodule.exports.get = function get(req, res, next) {\n if(!req.query.conte...
javascript
chosen
[ { "from": "system", "value": "Check if notebook prop is null\n" }, { "from": "human", "value": "import React from 'react';\nimport Notebook from './components/notebook';\n\nimport * as commutable from 'commutable';\nimport Immutable from 'immutable';\n\nconst NotebookPreview = (props) => {\n co...
javascript
chosen
[ { "from": "system", "value": "Add Basic Event Emitter export\n\nEvent Emitter Lite. Does not include Enhanced Event Emitter methods" }, { "from": "human", "value": "import NGN from './ngn.js'\nimport { register } from './internal.js'\n\n// Register the instance so it can be detected by plugins\n...
javascript
chosen
[ { "from": "system", "value": "Fix https origin in CORS.\n" }, { "from": "human", "value": "import express from 'express';\nimport leagueTips from 'league-tooltips';\nimport runTask from './cronTask';\nimport taskGenerator from './cronTasks/generator';\nimport config from './config';\nimport rout...
javascript
chosen
[ { "from": "system", "value": "Add dev and porod mode.\n" }, { "from": "human", "value": "import React , { Component , PropTypes }from 'react';\nimport { Provider } from 'react-redux';\nimport createStore from './store/create';\nimport NotificationCenter from './component/notification-center';\ni...
javascript
chosen
[ { "from": "system", "value": "Return a plain object to support Babel 6" }, { "from": "human", "value": "import { AST_Node, Compressor, TreeWalker } from 'uglify-js';\n\nvar compressor = Compressor();\n\nclass LocationFixer extends TreeWalker {\n\tconstructor(path) {\n\t\tvar filename = path.hub....
javascript
chosen
[ { "from": "system", "value": "Include the regenerator-runtime in the build\n" }, { "from": "human", "value": "import KinveyProvider from './provider';\nimport { NetworkRack } from 'kinvey-javascript-sdk-core/es5/rack/rack';\nimport { HttpMiddleware } from 'kinvey-javascript-sdk-core/es5/rack/mid...
javascript
chosen
[ { "from": "system", "value": "Revert \"Breaking change to test Travis\"\n\nThis reverts commit 795475b070ef56ce7d4ba50bce4f84a9b664b67b.\n" }, { "from": "human", "value": "var test = require('tape');\nvar toDo = require('../libs/to-do-handler');\n\ntest('shouldGetToDoListForUsername', function(t...
javascript
chosen
[ { "from": "system", "value": "Return initial state when stat is undefined." }, { "from": "human", "value": "import thunk from 'redux-thunk'\nimport createLogger from 'redux-logger'\nimport createBrowserHistory from 'history/lib/createBrowserHistory'\nimport { compose, createStore, applyMiddlewar...
javascript
chosen
[ { "from": "system", "value": "Increase the max buffer so it never errors on that\n\nEven with huge output.\n" }, { "from": "human", "value": "'use strict';\nconst childProcess = require('child_process');\nconst dargs = require('dargs');\nconst resolveCwd = require('resolve-cwd');\n\nconst BIN = ...
javascript
chosen
[ { "from": "system", "value": "Move session injection to the top of the app controller\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n open: false,\n\n openClass: Ember.computed('open', function() {\n return this.get('open') ? 'open...
javascript
chosen
[ { "from": "system", "value": "Check if extension is .js before prepending" }, { "from": "human", "value": "\"use strict\";\nvar ConcatSource = require('webpack-sources/lib/ConcatSource');\nvar fs = require('fs');\n\nclass PrependPlugin {\n constructor(args) {\n if (typeof args !== 'obj...
javascript
chosen
[ { "from": "system", "value": "Convert hidden message to lower case JFF\n" }, { "from": "human", "value": "'use strict';\n\nvar parseConcat = require('..');\n\nvar stread = require('stread');\n\n\nit('should concat-stream and JSON.parse', function (done) {\n var data = {\n name: null,\n ve...
javascript
chosen
[ { "from": "system", "value": "Replace trailing whitespaces for example code." }, { "from": "human", "value": "\"use strict\";\n\nfunction simplePassing() {\n describe('test embedded mocha', function() {\n it('should run jasmine-style tests', function() {\n expect(1)\n .toBe(1);\n...
javascript
chosen
[ { "from": "system", "value": "Make this works on windows too" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar spawn = require('child_process').spawn\nvar npm = require.resolve('npm/cli')\n\nspawn(npm, process.argv.slice(2), {stdio: 'inherit'})\n" }, { "from": "gpt", "value...
javascript
chosen
[ { "from": "system", "value": "Add support for MongoDB 2.4.1.\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar config = require('config');\nvar semver = require('semver');\n\n// configure mongodb\nmongoose.connect(config.mongodb.connectionString || 'mongodb://...
javascript
chosen
[ { "from": "system", "value": "Extend HTTP basic auth example\n" }, { "from": "human", "value": "import http from \"k6/http\";\nimport { check } from \"k6\";\n\nexport default function() {\n // Passing username and password as part of URL will authenticate using HTTP Basic Auth\n let res = ...
javascript
chosen
[ { "from": "system", "value": "Enable auto-refresh when inviting a participant to an inventory\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular.module('PDRClient')\n .controller('InviteInventoryUserCtrl', InviteInventoryUserCtrl);\n\n InviteInventoryUserCtrl.$i...
javascript
chosen
[ { "from": "system", "value": "Add useYarn to npm adapter initialisation\n" }, { "from": "human", "value": "'use strict';\n\nvar BowerAdapter = require('../dependency-manager-adapters/bower');\nvar NpmAdapter = require('../dependency-manager-adapters/npm');\n\nmodule.exports = {\n generateFromCo...
javascript
chosen
[ { "from": "system", "value": "Rename container to App to be easer to extend the boilerplate\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport { Provider } from 'react-redux';\nimport CounterApp from './App';\n\nexport default class Root extends Compo...
javascript
chosen
[ { "from": "system", "value": "Use lazyFunctionRequire for improved import performance.\n" }, { "from": "human", "value": "import webpack from '../webpack';\n\nexport default {\n description: `\n # roc-plugin-typescript\n A roc plugin for compiling typescript (*.ts and *.tsx) files. It u...
javascript
chosen
[ { "from": "system", "value": "Remove Debugger Statement From Route\n\nRemove a debugger statement in the application route.\n" }, { "from": "human", "value": "import config from '../config/environment';\nimport {\n inject as service\n} from '@ember/service';\nimport AuthenticateRoute from 'whol...
javascript
chosen
[ { "from": "system", "value": "Load custom preprocessor from \".thought/hb-preprocessor.js\" change name of custom helper file to \".thought/hb-helpers.js\"\n" }, { "from": "human", "value": "/*!\n * thought <https://github.com/nknapp/thought>\n *\n * Copyright (c) 2015 Nils Knappmeier.\n * Relea...
javascript
chosen
[ { "from": "system", "value": "Fix chart js copy/paste error\n" }, { "from": "human", "value": "(function(root) {\n\n var McasScaledChart = function initializeMcasScaledChart (series) {\n this.title = 'MCAS score';\n this.series = series;\n };\n\n McasScaledChart.fromChartData = function...
javascript
chosen
[ { "from": "system", "value": "Fix load method response for csv time in columns reader\n" }, { "from": "human", "value": "import CSVReader from 'readers/csv/csv';\nimport { isNumber } from 'base/utils';\n\nconst CSVTimeInColumnsReader = CSVReader.extend({\n\n _name: 'csv-time_in_columns',\n\n i...
javascript
chosen
[ { "from": "system", "value": "Change the flag name for the host option in the REPL\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar repl = require('repl');\nvar util = require('util');\nvar program = require('commander');\nvar protocol = require('../lib/protocol.json');\nvar Chrome ...
javascript
chosen
[ { "from": "system", "value": "Use const instead of var in Vue instance\n\nReference to Pull Request #3871" }, { "from": "human", "value": "\n/**\n * First we will load all of this project's JavaScript dependencies which\n * include Vue and Vue Resource. This gives a great starting point for\n * ...
javascript
chosen
[ { "from": "system", "value": "Fix minification errors in confEditor\n" }, { "from": "human", "value": "'use strict';\nangular.module('arethusa.core').constant('CONF_ROUTE', {\n controller: 'ConfEditorCtrl',\n templateUrl: 'templates/conf_editor.html',\n resolve: {\n load: function ($http, ...
javascript
chosen
[ { "from": "system", "value": "Substitute the model in its corresponding place.\n" }, { "from": "human", "value": "'use strict';\n\nvar dragula = require('dragula');\n\n/*jshint unused: false*/\nfunction register (angular) {\n return ['dragulaService', function angularDragula (dragulaService) {\...
javascript
chosen
[ { "from": "system", "value": "Create and call toggleSelectedArrItem function\n" }, { "from": "human", "value": "var selectMode = false;\nvar selected = [];\nvar selectModeToggle = document.getElementById('selectModeToggle');\nvar deleteButton = document.getElementById('delete');\nvar emoticonsCo...
javascript
chosen
[ { "from": "system", "value": "Fix bug with multiple quizes in a row\n" }, { "from": "human", "value": "let Quiz;\nlet currentQuizWord = {};\nlet currentArray = 0;\nlet test = 0;\n\nasync function startQuiz(folderKey) {\nawait fetch(`/study?folderKey=${folderKey}`)\n .then(res => res.json())\...
javascript
chosen
[ { "from": "system", "value": "Fix the value stat getter when no records available\n" }, { "from": "human", "value": "'use strict';\nvar _ = require('lodash');\nvar P = require('bluebird');\nvar FilterParser = require('./filter-parser');\n\nfunction ValueStatGetter(model, params, opts) {\n\n fun...
javascript
chosen
[ { "from": "system", "value": "Fix blacks in following style\n" }, { "from": "human", "value": "// @flow\nimport * as Constants from '../constants/searchv3'\nimport {globalColors} from '../styles'\n\nconst followingStateToStyle = (followingState: Constants.FollowingState) => {\n return {\n Fo...
javascript
chosen
[ { "from": "system", "value": "Comment out paste plain text line and give the option to paste with formatting.\n" }, { "from": "human", "value": "CKEDITOR.editorConfig = function( config ) {\n config.allowedContent = true;\n config.removeFormatTags = \"\";\n config.protectedSource.push(/<r:([\...
javascript
chosen
[ { "from": "system", "value": "Remove vm. for local variable in function.\n\n– SAAS-116\n" }, { "from": "human", "value": "'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('BodyClassService', [BodyClassService]);\n\n function BodyClassService() {\n var vm = this;\n...
javascript
chosen
[ { "from": "system", "value": "Call getCheckoutComponent to register component in parent window\n" }, { "from": "human", "value": "/* @flow */\n\nimport { isPayPalDomain } from '@paypal/sdk-client/src';\nimport { PopupOpenError as _PopupOpenError } from 'zoid/src';\n\nimport { setupLogger, allowI...
javascript
chosen
[ { "from": "system", "value": "Use $apply() in ngChanged to immediately propagate model changes.\n\nOtherwise, if ngChanged was used to refresh after changes in frame URLs, the\nframe was only reloaded after triggering a second AngularJS dirty checking\ncycle.\n" }, { "from": "human", "value": "a...
javascript
chosen
[ { "from": "system", "value": "Fix crash on delete in private message\n" }, { "from": "human", "value": "const BotModule = require('../BotModule');\n\nmodule.exports = BotModule.extend({\n config: null,\n i18n: null,\n dependencies: {\n 'config': 'config',\n 'i18n': 'i18n',...
javascript
chosen
[ { "from": "system", "value": "Allow to use custom r.js with relative path\n" }, { "from": "human", "value": "/*\n * grunt-require\n * https://github.com/asciidisco/grunt-requirejs\n *\n * Copyright (c) 2012 asciidisco\n * Licensed under the MIT license.\n */\n\nexports.init = function(grunt) {\n...
javascript
chosen
[ { "from": "system", "value": "Update location search to match new API\n" }, { "from": "human", "value": "define([\n\t'models/location'\n], function(\n\t\tLocationModel\n) {\n\t\n\tvar baseUrl = 'api/locations';\n\t\n\tvar collection = {\n\t\t\n\t\tmodel: LocationModel,\n\t\t\n\t\turl: baseUrl,\n...
javascript
chosen
[ { "from": "system", "value": "Change BITD to new loader format" }, { "from": "human", "value": "define(['mac/bitpacking'], function(bitpacking) {\n\n 'use strict';\n \n return function(resource) {\n resource.getUnpackedData = function() {\n return bitpacking.unpackBits(this.data.buffe...
javascript
chosen
[ { "from": "system", "value": "Remove streed requirement from validation" }, { "from": "human", "value": "/**\n * Copyright © 2016 Magento. All rights reserved.\n * See COPYING.txt for license details.\n */\n/*global define*/\ndefine(\n [],\n function () {\n 'use strict';\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add new Modal storybook doc\n" }, { "from": "human", "value": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { withInfo } from '@storybook/addon-info';\n\nimport Modal, { PureModal } from '@ichef/gypcrete/src/Modal';\nimport { get...
javascript
chosen
[ { "from": "system", "value": "Remove console.log on report again\n" }, { "from": "human", "value": "Meteor.methods({\n report: function (url, reports) {\n console.log(\"reporting to \", url);\n Meteor.http.post(url, {\n data: reports\n });\n return null;\n }\n});\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Clear message textbox after message is sent.\n" }, { "from": "human", "value": "var CHAT_SERVER = \"http://localhost:7000\"\nvar DEFAULT_USERNAME = \"Guest\";\n$(document).ready(function(){\n var socket = io.connect(CHAT_SERVER); \n socket.on('welcome', showGreet...
javascript
chosen