conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix incorrect proptype name on ScoreInstanceBoost\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { fieldInstanceBoost, scoreInstanceBoost } from 'sajari'\n\nimport Base from './Base.js'\nimport Components from './constants/QueryComponentConstan... | javascript | chosen |
[
{
"from": "system",
"value": "Check existence of role before lowercasing it\n"
},
{
"from": "human",
"value": "const makersList = require('../../fixtures/makers');\nmodule.exports = (related, options) => {\n // If any of these roles match, see more button will link to\n // search page with 'ma... | javascript | chosen |
[
{
"from": "system",
"value": "Support returning a promise from the transition handler so we can support delayed transitions\n"
},
{
"from": "human",
"value": "export default (history, catchAllHandler) => {\n return next => (reducer, initialState) => {\n const store = next(reducer, initialSta... | javascript | chosen |
[
{
"from": "system",
"value": "Set canvas size to width/height of widest/highest image\n"
},
{
"from": "human",
"value": "// Return Promise\nconst imageMerge = (sources = []) => new Promise(resolve => {\n\t// Load sources\n\tconst images = sources.map(src => new Promise(resolve => {\n\t\tconst im... | javascript | chosen |
[
{
"from": "system",
"value": "Use ES6 syntax for function declarative.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\n// This is a class of a component\n// To create an instance of this class use <App />\nconst App = function() {\n return <di... | javascript | chosen |
[
{
"from": "system",
"value": "Add Input.wasAnyKeyReleased() to check if any key was pressed\n"
},
{
"from": "human",
"value": "'use strict';\r\n\r\nexport default class Input {\r\n\tconstructor(element, canvas) {\r\n\t\tthis.pressedKeys = {};\r\n\t\tthis.framePressedKeys = {};\r\n\t\tthis.previo... | javascript | chosen |
[
{
"from": "system",
"value": "Replace all occurrences of special chars in RFC3986"
},
{
"from": "human",
"value": "var crypto = require('crypto')\n , qs = require('querystring')\n ;\n\nfunction sha1 (key, body) {\n return crypto.createHmac('sha1', key).update(body).digest('base64')\n}\n\nfunc... | javascript | chosen |
[
{
"from": "system",
"value": "Remove encoding which is breaking forward slash `/` in URL constructions\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2015 The AMP HTML Authors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not us... | javascript | chosen |
[
{
"from": "system",
"value": "Test for a large amount of PBKDF2 rounds\n"
},
{
"from": "human",
"value": "describe(\"Buttercup.vendor\", function() {\n\n\t\"use strict\";\n\n\tdescribe(\"iocane\", function() {\n\n it(\"derives the correct password\", function(done) {\n window.B... | javascript | chosen |
[
{
"from": "system",
"value": "Update accept header according to Github API documentation\n"
},
{
"from": "human",
"value": "const Request = require('request');\nconst env2 = require('env2');\nconst HapiCookie = require('hapi-auth-cookie');\n\nenv2('./config.env');\n\nmodule.exports = {\n path: ... | javascript | chosen |
[
{
"from": "system",
"value": "Create base structure to start testing bot class\n"
},
{
"from": "human",
"value": "describe('Bot class', function () {\n\n beforeEach(function () {\n s.util.loadModels = function(options) {\n var toLoad = options.models.length;\n\n // Hold models\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Testing out removing pagination from Committees\"\n\nThis reverts commit 6548533d20516b8cf9705db08cd7bb50bff5cf59.\n"
},
{
"from": "human",
"value": "import sequelize from '../config/sequelize';\nimport DataTypes from 'sequelize';\nimport Officer from './of... | javascript | chosen |
[
{
"from": "system",
"value": "FIX Return array instead of object in Query Context handlers\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2015 Telefonica Investigación y Desarrollo, S.A.U\n *\n * This file is part of iotagent-thinking-things\n *\n * iotagent-thinking-things is free software... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor: Adjust the production build parameter inorder to access all available routes\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'fireplace-app',\n environment: environ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle query middleware failing tests\n"
},
{
"from": "human",
"value": "'use strict';\n\nrequire('../helper');\n\nconst server = require('../../app/server')();\nconst assert = require('../support/assert');\nconst qs = require('querystring');\n\nconst QUERY = `SELEC... | javascript | chosen |
[
{
"from": "system",
"value": "Test Keyv hands tll functionality over to ttl supporting stores\n"
},
{
"from": "human",
"value": "import test from 'ava';\nimport Keyv from '../';\n\ntest('Keyv is a class', t => {\n\tt.is(typeof Keyv, 'function');\n\tt.throws(() => Keyv()); // eslint-disable-line ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove 'use strict'; causing failure and unused prefs.\n"
},
{
"from": "human",
"value": "'use strict';\n\nuser_pref('browser.console.showInPanel', true);\nuser_pref('browser.dom.window.dump.enabled', true);\nuser_pref('browser.firstrun.show.localepicker', false);\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix async loading from subdirectory\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\nvar _ = require('lodash');\n\nmodule.exports = function(options) {\n var config = {\n entry: [\n './src/js/main.js'\n ]... | javascript | chosen |
[
{
"from": "system",
"value": "Handle errors by passing Error object to next() function\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar db = require('../../models');\nvar config = require('../../config.js');\nvar authHelper = require('../../lib/auth-helper');\n\nmodule.exports = functio... | javascript | chosen |
[
{
"from": "system",
"value": "Check for amount of li's\n"
},
{
"from": "human",
"value": "\n\"use strict\";\n\ndescribe('Footer component', () => {\n let element = undefined;\n let $rootScope = undefined;\n let $compile = undefined;\n\n let mod = angular.module('tests.footer', []).se... | javascript | chosen |
[
{
"from": "system",
"value": "Update text bounding box calculation method\n"
},
{
"from": "human",
"value": "/**\n * Returns the bounding box of the specified text\n * @param {string} text - specifies the text\n * @returns {Array<number>}\n */\nexport const textBoundingBox = (text) => {\n ret... | javascript | chosen |
[
{
"from": "system",
"value": "Remove invalid class extension test\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar d = require('d')\n\n , create = Object.create, setPrototypeOf = Object.setPrototypeOf;\n\nmodule.exports = function () {\n\tvar set, iterator, result, SubSet;\n\tif (typeof ... | javascript | chosen |
[
{
"from": "system",
"value": "Modify Font path for grunt\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n app: ['./app'],\n admin: ['<%= project.app %>/client/admin'],\n srcjs: ['<%= project.admin %>/js/'],\n sass: ['<%= project.admin %>/compass/sass'],\n public: ['p... | javascript | chosen |
[
{
"from": "system",
"value": "Add restart logic to CD server.\n"
},
{
"from": "human",
"value": "// Continuous delivery server\nconst { spawn } = require('child_process')\nconst { resolve } = require('path')\nconst { createServer } = require('http')\nconst { urlencoded } = require('body-parser')... | javascript | chosen |
[
{
"from": "system",
"value": "Add hasRequestPending to check if user has already requested to join a project\n"
},
{
"from": "human",
"value": "Requests = new Mongo.Collection('requests');\n\nMeteor.methods({\n addRequest: function(requestAttributes) {\n check(Meteor.userId(), String);\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Firefox bug when creating a new post\n\nEvent wasn't defined, so it's kind of difficult to call preventDefault() on – Chrome doesn't auto-submit the form without an action, but Firefox does.\n"
},
{
"from": "human",
"value": "Template.newPost.events({\n 'submit... | javascript | chosen |
[
{
"from": "system",
"value": "Update issue accessor functions for Sequelize\n"
},
{
"from": "human",
"value": "const db = require('./postgresql');\n\nconst { VOTING_FINISHED } = require('../../common/actionTypes/issues');\n\nconst Question = db.sequelize.models.issue;\n\nasync function addIssue(... | javascript | chosen |
[
{
"from": "system",
"value": "Add beginning of code for user interface logic\n"
},
{
"from": "human",
"value": "var pingPong = function(userNumber) {\n if ((userNumber % 3 === 0) || (userNumber % 5 === 0)) {\n return true;\n } else {\n return false;\n }\n};\n"
},
{
"from": "gpt"... | javascript | chosen |
[
{
"from": "system",
"value": "Test orderBy selection works, plus works with search box.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */\n\ndescribe('Real Racing Telemetry Client App', function() {\n\n describe('Car list view', func... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'params' instead of 'parameters'"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name Slickdeals Don't Track Me!\n// @version 1.1\n// @description Replaces outgoing Slickdeals tracking links with direct links.\n// @match http://slickdeals.... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite getBestName to avoid jQuery\n"
},
{
"from": "human",
"value": "getBestName = function(result){\n var bestName = \"\";\n if(typeof result[\"scientificName\"] !== \"undefined\"){\n bestName = result[\"scientificName\"];\n }\n if(typeof resul... | javascript | chosen |
[
{
"from": "system",
"value": "Change init() to initNote() to handle each note\n"
},
{
"from": "human",
"value": "$(document).foundation()\n\ncontext = new AudioContext()\n\n// declare globals\nvar saw,\n volume = context.createGain()\n\n// initialize volume\nvolume.gain.value = 0.1\n\nfunctio... | javascript | chosen |
[
{
"from": "system",
"value": "Update one of the examples to use callback\n"
},
{
"from": "human",
"value": "var SpotifyWebApi = require(\"../\");\n\n/*\n * This example shows how to search for a track. The endpoint is documented here:\n * https://developer.spotify.com/web-api/search-item/\n\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment how to use static demo track during development.\n"
},
{
"from": "human",
"value": "/*\n This file is generated and updated by Sencha Cmd. You can edit this file as\n needed for your application, but these edits will have to be merged by\n Sench... | javascript | chosen |
[
{
"from": "system",
"value": "Use new copy API (db, aws, callback)\n\nThe couch-to-s3 api was refactored, so we adjust."
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar nconf = require('nconf');\nvar toS3 = require('couch-to-s3');\nvar cred = require('./lib/cred.js');\n\nnconf.file(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spelling of Emmely de Wilt's name\n"
},
{
"from": "human",
"value": "[\n {\"name\": \"Leo Blokhuis\", \"hour\": 0},\n {\"name\": \"Rick van Velthuijzen\", \"hour\": 2},\n {\"name\": \"Frank van 't Hof\", \"hour\": 4},\n {\"name\": \"Emmely de Wild\",... | javascript | chosen |
[
{
"from": "system",
"value": "Check arguments in Events constructor\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Events provides abstract event messaging.\n *\n * @constructor\n * @param {Object} provider [description]\n */\nfunction Events(provider) {\n this.provider = provider;... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Add options null guard to JSON serializer\n"
},
{
"from": "human",
"value": "/**\n * Register JSON utilities\n */\n\nfunction registerJSON (cli, options, done) {\n cli.fs.registerSerializer('json', function (obj, opts) {\n if (opts.pretty) {\n return J... | javascript | chosen |
[
{
"from": "system",
"value": "Make autoFocus work again in dialogs\n"
},
{
"from": "human",
"value": "import cx from 'clsx';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nconst {\n useImperativeHandle,\n useRef,\n} = React;\n\nconst TextField = React.forwardRef(({\n clas... | javascript | chosen |
[
{
"from": "system",
"value": "Fix selector for tab selection\n"
},
{
"from": "human",
"value": "$(function() {\n var $tabs = $('#search-results-tabs'),\n $searchForm = $('.js-search-hash');\n\n if($tabs.length > 0){\n $tabs.tabs({ 'defaultTab' : getDefaultSearchTabIndex(), scrollOnload... | javascript | chosen |
[
{
"from": "system",
"value": "[ROUTE] Add redirect for login/logout and implement route auth\n"
},
{
"from": "human",
"value": "FlowRouter.route('/', {\n name: 'home',\n action() {\n GAnalytics.pageview(); \n BlazeLayout.render('MainLayout')\n }\n});\n\nFlowRouter.route('/... | javascript | chosen |
[
{
"from": "system",
"value": "Improve input handling for attributes, abilities, essence, willpower\n"
},
{
"from": "human",
"value": "export function clamp(val, min, max) {\n return Math.max(Math.min(val, max), min)\n}\n"
},
{
"from": "gpt",
"value": "export function clamp(val, min,... | javascript | chosen |
[
{
"from": "system",
"value": "Use the transpiled version in tests\n"
},
{
"from": "human",
"value": "/* eslint-disable */\nif (typeof global !== 'undefined') {\n // Node.js injections for Mocha tests\n global.chai = require('chai');\n global.path = require('path');\n global.noflo = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Copy over previous rows in harvest\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n setTimeout(function() {\n var button = $(\"a.js-nav-week\")[0];\n if (button) {\n button.click();\n }\n }, 500);\n});\n"
},
{
"from": "gpt"... | javascript | chosen |
[
{
"from": "system",
"value": "Implement copySnapshot customization to add PresignedUrl\n"
},
{
"from": "human",
"value": "var AWS = require('../core');\n\nAWS.util.update(AWS.EC2.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove import from isCamelCase function"
},
{
"from": "human",
"value": "import camelCase from './camel-case.js';\n\nconst isCamelCase = (a) => {\n const match = /(^[a-z]+)([A-Z][a-z]+)+/g.exec(a);\n return (match) ? match[0] === a : false;\n};\n\nexport default i... | javascript | chosen |
[
{
"from": "system",
"value": "Revert api url back to dev for now.\n"
},
{
"from": "human",
"value": "export default function ({ $axios }) {\n $axios.defaults.baseURL = process.env.API_URL || 'https://5jojq7ahg5.execute-api.us-east-1.amazonaws.com/prod';\n $axios.defaults.headers.post['Content-... | javascript | chosen |
[
{
"from": "system",
"value": "Change prefilled gray suggestiosn to black by adding class.\n"
},
{
"from": "human",
"value": ";(function(){//IFEE\n\nangular.module('brewKeeper')\n .controller('createNewRecipe', function($scope, $http, $location){\n $scope.recipe = { }\n $scope.recipe.orien... | javascript | chosen |
[
{
"from": "system",
"value": "Change it to output the result to console,not file\n"
},
{
"from": "human",
"value": "var fs = require('fs');\n\nvar inputFile = process.argv[2];\nvar outputFile = process.argv[3];\n\nif(!inputFile || !outputFile){\n\n printUsage();\n}\n\n/**\n *\n * If user have... | javascript | chosen |
[
{
"from": "system",
"value": "Work around for bug in json-to-ast\n\n\nOriginal commit d6c4c264be7788f30e2a52c91e6dc02690ec1080\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar parse = require('json-to-ast');\n\nexports._parse = function (result) {\n return function (s) {\n try... | javascript | chosen |
[
{
"from": "system",
"value": "feat(plugin): Add clear-left, clear-right, clear-both classes\n\nAdded clear-left, clear-right and clear-both classes to float.js\n\nImplements #1050\n"
},
{
"from": "human",
"value": "export default function() {\n return function({ addUtilities, variants }) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Write the helper functions prepend and call it inside arrayToList\n"
},
{
"from": "human",
"value": "// Write a function arrayToList that builds up a data structure like the previous one when given [1, 2, 3] as argument, and write a listToArray function that produce... | javascript | chosen |
[
{
"from": "system",
"value": "Add \"long\" package to webpack externals\n"
},
{
"from": "human",
"value": "import path from 'path';\n\nexport default {\n module: {\n loaders: [{\n test: /\\.jsx?$/,\n loaders: ['babel-loader'],\n exclude: /node_modules/\n }, {\n test: /... | javascript | chosen |
[
{
"from": "system",
"value": "Enforce login with react-router onEnter\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { hashHistory, Router, Route, Link, withRouter } from 'react-router'\n\nimport Layout from './screens/layout'\nimport Login from './screens/lo... | javascript | chosen |
[
{
"from": "system",
"value": "Add todo comment to highlight bad code\n\nThis should not be here and reviewed as soon as\npossible.\n"
},
{
"from": "human",
"value": "const {\n isPlainObject,\n isFunction,\n isEmpty,\n assign,\n} = require('lodash')\n\nconst { buildPagination } = require('../... | javascript | chosen |
[
{
"from": "system",
"value": "Fix crash in arms warrior\n"
},
{
"from": "human",
"value": "import SPELLS from 'common/SPELLS';\nimport EventsNormalizer from 'parser/core/EventsNormalizer';\n\nclass CrushingAssaultNormalizer extends EventsNormalizer {\n\n // Ensures that the remove buff event fo... | javascript | chosen |
[
{
"from": "system",
"value": "Hide header if no matches found\n"
},
{
"from": "human",
"value": "/* global browser:readonly */\n\n\"use strict\";\n\nfunction parseReceivedHeader(headerStr, regexp) {\n const capturedSubstr = headerStr.match(new RegExp(regexp));\n if (capturedSubstr === null... | javascript | chosen |
[
{
"from": "system",
"value": "Add imgur upload of edited photo\n"
},
{
"from": "human",
"value": "import { User } from '../models/user';\n\nexport default function addEditedPhoto(req, res) {\n return User.find({ _id: req.params.id })\n .then(([u]) => {\n u.editedPhoto = req.body.link;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix TextArea interface usage in docs\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Spacing, Text, TextArea } from 'react-elemental';\n\nconst SampleTextArea = () => (\n <div>\n <Spacing size=\"huge\" bottom>\n <Text size=\"gamma\" ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix indent, single-quotes and leaking i\n"
},
{
"from": "human",
"value": "// nth-child pseudo selector\nModernizr.addTest('nthchild', function(){\n\n return Modernizr.testStyles(\"#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}\", function (el... | javascript | chosen |
[
{
"from": "system",
"value": "Trim isn't available in IE8\n\n* Use jQuery’s trim instead\n"
},
{
"from": "human",
"value": "(function () {\n \"use strict\"\n var root = this,\n $ = root.jQuery;\n\n if (typeof root.GOVUK === 'undefined') {\n root.GOVUK = {};\n }\n\n root.GOVUK.Taggin... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor two listeners into one\n"
},
{
"from": "human",
"value": "// # Place all the behaviors and hooks related to the matching controller here.\n// # All this logic will automatically be available in application.js.\n// # You can use CoffeeScript in this file: ht... | javascript | chosen |
[
{
"from": "system",
"value": "Add loading state to hll update lifecycle\n"
},
{
"from": "human",
"value": "import RiakObjectRoute from '../route';\n\nexport default RiakObjectRoute.extend({\n actions: {\n /**\n * Adds an element to the HLL list.\n * @event addSetElement\n * @para... | javascript | chosen |
[
{
"from": "system",
"value": "Correct import of Ember Data model blueprint\n\nAs suggested by @fsmanuel in #128 and #131.\n"
},
{
"from": "human",
"value": "var EmberCliModelBlueprint = require('ember-cli/blueprints/model');\n\nmodule.exports = EmberCliModelBlueprint;\n"
},
{
"from": "gp... | javascript | chosen |
[
{
"from": "system",
"value": "Add very basic date filtering\n"
},
{
"from": "human",
"value": "var router = require(\"express\").Router();\nvar db = require(\"./db\");\n\nrouter.get(\"/\", function (req, res) {\n var o = {\n map: function () {\n if (this.parents.length === 1) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change log level to info\n"
},
{
"from": "human",
"value": "angular.module('app.task')\n .controller('TaskListContentController', TaskListContentController);\n\n/*@ngInject*/\nfunction TaskListContentController($state, taskService) {\n var vm = this;\n vm.t... | javascript | chosen |
[
{
"from": "system",
"value": "Add index on application token\n"
},
{
"from": "human",
"value": "/**\n * Sets up the core\n */\nvar async = require('async');\n\nfunction setup(client, keyspace, next) {\n\n var tables =['CREATE TABLE ' + keyspace + '.applications (name text, apptoken uuid, PRIMAR... | javascript | chosen |
[
{
"from": "system",
"value": "Test packers on their test files\n"
},
{
"from": "human",
"value": "var\n path = require('path'),\n stream = require('stream'),\n lib = require('../lib'),\n Matryoshka = lib.Matryoshka,\n Extract = lib.Extract;\n\nMatryoshka.collectLanguages().then(func... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"cleanup test module creation.\"\n\nThis reverts commit 733b4983d9907e354d50912f960c310611a250af.\n"
},
{
"from": "human",
"value": "\nmodule.exports.examples = [\n {\n \"incoming\": 'select A as [Yuba dubba]',\n \"expected\": 'SELECT A AS [Yuba dubba... | javascript | chosen |
[
{
"from": "system",
"value": "Remove `announced` from Session 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 2: 'Published',\n 4: 'Opened',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add export of user actions\n"
},
{
"from": "human",
"value": "export {\n setSyncProgress,\n incrementSyncProgress,\n setSyncError,\n setSyncTotal,\n setSyncProgressMessage,\n setSyncIsSyncing,\n setSyncCompletionTime,\n} from './SyncActions';\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Update code to accomodate new blog index page\n"
},
{
"from": "human",
"value": "/*!\n * Start Bootstrap - Agnecy Bootstrap Theme (http://startbootstrap.com)\n * Code licensed under the Apache License v2.0.\n * For details, see http://www.apache.org/licenses/LICENSE... | javascript | chosen |
[
{
"from": "system",
"value": "Add frontend side of cookie auth\n"
},
{
"from": "human",
"value": "var User = function(baseUrl) {\n var self = this;\n this.baseUrl = baseUrl;\n this.username = '';\n this.password = '';\n this.errorThrown = '';\n this.onAuthUpdate = function() {\n // as l... | javascript | chosen |
[
{
"from": "system",
"value": "Use number generator with seed\n"
},
{
"from": "human",
"value": "var instances = require('./../taillard');\nvar NEH = require('./../neh');\nvar seed = require('./../seed-random');\n\n// Iterate over filtered Taillard instances\nvar filteredInstances = instances.fil... | javascript | chosen |
[
{
"from": "system",
"value": "Set buttons as disabled unless the debugger is 'paused'.\n"
},
{
"from": "human",
"value": "'use babel';\n\nimport React from 'react-lite'\n\nexport default class ButtonBar extends React.Component {\n\n constructor(props) {\n super(props);\n }\n\n // Event Han... | javascript | chosen |
[
{
"from": "system",
"value": "Mark if a question has been answered"
},
{
"from": "human",
"value": "import DS from 'ember-data';\n\nlet Prompt = DS.Model.extend({\n step: DS.belongsTo('step'),\n\n question: DS.attr('string'), //our prompt\n answer: DS.attr('string'), // their answer\n clause... | javascript | chosen |
[
{
"from": "system",
"value": "Fix validation error in Firefox\n"
},
{
"from": "human",
"value": "import React, { PropTypes, Component } from 'react';\nimport shouldPureComponentUpdate from 'react-pure-render/function';\nimport Label from 'binary-components/lib/Label';\nimport NumericInput from '... | javascript | chosen |
[
{
"from": "system",
"value": "Add engine to Jekyll example\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\nvar loader = require('assemble-loader');\nvar matter = require('parser-front-matter');\nvar assemble = require('../..');\nvar app = assemble();\n\napp.use(l... | javascript | chosen |
[
{
"from": "system",
"value": "Support put in input observer mock\n"
},
{
"from": "human",
"value": "module.exports = function(app) {\n var express = require('express');\n var inputObserversRouter = express.Router();\n inputObserversRouter.get('/', function(req, res) {\n res.send({\"input-o... | javascript | chosen |
[
{
"from": "system",
"value": "Change COLOR_NAME const to PRIMARY_COLORS\n"
},
{
"from": "human",
"value": "import { typography, color } from 'react-native-material-design-styles';\n\n/**\n * Paper style color\n * @type {object}\n */\nexport const COLOR = color;\n\n/**\n * Paper style typography\... | javascript | chosen |
[
{
"from": "system",
"value": " Make sure default variable is of correct type\n"
},
{
"from": "human",
"value": "export default function () {\n return {\n restaurants: {},\n showSolna: true,\n showUppsala: true,\n onlyFavourites: false,\n favourites: [],\n }\n}\n"
},
{
"f... | javascript | chosen |
[
{
"from": "system",
"value": "Send a push when a nearby photo is taken\n"
},
{
"from": "human",
"value": "Parse.Cloud.afterSave(\"UserComment\", function(installationId, master, object, user) {\n var createdBy = object.get(\"createdBy\");\n push(\"New comment from \" + createdBy);\n res... | javascript | chosen |
[
{
"from": "system",
"value": "Fix config and data load\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n // read manifest\n $.get('manifest.json', function(manifest) {\n window.config = manifest.properties;\n \n // load HTML and append to body canvas\n var documen... | javascript | chosen |
[
{
"from": "system",
"value": "Add a route to ownedMangas\n"
},
{
"from": "human",
"value": "var subscriptions = new SubsManager();\n\nRouter.configure({\n layoutTemplate: 'layout',\n loadingTemplate: 'loading',\n notFoundTemplate: 'notFound'\n});\n\nRouter.route('/', {\n name: 'home'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong option value use\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar nroonga = require('./wrapped-nroonga');\nvar api = require('./api');\nvar dashboard = require('./dashboard');\n\nexports.createServer = function (config) {\n var co... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for image handler\n"
},
{
"from": "human",
"value": "describe(\"Image\", function () {\n\tvar section,\n\t\timage;\n\n\tbeforeEach(function () {\n\n\t\tsection = document.createElement('section');\n\t\timage = document.createElement('img');\n\t\timage.src =... | javascript | chosen |
[
{
"from": "system",
"value": "Update mootools integration to use 'toStyles'"
},
{
"from": "human",
"value": "/*\n Title: MooTools integration\n geometry.js + MooTools = love\n\n MIT-Style License\n Johan Nordberg <its@johan-nordberg.com>\n*/\n\n/*\n Method: Rect.fromCoordinates\n\n *Classm... | javascript | chosen |
[
{
"from": "system",
"value": "[test] Test for colons in the password\n"
},
{
"from": "human",
"value": "var assert = require('assert'),\n vows = require('vows'),\n basicAuthParser = require('../');\n\nvows.describe('basic-auth-parser').addBatch({\n 'When using `basic-auth-parser`': {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to allow re-use with $location service\n\nRefactor to allow re-use with $location service when used inside controller code."
},
{
"from": "human",
"value": "var m = angular.module(\"routeUrls\", []);\n\nm.factory(\"urls\", function($route) {\n\n var path... | javascript | chosen |
[
{
"from": "system",
"value": "Enable test cases for text plugin\n"
},
{
"from": "human",
"value": "define([\n 'combo-map',\n 'module-constructor',\n 'seajs-combo',\n 'seajs-nocache',\n 'seajs-text',\n 'seajs-warning'\n])\n\n"
},
{
"from": "gpt",
"value": "define([\n 'combo-map... | javascript | chosen |
[
{
"from": "system",
"value": "Remove no longer used constants\n"
},
{
"from": "human",
"value": "const router = require('express').Router();\n\nconst scraper = require('../service/scraper');\n\nconst baseUrl = 'https://play.google.com/store/apps/details?hl=en&id=';\nconst headers = { 'Accept-Lan... | javascript | chosen |
[
{
"from": "system",
"value": "Add reference from article to catalog.\n"
},
{
"from": "human",
"value": "/*jslint eqeq: true, indent: 2, node: true, plusplus: true, regexp: true, unparam: true, vars: true, nomen: true */\n'use strict';\n\nvar Schema = require('mongoose').Schema;\n\n/**\n * The ar... | javascript | chosen |
[
{
"from": "system",
"value": "Update port to work off Azure\n"
},
{
"from": "human",
"value": "var express = require('express');\n// var config = require('./config/environment');\n\n\nvar _ = require('underscore');\nvar app = express();\n\nvar port = process.ENV.PORT or || 9000\n\nvar server = r... | javascript | chosen |
[
{
"from": "system",
"value": "Add dependencies when using loadModule\n"
},
{
"from": "human",
"value": "/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nvar LoaderDependency = require(\"./LoaderDependency\");\n\nfunction LoaderPlugin() {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Implement Simple Chat: broadcast message except own client's message\n"
},
{
"from": "human",
"value": "var net = require('net');\nvar chatServer = net.createServer();\nvar clientChats = [];\nchatServer.on('connection', function(client){\n\tclientChats.push(client);... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for calendar_dates iterator end event interfering with sequential transform process of calendar.\n"
},
{
"from": "human",
"value": "const util = require('util'),\n { AsyncIterator } = require('asynciterator'),\n EventEmitter = require('events').EventEmitter;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Update error notification on 404 when fetching JSON feed\n"
},
{
"from": "human",
"value": "import {fetchJSONFeed as fetchJSONFeedAJAX} from 'src/status/apis'\n\nimport {errorThrown} from 'shared/actions/errors'\n\nimport * as actionTypes from 'src/status/constants/... | javascript | chosen |
[
{
"from": "system",
"value": "Check actual node-supported encodings on startup"
},
{
"from": "human",
"value": "var Iconv = require('iconv-lite');\n\nvar NODE_ENCODING = {\n 'ascii': true,\n 'utf8': true,\n 'utf16le': true,\n 'ucs2': true,\n 'base64': true,\n 'latin1': true,\n 'binary': t... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Get more data from onChange event\"\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport classNames from 'classnames';\nimport mdlUpgrade from './utils/mdlUpgrade';\n\nclass Switch extends React.Component {\n static propTy... | javascript | chosen |
[
{
"from": "system",
"value": "Use `export default {}` instead of `export {}`\n"
},
{
"from": "human",
"value": "import AxesWidget from './axes';\nimport ConnectionWidget from './connection';\nimport ConsoleWidget from './console';\nimport GCodeWidget from './gcode';\nimport GCodeViewerWidget fro... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.