conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Refactor change ‘var’ statement to ‘const’\n"
},
{
"from": "human",
"value": "import setCurrentScreenAction from \"src/actions/ScreenActions.js\";\nimport { SET_CURRENT_SCREEN, MENU_SCREEN,\n GAME_SCREEN} from \"src/actions/ScreenActions.js\";\n\ndescribe(\"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix event name for incoming webhook\n"
},
{
"from": "human",
"value": "var localtunnel = require('localtunnel');\n\nmodule.exports = function (slackapp, port) {\n if (process.env.ENABLE_LOCAL_TUNNEL) {\n localtunnel(port, (err, tunnel) => {\n if (err) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add class for preventing overlay only if not already set\n"
},
{
"from": "human",
"value": "(function () {\n\n\t'use strict';\n\n\t// Hide overlay when ESC is pressed\n\tdocument.addEventListener('keyup', function (event) {\n\t\tvar hash = window.location.hash.repla... | javascript | chosen |
[
{
"from": "system",
"value": "Update width of search box\n\nMinor fixes to classes, add new rounding classes for search box and button to achieve a neat join effect.\n"
},
{
"from": "human",
"value": "import PropTypes from 'prop-types';\nimport React, { Fragment } from 'react';\nimport AUtextInp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix directories for watch files\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n // Add the grunt-mocha-test tasks.\n grunt.loadNpmTasks('grunt-contrib-jasmine');\n grunt.loadNpmTasks('grunt-contrib-jshint');\n grunt.loadNpmTasks('grunt-... | javascript | chosen |
[
{
"from": "system",
"value": "Remove version from minified filename\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n uglify: {\n mini_src: {\n options: {\n banner: '/*! <%= pkg.n... | javascript | chosen |
[
{
"from": "system",
"value": "[package:test] Fix case for codecov tools\n\nAdd comment to skip unreachable branch\n"
},
{
"from": "human",
"value": "if (process.env.MOCHA === '1') {\n // If testing from CLI, use noop logger, to not interfere with the mocha reporter\n // (see issues mochajs/moc... | javascript | chosen |
[
{
"from": "system",
"value": "Add support to options; args moved to config\n\n - config.args: new way to pass arguments\n - config.opts: supports include, exclude and flat options\n\ncloses #3\n"
},
{
"from": "human",
"value": "var path = require('path'),\n walk = require('walkdir'),\n req... | javascript | chosen |
[
{
"from": "system",
"value": "Extend timeout on travis Mocha tests\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = function(config) {\n config.set({\n frameworks: [ \"mocha\" ],\n files: [ \"dist/jsonapi-client-test.js\" ],\n reporters: [ \"spec\" ],\n plugins... | javascript | chosen |
[
{
"from": "system",
"value": "Stop kim responding to herself if there are multiple instances running.\n"
},
{
"from": "human",
"value": "var Slack = require('slack-client'),\n Kimbot = require('./kimbot'),\n Foursquare = require('./clients/foursquare'),\n OpenWeather = require('./clients/open... | javascript | chosen |
[
{
"from": "system",
"value": "Make Rfam help url relative\n"
},
{
"from": "human",
"value": "var rfam = {\n bindings: {\n upi: '<',\n rna: '<',\n rfamHits: '<',\n toggleGoModal: '&'\n },\n\n controller: ['$http', '$interpolate', 'routes', function($http, $int... | javascript | chosen |
[
{
"from": "system",
"value": "Fix AlertActions test's handling of async functions\n\nThe problem was that submitNeedHelpAlert returns immediately, after initiating a promise but without returning that promise. So the 'then' callback was being run before the actual promise had resolved.\n"
},
{
"from... | javascript | chosen |
[
{
"from": "system",
"value": "Fix poster issue that prevents zooming/pinching\n"
},
{
"from": "human",
"value": "/* @flow */\nimport { Dimensions, StyleSheet } from 'react-native';\n\nimport { colors } from 'app/settings';\n\nexport default StyleSheet.create({\n Poster: {\n backgroundColor: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add modules to redux blacklist\n"
},
{
"from": "human",
"value": "import AsyncStorage from '@react-native-community/async-storage';\nimport { persistStore, persistReducer } from 'redux-persist';\nimport { applyMiddleware, createStore } from 'redux';\nimport thunk fr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix project reference in test\n"
},
{
"from": "human",
"value": "var CircusRouter = require('circus-router'),\n expect = require('chai').expect;\n\ndescribe('circus-router', function() {\n describe('config', function() {\n it('should apply additions', functio... | javascript | chosen |
[
{
"from": "system",
"value": "test: Use new version of JSDOM\n"
},
{
"from": "human",
"value": "const Jasmine = require('jasmine');\nconst { jsdom } = require('jsdom');\n\nconst jasmine = new Jasmine();\n\nglobal.document = jsdom('<!doctype html><html><body></body></html>');\nglobal.window = glo... | javascript | chosen |
[
{
"from": "system",
"value": "Define and initialize variables at top of func body\n"
},
{
"from": "human",
"value": "/**\n * Insert elements into sorted array using binary search to indentify correct index\n * @module lib/index\n */\n\nmodule.exports = binarySearchInsert\n\n/**\n * @param {Array... | javascript | chosen |
[
{
"from": "system",
"value": "Set right source when not LTS\n"
},
{
"from": "human",
"value": "import { createAction } from 'redux-actions';\nimport { createThunkAction } from 'utils/redux';\n\nconst fetchNdcsCountryAccordionInit = createAction(\n 'fetchNdcsCountryAccordionInit'\n);\nconst fetc... | javascript | chosen |
[
{
"from": "system",
"value": "Remove componentWillMount from idMe.js shared component\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport config from 'config/environment';\nimport troopImage from 'images/Troop.png';\nimport styles from './idme.css';\n\nclass Idme... | javascript | chosen |
[
{
"from": "system",
"value": "Add utility function to convert direction name to WASD\n"
},
{
"from": "human",
"value": "export const centerGameObjects = (objects) => {\n objects.forEach(function (object) {\n object.anchor.setTo(0.5);\n });\n};\n\nexport function centerOfObject(object, map) ... | javascript | chosen |
[
{
"from": "system",
"value": "Update module name in example code\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar OnlineSVM = require( './../lib' );\nvar x1;\nvar x2;\nvar y;\nvar i;\n\n// Create model:\nvar model = new OnlineSVM({\n\t'lambda': 1e-4,\n\t'loss': 'leastSquares',\n\t'interce... | javascript | chosen |
[
{
"from": "system",
"value": "Move StyleDeclaration outside main function\n"
},
{
"from": "human",
"value": "/*!\n * TemplateLayout Wef plugin\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\n\n//requires: cssParser\nvar parser = wef.fn.cssParser; //TODO: loader\n//exports: templateL... | javascript | chosen |
[
{
"from": "system",
"value": "Use single quotes on require\n"
},
{
"from": "human",
"value": "var assert = require(\"assert\"),\n should = require('should'),\n child_process = require('child_process');\n\n\ndescribe('CLI', function () {\n describe('#help', function () {\n it('should re... | javascript | chosen |
[
{
"from": "system",
"value": "General: Throw with an invalid ENV.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/*!\n * Config.js is responsible for rendering the top-level configuration as\n * required by client, server, or both. _No information should exist here that\n * cannot be seen b... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in command parsing\n"
},
{
"from": "human",
"value": "module.exports = function(ircbot, config) {\n\tvar requireDir = require('require-dir');\n\tvar commands = requireDir('commands');\n\t\n\tircbot.addListener('message', function (from, to, message) {\n\t\ti... | javascript | chosen |
[
{
"from": "system",
"value": "Allow passing a verb when stubbing server"
},
{
"from": "human",
"value": "/* global define, sinon */\n\ndefine([\n 'sinon'\n], function () {\n 'use strict';\n\n function stubServer (options) {\n var server = sinon.fakeServer.create();\n server.respondWith(... | javascript | chosen |
[
{
"from": "system",
"value": "Update test wording to match updated significance\n"
},
{
"from": "human",
"value": "var toRna = require('./rna-transcription');\n\ndescribe(\"toRna()\", function() {\n it(\"transcribes cytidine to guanosine\", function() {\n expect(toRna('C')).toEqual('G');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add some test for the user utils\n"
},
{
"from": "human",
"value": "/* global FormplayerFrontend */\n/* eslint-env mocha */\ndescribe('User', function () {\n describe('Collection', function() {\n var UserCollection = FormplayerFrontend.Collections.User;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add artificial limit of 500 records in lieu of pagination\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n define(\n [\n 'lodash',\n 'jquery'\n ],\n function (_, $) {\n return function ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix instructions in 'react-native init'\n\nSummary: This was buggy and didn't print the folder we need to cd into.\n\nReviewed By: mkonicek\n\nDifferential Revision:\nD4313396\nNinja: OSS only\n\nfbshipit-source-id: 0e15baf818065b63e939def60a1366e2251aac7d\n"
},
{
"from... | javascript | chosen |
[
{
"from": "system",
"value": "Move tunnel-identifier and build to each capability\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar devServerPort = 8084;\nvar specE2eFiles = 'spec-e2e/**/*.js';\n/* global exports */\nexports.config = {\n sauceUser: 'arethusa',\n sauceKey: '8e76fe91-f0f5-... | javascript | chosen |
[
{
"from": "system",
"value": "Use much longer promise chain\n"
},
{
"from": "human",
"value": "/*\nShow that promise chaining takes priority over setImmediate().\n\n*/\n\nsetImmediate(() => {\n console.log('Inside setImmediate callback')\n})\n\nPromise.resolve(1)\n.then(value => {\n console.lo... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to make sure store.formValue is defined\n"
},
{
"from": "human",
"value": "import {describeComponent} from 'ember-mocha'\nimport {PropTypes} from 'ember-prop-types'\nimport {validatePropTypes} from '../../utils/template'\n\ndescribeComponent(\n 'frost-buns... | javascript | chosen |
[
{
"from": "system",
"value": "Address PR comments on unit test for confirm delete\n"
},
{
"from": "human",
"value": "import Ember from \"ember\";\nimport { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('controller:gist', {\n // Specify the other units that are required for this test.\n //... | javascript | chosen |
[
{
"from": "system",
"value": "Change that should fix an issue allers are having with reply to addresses not working\n"
},
{
"from": "human",
"value": "function ComponentTextfield( id ) {\n\tvar self = _ComponentFormControl(id);\n\t\n\tself.setDefaultState('text-value');\n\tself.bind = function()... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment and import const for 'null' string value on default config\n"
},
{
"from": "human",
"value": "export default function defaultQueryConfig(id) {\n return {\n id,\n database: null,\n measurement: null,\n retentionPolicy: null,\n fields: [],\... | javascript | chosen |
[
{
"from": "system",
"value": "Update PaymentType and ExecutionType to have correct options"
},
{
"from": "human",
"value": "var _ = require('underscore');\nvar Transaction = require('./Transaction');\n\nvar PayIn = Transaction.extend({\n defaults: _.extend({}, Transaction.prototype.defaults, ... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing query builder methods"
},
{
"from": "human",
"value": "\nimport { Select } from './query'\n\nconst builder = {\n\n /**\n * \n * @returns {Select}\n */\n select() {\n return new Select().select(...arguments)\n },\n\n /**\n * \n * @return ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor Redux functionality to combine reducers\n"
},
{
"from": "human",
"value": "import createResourcesFromReducers from './createResourcesFromReducers';\nimport dispatch from './dispatch';\nimport getConsensus from './getConsensus';\nimport connectActionSets fro... | javascript | chosen |
[
{
"from": "system",
"value": "Fix syntax error in query from request builder\n"
},
{
"from": "human",
"value": "'use strict'\n\nclass API {\n static createQueryFromRequest (request) {\n delete request.rats\n delete delete request.CMDRs\n\n let limit = parseInt(request.limit) || 25\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Create Cards collection on App init."
},
{
"from": "human",
"value": "module.exports = (function() {\n var Router = require('router');\n\n require('lib/config');\n require('lib/helpers');\n\n window.App = window.App || {};\n\n App.Router = new Router();\n\n Ap... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce flakiness in auto-run test\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { module, test } from 'qunit';\nimport startApp from '../../tests/helpers/start-app';\nimport sinon from 'sinon';\n\nconst { run } = Ember;\n\nconst SELECTORS = {... | javascript | chosen |
[
{
"from": "system",
"value": "Add babel preset back to tests\n"
},
{
"from": "human",
"value": "require('babel-core/register');\n\nglobal.expect = require('expect');\n"
},
{
"from": "gpt",
"value": "require('babel-core/register')({\n presets: [\n 'es2015',\n ],\n});\n\nglobal.ex... | javascript | chosen |
[
{
"from": "system",
"value": "Improve paste event to work with focus.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n/*\nWhen content is pasted into a block take the sanitized html and create a block for each\nparagraph that has been added.\n*/\n\nvar scribePastePlugin = function(block) {... | javascript | chosen |
[
{
"from": "system",
"value": "Update typeahead configuration for IMPACT Lattice upload.\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2015, Facility for Rare Isotope Beams\n *\n */\n\n$('#lattice_name').typeahead({}, {\n\tsource:function(query, syncResults, asyncResults) {\n\t\tlattice... | javascript | chosen |
[
{
"from": "system",
"value": "Update example to account for object merging\n\nPR #1331 introduces new behavior that merges a passed object with the\ndefaults.\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar HtmlWebpackPlugin = require('../..');\nvar webpackMajorVersion = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Add render function to label select js module\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n moj.Modules.LabelSelect = {\n el: '.js-LabelSelect',\n\n init: function () {\n this.cacheEls();\n this.bindEvents();\n\n // kee... | javascript | chosen |
[
{
"from": "system",
"value": "Write test for tempvar controls toggle\n"
},
{
"from": "human",
"value": "import appReducer from 'src/shared/reducers/app'\nimport {\n enablePresentationMode,\n disablePresentationMode,\n // delayEnablePresentationMode,\n setAutoRefresh,\n} from 'src/shared/acti... | javascript | chosen |
[
{
"from": "system",
"value": "Add data type and validation regEx for emailAddresses array item(s)\n"
},
{
"from": "human",
"value": "import SimpleSchema from 'simpl-schema';\n\nconst usersEnrollSchema = new SimpleSchema({\n subject: {\n type: String,\n // suggested maximum length of email... | javascript | chosen |
[
{
"from": "system",
"value": "Implement Mutation Function to Toggle Direction of Transistor\n"
},
{
"from": "human",
"value": "module.exports =\n{\n mutationFunction: function(phenotype)\n {\n // make a random change to phenotype\n return phenotype\n }\n}\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Correct static angular app name\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('<%=angularAppName%>')\n .factory('Password', function ($resource) {\n return $resource('api/account/change_password', {}, {\n });\n });\n\nangular... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor solution based on feedback received\n"
},
{
"from": "human",
"value": "class Year {\n constructor (annum) {\n this.annum = annum\n }\n isLeap () {\n return (this.isDivisibleBy4ButNotBy100() || this.isDivisibleBy4And100ButNotBy400())\n }\n isDivis... | javascript | chosen |
[
{
"from": "system",
"value": "Remove explanitory comment about middlewear\n"
},
{
"from": "human",
"value": "var morgan = require('morgan');\nvar bodyParser = require('body-parser');\n\n// Middleware can be thought of as a magical pipe that water flows through.\n// Each drop of water starts at t... | javascript | chosen |
[
{
"from": "system",
"value": "feature: Create markdown doc files from source\n"
},
{
"from": "human",
"value": "/*\n * grunt-dox\n * https://github.com/iVantage/grunt-dox\n *\n * Copyright (c) 2014 Evan Sheffield\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add messages to rooms objects\n"
},
{
"from": "human",
"value": "const getRoomData = require('../db/controllers/getRoomIdsAndUserIdsGivenSelfId.js');\nconst getBasicInfo = require('../db/controllers/getUserBasicInfoGivenUserId.js');\nconst helpers = require('../db/c... | javascript | chosen |
[
{
"from": "system",
"value": "Add file drop to visualizer\n"
},
{
"from": "human",
"value": "(function(){\n var app = angular.module('iccmax-gamut', []);\n app.controller('AppController', [function() {\n this.title = 'GAMUT';\n\n var renderCanvas = document.getElementById(\"v... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dotenv execution, create library object that contain library infos. watch if DEV MODE and UGLIFY if PROD MODE\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst config = require('./package.json');\n\nconst webpack = require('webpack');\nr... | javascript | chosen |
[
{
"from": "system",
"value": "FIX - Express server updates adding json file\n"
},
{
"from": "human",
"value": "var express = require('express')\nvar router = express.Router()\nconst family_file = \"family.json\"\n\n// define the home page route\nrouter.get('/', function (req, res) {\n res.jso... | javascript | chosen |
[
{
"from": "system",
"value": "Enhance the get param by name tests\n"
},
{
"from": "human",
"value": "define([\n 'aux/get-parameter-by-name'\n], function (getParameterByName) {\n describe('getParameterByName', function () {\n var url;\n\n beforeEach(function () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add logging to the test server.\n"
},
{
"from": "human",
"value": "//This server is here, because we need to go up a directory from the test site for some resources.\nvar connect = require('connect');\nconnect.createServer(\n connect.static(__dirname)\n).listen(3... | javascript | chosen |
[
{
"from": "system",
"value": "Fix nick search missing from new standardised search function\n"
},
{
"from": "human",
"value": "'use strict'\n\nclass API {\n static createQueryFromRequest (request) {\n let limit = parseInt(request.limit) || 25\n delete request.limit\n\n let offset = par... | javascript | chosen |
[
{
"from": "system",
"value": "Make samples filter the default filter\n"
},
{
"from": "human",
"value": "class MCWorkflowFiltersComponentController {\n /*@ngInject*/\n constructor(experimentsAPI, mcStateStore, $stateParams) {\n this.experimentsAPI = experimentsAPI;\n this.mcSt... | javascript | chosen |
[
{
"from": "system",
"value": "Clone Counter - Read an array of numbers, pick out the one that appears most frequently\n"
},
{
"from": "human",
"value": "/** Find the most common entry in an array of numbers\n @function clonecounter\n @param {array} arr Simple array of numbers\n @example... | javascript | chosen |
[
{
"from": "system",
"value": "Update add & delete bookmark on backend\n"
},
{
"from": "human",
"value": "const {Bookmark} = require('../models')\n\nmodule.exports = {\n async index (req, res) {\n try {\n const {songId, userId} = req.query\n\n const bookmark = await Bookmark.findOne... | javascript | chosen |
[
{
"from": "system",
"value": "Create the link from the client\n"
},
{
"from": "human",
"value": "exports.init = function () {\n debugger\n};\n"
},
{
"from": "gpt",
"value": "var $ = function (s) {\n return document.querySelector(s);\n};\n\n\nexports.init = function () {\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Add auto-reading from Hacker News\n\nEvery hour, read the best ~20 posts from the past 24 hours from Hacker News.\n"
},
{
"from": "human",
"value": "//var queue = new PowerQueue();\nvar hn = Meteor.require('hacker-news-api');\n\nMeteor.methods({\n \"readHn\": funct... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in isToday method\n"
},
{
"from": "human",
"value": "export default class Utils {\n static paddingZero(num) {\n return `0${num}`.slice(-2);\n }\n\n static toFormatDate(date) {\n const y = date.getFullYear();\n const m = this.paddingZero(date.getM... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure to change the toaster when new error appears\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport './App.css';\nimport { connect } from 'react-redux'\nimport { Intent, Position, Toaster } from \"@blueprintjs/core\";\n\nclass... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for non-mega dragon monotype.\n"
},
{
"from": "human",
"value": "describe('C&E Generator', function() {\n beforeEach(function beforeEach() {\n browser.get('http://localhost:4000/')\n })\n\n it('should have a title', function hasTitle() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use full path in file reading error\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar parallelStream = require('pelias-parallel-stream');\n\nvar maxInFlight = 10;\n\nmodule.exports.create = function create_json_parse_stream(dataDirectory) {\n return p... | javascript | chosen |
[
{
"from": "system",
"value": "Add route to handle a borrow request\n"
},
{
"from": "human",
"value": "// import necessary modules\nimport express from 'express';\nimport users from '../controllers/users';\nimport verifyToken from '../controllers/auth/verifyToken';\n\nconst router = express.Route... | javascript | chosen |
[
{
"from": "system",
"value": "Write forceMin/forceMax into the synthetic stylesheet of merged tracks.\n"
},
{
"from": "human",
"value": "/* -*- mode: javascript; c-basic-offset: 4; indent-tabs-mode: nil -*- */\n\n// \n// Dalliance Genome Explorer\n// (c) Thomas Down 2006-2013\n//\n// tier-action... | javascript | chosen |
[
{
"from": "system",
"value": "Delete the comment which is not correct\n"
},
{
"from": "human",
"value": "const parameters = require('./Parameters')\n// Show every method for operation with tables like delete, insert, update\n\nexports.check = function (column, operator, value) {\n\n}\n\nexports.... | javascript | chosen |
[
{
"from": "system",
"value": "Use git ssh key when cloning\n"
},
{
"from": "human",
"value": "/* @flow */\nimport test from 'ava'\nimport useGitHub from 'create-npm/test/helpers/useGitHub'\nimport useGitHubRepository from 'create-npm/test/helpers/useGitHubRepository'\nimport { getGitHubRepositor... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded comma from BoxHelper test\n"
},
{
"from": "human",
"value": "(function () {\n\n\t'use strict';\n\n\tvar parameters = {\n\t\tdiameter: 10,\n\t};\n\n\tvar geometries;\n\n\tQUnit.module( \"Extras - Helpers - BoxHelper\", {\n\n\t\tbeforeEach: function() ... | javascript | chosen |
[
{
"from": "system",
"value": "Add jquery to asset pipeline\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, v... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for baseUrl in ApolloClient instance\n\nAdd support for providing baseUrl/rootUrl within `uri` while\ncreating ApolloClient instance.\n"
},
{
"from": "human",
"value": "import { ApolloClient } from 'apollo-client';\nimport { InMemoryCache } from 'apollo-... | javascript | chosen |
[
{
"from": "system",
"value": "Fix no method error for `app.hide()` on Linux and Windows\n"
},
{
"from": "human",
"value": "import { app } from 'electron'\n\n/**\n * Show or hide main window\n * @return {BrowserWindow} appWindow\n */\nexport default (appWindow) => {\n if (appWindow.isVisible()) ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dead chosen dropdown code\n\nThe uncommented block didn't seem to be having any effect - the section drop\ndown was staying as a standard drop down.\n\nThe commented block was commented.\n"
},
{
"from": "human",
"value": "$(function() {\n var blankByDefault ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor JS To have Reusuable Functions\n"
},
{
"from": "human",
"value": "$(document).ready( function () {\n $('#signup').click(function(event){\n event.preventDefault();\n $('#screen_block').show();\n $('#signup_modal').show();\n });\n\n $('#screen_blo... | javascript | chosen |
[
{
"from": "system",
"value": "Clarify result message to show that only 30 repos are showing.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar _ = require('lodash');\nvar fs = require('fs');\nvar path = require('path');\n\nfunction arrayToQueryString(args) {\n var searchString = '?q=' + a... | javascript | chosen |
[
{
"from": "system",
"value": "Fix prop cache reset triggering in the wrong case (affected performance)\n"
},
{
"from": "human",
"value": "import { ATTR_KEY } from '../constants';\nimport { toLowerCase } from '../util';\nimport { ensureNodeData, getRawNodeAttributes, removeNode } from './index';\... | javascript | chosen |
[
{
"from": "system",
"value": "Use mongodb as production session store\n"
},
{
"from": "human",
"value": "/**\n * Hellosleep \n */\n\n// Load .env for development environments\n(process.env.NODE_ENV !== 'production') && require('dotenv').load();\n\nconst keystone = require('keystone');\n\nkeyston... | javascript | chosen |
[
{
"from": "system",
"value": "Load Benchfib and Examples from attic as well\n\nwhile in development mode\n"
},
{
"from": "human",
"value": "define([\n 'amber/devel',\n './deploy',\n // --- packages used only during development begin here ---\n '{%= namespace %}/{%= name %}-Tests',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set default page size to 10\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Mixin.create({\n page: 0,\n size: 25,\n filter: ''\n});\n"
},
{
"from": "gpt",
"value": "import Ember from 'ember';\n\nexport default Emb... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify setTimeout using bind() in a useful way\n"
},
{
"from": "human",
"value": "function RetryOperation(timeouts) {\n this._timeouts = timeouts;\n this._fn = null;\n this._errors = [];\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.retry = f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove explicit foreign key declarations.\n"
},
{
"from": "human",
"value": "function exports(sequelize, DataTypes) {\n const Response = sequelize.define('Response', {\n GuestId: DataTypes.UUID,\n }, {\n classMethods: {\n associate(models) {\n //... | javascript | chosen |
[
{
"from": "system",
"value": "Create hashmap with elements of first array as keys\n"
},
{
"from": "human",
"value": "// Program that identifies common element(s) that exist within both two arrays\n\nfunction intersection(firstArray, secondArray) {\n\tvar hashMap = {};\n\tvar commonElements = [];... | javascript | chosen |
[
{
"from": "system",
"value": "Rename driver-card to user-card for styles\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport { Button, ButtonGroup } from 'react-bootstrap';\n\nconst User = ({user, onEdit, onDelete}) => {\n\n const edit = (event) => {\n event.preventDefaul... | javascript | chosen |
[
{
"from": "system",
"value": "Use req.secure if it is set\n"
},
{
"from": "human",
"value": "/*\nHTTP Strict Transport Security (HSTS)\n\nhttp://tools.ietf.org/html/draft-ietf-websec-strict-transport-sec-04\n\n*/\n\nmodule.exports = function (maxAge, includeSubdomains) {\n if (!maxAge) maxAge... | javascript | chosen |
[
{
"from": "system",
"value": "Use jQuery for misc. UI code\n"
},
{
"from": "human",
"value": "var IPHistory = (function() {\n 'use strict';\n\n var no_messages_error = \"Your account has no Login/Logout activity.\";\n\n function updateTable(batch) {\n IPHistoryUI.updateTable(batc... | javascript | chosen |
[
{
"from": "system",
"value": "Add a schema to Audio\n"
},
{
"from": "human",
"value": "// audio.js\n//\n// data object representing an audio\n//\n// Copyright 2011, StatusNet Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in co... | javascript | chosen |
[
{
"from": "system",
"value": "Return only relevant events from api\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport fs from 'fs';\nimport path from 'path';\nconst logger = require('../util/logger')(__filename);\n\nconst DATA_DIR = path.join(__dirname, '../../data');\nconst cont... | javascript | chosen |
[
{
"from": "system",
"value": "Use the real max xp in character status dialog\n"
},
{
"from": "human",
"value": "ui.CharacterStatusDialog = function(template, _data) {\r\n ui.Dialog.call(this, template);\r\n\r\n this.name = ui.label(this, '.label.name');\r\n this.hp = ui.progressbar(this, '.pr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix next activities bug (date filter D8 not operational)\n"
},
{
"from": "human",
"value": "(function ($) {\n 'use strict';\n\n setNextActivities();\n function setNextActivities() {\n\n $.ajax({\n url: \"/next_activities\"\n }).done... | javascript | chosen |
[
{
"from": "system",
"value": "[FIX] Correct the down methods for rollback\n"
},
{
"from": "human",
"value": "var dbm = require('db-migrate');\nvar type = dbm.dataType;\n\nexports.up = function(db, callback) {\n db.addColumn('external_transactions', 'to_account_id', {\n type: 'int'\n }, call... | javascript | chosen |
[
{
"from": "system",
"value": "Correct Search with phras ein mongo + use mongodb without promise\n"
},
{
"from": "human",
"value": "var pmongo = require('promised-mongo');\n\nmodule.exports = function(config) {\n\n var coll = pmongo(config.get('connexionURI')).collection(config.get('collection... | javascript | chosen |
[
{
"from": "system",
"value": "Check for the current user if none is passed to the function\n"
},
{
"from": "human",
"value": "isAdmin = function (user) {\n user = (typeof user === 'undefined') ? Meteor.user() : user;\n return !!user && !!user.profile && user.profile.admin === true;\n};\n\nisAd... | javascript | chosen |
[
{
"from": "system",
"value": "Reset timeout warning count each time user renews session\n"
},
{
"from": "human",
"value": "(function(root) {\n\n var SessionTimeoutWarning = function () {}\n\n SessionTimeoutWarning.prototype.count = function () {\n root.setTimeout(this.show, 780000); // cou... | javascript | chosen |
[
{
"from": "system",
"value": "Fix \"your deck\" link when user omits protocol\n"
},
{
"from": "human",
"value": "app.controller(\"RecommendationsController\", function(\n $scope, $location, $timeout, cardService, recommendationService) {\n var deckUrl = $location.search().q;\n $scope.loadin... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.