conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add Component to StyleManager tests\n"
},
{
"from": "human",
"value": "var path = 'StyleManager/view/';\ndefine([path + 'PropertyView', 'StyleManager/model/Property'],\n function(PropertyView, Property) {\n\n return {\n run : function(){\n\n descri... | javascript | chosen |
[
{
"from": "system",
"value": "Change CORS settings to credentials:true\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Hapi = require('hapi');\nvar routes = require('./routes');\nvar config = require('./config');\nvar server = new Hapi.Server();\n\nserver.connection({\n port:config.SERV... | javascript | chosen |
[
{
"from": "system",
"value": "Update the output when the app is running\n"
},
{
"from": "human",
"value": "const express = require('express')\nconst app = express()\nconst path = require('path')\nconst nunjucks = require('nunjucks')\n\n// Set up App\nconst appViews = [\n path.join(__dirname, '/... | javascript | chosen |
[
{
"from": "system",
"value": "Add promise queue to queue handler\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n format: require('./format'),\n listing: require('./listing'),\n add: require('./add')\n};\n"
},
{
"from": "gpt",
"value": "'use strict';\n\n// ... | javascript | chosen |
[
{
"from": "system",
"value": "Customize port to listen to\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar http = require('http');\nvar path = require(\"path\");\nvar fs = require('fs');\nvar _ = require('underscore');\nvar ldap = require('./modules/ldap');\nvar app =... | javascript | chosen |
[
{
"from": "system",
"value": "Complete lecture 31: add express application and base routing functionalities\n"
},
{
"from": "human",
"value": "'use strict'\n\nconsole.log(\"Welcome to Chatcat\");\n"
},
{
"from": "gpt",
"value": "'use strict'\n\nconst express = require('express');\nco... | javascript | chosen |
[
{
"from": "system",
"value": "Add JS char counter for Tweet content\n"
},
{
"from": "human",
"value": "$('body').scrollspy({\n target: '.bs-docs-sidebar',\n offset: 40\n});\n"
},
{
"from": "gpt",
"value": "$('body').scrollspy({\n target: '.bs-docs-sidebar',\n offset: 40\n... | javascript | chosen |
[
{
"from": "system",
"value": "WORK WORK CARRY MOVE MOVE MOVE\n"
},
{
"from": "human",
"value": "module.exports = function () {\n StructureSpawn.prototype.createCustomCreep = \n function(energy, roleName) {\n var numberOfParts = Math.floor(energy / 350);\n var body = [];\n ... | javascript | chosen |
[
{
"from": "system",
"value": "refactor(Inputs): Rewrite component into stateless function\n"
},
{
"from": "human",
"value": "// @flow\nimport React from 'react';\n\ntype Props = {\n executionCount: any,\n running: boolean,\n};\n\nexport default class Inputs extends React.PureComponent {\n pro... | javascript | chosen |
[
{
"from": "system",
"value": "Use a more sensible output file name\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar fs = require(\"fs\");\nvar glob = require(\"glob\");\nvar ts = require(\"typescript\");\nvar tsa = require(\"../lib/Analyzer\");\nvar o = require(\"../lib/JsonOutput\"... | javascript | chosen |
[
{
"from": "system",
"value": "Change file image size parameter\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst express = require(\"express\");\nconst app = express();\n\n// install request\nconst request = require('request');\n\nconst PORT = process.env.PORT || 3000;\nconst rovi = pr... | javascript | chosen |
[
{
"from": "system",
"value": "Select first option by default\n"
},
{
"from": "human",
"value": "var courses = new Bloodhound({\n datumTokenizer: Bloodhound.tokenizers.obj.whitespace('keywords'),\n queryTokenizer: Bloodhound.tokenizers.whitespace,\n prefetch: '/data/courses.json'\n});\n\n$('#b... | javascript | chosen |
[
{
"from": "system",
"value": "Sort tallied measurements for consistent display\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst tally = (measurements, buffer) => {\n const tallied = measurements.reduce((accum, value) => {\n accum[value+buffer] = (accum[value+buffer] || ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with createdBy attribute column\n\nDon't throw error when users doesn't have profile in createdBy\nattribute column\n"
},
{
"from": "human",
"value": "orion.attributes.registerAttribute('createdBy', {\n previewTemplate: 'createdByPreview',\n getSchema: fun... | javascript | chosen |
[
{
"from": "system",
"value": "Stop trying to be fast.\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix redux devtools not being loaded.\n"
},
{
"from": "human",
"value": "import {createStore, applyMiddleware, compose} from 'redux'\nimport {routerMiddleware} from 'react-router-redux'\nimport {browserHistory} from 'react-router'\nimport makeReducer from '../univers... | javascript | chosen |
[
{
"from": "system",
"value": "Set the featureFlag without using lodash.\n"
},
{
"from": "human",
"value": "/**\n * External dependencies\n */\nimport { storiesOf } from '@storybook/react';\nimport { set } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport UserInputApp from '../assets/j... | javascript | chosen |
[
{
"from": "system",
"value": "Use truncate for search suggestions\n"
},
{
"from": "human",
"value": "import highlight from 'flarum/helpers/highlight';\nimport ActionButton from 'flarum/components/action-button';\n\nexport default class DiscussionsSearchResults {\n constructor() {\n this.resu... | javascript | chosen |
[
{
"from": "system",
"value": "Change cookie expiration to 1 year (instead of 1 day).\n"
},
{
"from": "human",
"value": "function hideAnnouncement(announcement_created_at) {\n createCookie(announcement_created_at, 'hidden', 1);\n $(\"#announcement\").parent().slideUp();\n}\n\n// http://www.quir... | javascript | chosen |
[
{
"from": "system",
"value": "Remove DE QC query string param code for this PR.\n"
},
{
"from": "human",
"value": "// Middleware generally used for actions needing parsed queryStrings\nimport queryString from 'query-string'\nimport uuid from 'node-uuid'\n\nimport {enablePresentationMode} from 's... | javascript | chosen |
[
{
"from": "system",
"value": "Add constructor and olddata to data event\n"
},
{
"from": "human",
"value": "/*\n==================================================================================================\n Lowland - JavaScript low level functions\n Copyright (C) 2012 Sebatian Fastner\n==... | javascript | chosen |
[
{
"from": "system",
"value": "Rename internal properties of SmoothHelper to avoid collisions with\nclasses that use the mixin.\n"
},
{
"from": "human",
"value": "Dashboard.SmoothHelper = Ember.Mixin.create({\n interval: 10,\n\n properties: function() {\n return {};\n }.property(),\n\n set... | javascript | chosen |
[
{
"from": "system",
"value": "Add performance budgeting to babel/postcss/extract-text e2e test\n"
},
{
"from": "human",
"value": "const webpack2 = require('../../index')\n\n// Need to write it like this instead of destructuring so it runs on Node 4.x w/o transpiling\nconst addPlugins = webpack2.... | javascript | chosen |
[
{
"from": "system",
"value": "Make controller routes as expressions.\n"
},
{
"from": "human",
"value": "import express from 'express';\nimport bodyParser from 'body-parser';\nimport * as repoModel from '../models/repo';\nimport * as tokenModel from '../models/token';\nimport * as packageModel fr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Turkish abbreviation for \"minutes\"\n\nIn Turkish, the abbreviation of \"dakika\" (minute) is \"dk\".\n"
},
{
"from": "human",
"value": "(function (factory) {\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n } else if (t... | javascript | chosen |
[
{
"from": "system",
"value": "Move the sidebar logic to its own context\n"
},
{
"from": "human",
"value": "var sidebarOpen = false;\nvar menuText = [\"Menu\", \"Close\"];\nvar menuElement = document.querySelector(\".menu-link\");\nvar sidebarElement = document.querySelector(\".sidebar\");\nvar m... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for two files\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar fsWalkParallel = require(\"../lib/fs-walk-parallel\");\nvar mockFs = require(\"mock-fs\");\nvar test = require(\"tape\");\n\nfunction setup(t, fakeFs) {\n\tmockFs.restore();\n\tmockFs(f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove knockout requirement, as it is not used by the custom functions\n"
},
{
"from": "human",
"value": "'use strict';\nvar ko = require('knockout');\nvar AddonNodeConfig = require('js/addonNodeConfig').AddonNodeConfig;\n\nvar url = window.contextVars.node.urls.api... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in logical operators test"
},
{
"from": "human",
"value": "if (typeof define !== 'function') { var define = require('amdefine')(module); }\nif (typeof expect !== 'function') { var expect = require('expect.js'); }\n\ndefine([\n 'app/logicalOperators'\n], fu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix: Add support for FTP_PROXY and SOCKS_PROXY env on linux\n"
},
{
"from": "human",
"value": "module.exports = callback => {\n var proxy = {\n enable: false,\n server: {\n http: process.env.HTTP_PROXY || '',\n https: process.e... | javascript | chosen |
[
{
"from": "system",
"value": "Make column names case-insensitively unique\n\nForce added column names to be lowercase, actually\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction stripTableName(name) {\n return name.split('.').pop();\n}\n\n// This class is used to help generate the ... | javascript | chosen |
[
{
"from": "system",
"value": "Add pre-execution script via message passing\n"
},
{
"from": "human",
"value": "let attachedTabs = {};\n\n// Called when the user clicks on the browser action.\nchrome.browserAction.onClicked.addListener(function(tab) {\n let tabId = tab.id;\n\n if (!attachedTabs[... | javascript | chosen |
[
{
"from": "system",
"value": "Remove wrapper function around StoreWatchMixin\n"
},
{
"from": "human",
"value": "module.exports = function(React) {\n return function() {\n var storeNames = Array.prototype.slice.call(arguments);\n return {\n componentWillMount: function() {\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Fix accessing the user agent string in newer FastBoot versions\n"
},
{
"from": "human",
"value": "import Service from '@ember/service';\nimport { computed, get, getProperties, set } from '@ember/object';\nimport { getOwner } from '@ember/application';\nimport isMobi... | javascript | chosen |
[
{
"from": "system",
"value": "Return correct value, remove unused props\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport DayPicker from 'react-day-picker';\nimport moment from 'moment';\n\nimport s from './DatePicker.css';\n\nconst weekdaysShort = [... | javascript | chosen |
[
{
"from": "system",
"value": "Create random values for worker and datacenter.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar intformat = require('biguint-format');\nvar FlakeId = require('flake-idgen');\n\nvar flakeIdGen = new FlakeId();\n\nvar generateUUID = function () {\n return... | javascript | chosen |
[
{
"from": "system",
"value": "chore: Disable webpack perf hints for dev mode\n"
},
{
"from": "human",
"value": "var\n config = require('../config'),\n webpack = require('webpack'),\n merge = require('webpack-merge'),\n cssUtils = require('./css-utils'),\n baseWebpackConfig = require('./webp... | javascript | chosen |
[
{
"from": "system",
"value": "Update for English Intent Classifier Bug Fix 2\n"
},
{
"from": "human",
"value": "import { PAGE_ACCESS_TOKEN } from './token';\n\nconst apiai = require('apiai');\nconst FBMessenger = require('fb-messenger');\n\nconst messenger = new FBMessenger(PAGE_ACCESS_TOKEN);\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change Help Scout beacon to show subject field\n"
},
{
"from": "human",
"value": "/* eslint-disable */\nexport default function initHsBeacon() {\n !function (e, o, n) { window.HSCW = o, window.HS = n, n.beacon = n.beacon || {}; var t = n.beacon; t.userConfig = {}, ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace http with https for specified domains\n"
},
{
"from": "human",
"value": "function createBookmarkletHref (name) {\n var baseURI = document.baseURI;\n var bookmarklet = \"window.a11y\" + name;\n var scriptname = name.toLowerCase() + '.js';\n return \"javas... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'My Image Requests' to secondary image navigation\n"
},
{
"from": "human",
"value": "define(function (require) {\n\n var React = require('react/addons'),\n Router = require('react-router'),\n Glyphicon = require('components/common/Glyphicon.react'),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use img tag instead of script tag for WebMetricReportingDAO\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2015 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this fil... | javascript | chosen |
[
{
"from": "system",
"value": "Use createTableIfNotExists over plain createTable\n"
},
{
"from": "human",
"value": "exports.up = function(knex, Promise) {\n return Promise.all([\n knex.schema.createTable('users', function(table) {\n table.increments();\n table.string('name');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove trailing / from hike getter.\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar PhotoStreamController = function($scope, $http, analytics) {\n\n\t$http({method: \"GET\", url: \"/api/v1/hikes/\"}).\n\t\tsuccess(function(data, status, headers, config) {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Define new schema relationships between Users and Photos\n"
},
{
"from": "human",
"value": "// This file makes all join table relationships\nconst db = process.env.DB_DATABASE;\nconst dbHost = process.env.DB_HOST;\nconst dbUser = process.env.DB_USER;\nconst dbPasswo... | javascript | chosen |
[
{
"from": "system",
"value": "Add a check in ResponsesShowWindow if view is defined or not\n"
},
{
"from": "human",
"value": "function ResponseShowWindow(responseID) {\n var ResponseShowView = require('ui/common/responses/ResponseShowView');\n var ResponseEditWindow = require('ui/handheld/and... | javascript | chosen |
[
{
"from": "system",
"value": "Use payload for basic user info test\n"
},
{
"from": "human",
"value": "import { assert } from 'chai';\nimport { TimeWarp, listFixtures, loadFixture, loadPayload } from './utils';\n\nimport { scrape, scrapeUserData } from '../src/scrape';\n\ndescribe('Scrape', funct... | javascript | chosen |
[
{
"from": "system",
"value": "Fix auth global import paths\n\nSigned-off-by: Patrick Uiterwijk <bd6d5394796bee9cca2245486eb583fd64b70226@redhat.com>\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\nvar utils = require('../../utils');\n\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Convert to one step util\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar ensureDate = require('es5-ext/date/valid-date')\n , ensureString = require('es5-ext/object/validate-stringifiable-value')\n , memoize = require('memoizee/plain')\n , validDb ... | javascript | chosen |
[
{
"from": "system",
"value": "Make tests between hyperhtml and lit-html consistent since they're very similar.\n"
},
{
"from": "human",
"value": "import { html } from 'lit-html';\nimport { define } from 'skatejs';\nimport withRenderer from '..';\n\nconst Component = withRenderer(HTMLElement);\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Replace util.inherits with class extends\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { EventEmitter } = require('events');\nconst util = require('util');\nconst sinon = require('sinon');\n\nconst stub = {};\n\nObject.assign(stub, {\n write: sinon.stub... | javascript | chosen |
[
{
"from": "system",
"value": "Add a little extra to the symbol-name logging test\n"
},
{
"from": "human",
"value": "\"use strict\";\n\ndescribe(\"loglevel included via node\", function () {\n it(\"is included successfully\", function () {\n expect(require('../lib/loglevel')).not.toBeUn... | javascript | chosen |
[
{
"from": "system",
"value": "Change writeMessage example to show arbituary data write\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar async = require('asyncawait/async');\nvar OrbitClient = require('../OrbitClient');\nvar Timer = require('../Timer');\n\nvar host = 'local... | javascript | chosen |
[
{
"from": "system",
"value": "Return a JSON object instead of plain text.\n"
},
{
"from": "human",
"value": "var http = require('http');\nhttp.createServer(function (req, res) {\n res.setHeader('Access-Control-Allow-Origin', '*');\n res.writeHead(200, {'Content-Type': 'text/plain'});\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test that was reaching over its call stack size.\n"
},
{
"from": "human",
"value": "const chai = require('chai');\nconst assert = chai.assert;\n\nconst Yeti = require('../app/lib/yeti');\nconst Skier = require('../app/lib/skier');\nvar yetiEnding = require('../a... | javascript | chosen |
[
{
"from": "system",
"value": "Set a initial $scope.model.value for true/false\n"
},
{
"from": "human",
"value": "function booleanEditorController($scope, $rootScope, assetsService) {\r\n\r\n function setupViewModel() {\r\n $scope.renderModel = {\r\n value: false\r\n }... | javascript | chosen |
[
{
"from": "system",
"value": "BAP-687: Delete confirmation message is not useful\n - added \"Cancel\" button on delete modal\n"
},
{
"from": "human",
"value": "$(function() {\n $('#btn-apigen').on('click', function(e) {\n var el = $(this);\n\n $.get(el.attr('href'), function (da... | javascript | chosen |
[
{
"from": "system",
"value": "Handle multi field errors in FE\n"
},
{
"from": "human",
"value": "define([\n 'knockout'\n , './models/message'\n], function (ko, MessageModel) {\n util = {}\n util.ajax_fail = function(messages_ob) {\n return function (jqXHR, textStatus, errorT... | javascript | chosen |
[
{
"from": "system",
"value": "Add the `prefer-destructuring` rule commented out\n\nhttp://eslint.org/docs/rules/prefer-destructuring\n"
},
{
"from": "human",
"value": "'use strict';\nconst path = require('path');\n\nmodule.exports = {\n\textends: path.join(__dirname, 'index.js'),\n\trules: {\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Use tooltip for background jobs info tooltip\n"
},
{
"from": "human",
"value": "/**\n* ownCloud\n*\n* @author Jakob Sack\n* @copyright 2012 Jakob Sack owncloud@jakobsack.de\n*\n* This library is free software; you can redistribute it and/or\n* modify it under the te... | javascript | chosen |
[
{
"from": "system",
"value": "Format CA post codes properly\n"
},
{
"from": "human",
"value": "module.exports = (inc, contents) => {\n var pic = contents.picture;\n delete contents.picture;\n\n include(inc, 'phone', random(3, 3) + '-' + random(3, 3) + '-' + random(3, 4));\n include(i... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic functionality to generate sql for tracks\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar parse = require('fast-plist').parse;\n\nvar musicLibrayXmlFilename = process.argv[2];\n\nif(!musicLibrayXmlFilename){\n\tconsole.error(\"usage: \" + pr... | javascript | chosen |
[
{
"from": "system",
"value": "Update the funciton call now quarry is more defined\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar slateCli = require('slate-cli');\nconsole.log(process.cwd());\nslateCli.ensureSlate(process.cwd());\n"
},
{
"from": "gpt",
"value": "'use strict';... | javascript | chosen |
[
{
"from": "system",
"value": "Fix karma compile fail when installed"
},
{
"from": "human",
"value": "/* istanbul ignore next */\nimport './sandbox';\n\n// require all modules ending in \"_test\" from the\n// current directory and all subdirectories\n/* istanbul ignore next */\nlet testsContext =... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Merge two tests into a nested given\n"
},
{
"from": "human",
"value": "// Copyright (c) 2017 The Regents of the University of Michigan.\n// All Rights Reserved. Licensed according to the terms of the Revised\n// BSD License. See LICENSE.txt for details.\n\ncon... | javascript | chosen |
[
{
"from": "system",
"value": "Add backbone and it's dependencies using componentDidMount\n"
},
{
"from": "human",
"value": "/**\n * @jsx React.DOM\n */\n\n/* Requiring dependencies for demo purposes, this should be done only when required */\nvar React = require('React');\nvar jquery = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Add urlPath and correct src source"
},
{
"from": "human",
"value": "const Image = require('@11ty/eleventy-img');\n\nmodule.exports = async (src, alt, className, outputFormat = 'jpeg') => {\n if (alt === undefined) {\n throw new Error(`Missing ALT attribute from:... | javascript | chosen |
[
{
"from": "system",
"value": "Change typeof check to != null check\n"
},
{
"from": "human",
"value": "const hasOwnProperty = Object.prototype.hasOwnProperty;\n\nexport function assert(condition, message) {\n if(!condition) {\n throw Error(message);\n }\n}\n\nexport function forKeys(obj, cal... | javascript | chosen |
[
{
"from": "system",
"value": "Enable test coverage for test coverage.\n\nR=titzer@chromium.org\nTEST=mjsunit/compiler/opt-next-call-turbo\n\nReview URL: https://codereview.chromium.org/822673003\n\nCr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#26192}\n"
},
{
"from": "human",
"va... | javascript | chosen |
[
{
"from": "system",
"value": ":green_heart: Set SL currency to 1\n"
},
{
"from": "human",
"value": "const karmaDefault = require('./karma.default');\n\nmodule.exports = config => {\n // Browsers to run on Sauce Labs\n const customLaunchers = {\n 'SL_Chrome': {\n base: 'Sa... | javascript | chosen |
[
{
"from": "system",
"value": ":new: Add constructor and dispose method\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst LRU = require('lru-cache')\nconst FS = require('fs')\n\nclass SmartCache {\n constructor() {\n\n }\n\n static DefaultValidator(filePath, oldInfo) {\n const Deferr... | javascript | chosen |
[
{
"from": "system",
"value": "Update blink status example to use chipio.StatusLed\n"
},
{
"from": "human",
"value": "var five = require('johnny-five');\nvar ChipIO = require('../index'); // or require('chip-io');\n\nvar board = new five.Board({\n io: new ChipIO()\n});\n\nboard.on('ready', funct... | javascript | chosen |
[
{
"from": "system",
"value": "Move `importStylesheet` and `transformToDocument` onto `XSLTProcessor.prototype` where they belong.\n\nCloses https://github.com/google/closure-compiler/issues/3750\n\nPiperOrigin-RevId: 351231201\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2008 The Closure ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve error managment\nWrap the compiler call inside a try {} catch {} to avoid killing the\nmeteor process.\n"
},
{
"from": "human",
"value": "var fs = Npm.require('fs');\nvar stylus = Npm.require('stylus');\nvar nib = Npm.require('nib');\nvar jeet = Npm.require(... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'extraAllowedContent' to CKEditor config\n"
},
{
"from": "human",
"value": "(function(win, doc){\n 'use strict';\n \n var\n getRootPath = function(){\n var parts = win.location.pathname.split('/');\n parts.shift(); // remove first\n parts.po... | javascript | chosen |
[
{
"from": "system",
"value": "Support arguments for the inherited class constructor\n"
},
{
"from": "human",
"value": "import mobx from 'mobx';\nimport spy from './spy';\n\nexport default function dev(store, config) {\n if (typeof window === 'undefined' || !window.devToolsExtension) return stor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix expected text in integration test\n\n* Rewording in f456e6416 was not replicated in tests\n"
},
{
"from": "human",
"value": "PRESTATION_TO_TEST_POSITION = 1\nPRESTATION_NAME = /Prime d’activité/\nPRESTATION_DESCRIPTION = /revenus modestes/\nHAS_PRESTATION_WARNIN... | javascript | chosen |
[
{
"from": "system",
"value": "Enable a websockets config option\n"
},
{
"from": "human",
"value": "var Web3 = require(\"web3\");\n\nvar wrapper = require('./wrapper');\n\nmodule.exports = {\n wrap: function(provider, options) {\n return wrapper.wrap(provider, options);\n },\n\n create: fun... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the processing feature when there is an error.\n"
},
{
"from": "human",
"value": "var signinSSODialogHelperInst = window.optly.mrkt.form.signin({formId: 'signin-sso-form'});\n\nnew Oform({\n selector: '#signin-sso-form',\n middleware: w.optly.mrkt.Oform.def... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug when the recommendations list show while loading\n"
},
{
"from": "human",
"value": "import apis from '../apis'\n\nexport function getSuggestions(name) {\n return dispatch => {\n const url = apis.GET_SUGGESTIONS(encodeURIComponent(name))\n fetch(url)\n... | javascript | chosen |
[
{
"from": "system",
"value": "Set controller for register view\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar app = angular.module(\"VinculacionApp\", ['ui.router', 'ngAnimate']);\n\napp.config(['$stateProvider', '$urlRouterProvider',function($stateProvider, $urlRouterProvider) {\n\t$... | javascript | chosen |
[
{
"from": "system",
"value": "Modify refresh page js slightly\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\tconsole.log(\"works\")\n\n\tsetTimeout(refreshTickets, 10000);\n \n});\n\n\nfunction refreshTickets() { \n\t// event.preventDefault();\n\twindow.location.href = wind... | javascript | chosen |
[
{
"from": "system",
"value": "Add copyright header to distributed CSS\n"
},
{
"from": "human",
"value": "import del from 'del';\nimport gulp from 'gulp';\nimport mergeStream from 'merge-stream';\nimport loadPlugins from 'gulp-load-plugins';\nimport cssnextPlugin from 'postcss-cssnext';\nimport {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests after contract change broke them.\n"
},
{
"from": "human",
"value": "var NULL_ADDRESS = '0x0000000000000000000000000000000000000000';\n\nfunction getTransactionError(func) {\n return Promise.resolve().then(func)\n .then(function(txid) {\n var tx =... | javascript | chosen |
[
{
"from": "system",
"value": "Use shelljs instead of rimraf\n\n\nFormer-commit-id: 0a776b2259f3f3d5cda8d1103689539cfd9f862e"
},
{
"from": "human",
"value": "module.exports = function(grunt, config, parameters, done) {\n\n\tfunction endForError(e) {\n\t\tprocess.stderr.write(e.message || e);\n\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Disable pushState for file: protocl URLs\n"
},
{
"from": "human",
"value": "App = {\n placeAnchorHooks : function() {\n $('[data-href]').on('click',function() {\n App.Router.navigate( $(this).attr('data-href'), true );\n _.delay(function() { window.scr... | javascript | chosen |
[
{
"from": "system",
"value": "Implement attribute (non-terminal, rule name) highlighting.\n"
},
{
"from": "human",
"value": "/*\nLanguage: Extended Backus-Naur Form\nAuthor: Alex McKibben <alex@nullscope.net>\n*/\n\nfunction(hljs) {\n var specialSequenceMode = {\n className: \"meta\",\... | javascript | chosen |
[
{
"from": "system",
"value": "Add `Built` to round status\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\n\nexport default DS.Transform.extend({\n deserialize: function(serialized) {\n var map = {\n 0: 'New',\n 20: 'Started',\n 25: 'Reviewed',\n 30: 'Fini... | javascript | chosen |
[
{
"from": "system",
"value": "Remove old stuff that's not really needed"
},
{
"from": "human",
"value": "class Container{\n constructor(){\n this.services = {};\n }\n\n destroy(){\n delete this.services;\n this.services = {};\n }\n\n /**\n * Defines a serv... | javascript | chosen |
[
{
"from": "system",
"value": "Add a new spec to test the simpler placemark\n"
},
{
"from": "human",
"value": "/*global defineSuite*/\ndefineSuite(['DynamicScene/KmlDataSource',\n 'DynamicScene/DynamicObjectCollection',\n 'Core/loadXML',\n 'Core/Event'\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add updateItem test for field Boolean.\n"
},
{
"from": "human",
"value": "var demand = require('must');\n\nvar keystone = require('../').init(),\n\tTypes = keystone.Field.Types;\n\n/** Test List and Fields */\n\nvar Test = keystone.List('Test');\n\nTest.add({\n\tdat... | javascript | chosen |
[
{
"from": "system",
"value": "docs(README): Reduce confusion about when middleware dispatches emitted actions\n\n\"automatically dispatch\" is misleading/confusing. This event is dispatched because `dispatch(fetchUser())` is called elsewhere-- merely returning an action object from `.map` function does not ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to the update method on the DAL\n"
},
{
"from": "human",
"value": "var should = require('should'),\n queixinhas_db = require('../lib/db/db');\n\n// Change the default BD configs\nqueixinhas_db.db_name = 'queixinhas_tests';\n\ndescribe('MongoDB accesser',... | javascript | chosen |
[
{
"from": "system",
"value": "Use `jQuery.event.addProp` to add `dataTransfer` property\n"
},
{
"from": "human",
"value": "import { context, environment } from 'ember-environment';\nimport require from 'require';\n\nlet jQuery;\n\nif (environment.hasDOM) {\n jQuery = context.imports.jQuery;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use `canOpen` in GPIO `open` function\n"
},
{
"from": "human",
"value": "import Promise from \"bluebird\";\nimport gpio from \"rpi-gpio\";\nimport _ from \"underscore\";\n\nclass RpiGpioOpener {\n\n constructor(config) {\n gpio.setMode(gpio.MODE_BCM);\n this.... | javascript | chosen |
[
{
"from": "system",
"value": "Enable globally installed custom upload action\n"
},
{
"from": "human",
"value": "const fs = require('fs')\nconst path = require('path')\nconst {name} = require('./package.json')\nconst requireg = require('requireg')\n\nmodule.exports = (job, settings, {... | javascript | chosen |
[
{
"from": "system",
"value": "Add DHCP lease binding to the protocol\n"
},
{
"from": "human",
"value": "// Copyright 2014, Renasar Technologies Inc.\n/* jshint: node:true */\n\n'use strict';\n\nvar di = require('di');\n\nmodule.exports = eventsProtocolFactory;\n\ndi.annotate(eventsProtocolFactor... | javascript | chosen |
[
{
"from": "system",
"value": "Add protection via API_KEY in parameter"
},
{
"from": "human",
"value": "/*jshint strict:true, trailing:false, unused:true, node:true */\n'use strict';\n\nrequire(\"babel/register\");\n\nvar EventEmitter = require('eventemitter3');\nvar emitter = new EventEmitter();... | javascript | chosen |
[
{
"from": "system",
"value": "Set a tight search radius\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Backbone = require('backbone');\nvar $ = require('jquery');\nBackbone.$ = $;\n\nvar BusinessCollection = require('../collections/business-collection');\nvar MapModel = require('../mode... | javascript | chosen |
[
{
"from": "system",
"value": "Set the version 1.9 of phantomjs as the 2 is not compatible yet"
},
{
"from": "human",
"value": "var isbin = require('isbin');\nvar logger = require('chip')();\nvar prequire = require('parent-require');\n\nmodule.exports = function(launchPhantom){\n\t'use strict';\n... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.