conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use initHighlighting instead of the manual setup\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs');\nvar hljs = require('../build');\nvar jsdom = require('jsdom').jsdom;\nvar utility = require('./utility');\n\nvar filename = utilit... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Update preview on empty content\n"
},
{
"from": "human",
"value": "/* @flow */\n\nconst LINE_BREAKS_REGEX = /(?:\\r\\n|\\r|\\n)/g\n\nexport default document.registerElement('textual-velocity-preview', {\n prototype: Object.assign(Object.create(HTMLElement.pro... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console.log from debugging session\n"
},
{
"from": "human",
"value": "const path = require('path')\n\nconst { log } = require('../shared/log.utils')\n\nconst { ConfigurationFileNotExist } = require('../services/config')\nconst { ScriptNotExist, BadScriptPermi... | javascript | chosen |
[
{
"from": "system",
"value": "Add open url in browser\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n\n/*\n * freelook\n * freelook.info\n *\n * Copyright (c) 2014 Dima Kostrub\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar grunt = require('grunt'),\n config = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Change feedPaperPage handler to work with Express 4.x .\n"
},
{
"from": "human",
"value": "function feedPaperPage(req, res) {\n res.render('feedpaper.html', {\n layout: 'layout',\n locals: {\n categories: exports.cache.categoryList\n }\n });\n}\n\nfu... | javascript | chosen |
[
{
"from": "system",
"value": "Add ability to read files.\n\nCurrently just dumps the contents into a div.\n"
},
{
"from": "human",
"value": "goog.provide('monoid.LoadRaceButton');\n\ngoog.require('goog.ui.Component');\ngoog.require('goog.dom.classlist');\n\ngoog.scope(function(){\n\n\n\n/**\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Use EC2 metadata for credentials.\n"
},
{
"from": "human",
"value": "var Promise = require('bluebird');\nvar AWS = require('aws-sdk');\nvar credentials = new AWS.SharedIniFileCredentials({profile: 'lilybin'});\nAWS.config.credentials = credentials;\nAWS.config.regio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix module for NodeJS - apped_dir_name\n"
},
{
"from": "human",
"value": "var fs=require(\"fs\"),vm=require(\"vm\"),includeInThisContext=function(i){var e=fs.readFileSync(i);vm.runInThisContext(e,i)}.bind(this);includeInThisContext(\"dist/liphte.min.js\"),exports.li... | javascript | chosen |
[
{
"from": "system",
"value": "Return 404 instead of 400 when invalid feedItemId is provided\n\n"
},
{
"from": "human",
"value": "const {knex} = require('../util/database').connect();\n\n\nconst newComment = (action) => knex('comments').insert({\n user_id: action.client.id,\n feed_item_id: act... | javascript | chosen |
[
{
"from": "system",
"value": "Fix module call and refactor\n"
},
{
"from": "human",
"value": "/*!\n * Wef\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\n\n/**\n * wef module\n */\n(function(global) {\n var wef = function() {\n return new wef.prototype.init();\n };\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use a more descriptive param for canvas type\n"
},
{
"from": "human",
"value": "//\n// parameters:\n// canvas - The object related to the Canvas api call to be made. ie search_account_domains\n// params - The params passed to Canvas\n// body - The b... | javascript | chosen |
[
{
"from": "system",
"value": "Fix push-master grunt task for angular project.\n"
},
{
"from": "human",
"value": "module.exports = function() {\n return {\n _defaults: {\n bg: false\n },\n\n /**\n * Clean the app distribution folder.\n */\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix remaining tests (less and stylus)"
},
{
"from": "human",
"value": "\nTinytest.add(\"stylus - presence\", function(test) {\n\n var div = document.createElement('div');\n Blaze.renderComponent(Template.stylus_test_presence, div);\n div.style.display = 'block';\... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up code, add parens\n"
},
{
"from": "human",
"value": "module.exports = function (compose) {\n return function () {\n const inc = n => n + 1\n const dbl = n => n * 2\n\n it('composes right to left', function () {\n compose(inc, dbl, 20).should.e... | javascript | chosen |
[
{
"from": "system",
"value": "Add new file to tests list.\n"
},
{
"from": "human",
"value": "require('./basics');\nrequire('./compose');\nrequire('./convert-constructor');\nrequire('./init');\nrequire('./immutability');\nrequire('./is-stamp');\nrequire('./props-safety');\nrequire('./refs');\nreq... | javascript | chosen |
[
{
"from": "system",
"value": "Remove instantation of the engine\n"
},
{
"from": "human",
"value": "var chai = require(\"chai\");\n\nvar DSLEngine = require(\"../src/dslEngine\");\nvar TokenAlreadyInsertException = require(\n \"../src/utils/tokenAlreadyInsertException\"\n);\nvar NoTokenConnect... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Fix initial page load light theme flash\n"
},
{
"from": "human",
"value": "import { useEffect, useState } from 'react';\n\nexport default function useDarkMode() {\n const [theme, setTheme] = useState('light');\n const setMode = mode => {\n localStorage.set... | javascript | chosen |
[
{
"from": "system",
"value": "Update to work with latest github UI changes\n\nShould work with both unified and split diff views"
},
{
"from": "human",
"value": "(function (window, jQuery) {\n $(\"tr.file-diff-line > td.diff-line-num-addition.empty-cell\").each(function (index, cell) {\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Add method to retrieve customer's credit cards\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar FusebillResource = require('../FusebillResource');\nvar utils = require('../utils');\nvar fusebillMethod = FusebillResource.method;\n\nmodule.exports = FusebillRes... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust coverage values to current coverage level\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile... | javascript | chosen |
[
{
"from": "system",
"value": "Update coverage thresholds to current values\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.js'... | javascript | chosen |
[
{
"from": "system",
"value": "Add validate task to the default build process.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n // Initialize global configuration variables.\n var config = grunt.file.readJSON('Gruntconfig.json');\n grunt.initConfig({\n config: confi... | javascript | chosen |
[
{
"from": "system",
"value": "Configure the Grunt bump task\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function (grunt) {\n\n require('load-grunt-tasks')(grunt);\n require('time-grunt')(grunt);\n\n var appConfig = {\n src: 'src',\n dist: 'dist'\n };\n\n grunt... | javascript | chosen |
[
{
"from": "system",
"value": "Make jshint actually use .jshintrc."
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n files: ['Gruntfile.js', 'src/js/**']\n },\n watch: {\n fil... | javascript | chosen |
[
{
"from": "system",
"value": "Disable sourcemap generation for optimized static (sourcemap is 3mb)\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n \"use strict\";\n grunt.loadNpmTasks('grunt-contrib-requirejs');\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('pac... | javascript | chosen |
[
{
"from": "system",
"value": "Fix - missing comma :/\n"
},
{
"from": "human",
"value": "'use strict';\nmodule.exports = function (sequelize, DataTypes) {\n var Event = sequelize.define('event', {\n id: {\n type: DataTypes.INTEGER,\n autoIncrement: true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix window scrolling when switching tabs\n"
},
{
"from": "human",
"value": "function showTab() {\n var hash = window.location.hash;\n\n if(hash) {\n $('ul.nav-tabs a[href=\"' + hash + '\"]').tab('show');\n } else {\n $('ul.nav-tabs li:first a'... | javascript | chosen |
[
{
"from": "system",
"value": "Add layer attributes edit window test\n"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-qunit';\n\nmoduleForComponent('layers-dialogs/attributes/edit', 'Integration | Component | layers dialogs/attributes/edit', {\n integration: tru... | javascript | chosen |
[
{
"from": "system",
"value": "Change back to unsigned samples"
},
{
"from": "human",
"value": "define(function() {\n\n 'use strict';\n \n var DELTAS = new Int8Array([0, -49, -36, -25, -16, -9, -4, -1, 0, 1, 4, 9, 16, 25, 36, 49]);\n\n function open(item) {\n return item.getBytes().then(fu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix erroneous PropTypes access warning\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of ... | javascript | chosen |
[
{
"from": "system",
"value": "Update isEmpty() to check array too\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst moment = require('moment');\n\nvar isEmpty = function(s) {\n return s === '';\n}\n\nvar parseDate = function(date) {\n return date;\n}\n\nmodule.exports = {\n isEmpty: i... | javascript | chosen |
[
{
"from": "system",
"value": "Use the elementSource by default\n"
},
{
"from": "human",
"value": "import skin from \"../skins/base-2.91.wsz\";\nimport audio from \"../mp3/llama-2.91.mp3\";\n\n/* global SENTRY_DSN */\n\nconst { hash } = window.location;\nlet config = {};\nif (hash) {\n try {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "tests: Add in tests to check for file output for sass\n"
},
{
"from": "human",
"value": "var spawn = require('child_process').spawn;\nvar path = require('path');\nvar chai = require('chai');\nvar expect = chai.expect;\n\n// chai.use(require('chai-fs'));\nchai.should... | javascript | chosen |
[
{
"from": "system",
"value": "Speed up mouse hover animations.\n"
},
{
"from": "human",
"value": "$(document).ready(function(){\n\t$('.list_item').hover(function(){\n\t\t//mouse enter\n\t\t$(this).fadeTo('fast', .5, function(){\n\t\t\t});\n\t\t},\n\t\t//mouse exit\n\t\tfunction(){\n\t\t\t$('.lis... | javascript | chosen |
[
{
"from": "system",
"value": "Update semicolon less coding style\n"
},
{
"from": "human",
"value": "\nTempplate.testing.helpers({\n helper1 () {\n \n let test1 = hello.world()\n // xd\n \n }\n})\n\n\nconsole.log('hello')\nconsole.log('hello')\nconsole.log('hello')\nvar a = 1\nvar b = 2... | javascript | chosen |
[
{
"from": "system",
"value": "Add Easy Read to the list of education levels [SWIK-2525]\n"
},
{
"from": "human",
"value": "const supportedCodes = {\n '0' : 'Preschool',\n '1' : 'Primary education',\n '2' : 'Lower secondary education',\n '3' : 'Upper secondary education',\n '55... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment about usage of preventExtensions"
},
{
"from": "human",
"value": "'use strict';\n\nlet constants = require('./constants');\nlet util = require('./util');\n\nmodule.exports = {\n create,\n};\n\nclass List {}\n\nutil.createMethods(List.prototype, consta... | javascript | chosen |
[
{
"from": "system",
"value": "Add an actual message for a missing lethe-data.json\n"
},
{
"from": "human",
"value": "var fs = require('fs');\n\nvar exports = {\n saved: {\n videos: {},\n },\n};\n\nvar FILENAME = 'lethe-data.json';\n\nexports.read = function() {\n try {\n fs.readFile(FIL... | javascript | chosen |
[
{
"from": "system",
"value": "Remove functions from the object.\n"
},
{
"from": "human",
"value": "/**\n * Object representing a XRoad message from which request and response objects\n * inherit from.\n *\n * @module xroad4js/xrmsg\n */\n\n'use strict';\n\nvar xml2js = require('xml2js'),\n Buil... | javascript | chosen |
[
{
"from": "system",
"value": "Remove export of nonexisting class\n"
},
{
"from": "human",
"value": "// !!\n// This module defines ProseMirror's document model, the data\n// structure used to define and inspect content documents. It\n// includes:\n//\n// * The [node](#Node) type that represents d... | javascript | chosen |
[
{
"from": "system",
"value": "Fix failing Set tests in IE11\n\nThe `array-from` module doesn't work with Sets in IE11, and is not\nactually needed, because of `Set.prototype.forEach`.\n\nSee https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/forEach\n"
},
{
"from": ... | javascript | chosen |
[
{
"from": "system",
"value": "Hide chunk modules in webpack-dev-server\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\n\nvar publicPath = '';\nvar outputPath = path.join(__dirname, 'dist')... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Allow single-word commit message subjects\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: ['@commitlint/config-conventional'],\n rules: {\n 'subject-case': [\n 2,\n 'never',\n ['upper-case', 'camel-case', 'kebab-case', 'pasc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix fov is not defined\n"
},
{
"from": "human",
"value": "/**\n * Camera: what the player sees\n */\nclass Camera {\n /**\n * Constructor\n *\n * @param {Corridor} rooms\n * @param {Number} fov\n * @param {Number} width\n * @param {Number}... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for detecting `window` when running in node.\n"
},
{
"from": "human",
"value": "\"use strict\";\n/*global window*/\n\nvar strictEncode = null;\nvar strictDecode = null;\n\nif (window && typeof window.btoa === \"function\") { // When running in a browser.\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure triggering undo/redo properly updates overlays.\n"
},
{
"from": "human",
"value": "import { win, isIframe } from 'classes/helpers';\nimport { eventBus } from './eventbus';\nimport UndoStack from 'classes/UndoStack';\n\nconst trackedMutations = {\n\tupdateF... | javascript | chosen |
[
{
"from": "system",
"value": "Include call to MailChimp POST\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar bodyParser = require('body-parser');\n\nvar email = require('../email.js');\n\nvar router = express.Router();\n//'use strict';\n//const nodemailer = require('nod... | javascript | chosen |
[
{
"from": "system",
"value": "Change module type on typescript for server side compilation to commonjs\n\nSigned-off-by: Michele Ursino <0d7cbec952c33d7c21e19d50988899883a4c91e0@amilink.com>\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar watch = require('gulp-watch');\nvar u... | javascript | chosen |
[
{
"from": "system",
"value": "Switch push service to use 'common' logging\n\n"
},
{
"from": "human",
"value": "const bodyParser = require('body-parser');\nconst dotenv = require('dotenv');\nconst express = require('express');\nconst methodOverride = require('method... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the image test depending on the image length.\n\nSee also issue #7.\n"
},
{
"from": "human",
"value": "/*jshint quotmark: false */\n\n\"use strict\";\n\nvar rio = require(\"../lib/rio\"),\n vows = require(\"vows\"),\n assert = require(\"assert\");\n\nvar i... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to return obj in reduce operation\n"
},
{
"from": "human",
"value": "const fs = require('fs')\n\nmodule.exports.init = function init(config, cb) {\n const path = config.path\n\n\n const readF = (cb) => {\n fs.readFile(path, 'utf8', (err, data) => {\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Add route handler for DELETE /api/roadmaps/:roadmapID\n"
},
{
"from": "human",
"value": "var Roadmap = require('./roadmapModel.js'),\n handleError = require('../../util.js').handleError;\n\nmodule.exports = {\n\n createRoadmap : function (req, res, next) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add some shortcuts we currently have in tddbin."
},
{
"from": "human",
"value": "var $ = document.getElementById.bind(document);\nvar exampleTests = require('./example-tests');\nvar Main = require('../src/main/main-controller');\n\nvar providedByAceEditor = function... | javascript | chosen |
[
{
"from": "system",
"value": "Return an error when `key` is not in body."
},
{
"from": "human",
"value": "// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (th... | javascript | chosen |
[
{
"from": "system",
"value": "Add publication for a single post\n"
},
{
"from": "human",
"value": "Meteor.publish('posts', function(options) {\n return Posts.find({}, options);\n});\n\nMeteor.publish('comments', function(postId) {\n check(postId, String);\n return Comments.find({ postId: post... | javascript | chosen |
[
{
"from": "system",
"value": "Fix import connected to old editor\n"
},
{
"from": "human",
"value": "export { default } from './__content__'\nexport { default as EditorOld } from './editor-old'\nexport { default as EditorNew } from './editor-new.connected'\nexport { default as EditorSlate } from ... | javascript | chosen |
[
{
"from": "system",
"value": "Decrease timeout to make app start faster\n"
},
{
"from": "human",
"value": "const CACHE = 'network-or-cache'\n\nself.addEventListener('install', evt => {\n console.log('Service worker is being installed.')\n})\n\nself.addEventListener('activate', evt => {\n conso... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust function isInViewport to be more fail-safe.\n"
},
{
"from": "human",
"value": "jQuery.ajaxSetup({\n cache : false\n});\n\njQuery.fn.isInViewport = function (offset) {\n var elementTop, elementBottom, viewportTop, viewportBottom;\n\n if (typeof offset... | javascript | chosen |
[
{
"from": "system",
"value": "Make City extend Phaser.Sprite for ease of use/consistency\n"
},
{
"from": "human",
"value": "class City {\n\tconstructor(name,x,y,game) {\n\t\tthis.name = name;\n\t\tthis.x = x;\n\t\tthis.y = y;\n \n this.sprite = game.add.sprite(\n Math.fl... | javascript | chosen |
[
{
"from": "system",
"value": "Revert to docked app + keyboard shortcuts\n"
},
{
"from": "human",
"value": "var app = require(\"app\");\nvar BrowserWindow = require(\"browser-window\");\nvar Menu = require(\"menu\");\nvar mainWindow = null;\n\napp.on(\"window-all-closed\", function(){\n app.quit... | javascript | chosen |
[
{
"from": "system",
"value": "Write check to not log pages when paused\n\n- happens in activity-logger module within the debounce page logging function\n- seems fine here now; may want to move somewhere else later\n"
},
{
"from": "human",
"value": "import { makeRemotelyCallable } from 'src/util/... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Deliberately break CS in order to demonstrate how Jenkins and Travis react to broken builds\"\n\nThis reverts commit 28e5d5db51b794569f53f1f43e0aa72d7656acd8.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* global define */\ndefine([\n 'jquery',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a custom LogWriter example\n"
},
{
"from": "human",
"value": "/* jshint -W079 */\n\nvar scribe = require('../scribe.js')({\n createDefaultConsole : false \n});\n\nvar consoleOne = scribe.console({\n console : {\n colors : 'white'\n },\n logWri... | javascript | chosen |
[
{
"from": "system",
"value": "Create codesandbox using the 'parcel' template\n\nThe default template is `create-react-app` and this one ignores the `head` tag defined in out `index.html`\n"
},
{
"from": "human",
"value": "(function() {\n\n function compress(json) {\n return LZString.compress... | javascript | chosen |
[
{
"from": "system",
"value": "Add key prop to card.\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport Registry from '../utils/Registry';\nimport BaseComponent from './BaseComponent';\nimport {omit, pick} from 'lodash';\n\nconst CARD_REGIONS = ['header', 'subhea... | javascript | chosen |
[
{
"from": "system",
"value": "Fix up routes to help with missing files and path normalization\n"
},
{
"from": "human",
"value": "\n/*\n * GET home page.\n */\n\nvar fs = require(\"fs\");\n\nfunction renderDirectory (req, res, stats) {\n res.render(\"directory\", {\n \"title\": req.path,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change the routing to searches from search"
},
{
"from": "human",
"value": "/* Information Route */\n\nmodule.exports = function(app){\n\t\n\tapp.get('/infos/installation',function(req,res){\n\t\t res.render('infos/installation', { title: 'Installation' });\n\t});\... | javascript | chosen |
[
{
"from": "system",
"value": "Update with unauthorised redirect on 403.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar path = require('path');\nvar favicon = require('serve-favicon');\nvar logger = require('morgan');\nvar cookieParser = require('cookie-parser');\n\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Fix `options.encoding` if not decompressing Brotli\n"
},
{
"from": "human",
"value": "'use strict';\nconst decompressResponse = require('decompress-response');\nconst is = require('@sindresorhus/is');\nconst mimicResponse = require('mimic-response');\nconst progress... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bundling task w/ cached templates\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar browserify = require('browserify');\nvar source = require('vinyl-source-stream');\nvar buffer = require('vinyl-buffer');\nvar streamqueue = require('streamqueue'... | javascript | chosen |
[
{
"from": "system",
"value": "Test XHR throw ex on mailformed URL.\n\n On branch rc1\n\tmodified: firefox/content/prototype.js\n"
},
{
"from": "human",
"value": "var Q = require(\"events\");\nvar HTTP = require(\"http\");\n\nvar P;\n\nwindow.addEventListener(\"load\",\n function (e) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set Access-Control-Allow-Origin header value for production\n"
},
{
"from": "human",
"value": "const program = require('commander');\nconst MongoClient = require('mongodb').MongoClient;\n\nconst logger = require('./logging').logger;\n\nprogram\n .version('0.1.0')... | javascript | chosen |
[
{
"from": "system",
"value": "Add signature command to post install message\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\nconsole.log();\nconsole.log('Install affiance hooks by running the following command from your Git repo root:');\nconsole.log(' ./node_modules/.bin/affiance insta... | javascript | chosen |
[
{
"from": "system",
"value": "Add route to pending bets\n"
},
{
"from": "human",
"value": "Router.configure({\n layoutTemplate: 'layout'\n});\n\nRouter.map(function(){\n this.route('home', {\n path: '/'\n });\n})\n"
},
{
"from": "gpt",
"value": "Router.configure({\n layoutTemp... | javascript | chosen |
[
{
"from": "system",
"value": "Patch on a previous version\n"
},
{
"from": "human",
"value": "import \"es6-promise/auto\";\nimport CommandInvoker from './commandInvoker';\nimport Command, { UndoableCommand, CommandWrapper } from './command';\nimport NullCommand from './nullCommand';\n\nconst expo... | javascript | chosen |
[
{
"from": "system",
"value": "Switch coming soon button to apply now\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst Offseason = () => (\n <div className=\"offseason\">\n <div className=\"lead\">\n <div className=\"neonlogo\"></div>\n <h1 className=\"title wh... | javascript | chosen |
[
{
"from": "system",
"value": "Update CatSchema to include 'contact-name'\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\n\nvar CatSchema = new mongoose.Schema({\n id: {\n type: String,\n required: true,\n unique: true\n },\n\n name: String,\n\n age: String,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add select options for autoform.\n"
},
{
"from": "human",
"value": "Residents = new Mongo.Collection('residents');\n\nvar ResidentsSchema = new SimpleSchema({\n firstName:{\n type:String,\n label: 'First Name',\n optional: true,\n },\n homeId:{\n type... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for older browsers\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n if ('padStart' in String.prototype) return;\n String.prototype.padStart = function(len, str) {\n len = parseInt(len); if (isNaN(len)) len = 0;\n str = str === ... | javascript | chosen |
[
{
"from": "system",
"value": "docs: Add comment denoting change and why it's hard to test and when to revisit.\n"
},
{
"from": "human",
"value": "import props from './props';\n\nfunction getValue (elem) {\n const type = elem.type;\n if (type === 'checkbox' || type === 'radio') {\n return el... | javascript | chosen |
[
{
"from": "system",
"value": "Make schema the first argument of \"init\"\n"
},
{
"from": "human",
"value": "const Hooter = require('hooter')\nconst defaultSchema = require('./schema')\n\n\nconst EVENTS = [\n ['schema', 'sync'],\n ['init', 'sync'],\n ['configure', 'sync'],\n ['start', 'sync']... | javascript | chosen |
[
{
"from": "system",
"value": "Remove weird duplication of removal of destroyed entity from updater."
},
{
"from": "human",
"value": ";(function(exports) {\n function Entities() {\n this._entities = [];\n };\n\n Entities.prototype = {\n all: function(clazz) {\n if (clazz === undefin... | javascript | chosen |
[
{
"from": "system",
"value": "Remove require of removed module\n"
},
{
"from": "human",
"value": "var timerStart = performance.now();\n\ntry {\n var settings = require('_settings');\n\n var controller = require('stage_controller');\n var debug = require('stage_debug');\n var creeps =... | javascript | chosen |
[
{
"from": "system",
"value": "Add examples to code style validation\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function (gulp, $) {\n\n gulp.task('scripts:setup', function () {\n return gulp.src('source')\n .pipe($.symlink('examples/source', { force: true }));\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix constantine death on integers\n"
},
{
"from": "human",
"value": "Constants = (function() {\n var CONSTANTS_URI = 'http://constantine.teaisaweso.me/json';\n\n var gotConstants = new Bacon.Bus();\n var constants = gotConstants.toProperty().skipDuplicates(... | javascript | chosen |
[
{
"from": "system",
"value": "Add active to session type model\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport DS from 'ember-data';\n\nconst { String:EmberString, computed } = Ember;\nconst { Model, attr, belongsTo, hasMany } = DS;\nconst { htmlSafe } = EmberString;\n\nexp... | javascript | chosen |
[
{
"from": "system",
"value": "Add menus to default layout\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst LayoutRenderable = require('./layoutRenderable');\n\nclass DefaultLayoutRenderable extends LayoutRenderable {}\n\nDefaultLayoutRenderable.id = 'defaultLayout';\nDefaultLayoutRend... | javascript | chosen |
[
{
"from": "system",
"value": "Fix raf shim for test environment\n"
},
{
"from": "human",
"value": "var raf = function (func) {\n return setTimeout(func, 1);\n};\n\nvar caf = function (id) {\n return clearTimeout(id);\n};\n"
},
{
"from": "gpt",
"value": "var raf = (function () {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix execution condition of content script.\n"
},
{
"from": "human",
"value": "// Enable chromereload by uncommenting this line:\n//import 'chromereload/devonly';\n\nconst isValidPage = () => {\n return (() => {\n const target = document.getElementsByClassName('j... | javascript | chosen |
[
{
"from": "system",
"value": "Add addClass and removeClass method.\n"
},
{
"from": "human",
"value": "export function forEach(arrayLike, iteratee){\r\n return Array.prototype.forEach.call(arrayLike, iteratee);\r\n}\r\n\r\nexport function $(selector){\r\n return document.querySelectorAll(select... | javascript | chosen |
[
{
"from": "system",
"value": "Update anchor tag in footer to react Link component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport Landing from './Landing';\nimport Dashboard from './Dashboard';\nimport WishlistPublic from '... | javascript | chosen |
[
{
"from": "system",
"value": "Test modified. 'JSON.stringify' does not serialize functions."
},
{
"from": "human",
"value": "/* Javascript eval */\n\nmystructure = { a:39, b:3, addStuff : function(c,d) { return c+d; } };\n\nmystring = JSON.stringify(mystructure, undefined); \n\nmynewstructure = ... | javascript | chosen |
[
{
"from": "system",
"value": "Set the default color to teal\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react';\nimport Box from '../box';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport omit from 'lodash.omit';\nimport theme from './theme.... | javascript | chosen |
[
{
"from": "system",
"value": "Use the new @node-require feature of steal\n"
},
{
"from": "human",
"value": "var loader = require(\"@loader\");\nvar nodeRequire = loader._nodeRequire;\n\nmodule.exports = nodeRequire(\"less\");\n"
},
{
"from": "gpt",
"value": "var nodeRequire = require... | javascript | chosen |
[
{
"from": "system",
"value": "Update step-3 to Karma 0.10.\n"
},
{
"from": "human",
"value": "basePath = '../';\n\nfiles = [\n ANGULAR_SCENARIO,\n ANGULAR_SCENARIO_ADAPTER,\n 'test/e2e/**/*.coffee'\n];\n\nautoWatch = false;\n\nbrowsers = ['Firefox', 'chromium'];\n\nsingleRun = true;\n\nproxie... | javascript | chosen |
[
{
"from": "system",
"value": "Add saving file via NodeJS's fs.\n"
},
{
"from": "human",
"value": "const MONGOOSE_CONSOLE_DEFAULT_PORT = 8080;\nvar express = require('express');\nvar app = express();\n\nvar path = __dirname + '';\nvar port = process.env.CONSOLE_PORT || MONGOOSE_CONSOLE_DEFAULT_PO... | javascript | chosen |
[
{
"from": "system",
"value": "Add Jasmine for basic unit testing.\n"
},
{
"from": "human",
"value": "\nconst DEBUG = false;\nconst ctxHEIGHT = 100, ctxWIDTH = 280;\nconst DEFAULTS = {\n\t\"blacklist\":\"\"\n ,\"whitelist\":\"\"\n ,\"timeout\":30000\n ,\"checkType\":\"HEAD\"\n ,\"igno... | javascript | chosen |
[
{
"from": "system",
"value": "Change click number to user polls\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function () {\n\n // var addButton = document.querySelector('.btn-add');\n // var deleteButton = document.querySelector('.btn-delete');\n var clickNbr = document.querySelect... | javascript | chosen |
[
{
"from": "system",
"value": "BACKEND: Fix blacklist user api url.\n\n"
},
{
"from": "human",
"value": "import axios from 'axios'\n\nconst BLACKLIST_USER_API_BASE_URL = \"http://localhost:8080/blacklist_user\";\n\nclass BlacklistUserService {\n\n getBlacklistUsers() {\n return axios.ge... | javascript | chosen |
[
{
"from": "system",
"value": ":wrench: Use HTTPS - Thanks to @grander\n"
},
{
"from": "human",
"value": "var pythonMirror = process.env.npm_config_python_mirror || process.env.PYTHON_MIRROR || 'https://www.python.org/ftp/python/'\n\nvar buildTools = {\n installerName: 'BuildTools_Full.exe',\n ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.