conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Check for navigator.id.watch when initializing\n"
},
{
"from": "human",
"value": "(function() {\n // wait for polyfill to be loaded\n if (document.readyState == \"complete\") {\n init();\n } else {\n window.addEventListener('load', init);\n }\n\n var logg... | javascript | chosen |
[
{
"from": "system",
"value": "Use test helpers in EnumValuesSortedAlphabetically tests\n"
},
{
"from": "human",
"value": "import assert from 'assert';\nimport { parse } from 'graphql';\nimport { validate } from 'graphql/validation';\nimport { buildASTSchema } from 'graphql/utilities/buildASTSche... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Move function outside of class\n\nSince the endRowForSelectionRange method doesn't use any of the class's\ninternal state, make it a function that lives outside the class.\n"
},
{
"from": "human",
"value": "const {Range} = require('atom')\n\nmodule.exports =\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix response var for callback after ajax\n"
},
{
"from": "human",
"value": "\n\n\nfunction sendRequest(action, data, callback) {\n\n $.ajax({\n type: 'post',\n url: 'foler.php?action='+action,\n data: data,\n error: fun... | javascript | chosen |
[
{
"from": "system",
"value": "Repair check for correct status code on deploy.\n"
},
{
"from": "human",
"value": "var Request = require('./request')\n , Browser = require('./browser');\n\nvar Theme = function (session, blog, html) {\n this.session = session;\n this.blog = blog;\n this.html = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add strings and function definitions, attributions.\n"
},
{
"from": "human",
"value": "/*\nLanguage: AppleScript\n*/\n\nfunction(hljs) {\n return {\n defaultMode: {\n keywords: {\n keyword:\n 'about above after against and around as at back ... | javascript | chosen |
[
{
"from": "system",
"value": "Add validation to params object\n"
},
{
"from": "human",
"value": "const { exec } = require('child_process');\n\nfunction run(fullCmd) {\nreturn new Promise((resolve, reject) => {\n console.log(`Executing command: ${ fullCmd }`);\n exec(fullCmd, (error, stdout... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue when hydrating settings with missing default keys\n"
},
{
"from": "human",
"value": "import { observable, toJS } from 'mobx';\nimport { pathExistsSync, outputJsonSync, readJsonSync } from 'fs-extra';\n\nimport { SETTINGS_PATH, DEFAULT_APP_SETTINGS } from '... | javascript | chosen |
[
{
"from": "system",
"value": "Fix acalc not running when not build.\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 file except in compliance... | javascript | chosen |
[
{
"from": "system",
"value": "Add a circular reference from the store state back to the store.\n\nUseful if store state is used as a prop, allows access back to store methods\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar assign = require('object-assign')\nvar EventEmitter = require('eve... | javascript | chosen |
[
{
"from": "system",
"value": "Add new function js execute_statment\n"
},
{
"from": "human",
"value": "var MBTilesPlugin = function()\n{\n};\n\nMBTilesPlugin.prototype.open = function(params, onSuccess, onError)\n{\n\treturn cordova.exec(onSuccess, onError, \"MBTilesPlugin\", \"open\", [params]);... | javascript | chosen |
[
{
"from": "system",
"value": "Add dummy cb when none given\n"
},
{
"from": "human",
"value": "const getModel = require( './model.js' );\n\nmodule.exports = function ( modelName, item, cb ) {\n\n return new Promise( ( resolve ) => {\n\n getModel( modelName )\n .then( ( model,... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor put method for elements\n"
},
{
"from": "human",
"value": "angular.module('app', []).controller('AppCtrl', function ($scope, $http) {\n\t$scope.results = [];\n\n\t$scope.loadUsers = function() {\n\t\t$http.get('/elements')\n\t\t\t.success(function(data) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add two more tests for defaultFields\n"
},
{
"from": "human",
"value": "var assert = require('assert')\nvar ethUtil = require('../index.js')\n\ndescribe('define', function () {\n const fields = [{\n word: true,\n default: new Buffer([])\n }, {\n name: 'em... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"rollback change after [byte_sequence -> byteSeq]\"\n"
},
{
"from": "human",
"value": "import { generateGame } from \"./\";\nimport PlayerModel from \"../../model/player_model\";\n\ndescribe(`generator:: Game`, () => {\n describe(`::generate`, () => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add getPassword to Contractor class for hashing temp password\n"
},
{
"from": "human",
"value": "module.exports =\n class Contractor {\n constructor(firstName, lastName, isResident, privateEmail) {\n this.firstName = firstName;\n this.lastName = lastName;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow exec 'env' to inherit from 'process.env'\n\nWhen executing a command Node uses `process.env` by default. If the 'env'\noption is specified, Node assumes that the complete environment is\nprovided.\n\nAs Scripted exec configurations are declarative, and it's practically\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Update the team view when a team is joined\n"
},
{
"from": "human",
"value": "angular.module('reg')\n .controller('TeamCtrl', [\n '$scope',\n 'currentUser',\n 'settings',\n 'Utils',\n 'UserService',\n 'TEAM',\n function($scope, currentUser, set... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Add today`s date to spendings summary part of the page\n\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n userSettings: Ember.inject.service('user-settings'),\n\n didReceiveAttrs () {\n const curre... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude docbook converter from webpack\n"
},
{
"from": "human",
"value": "/*---------------------------------------------------------------------------------------------\n * Licensed under the MIT License. See License.txt in the project root for license informatio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sidebar classname multi-line problem\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport LazyLoad from 'react-lazyload';\n\nimport './index.scss';\n\nconst Sidebar = ({ post = false }) => (\n <header className={`\n intro-header\n col-lg-... | javascript | chosen |
[
{
"from": "system",
"value": ":skull: Create as much squares as possible within the canvas width\n"
},
{
"from": "human",
"value": "// Vanilla Javascript please\ndocument.addEventListener('DOMContentLoaded', function (event) {\n var canvas = document.querySelector('#canvas')\n\n // Canvas size... | javascript | chosen |
[
{
"from": "system",
"value": "FAQ: Add the required-attribute when no is selected.\n"
},
{
"from": "human",
"value": "/**\n * Interaction for the faq module\n *\n * @author\tAnnelies Van Extergem <annelies@netlash.com>\n * @author\tJelmer Snoeck <jelmer.snoeck@netlash.com>\n * @author\tThomas De... | javascript | chosen |
[
{
"from": "system",
"value": "Fix substringing of long breadcrumb items\n"
},
{
"from": "human",
"value": "\nvar Mocha = require('mocha'),\n_ = require('underscore');\n\nmodule.exports = function (browser, dashboard, suite /*, config*/) {\n\n var tests = {\n\n 'has a breadcrumb': function ()... | javascript | chosen |
[
{
"from": "system",
"value": "Add insert, delete and roll left functions.\n"
},
{
"from": "human",
"value": "function listProcessor(input) {\n let string = input.shift();\n console.log(string);\n\n for (let command of input) {\n let tokens = command.split(/\\s+/g);\n let c... | javascript | chosen |
[
{
"from": "system",
"value": "Modify schema to include a category for each emoticon\n"
},
{
"from": "human",
"value": "const express = require('express'),\n app = express(),\n bodyParser = require('body-parser'),\n methodOverride = require('method-override'),\n mongoose = req... | javascript | chosen |
[
{
"from": "system",
"value": "Add feature to send task.html on get to \\task\\\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst app = express();\n\nconst path = require('path');\nconst routes = require('./myRoutes.js');\n\napp.get('/', function(req, res) {\n res.sen... | javascript | chosen |
[
{
"from": "system",
"value": "PUT and DELETE return altered config\n"
},
{
"from": "human",
"value": "module.exports = function(Config, XIBLE, EXPRESS_APP) {\n\n\tEXPRESS_APP.get('/api/config', (req, res) => {\n\t\tres.json(Config.getAll());\n\t});\n\n\tEXPRESS_APP.put('/api/config/value', (req,... | javascript | chosen |
[
{
"from": "system",
"value": "Fix CLI for when no ouput folder is specified\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nvar JSONStream = require('JSONStream')\nvar sra = require('./')\n\nvar args = process.argv.slice(2)\n\nvar command = args[0]\nvar srcFile = args[1]\nvar destDir = a... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate content repo to @isaacphysics\n"
},
{
"from": "human",
"value": "'use strict';\n\ndefine([\"angular\", \"app/services/LoginChecker\", \"app/services/FileLoader\", \"app/services/FigureUploader\", \"app/services/SnippetLoader\", \"app/services/TagLoader\", \"... | javascript | chosen |
[
{
"from": "system",
"value": "Increase the delay time to avoid failing tests due to removed javascript files when starting the build process.\n"
},
{
"from": "human",
"value": "module.exports = function (config) {\n 'use strict'\n\n config.set({\n frameworks: ['mocha', 'chai', 'sinon'],\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Expire the session (cookie) in one hour after login.\n"
},
{
"from": "human",
"value": "\nvar LoginHelper = {\n loggedIn : function() {\n var cookie = Ti.App.Properties.getString('auth_cookie');\n if (!cookie)\n return false;\n return true;\n },\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add an example of how to change the partition on keydown\n"
},
{
"from": "human",
"value": "require.config({\n paths: {\n 'd3': '../node_modules/d3/d3',\n 'nishe': '../node_modules/nishe/nishe',\n 'nisheviz': '../nisheviz'\n }\n});\nrequire(['d3', 'nishe'... | javascript | chosen |
[
{
"from": "system",
"value": "Connect as sculpture0 for now, until we have config in local storage\n"
},
{
"from": "human",
"value": "require('babelify/polyfill');\n\nconst config = require('./config');\n\nconst SculptureApp = require('./app');\n\nconst DEFAULT_CLIENT_CONNECTION_OPTIONS = {\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Fix iOS crash when switching performance filter selection by extracting index correctly\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar React = require('react-native');\nvar {\n Component,\n SegmentedControlIOS\n} = React;\n\nclass SegmentedControl extends... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path handling for db-password\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst fs = require('fs');\nconst escape = require('pg-escape');\n\nconst hasDBAvailable = Boolean(process.env.DB);\n\nif (!hasDBAvailable) {\n module.exports = {};\n return;\n}\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove XHR require from views\n"
},
{
"from": "human",
"value": "var xhr = require('xhr');\nvar storage = require('localforage');\n\nmodule.exports = {\n id: 'apps',\n components: {\n tabBar: require('../../components/tabBar'),\n navigationBar: r... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the Handlebars Helper for translaton and use the helper view\n"
},
{
"from": "human",
"value": "/**\n * Mail\n *\n * This file is licensed under the Affero General Public License version 3 or\n * later. See the COPYING file.\n *\n * @author Christoph Wurst <c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix requirejs for other locations than apps/\n"
},
{
"from": "human",
"value": "/* global requirejs */\n\n/**\n * Mail\n *\n * This file is licensed under the Affero General Public License version 3 or\n * later. See the COPYING file.\n *\n * @author Christoph Wurst... | javascript | chosen |
[
{
"from": "system",
"value": "Use @match directive for safely host pattern matching\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name Add AWS region to title\n// @namespace curipha\n// @description Help to know where I am now\n// @include https://console.aws.amazon.com/... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests now that \"lifetimes\" is commented out"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { test } from 'qunit';\nimport moduleForAcceptance from '../../tests/helpers/module-for-acceptance';\n\nimport DocsController from 'dummy/docs/contr... | javascript | chosen |
[
{
"from": "system",
"value": "Load answers from directive parameters\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('confRegistrationWebApp')\n .directive('block', function () {\n return {\n templateUrl: 'views/blockDirective.html',\n restrict: 'E',\n scope... | javascript | chosen |
[
{
"from": "system",
"value": "Add frame and lens fields\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Module dependencies.\n */\nvar mongoose = require('mongoose'),\n\tSchema = mongoose.Schema;\n\n/**\n * Eye Schema\n */\nvar EyeSchema = new Schema({\n cylinder: {\n type:... | javascript | chosen |
[
{
"from": "system",
"value": "Remove navigator user agent as it causes the app to break\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport * as types from '../actions/actionTypes';\nimport config from '../config';\n\nwindow.navigator.userAgent = \"react-native\";\n\nconst initialState = ... | javascript | chosen |
[
{
"from": "system",
"value": "Use build in relative path method\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst vscode = require(\"vscode\");\nconst analyser = require(\"./complexity-analyzer\");\nconst reporter = require(\"./report-builder.js\");\nconst config = require(\"./conf... | javascript | chosen |
[
{
"from": "system",
"value": "Add a reducer for navigation.\n"
},
{
"from": "human",
"value": "const Reducer = (state = {\n\n}, action) => {\n switch(action.type) {\n // case 'ADD_TODO':\n // return { ...state, nextId: state.nextId + 1,\n // todoItems: [ ...s... | javascript | chosen |
[
{
"from": "system",
"value": "Test web workers only when supported by the browser\n"
},
{
"from": "human",
"value": "import Oasis from \"oasis\";\nimport webworkerAdapter from \"oasis/webworker_adapter\";\n\nmodule('Webworker Sandboxes', {\n setup: function() {\n Oasis.reset();\n }\n});\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove cruft from unit test app\n"
},
{
"from": "human",
"value": "/*\n * This file needs to be renamed as app.js when we want to run unit tests\n * in order this to get loaded by the jxcore ready event.\n * This effectively acts as main entry point to the unit test... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ctrlLimit undefined in Demo\n\nProbably been broken for months..."
},
{
"from": "human",
"value": "window.onload = function () {\n \"use strict\";\n\n var undoManager,\n circleDrawer,\n btnUndo,\n btnRedo,\n btnClear;\n\n und... | javascript | chosen |
[
{
"from": "system",
"value": "Fix eslint errors - 1\n"
},
{
"from": "human",
"value": "const electron = require('electron');\nconst { app } = electron;\nconst { ipcMain: ipc } = electron;\nconst { dialog } = electron;\nconst { BrowserWindow } = electron;\n// const sass = require('node-sass')\nco... | javascript | chosen |
[
{
"from": "system",
"value": "Fix example test env reference\n"
},
{
"from": "human",
"value": "'use strict';\n\n// workflows/createDeployment\nvar Joi = require('joi');\n\nmodule.exports = {\n schema: Joi.object({\n deployerId: Joi.string().required(),\n name: Joi.string().min(1).r... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused code from readme generator.\n"
},
{
"from": "human",
"value": "\n/*\n * broccoli-replace\n * http://gruntjs.com/\n *\n * Copyright (c) 2014 outaTiME\n * Licensed under the MIT license.\n * https://github.com/outaTiME/broccoli-replace/blob/master/LICENS... | javascript | chosen |
[
{
"from": "system",
"value": "Create a sandbox before each test and clean it up afterwards\n"
},
{
"from": "human",
"value": "var chai = require('chai'),\n sinon = require('sinon'),\n sinonChai = require('sinon-chai'),\n path = require('path'),\n React = require('react');\n\n\nglobal... | javascript | chosen |
[
{
"from": "system",
"value": "Add a missing semi colon and make one line < 80 chars\n"
},
{
"from": "human",
"value": "describe(\"Map\", function () {\n\tdescribe(\"#whenReady\", function () {\n\t\tdescribe(\"when the map has not yet been loaded\", function () {\n\t\t\tit(\"calls the callback wh... | javascript | chosen |
[
{
"from": "system",
"value": "sagaBuilder: Add option to throw errors\n\n"
},
{
"from": "human",
"value": "import { takeEvery } from 'redux-saga';\nimport { call, put } from 'redux-saga/effects';\n\n\nexport default function sagasBuilder(request, REQUEST, actions) {\n function* makeRequest({ pa... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor replaceState to handle all state updates\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar assign = require('object-assign')\nvar EventEmitter = require('eventemitter3')\nvar objEql = require('obj-eql')\n\nfunction createStore(obj) {\n var store = ass... | javascript | chosen |
[
{
"from": "system",
"value": "Change Card proptypes accordingly to backend data\n"
},
{
"from": "human",
"value": "import { PropTypes } from 'react';\n\nconst CardPropTypes = {\n id: PropTypes.number,\n name: PropTypes.string,\n type: PropTypes.string,\n colour: PropTypes.string,\n manaCost... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for refreshing the max amount of the knob when the max value its bound to is changed\n"
},
{
"from": "human",
"value": "angular.module('ui.knob', [])\n .directive('knob', function () {\n return {\n restrict: 'EACM',\n template: function(elem, attrs... | javascript | chosen |
[
{
"from": "system",
"value": "Expand group filters out not found states\n"
},
{
"from": "human",
"value": "// Returns array with group states\nexport default function expandGroup(groupState, entityMap) {\n return groupState.attributes.entity_id.map(\n entityId => entityMap.get(entityId));\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Add `silent` flag so dotenv doesn't fail CI tests\n\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport dotenv from 'dotenv';\nimport popura from '../src';\nimport generateAuthToken from '../src/utils/generate-auth-token';\n\ndotenv.config({\n\tsilen... | javascript | chosen |
[
{
"from": "system",
"value": "Add header logo, index route, and navbar classes\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Link } from 'react-router';\n\nclass App extends React.Component {\n render() {\n return (\n <div className=\"app\">\n <h1>Welcom... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure the new url filename is lower case\n\nApparently doc.qt.io does case insensitive file matching,\ndoc-snapshot.qt.io doesn't.\n"
},
{
"from": "human",
"value": "// Copyright (c) 2015 Narwhal Software s.r.l. \n// Use of this source code is governed by a MIT-... | javascript | chosen |
[
{
"from": "system",
"value": "Update test: check lib/prepare's file reading\n"
},
{
"from": "human",
"value": "var expect = require('chai').expect;\nvar sinon = require('sinon');\n\nvar prepare = require('../../lib/prepare');\nvar fs = require('fs');\n\ndescribe('lib/prepare', function () {\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Check the existence of env_fields.json file\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst cozy = require('./cozyclient')\nconst fs = require('fs')\nconst path = require('path')\n\n// account id path is mandatory in the cli\nlet accountIdPath = process.arg... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo that caused streams not to unsub\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nclass Observable extends React.Component {\n\n constructor (props) {\n super(props)\n this.state = {value: null}\n }\n\n componentWillMount () {\n t... | javascript | chosen |
[
{
"from": "system",
"value": "Allow window to be resized\n\n"
},
{
"from": "human",
"value": "const { ipcRenderer, remote } = require(\"electron\");\nconst { app, BrowserWindow } = require(\"electron\");\nconst fs = require(\"fs\");\n\nwindow.onload = () => {\n\n}\n"
},
{
"from": "gpt",... | javascript | chosen |
[
{
"from": "system",
"value": "Fix warnings in build task\n"
},
{
"from": "human",
"value": "var classes = require(\"./classes\");\nvar gRex = require(\"./grex\");\n\nvar grex = function(options, callback){\n try {\n if(typeof options === 'function'){\n callback = options;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update Census statistics method to get groups, sections and teams\n"
},
{
"from": "human",
"value": "import connection from '../../config/database';\n\nmodule.exports.register = (server, options, next) => {\n async function getStats(next) {\n try {\n const ... | javascript | chosen |
[
{
"from": "system",
"value": "Support new (correct) RegExp.toString behavior\n\nJust a fix to the test to remove spurious failure.\n\nFix #172\n"
},
{
"from": "human",
"value": "'use strict';\n\n\nvar assert = require('assert');\nvar yaml = require('../../');\n\n\ntest('RegExps should be prope... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing canvas context methods\n"
},
{
"from": "human",
"value": "module.exports = function() {\n global.expect = global.chai.expect;\n\n global.THREE = require('three');\n\n // Mock 'document.createElement()' to return a fake canvas.\n // This is a bit more... | javascript | chosen |
[
{
"from": "system",
"value": "Make provider-carousel test account for whitespace\n"
},
{
"from": "human",
"value": "import {moduleForComponent, skip} from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\nimport Ember from 'ember';\n\nmoduleForComponent('provider-carousel', 'Integra... | javascript | chosen |
[
{
"from": "system",
"value": "Fix coverage output directory so it works with `karma-coveralls`\n"
},
{
"from": "human",
"value": "// This is a karma config file. For more details see\n// http://karma-runner.github.io/0.13/config/configuration-file.html\n// we are also using it with karma-webpa... | javascript | chosen |
[
{
"from": "system",
"value": "emoji: Add type annotations to selectors.\n\nThis fully covers this (small) file with types.\n"
},
{
"from": "human",
"value": "/* @flow */\nimport { createSelector } from 'reselect';\nimport { getRawRealmEmoji } from '../directSelectors';\nimport { getAuth } from '... | javascript | chosen |
[
{
"from": "system",
"value": "Update public keyword regular expression.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst matchPublic = /^\\s*public\\s*(\\S*)$/;\n\nclass Controller {\n\tconstructor() {\n\t\tthis.commands = [];\n\t}\n\n\taddCommand( name ) {\n\t\tconst Command = require... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments to `moduleNameMapper` option in Jest config\n"
},
{
"from": "human",
"value": "const { defaults } = require(\"jest-config\");\n\nmodule.exports = {\n testEnvironment: \"node\",\n setupFiles: [\n \"<rootDir>/../apollo-server-env/dist/index.js\"\... | javascript | chosen |
[
{
"from": "system",
"value": "Update to use v2 of API"
},
{
"from": "human",
"value": "(function( $ ) {\n\tvar requests = {};\n\tvar zipValid = {\n\t\tus: /[0-9]{5}(-[0-9]{4})?/\n\t};\n\n\t$.ziptastic = function(zip, callback){\n\t\t// Only make unique requests\n\t\tif(!requests[zip]) {\n\t\t\tr... | javascript | chosen |
[
{
"from": "system",
"value": "Remove EC2 instance from the elasticache test\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Attempt to create a template containing an ec2 and elasticache instance.\n **/\nvar Template = require('../lib/Template.js');\nvar Validator = require('../lib/V... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for plug-in : Flipkart\n"
},
{
"from": "human",
"value": "var hoverZoomPlugins = hoverZoomPlugins || [];\nhoverZoomPlugins.push({\n name:'Flipkart',\n prepareImgLinks:function (callback) {\n var res = [];\n hoverZoom.urlReplace(res,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for content parser\n"
},
{
"from": "human",
"value": "/*!\n * unit asserts to ensure delivery of payload within\n * HTTP POST/PUT requests works\n *\n * @author pfleidi\n */\n\n\nvar assert = require('assert');\nvar Helper = require('./test_helper');\nvar H... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Search Box CSS is not Responsive\n"
},
{
"from": "human",
"value": "/**\n * Widget Header Directive\n */\n\nangular\n .module('RDash')\n .directive('rdWidgetHeader', rdWidgetTitle);\n\nfunction rdWidgetTitle() {\n var directive = {\n requires: '^... | javascript | chosen |
[
{
"from": "system",
"value": "Fix type in client error codes\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst http = require('http');\n\nlet request = {};\n\nrequest.get = function(url) {\n return new Promise((resolve, reject) => {\n let req = http.get(url, (res) => {\n if ([40... | javascript | chosen |
[
{
"from": "system",
"value": "Store single user instead of array\n"
},
{
"from": "human",
"value": "import * as ActionTypes from '../actions/ActionTypes'\n\nfunction UserReducer(state = [], action) {\n switch (action.type) {\n case ActionTypes.CREATE_USER_SUCCESS:\n return [\n ..... | javascript | chosen |
[
{
"from": "system",
"value": "Use SelectionButtons live selector, for JS/AJAX content\n\nSome GOV.UK pages, like Smart Answers, load content via JS, including\nradio buttons or checkboxes. These will be added to the DOM after the\nselector is run and the resulting elements are passed to SelectionButtons\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sentry reporting in SSR\n"
},
{
"from": "human",
"value": "import { get } from 'lodash';\nimport Raven from 'raven-js';\n\nexport default function createMessageMiddleware(actionToDispatch) {\n return store => next => action => {\n const success = action.succ... | javascript | chosen |
[
{
"from": "system",
"value": "ADD - TDD for POST employees endpoint without employee data\n"
},
{
"from": "human",
"value": "var chakram = require('chakram'),\n expect = chakram.expect;\n\ndescribe(\"mPayroll API\", function() {\n const empRec = {\n \"name\": 'Harry Hourly',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove now unnecessary \"load\" event listener\n"
},
{
"from": "human",
"value": "export default (shower) => {\n const { container } = shower;\n const { fullModeClass, listModeClass } = shower.options;\n\n if (container.classList.contains(fullModeClass)) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Increase coverage base to 100%\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.js', 'lib/**/*.js... | javascript | chosen |
[
{
"from": "system",
"value": "Fix root account forward to correct js file name.\n"
},
{
"from": "human",
"value": "// Replace the normal jQuery getScript function with one that supports\n// debugging and which references the script files as external resources\n// rather than inline.\njQuery.exte... | javascript | chosen |
[
{
"from": "system",
"value": "Fix rating route to return proper result and save stars as ints\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\nvar ratings = [\n {text: 'Good UI! Many alert choices.', stars: 5},\n {text: 'Running Great! No ... | javascript | chosen |
[
{
"from": "system",
"value": "Add actions argument to say function\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Bot = require('./bot');\n\nclass SmoochApiBot extends Bot {\n constructor(options) {\n super(options);\n\n this.name = options.name;\n this.avatarU... | javascript | chosen |
[
{
"from": "system",
"value": "Enable v1.3.0 on the development channel"
},
{
"from": "human",
"value": "{\n\t\"stable\": {\n\t\t\"CSIDE_version\": \"1.2.1\",\n \"nw_version\": \"0.21.4\",\n \"desc\": \"v1.2.1 - (1.2.0) Feature release: Custom themes, code folding and more.\",\n\t\t\"target... | javascript | chosen |
[
{
"from": "system",
"value": "Add object literals in JavaScript\n"
},
{
"from": "human",
"value": "var Pet = {\n init: function (options) {\n this.name = options.name\n this.born = options.born\n this.died = options.died\n }\n}\n\nvar Dog = {\n init: function (breed, options) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Check if it is not an image\n"
},
{
"from": "human",
"value": "$( document ).ready( function() {\n function showUploadedImage( source ) {\n $( \"#userImage\" ).attr( \"src\", source );\n }\n $( \"#image-form\" ).submit( function() {\n var imag... | javascript | chosen |
[
{
"from": "system",
"value": "Revert react button story to English\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport { storiesOf } from '@storybook/react';\nimport { action } from '@storybook/addon-actions';\nimport { linkTo } from '@storybook/addon-links';\n\nimport { Butt... | javascript | chosen |
[
{
"from": "system",
"value": "Change scrapper trigger to http request\n"
},
{
"from": "human",
"value": "// Imports the Google Cloud client library\nconst Datastore = require('@google-cloud/datastore')\n\n// Your Google Cloud Platform project ID\nconst projectId = 'pirula-time'\n\n// Instantiate... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Reader to support non-model audio (no ID)\n"
},
{
"from": "human",
"value": "Kpcc.Article = DS.Model.extend({\n title : DS.attr(),\n short_title : DS.attr(),\n published_at : DS.attr(),\n byline : DS.attr(),\n teaser ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix char count for Firefox\n"
},
{
"from": "human",
"value": "// Gets character limit and allows no more\n$(function() {\n // Creates the character count elements\n $(\".js-char-count\").wrap(\"<div class='char-count'></div>\")\n $(\".js-char-count\").after(\"<di... | javascript | chosen |
[
{
"from": "system",
"value": "Exit process if clearing process does not finish within 3 seconds\n\nApp would previously refuse to exit if it could not send a successful\nclear message to each player.\n"
},
{
"from": "human",
"value": "var utils = require(\"radiodan-client\").utils,\n logger =... | javascript | chosen |
[
{
"from": "system",
"value": "Add a int exception for the check for Deno.\n"
},
{
"from": "human",
"value": "var isNode = require('is-node');\n\nmodule.exports = (function () {\n if (typeof Deno !== 'undefined') {\n var env = Deno.permissions().env ? Deno.env() : {};\n\n return ... | javascript | chosen |
[
{
"from": "system",
"value": "Make api initialisation more modular\n"
},
{
"from": "human",
"value": "module.exports = function (config, next) {\n\n require('../db')(config, function (err, client) {\n\n if (err) { return next(err); }\n\n var messaging = require('../db/messaging')(config);... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.