conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix bug in PUT request\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar env = require('./env.json');\n\nfunction httpPost(req, cb) {\n var https = req.deps.https;\n console.log('env:', env);\n\n var postData = JSON.stringify({\n metadata: req.data.s3Obj... | javascript | chosen |
[
{
"from": "system",
"value": "Add a bower route to FlowTrackApp\n\nWill use this to load bower installed components.\n\nTagging issue #3\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar express = require('express');\nvar ExpressLogger = require('./WebService/GetExpressLogger');\nvar app =... | javascript | chosen |
[
{
"from": "system",
"value": "Change how angular module name is setup\n"
},
{
"from": "human",
"value": "import 'jquery';\nimport angular from 'angular';\nimport 'angular-resource';\n<% if(uiRouter) { %>import 'angular-ui-router';<% } else { %>import 'angular-route';<% } %>\nimport 'angular-sani... | javascript | chosen |
[
{
"from": "system",
"value": "Support controller plugins returning no controller.\n"
},
{
"from": "human",
"value": "module.exports = function (app) {\n // Depends on middleware plugin.\n app.require('../plugins/middleware');\n\n // Expose middler as 'controller'.\n app.controller = app.midd... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with extra slash in Main URL\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular\n .module('mendel')\n .config(routerConfig);\n\n /** @ngInject */\n function routerConfig($stateProvider, $urlRouterProvider) {\n $stateP... | javascript | chosen |
[
{
"from": "system",
"value": "Update to https from http\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\n var title = [],\n desc = [],\n link = [],\n val = $('#search-box'),\n url = 'http://en.wikipedia.org/w/api.php?action=opensearch&search=';\n\n $('#search-bo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong variable name in message list items\n"
},
{
"from": "human",
"value": "import moment from 'moment-timezone'\nimport PropTypes from 'prop-types'\nimport React, { Component } from 'react'\n\nimport { AnimalLink } from './'\nimport { asInfiniteListItem } from... | javascript | chosen |
[
{
"from": "system",
"value": "Load already existings source maps if available.\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst concat = require('gulp-concat')\nconst cleancss = require('gulp-clean-css')\nconst sourcemaps = require('gulp-sourcemaps')\nconst filenames = require('gulp-file... | javascript | chosen |
[
{
"from": "system",
"value": "Change bypass logic to be more flexible on authentication middleware\n"
},
{
"from": "human",
"value": "const jwt = require('jsonwebtoken')\nconst config = require('config')\n\nconst authMiddleware = (req, res, next) => {\n if (req.path === '/auth') { return nex... | javascript | chosen |
[
{
"from": "system",
"value": "[BUG] Fix string typo in migration\n"
},
{
"from": "human",
"value": "var dbm = require('db-migrate');\nvar type = dbm.dataType;\n\nexports.up = function(db, callback) {\n db.createTable('users', { \n\t\tid: { type: 'int', primaryKey: true, autoIncrement: true },\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use DB 15 for test\n"
},
{
"from": "human",
"value": "require('coffee-script');\nrequire('should');\nRedis = require('redis').createClient();\nStreak = require('../lib/');\nStreak.configure(function() {\n this.redis = Redis;\n});\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix gulp install to add new files inside directories (was avoiding overwritin dir)\n"
},
{
"from": "human",
"value": "\nvar\n path = require('path'),\n fs = require('fs'),\n defaults = require('./defaults')\n;\n\nmodule.exports = {\n del: {\n silent... | javascript | chosen |
[
{
"from": "system",
"value": "Add spec to test the return type of toLower()\n"
},
{
"from": "human",
"value": "describe('hasVowels()', function() {\n it('should always return a boolean', function() {\n expect('example string'.hasVowels()).toEqual(jasmine.any(Boolean));\n });\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a FIXME annotation to is-matrix example\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar matrix = require( 'dstructs-matrix' );\nvar isMatrix = require( './../lib' );\n\nvar mat = matrix( [10,10] );\n\nconsole.log( isMatrix( mat ) );\n// returns true\n\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Raise modern browser support bar\n"
},
{
"from": "human",
"value": "// External\nconst mem = require('mem');\n\n// Ours\nconst { merge } = require('../utils/structures');\nconst { getProjectConfig } = require('./project');\n\nconst PROJECT_TYPES_CONFIG = {\n preact... | javascript | chosen |
[
{
"from": "system",
"value": "Remove friendly errors plugin (base) and add the manifest plugin\n\n"
},
{
"from": "human",
"value": "const merge = require('webpack-merge');\r\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\r\nconst FriendlyErrorsPlugin = require('friendly-error... | javascript | chosen |
[
{
"from": "system",
"value": "Call for update on window resize.\n"
},
{
"from": "human",
"value": "/*\nCopyright 2017 New Vector Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of th... | javascript | chosen |
[
{
"from": "system",
"value": "Add AuthController tests similar to the NoteController\n"
},
{
"from": "human",
"value": "const expect = require('chai').expect;\nconst app = mutil.getApp();\nconst AuthController = require(__root + 'auth/AuthController');\n"
},
{
"from": "gpt",
"value":... | javascript | chosen |
[
{
"from": "system",
"value": "Fix custom configuration doesn't extend marlint\n"
},
{
"from": "human",
"value": "export default ({\n rules,\n ...eslintConfig\n} = {\n extends: 'marlint',\n rules: {},\n}) => ({\n ...eslintConfig,\n rules: {\n 'react/react-in-jsx-scope': 'off',\n ...ru... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'standard' that is already provided.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nimport { Constants as AssessmentConstants } from \"../actions/assessment\";\nimport Immutable from \"immutable\";\n\nconst initialState = Immu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix watcher for resource state.\n"
},
{
"from": "human",
"value": "import template from './resource-state.html';\n\nconst resourceState = {\n template: template,\n bindings: {\n resource: '<'\n },\n controller: class ResourceStateController {\n constructor... | javascript | chosen |
[
{
"from": "system",
"value": "TabBarIcon: Use platformPrefixIcon to smartly prefix the icon\n\nSigned-off-by: Kristofer Rye <1ed31cfd0b53bc3d1689a6fee6dbfc9507dffd22@gmail.com>\nTested-by: Kristofer Rye <1ed31cfd0b53bc3d1689a6fee6dbfc9507dffd22@gmail.com>\n"
},
{
"from": "human",
"value": "// @f... | javascript | chosen |
[
{
"from": "system",
"value": "Change controller function to support custom size\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst dateHelper = require(`${__dirname}/../helpers/dateHelper`);\nconst requestHelper = require(`${__dirname}/../helpers/requestHelper`);\n\nexports.getRowRequest ... | javascript | chosen |
[
{
"from": "system",
"value": "Add e2e tests for the routing system.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* https://github.com/angular/protractor/blob/master/docs/toc.md */\n\ndescribe('my app', function() {\n\n browser.get('index.html');\n\n it('should automatically redirect to... | javascript | chosen |
[
{
"from": "system",
"value": "Use ADMIN_APIKEY from the env in tests.\n"
},
{
"from": "human",
"value": "/*\n * Suite-global initialization that should occur before any other files are required. It's probably\n * a code smell that I have to do this.\n */\n\nvar config = require('../../src/config... | javascript | chosen |
[
{
"from": "system",
"value": "Add black lines to hud cross\n\n"
},
{
"from": "human",
"value": "\nvar ForgePlugins = ForgePlugins || {};\n\n/**\n */\nForgePlugins.EditorHUD = function(editor)\n{\n this._editor = editor;\n\n this._canvas = null;\n\n this._options = { cross: true };\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use underlying table name in foreign key\n"
},
{
"from": "human",
"value": "export default function(sequelize, DataTypes) {\n let BSDCallAssignment = sequelize.define('BSDCallAssignment', {\n name: DataTypes.STRING\n }, {\n underscored: true,\n tableName:... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing parameters and settings to Elixir functions\n"
},
{
"from": "human",
"value": "var elixir = require('laravel-elixir');\n\nelixir(function(mix) {\n mix.less('style.less');\n\n mix.scripts([\n '../assets/bower_components/d3/d3.js',\n 'c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the console.tron call in a saga when running via ava.\n"
},
{
"from": "human",
"value": "import { put, select } from 'redux-saga/effects'\nimport TemperatureActions from '../Redux/TemperatureRedux'\nimport { is } from 'ramda'\n\n// exported to make available for... | javascript | chosen |
[
{
"from": "system",
"value": "Use parentWindow instead of createWindow() in these tests.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar jsdom = require(\"../..\").jsdom;\n\nexports[\"should put errors in the window.document.errors array\"] = function (t) {\n var window = jsdom(\"<!DO... | javascript | chosen |
[
{
"from": "system",
"value": "Fix relative positioning issue, use classes and other sugar, ...\n"
},
{
"from": "human",
"value": "\nimport NodeGarden from './nodegarden'\n\nvar pixelRatio = window.devicePixelRatio\nvar $container = document.getElementById('container')\nvar $moon = document.getEl... | javascript | chosen |
[
{
"from": "system",
"value": "Add create mentorship example query\n"
},
{
"from": "human",
"value": "import { gql } from 'react-apollo'\n\nexport const createMentorship = gql`\n mutation {\n createMentorship(input: {\n mentorship: {\n subjectId: \"314ebf89-b463-4a70-812e-9222e797... | javascript | chosen |
[
{
"from": "system",
"value": "Add initial tests for inView interface\n"
},
{
"from": "human",
"value": "import test from 'ava';\n\ntest.todo('Write test for inView');\n"
},
{
"from": "gpt",
"value": "import test from 'ava';\nimport inView from '../src/in-view';\nimport Registry from ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the regular expression at the beginning and end of raw jsonp\n"
},
{
"from": "human",
"value": "function extractJSON(rawJson) {\n return rawJson\n .replace(/\\s*while\\((1|true)\\)\\s*;?/, '')\n .replace(/\\s*for\\(;;\\)\\s*;?/, '')\n .replace(/^[^{\\[... | javascript | chosen |
[
{
"from": "system",
"value": "Add newline to end of test\n"
},
{
"from": "human",
"value": "suite('NumberValue', function() {\n test('NumberValue is a NumberValue and a StyleValue', function() {\n var nv = new NumberValue(3);\n assert.instanceOf(nv, NumberValue);\n assert.instanceOf(nv... | javascript | chosen |
[
{
"from": "system",
"value": "Create new users with createdAt and loginAt props\n"
},
{
"from": "human",
"value": "\nvar config = require('tresdb-config');\nvar db = require('tresdb-db');\nvar bcrypt = require('bcryptjs');\n\nexports.createUser = function (username, email, password, callback) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove '&' sign from url slugs.\n"
},
{
"from": "human",
"value": "var myArray = [];\n$(\"#submit\").on('click', function() {\n\tif ( $('#box').val() || $('#box').text() ) {\n\t\t// myArray variable below checks for period, comma, apostrophe, hashtag and forward-sla... | javascript | chosen |
[
{
"from": "system",
"value": "feat(form): Allow custom content for switch button\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react'\nimport { Button } from 'react-bootstrap'\nimport { connect } from 'react-redux'\n\nimport { switchLocations } from '../../actio... | javascript | chosen |
[
{
"from": "system",
"value": "Fix setting the expense value in add expense form\n"
},
{
"from": "human",
"value": "import {\n SET_EXPENSE_VALUE,\n SET_EXPENSE_CATEGORY,\n SET_EXPENSE_ITEM,\n RESET_ADD_EXPENSE_FORM,\n NEW_EXPENSE,\n SET_EXPENSE_DATE,\n} from '../constants/ActionTypes';\n\ne... | javascript | chosen |
[
{
"from": "system",
"value": "Allow partial maches in span names\n"
},
{
"from": "human",
"value": "'use strict';\n\ndefine(\n [\n 'flight/lib/component'\n ],\n\n function (defineComponent) {\n\n return defineComponent(spanName);\n\n function spanName() {\n this.updateSpans = fu... | javascript | chosen |
[
{
"from": "human",
"value": "Read bookmarks and save as list\n"
},
{
"from": "gpt",
"value": "chrome.bookmarks.getTree(function ( bookmarks ) {\n\tvar list = [];\n\treadFolder(bookmarks[0], list);\n\tconsole.log(list);\n});\n\nfunction readFolder(node, list) {\n\tvar children = node.children;\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Test in which we expect the score to be that of the roll if we have only rolled once is passing\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nclass Game {\n rollAll(framesListWithScores) {\n var framesArray = JSON.parse(framesListWithScores);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use glitch-soc's poll component instead of upstream's\n"
},
{
"from": "human",
"value": "import { connect } from 'react-redux';\nimport Poll from 'mastodon/components/poll';\n\nconst mapStateToProps = (state, { pollId }) => ({\n poll: state.getIn(['polls', pollId])... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the name of the audience field\n\nThis is the one that Evert ended up using on the backend.\n"
},
{
"from": "human",
"value": "const CONTACTS_URL = 'http://moz.fruux.net';\n\nfunction reqListener() {\n var result = document.getElementById('result');\n result.t... | javascript | chosen |
[
{
"from": "system",
"value": "Add STATUS_UPDATE, remove header actions from status reducer\n"
},
{
"from": "human",
"value": "import initialState from './initialState';\nimport { \n HEADER_SHRINKING, \n HEADER_EXPANDING, \n HEADER_ANIMATION_ENDED, \n LOGO_SPIN_STARTED, \n LOGO_SPI... | javascript | chosen |
[
{
"from": "system",
"value": "Use simpler traverse API for removing config comments.\n"
},
{
"from": "human",
"value": "'use strict';\n\n// this Babel plugin removes configuration comments such as:\n// <!-- template-lint triple-curlies=false -->\n// <!-- template-lint enabled=false -->\n\nva... | javascript | chosen |
[
{
"from": "system",
"value": "Add user page now tells you when a user has been added successfully\n"
},
{
"from": "human",
"value": "import callApi, {callApiWithFiles} from '../../../../util/apiCaller';\n\nexport function throwError(message){\n\treturn {type:\"error\", error: message};\n}\n\nexp... | javascript | chosen |
[
{
"from": "system",
"value": "Add code comments for clarity\n"
},
{
"from": "human",
"value": "var vm = new Vue({\n el: '#homeselling',\n data: {\n heading: \"What's My Profit?\",\n homeprice: \"Home Price\",\n realtorfee: \"Realtor fee (in percent)\",\n mortgage: \"Mortgage amount... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for shuffling the library.\n"
},
{
"from": "human",
"value": "console.log('loaded play.js');\n\nvar playPauseButton = function() {\n return document.querySelector(\"button[data-id='play-pause']\");\n};\n\nvar currentTrackInfo = function() {\n return {\... | javascript | chosen |
[
{
"from": "system",
"value": "Use the actual new EventEmitter API.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Component = require('../../ui/Component');\nvar $$ = Component.$$;\n\nfunction ImageComponent() {\n Component.apply(this, arguments);\n}\n\nImageComponent.Prototype = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Make the babel-loader test more explicit in dicom_viewer\n"
},
{
"from": "human",
"value": "module.exports = function (config) {\n config.module.rules.push({\n resource: {\n test: /\\.glsl$/,\n include: [/node_modules(\\/|\\\\)vtk\\.j... | javascript | chosen |
[
{
"from": "system",
"value": "Update for React Router 4\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\n\nexport default function(ComposedComponent) {\n\n function mapStateToProps(state) {\n return { authenticated: state.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken scope in Dispatcher.\n"
},
{
"from": "human",
"value": "import { Dispatcher } from 'flux';\n\nlet AppDispatcher = new Dispatcher();\n\nAppDispatcher.handleAction = (action) => {\n this.dispatch({\n source: 'VIEW_ACTION',\n action: action\n });\n};... | javascript | chosen |
[
{
"from": "system",
"value": "Add previewStore to favorite stores list\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\n\nclass FavoriteStores extends Component {\n static defaultProps = {\n previewStore: {}\n };\n\n static propTypes = {\n preview... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing reference to event\n"
},
{
"from": "human",
"value": "\n'use strict';\n\nangular.module('Teem')\n .directive('needWidget', function() {\n return {\n scope: {},\n controller: [\n '$scope',\n function($scope) {\n $scope.toggl... | javascript | chosen |
[
{
"from": "system",
"value": "Use 2 spaces instead of 4\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nvar proxyGenerator = function (name) {\n return function (msg = '', title = '', options = {}) {\n window.toastr[name](msg.toString(), title.toString(), options);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Store local url in a variable and display it once for both text and image.\n"
},
{
"from": "human",
"value": "L.controlCredits = function(t) {\n return new L.CreditsControl(t)\n}, L.CreditsControl = L.Control.extend({\n options: {\n position: \"bottomri... | javascript | chosen |
[
{
"from": "system",
"value": "Add param description for index argument\n"
},
{
"from": "human",
"value": "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in complia... | javascript | chosen |
[
{
"from": "system",
"value": "Read posts per page from metadata collection\n"
},
{
"from": "human",
"value": "Meteor.publish(\"post_list\", function(page_num){\n const posts_per_page = 10;\n\n //validating the page number\n var page_number = page_num;\n if(!/^[0-9]+$/gi.test(page_num)){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add the use of PatientReducer in redux store\n"
},
{
"from": "human",
"value": "import { combineReducers } from 'redux';\nimport NavigationReducer from './NavigationReducer';\nimport SyncReducer from './SyncReducer';\nimport { PagesReducer } from './PagesReducer';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix naming convention in REPL\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar repl = require('repl');\nvar ChromeInterface = require('../');\n\nChromeInterface(function (chrome) {\n var chromeRepl = repl.start({\n 'prompt': 'chrome> '\n })... | javascript | chosen |
[
{
"from": "system",
"value": "Use graceful exits with Nodemon\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { gracefulExit } = require('./graceful_exit');\n\n// Make sure the server stops when graceful exits are possible\n// Also send related events\nconst setupGracefulExit = functio... | javascript | chosen |
[
{
"from": "system",
"value": "Add a unique key to initial message\n"
},
{
"from": "human",
"value": "import sendChat from '../actions/sendChat'\nimport bot from '../lib/bot'\n\nfunction getInitialState() {\n return [{\n message : bot.getInitial(),\n user : 'Eliza',\n time : new D... | javascript | chosen |
[
{
"from": "system",
"value": "Use medium loader when upgrading account\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { c } from 'ttag';\nimport { Alert, Loader } from 'react-components';\n\nconst Upgrading = () => {\n return (\n <>\n <Alert>{c('Info')... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment to search input shortcut code\n"
},
{
"from": "human",
"value": "const anchorJS = require('anchor-js')\nconst Prism = require('./prism')\n\nwindow.anchors = new anchorJS()\nwindow.Vue = require('vue')\n\nVue.component('responsive-code-sample', require('.... | javascript | chosen |
[
{
"from": "system",
"value": "Join bad request checks into one\n"
},
{
"from": "human",
"value": "const http = require('http');\nconst url = require('url');\n\nconst port = Number( process.argv[2] );\nif ( isNaN(port) ) {\n // bail immediately\n return;\n}\n\nhttp.createServer( function( ... | javascript | chosen |
[
{
"from": "system",
"value": "Validate UUIDs in bookmark objects.\n"
},
{
"from": "human",
"value": "// Validation for bookmark payloads.\n'use strict';\n\nvar Hoek = require('hoek');\nvar Joi = require('joi');\n\nvar validators = {};\n\nvalidators.bookmarkID = Joi.string().guid();\n\n// Bookmar... | javascript | chosen |
[
{
"from": "system",
"value": "Change port for the API 3000 -> 4000\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular.module('app.config')\n .constant('API_BASE', 'http://localhost:3000')\n .constant('API_LOGIN', 'admin')\n .constant('API_PASSWORD', 'smartvm'... | javascript | chosen |
[
{
"from": "system",
"value": "Handle playback of multiple tracks\n"
},
{
"from": "human",
"value": "define([\n 'libs/bean',\n 'libs/bonzo',\n 'libs/qwery',\n 'utils/loadJSON',\n 'sc'\n], function(\n bean,\n bonzo,\n qwery,\n loadJSON\n) {\n var sound;\n\n return ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Route Config to admin\n"
},
{
"from": "human",
"value": "/**\n * Created by Raphson on 2/25/16.\n */\nangular.module('blogger.admin', []).config(['$stateProvider', function($stateProvider){\n $stateProvider.state('admin',{\n url: '/admin',\n con... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem loading daily chart on node page"
},
{
"from": "human",
"value": "jQuery(function ($) {\n function generateChart(el) {\n var url = \"daily_reports_chart.json\";\n var certname = $(el).attr('data-certname');\n if (typeof certname !== typeof unde... | javascript | chosen |
[
{
"from": "system",
"value": "Add id and key props\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Table from '../Table'\nimport PropTypes from 'prop-types'\n\nconst InventoryTable = ({tableRows, addRow, setEditing, saveTableRow}) => {\n\n const columns = [\n {name: \"Na... | javascript | chosen |
[
{
"from": "system",
"value": "Check for authorization header before split\n"
},
{
"from": "human",
"value": "import expressJwt from 'express-jwt';\nimport db from '../models';\nimport config from '../config';\nimport { AuthenticationError } from '../components/errors';\n\nexport function isToken... | javascript | chosen |
[
{
"from": "system",
"value": "Use lodash to determine value length\n"
},
{
"from": "human",
"value": "import _ from 'lodash'\nimport calculateSize from 'calculate-size'\n\nexport const minDropdownWidth = 146\nexport const maxDropdownWidth = 300\nexport const dropdownPadding = 30\n\nconst valueLe... | javascript | chosen |
[
{
"from": "system",
"value": "Load audiosearch creds from env vars, not a file\n\nThis is what was making all the CI-built Cumulonimbi not work -- the file that I used to use for storing these creds is gitignored (for obvious reasons)\n"
},
{
"from": "human",
"value": "const $ = jQuery = require... | javascript | chosen |
[
{
"from": "system",
"value": "Add extremely informative and useful header to all responses\n\nBasically sums up this whole project to be honest\n"
},
{
"from": "human",
"value": "const express = require('express')\nconst config = require('../config')\nconst allTrendsController = require('./contr... | javascript | chosen |
[
{
"from": "system",
"value": "Set links to open in new tab\n"
},
{
"from": "human",
"value": "import {Observable} from 'rx';\nimport {div, a, h2, h3, img} from '@cycle/dom';\n\nimport projects from '../data/projects';\n\nfunction renderSidebar () {\n return (\n div('.sidebar', [\n h2('B... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'Add New Study' reference to MICIS menu nav.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar menuMap = [\n {\n text: \"SUBJECTS\",\n children: [\n {text: \"Enter a New Subject\"},\n {text: 'Enroll an Existing Subj... | javascript | chosen |
[
{
"from": "system",
"value": "Improve missing server test reporting\n"
},
{
"from": "human",
"value": "var spawn = require('child_process').spawn;\n\n\nvar BIN = './src/index.js';\n\n\ndescribe('with no reachable server', function() {\n\tvar subject,\n\t\tdetailsGiven = false;\n\n\tbefore(functi... | javascript | chosen |
[
{
"from": "system",
"value": "Refresh demo nanoScroller after image load\n"
},
{
"from": "human",
"value": "$(function(){\n\n $('.nano').nanoScroller({\n preventPageScrolling: true\n });\n $(\"#main\").find('.description').load(\"readme.html\", function(){\n setTimeout(function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug that can happen when configuration file doesn't exist\n"
},
{
"from": "human",
"value": "var Promise = require('../utils/promise');\n\nvar validateConfig = require('./validateConfig');\nvar CONFIG_FILES = require('../constants/configFiles');\n\n/**\n Pars... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Express error in dummy app: \"Can't set headers after they are sent.\" as a result of returning the response object twice.\n"
},
{
"from": "human",
"value": "module.exports = function(app) {\n var express = require('express');\n var accountsRouter = exp... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor the CachedTemplate so that the render method does not have to use 'this'.\n"
},
{
"from": "human",
"value": "(function(Mustache) {\n var CachedTemplate = function(template) {\n this.template = template;\n };\n\n CachedTemplate.prototype = {\... | javascript | chosen |
[
{
"from": "system",
"value": "Add outcommented base URLs for different emulators and backends\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Grab credentials (add this file if missing, as it's ignored by Git)\nconst credentials = require('./credentials.json');\n\nexport const BASE_URL = ... | javascript | chosen |
[
{
"from": "system",
"value": ":one: Use mutliple returns to improve clarity\n"
},
{
"from": "human",
"value": "const OpeningTimes = require('moment-opening-times');\n\nconst timezone = require('../../config/config').timezone;\nconst getOpeningHoursMessage = require('../lib/getOpeningTimesMessage... | javascript | chosen |
[
{
"from": "system",
"value": "Drop a few bytes off the render queue.\n"
},
{
"from": "human",
"value": "import options from './options';\nimport { defer } from './util';\nimport { renderComponent } from './vdom/component';\n\n/** Managed queue of dirty components to be re-rendered */\n\n// items... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Q in the question number.\n"
},
{
"from": "human",
"value": "/**\n * @module Question\n * question text\n **/\n\n// CSS\nimport styles from './style.css';\n\nimport React, { PropTypes } from 'react';\nimport PureComponent from 'react-pure-render/component';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add lameCard() which returns true when both cards are less than 4\n"
},
{
"from": "human",
"value": "var stateProvider = require(\"./stateProvider\");\nmodule.exports = (function(){\n\t//TODO:\n\n\tthis.getBetAmount = function() {\n\t\tvar bet = 500;\n\t\t//get bet ... | javascript | chosen |
[
{
"from": "system",
"value": "Add user read for currencies\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar ObjectId = mongoose.Schema.Types.ObjectId;\n\nvar CurrencySchema = new Schema({\n\tname: String,\n\texchange_rate: N... | javascript | chosen |
[
{
"from": "system",
"value": "Use strict equality for sanitized value comparison\n\nFixes gh-9.\n"
},
{
"from": "human",
"value": "/*\n * Every time the form field is changed, sanitize its contents with the given\n * function to only allow input of a certain form.\n */\n(function ($) {\n 'use... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor test to use new repo api & remove useless test\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar fs = require('fs-extra'),\n path = require('path'),\n exec = require('child_process').exec,\n Repo = require('../lib/common/repo');\n\nvar git_fo... | javascript | chosen |
[
{
"from": "system",
"value": "Change UI component to be independent and use indeces\n\nThis tab nav now has more internal state. Before it required the parent to set\nwhich tab is the current, now the parent only sets a default.\n\nThe other change is that the onChange listener relies an index rather than a... | javascript | chosen |
[
{
"from": "system",
"value": "Add href to the event link\n"
},
{
"from": "human",
"value": "\nv.component['card-slider'] = {\n view: (vnode) =>\n m('.v-slider',\n vnode.attrs.events.map((event) =>\n m('a.mdc-card mdc-card--theme-dark v-card',\n m('section.mdc-card__media... | javascript | chosen |
[
{
"from": "system",
"value": "Add get color method to palette builder\n"
},
{
"from": "human",
"value": "function MonochromaticPaletteBuilder(hue, saturation) {\n this.hue = hue;\n this.saturation = saturation;\n}\n\nMonochromaticPaletteBuilder.prototype.build = function (count, range) {\n if... | javascript | chosen |
[
{
"from": "system",
"value": "Add ADDB API call for drinks quick search\n"
},
{
"from": "human",
"value": "/* @flow */\n'use strict';\n\nconst fetch = require('node-fetch');\nconst logger = require('./logger');\nconst addbLogger = logger.child({ source: 'addb' });\n\nfunction ensureJsonResult(re... | javascript | chosen |
[
{
"from": "system",
"value": "Stop data flowing off graph\n"
},
{
"from": "human",
"value": "const chart = require('ascii-chart');\n\nfunction pointsFromBandwidthData(values, numPoints) {\n\n // Define vars\n const len = values.length;\n const points = [];\n let i = 0;\n let size;\n\n // S... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error on initial startup\n"
},
{
"from": "human",
"value": "/**\n *\n *\n * @author Knut Kohl <github@knutkohl.de>\n * @copyright 2012-2014 Knut Kohl\n * @license MIT License (MIT) http://opensource.org/licenses/MIT\n * @version 1.0.0\n */\nvar PV... | javascript | chosen |
[
{
"from": "system",
"value": "Add activityId to each activity object\n"
},
{
"from": "human",
"value": "Template.activityTable.helpers({\n 'activities': function () {\n // Get reference to template instance\n const instance = Template.instance();\n\n // Get resident activities\n con... | javascript | chosen |
[
{
"from": "system",
"value": "Add decodeWithMetadata function and improve documentation\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar leb = require('leb');\n\n/**\n * Provide operations for serializing/deserializing integer data into\n * variable-length LEB128 integer encoding [1].\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Add UI mock for application dropdown\n"
},
{
"from": "human",
"value": "// React and reactstrap\nimport React, { Component } from 'react';\nimport {\n Collapse,\n Navbar,\n NavbarToggler,\n NavbarBrand,\n Nav,\n NavItem,\n NavLink,\n} from 'reactstrap';\n\n/... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.