conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add an answer for a question\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { DQuestions } from '../../contracts'\n\nclass ShowQuestion extends React.Component {\n\n constructor (props) {\n super(props)\n this.state = { question: '' }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow initializing with custom TomSelect configurations\n"
},
{
"from": "human",
"value": "import { Controller } from \"stimulus\"\nimport TomSelect from \"tom-select\"\n\nexport default class extends Controller {\n static defaults = {\n maxItems: 1,\n maxOpt... | javascript | chosen |
[
{
"from": "system",
"value": "Use PhanomJS instead of Chrome for testing (because: Travis-CI)\n"
},
{
"from": "human",
"value": "// Karma configuration\n// http://karma-runner.github.io/0.10/config/configuration-file.html\n\nmodule.exports = function(config) {\n config.set({\n // base path, ... | javascript | chosen |
[
{
"from": "system",
"value": "Use the dist file when testing with karma\n"
},
{
"from": "human",
"value": "module.exports = function (config) {\n 'use strict';\n config.set({\n basePath: './',\n\n files: [\n {\n pattern: 'dist/peeracle-0.0.1.js',\n included: true\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out nextState to supress warning\n"
},
{
"from": "human",
"value": "const initialState = {\n /* Define your initial state here */\n}\n\nconst <%= reducerName %> = function (state = initialState, action) {\n var nextState = Object.assign({}, state);\n\n sw... | javascript | chosen |
[
{
"from": "system",
"value": "Update tests to use 0.14.0 modules\n"
},
{
"from": "human",
"value": "import React from 'react/addons';\nimport ExecutionEnvironment from 'react/lib/ExecutionEnvironment';\nimport jsdom from 'mocha-jsdom';\nimport expect from 'expect';\nimport Notification from '../... | javascript | chosen |
[
{
"from": "system",
"value": "Disable logging of groups without Turbase ID\n\nThis is run each time someone loads the page which\nmakes up a lot of duplicated messages in Sentry.\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) $year, Den Norske Turistforening (DNT)\n *\n * https://github... | javascript | chosen |
[
{
"from": "system",
"value": "Update paths in CSS build\n"
},
{
"from": "human",
"value": "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\nvar path = require('path');\n\nvar spawn = require('spawn-sync');\n\nvar source = './ipywidgets/st... | javascript | chosen |
[
{
"from": "system",
"value": "Change height of comment box\n"
},
{
"from": "human",
"value": "$(function(){\n\n // initialize tinymce object for posts editor\n tinymce.init({\n selector: '#comment_editor',\n width: 600,\n height: 300,\n menubar: false,\n plugins: [\n 'advli... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken behaviour for Death modality\n"
},
{
"from": "human",
"value": "$(document).ready(function(){\n\n $('#modality-code-select').change(function() {\n\n var selectedModal = $('#modality-code-select option:selected').text();\n\n if(selectedModal === \"D... | javascript | chosen |
[
{
"from": "system",
"value": "Add unique constraint on UserId\n(for SecurityAnswer model)\n"
},
{
"from": "human",
"value": "/* jslint node: true */\n'use strict'\n\nvar insecurity = require('../lib/insecurity')\n\nmodule.exports = function (sequelize, DataTypes) {\n var SecurityAnswer = sequel... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in DataStore test\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar test = require('tape');\nvar DataStore = require('../../lib/data-store/data-store');\n\ntest('----- DataStore', function(t) {\n t.plan(3);\n\n t.test('Saves/Retrieves modules', ... | javascript | chosen |
[
{
"from": "system",
"value": "Make it unnecessary to modify the last assert."
},
{
"from": "human",
"value": "// 52: Generator - Send value to a generator\n// To do: make all tests pass, leave the assert lines unchanged!\n\ndescribe('pass a value to a generator', () => {\n\n it('basics: get the... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak default sorting once more\n\nSort all collections by least recent update. These have been waiting\nfor attention the longest. We initially used least recent response,\nbut the metadata for that doesn't seem to match what you would\nexpect.\n"
},
{
"from": "human",... | javascript | chosen |
[
{
"from": "system",
"value": "Use hard dependency instead of weak dependency\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'vulcan:accounts',\n version: '1.16.3',\n summary: 'Accounts UI for React in Meteor 1.3+',\n git: 'https://github.com/studiointeract/accounts-ui',\n doc... | javascript | chosen |
[
{
"from": "system",
"value": "Append port 80 when a port is not provided\n"
},
{
"from": "human",
"value": "(function() {\n var __WS_send = WebSocket.prototype.send;\n window.__WS_send = WebSocket.prototype.send;\n WebSocket.prototype.send = function(data) {\n console.log(this.ur... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to details for now\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { Link } from 'gatsby'\nimport './footer.css'\n\nconst Footer = () => (\n <div\n style={{\n // position: 'absolute',\n // bottom: '0',\n // left: '0',... | javascript | chosen |
[
{
"from": "system",
"value": "Fix api call: pagesize is now limit\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar RecentLocationsDirective = function (apiService, assetPath, configuration) {\n return {\n restrict: 'A',\n scope: {\n region: '=',\n pa... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor labels viewhelper to the new structure\n"
},
{
"from": "human",
"value": "var Slider = require('./../index');\n\nSlider.prototype.getLabel = function(value) {\n var labels = this.getAttribute('labels');\n\n if(!labels || !labels[value - this.min]) return ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve pagination in block store\n"
},
{
"from": "human",
"value": "function filterBlocks() {\n jQuery('#block-store #block-types').slick('slickFilter', function() {\n var name = $(this).data('block-name');\n var filter = $('#block-store #block-store-filter'... | javascript | chosen |
[
{
"from": "system",
"value": "Add logging for sending issue info to Slack\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst config = require('./config');\nconst JiraTicket = require('./jira-ticket');\nconst JiraBot = require('./jira-bot');\nconst log = require('winston');\n\nlet jiraTick... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug on Normal Textfield\n"
},
{
"from": "human",
"value": "$.fn.mxNormalTextField = function(args) {\n var Defaults = {\n guideText : \"\",\n };\n\n args = $.extend(true, {}, Defaults, args);\n var $element = $(this);\n var $border = $('<di... | javascript | chosen |
[
{
"from": "system",
"value": "Rename files and classes to match\n\nFixes code smells found by SonarCloud.\n"
},
{
"from": "human",
"value": "\n\nimport NucleicItemGroup from './NucleicItemGroup';\n\nfunction NucleicCylindersItemGroup(geoParams, selection, colorer, mode, transforms, polyComplexit... | javascript | chosen |
[
{
"from": "system",
"value": "Isolate template settings from other modules"
},
{
"from": "human",
"value": "'use strict';\n\nvar _ = require('lodash');\n_.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n\nmodule.exports = function() {\n\n var template = ['/**',\n ' * {{ pkg.name }}',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set exit code when configuration is invalid\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar Config = require(\"./config\");\n\nvar config;\n\ntry {\n\tconfig = new Config();\n}\ncatch (error) {\n\tconsole.error(\"Configuration is not valid :\" + error);\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Use more descriptive test constant names\n"
},
{
"from": "human",
"value": "import chai from 'chai';\nimport React from 'react';\nimport {\n findRenderedDOMComponentWithTag,\n renderIntoDocument\n} from 'react-addons-test-utils';\n\nimport ReactSVG from '../src';\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with unknown \"this\"\n"
},
{
"from": "human",
"value": "define([\n 'urlutils',\n '../../components/vue/dist/vue.min'\n], function (urlutils, Vue) {\n 'use strict';\n\n /* Create application_list ViewModel\n (will next be wrapped in a main V... | javascript | chosen |
[
{
"from": "system",
"value": "Allow a path prefix to be added to output\n"
},
{
"from": "human",
"value": "/*\n * grunt-assets-map\n * https://github.com/Peterbyte/grunt-assets-map\n *\n * Copyright (c) 2015 Peter Bouquet\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar fs = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix e.keypress being called when it does not exist\n"
},
{
"from": "human",
"value": "function add_quicksearch(input, result_div, url) {\n input.closest('form').submit(function() {\n result_div.load(url, {quicksearch: input.val()});\n return false;\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow overriding overflow for sticky table"
},
{
"from": "human",
"value": "/* eslint-disable react/prefer-stateless-function */\nimport React from 'react';\nimport { Body as TableBody } from 'reactabular-table';\n\nclass Body extends React.Component {\n constructo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove references to non-existant tests in rocketchat-markdown\n"
},
{
"from": "human",
"value": "Package.describe({\n\tname: 'rocketchat:markdown',\n\tversion: '0.0.1',\n\tsummary: 'Message pre-processor that will process selected markdown notations',\n\tgit: ''\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Fix parsing error in storybook static server\n\n- Added babel-react to parse react component in icon-page example"
},
{
"from": "human",
"value": "module.exports = (baseConfig) => {\n baseConfig.module.rules.push({\n test: /\\.(css|scss)$/,\n loaders: ['style... | javascript | chosen |
[
{
"from": "system",
"value": "Fix rendering an article list\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport ArticleShort from '../articleShort.react';\nimport ArticleStore from '../../stores/ArticleStore';\nimport PageCount from './PageCount.react';\n\nexport default clas... | javascript | chosen |
[
{
"from": "system",
"value": "Add ability to toggle state of all todos\n"
},
{
"from": "human",
"value": "Todos.TodosController = Ember.ArrayController.extend({\n actions: {\n createTodo: function() {\n // Get the todo title set by the \"New Todo\" text field\n var title = this.get... | javascript | chosen |
[
{
"from": "system",
"value": "Disable StatsD if host not defined and log warning\n\nPreviously it defaulted to localhost:8125 and tried to send stats\n"
},
{
"from": "human",
"value": "/*\n ***** BEGIN LICENSE BLOCK *****\n \n Copyright © 2017 Zotero\n https://www.zotero.org\n \n This program is... | javascript | chosen |
[
{
"from": "system",
"value": "Change demo to a size and position demo\n"
},
{
"from": "human",
"value": "var path = require('path');\n\nvar BrowserWindow = require('electron').remote.BrowserWindow;\n\nvar manageWindowBtn = document.getElementById('manage-window');\n\nmanageWindowBtn.addEventList... | javascript | chosen |
[
{
"from": "system",
"value": "Use es6 syntax in get average score function\n"
},
{
"from": "human",
"value": "const colorRanges = {\n 95: 'brightgreen',\n 90: 'green',\n 75: 'yellowgreen',\n 60: 'yellow',\n 40: 'orange',\n 0: 'red',\n};\n\nconst percentageToColor = (percentage) => {\n whi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix possible db crash when running for first time\n"
},
{
"from": "human",
"value": "const Campaign = require('./models').campaign;\n\n\n/**\n * Update statuses to correct the database state after shutdown/crash of the app.\n * Example: if a campaign is sending (sta... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to force set and get itemtype and itemprop values\n"
},
{
"from": "human",
"value": "module.exports = function(bh) {\n bh.utils.itemtype = function(value) {\n this.ctx.attrs = this.ctx.attrs || {};\n this.ctx.attrs.itemscope = true;\n t... | javascript | chosen |
[
{
"from": "system",
"value": "Add back ember-test-utils/reporter since did not address build issue\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n\nmodule.exports = {\n disable_watching: true,\n framework: 'mocha',\n launch_in_ci: [\n 'Chrome',\n 'Firefox'\n ],\n launch_in_... | javascript | chosen |
[
{
"from": "system",
"value": "Add temp button in candidate section\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport './candidatesection.css'\n\nexport default class CandidateSection extends React.Component {\n constructor () {\n super()\n this.state = { data : [] }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add closeBasicModal to CustomerInvoice reducer\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\n/**\n * Method using a factory pattern variant to get a reducer\n * for a particular page or page style.\n *\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Check test logger if this is set\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* eslint no-console: [\"error\", { allow: [\"error\"] }] */\n\n// logger which only logs errors\nmodule.exports = {\n silly() {},\n verbose() {},\n debug() {},\n info() {},\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove state in favor of class variable\n"
},
{
"from": "human",
"value": "const React = require('react');\nconst {\n getFocusableNodesInElement,\n reconcileNodeArrays,\n setNodeAttributes\n} = require('utils/FocusManagement');\n\nmodule.exports = class RestrictF... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Do not check if tile is playable in the action and just dispatch it\"\n\nThis reverts commit 8927a6fafc8bd18798c1195d8a928f3d40cda8ba.\n"
},
{
"from": "human",
"value": "export const PLAY_TILE = 'PLAY_TILE'\n\nexport function playTile(position: number) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a TODO to make a client for my API\n"
},
{
"from": "human",
"value": "import { call, put, takeEvery } from 'redux-saga/effects';\nimport _ from 'lodash';\nimport { sumPlayerRanks } from './utils';\n\nimport {\n PLAYERS_FETCH_REQUESTED,\n PLAYERS_FETCH_SUCCEEDE... | javascript | chosen |
[
{
"from": "system",
"value": "Add date to stop and search\n"
},
{
"from": "human",
"value": "var makeRequest = require('../common/makeRequest');\nvar PATHS = require('../common/paths');\n\n/**\n * Make a request for stop and searches based on a force.\n * @param {string} force - An valid force I... | javascript | chosen |
[
{
"from": "system",
"value": "Add change function for feed select\n"
},
{
"from": "human",
"value": "$(function() {\n setInterval(function () {\n $(\".humantime\").each(function () {\n var $time = $(this);\n\n $.get('/humantime', { stamp: this.dataset.stamp }, fu... | javascript | chosen |
[
{
"from": "system",
"value": "Change Twitter Search to include \"ember-data\" and \"emberjs\"\n"
},
{
"from": "human",
"value": "require('dashboard/core');\n\nDashboard.DataSource = Ember.Object.extend({\n getLatestTweets: function(callback) {\n Ember.$.getJSON('http://search.twitter.c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix instaChop not disabling with devtools\n"
},
{
"from": "human",
"value": "import { seedDrop as seedDropChance } from '../../../game-data/chances';\nimport { tryChance } from '../../../utils';\nimport objectPool from '../../../object-pool';\nimport devtools from '... | javascript | chosen |
[
{
"from": "system",
"value": "Update gate Jenkins endpoints for /v2/ changes\n"
},
{
"from": "human",
"value": "'use strict';\n\nlet angular = require('angular');\n\nmodule.exports = angular.module('spinnaker.core.ci.jenkins.igor.service', [\n require('../../config/settings.js'),\n require('ex... | javascript | chosen |
[
{
"from": "system",
"value": "Trim category description at 200 chars in category combobox\n"
},
{
"from": "human",
"value": "/**\n This view handles rendering of a combobox that can view a category\n\n @class ComboboxViewCategory\n @extends Discourse.ComboboxView\n @namespace Discourse\n @m... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor display options input to receive column size as a prop\n"
},
{
"from": "human",
"value": "import React, {PropTypes} from 'react'\n\nconst DisplayOptionsInput = ({id, name, value, onChange, labelText}) =>\n <div className=\"form-group col-sm-6\">\n <labe... | javascript | chosen |
[
{
"from": "system",
"value": "Add log for force option in buildAddons task\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar path = require('path');\nvar _ = require('underscore');\n\nvar addonsManager = require('../core/cb.addons/manager'); \n\nmodule.exports = function(grunt) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix up some windows menu items"
},
{
"from": "human",
"value": "module.exports = function menu (mainWindow) {\n var otherMenu = [\n {\n label: '&File',\n submenu: [\n {\n label: '&Open',\n accelerator: 'Ctrl+O'\n },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error not thrown on finish\n"
},
{
"from": "human",
"value": "export default ({ xhr, progress, resolve }) => {\n xhr.upload.addEventListener('progress', event => {\n if (!progress) return false;\n progress(Math.round(event.loaded / event.total * 100));\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Prepare branch for section 2.4 tutorial\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\nvar JsonDB = require('node-json-db');\nvar _ = require('lodash');\n\n// Recipes listing\nrouter.get('/', function (req, res,... | javascript | chosen |
[
{
"from": "system",
"value": "Make collab field consts plural and add new constant for RawTripData objects.\n"
},
{
"from": "human",
"value": "/**\n * This file specifies the database collection and field names.\n */\nexport const COLLECTION_TRIPS = 'trips';\nexport const TRIPS_TITLE = 'title';\... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for \"so-and-so claimed an offer\"\n"
},
{
"from": "human",
"value": "jQuery(function() {\n\tsetInterval(function() {\n\t\tjQuery('h6.uiStreamPassive').each(function(){\n\t\t\tvar h6 = jQuery(this);\n\t\t\tvar li = h6.closest('li');\n\t\t\tif (h6.text().... | javascript | chosen |
[
{
"from": "system",
"value": "Change @include settings so that the script is not run on all pages\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name Turn off age gate on Amazon.co.jp\n// @namespace curipha\n// @description Click \"I'm over 18\" automatically\n// @in... | javascript | chosen |
[
{
"from": "system",
"value": "Revert changes to pseudonym service\n\n"
},
{
"from": "human",
"value": "const service = require('feathers-mongoose');\nconst Pseudonym = require('./model');\nconst hooks = require('./hooks');\n\nmodule.exports = function () {\n\tconst app = this;\n\tconst options =... | javascript | chosen |
[
{
"from": "system",
"value": "Add caniuse keys to activation map\n"
},
{
"from": "human",
"value": "// Some features might affect others (eg: var() in a calc()\n// in order to prevent issue, the map contains a sort of dependencies list\n//\n// null == always enable (& no caniuse data)\nexport de... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with amount widget rendering on mobile\n"
},
{
"from": "human",
"value": "$(function () {\n $('.other-amount').focus(function () {\n $(this).prev().prop('checked', true);\n });\n\n $('input[type=radio][name=amount_0]').change(function() {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Debug code for testing message in the client\n"
},
{
"from": "human",
"value": "console.log('Worker loaded');\n\nsocket.on('video-msg', function(msg){\n\n if (msg == 'loading') {\n $.deck('go', 'video-slide');\n }\n\n else if (msg == 'playing') {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Write failing tests for a basic component\n"
},
{
"from": "human",
"value": "var should = require('should');\n"
},
{
"from": "gpt",
"value": "var should = require('should');\nvar request = require('supertest')\n\nvar app = require('../../app/app');\n\nde... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to use indexOf whihc is more commonly available than includes\n"
},
{
"from": "human",
"value": "var Weather = require('../modules/openweathermap');\nvar express = require('express');\nvar util = require('util');\nvar router = express.Router();\n\n\n//new Weathe... | javascript | chosen |
[
{
"from": "system",
"value": "QS-969: Fix missing menu icon in UserPage top left place\n"
},
{
"from": "human",
"value": "import React, { PropTypes, Component } from 'react';\nimport TopLeftIcon from '../ui/TopLeftIcon';\nimport RegularTopTitle from '../ui/RegularTopTitle';\nimport TopRightUserI... | javascript | chosen |
[
{
"from": "system",
"value": "Update getAlerts syntax to ES6\n"
},
{
"from": "human",
"value": "import {proxy} from 'utils/queryUrlGenerator'\n\nexport function getAlerts(source, timeRange) {\n return proxy({\n source,\n query: `SELECT host, value, level, alertName FROM alerts WHERE time ... | javascript | chosen |
[
{
"from": "system",
"value": "Set global.System when loading because of can.import\n"
},
{
"from": "human",
"value": "/* global __dirname */\nvar steal = require(\"steal\").clone();\nvar path = require(\"path\");\n\nsteal.config({\n\tconfig: path.join(__dirname,\"..\",\"..\", \"..\",\"package.js... | javascript | chosen |
[
{
"from": "system",
"value": "Revert to findRecord to avoid leaking user data\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst { inject: { service } } = Ember;\n\nexport default Ember.Service.extend({\n session: service('session'),\n store: service(),\n\n load() {\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Insert elasticsearch data to mongo collection\n"
},
{
"from": "human",
"value": "import { Meteor } from 'meteor/meteor';\n\nimport { esClient } from '/server/elasticsearch';\n\nMeteor.methods({\n getElasticSearchData (params) {\n\n let opts = {\n index: par... | javascript | chosen |
[
{
"from": "system",
"value": "Update the TLDR pages extension because the zip file changed\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2020 Simon Edwards <simon@simonzone.com>\n *\n * This source code is licensed under the MIT license which is detailed in the LICENSE.txt file.\n */\nrequ... | javascript | chosen |
[
{
"from": "system",
"value": "Make the distinction between browser and mobile app when opening a url in the browser\n"
},
{
"from": "human",
"value": "angular.module('pvta.controllers').controller('AboutController', function ($scope, Info) {\n ga('set', 'page', '/about.html');\n ga('send', 'pa... | javascript | chosen |
[
{
"from": "system",
"value": "Remove ios zoom workaround—the bug has been fixed.\n"
},
{
"from": "human",
"value": "/*------------------------------------------------------------------------------\n| common.js\n|\n| Application-wide utilities.\n---------------------------------------------------... | javascript | chosen |
[
{
"from": "system",
"value": "Add mysql database and tables via sequelize\n"
},
{
"from": "human",
"value": "var Bookshelf = require('bookshelf');"
},
{
"from": "gpt",
"value": "// Establish connection with mysql database\n\n/********************\nmake sure to create a local database... | javascript | chosen |
[
{
"from": "system",
"value": "Fix demo for <SplitView> to match prop changes of <ColumnView>\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport SplitView from '@ichef/gypcrete/src/SplitView';\nimport SplitViewColumn from '@ichef/gypcrete/src/SplitViewColumn';\n\nimport Debug... | javascript | chosen |
[
{
"from": "system",
"value": "Remove double import from exports weaver "
},
{
"from": "human",
"value": "\n\nmodule.exports = {\n init: function(lrload) {\n var reactHotApi = require('react-hot-api'),\n makeExportsHot = require('./make-exports-hot')\n\n var makeHot = require('re... | javascript | chosen |
[
{
"from": "system",
"value": "Apply all required parameters to Collection constructor\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar getMethodNames = require('method-names'),\n mongodb = require('mongodb');\n\nfunction getNativeCollectionMethodNames() {\n var dummyNativeDb = { opt... | javascript | chosen |
[
{
"from": "system",
"value": "Include minify-css in build task.\n"
},
{
"from": "human",
"value": "const gulp = require('gulp'),\n babel = require('gulp-babel'),\n cleanCSS = require('gulp-clean-css'),\n standard = require('gulp-standard')\n\ngulp.task('babel', () => {\n gulp.src('s... | javascript | chosen |
[
{
"from": "system",
"value": "Change path of the channel route\n"
},
{
"from": "human",
"value": "define( [ \"Ember\" ], function( Ember ) {\n\n\tvar get = Ember.get;\n\tvar set = Ember.set;\n\n\tvar Router = Ember.Router.extend();\n\n\tRouter.map(function() {\n\n\t\tthis.route( \"index\", { pat... | javascript | chosen |
[
{
"from": "system",
"value": "Allow or deny access to graphql based on JWT\n"
},
{
"from": "human",
"value": "const jwt = require('jsonwebtoken');\nconst AuthPolicy = require('./policy').AuthPolicy;\n\nmodule.exports.authorize = (token, secret, authInfo, cb) => {\n const options = {};\n\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Allow actions with multiple parameters\n\nPass all action parameters on to wrapped action methods\n"
},
{
"from": "human",
"value": "var Dispatcher = require('./Dispatcher');\n\n/**\n * Action class\n */\nclass Action {\n\n /**\n * Constructs an Action object\n ... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Handle IE override of button input type.\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\n\nconst BUTTON_TYPES = {\n PRIMARY: 'primary',\n LINK: 'link'\n};\n\nconst BUTTON_SIZES = {\n SMALL: 'small',\n LARGE: 'large'\n};\n\nfunc... | javascript | chosen |
[
{
"from": "system",
"value": "Use https for kicktraq images\n\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst baseURL = 'http://www.kicktraq.com/projects';\n\nconst charts = [\n 'dailychart',\n 'dailypledges',\n 'dailybackers',\n 'dailycomments',\n 'exp-cone',\n]\n\ne... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path to emial.hbs in second-emial.js\n\nrelated #143\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst handelbars = require('handlebars');\nconst fs = require('fs');\nconst path = require('path');\n\nconst nodemailer = require('nodemailer');\nrequire('en... | javascript | chosen |
[
{
"from": "system",
"value": "Declare with const in unit test\n"
},
{
"from": "human",
"value": "import { test, moduleForComponent } from 'ember-qunit';\nimport Ember from 'ember';\n\nmoduleForComponent('jobs-list', 'JobsListComponent', {\n needs: ['helper:format-duration', 'component:jobs-item... | javascript | chosen |
[
{
"from": "system",
"value": "Use neighbors to perform DFS on undirected graphs\n"
},
{
"from": "human",
"value": "var _ = require(\"../lodash\");\n\nmodule.exports = dfs;\n\n/*\n * A helper that preforms a pre- or post-order traversal on the input graph\n * and returns the nodes in the order th... | javascript | chosen |
[
{
"from": "system",
"value": "Make the rows a little higher to have larger thumbnails to press\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport albums from './all-albums'\nimport Thumbnail from './Thumbnail'\n// import AlbumsHeader from './AlbumsHeader'\n\nclas... | javascript | chosen |
[
{
"from": "system",
"value": "Remove exists() test in login tests\n"
},
{
"from": "human",
"value": "import { test } from 'ember-qunit';\nimport startApp from '../helpers/start-app';\n\nvar App;\n\nmodule('Acceptances - Login page', {\n setup: function(){\n App = startApp();\n },\n teardow... | javascript | chosen |
[
{
"from": "system",
"value": "Use semantic for localhost (needed for tests)\n"
},
{
"from": "human",
"value": "import {computed} from '@ember/object';\nimport Service from '@ember/service';\n\nexport default class Fw extends Service {\n\n @computed()\n get isBs3() {\n return window.location... | javascript | chosen |
[
{
"from": "system",
"value": "REFACTOR: Use the `ScrollTop` mixin instead of custom scrolling code.\n"
},
{
"from": "human",
"value": "/**\n This view handles the rendering of the top lists\n\n @class DiscoveryTopView\n @extends Discourse.View\n @namespace Discourse\n @module Discourse\n**/... | javascript | chosen |
[
{
"from": "system",
"value": "fix(): Check for existence of window object\n\nhttps://github.com/rcdexta/react-trello/issues/15\n"
},
{
"from": "human",
"value": "import React, {Component, PropTypes} from 'react'\nimport BoardContainer from './BoardContainer'\nimport {Provider} from 'react-redux'... | javascript | chosen |
[
{
"from": "system",
"value": "Update location of python file and send messages.\n"
},
{
"from": "human",
"value": "var pyshell = require('python-shell');\n\nmodule.exports = function(RED) {\n function LowerCaseNode(config) {\n RED.nodes.createNode(this,config);\n var node = this... | javascript | chosen |
[
{
"from": "system",
"value": "Read the UTF-16BE/UCS-2 response string\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst net = require('net');\nconst process = require('process');\nconst ProtoDef = require('protodef').ProtoDef;\n\nif (process.argv.length < 4) {\n console.log('Usage: node... | javascript | chosen |
[
{
"from": "system",
"value": "Load fresh data for each request\n"
},
{
"from": "human",
"value": "import {Server} from 'hapi'\nimport inert from 'inert'\nimport getProjects from './app/get-projects'\n\n/**\n * @param {string} configFilename The config filename\n * @param {number} port The port n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix crash when passport is not on the session\n"
},
{
"from": "human",
"value": "/**\n * This is the entrypoint for our application on the server.\n * When the server is started, this code will run.\n */\n\n// Use Babel to provide support for JSX\nrequire('babel-cor... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Vision as it is not needed yet.\n\nRelated #77\n"
},
{
"from": "human",
"value": "const Hapi = require('hapi');\nconst Inert = require('inert');\nconst Vision = require('vision');\nconst Path = require('path');\n\nconst routes = require('./routes');\n\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix small problem in import\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { Provider } from 'react-redux'\nimport { applyMiddleware, combineReducers, createStore } from 'redux';\nimport { reducer as formReducer } from 'redux-form'\nimport { re... | javascript | chosen |
[
{
"from": "system",
"value": "Remove FontFace from main bundle\n"
},
{
"from": "human",
"value": "import FontFace from './style/FontFace';\nimport Keyframes from './style/Keyframes';\nimport prop from './style/prop';\nimport sel from './style/sel';\nimport media from './style/media';\nimport sty... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for Redux devtools\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport {\n BrowserRouter as Router,\n Route,\n Switch\n} from 'react-router-dom';\n\nimport { Provider } from 'react-redux';\nimport... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.