conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update path on Repetory action\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport Model from 'ember-data/model';\nimport DS from 'ember-data';\nimport {memberAction} from 'ember-api-actions';\n\nimport { validator, buildValidations } from 'ember-c... | javascript | chosen |
[
{
"from": "system",
"value": "fix(flow): Fix flow errors in login saga.\n"
},
{
"from": "human",
"value": "// @flow\nimport { take, call, put, select } from 'redux-saga/effects'\nimport {\n APP_FINISHED_LOADING,\n PERFORM_USER_LOGIN,\n PERFORM_USER_LOGOUT,\n USER_LOGGED_IN,\n USER_LOGGED_OU... | javascript | chosen |
[
{
"from": "system",
"value": "FIx tests for America/Adak timezone\n"
},
{
"from": "human",
"value": "var parse = require('../parse/index.js')\nvar getDaysInMonth = require('../get_days_in_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @d... | javascript | chosen |
[
{
"from": "system",
"value": "Change default name of User class to 'Nameless User'"
},
{
"from": "human",
"value": "/* jshint node:true */\n\nvar _ = require('underscore');\nvar uuid = require('node-uuid');\n\nmodule.exports = (function() {\n\n function User(socketArg) {\n this.id = uuid.v4(... | javascript | chosen |
[
{
"from": "system",
"value": "Use BrowserRouter instead of HashRouter\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { render } from 'react-dom'\nimport { HashRouter, Match } from 'react-router'\nimport Landing from './Landing'\nimport Search from './Search'\nimport '../pub... | javascript | chosen |
[
{
"from": "system",
"value": "Allow usage as Attribute and Element, map swatches to ng-model and added url and color attributes\n"
},
{
"from": "human",
"value": "angular\n .module('ngVibrant')\n .directive('vibrant', vibrant);\n\nfunction vibrant($vibrant) {\n var directive = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable dev tools for now.\n"
},
{
"from": "human",
"value": "const electron = require('electron')\nconst app = electron.app\nconst BrowserWindow = electron.BrowserWindow\nconst path = require('path')\nconst url = require('url')\n\n// Keep main window in scope so it... | javascript | chosen |
[
{
"from": "system",
"value": "Return the number of items in the queue\n"
},
{
"from": "human",
"value": "import events from 'events';\n\nclass Feeder extends events.EventEmitter {\n queue = [];\n pending = false;\n\n feed(data) {\n this.queue = this.queue.concat(data);\n }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable scripts task if publicPath is empty\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst tasks = require('./utils/getTasks');\n\nconst isDev = process.env.NODE_ENV !== 'production';\n\nconst buildTasks = [\n tasks.static,\n tasks.images,\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing semicolon and missing trailing comma.\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport refractToComponentsMap from 'refractToComponentMap';\nimport theme from 'theme'\n\nclass Attribute extends React.Component {\n static propTypes... | javascript | chosen |
[
{
"from": "human",
"value": "Create board in Game constructor\n"
},
{
"from": "gpt",
"value": "var Game = function(boardString){\n this.board = '';\n if (arguments.length === 1) {\n this.board = boardString;\n } else {\n function random() {\n return Math.floor(Math.random() * 10 + ... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic well-formedness verification before storing a doc\n\nA new document must have a \"type\" field that contains either \"paste\" or\n\"comment\", and must have a \"data\" field that contains a String.\n"
},
{
"from": "human",
"value": "function(newDoc, oldDoc... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the query key from hashHistory\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { render } from 'react-dom';\nimport { Router, Route, IndexRoute, hashHistory } from 'react-router'\n\nwindow.$ = require('jquery');\n\nimport Case from './co... | javascript | chosen |
[
{
"from": "system",
"value": "refactor: Remove commented code from getGithubFile\n"
},
{
"from": "human",
"value": "async function makeDirectRequest(reqInfo) {\n const {\n owner,\n repo,\n path,\n ref\n } = reqInfo;\n\n const resp = await fetch(`https://raw.g... | javascript | chosen |
[
{
"from": "system",
"value": "Update failing Fetcher get() test\n"
},
{
"from": "human",
"value": "const assert = require('assert')\nconst Fetcher = require('../../src/models/Fetcher')\nconst fetchMock = require('fetch-mock')\n\ndescribe('Fetcher', () => {\n describe('get', () => {\n before(... | javascript | chosen |
[
{
"from": "system",
"value": "Add a correct url to the qr-code to allow scanning with other apps\n"
},
{
"from": "human",
"value": "import View from './View'\n\nexport default class RoomView extends View {\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis.title = 'Room';\n\t\tthis.templateUrl = 'temp... | javascript | chosen |
[
{
"from": "system",
"value": "Add some integrity tests to coverage report\n"
},
{
"from": "human",
"value": "describe(\"Gilded Rose\", function() {\n var foo;\n\n // beforeEach(function() {\n // foo = 0;\n // foo += 1;\n // });\n\n // afterEach(function() {\n // foo = 0;\n // });\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change id to match what index.html\n"
},
{
"from": "human",
"value": "//take variables from from\nfunction Character() {\n this.name = \"idkMyBFFGil\";\n this.health = 100;\n this.attack = 10;\n this.defense = 10;\n}\nvar hero = new Character();\n\n//initialize ... | javascript | chosen |
[
{
"from": "system",
"value": "Add animation on button press\n"
},
{
"from": "human",
"value": "---\nlayout: null\nsitemap:\n exclude: 'yes'\n---\n\n$(document).ready(function () {\n $('a.about-button').click(function (e) {\n if ($('.panel-cover').hasClass('panel-cover--collapsed')) return\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make grunt build all .ts files in src/\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n typescript: {\n options: {\n module: 'common... | javascript | chosen |
[
{
"from": "system",
"value": "Include test scripts gruntfile itself to validation targets.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n all: 'timbles... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to customize allign per column\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar from = require('es5-ext/array/from')\n , iterable = require('es5-ext/iterable/validate-object')\n , stringifiable = require('es5-ext/object/validate-stringif... | javascript | chosen |
[
{
"from": "system",
"value": "Use koa-route as object rather than using its functions directly\n"
},
{
"from": "human",
"value": "const { post } = require('koa-route');\nconst schemas = require('schemas');\nconst { users } = require('src/api');\nconst { create } = require('src/middleware/api/met... | javascript | chosen |
[
{
"from": "system",
"value": "Use me as sender, for replies\n\n"
},
{
"from": "human",
"value": "import Sendgrid from 'sendgrid';\r\n\r\nconst helper = Sendgrid.mail;\r\nconst sender = new helper.Email('adiemerci@bisnaer.ch');\r\nconst reciever = new helper.Email('tuelsch@gmail.com');\r\nconst c... | javascript | chosen |
[
{
"from": "system",
"value": "Use gulp command instead of npm run because that requires them to have the scripts entries in the package.json."
},
{
"from": "human",
"value": "'use strict';\n\nvar cmd = require('commander');\nvar pkg = require('../lib/package');\nvar replace = require('../lib/rep... | javascript | chosen |
[
{
"from": "system",
"value": "Fix json file loading using valid json-loader path.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst config = require('json!./../../../build/config.json');\nconst db = require('src/storage/webtask');\nconst sandbox = require('sandboxjs');\nconst helper = re... | javascript | chosen |
[
{
"from": "system",
"value": "Add blank object fallback for routes in integration tests\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst { get, set, guidFor, merge, getOwner } = Ember;\n\nfunction updateTitle(tokens) {\n set(this, 'title', tokens.toString());\n}\n\nexport ... | javascript | chosen |
[
{
"from": "system",
"value": "Add get route for frontpage\n"
},
{
"from": "human",
"value": "var express = require('express')\nvar router = express.Router()\nvar multer = require('multer')\nvar dateFormat = require('dateformat')\n\nvar db = require('../db')\n\nvar storage = multer.diskStorage({\... | javascript | chosen |
[
{
"from": "system",
"value": "Add log messages buffer while loggerpanel is not initialized\n"
},
{
"from": "human",
"value": "var logPanelFlag = window[\"$manifest$logPanel\"]\n\nif (logPanelFlag) {\n\tlog = function(dummy) {\n\t\tvar args = Array.prototype.slice.call(arguments)\n\t\tvar logger ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong path for jscoverage report\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n config.set({\n basePath: '../../',\n\n files: [\n 'web/js/vendor/angular.js',\n 'web/js/vendor/angular-*.js',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add linked list node to utils\n"
},
{
"from": "human",
"value": "class Node_Tree {\n constructor(val) {\n this.val = val;\n this.parent = null;\n this.children = [];\n }\n}\n\nclass Node_Trie {\n constructor(val) {\n /*\n ** The node stores a singl... | javascript | chosen |
[
{
"from": "system",
"value": "Maintain focus in change theme list view\n"
},
{
"from": "human",
"value": "'use babel';\n\nimport { SelectListView } from 'atom-space-pen-views';\n\nexport default class ChangeThemeView extends SelectListView {\n\n constructor(themeManager) {\n super();\n th... | javascript | chosen |
[
{
"from": "system",
"value": "Use next to propagate err\n\n"
},
{
"from": "human",
"value": "import User from 'src/models/UserModel';\nimport jwt from 'jsonwebtoken';\n\nexport const list = (req, res, next) => User.find({})\n .then(data => res.json(data))\n .catch(err => next(err));\n\nexport ... | javascript | chosen |
[
{
"from": "system",
"value": "Add logger at unhandled rejection."
},
{
"from": "human",
"value": "/**\n * Copyright 2013-2020 the original author or authors from the JHipster project.\n *\n * This file is part of the JHipster project, see https://www.jhipster.tech/\n * for more information.\n *\... | javascript | chosen |
[
{
"from": "system",
"value": "Use destroyed event for cleanup instead of freeze\n"
},
{
"from": "human",
"value": "Handlebars.registerViewHelper('loading', function(view) {\n var _render = view.render;\n view.render = function() {\n if (view.parent.$el.hasClass(view.parent._loadingClassName... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for con10t-image widget.\n"
},
{
"from": "human",
"value": "var EC = protractor.ExpectedConditions;\n\ndescribe('con10t pages', function() {\n\n it('should contain markers on the grako_map page', function() {\n \tbrowser.get('/project/grako_map');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make text labels break into multi-lines by default.\n"
},
{
"from": "human",
"value": "// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport type { ReactChildren } from 'react-flow-types';\n\nimport FlexCell from './FlexCell';\nimport Tag... | javascript | chosen |
[
{
"from": "system",
"value": "Expand Sass in dev environment\n"
},
{
"from": "human",
"value": "/*jshint node:true*/\n/* global require, module */\n\nvar EmberApp = require( 'ember-cli/lib/broccoli/ember-app' );\n\nmodule.exports = function( defaults ) {\n\n\tvar app = new EmberApp( defaults, {\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove commented out babel polyfill\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function (defaults) {\n let app = new EmberAddon(defaults, {\n // 'ember-cli-babel': {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add deselectCountry method to WorldComponent.\n"
},
{
"from": "human",
"value": "/** @jsx React.DOM */\n\nvar CountriesComponent = require('./countries_component');\nvar PathsComponent = require('./paths_component');\nvar PolygonsComponent = require('./polygons... | javascript | chosen |
[
{
"from": "system",
"value": "Fix default for endpoint config\n\nI forgot to include this change in an earlier commit.\n"
},
{
"from": "human",
"value": "import reactDOMRunner from './reactDOMRunner';\n\nexport const viewerEndpoint = 'https://happo.now.sh';\nexport const snapEndpoint = 'https://... | javascript | chosen |
[
{
"from": "system",
"value": "Update client socket connect url"
},
{
"from": "human",
"value": "(function() {\n var socket = io.connect('http://localhost:3000'); // NOTE: Use real server IP if using mobile devices\n var $body = $('body');\n var $status = $('.status');\n var status = '';\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Bump graphql-tag to 2.4.0 for descriptors support\n"
},
{
"from": "human",
"value": "/* eslint-disable no-var, prefer-arrow-callback */\nvar packages = [\n 'ecmascript',\n 'isobuild:compiler-plugin@1.0.0',\n];\n\nPackage.describe({\n name: 'swydo:graphql',\n ver... | javascript | chosen |
[
{
"from": "system",
"value": "Update the default zazu file to have more sensible defaults.\n"
},
{
"from": "human",
"value": "module.exports = {\n 'hotkey': 'alt+space',\n 'theme': 'tinytacoteam/dark-theme',\n 'plugins': [],\n}\n"
},
{
"from": "gpt",
"value": "module.exports = {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Return model instance instead of simple object\n"
},
{
"from": "human",
"value": "const User = require('./../../models/user')\n\nconst usersRoutes = (api) => {\n api.post('/users', (req, res) => {\n User.create(req.body.user)\n .then((user) => {\n de... | javascript | chosen |
[
{
"from": "system",
"value": "Use dotenv for Foursquare credentials.\n"
},
{
"from": "human",
"value": "// var foursquare = (require('foursquarevenues'))('CLIENTIDKEY', 'CLIENTSECRETKEY');\nvar foursquare = (require('foursquarevenues'))('Y5D1QX0FS4R5ZTJ5TLU3RDL1U0PUE4ZU3NPTQDS2AGMW1KGP', 'XM2PZ1... | javascript | chosen |
[
{
"from": "system",
"value": "Add Dutch as a language option\n"
},
{
"from": "human",
"value": "module.exports = [\n {\n \"name\": \"English\",\n \"code\": \"en_US\",\n \"country\": \"United States\"\n },\n {\n \"name\": \"Italian\",\n \"code\": \"it_IT\",\n \"country\": \"I... | javascript | chosen |
[
{
"from": "system",
"value": "Fix check for extension/app in Analytics.\n"
},
{
"from": "human",
"value": "if (typeof chrome === 'undefined' ||\n !chrome ||\n (!chrome.extension && !chrome.app)) {\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to search for project tags\n"
},
{
"from": "human",
"value": "// -*- coding: utf-8 -*-\n//\n// (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>\n//\n// See LICENSE comming with the source of 'trex' for details.\n//\n'use strict';\n\nvar trexServices = angular.mo... | javascript | chosen |
[
{
"from": "system",
"value": "Add state querying to petitions listing\n"
},
{
"from": "human",
"value": "import calculateParamOffset from 'helpers/calculateParamOffset';\nimport sanitizeParamLimit from 'helpers/sanitizeParamLimit';\n\nexport default ({ limit, page }) => {\n const saneLimit = sa... | javascript | chosen |
[
{
"from": "system",
"value": "Add site footer to each documentation generator\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tac... | javascript | chosen |
[
{
"from": "system",
"value": "Update eslint to support ES6 globals (like `Promise`)\n"
},
{
"from": "human",
"value": "const OFF = 0;\n\nmodule.exports = {\n \"env\": {\n \"node\": true\n },\n \"parserOptions\": {\n \"ecmaVersion\": 2017\n },\n \"extends\": \"eslint:... | javascript | chosen |
[
{
"from": "system",
"value": "Add controller to handle patching stage configs\n"
},
{
"from": "human",
"value": "'use strict'\n\n// let logger = require('tracer').colorConsole()\nlet registry = require('../../extensions/registry')\nlet basic = require('./basic-response-helper')\n\nmodule.exports... | javascript | chosen |
[
{
"from": "system",
"value": "Increase item max to 500\n"
},
{
"from": "human",
"value": "import devtools from '../devtools';\nimport { REALLY_BIG_NUMBER } from '../utils';\n\nimport merge from 'deepmerge';\n\nimport PineCone from '../sprites/object/PineCone';\n\nconst itemMax = 50;\n\nlet items... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing label on button\n\nFix missing label on button\n"
},
{
"from": "human",
"value": "var animation = require(\"alloy/animation\");\n\nfunction IndexOpen(e) {\n \n $.logo.init({ image: '/images/alloy.png', width: 216, height: 200, opacity: 0.1 });\n $.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove server log statement (handled by budo)\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n'use strict'\n\nvar open = require('opn')\nvar meow = require('meow')\nvar extend = require('xtend')\nvar degree = require('./')\n\nvar cli = meow({\n help: [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Clone datasource in ComponentWillMount to rerendender ListView\n"
},
{
"from": "human",
"value": "import React, {Component, View, ListView} from 'react-native';\nimport PinListItem from './PinListItem.js';\n\nexport default class PinList extends Component {\n\n con... | javascript | chosen |
[
{
"from": "system",
"value": "Update hours and money spent\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n trey: {\n musicMoney: 537,\n hostingMoney: 38,\n hours: 240,\n },\n});\n"
},
{
"from": "gpt",
"value": "im... | javascript | chosen |
[
{
"from": "system",
"value": "Check separatorIndex is > -1 instead of truthiness\n"
},
{
"from": "human",
"value": "import { currentStoreView } from '@vue-storefront/core/lib/multistore'\nimport dayjs from 'dayjs'\nimport dayjsLocalizedFormat from 'dayjs/plugin/localizedFormat'\nimport { once } ... | javascript | chosen |
[
{
"from": "system",
"value": "Make only the status symbol colored\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n'use strict';\nvar chalk = require('chalk');\nvar envcheck = require('./index');\n\nif (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) {\n\tretur... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the container after the image has been created\n\nNo reason for having them to hang around\n"
},
{
"from": "human",
"value": "var argv = require('minimist')(process.argv.slice(2))\nvar execSync = require('child_process').execSync\n\nif (argv.h || argv.help ||... | javascript | chosen |
[
{
"from": "system",
"value": "Return parsed object and removed log statements\n"
},
{
"from": "human",
"value": "var org = require('org');\r\n\r\nvar parser = new org.Parser();\r\nconsole.log('plugin loading');\r\n\r\nexports.translate = function(load) {\r\n console.log('translate');\r\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Add some error handling in case there's no connection to the bit.ly servers.\n"
},
{
"from": "human",
"value": "/**\n * bit.ly access library code.\n */\nvar Shortener = new JS.Singleton('Shortener', {\n\tshorten: function() {\n\t var uri, callback;\n\t \n\t if (... | javascript | chosen |
[
{
"from": "system",
"value": "Update to createRoot. This breaks @reach/router routing w. StrictMode\n"
},
{
"from": "human",
"value": "/* eslint-disable import/no-import-module-exports */\n\nimport React, { StrictMode } from 'react';\nimport ReactDOM from 'react-dom';\nimport { QueryClientProvid... | javascript | chosen |
[
{
"from": "system",
"value": "Reorder pieces by largest to smallest unique number of isometries.\n"
},
{
"from": "human",
"value": "import readInput from './readInput.js';\nimport {PieceBlock} from './PieceBlock.js';\nimport {StateQueue} from './StateQueue.js';\n\n// Read Inputs (Synchronous Rea... | javascript | chosen |
[
{
"from": "system",
"value": "Sort env vars by descending length to prevent partial replacement\n\nFixes #8"
},
{
"from": "human",
"value": "#!/usr/bin/env node --harmony\n\nimport spawn from \"cross-spawn\";\nimport os from \"os\";\nimport { exec } from \"child_process\";\nimport exit from 'exi... | javascript | chosen |
[
{
"from": "system",
"value": "Increase log size to 10 MB\n"
},
{
"from": "human",
"value": "var config = {\n // Default server port\n port: 8080,\n \n // Base static path\n base: '/static',\n \n // Node handlers route\n routes: {},\n \n // Now handlers list\n everyone: [ require('./ha... | javascript | chosen |
[
{
"from": "system",
"value": "Change Activity Model to support background color\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Module dependencies.\n */\nvar mongoose = require('mongoose'),\n\tSchema = mongoose.Schema;\n\n/**\n * Activity Schema\n */\nvar ActivitySchema = new Schema... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for cartoCSS errors\n"
},
{
"from": "human",
"value": "var carto = require('../../../../../src/api/v4');\n\ndescribe('api/v4/style/cartocss', function () {\n var cartoCSS;\n\n beforeEach(function () {\n cartoCSS = new carto.style.CartoCSS('#layer { mar... | javascript | chosen |
[
{
"from": "system",
"value": "Remove MyTitle file and references.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { render } from 'react-dom'\nimport MyTitle from './MyTitle'\nimport '../public/normalize.css'\nimport '../public/style.css'\n\nconst App = React.createClass({\n... | javascript | chosen |
[
{
"from": "system",
"value": "Reset the results when we get back a new result set.\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar Codesearch = function() {\n return {\n remote: null,\n onload: function() {\n Codesearch.input = $('#searchbox');\n Codesearch.input.keydown... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify now replaces all non alphanumeric chars\n"
},
{
"from": "human",
"value": "// Structure that will be used throughout the other data\nvar options, legend, disp, data;\n\nvar util = {\n formatDate: d3.time.format(\"%Y-%m-%d %H:%M:%S\"),\n date: function... | javascript | chosen |
[
{
"from": "system",
"value": "Optimize app bundle for production.\n\n- Use production build of react\n- Add Dedupe and AggressiveMerging plugings"
},
{
"from": "human",
"value": "var path = require(\"path\"),\n webpack = require(\"webpack\"),\n minimize = process.argv.indexOf(\"--minimize\... | javascript | chosen |
[
{
"from": "system",
"value": "Disable unused imports, enable production mode\n"
},
{
"from": "human",
"value": "'use strict'\n\nimport 'es6-shim'\nimport 'es6-promise'\nimport 'babel-polyfill'\nimport 'angular2/bundles/angular2-polyfills'\nimport {provide} from 'angular2/core'\nimport {ROUTER_PR... | javascript | chosen |
[
{
"from": "system",
"value": "Fix loading... not showing in firefox\n"
},
{
"from": "human",
"value": "require([\"api\", \"canvasdrawer\", \"settings\"], function(api, canvasDrawer, settings) {\n\tvar form = document.getElementById(\"api-form\");\n\n\tfunction makeRequest() {\n\t\tvar messageEle... | javascript | chosen |
[
{
"from": "system",
"value": "Use the model schema to get the keys\n"
},
{
"from": "human",
"value": "var express = require('express')\nvar util = require('util')\nvar router = express.Router()\nvar mongoose = require('mongoose')\nvar PageStats = mongoose.model('PageStats')\nvar url = process.en... | javascript | chosen |
[
{
"from": "system",
"value": "Add my first mongoose model.\n"
},
{
"from": "human",
"value": "var Response = require('../data/response');\n\nvar express = require('express');\nvar router = express.Router();\nvar models = require('../models/index');\nvar project = require('../middlewares/project'... | javascript | chosen |
[
{
"from": "system",
"value": "Test functional error wrapping with ‘new’\n"
},
{
"from": "human",
"value": "const { OError, isOError, unwrapOError } = _private;\n\ndescribe('OError (white box test)', () => {\n\n it('is exported as O.Error', () => {\n expect(OError).toBe(O.Error);\n });\n\n})... | javascript | chosen |
[
{
"from": "system",
"value": "Fix output, now properly reports part 2\n"
},
{
"from": "human",
"value": "let data = \"1113222113\";\n\nfunction sameHead(input, startAt) {\n\tlet firstChar = input.charAt(startAt);\n\tlet howMany = 1;\n\tfor (let i = startAt + 1; i < input.length; i++) { // Skip f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove comma dangle to make linter happy\n"
},
{
"from": "human",
"value": "const darcy = require('../index')\nexports.handler = function (event, context, callback) {\n callback(null, {\n statusCode: 200,\n headers: {\n 'content-type': 'application/json'... | javascript | chosen |
[
{
"from": "system",
"value": "Add a new grunt task chaining build and headless testing\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n uglify: {\n options: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor aws uploader to make bucket name dynamic\n"
},
{
"from": "human",
"value": "const AWS = require(\"aws-sdk\");\nconst uuidv4 = require(\"uuid/v4\");\nconst logError = require(\"./log-error.js\");\n\nAWS.config.update({ region: process.env.AWS_REGION });\n\nf... | javascript | chosen |
[
{
"from": "system",
"value": "Make the theme more plain\n"
},
{
"from": "human",
"value": "module.exports = {\n name: 'dark-syntax-theme',\n installInto: function (pen) {\n pen.installTheme('html', {\n jsComment: 'gray',\n jsFunctionName: 'jsKeyword',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add require and callback to check err\n"
},
{
"from": "human",
"value": "var demoBtns = document.querySelectorAll('.js-container-target')\n// Listen for demo button clicks\nArray.prototype.forEach.call(demoBtns, function (btn) {\n btn.addEventListener('click', func... | javascript | chosen |
[
{
"from": "system",
"value": "Allow anonymous access to resident profile\n"
},
{
"from": "human",
"value": "Router.configure({\n layoutTemplate: 'mainLayout'\n});\n\n/*\n Actions\n*/\n\nvar requiresUserLogin = function () {\n if (!Meteor.user()) {\n this.render('login');\n } else {\n t... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate all settings to local storage for v3.3.\n"
},
{
"from": "human",
"value": "// listen to install/update events\nchrome.runtime.onInstalled.addListener(function(details){\n\tswitch(details.reason) {\n\t\tcase 'install':\n\t\t\tchrome.tabs.create({url: '/docs/p... | javascript | chosen |
[
{
"from": "system",
"value": "Change var to const for consistency.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar http = require('http');\nvar bodyParser = require('body-parser');\nvar eth = require('./eth');\nvar eventapi = require('./eventapi');\nvar api = require('.... | javascript | chosen |
[
{
"from": "system",
"value": "Use map instead of loop whilst normalising events\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\n\nexport default DS.RESTSerializer.extend(DS.EmbeddedRecordsMixin, {\n\n attrs: {\n events: { embedded: 'always' }\n },\n\n extract: function(sto... | javascript | chosen |
[
{
"from": "system",
"value": "App: Remove the Category: prefix from autocomplete\n\nWe query the API in the Category namespace, so we retrieve\nnames prefixed with 'Category:', which we do not want.\n\nWe remove it my using the map method to apply cut_category_prefix\n(introduced in 95ca64f) to each member ... | javascript | chosen |
[
{
"from": "system",
"value": "Change size test for admin page\n"
},
{
"from": "human",
"value": "describe('teamform-admin-app', function() {\n\t\n //\n // Example: A test case of getRandomIntInclusive\n //\n var $scope;\n describe('change min size test', function() {\n\n\t it('test ch... | javascript | chosen |
[
{
"from": "system",
"value": "Fix small typo in GtkTextView example\n"
},
{
"from": "human",
"value": "#!/usr/local/bin/seed\nGtk = imports.gi.Gtk;\nGtk.init (null, null);\n\nvar window = new Gtk.Window();\nvar view = new Gtk.TextView();\nvar buffer = view.buffer;\n\nvar begin = new Gtk.TextIter... | javascript | chosen |
[
{
"from": "system",
"value": "Load a schedule on start\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs');\nvar Mustache = require('mustache');\nimport * as schedule from './schedule/schedule.js';\n\nfunction readForm() {\n return {\n school: schedule.schools['G... | javascript | chosen |
[
{
"from": "system",
"value": "Add github adapter module dependency\n"
},
{
"from": "human",
"value": "'use strict';\nangular.module('main', [\n 'ionic',\n 'ngCordova',\n 'ui.router',\n // TODO: load other modules selected during generation\n])\n.config(function ($stateProvider, $urlRouterPro... | javascript | chosen |
[
{
"from": "system",
"value": "Change lit function to handle interpolations\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst _ = require('lodash');\nconst falafel = require('falafel');\n\nexports.lit = function lit(strings) {\n return `lit>>${strings[0]}<<lit`;\n};\n\nexports.json = fun... | javascript | chosen |
[
{
"from": "system",
"value": "Fix scope of loaded dependencies\n"
},
{
"from": "human",
"value": "/**\n * Gray Matter\n * Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.\n * Licensed under the MIT license.\n */\n\n'use strict';\n\n// node_modules\nvar YAML = require('js-yaml'),\... | javascript | chosen |
[
{
"from": "system",
"value": "Add array support for $and, $or, etc\n"
},
{
"from": "human",
"value": "import { gt, lt, range, eq, neq, not, or, and } from './operator';\n\nexport default function simplifyQuery(query) {\n // Traverse every property of the query and try to simplify it to check it... | javascript | chosen |
[
{
"from": "system",
"value": "Use storyshots renderer option to use enzyme\n"
},
{
"from": "human",
"value": "import initStoryshots, { multiSnapshotWithOptions } from '@storybook/addon-storyshots';\nimport path from 'path';\n\nfunction createNodeMock(element) {\n if (element.type === 'div') {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak express-dynamic-fields example to use global builder dynamic fields + newEvent\n"
},
{
"from": "human",
"value": "var libhoney = require('libhoney').default;\nvar process = require('process');\n\nmodule.exports = function(options) {\n var honey = new libhoney... | javascript | chosen |
[
{
"from": "system",
"value": "Load each document 10 times; average results\n"
},
{
"from": "human",
"value": "(function () {\n var iframe = $('<iframe>')\n .hide()\n .appendTo('body');\n \n var documentData = $('#documents').text();\n var documents = JSON.parse(documentData);\n\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Use `contenthash` instead of `hash` for webpack output.filename\n\nTo suppress \"DeprecationWarning: [hash] is now [fullhash] (also consider using [chunkhash] or [contenthash], see documentation for details)\"\n"
},
{
"from": "human",
"value": "const glob = require(... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.