conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Allow es6 modules\n- set modules to true for emcaFeatures\n"
},
{
"from": "human",
"value": "var baseConfig = require('./index'),\n\textend = require('extend');\n\nvar reactConfig = {\n \"ecmaFeatures\": {\n \"jsx\": true\n },\n \"env\": {\n \"browser\": tr... | javascript | chosen |
[
{
"from": "system",
"value": "Write jasmine specs for the Survey Model.\n"
},
{
"from": "human",
"value": "(function(){\n\t\n\tdescribe('survey model', function() {\n\n\t\tit('checks if the model is empty', function() {\n\t\t\tmodel = require('models/survey');\n\t\t\tmodel.truncate();\n\t\t\texp... | javascript | chosen |
[
{
"from": "system",
"value": "Expand home shorthand in CLI help around `THELOUNGE_HOME` environment variable\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst colors = require(\"colors/safe\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nlet home;\n\nclass Utils {\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove permission checks for now\n"
},
{
"from": "human",
"value": "/*\n This file handles all authentication checking used in the API using promises.\n\n It serves as wrapper of the identity management which uses callbacks.\n */\nmodule.exports = {\n checkPermis... | javascript | chosen |
[
{
"from": "system",
"value": "Handle xpress deprecate warning regarding req.param()\n"
},
{
"from": "human",
"value": "var express = require('express')\nvar router = express.Router()\n\nrouter.get('/', function (req, res, next) {\n console.log('Cookies: ', req.cookies)\n if (Object.keys(req.co... | javascript | chosen |
[
{
"from": "system",
"value": "Set canBeDeleted for ingredients of recipes fetched\n"
},
{
"from": "human",
"value": "import uuid from 'uuid';\n\nexport default class RecipeService {\n static addUniqueIdsForIngredients(ingredients) {\n return ingredients.map(ingredient => ({id: uuid.v4(... | javascript | chosen |
[
{
"from": "system",
"value": "Test (Tracker): Remove DOM tests\n"
},
{
"from": "human",
"value": "import { expect } from 'chai';\nimport { Tracker } from '../src';\n\ndescribe('Tracker', () => {\n before() => {\n window.scrollTo(0, 0);\n document.getElementById('container').innerHTML = ''... | javascript | chosen |
[
{
"from": "system",
"value": "Insert data into Images collection\n"
},
{
"from": "human",
"value": "Template.createBetForm.helpers({\n photo: function(){\n return Session.get(\"photo\");\n }\n})\n\nTemplate.createBetForm.events({\n \"submit .create-bet\" : function(event){\n event.preve... | javascript | chosen |
[
{
"from": "system",
"value": "Update user plugin to use deduped kolibri module.\n"
},
{
"from": "human",
"value": "const KolibriModule = require('kolibri_module');\nconst coreActions = require('kolibri.coreVue.vuex.actions');\nconst router = require('kolibri.coreVue.router');\n\nconst Vue = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Add default select and update record option\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar log4js = require('log4js');\nvar logger = log4js.getLogger('Converter');\n\nvar inputFile = process.argv[2];\n\nif(!inputFile){\n\n printUsage();\n}\n\n/**... | javascript | chosen |
[
{
"from": "system",
"value": "Use list instead of table for module table\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport { Table, TableBody, TableRow, TableRowColumn } from 'material-ui/Table';\n\nconst ModuleTable = ({\n modules,\n removeModule,\n}) => (\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add guard to ensure `deprecations` is initialized.\n"
},
{
"from": "human",
"value": "import resolver from './helpers/resolver';\nimport {\n setResolver\n} from 'ember-qunit';\nimport QUnit from 'qunit';\nimport Ember from 'ember';\n\nsetResolver(resolver);\n\nlet ... | javascript | chosen |
[
{
"from": "system",
"value": "Update to avoid status different of available."
},
{
"from": "human",
"value": "var tds = document.querySelectorAll(\"tr > td.disponibilidade\");\n\nfor (i = 0; i < tds.length; i++) {\n if (tds[i].innerHTML.trim() == \"Esgotado\"){\n var tr = tds[i].parentElemen... | javascript | chosen |
[
{
"from": "system",
"value": "Normalize quotes for js skeleton"
},
{
"from": "human",
"value": "if (Meteor.isClient) {\n // counter starts at 0\n Session.setDefault(\"counter\", 0);\n\n Template.hello.helpers({\n counter: function () {\n return Session.get(\"counter\");\n }\n });\... | javascript | chosen |
[
{
"from": "system",
"value": "Drop trashed items from dynamic pending feed\n"
},
{
"from": "human",
"value": "(function () {\n var cogClass = function () {};\n cogClass.prototype.exec = function (params, request, response) {\n var oops = this.utils.apiError;\n var sys = this.... | javascript | chosen |
[
{
"from": "system",
"value": "[DEV-3932] Remove unnecesasry dependency from demo\n"
},
{
"from": "human",
"value": "const bodyParser = require('body-parser')\nconst express = require('express');\nconst hellosign = require('hellosign-sdk');\nconst path = require('path');\n\nconst app = express();... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure to await async function.\n"
},
{
"from": "human",
"value": "\nimport VCDonationModel from './VCDonationModel'\nimport addVc from '../users/addVc'\nimport addVcDonatedAllTime from '../users/addVcDonatedAllTime'\n\n/**\n * Donate the user's virtal currency t... | javascript | chosen |
[
{
"from": "system",
"value": "Add button, card, dataTable, grid, layout, menu, spinner, tabs and textfield \"sub modules\" to bundle\n"
},
{
"from": "human",
"value": "const webpack = require('webpack');\nconst path = require('path');\nconst libraryName = 'react-to-mdl';\n\n// export config\nmod... | javascript | chosen |
[
{
"from": "system",
"value": "Convert arrow functions to function markup\n\nWithout this, navigo will not run in IE11."
},
{
"from": "human",
"value": "/* global __dirname, require, module*/\n\nconst path = require(\"path\");\nconst yargs = require(\"yargs\");\nconst env = yargs.argv.env; // use... | javascript | chosen |
[
{
"from": "system",
"value": "Add minify stage when not dev\n"
},
{
"from": "human",
"value": "require('webpack');\n\nmodule.exports = {\n entry: {\n main:'./src/frontend/components/App.jsx',\n admin: './src/frontend/components/admin/AdminDashboard.jsx',\n networkAdmin: '... | javascript | chosen |
[
{
"from": "system",
"value": "Make browserHistory routing actually work.\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\n\nvar babelSettings = JSON.stringify({\n presets: ['es2015', 'react']\n});\n\nmodule.exports = {\n entry: [\n '... | javascript | chosen |
[
{
"from": "system",
"value": "Address new ESLint warnings from previous change.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst webpack = require(\"webpack\");\n\nconst config = {\n\t\"target\": \"node\",\n\t\"entry\": \"./extension.js\",\n\t\"output\": {\n\t\t\"path\": __dirname,\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix webpack not transpiling .jsx files\n"
},
{
"from": "human",
"value": "const path = require(\"path\");\n\nmodule.exports = {\n context: __dirname,\n entry: \"./frontend/entry.js\",\n output: {\n path: path.join(__dirname, 'app', 'assets', 'javascripts'),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add authorize middleware for routs requiring logged user\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst controllers = require('../controllers/base.controller');\nconst csrf = require('csurf') ({ cookie: true });\n\nmodule.exports = (app) => {\n app\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for slides in all the pages\n"
},
{
"from": "human",
"value": "$().ready(function() {\n \n});"
},
{
"from": "gpt",
"value": "$().ready(function() {\n var lastSlideIndex = +$(\"[data-slide]:last\").attr(\"data-slide\");\n\n var curren... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests run in Firefox\n"
},
{
"from": "human",
"value": "describe(\"form submit event\", function () {\n\n\t$.fixture(\"options\");\n\n\tsubject(function () {\n\t\treturn new Awesomplete(\"#inside-form\", { list: [\"item1\", \"item2\", \"item3\"] });\n\t});\n\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix logical OR with port number\n"
},
{
"from": "human",
"value": "const http = require('http');\nconst path = require('path');\n\nconst express = require('express');\n\nconst socketServer = require('./socketServer');\n\nconst app = express();\n\napp.use(express.sta... | javascript | chosen |
[
{
"from": "system",
"value": "Check that whitespace is trimmed when adding todos\n"
},
{
"from": "human",
"value": "import setup from './test.setup.js';\nimport { Simulate } from 'react-addons-test-utils';\n\n\nconst ENTER = 13;\n\n\ndescribe('App', function() {\n let $component;\n\n beforeEac... | javascript | chosen |
[
{
"from": "system",
"value": "Write a \\n at the end of the doc html files.\n"
},
{
"from": "human",
"value": "\n/**\n * Compiles a single file's dox output using the template.jade file.\n */\n\nvar fs = require('fs')\n , basename = require('path').basename\n , jade = require('jade')\n , high... | javascript | chosen |
[
{
"from": "system",
"value": "Use vs-notify and add vuex store\n"
},
{
"from": "human",
"value": "/* global chrome*/\nimport Vue from 'vue';\nimport App from './App';\nimport router from './router';\nimport Vuex from 'vuex';\nimport Buefy from 'buefy';\n\nwindow.addEventListener('unload', () => ... | javascript | chosen |
[
{
"from": "system",
"value": "Split html with newlines for easier debugging\n"
},
{
"from": "human",
"value": "define([\n 'common/views/govuk',\n 'stache!common/templates/dashboard'\n],\nfunction (GovUkView, contentTemplate) {\n var DashboardView = GovUkView.extend({\n contentTemplate: con... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor code using es6 es6 syntax\n"
},
{
"from": "human",
"value": "'use strict';\nmodule.exports = {\n up: function(queryInterface, Sequelize) {\n return queryInterface.createTable('Users', {\n id: {\n allowNull: false,\n autoIncrement: tru... | javascript | chosen |
[
{
"from": "system",
"value": "Fix syntax error not rendering book id properly\n"
},
{
"from": "human",
"value": "$(function(){\n $.getJSON('/collections/' + collectionId + '.json', function(data){\n var collection = new Collection(data.id, data.name, data.user, data.books, data.comments);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add TabNavigator to the core package\n\nBasically the idea is to get closer and closer to the final application.\n"
},
{
"from": "human",
"value": "// @flow\n\nimport * as React from 'react';\nimport { withMappedNavigationAndConfigProps as withMappedProps } from 're... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Modify the expression of sequence and sequence consistent maps\n"
},
{
"from": "human",
"value": "export default {\n default: [\n '呵呵', '哈哈', '吐舌', '啊', '酷', '怒', '开心', '汗', '泪', '黑线',\n '鄙视', '不高兴', '真棒', '钱', '疑问', '阴险', '吐', '咦', '委屈', '花心'... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure buttons don't overlap\n"
},
{
"from": "human",
"value": "rhok.view.createIssue = function() {\n\tvar createButton = Ti.UI.createButton({ \n\t\tsystemButton : Ti.UI.iPhone.SystemButton.ADD,\n\t\ttitle : 'Add issue'\n\t});\n\t\n\tcreateButton.addEventListene... | javascript | chosen |
[
{
"from": "system",
"value": "Make toDate test less dependent on local time\n"
},
{
"from": "human",
"value": "import { HOUR_IN_PIXELS } from '../src/Constants';\nimport toDate from '../src/toDate';\n\nit('sets the right hour', () => {\n const expected = new Date();\n expected.setHours(4, 0, 0... | javascript | chosen |
[
{
"from": "system",
"value": "Attach panel to button in Firefox\n"
},
{
"from": "human",
"value": "var data = require(\"sdk/self\").data;\nvar ss = require(\"sdk/simple-storage\");\nvar clipboard = require(\"sdk/clipboard\");\n\nvar text_entry = require(\"sdk/panel\").Panel({\n width: 510,\n h... | javascript | chosen |
[
{
"from": "system",
"value": "[tests] Enable also the Script panel to get proper stack traces\n"
},
{
"from": "human",
"value": "function runTest()\n{\n FBTest.sysout(\"issue2914.START\");\n\n FBTest.openNewTab(basePath + \"console/2914/issue2914.html\", function(win)\n {\n FBTes... | javascript | chosen |
[
{
"from": "system",
"value": "Reorder function in importer base class.\n"
},
{
"from": "human",
"value": "OV.ImporterBase = class\n{\n constructor ()\n {\n this.extension = null;\n this.callbacks = null;\n this.model = null;\n this.error = null;\n this.me... | javascript | chosen |
[
{
"from": "system",
"value": "Add windows 10 to browserstack tests\n"
},
{
"from": "human",
"value": "const base = require('./karma.base.conf');\n\nmodule.exports = function(config) {\n\tconfig.set(Object.assign(base, {\n\t\tbrowserStack: {\n\t\t\tusername: process.env.BROWSERSTACK_USERNAME,\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Remove workaround for malformatted read all response.\n"
},
{
"from": "human",
"value": "function cleanRecords(records) {\n return records.map(function(item) {\n return item.rtd;\n });\n}\n\nfunction cleanRecord(record) {\n return record.rtd;\n}\n\nangular.mod... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to use dependency injection\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst { ioc } = require('@adonisjs/fold')\nconst Cache = require('..')\n\nclass Redis extends Cache {\n constructor() {\n super()\n this.Redis = ioc.use('Redis')\n }\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Apply new ajax adjustment to unauthenticatedGithubApiService too."
},
{
"from": "human",
"value": "import Conductor from 'conductor';\nimport ajax from 'glazier/utils/ajax';\n\n/*\n Provides unauthenticated github api access\n\n @class UnauthenticatedGithubApiCons... | javascript | chosen |
[
{
"from": "system",
"value": "logout: Clean up logout method call.\n\nThis was a silent type error -- we were passing an argument to a\nfunction that doesn't expect any. Make the code less confused.\n\n[greg: revised commit message]\n"
},
{
"from": "human",
"value": "/* @flow */\nimport React, ... | javascript | chosen |
[
{
"from": "system",
"value": "Add getBanner method to BannerService\n"
},
{
"from": "human",
"value": "/* global Firebase */\n'use strict';\n\n/**\n * @ngdoc service\n * @name bannerPreviewApp.BannerService\n * @description\n * # BannerService\n * Service in the bannerPreviewApp.\n */\nangular.m... | javascript | chosen |
[
{
"from": "system",
"value": "Fix memory leak in EmberData's RecordArrayManager\n\nImmediately unregister record arrays from the manager.\n"
},
{
"from": "human",
"value": "define( [ \"Ember\", \"EmberData\", \"EmberDataLS\" ], function( Ember, DS ) {\n\n\t// no initializer here: just upgrade th... | javascript | chosen |
[
{
"from": "system",
"value": "Fix order in v2 dragon endpoint\n"
},
{
"from": "human",
"value": "\nconst limit = require('../../lib/query-builder/v2/limit');\nconst project = require('../../lib/query-builder/v2/project');\n\nmodule.exports = {\n\n /**\n * Returns all Dragon data\n */\n all... | javascript | chosen |
[
{
"from": "system",
"value": "Add message browser out of date for all msie\n"
},
{
"from": "human",
"value": "import addFavicon from './helpers';\nimport LazyLoad from 'vanilla-lazyload';\nconst bowser = require('bowser');\n\nif (bowser.msie && bowser.version < 11) {\n $('.browser').removeClass... | javascript | chosen |
[
{
"from": "system",
"value": "Remove focus effect on readonly fields\n"
},
{
"from": "human",
"value": "$(window).load(function(){\n\n var selector = '.settings-nav li';\n $(selector).not(\".collapse-li\").click(function () {\n $(selector).not(\".collapse-li\").removeClass('active')... | javascript | chosen |
[
{
"from": "system",
"value": "Add torrent dialog now adds torrents.\n"
},
{
"from": "human",
"value": "define(['jquery', 'dialog', 'rpcClient'], function($, Dialog, RpcClient) {\r\n function AddTorrentsDialog() {\r\n Dialog.call(this, '/plugins/core.torrents/dialogs/add-torrents.html'... | javascript | chosen |
[
{
"from": "system",
"value": "[INTERNAL][FIX] Fix walkthrough step 37 after simplification\n\nChange-Id: Id93e8d246a989e2116b442bcb644e09c8a52041a\n"
},
{
"from": "human",
"value": "sap.ui.define([\n\t\"sap/ui/base/Object\"\n], function (UI5Object) {\n\t\"use strict\";\n\n\treturn UI5Object.exte... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for start and end ranges at query time\n"
},
{
"from": "human",
"value": "module.exports = TimestreamDB\nmodule.exports.open = function (path, options, callback) {\n // TODO force valueEncoding = json?\n if (callback) {\n levelup(path, options, func... | javascript | chosen |
[
{
"from": "system",
"value": "Add padding to application container div\n"
},
{
"from": "human",
"value": "import m from 'mithril';\n\nimport { OptionsDisplayTable } from './options-display-table';\nimport { NewOptionForm } from './new-option-form';\nimport { OptionsMenu } from './options-menu';\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow math symbols to be input via character entities\n\nEntity decoding occurs when an input field loses focus.\nNote that this is a hack and potentially a security risk.\nAlso, it can't handle custom mnemonics for math symbols.\n"
},
{
"from": "human",
"value": "\... | javascript | chosen |
[
{
"from": "system",
"value": "Rename the used variable everywhere, and not just in its definition...\n"
},
{
"from": "human",
"value": "define(['jquery'], function ($) {\n var colors = {\n log: '#000000',\n warn: '#cc9900',\n error: '#cc0000'\n };\n \n var log = ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the need of namespaces in settings. \n\n"
},
{
"from": "human",
"value": "import { createSelector } from 'reselect';\nimport * as deps from '../deps';\nimport * as selectors from '../selectors';\n\nexport const getSettings = packageNamespace =>\n createSelec... | javascript | chosen |
[
{
"from": "system",
"value": "Move polyfills into their own seperate section\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 local_storage_polyfill\n//= require underscore... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the height: 100vh from baseStyles which breaks the viewport scrolling\n"
},
{
"from": "human",
"value": "export const baseStyles = {\n height: '100vh',\n};\n\nexport const centerStyles = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'cent... | javascript | chosen |
[
{
"from": "system",
"value": "Use MongoHQ URI if available.\n\n\"if available\" means if running on heroku. If not, it will automatically fallback to localhost.\n"
},
{
"from": "human",
"value": "var monk = require('monk');\nmodule.exports = monk('localhost:27017/frozen-forest');"
},
{
"... | javascript | chosen |
[
{
"from": "system",
"value": "Add addWorkout() which help create a template of workout\n"
},
{
"from": "human",
"value": "angular.module('sparrow')\n.controller('TimedCtrl', function() {\n\n})\n.component('timed', {\n controller: 'TimedCtrl',\n templateUrl: 'templates/timed.html'\n});"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Add stateProvider state for user\n"
},
{
"from": "human",
"value": "(function(){\n'use strict';\n\nangular\n .module('secondLead', \n \t['ngDragDrop', \n \t'ui.bootstrap',\n \t'ui.router', \n \t'gridster',\n \t'restangular',\n 'angularUtils.directives.dirPa... | javascript | chosen |
[
{
"from": "system",
"value": "Add note about which GDAL version fixes the SRID detection bug\n"
},
{
"from": "human",
"value": "var ogr = require('./ogr');\n\nfunction kml() {}\n\nkml.prototype = new ogr('kml');\n\nvar p = kml.prototype;\n\np._contentType = \"application/kml; charset=utf... | javascript | chosen |
[
{
"from": "system",
"value": "Add form params to PDF 'link-export' link\n\nChange-Id: I4088f40903b42b7bd0639d75e38889bfa99645cb\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $(window).listHistory();\n\n $(\"select, input[type='radio']\", \".filter-form\").loader({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Sort events and articles by dates from now\n"
},
{
"from": "human",
"value": "import { createSelector } from 'reselect';\nimport { selectArticles } from './articles';\nimport { selectEvents } from './events';\n\nexport const selectFrontpage = createSelector(\n sele... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 'const' declarations in non-strict mode are not supported\n\nWithout `'use strict';` I get lint errors of `'const' declarations in non-strict mode are not supported yet on Node 4.5.0` due to the new node linting rules. Adding this fixes the issue. Alternatively, we could di... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mobilization page test file import\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { shallow } from 'enzyme'\n\nimport { MobilizationPage } from '../../pages/mobilization-page'\n\ndescribe('app/modules/mobilizations/__tests__/pages/mobilizat... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve a bug due to GA tracker code"
},
{
"from": "human",
"value": "<script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagNa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix errors handling in GraphQL middleware\n\nFixes: #564\n"
},
{
"from": "human",
"value": "import { graphqlExpress } from 'apollo-server-express';\nimport 'isomorphic-fetch';\n\nimport schema from '../api/schema';\nimport modules from '../modules';\nimport settings... | javascript | chosen |
[
{
"from": "system",
"value": "Update memcached server location for Docker\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst config = {\n repository_url: 'github.com/zulhilmizainuddin/url-shortener',\n base_url: 'localhost:7000',\n log_level: 'info',\n memcached_server: 'url-s... | javascript | chosen |
[
{
"from": "system",
"value": "Add full screen link via title click\n"
},
{
"from": "human",
"value": "(function() {\n\n reactDemo();\n boringDemo();\n\n function reactDemo() {\n\n document.getElementById('react-touch-demo').addEventListener('loadedmetadata', function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove not need style class\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport {Link} from 'react-router';\n\nexport default class Header extends React.Component {\n render() {\n const date = new Date();\n return (\n <footer classN... | javascript | chosen |
[
{
"from": "system",
"value": "Bring back the full Array polyfill for now\n\nThis may or may not fix older devices. Gotta investigate.\n"
},
{
"from": "human",
"value": "import 'core-js/es5';\nimport 'core-js/fn/promise';\nimport 'core-js/fn/symbol';\nimport 'core-js/fn/array/from';\nimport 'core... | javascript | chosen |
[
{
"from": "system",
"value": "Fix empty lines in JS output\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst CLIEngine = require(\"eslint\").CLIEngine;\nconst Promise = require(\"bluebird\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst filePathMatcher = require... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments for desired methods in shoe model\n"
},
{
"from": "human",
"value": "const mongoose = require('mongoose');\n\nconst shoesSchema = new mongoose.Schema({\n name: String\n});\n\nconst Shoes = mongoose.model('Shoes', shoesSchema);\nmodule.exports = Shoes;"... | javascript | chosen |
[
{
"from": "system",
"value": "Remove temporary test for ResultDetailCtrl\n"
},
{
"from": "human",
"value": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional informatio... | javascript | chosen |
[
{
"from": "system",
"value": "Change export syntax for Typescript & eslint\n\n"
},
{
"from": "human",
"value": "/* eslint babel/semi: \"error\" */\nexport AttachmentsController from './controllers/api/v1/AttachmentsController';\nexport FeedFactoriesController from './controllers/api/v1/FeedFacto... | javascript | chosen |
[
{
"from": "system",
"value": "Use babel-register to transpile server code on the fly\n"
},
{
"from": "human",
"value": "require('babel-register'); // transpile code on the fly\nmodule.exports = require('./server.js');\n"
},
{
"from": "gpt",
"value": "// Use babel-register to transpil... | javascript | chosen |
[
{
"from": "system",
"value": "Rename Index view to Home\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = function(imports) {\n\n let express = imports.modules.express;\n let Promise = imports.modules.Promise;\n let fs = require(\"fs\"); // TODO: put this into initI... | javascript | chosen |
[
{
"from": "system",
"value": "Add ability to post goals of a specific type to Slack\n"
},
{
"from": "human",
"value": "const IDoneThis = require('../apis/i-done-this');\nconst Slack = require('../apis/slack');\n\nmodule.exports = commander => {\n commander\n .command('slack')\n .descripti... | javascript | chosen |
[
{
"from": "system",
"value": "[MISC] Change the comment style for single line comments\n"
},
{
"from": "human",
"value": "var config = require('./Build/Config');\n\nmodule.exports = function(grunt) {\n\t'use strict';\n\n\t// Display the execution time of grunt tasks\n\trequire('time-grunt')(grun... | javascript | chosen |
[
{
"from": "system",
"value": "Set Mocha timout to 5 seconds\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n grunt.initConfig({\n jshint: {\n files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],\n options: {\n node: true,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add a build task for Grunt and make it the default.\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n\n\tgrunt.initConfig({\n\n\t\tpkg: grunt.file.readJSON('package.json'),\n\n\t\tclean: {\n\t\t\tbuild: {\n\t\t\t\tsrc: \"build\"\n\t\t\t}\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix scrollable typo in demo\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $('#slides').superslides({\n slide_easing: 'easeInOutCubic',\n slide_speed: 800,\n pagination: true,\n hashchange: true,\n scrollabe: true\n });\n});"
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix word phrase for proper grammar\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $('#target').teletype({text: ['software engineer.', 'computer scientist.', \n 'student.', 'explorer.', 'sci-fi lover.']});\n $... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Object.fromEntries polyfill (for Safari 11)\n"
},
{
"from": "human",
"value": "/*\n Copyright 2018 Alfredo Mungo <alfredo.mungo@protonmail.ch>\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and assoc... | javascript | chosen |
[
{
"from": "system",
"value": "Upgrade get params of mobile pagination\n"
},
{
"from": "human",
"value": "export class Pagination {\n events () {\n $('[data-role=\"mobile-pagination\"]').on('change', $.proxy(this.goToPage, this))\n }\n\n goToPage (event) {\n let $current = $(event.curren... | javascript | chosen |
[
{
"from": "system",
"value": "Change directory call for simulator\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\nconst { spawn } = require('child_process');\nconst { BrowserWindow } = require('electron');\n\nconst simulator = root =>... | javascript | chosen |
[
{
"from": "system",
"value": "Remove MP4 from the list of supported filetypes\n"
},
{
"from": "human",
"value": "(function() {\n\t\"use strict\";\n\tfunction initPage() {\n\n\t\tvar fileTypes = [\n\t\t\t\"csv\",\n\t\t\t\"gif\",\n\t\t\t\"htm\",\n\t\t\t\"html\",\n\t\t\t\"jpeg\",\n\t\t\t\"jpg\",\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix open external link (mobile)\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('copayApp.services').service('externalLinkService', function(platformInfo, nodeWebkitService, popupService, gettextCatalog, $window, $log, $timeout) {\n\n this.open =... | javascript | chosen |
[
{
"from": "system",
"value": "Replace \",\" with \" \" before splitting the input.\n"
},
{
"from": "human",
"value": " Template.SearchBoxT.events( {\n 'submit form' : function( evt, template ) {\n evt.preventDefault();\n\n var wordList = Session.get( \"WordList\" );\n var newW... | javascript | chosen |
[
{
"from": "system",
"value": "refactor: Use uppercase for default attrs import"
},
{
"from": "human",
"value": "import defaultAttrs from '../src/default-attrs.json';\n\n/**\n * Build an SVG sprite string containing SVG symbols.\n * @param {Object} icons\n * @returns {string}\n */\nfunction build... | javascript | chosen |
[
{
"from": "system",
"value": "Select all on input elements when navigating to them\n"
},
{
"from": "human",
"value": "import { List as list } from 'immutable';\nimport React from 'react';\nimport ImmutableComponent from '../../../ImmutableComponent';\nimport PropTypes from 'prop-types';\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Refresh on all 401 responses\n"
},
{
"from": "human",
"value": "const mediaType = 'application/vnd.cignium.resource+json'\n\nexport async function request(method, href, data, config) {\n const request = {\n body: data && JSON.stringify(data),\n credentia... | javascript | chosen |
[
{
"from": "system",
"value": "Add module sourceType in options to babylon.\n"
},
{
"from": "human",
"value": "import fs from \"fs\";\n\nimport {parse} from \"babylon\";\n\nimport CodeGenerator from \"../CodeGenerator\";\nimport processTokens from \"../process-tokens\";\n\nfunction parseText(text... | javascript | chosen |
[
{
"from": "system",
"value": "Add custom launcher for parity with browserstack\n"
},
{
"from": "human",
"value": "const base = require('./karma.base.conf');\n\nmodule.exports = function(config) {\n\tconfig.set(Object.assign(base, {\n\t\tbrowsers: ['Chrome'],\n\t\tautoWatch: true,\n\t\tsingleRun:... | javascript | chosen |
[
{
"from": "system",
"value": "Add data structure for `And` and `Or` required if\n"
},
{
"from": "human",
"value": "import required from './required';\n\nconst validate = (val, ruleObj, propertyName, inputObj) => {\n const targetProperty = ruleObj.params[0];\n\n if (inputObj[targetProperty] ===... | javascript | chosen |
[
{
"from": "system",
"value": "Watch the main file too\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar mocha = require('gulp-mocha');\n\ngulp.task('default', function() {\n gulp.watch(['lib/**', 'test/**'], ['test']);\n});\n\ngulp.task('test', function() {\n return gulp.src(... | javascript | chosen |
[
{
"from": "system",
"value": "Add .matches() as default choice for browserUtils.matchSelector\n\nFormerly known as matchesSelector(), with many vendor prefixes as seen in this function.\nI'm using ADT in a jsdom environment, which doesn't support any vendor-prefixed variations\nof this function.\n\nhttp://c... | javascript | chosen |
[
{
"from": "system",
"value": "Expire messages in 1 hour.\n"
},
{
"from": "human",
"value": "var apn = require('apn');\n\t\n\nfunction PushNotifier() {\n\tvar options = {\t\t\n\t\tcert: '/home/pi/node/HomeSensor/Node/cert.pem',\n\t\tkey: '/home/pi/node/HomeSensor/Node/key.pem',\n\t\terrorCallback... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.