conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make FastScroll a class, don't register by default\n" }, { "from": "human", "value": "var fastScroll = (function() {\n\n\t// Used to track the enabling of hover effects\n\tvar enableTimer = 0;\n\n\t/*\n\t * Listen for a scroll and use that to remove\n\t * the possib...
javascript
chosen
[ { "from": "system", "value": "Fix spellcheck suggestion redirection on firefox\n" }, { "from": "human", "value": "import React from 'react';\n\nclass SpellcheckPanel extends React.Component {\n renderSpellcheckCollations(){\n if(this.props.spellcheckData.length === 0)\n retu...
javascript
chosen
[ { "from": "system", "value": "Add getValue for checkbox-form-field to return the correct value\n" }, { "from": "human", "value": "Kwf.FrontendForm.Checkbox = Ext.extend(Kwf.FrontendForm.Field, {\n initField: function() {\n this.el.select('input').each(function(input) {\n inp...
javascript
chosen
[ { "from": "system", "value": "Fix deprecation warning for Github button on examples page\n" }, { "from": "human", "value": "import React from 'react';\nimport {findDOMNode} from 'react-dom';\n\nconst AUTHOR_REPO = 'ericgio/react-bootstrap-typeahead';\n\nconst GitHubStarsButton = React.createClas...
javascript
chosen
[ { "from": "system", "value": "Change a bit of text\n" }, { "from": "human", "value": "\"use strict\";\nconst { Event } = require(\"sosamba\");\nconst { version: sosambaVersion } = require(\"sosamba/package.json\");\nconst { version } = require(\"../package.json\");\n\nclass CommandErrorEvent ext...
javascript
chosen
[ { "from": "system", "value": "Correct default sensor data path\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n SERVE_INSECURE: false,\n SENSOR_DATA_PATH: '/var/lib/homecontrol/sensordata/temperatureSensors/TA',\n PROGRAMME_DATA_PATH: '/var/lib/homeco...
javascript
chosen
[ { "from": "system", "value": "Remove temporary artificial results limit.\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n define(\n [\n 'lodash',\n 'jquery'\n ],\n function (_, $) {\n return function (baseUrl, ajaxO...
javascript
chosen
[ { "from": "system", "value": "feat: Reduce user maximum number of interface calls per minute\n" }, { "from": "human", "value": "const MaxCallPerMinutes = 30;\n/**\n * Limiting the frequency of interface calls\n */\nmodule.exports = function () {\n let callTimes = {};\n setInterval(() => ca...
javascript
chosen
[ { "from": "system", "value": "Use void 0 instead of undefined\n" }, { "from": "human", "value": "'use strict';\n\n// MODULES //\n\nvar tape = require( 'tape' );\nvar proxyquire = require( 'proxyquire' );\n\n\n// VARIABLES //\n\nvar mpath = './../lib/';\n\n\n// TESTS //\n\ntape( 'main export is a...
javascript
chosen
[ { "from": "system", "value": "Update client script to handle reconnecting better\n" }, { "from": "human", "value": "var ws = new WebSocket('ws://cfc.jmgpena.net/ws');\n\nfunction renderMsg(message) {\n var div = document.createElement(\"div\");\n var content = document.createTextNode(messa...
javascript
chosen
[ { "from": "system", "value": "Change tasks to update once per hour by default\n" }, { "from": "human", "value": "module.exports = {\n port: 8000,\n tasks: {\n cdnjs: {hour: 1},\n google: {hour: 1},\n jsdelivr: {hour: 1}\n }\n};\n" }, { "from": "gpt", "va...
javascript
chosen
[ { "from": "system", "value": "Clarify names and fix a recursive bug\n" }, { "from": "human", "value": "function extend (target, source) {\n if (source === null || typeof source !== 'object') {\n return source;\n }\n\n if (source.constructor !== Object && source.constructor !== Array) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use 'return' to break out of function\n" }, { "from": "human", "value": "\nvar http = require(\"http\");\nvar https = require(\"https\");\nvar Promise = require(\"promise\");\n\nmodule.exports = {\n download: function(url) {\n url = this.completeUrl(url);\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add prettify function for tab constants\n" }, { "from": "human", "value": "'use strict'\nexport const STARTUP_TAB = 'STARTUP_TAB'\nexport const FOLDER_TAB = 'FOLDER_TAB'\nexport const CHAT_TAB = 'CHAT_TAB'\nexport const PEOPLE_TAB = 'PEOPLE_TAB'\nexport const DEVICE...
javascript
chosen
[ { "from": "system", "value": "Make 'childLinkViews' and Ember Array\n\nMake the `childLinkViews` property an Ember Array, instead of having\nthe Computed Properties convert it (setup for future commits). This\ncommit includes a few other related changes;\n\n* Create the initial array in the `init()` hook\n*...
javascript
chosen
[ { "from": "system", "value": "Switch to code authorization flow\n" }, { "from": "human", "value": "// This is the default configuration for the dev mode of the web console.\n// A generated version of this config is created at run-time when running\n// the web console from the openshift binary.\n...
javascript
chosen
[ { "from": "system", "value": "Move variable declarations and add section headers\n" }, { "from": "human", "value": "'use strict';\n\n// TODO: clean-up\n\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar divide = require( 'compute-divide' );\nvar mean = require( 'compute-mean' );\nvar s...
javascript
chosen
[ { "from": "system", "value": "[reference] Change the buildin action of the refernece.\n" }, { "from": "human", "value": "var loadManyReferenceList = require('./builder').loadMany;\nvar dispatcher = require('../dispatcher');\nmodule.exports =\nfunction(referenceNames){\n return function(){\n ...
javascript
chosen
[ { "from": "system", "value": "Fix issues with not using dots reporter on travis\n" }, { "from": "human", "value": "/*globals require, __dirname */\n/* jshint node:true */\n'use strict';\n\nvar gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar karma = require('karma').server;\nva...
javascript
chosen
[ { "from": "system", "value": "Update iconFont sass generator for use with nunjucks-render 2.0.0\n\nRE: b0b1cfbfd542860eca0c8c48ff406f626122a709@chaelli!\n" }, { "from": "human", "value": "var gulp = require('gulp')\nvar render = require('gulp-nunjucks-render')\nvar rename = r...
javascript
chosen
[ { "from": "system", "value": "Make sur init.js file is loaded before unit tests\n\nUnit tests files are not always loaded in the same order, thus init.js is not always loaded before unit tests.\n" }, { "from": "human", "value": "module.exports = {\n \n // Core unit tests\n core: {\n option...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary call to angular.extend.\n" }, { "from": "human", "value": "(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define(['exports', 'angular'], factory);\n } else if (typeof exports === 'object') {\n ...
javascript
chosen
[ { "from": "system", "value": "Use enter and escape to stage changes to the cell name\n\nSort of confusing if you look at the implementation, but produces the\ndesired user experience. There’s a two-step saving process with cell\nnames now. The user has to change the cell name and hit Enter (or\nmanually blu...
javascript
chosen
[ { "from": "system", "value": "Refactor hw2 Q16 & Q17 code\n" }, { "from": "human", "value": "import generateData from './data-generator.js';\nimport train from './train.js';\n\nlet eInTotal = 0;\nlet eOutTotal = 0;\n\nfor (let i = 0; i < 5000; i++) {\n let generatedData = generateData(20, tru...
javascript
chosen
[ { "from": "system", "value": "Change implementation for classify method\n\nstart checking for deficient numbers then move to check for perfect and abundant numbers\n" }, { "from": "human", "value": "class PerfectNumbers{\n\n /**\n * Classifies numbers to either perfect, abundant or deficient b...
javascript
chosen
[ { "from": "system", "value": "Add watch task to gulp\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar browserify = require('browserify');\nvar babelify = require('babelify');\n// var mocha = require('gulp-mocha');\nvar through2 = require('through2');\n\ngulp.t...
javascript
chosen
[ { "from": "system", "value": "Make widget independent from jquery\n" }, { "from": "human", "value": "\n// Success handler\nvar successHandler = function(status){\n if (window.console != undefined) {\n console.log(\"Purchase completed successfully: \", status);\n }\n window.locati...
javascript
chosen
[ { "from": "system", "value": "test: Use plan instead of manual count\n" }, { "from": "human", "value": "var fs = require('../');\nvar rimraf = require('rimraf');\nvar mkdirp = require('mkdirp');\nvar test = require('tap').test;\nvar p = require('path').resolve(__dirname, 'files');\n\nprocess.chd...
javascript
chosen
[ { "from": "system", "value": "Use del instead of gulp-rimraf\n" }, { "from": "human", "value": "var babel = require('gulp-babel');\nvar clean = require('gulp-rimraf');\nvar gulp = require('gulp');\nvar mocha = require('gulp-mocha');\nvar plumber = require('gulp-plumber');\n\ngulp.task('...
javascript
chosen
[ { "from": "system", "value": "Allow the fixture adapter to be queried." }, { "from": "human", "value": "import DS from 'ember-data';\n\nexport default DS.FixtureAdapter.extend({\n});\n" }, { "from": "gpt", "value": "import DS from 'ember-data';\n\nexport default DS.FixtureAdapter.ext...
javascript
chosen
[ { "from": "system", "value": "Add watch tasks to automatically recompile js\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar babel = require(\"gulp-babel\");\n\ngulp.task('build', () => {\n return gulp.src('src/**/*.js')\n .pipe(babel())\n .pipe(gulp.dest('dis...
javascript
chosen
[ { "from": "system", "value": "Save stocks when prices change\n" }, { "from": "human", "value": "(function(exports) {\n const randInt = (min, max) => {\n const range = max - min;\n return Math.round(\n min + Math.random() * range\n );\n };\n\n function generateStocks({minPrice, m...
javascript
chosen
[ { "from": "system", "value": "Fix navbar due to js processing" }, { "from": "human", "value": "$(window).load(function() {\n\t$('div.source pre, pre code').each(function(i, e) {\n\t\te.innerHTML = e.innerHTML.replace(/\\n/g, \"<br />\").replace(/\\t/g, \"&nbsp;&nbsp;\");\n\t});\n})\n\n" }, {...
javascript
chosen
[ { "from": "system", "value": "Build all files in `src`.\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar babel = require('gulp-babel');\n\ngulp.task('default', function() {\n return gulp.src('src/URTSI.js')\n .pipe(babel())\n .pipe(gulp.dest('dist'));\n});\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Add a check for history and replaceState." }, { "from": "human", "value": "window.extractToken = (hash) => {\n const match = hash.match(/access_token=(\\w+)/);\n let token = !!match && match[1];\n if (!token) {\n token = localStorage.getItem('ello_access_token...
javascript
chosen
[ { "from": "system", "value": "Optimize startsWith algorithm in HeaderCtrl\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * @ngdoc function\n * @name otaniemi3dApp.controller:HeaderCtrl\n * @description\n * # HeaderCtrl\n * Controller of the otaniemi3dApp\n */\nangular.module('otaniemi...
javascript
chosen
[ { "from": "system", "value": "Package settings now read from package file in parent folder\n" }, { "from": "human", "value": "var through = require('through2')\nvar gutil = require('gulp-util')\nvar superagent = require('superagent')\nvar extend = require('extend')\n\nvar PluginError = gutil.Pl...
javascript
chosen
[ { "from": "system", "value": "Set up user input validation\n" }, { "from": "human", "value": "$( document ).ready(function() {\n\tvar stageNum = 1;\n $( \"#addStage\" ).click(function() {\n \t\tvar newStage = \"<li class='stage' ><h4>Stage \" + stageNum + \"</h4>Number of people <input typ...
javascript
chosen
[ { "from": "system", "value": "Copy only the required fonts when building\n" }, { "from": "human", "value": "// Brunch configuration\n// See http://brunch.io for documentation.\n'use strict';\n\nmodule.exports = {\n files: {\n javascripts: {\n joinTo: {\n 'scripts/main.js': ['app/...
javascript
chosen
[ { "from": "system", "value": "Use actions directly rather than proxy through another func.\n" }, { "from": "human", "value": "var h = require('virtual-dom/h')\n\nmodule.exports = CreateColumn\n\nfunction CreateColumn (props) {\n var name, type\n\n return h('div', [\n h('h1', 'Create new col...
javascript
chosen
[ { "from": "system", "value": "Use karma phantomjs in travis e2e-tests\n" }, { "from": "human", "value": "var config = require('./protractor-shared.conf').config;\n\nconfig.allScriptsTimeout = 30000;\nconfig.seleniumArgs = [ '-browserTimeout=60' ];\n\nconfig.capabilities = {\n browserName: 'ph...
javascript
chosen
[ { "from": "system", "value": "Make date string format slightly friendlier\n" }, { "from": "human", "value": "/**\n * Handlebars Helpers\n */\n\n'use strict';\n\nvar Handlebars = require('hbsfy/runtime');\nvar moment = require('moment');\n\nHandlebars.registerHelper('parseDate', function(opti...
javascript
chosen
[ { "from": "system", "value": "Set select value after init\n" }, { "from": "human", "value": "\nimport Ember from \"ember\";\n\nexport default Ember.Component.extend({\n\n tagName: 'div',\n classNames: ['ui', 'selection', 'dropdown', 'fluid'],\n classNameBindings: ['multiple', 'search'],\n\n ...
javascript
chosen
[ { "from": "system", "value": "Use autoprefixer for css prefixing\n" }, { "from": "human", "value": "'use strict';\n\nvar cssAid = require('css-aid')\n , getFiles = require('./css-bundle-get-files');\n\nmodule.exports = function (indexPath, readFile) {\n\treturn getFiles(indexPath, readFile)(f...
javascript
chosen
[ { "from": "system", "value": "Expand range of wave sum simulator.\n" }, { "from": "human", "value": "/** Global variables for processing.js access **/\nvar waveSpeed = 3;\nvar timestep = 0.3\nvar w = 0.3;\nvar w2 = 0.45;\nvar playing = false;\n\n/** Page setup **/\n$(document).ready(function() {...
javascript
chosen
[ { "from": "system", "value": "Set default language to English\n" }, { "from": "human", "value": "// Localisation\nimport Vue from 'vue'\nimport VueI18n from 'vue-i18n'\nVue.use(VueI18n)\nimport locales from './locales'\n\nconst i18n = new VueI18n({\n locale: 'fr',\n fallbackLocale: 'en',\n me...
javascript
chosen
[ { "from": "system", "value": "Add a noop pipe to ensure end is called\n" }, { "from": "human", "value": "import gulp from 'gulp';\nimport nugetRestore from 'gulp-nuget-restore';\n\nexport default {\n /**\n * Task name\n * @type {String}\n */\n name: 'sitecore:nuget-restore',\n\n /**\n ...
javascript
chosen
[ { "from": "system", "value": "Check for undefined var in clearEvents\n" }, { "from": "human", "value": "\nfunction BasicEventRenderer() {\n\tvar t = this;\n\t\n\t\n\t// exports\n\tt.renderEvents = renderEvents;\n\tt.clearEvents = clearEvents;\n\t\n\n\t// imports\n\tDayEventRenderer.call(t);\n\n\...
javascript
chosen
[ { "from": "system", "value": "Include rules and long_description from API\n" }, { "from": "human", "value": "import DS from 'ember-data';\n\nexport default DS.Model.extend({\n name: DS.attr(\"string\"),\n description: DS.attr(\"string\"),\n startAt: DS.attr(\"date\"),\n percentageComplete: D...
javascript
chosen
[ { "from": "system", "value": "Update Component split lazy loading\n" }, { "from": "human", "value": "import Vue from './Vue'\nimport App from './App'\nimport About from './components/Aboutme'\nimport Profile from './components/Profile'\nimport Contact from './components/Contact'\nimport Products...
javascript
chosen
[ { "from": "system", "value": "Add JS HTML methods assignment\n" }, { "from": "human", "value": "// DOM Manipulation Challenge\n\n\n// I worked on this challenge [by myself, with: ].\n\n\n// Add your JavaScript calls to this page:\n\n// Release 0:\n\n\n\n\n// Release 1:\n\n\n\n\n// Release 2:\n\n...
javascript
chosen
[ { "from": "system", "value": ":white_check_mark: Include more unit test to validate template parse with nested template tags\n" }, { "from": "human", "value": "/*\n * templateSpec.js\n *\n * Distributed under terms of the MIT license.\n */\n/* global describe, it, expect */\n\n\nvar requirejs = ...
javascript
chosen
[ { "from": "system", "value": "Make jsdoc the default task\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n jsdoc = require('gulp-jsdoc'),\n docsSrcDir = './assets/js/**/*.js',\n docsDestDir = './docs/js',\n jsDocTask;\n\njsDocTask = function() {\n return gulp.src(doc...
javascript
chosen
[ { "from": "system", "value": "Fix up linter and flow warnings\n" }, { "from": "human", "value": "// @flow\nimport React, { Component } from 'react'\nimport { connect } from 'react-redux'\nimport { editorials } from '../actions/editorials'\nimport StreamContainer from '../containers/StreamContain...
javascript
chosen
[ { "from": "system", "value": "Add base test for getSVG function. It fails\n" }, { "from": "human", "value": "defaultConf = {\n height: 100,\n width: 300,\n fingerprintLength: 4\n};\n\ndescribe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constructor Cap...
javascript
chosen
[ { "from": "system", "value": "Fix display of coverage report\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar plugins = require('gulp-load-plugins')();\nvar runSequence = require('run-sequence');\n\ngulp.task('test', function(done) {\n\treturn runSequence('test-unit', 'test-co...
javascript
chosen
[ { "from": "system", "value": "[expo-updates] Change directory to project root before loading asset manifest\n\n- Fixes https://github.com/expo/expo/issues/8374#issuecomment-666640157\n" }, { "from": "human", "value": "const { loadAsync } = require('@expo/metro-config');\nconst Server = require('...
javascript
chosen
[ { "from": "system", "value": "Add custom path for migrations and seeds\n" }, { "from": "human", "value": "require('dotenv').config();\n\nmodule.exports = {\n development: {\n client: process.env.DB_CLIENT,\n connection: {\n database: process.env.DB_NAME,\n ...
javascript
chosen
[ { "from": "system", "value": "Comment out bndb initializer unit tests since bndb has been disabled\n" }, { "from": "human", "value": "var expect = require('chai').expect,\n request = require('superagent').agent(),\n PrettyCSS = require('PrettyCSS'),\n jshint = require('jshint').JSHINT,\...
javascript
chosen
[ { "from": "system", "value": "Fix gulp not copying resources initially\n" }, { "from": "human", "value": "var gulp = require(\"gulp\");\nvar browserify = require(\"browserify\");\nvar source = require(\"vinyl-source-stream\");\nvar watchify = require(\"watchify\");\nvar tsify = require(\"tsify\"...
javascript
chosen
[ { "from": "system", "value": "Remove fail on error and make sure to actually copy the JS files to the build dir\n" }, { "from": "human", "value": "const gulp = require('gulp');\nconst eslint = require('gulp-eslint');\n\nconst srcDir = './src';\nconst buildDir = './lib';\n\ngulp.task(\"lint\", fu...
javascript
chosen
[ { "from": "system", "value": "Switch to stacked area graph\n" }, { "from": "human", "value": "import _ from 'lodash';\nimport Highcharts from 'highcharts';\n\nfunction patientsByGroupDateGraph(adapter) {\n return {\n scope: {\n groupType: '@',\n type: '@'\n },\n template: '<d...
javascript
chosen
[ { "from": "system", "value": "Add main app module first to js files that will be concatenated\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n var gulp = require('gulp');\n var plugins = require('gulp-load-plugins')();\n\n gulp.task('bundle', bundle);\n gulp.task('start-...
javascript
chosen
[ { "from": "system", "value": "Adjust content margin to match sidebar logo\n" }, { "from": "human", "value": "import styled, { css } from 'styled-components'\nimport rem from 'polished/lib/helpers/rem'\nimport { mobile } from '../utils/media'\n\nexport const Container = styled.div`\n padding-lef...
javascript
chosen
[ { "from": "system", "value": "Add hostname when express starts.\n" }, { "from": "human", "value": "// _____ _____ _\n// | _ |___ ___ ___| __ |___| |\n// | __| . | | . | __ -| . | _|\n// |__| |___|_|_|_ |_____|___|_|\n// |___|\n\n'use strict';\n\nvar mongo...
javascript
chosen
[ { "from": "system", "value": "Add typescript tasks for conversion\n" }, { "from": "human", "value": "var fs = require('fs'),\n gulp = require('gulp'),\n rename = require('gulp-rename'),\n browserify = require('gulp-browserify'),\n header = require('gulp-header'),\n concat = requir...
javascript
chosen
[ { "from": "system", "value": "Add bower as a dependency of production\n" }, { "from": "human", "value": "var spawn = require('child_process').spawn;\n\nvar gulp = require('gulp');\nvar server = require( 'gulp-develop-server' );\nvar bower = require('gulp-bower');\n\ngulp.task('watch-src', functi...
javascript
chosen
[ { "from": "system", "value": "Comment out gulp task for the time being. It is not used.\n" }, { "from": "human", "value": "var gulp = require('gulp');\n\ngulp.task('default', function() {\n gulp.src('./node_modules/font-awesome/fonts/**/*.{eot,svg,ttf,woff,woff2}')\n .pipe(gulp.dest('....
javascript
chosen
[ { "from": "system", "value": "Fix a bug in how we draw frequency\n\nIf the last value drawn for the frequency is not zero, then the entire\nfrequency chart is drawn off at a crazy angle until it subsides again.\n" }, { "from": "human", "value": "var Anima = Anima || {};\n\nAnima.frequencyBuffer ...
javascript
chosen
[ { "from": "system", "value": "Add a default value for the language flag\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.core').directive('translateLanguage', [\n '$translate',\n 'translator',\n function($translate, translator) {\n return {\n restrict: 'A...
javascript
chosen
[ { "from": "system", "value": "Create a fake window to load polymer.\n" }, { "from": "human", "value": "// Copyright 2014 Google Inc. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License....
javascript
chosen
[ { "from": "system", "value": "Fix the regexp that ate the quiz page\n" }, { "from": "human", "value": "function getParameterByName(name) {\n var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);\n return match && decodeURIComponent(match[1].replace(/\\+/g, ' '));\n}\...
javascript
chosen
[ { "from": "system", "value": "Fix preference default in new browser extension\n" }, { "from": "human", "value": "pref(\"extensions.firebug.DBG_ZIPKIN\", false);\npref(\"extensions.zipkin.profile_site\", \"^((\\\\w+\\\\.)+)?(twitter)\\\\.com$\");\npref(\"extensions.zipkin.zipkin_site\", \"https:/...
javascript
chosen
[ { "from": "system", "value": "Fix search form test failure\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport TextInput from './common/TextInput';\nimport SelectInput from './common/SelectInput';\n\nconst SearchForm = ({ query, placeholder ...
javascript
chosen
[ { "from": "system", "value": "Add front end css parser\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('sgApp')\n .controller('MainCtrl', function ($scope, Socket) {\n // Emit ready event.\n Socket.emit('ready');\n\n // Listen for the talk event.\n Socket.on('upda...
javascript
chosen
[ { "from": "system", "value": "Update event defs to get VariableEvent\n" }, { "from": "human", "value": "'use babel'\n\n/* @flow */\n\nimport DebuggerMi2 from './debugger-mi2'\nimport type { EventDefs } from 'debugger'\n\nmodule.exports = {\n instance: null,\n BreakpointEvent: null,\n SessionE...
javascript
chosen
[ { "from": "system", "value": "Update filterable mixin so multiple terms (separated by a space) can be used to filter data.\n" }, { "from": "human", "value": "/*\n * To use this mixin, a component needs:\n * - A computed property called \"items\" containing items we want to filter.\n * - A data/c...
javascript
chosen
[ { "from": "system", "value": "[RN] Use a SafeAreaView for OverlayFrame\n" }, { "from": "human", "value": "// @flow\n\nimport React, { Component } from 'react';\nimport { View } from 'react-native';\n\nimport { overlayFrame as styles } from './styles';\n\n/**\n * The type of the React {@code Comp...
javascript
chosen
[ { "from": "system", "value": "Revert \"No longer need preview header\"\n\nThis reverts commit f438527ab3a01e94d3b9ea70d286378f9683fc96.\n" }, { "from": "human", "value": "\"use strict\";\nconst gh = require(\"simple-github\");\nconst jwt = require(\"jsonwebtoken\");\n\nconst CERT = process.env.G...
javascript
chosen
[ { "from": "system", "value": "Update react-server-gulp-module-tagger to use new interface\n" }, { "from": "human", "value": "var replace = require(\"gulp-replace\")\n, forEach = require(\"gulp-foreach\")\n, loggerSpec = require(\"react-server-module-tagger\")\n\n// This pattern matches eithe...
javascript
chosen
[ { "from": "system", "value": "Add another email obfuscation helper.\n" }, { "from": "human", "value": "require ([\n 'event_utils'\n], function (\n eventUtils\n) {\n eventUtils.onReady( function() {\n var l = ['e', 'd.l', 'ebi', 'b-en', 'eff', 'o', 'gar', 'tie', 'Bniem'];\n ...
javascript
chosen
[ { "from": "system", "value": "Fix the content-type check in the webservice\n" }, { "from": "human", "value": "'use strict';\n\nvar joblint = require('joblint');\n\nmodule.exports = defineController;\n\nfunction defineController (app) {\n app.all('/ws', function (req, res, next) {\n res...
javascript
chosen
[ { "from": "system", "value": "Add custom validation message for uniqueness constraint for topic slug\n" }, { "from": "human", "value": "Topics = new Mongo.Collection('topics');\n\nTopicSchema = new SimpleSchema({\n title: {\n type: String\n },\n categoryId: {\n type: String\n },\n bod...
javascript
chosen
[ { "from": "system", "value": "Fix browser colours and settings\n" }, { "from": "human", "value": "'use strict';\n\nexports.green = function (str) {\n return str;\n};\n\nexports.yellow = function (str) {\n return str;\n};\n\nexports.red = function (str) {\n return str;\n};\n\nexports.green = f...
javascript
chosen
[ { "from": "system", "value": "Use aggregated data in stats cause it’s smaller and we can use the cached version" }, { "from": "human", "value": "var updateQueryStats = function(element){\n //fragment=-1 means getting all the data\n var shuffleUrl = templates.urls.sentData({\n my...
javascript
chosen
[ { "from": "system", "value": "Make babelify generate source maps with relative paths\n" }, { "from": "human", "value": "const gulp = require(\"gulp\");\nconst del = require(\"del\");\nconst browserify = require(\"browserify\");\nconst babelify = require(\"babelify\");\nconst src = require(\"viny...
javascript
chosen
[ { "from": "system", "value": "Make the context item expression correctly predict the result order\n" }, { "from": "human", "value": "import Expression from '../Expression';\nimport Sequence from '../dataTypes/Sequence';\nimport Specificity from '../Specificity';\n\n/**\n * @extends {Expression}\...
javascript
chosen
[ { "from": "system", "value": "Fix jquery bug after umd fixes\n" }, { "from": "human", "value": "if(window.jQuery) {\n (function ( $ ) {\n $.fn.snabbt = function(arg1, arg2) {\n\n return snabbt(this.get(), arg1, arg2);\n };\n }( jQuery ));\n}\n" }, { "from": "gpt", "value...
javascript
chosen
[ { "from": "system", "value": "Fixed: Resolve the path to the RequireJS instead of hardcoding it.\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2014, CKSource - Frederico Knabben. All rights reserved.\n * Licensed under the terms of the MIT License (see LICENSE.md).\n */\n\n'use strict...
javascript
chosen
[ { "from": "system", "value": "Use disallow instead of disable\n\n" }, { "from": "human", "value": "const auth = require('@feathersjs/authentication');\nconst hooks = require('feathers-hooks-common');\nconst globalHooks = require('../../../hooks');\nconst lookupSchool = require('./lookupSchool');...
javascript
chosen
[ { "from": "system", "value": "Check if not already started before starting updates\n" }, { "from": "human", "value": "'use strict';\n\nvar postal = require('postal');\nvar raf = require('raf');\nvar FluzoStore = require('fluzo-store')(postal);\n\nvar fluzo_channel = postal.channel('fluzo');\n\nv...
javascript
chosen
[ { "from": "system", "value": "Remove not usedn gulp task any more\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar env = require('gulp-env');\nvar fs = require('fs');\n\nvar projectPath = 'app/';\nvar outputPath = 'public/build/';\nvar configPath = 'config/';\...
javascript
chosen
[ { "from": "system", "value": "Copy builded file to example/js/ on build\n" }, { "from": "human", "value": "var gulp = require('gulp')\nvar uglify = require('gulp-uglify')\nvar rename = require('gulp-rename')\nvar header = require('gulp-header')\nvar ghPages = require('gulp-gh-pages')\n\nvar pkg ...
javascript
chosen
[ { "from": "system", "value": "Fix issue with gulp-jscs not using options in .jscsrc\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar jscs = require('gulp-jscs');\nvar babel = require('gulp-babel');\nvar rename = require('gulp-rename')...
javascript
chosen
[ { "from": "system", "value": "Remove z-index from navigation bar, since it's not fixed by default\n" }, { "from": "human", "value": "import styled from 'styled-components';\nimport get from 'extensions/themeGet';\n\nconst NavigationBar = styled.header.withConfig({\n displayName: 'NavigationBar'...
javascript
chosen
[ { "from": "system", "value": "Add workaround for electron webview issue with disappearing cursors\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { observer } from 'mobx-react';\nimport ElectronWebView from 'react-electron...
javascript
chosen
[ { "from": "system", "value": "Use .search for browser compatibility." }, { "from": "human", "value": "module.exports = WatchIgnorePlugin\n\nfunction WatchIgnorePlugin(paths) {\n this.paths = paths\n}\n\nWatchIgnorePlugin.prototype.apply = function (compiler) {\n compiler.plugin('after-envi...
javascript
chosen
[ { "from": "system", "value": "Add auto JS building on source change\n" }, { "from": "human", "value": "'use strict';\n\nvar browserify = require('browserify');\nvar gulp = require('gulp');\nvar source = require('vinyl-source-stream');\nvar buffer = require('vinyl-buffer');\nvar uglify = require(...
javascript
chosen
[ { "from": "system", "value": "Move dispatching WebComponentsReady until after HTMLImports.whenReady is patched.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license ...
javascript
chosen
[ { "from": "system", "value": "Create default logger object if one is not sent\n" }, { "from": "human", "value": "var winston = require('winston'),\n path = require('path');\n\nvar logLevel = 'warn';\n\nvar sharedLogger = function(filename) {\n return new winston.Logger({\n level: logLe...
javascript
chosen