conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": ":fire: Fix terminal calculation with padding\n"
},
{
"from": "human",
"value": "import Store from '../store'\nimport { PADDING } from '../defaults/variables'\n\nexport default (ele, tester) => {\n const padding = Store.config.padding || PADDING\n const style... | javascript | chosen |
[
{
"from": "system",
"value": "Throw error when parsing fails\n"
},
{
"from": "human",
"value": "\nmodule.exports = function logparse(log) {\n var lines = log.split(\"\\n\")\n\n // Cut the last line to avoid undefined element\n var lines = lines.slice(0, lines.length - 1)\n\n var commits = li... | javascript | chosen |
[
{
"from": "system",
"value": "Use relocated Destiny 1 endpoints.\n"
},
{
"from": "human",
"value": "import request from 'request';\n\nclass BungiePlatformService {\n get(endpoint) {\n let options = {\n url: `https://www.bungie.net/Platform${endpoint}`,\n headers: ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove a breaking instance of coffee-cache\n"
},
{
"from": "human",
"value": "require('coffeescript/register') /* so we can require coffeescript */\nrequire('coffee-cache').setCacheDir('.coffee/cache') /* two level is NECESSARY; so coffeescript doesn't get recompil... | javascript | chosen |
[
{
"from": "system",
"value": "Test case for preserving the leading and trailing whitespace now passes."
},
{
"from": "human",
"value": "(function(host) {\n \n var exported = {\n preprocess: function(input, defines) {\n var lines = input.split(/\\r?\\n/);\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Add refresh button (last night)\n"
},
{
"from": "human",
"value": "var ClassifierList = React.createClass({\n getInitialState: function() {\n return {\n classifiers: null,\n time: 0\n }\n },\n getClassifierList: function(... | javascript | chosen |
[
{
"from": "system",
"value": "Add one more cwd to execFile\n"
},
{
"from": "human",
"value": "var execFile = require('child_process').execFile;\nvar path = require('path');\nvar studylist = require('./studylist');\n\nexports.getHstPath = function () {\n return path.join(studylist.getDataHome(... | javascript | chosen |
[
{
"from": "system",
"value": "Solve Leap Year in JS\n"
},
{
"from": "human",
"value": "var Year = function (year) {\n this.year = year;\n};\n\nYear.prototype.isLeap = function() {\n if (this.year % 4 === 0 && this.year % 100 !== 0)\n return true;\n return false;\n}\n\nmodule.exports = Year... | javascript | chosen |
[
{
"from": "system",
"value": "Add penalty for not making food\n"
},
{
"from": "human",
"value": "function collectWood(){\n\twood = wood + woodAdd;\n\tupdate();\n}\n\nfunction collectStone(){\n\tif(wood >= 5){\n\t\twood = wood - 5;\n\t\tstone = stone + stoneAdd;\n\t}\n\tupdate();\n}\n\nfunction c... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"0.8 support: use 'instanceof' instead of '__proto__' test\"\n\nThis reverts commit 967262f6c43a7c94828f40dbd4ee58759f2bb4d9.\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar fs = require('fs')\n\nmodule.exports = clone(fs)\n\nfunction clone (obj) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Stop starting Sauce Connect automatically\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n config.set({\n frameworks: ['mocha'],\n browsers: ['Firefox', 'PhantomJS'],\n files: ['build/test.js']\n });\n\n if (proc... | javascript | chosen |
[
{
"from": "system",
"value": "Add /docs to search path for production builds\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n config.set({\n basePath: '.',\n frameworks: ['jquery-3.2.1', 'jasmine-jquery', 'jasmine'],\n browsers: ['ChromeHeadless'],\n files: [... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Karma for new naming\n"
},
{
"from": "human",
"value": "'use strict';\nmodule.exports = function(config) {\n config.set({\n basePath: '.',\n\n frameworks: ['mocha', 'chai'],\n\n autoWatch: true,\n singleRun: false,\n browsers: ['Chrome'],\n au... | javascript | chosen |
[
{
"from": "system",
"value": "Fix throwing of function instead of error\n"
},
{
"from": "human",
"value": "const createError = require('create-error');\n\nfunction ModelNotResolvedError() {\n ModelNotResolvedError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: Mo... | javascript | chosen |
[
{
"from": "system",
"value": "Test if album can be pulled from Audio Station\n"
},
{
"from": "human",
"value": "'use strict';\n\nrequire('../../../env');\n\nlet payload = {};\n\npayload.build = function() {\n return (req, res, next) => {\n // req.body.album = album;\n req.body.api_key... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to the 140byt.es source of the JS logo."
},
{
"from": "human",
"value": "function(a,b,c){for(a=12;a--;c=[c]+(4095^[,396,82,66,76,80,76][a]).toString(2)+2);for(a in c)b=[b]+\" ■\\n\"[c[a]];return b}"
},
{
"from": "gpt",
"value": "function(a,b,c){... | javascript | chosen |
[
{
"from": "system",
"value": "Return list in desc order\n"
},
{
"from": "human",
"value": "Template.postsList.helpers({\n posts: function() {\n return Posts.find();\n }\n});\n"
},
{
"from": "gpt",
"value": "Template.postsList.helpers({\n posts: function() {\n return Posts.fi... | javascript | chosen |
[
{
"from": "system",
"value": "Terminate gracefully on nearing memory limit\n\nIf the process is approaching the configured memory limit then terminate gracefully instead of allowing the process to hit the limit and crash losing data.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Prom... | javascript | chosen |
[
{
"from": "system",
"value": "Allow select type to link to item in column\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ItemsTableCell from '../../components/ItemsTableCell';\nimport ItemsTableValue from '../../components/ItemsTableValue';\n\nvar SelectColumn = React.crea... | javascript | chosen |
[
{
"from": "system",
"value": "Remove some lines as defined in ADR1.\n"
},
{
"from": "human",
"value": "// 25: class - extends\n// To do: make all tests pass, leave the assert lines unchanged!\n\ndescribe('Classes can inherit from another using `extends`', () => {\n describe('the default super c... | javascript | chosen |
[
{
"from": "system",
"value": "Normalize emiited peerjs id's with a plus sign\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport { log, LOG_TYPES } from './log';\n\nimport config from './config';\n\nimport { io, EVENT_TYPES } from './socketIO';\n\nlet peerJSOptions = config.peerJSOptions;... | javascript | chosen |
[
{
"from": "system",
"value": "Set $ and jQuery separately\n"
},
{
"from": "human",
"value": "/* eslint no-console:0 */\nimport 'babel-polyfill' // ES6 for browsers like IE\n\nimport 'unpoly/dist/unpoly'\nimport 'unpoly/dist/unpoly-bootstrap3'\nimport 'jquery-ujs' // Rails goodies\n\nimport 'asse... | javascript | chosen |
[
{
"from": "system",
"value": "Add __fromUserId field to data object received on broadcast event\n"
},
{
"from": "human",
"value": "// -------------------------------------------------------------------------- //\n// ------------------------------ Allow/deny -------------------------------- //\n/... | javascript | chosen |
[
{
"from": "system",
"value": "Use bare build in specs\n"
},
{
"from": "human",
"value": "require.config({\r\n paths: {\r\n \"bluebird\": \"../node_modules/bluebird/js/browser/bluebird.min\",\r\n \"wolfy87-eventemitter\": \"../node_modules/wolfy87-eventemitter/EventEmitter.min\",\r... | javascript | chosen |
[
{
"from": "system",
"value": "Update brewmaster monk for soft mitigation check damage schools.\n"
},
{
"from": "human",
"value": "import CoreMitigationCheck from 'parser/shared/modules/MitigationCheck';\nimport SPELLS from 'common/SPELLS';\n\n\nclass MitigationCheck extends CoreMitigationCheck {... | javascript | chosen |
[
{
"from": "system",
"value": "Change init function to what the plugin exports\n\nPlugins should no longer export an object with an init function, but rather just the init function itself which gets run on plugin load\n"
},
{
"from": "human",
"value": "const\n {app} = require('electron'),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Add logical formatter: not, and, or, xor"
},
{
"from": "human",
"value": "exports.notempty = function(value) {\n return !exports.empty(value)\n}\n\nexports.empty = function(value) {\n if(!value) return true;\n return value.length == 0;\n}\n"
},
{
"f... | javascript | chosen |
[
{
"from": "system",
"value": "Use ENV.FORCE_JQUERY when building for production\n"
},
{
"from": "human",
"value": "// DOM\nvar Element = {};\nElement.firstChild = function () { return Element; };\nElement.innerHTML = function () { return Element; };\n\nvar document = { createRange: false, create... | javascript | chosen |
[
{
"from": "system",
"value": "Handle NProgress on route events\n"
},
{
"from": "human",
"value": "// ref: <https://gist.github.com/jgatjens/a08126bbbadb2d6096cb>\nexport default () => {\n let oldOpen = XMLHttpRequest.prototype.open;\n\n function onStateChange() {\n if (this.readyState === 1... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mari pointing to dead dir\n"
},
{
"from": "human",
"value": "/* \n * itsjoke.js - It's Joke!.\n *\n * Contributed by Capuccino and Ovyerus.\n */\n\n/* eslint-env node */\n\nconst fs = require('fs');\nconst files = fs.readdirSync(`${__baseDir}/res/itsjoke`);\n\ne... | javascript | chosen |
[
{
"from": "system",
"value": "Remove space between function keyword and params\n"
},
{
"from": "human",
"value": "'use strict';\n\n// TODO: get sounds and lightprograms available from the RaspberryPi\nconst sounds = [\n 'Extreme wake up',\n 'Releaxed wake up',\n 'Crazy wake up',\n 'Beautiful... | javascript | chosen |
[
{
"from": "system",
"value": "Remove .md extension from CONTRIBUTING file\n"
},
{
"from": "human",
"value": "/*\n * grunt-contrib-internal\n * http://gruntjs.com/\n *\n * Copyright (c) 2012 Tyler Kellen, contributors\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove controller, just keys !\n"
},
{
"from": "human",
"value": "/*! Konami v1.0.1 | (c) 2013 Antoine FRITEAU | antoinfriteau.fr/licenses\n*/\n\n(function( $ ) {\n \"use strict\";\n\n $.fn.konami = function( options ) {\n\n var opts, konamiCode, contr... | javascript | chosen |
[
{
"from": "system",
"value": "Improve link to api docs."
},
{
"from": "human",
"value": "import './SearchBoxHelp.css';\nimport React, { Component } from 'react';\nimport MaterialIcon from 'shared/components/icon/MaterialIcon';\nimport Tooltip from 'shared/components/tooltip/Tooltip';\n\nexport d... | javascript | chosen |
[
{
"from": "system",
"value": "Create public directory on new app\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Module dependencies\n */\n\n// Node.js core.\nconst path = require('path');\n\n// Local dependencies.\nconst packageJSON = require('../json/package.json.js');\n\n/**\n * C... | javascript | chosen |
[
{
"from": "system",
"value": "Change to the new jsdom API\n"
},
{
"from": "human",
"value": "var jsdom = require('jsdom').jsdom;\n\nvar doc = jsdom('<html><body></body></html>');\nvar win = doc.defaultView;\n\n/* global global */\n\nglobal.window = win;\nglobal.document = win.document;\nglobal.n... | javascript | chosen |
[
{
"from": "system",
"value": "Update docs after building Travis build 476 of\nregro/regolith\n\nThe docs were built from the branch 'master' against the commit\n8443d8dc8d60974d8604ed8884f2eeb8cca63490.\n\nThe Travis build that generated this commit is at\nhttps://travis-ci.org/regro/regolith/jobs/416462861... | javascript | chosen |
[
{
"from": "system",
"value": "Use bugsnag key in ENV var"
},
{
"from": "human",
"value": "'use strict';\n\nvar express = require('express');\nvar bodyParser = require('body-parser');\nvar bugsnag = require('bugsnag');\nvar debug = require('debug')('librarian');\nvar repoInfoV2... | javascript | chosen |
[
{
"from": "system",
"value": "Add some unit tests for background.js\n"
},
{
"from": "human",
"value": "describe(\"background\", function() {\n\tit(\"expects true to be true\", function() {\n\t\texpect(true).toBe(true);\n\t});\n});\n"
},
{
"from": "gpt",
"value": "describe(\"backgroun... | javascript | chosen |
[
{
"from": "system",
"value": "Move server on port 4000\n"
},
{
"from": "human",
"value": "var http = require('http');\nhttp.createServer(function (req, res) {\n res.writeHead(200, {'Content-Type': 'text/plain'});\n res.end('Hello World\\n');\n}).listen(3000, '0.0.0.0');\nconsole.log('Server ru... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the whoami test. We are mocking the filesystem, it's not necessary to override the items\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar common = require('./../common.js');\nvar whoami = require('../../src/impl/apb-whoami-impl.js');\nvar lib = common.lib... | javascript | chosen |
[
{
"from": "system",
"value": "Add ctrl key to module\n"
},
{
"from": "human",
"value": "ActivateProfessorController.$inject = ['$rootScope', '$state', '$stateParams', 'professors', 'TbUtils', 'auth'];\n\nfunction ActivateProfessorController($rootScope, $state, $stateParams, professors, TbUtils, ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove card on home page\n"
},
{
"from": "human",
"value": "/*\n * HomePage\n *\n * This is the first thing users see of our App, at the '/' route\n *\n * NOTE: while this component should technically be a stateless functional\n * component (SFC), hot reloading does... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"REST API の base URL を api.fukuro.coop.moe に修正\"\n\nThis reverts commit fbfdb69892830c51b1a058ac44a217cbeaa14a39.\n"
},
{
"from": "human",
"value": "\nexport const baseURL = 'https://api.fukuro.coop.moe'\n\nexport function getCall(url, callback) {\n const x... | javascript | chosen |
[
{
"from": "system",
"value": "Change back CLI to exit on SIGINT\n\nThe CLI was changed to exit on the exit event in a previous commit.\nIt made it so that the server shut down print outs wouldn't appear.\nIt has now been changed back.\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar comman... | javascript | chosen |
[
{
"from": "system",
"value": "Add a push for the version bump to the release command.\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n var cmd = require('../lib/cmd');\n var git = require('../lib/git');\n var task = require('../lib/grunt');\n var traceur = require('..... | javascript | chosen |
[
{
"from": "system",
"value": "Update comment above file reading module\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs');\n\n/*\n * read *.txt files at given `path',\n * return array of files and their\n * textual content\n */\nexports.read = function (path, type, callba... | javascript | chosen |
[
{
"from": "system",
"value": "Make a basic model-mapping to sequelize.\n"
},
{
"from": "human",
"value": "var Sequelize = require('sequelize'); \nvar sequelize = new Sequelize('database', 'username', 'password');\n\nvar models = {}\nvar db = {}\nrequire(\"fs\").readdirSync(\"./models\").forEach(... | javascript | chosen |
[
{
"from": "system",
"value": "Remove deprecated call to set_command_identifier\n"
},
{
"from": "human",
"value": "var Util = require(\"util\");\nvar Bot = require(\"./lib/irc\");\n\nvar YourBot = function(profile) {\n\tBot.call(this, profile);\n\tthis.set_log_level(this.LOG_ALL);\n\tthis.set_com... | javascript | chosen |
[
{
"from": "system",
"value": "Fix page-titles for unparameterized routes\n"
},
{
"from": "human",
"value": "import getHeaderSubtitleData from './modules/utils/getHeaderSubtitleData';\nimport qs from 'qs';\n\n// Given the props of a component which has withRouter, return the parsed query\n// from... | javascript | chosen |
[
{
"from": "system",
"value": "Fix masonry item alignment issue\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { StyleSheet, View, Text, Image } from 'react-native';\nimport { SharedElementTransition } from 'react-native-navigation';\n\nconst SHOW_DURATION = 240;\nconst HID... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Create tmp dir inside homedir\n"
},
{
"from": "human",
"value": "const chalk = require('chalk');\nconst fs = require('mz/fs');\n\nconst run = require('./run');\n\nasync function importFromGit({\n db,\n repo,\n branch = 'master',\n tmpDir = `${__dirn... | javascript | chosen |
[
{
"from": "system",
"value": "Replace previous node with new one if there is one\n"
},
{
"from": "human",
"value": "const create = require(`virtual-dom/create-element`)\nconst diff = require(`virtual-dom/diff`)\nconst patch = require(`virtual-dom/patch`)\nconst RenderCache = require(`./RenderCac... | javascript | chosen |
[
{
"from": "system",
"value": "Fix testing if element exists.\n"
},
{
"from": "human",
"value": "$(function() {\n var cookieName = '_wheelmap_splash_seen';\n var setCookie = function() {\n $.cookie(cookieName, true, { expires: 1000 });\n };\n\n if(!$.cookie(cookieName)) {\n var width = ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable button if nothing is entered in search bar\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { View } from 'react-native';\nimport RepoSearchBar from './components/RepoSearchBar';\nimport RepoSearchButton from './components... | javascript | chosen |
[
{
"from": "system",
"value": "CSRA-535: Add log info for successful save\n"
},
{
"from": "human",
"value": "import express from 'express';\nimport { databaseLogger as log } from '../services/logger';\n\nexport default function createRouter(assessment) {\n const router = express.Router();\n\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where tasks weren't rendered until running the first time.\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar Backbone = require('backbone');\nvar swig = require('swig');\n\nvar templatePath = require('path').resolve(__dirname, 'taskview.swig');... | javascript | chosen |
[
{
"from": "system",
"value": "Support for value coming in as a string (eg. from URLs).\n"
},
{
"from": "human",
"value": "import Webiny from 'Webiny';\nimport styles from './styles.css';\n\nclass Switch extends Webiny.Ui.FormComponent {\n constructor(props) {\n super(props);\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert gridPagination, extra table code not needed here.\n"
},
{
"from": "human",
"value": "jest.dontMock('../gridPagination.jsx');\n\nvar React = require('react');\nvar GridPagination = require('../gridPagination.jsx');\nvar TestUtils = require('react-addons-test-u... | javascript | chosen |
[
{
"from": "system",
"value": "Change iOS back button color to white\n"
},
{
"from": "human",
"value": "/**\n * Sample React Native App\n * https://github.com/facebook/react-native\n */\n 'use strict';\n import React, {\n AppRegistry,\n Component,\n NavigatorIOS,\n StyleSheet\n } from 're... | javascript | chosen |
[
{
"from": "system",
"value": "Set key to an empty string\n"
},
{
"from": "human",
"value": "export default {\n IMAGE_API_KEY: 'e8ae475ded96446c8641f0aa607e623b'\n};\n"
},
{
"from": "gpt",
"value": "export default {\n IMAGE_API_KEY: ''\n};\n"
}
] | javascript | chosen |
[
{
"from": "system",
"value": "refactor(components): Rename Masonry grid blocks to columns\n"
},
{
"from": "human",
"value": "\n\nexport default function createLayout(options) {\n var {\n margin = 25,\n gutterLeft = 60,\n gutterRight = 60,\n gutterTop = 0,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set disablePeerReviewButton to false as default'\n"
},
{
"from": "human",
"value": "this.mmooc=this.mmooc||{};\n\n\nthis.mmooc.settings = {\n 'CanvaBadgeProtocolAndHost' : 'https://canvabadges-beta-iktsenteret.bibsys.no',\n 'useCanvaBadge' : true,\n 'defaul... | javascript | chosen |
[
{
"from": "system",
"value": "Change lookupIterator to work exactly like underscore.\n"
},
{
"from": "human",
"value": "\nvar _ = require('underscore');\n\n// Underscore and backbone provide a .sortedIndex function that works\n// when sorting ascending based on a function or a key, but there's n... | javascript | chosen |
[
{
"from": "system",
"value": "Implement initial API and add database\n\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst app = express();\nconst fs = require(\"fs\");\n\nconst host = '127.0.0.1';\nconst port = 3000;\n\n\n\napp.get('/', function (req, res) {\n res.sen... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicate from merge conflict\n"
},
{
"from": "human",
"value": "import { Store } from 'consus-core/flux';\nimport StudentStore from './student-store';\nimport ItemStore from './item-store';\n\nlet checkouts = new Object(null);\nlet checkoutErrors = new Objec... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to the catgif tab on click."
},
{
"from": "human",
"value": "'use strict';\n\n/*global chrome:false */\n\nchrome.browserAction.setBadgeText({text: '(ツ)'});\nchrome.browserAction.setBadgeBackgroundColor({color: '#eae'});\n\nchrome.browserAction.onClicked.addLi... | javascript | chosen |
[
{
"from": "system",
"value": "Add paths to info schema\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst Joi = require('joi');\n\nconst contactSchema = require('./contactSchema');\nconst licenseSchema = require('./licenseSchema');\n\nmodule.exports = Joi.object({\n 'title': Joi.string... | javascript | chosen |
[
{
"from": "system",
"value": "Use threshold for the initial fps state\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react'\nimport collectFps from 'collect-fps'\n\nconst noop = () => {}\n\nexport default ({\n threshold = 30,\n fpsCollector = collectFps\n}) => (Target) => {... | javascript | chosen |
[
{
"from": "system",
"value": "Make server module requirements explicit\n"
},
{
"from": "human",
"value": "Donations.App = Space.Application.define('Donations.App', {\n\n configuration: {\n appId: 'Donations.App'\n },\n\n requiredModules: [\n 'Space.accounts',\n 'Space.accountsUi',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Promise rejection for save()\n"
},
{
"from": "human",
"value": "// @flow\n\nimport mongoose from 'mongoose'\n\nimport Message from './model/message'\n\nexport const homePage = () => null\n\nexport const helloPage = () =>\n new Promise((resolve, reject) => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add more test for Plugin base class API\n\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport Plugin from './plugin';\nimport assert from 'assert';\n\ndescribe('Plugin class', () => {\n it('define should throw error (called by constructor)', () => {\n try... | javascript | chosen |
[
{
"from": "system",
"value": "Set the class name of created elements.\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar joust = require('jupyter-js-output-area');\n// Since I can't import _ from ...\nvar OutputModel = joust.OutputModel, OutputView = joust.OutputView;\n\nclass Sidecar {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Prepare to send 'ready' message when all setup is done\n\nSigned-off-by: Tomas Neme <6bc1d25c0f0098e02c3c0ae175e2ae803c7b6bbc@gmail.com>\n"
},
{
"from": "human",
"value": "/*******************\n * This is the pubsub driver that should tell caspa about the melted sta... | javascript | chosen |
[
{
"from": "system",
"value": "Add auth token during initialization\n"
},
{
"from": "human",
"value": "'use strict';\n\nrequire('dotenv').config({ silent: true });\n\nconst path = require('path');\n\nconst blizzard = require(path.normalize(`${__dirname}/../index.js`)).initialize({\n apikey: proc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to username in user example\n"
},
{
"from": "human",
"value": "// application/vnd.oada.user.1+json\nmodule.exports = function(opts) {\n opts = opts || {};\n var _example = {\n bookmarks: { _id: 'kdjsl028ifej', _rev: '2-djfh92843hj' },\n username: 'Frank'... | javascript | chosen |
[
{
"from": "system",
"value": "Include getter values in output\n"
},
{
"from": "human",
"value": "module.exports = function (client) {\n\treturn function (level, err) {\n\t\tif (level == 'warn')\n\t\t\tlevel = 'warning';\n\n\t\tclient.captureError(err, {\n\t\t\tlevel: level,\n\t\t\textra: {\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Set toLowerCase for types in factory method\n"
},
{
"from": "human",
"value": "var JwtCipher = require('./JwtCipher');\n\nmodule.exports = {\n /**\n * Create cipher instance\n * @param {String} type Type of cipher\n * @param {Object} config Configuration obje... | javascript | chosen |
[
{
"from": "system",
"value": "Use explicit null check in `getNamesFromPattern`.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nexports.getNamesFromPattern = function (pattern) {\n var queue = [pattern];\n var names = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var pattern = q... | javascript | chosen |
[
{
"from": "system",
"value": "Add exit step and alter log\n"
},
{
"from": "human",
"value": "var Cylon = require('cylon');\nvar color = require('onecolor');\nvar config = require('./config.js');\n\nif(config.uuid === \"insert uuid here\"){\n console.log('please identify the bluetooth uuid of yo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in variable name\n"
},
{
"from": "human",
"value": "var cp = require('child_process');\nvar fs = require('fs');\nvar os = require('os');\nvar path = require('path');\n\nvar exports = module.exports = {\n\n findExecutable: function (cmd, callback) {\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Check and fast return if object can't move\n"
},
{
"from": "human",
"value": "function isArrived(object, target) {\n return object.x === target.x && object.y === target.y;\n}\n\nfunction getC(a, b) {\n return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n}\n\nfunct... | javascript | chosen |
[
{
"from": "system",
"value": "Test constructing a Jarg instance\n"
},
{
"from": "human",
"value": "/* global describe, it */\n\n'use strict';\n\n(function () {\n\n var expect = require('chai').expect;\n\n var Jarg = require('../src/jarg');\n\n describe('jarg.js', function () {\n\n it('shou... | javascript | chosen |
[
{
"from": "system",
"value": "Improve path resolution in mockserver,\n\nhttps://github.com/Starcounter/starcounter-include/pull/111#discussion_r215271675\nhttps://github.com/Starcounter/starcounter-include/pull/111#discussion_r215273089\n"
},
{
"from": "human",
"value": "const connect = require(... | javascript | chosen |
[
{
"from": "system",
"value": "Test case 6 - matching via RegExp\n\nBear in mind that the \\ to define a RegExp must be passed twice.\nE.g. \\d+ should be passed as \\\\d+\nSo, for a while this is the first restriction for matching.\n"
},
{
"from": "human",
"value": ";((rc) => {\n 'use strict';\... | javascript | chosen |
[
{
"from": "system",
"value": "Stop rollup bundling for example\n"
},
{
"from": "human",
"value": "import { terser } from 'rollup-plugin-terser'\nimport pkg from './package.json'\nimport { nodeResolve } from '@rollup/plugin-node-resolve'\nimport commonjs from '@rollup/plugin-commonjs'\n\nconst um... | javascript | chosen |
[
{
"from": "system",
"value": "Add Test: render template with js instructions\n"
},
{
"from": "human",
"value": "\n// http://mochajs.org/\n// @see http://chaijs.com/api/bdd/\ndescribe('View', function() {\n var App;\n var View;\n var testView;\n\n beforeEach(function() {\n App = window.App... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in example test spec\n"
},
{
"from": "human",
"value": "/**\n * An example specification for the example module\n * Loads the module and runs the test suite\n */\ndefine(['modules/module'], function (module) {\n\t'use strict';\n\n\t// Test suit INIT\n\tdesc... | javascript | chosen |
[
{
"from": "system",
"value": "Make eslint stop reading configs at the root\n\nSigned-off-by: Julius Härtl <bf353fa4999f2f148afcc6d8ee6cb1ee74cc07c3@bitgrid.net>\n"
},
{
"from": "human",
"value": "module.exports = {\n\textends: [\n\t\t'@nextcloud',\n\t],\n\trules: {\n\t\t'jsdoc/require-param-desc... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the elements after animated\n"
},
{
"from": "human",
"value": "$(document).ready(function () {\n\n $(\".source\").draggable({\n axis: \"y\",\n containment: \"parent\"\n });\n\n // set an interval for creating helium elements\n setInt... | javascript | chosen |
[
{
"from": "system",
"value": "Add react rules to eslint file\n"
},
{
"from": "human",
"value": "module.exports = {\n \"extends\": \"airbnb\",\n \"parser\": \"babel-eslint\",\n \"plugins\": [\n \"react\"\n ],\n \"rules\": {\n \"react/prop-types\": 0,\n \"space-befo... | javascript | chosen |
[
{
"from": "system",
"value": "Make ESLint allow _id identifier for mongodb id field\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: \"airbnb\",\n\n env: {\n browser: true,\n jest: true,\n },\n\n rules: {\n \"react/jsx-filename-extension\": [\n 1,\n {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change the order of sections.\n"
},
{
"from": "human",
"value": "import { CompositeModel } from '../../kit'\n\nexport default class MetadataModel extends CompositeModel {\n constructor (api) {\n super(api)\n\n this.setProperties(\n { name: 'article', mod... | javascript | chosen |
[
{
"from": "system",
"value": "Add setting for heapdump folder and change default folder to the app folder (instead of plugin)\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Load modules\n\nvar Path = require('path');\nvar HeapDump = require('heapdump');\nvar Hoek = require('hoek');\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Update javascript to clear input field after hide\n"
},
{
"from": "human",
"value": "'use strict'\n\n$(document).ready(function(){\n $('#lease_duration_custom').hide();\n $('#furnished_details').hide();\n\n $(\"#id_lease_duration\").change(function() {\n let l... | javascript | chosen |
[
{
"from": "system",
"value": "Use link as real component\n"
},
{
"from": "human",
"value": "/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */\n\nimport React, { PropTypes } from 'react';\nimport styles from './PostPage.css';\nimport withStyles from '../../decorators/withSt... | javascript | chosen |
[
{
"from": "system",
"value": "Select inline editable fields by default.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nrequire(['jquery', 'messages', 'jquery.cookie', 'jquery.jeditable'], function($, messages) {\n if (!$.ajaxSettings.headers)\n $.ajaxSettings.headers = {};\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to PropTypes because Hyper's React got rid of it"
},
{
"from": "human",
"value": "import React, {PropTypes} from 'react'\nimport Component from 'hyper/component'\nimport SvgIcon from '../../utils/svg-icon'\n\nexport default class Draining extends Component {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add extra check to make sure there is a titlesArray\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react';\n\n\nexport default class ReportAnalysisArea extends Component {\n\n render() {\n const {customFeatureTitle} = this.props.params;... | javascript | chosen |
[
{
"from": "system",
"value": "Remove debug output in queue display function\n"
},
{
"from": "human",
"value": "ui = {\n}\n\nui.player = {\n update: function(trackURI) {\n spotify.getTrackInfo(trackURI)\n .then(function(track) {\n document.getElementByI... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.