conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make it work with very small values\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\nvar d3 = require('d3');\n\nvar format = {};\n\nformat.formatNumber = function (value, unit) {\n if (!_.isNumber(value) || value === 0) {\n return value;\n }\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add whitespace to export statement\n"
},
{
"from": "human",
"value": "import { Map } from 'immutable';\nimport { Query } from 'sajari';\n\nimport { ChangeEmitter } from '../utils/ChangeEmitter.js';\nimport AppDispatcher from '../dispatcher/AppDispatcher.js';\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "Fix inheritance issue in api resource getters.\n"
},
{
"from": "human",
"value": "const Resource = require('../api_resource').Resource;\n\nclass ContentNodeResource extends Resource {\n constructor(...args) {\n super(...args);\n this._models = {};\n }\n set... | javascript | chosen |
[
{
"from": "system",
"value": "Fix another highlight attempt that is not possible\n"
},
{
"from": "human",
"value": "import { SlidehubPlugin } from '../core/SlidehubPlugin';\nimport { config } from '../config';\nimport { listener } from '../util/passive-event-listener';\n\nexport { Highlighter };... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for automatically changing due dates.\n"
},
{
"from": "human",
"value": "/** Convert a date/time to a nice Date object.\n Example: 2014-08-21 14:38:00 UTC -> [Date object] */\nfunction convert_date_time(date) {\n var arr_date = date.split(' ');\n var iso_da... | javascript | chosen |
[
{
"from": "system",
"value": "Set NODE_ENV correctly in prod to speed up React\n"
},
{
"from": "human",
"value": "import '../rendererEmitter';\nimport './core';\n\nimport SettingsController from '../../main/utils/Settings';\n\nif (process.env['TEST_SPEC']) { // eslint-disable-line\n global.Sett... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for modules without exports\n\nThey are undefined, so the seen[name] test would previously fail.\n"
},
{
"from": "human",
"value": "var define, requireModule, require, requirejs;\n\n(function() {\n var registry = {}, seen = {};\n\n define = function(name, de... | javascript | chosen |
[
{
"from": "system",
"value": "Indent with single multiples of \\parindent\n"
},
{
"from": "human",
"value": "var escape = require('escape-latex');\nvar run = require('./run');\n\nmodule.exports = function(paragraph, numberStyle) {\n var number = paragraph.hasOwnProperty('numbering') ?\n para... | javascript | chosen |
[
{
"from": "system",
"value": "blueprints/instance-initializer-test: Use `options.entity-name` for test description\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst testInfo = require('ember-cli-test-info');\nconst stringUtils = require('ember-cli-string-utils');\n\nconst useTestFramewor... | javascript | chosen |
[
{
"from": "system",
"value": "Validate that translation adds a double escaped \\n\n"
},
{
"from": "human",
"value": "var chai = require('chai');\nvar browserify = require('browserify');\nvar through2 = require('through2');\nvar translate = require('../index');\nvar path = require('path');\n\ncha... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for ignore existing property for object literal completion\n"
},
{
"from": "human",
"value": "// environment=browser\n// environment=jquery\n// plugin=requirejs {\"override\": {\"jquery\": \"=$\"}}\n\nrequirejs([\"foo\", \"bar!abc\", \"useexports\", \"simpl... | javascript | chosen |
[
{
"from": "system",
"value": "Exit process if promise succeeds\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst colors = require('colors')\nconst git = require('nodegit')\nconst exists = require('../lib/etc').isSite\n\nif (!exists()) {\n console.error('No site in here!'.red)\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Add story with \"hidden\" property\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { storiesOf, action } from '@kadira/storybook';\nimport PieChart from '../index.js';\n\nconst dataMock = [\n { value: 10, key: 1, color: 'blue' },\n { value: 1... | javascript | chosen |
[
{
"from": "system",
"value": "Add test case for an original record type\n"
},
{
"from": "human",
"value": "const should = require('should');\nconst getRootType = require('../../').util.getRootType;\nconst core = require('../../').core;\n\ndescribe('getRootType', function () {\n it('should retur... | javascript | chosen |
[
{
"from": "system",
"value": "Copy also the tr from the table template"
},
{
"from": "human",
"value": "function send_ajax(source_url) {\n jQuery(\".link-address\").autocomplete({\n source : function(request, response){\n jQuery.ajax({\n type: \"GET\",\n url: source_url,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Update sensor reading job script\n"
},
{
"from": "human",
"value": "var async = require( \"async\" );\nvar moment = require( \"moment\" );\nvar config = require( \"./lib/configuration\" );\nvar connections = require( \"./lib/connections\" );\nvar models = require( \... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"added validate input to guess()\"\n\nThis reverts commit 5e64781c7b9c83b31b4770341e31a793f1070e8b.\n"
},
{
"from": "human",
"value": "let answer = document.getElementById('answer');\nlet attempt = document.getElementById('attempt');\nlet messageLabel = docu... | javascript | chosen |
[
{
"from": "system",
"value": "test(queryParam/valid): Add tests for queryParam().valid property.\n"
},
{
"from": "human",
"value": "import { describe } from 'ava-spec';\nimport { queryParam } from '../src';\n\ndescribe('query-param =>', (it) => {\n it('is a constructor', async (t) => {\n t.i... | javascript | chosen |
[
{
"from": "system",
"value": "Update the oAuth unit tests\n"
},
{
"from": "human",
"value": "/**\n * Created by austin on 9/22/14.\n */\n\n\n\nvar should = require(\"should\")\n , strava = require(\"../\");\n\nvar _tokenExchangeCode = \"a248c4c5dc49e71336010022efeb3a268594abb7\";\n\ndescribe.... | javascript | chosen |
[
{
"from": "system",
"value": "Enable bluebird longStackTraces in tests\n"
},
{
"from": "human",
"value": "require('mocha-as-promised')();\nrequire('chai')\n .use(require('chai-as-promised'))\n .use(require('sinon-chai'));"
},
{
"from": "gpt",
"value": "require('mocha-as-promised')(... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct Buffer in tests\n\n`new B` instead of `new Buffer`, otherwise browserify will inline the old version in the tests and we won't be testing anything. :)"
},
{
"from": "human",
"value": "var B = require('../').Buffer\nvar test = require('tape')\n\ntest('mod... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for switch selectors\n"
},
{
"from": "human",
"value": "var tape = require(\"tape\")\n\n// var switchesSelectors = require(\"../../lib/switches-selectors.js\")\n\ntape(\"test switchesSelectors\", function(t) {\n t.fail()\n\n t.end()\n})\n"
},
{
"f... | javascript | chosen |
[
{
"from": "system",
"value": "Set start-time for scenes to ’now’ instead of calculating timestamps\n"
},
{
"from": "human",
"value": "// @flow\nimport type { CronJob, Task } from '../../types';\n\nimport shortid from 'shortid';\nimport { format, addSeconds } from 'date-fns';\nimport { assoc, len... | javascript | chosen |
[
{
"from": "system",
"value": "Add emoji worker to seed db with emojis from GHAPI\n"
},
{
"from": "human",
"value": "var request = require('request');\nvar Emoji = require('../../../db/models/Emoji.js');\n\nvar worker = {\n getUrls: function(){\n\n },\n\n getImgData: function(){\n\n },\n\n s... | javascript | chosen |
[
{
"from": "system",
"value": "tests: Fix failing tests for promptOptions\n"
},
{
"from": "human",
"value": "var chai = require('chai');\nvar expect = chai.expect;\n\nvar promptOptionsModule = require('../../bin/promptOptions')();\n\nchai.should();\n\ndescribe('As a user of the promptOptions modu... | javascript | chosen |
[
{
"from": "system",
"value": "Add correct class to select list\n"
},
{
"from": "human",
"value": "import { event } from 'd3-selection';\nimport StaticList from './list-static';\n\nexport default class SelectList extends StaticList {\n constructor() {\n super();\n this._selected = null;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change instance declaration of defaultProps to static\n"
},
{
"from": "human",
"value": "import Component from '../PureRenderComponent.react';\nimport Radium from 'radium';\nimport React from 'react';\nimport RPT from 'prop-types';\nimport * as colors from '../style... | javascript | chosen |
[
{
"from": "system",
"value": "Test to make sure you can return a promise\n"
},
{
"from": "human",
"value": "/* global describe, it */\nimport {expect} from 'chai'\nimport Swimsuit from '../src/swimsuit'\nimport websockets from '../src/feature-tests/websockets'\nimport geolocation from '../src/fe... | javascript | chosen |
[
{
"from": "system",
"value": "Add quotes in `test / __ run __. js`\n\nThis is useful to prevent if the project is placed in a folder with quotes E.g `/ home / user / project's / node-gtk`.\r\n\r\nBy the way ... I skipped this, because I cloned this project in the `/ my-project's /` folder. so I get this err... | javascript | chosen |
[
{
"from": "system",
"value": "Handle invalid components more gracefully\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar m = require(\"mithril\"),\n get = require(\"lodash.get\"),\n\n types = require(\"../types\");\n\nmodule.exports = {\n view : function(ctrl, options) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make map property of ol.MapEvent exportable\n"
},
{
"from": "human",
"value": "goog.provide('ol.MapEvent');\ngoog.provide('ol.MapEventType');\n\ngoog.require('goog.events.Event');\n\n\n/**\n * @enum {string}\n */\nol.MapEventType = {\n /**\n * Triggered after a m... | javascript | chosen |
[
{
"from": "system",
"value": "Update to pull from local data\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc service\n * @name ciscogithubioApp.ProjectSvc\n * @description\n * # ProjectSvc\n * Service in the ciscogithubioApp.\n */\nangular.module('ciscogithubioApp')\n .servic... | javascript | chosen |
[
{
"from": "system",
"value": "Use view_list icon for dashboard\n"
},
{
"from": "human",
"value": "export default class {\n constructor($scope, auth, toast) {\n 'ngInject';\n\n $scope.buttons = [\n {\n name: 'View Code',\n icon: 'code',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Create link to individual posts\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { fetchPosts } from '../actions';\nimport _ from 'lodash';\n\nclass... | javascript | chosen |
[
{
"from": "system",
"value": "Update div property and call infiniteScroll function.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport styled from '@emotion/styled'\n\nimport Thumbnails from './Thumbnails'\n\nconst Container = styled('div')`\n height: 100%;\n overflow-y: auto... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Unified previous track request\n"
},
{
"from": "human",
"value": "export const sendText = ({ value }) => JSON.stringify({\n ID: 'Relmtech.Keyboard',\n Action: 7,\n Request: 7,\n Run: {\n Extras: {\n Values:\n [{ Value: value }]\n },\n Name... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests in Node 4\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst postcss = require('postcss');\nconst test = require('ava');\nconst plugin = require('../');\n\nmodule.exports = function (testGroups) {\n\ttestGroups.forEach((group) => {\n\t\tconst messag... | javascript | chosen |
[
{
"from": "system",
"value": "Disable Vue production tip in tests\n"
},
{
"from": "human",
"value": "import './polyfills/raf'\n\nglobal.normalizeHTMLString = function normalizeHTMLString (string) {\n return string.replace(/\\n\\s*/g, '')\n}\n"
},
{
"from": "gpt",
"value": "import '.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix syntax error in test\n"
},
{
"from": "human",
"value": "require('../test')(\"Last insert id\", function (conn, t) {\n if (conn.adapter == 'postgres') {\n t.skip(\"Last insert ID not supported by postgres\")\n return t.end()\n }\n t.plan(2)\n\n conn.que... | javascript | chosen |
[
{
"from": "system",
"value": "Switch account fix 2 :)\n"
},
{
"from": "human",
"value": "/**\n * Account Switch Controller\n */\n\nangular\n .module('RDash')\n .controller('accountSwitchCtrl', ['$state', '$scope', '$stateParams', 'User', 'notificationService', accountSwitchCtrl]);\n\nfunct... | javascript | chosen |
[
{
"from": "system",
"value": "Fix attachments state update when thesis is saved\n"
},
{
"from": "human",
"value": "const reducer = (state = [], action) => {\n switch (action.type) {\n case 'AGREEMENT_GET_ALL_SUCCESS':\n // Attachments are attachments to agreement, so fetch t... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Fix group by style issue\"\n\nThis reverts commit 4e7f618b9c09d1930cde76dfb08f23174a3edf1b.\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { inject as service } from '@ember/service';\nimport { computed, get, set } from... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the track number for the Track model\n"
},
{
"from": "human",
"value": "define(function(require, exports, module) {\n var uuid = require(\"lib/uuid\");\n\n function Track(options) {\n this.id = options.id || options._id;\n this._id = options.id ||... | javascript | chosen |
[
{
"from": "system",
"value": "Update to new v1 endpoint\n\nWe're moving to a versioned API endpoint. Thanks!"
},
{
"from": "human",
"value": "include(\"shared/request.js\");\ninclude(\"shared/notify.js\");\ninclude(\"shared/cache.js\");\n\nvar API_URL = \"https://domainr.com/api/json/search\";\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make the TPC check CSP-resilient too on Firefox\n"
},
{
"from": "human",
"value": "/* globals self, bufferpm, chrome */\n// buffer-tpc-check.js\n// (c) 2013 Sunil Sadasivan\n// Check if third party cookies are disabled\n//\n\n;(function () {\n\n if (window !== w... | javascript | chosen |
[
{
"from": "system",
"value": "Add cron variable to new saga\n"
},
{
"from": "human",
"value": "import { CronJob } from 'cron'\n\nimport executeReadModelQuery from './execute_read_model_query'\nimport executeViewModelQuery from './execute_view_model_query'\nimport eventStore from './event_store'\... | javascript | chosen |
[
{
"from": "system",
"value": "Write ajax post request for pin form submit\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $(\"#map-placeholder\").on(\"click\", \"#new-gem-button\", function(event){\n event.preventDefault();\n var url = $(event.target).attr('href');\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add chord to the url\n"
},
{
"from": "human",
"value": "define(['jquery',\n 'underscore',\n 'backbone',\n 'noteConverter',\n ], function ($, _, Backbone, NoteConverter) {\n\n var Router = Backbone.Router.extend({\n routes: {\n 'ch... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for no validator case\n"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-qunit';\nimport { find, focus, triggerEvent } from 'ember-native-dom-helpers';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('emb... | javascript | chosen |
[
{
"from": "system",
"value": "Use play scene if no show scene for filtering in admin\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nlet Schedule = require('models/schedule');\n\nmodule.exports = function(router) {\n router.get('/', function (req, res, next) {\n if (!req.filter) ... | javascript | chosen |
[
{
"from": "system",
"value": "Add alternative form to getSession\n"
},
{
"from": "human",
"value": "// Dependencies\nvar request = require('request');\n\n// Includes\nvar _login = require('./util/login.js'),\n getSession = require('./util/getSession.js');\n\n// Vars\nvar _jar = request.jar(); /... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a small bug in flatenArrs\n"
},
{
"from": "human",
"value": "setParams = function setParams (params, obj) {\n obj = obj || {}\n obj.req = Meteor.isServer ? params[0] || params.req : {}\n obj.res = Meteor.isServer ? params[1] || params.res : {}\n obj.next = M... | javascript | chosen |
[
{
"from": "system",
"value": "Define type of `props.tag` as a string\n"
},
{
"from": "human",
"value": "import React from \"react\";\n\nexport default class ResponsiveComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = { canRender: false };\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove \".label\" from optional field\n\n'fv-word:part_of_speech'"
},
{
"from": "human",
"value": "// TODO: IMPORT ONLY WHAT IS USED\nimport * as yup from 'yup'\n\nimport copy from './internationalization'\n\nconst validForm = yup.object().shape({\n 'dc:title': yup... | javascript | chosen |
[
{
"from": "system",
"value": "Add payments and insurance to modules reducer\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport { UIDatabase } from '../database';\nimport { SETTINGS_KEYS } from '../settings';\nimport { SYNC_TRANSACTIO... | javascript | chosen |
[
{
"from": "system",
"value": "Change wording on warning for accuracy\n"
},
{
"from": "human",
"value": "var pingPongType = function(i) {\n if ((i % 5 === 0) || (i % 3 === 0) || (i % 15 === 0)) {\n if (i % 15 === 0) {\n return \"pingpong\";\n } else if (i % 5 === 0) {\n retur... | javascript | chosen |
[
{
"from": "system",
"value": "Remove skippable key in local storage on reset\n"
},
{
"from": "human",
"value": "// @flow\nimport UserState from './UserState';\nimport Raven from 'raven-js';\nimport storageService from '../storageService';\n\nclass UserStateService {\n\n userState: UserState;\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix - remove route check to initiative\n"
},
{
"from": "human",
"value": "Router.configure({\n layoutTemplate: '_layout',\n loadingTemplate: '_loading',\n progressDelay: 100,\n progressSpinner: false\n});\n\n\n//From what I can tell this has been depreciated\n//... | javascript | chosen |
[
{
"from": "system",
"value": "Update to use Turbolinks events"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $(\"#create_filter\").on(\"click\", function(ev) {\n var checkboxes = $(\"input[type=checkbox]\");\n var bits = new Array(checkboxes.length);\n\n $.... | javascript | chosen |
[
{
"from": "system",
"value": "FIX a warning in polymer storybook\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nmodule.exports = (storybookBaseConfig, configType, defaultConfig) => {\n defaultConfig.module.rules.push({\n test: [/\\.stories\\.js$/, /index\\.js$/],\n lo... | javascript | chosen |
[
{
"from": "system",
"value": "Stop using ES6 due to PhantomJS issues\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default function() {\n Ember.Test.registerAsyncHelper('select', function(app, selector, text) {\n const $el = app.testHelpers.findWithAssert(`${selecto... | javascript | chosen |
[
{
"from": "system",
"value": "Add autocomplete search with lastFM\n\n"
},
{
"from": "human",
"value": "/**\n * Created by sylva on 30/05/2017.\n */\n\n"
},
{
"from": "gpt",
"value": "/**\n * Created by sylva on 30/05/2017.\n */\n\n$(document).ready(function () {\n $('#lastFMSearch... | javascript | chosen |
[
{
"from": "system",
"value": "Fix indentation in entry file\n"
},
{
"from": "human",
"value": "var fs = require('fs'),\n\ttasks = fs.readdirSync('./gulp/tasks'),\n\tgulp = require('gulp');\n\ntasks.forEach(function(task) {\n\trequire('./tasks/' + task);\n});\n"
},
{
"from": "gpt",
"v... | javascript | chosen |
[
{
"from": "system",
"value": "Make autosuggest getSuggestionalValue with 'id' style default\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Autosuggest from 'react-autosuggest'\n\nimport style from './bpk-autosuggest.scss'\n\nconst defaultTheme = {\n container: '... | javascript | chosen |
[
{
"from": "system",
"value": "Initialize the checkout when the order is loaded\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport layout from '../templates/components/yebo-checkout';\n/**\n A single page checkout that reactively responds to changes in the\n `yebo.checkouts` ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace 'memberId' according to current accessToken, avoid user change it in client.\n"
},
{
"from": "human",
"value": "/**\n * For each our own defined models, handle 'created' and 'lastUpdated' automatically.\n * Refer to: http://docs.strongloop.com/display/public... | javascript | chosen |
[
{
"from": "system",
"value": "[Create/Modif] Add a top margin on the sticky block\n"
},
{
"from": "human",
"value": "$(function() {\n CKEDITOR.replace('description');\n\n /**\n * Make the sidebar sticky\n */\n var $sticky = $('.sticky');\n\n if (!!$sticky.offset()) { // Execute all this o... | javascript | chosen |
[
{
"from": "system",
"value": "Change to _.each that is awesome!!!.\n"
},
{
"from": "human",
"value": "define([\n 'underscore',\n 'views/proto/paged-collection',\n 'views/event/box',\n 'text!templates/event-collection.html'\n], function (_, PagedCollection, EventBox, html) {\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Disable ESLint rules conflicting with Prettier\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: ['airbnb-base', 'plugin:flowtype/recommended'],\n plugins: ['flowtype'],\n env: { es6: true, jest: true, node: true },\n // globals: { Generator: true... | javascript | chosen |
[
{
"from": "system",
"value": "Remove notify from google drive fangorn [skip ci]\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar m = require('mithril');\nvar Fangorn = require('js/fangorn');\n\nfunction _fangornLazyLoadError(item) {\n item.notify.update('Google Drive couldn\\'t load, p... | javascript | chosen |
[
{
"from": "system",
"value": ":bug: Fix Sass syntax final newline rule bug\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar helpers = require('../helpers'),\n os = require('os');\n\nmodule.exports = {\n 'name': 'final-newline',\n 'defaults': {\n 'include': true\n },\n 'detect': ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle case where config was not created by generator\n\nIf hof.settings.json does not exists, it is likely because the top level app was created manually, not using hof-generator. Deal with that, but provide advice about manually adding route.\n"
},
{
"from": "human",
... | javascript | chosen |
[
{
"from": "system",
"value": "Add internal API point for picking terrain points\n\nBuddy: Ian\n"
},
{
"from": "human",
"value": "var emscriptenMemory = require(\"./emscripten_memory\");\nvar space = require(\"../../public/space\");\n\nfunction EmscriptenSpacesApi(apiPointer, cwrap) {\n\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bad formatting for string messages\n"
},
{
"from": "human",
"value": "module.exports.in = function(_msg) {\n if (_msg.properties.contentType === 'application/json') {\n try {\n return JSON.parse(_msg.content.toString());\n } catch(e) {}\n }\n\n re... | javascript | chosen |
[
{
"from": "system",
"value": "Delete useless configs. Replace module section. Added devtool\n"
},
{
"from": "human",
"value": "const rules = require(\"./rules\");\nconst webpack = require(\"webpack\");\nconst HtmlWebpackPlugin = require(\"html-webpack-plugin\");\nconst CleanWebpackPlugin = requi... | javascript | chosen |
[
{
"from": "system",
"value": "Configure the table component for the widgets listing\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Table } from 'components';\n\nfunction WidgetsPage(props) {\n return (\n <div className=\"l-page-li... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor oboe provider. Fix syntax issues.\n"
},
{
"from": "human",
"value": "angular.module('ng-oboe', [])\n\t.provider('oboe', function () {\n\t\t// TODO: Add defaults.\n\n\t\tvar oboe = function () {\n\t\t\tvar configDefaults = {\n\t\t\t\turl: ''\n\t\t\t\tmethod:... | javascript | chosen |
[
{
"from": "system",
"value": "Update guests table migation to use varchars.\n"
},
{
"from": "human",
"value": "var dbm = require('db-migrate'),\n type = dbm.dataType;\n\nexports.up = function (db, callback) {\n db.createTable('guests', {\n columns: {\n id: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use miqStaticAssets.miqSelect in alerts center angular module\n"
},
{
"from": "human",
"value": "miqHttpInject(angular.module('alertsCenter', [\n 'ui.bootstrap',\n 'patternfly',\n 'miq.util',\n 'miq.api'\n]));\n"
},
{
"from": "gpt",
"value": "miqHttp... | javascript | chosen |
[
{
"from": "system",
"value": "Write what happens when we are searching for doesn't match the character in the string being looked at\n"
},
{
"from": "human",
"value": "function compressStr(str) {\n\tvar output = \"\", // will return this variable as final compressed string\n\t\tcurrChar = \"\", ... | javascript | chosen |
[
{
"from": "system",
"value": "Add selector properties to Backbone question view initialization and write function for ajax submission of model\n"
},
{
"from": "human",
"value": "app = app || {};\n\napp.QuestionView = Backbone.View.extend({\n\n events: {\n 'submit .question_form': 'submitQues... | javascript | chosen |
[
{
"from": "system",
"value": "Remove temp files on errors\n"
},
{
"from": "human",
"value": "var exec = require('child_process').exec;\nvar fs = require('fs');\nvar temp = require('temp');\n\nmodule.exports = function (options, data, key, callback) {\n var tmpFile = temp.path();\n var cmdl... | javascript | chosen |
[
{
"from": "system",
"value": "Terminate the interactive prompt upon completion\n"
},
{
"from": "human",
"value": "import path from 'path';\n\nimport {assign} from 'bound-native-methods/object';\nimport Vorpal from 'vorpal';\nimport JSONFilePlus from 'json-file-plus';\n\nconst cli = Vorpal();\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Convert ES6 string templates to ordinary + expressions because of Uglify\n"
},
{
"from": "human",
"value": "const defaultPort = 3001\nconst defaultHost = 'localhost'\nconst httpURL = `http://${defaultHost}:${defaultPort}`\nconst wsURL = `ws://${defaultHost}:${defaul... | javascript | chosen |
[
{
"from": "system",
"value": "Make the question more clear (for composition)\n\nWhen the generator is being composed, people using the other generator might not be aware of its presence, so it's unclear what \"Choose your style of DSL\" refers to.\r\n\r\nRef. yeoman/generator-webapp#545.\r\nRef. yeoman/gene... | javascript | chosen |
[
{
"from": "system",
"value": "Add auto abuse reports after multiple downvotes\n"
},
{
"from": "human",
"value": "// Abuse reports\n//\n'use strict';\n\n\nconst Mongoose = require('mongoose');\nconst Schema = Mongoose.Schema;\n\n\nmodule.exports = function (N, collectionName) {\n\n let AbuseRe... | javascript | chosen |
[
{
"from": "system",
"value": "Add message about problems while saving message\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Module dependencies.\n */\nvar _ = require('lodash'),\n\terrorHandler = require('../errors.server.controller'),\n\tmongoose = require('mongoose'),\n\tpassport... | javascript | chosen |
[
{
"from": "system",
"value": "Convert Non-strict to strict equality checking\nConvert non-strict equality checking, using `==`, to the strict version, using `===`."
},
{
"from": "human",
"value": "var command = {\n command: \"console\",\n description:\n \"Run a console with contract abstrac... | javascript | chosen |
[
{
"from": "system",
"value": "Add new resource URL to whitelist\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar morphopedia = angular.module( 'morphopedia',\n[\n\t'ngResource',\n\n\t'matchMedia',\n\n\t'angular-preload-image',\n\n\t'leaflet-directive',\n\n\t'angular.filter',\n\n\t'root',\... | javascript | chosen |
[
{
"from": "system",
"value": "Add \"nice\" error pages for SSaaS failures\n\nSSaaS now returns errors with appropriate status codes when requesting a page to screenshot fails. We can use these to render nice errors in spotlight when following broken PNG links.\n"
},
{
"from": "human",
"value": "... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests for relocated source files.\n"
},
{
"from": "human",
"value": "var smash = require(\"smash\"),\n d3 = require(\"d3\");\n\nmodule.exports = function() {\n var files = [].slice.call(arguments),\n sandbox = {d3: d3};\n files.unshift(\"start\");\n f... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up runloop now that it's always on\n"
},
{
"from": "human",
"value": "import {\n TICK,\n} from './ActionTypes';\n\nclass RunLoop {\n constructor() {\n this.store = null;\n this._listeners = [];\n\n let prev = Date.now();\n\n let runLoop = () => {... | javascript | chosen |
[
{
"from": "system",
"value": "Add more to the test data set\n"
},
{
"from": "human",
"value": "var Limit = require('../../ratelimiter/limit');\n\nvar l1 = new Limit(\"{sourceName}:global:daily\", 86400, 4000);\nvar l2 = new Limit(\"{sourceName}:global:hourly\", 3600, 2000);\nvar l3 = new Limit(\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in project-specific backbone model mixin\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar _ = require('underscore')\n , Project = require('./project')\n\n/*\n * Mixin for models which require a project to be set.\n *\n * Looks for attribute, collec... | javascript | chosen |
[
{
"from": "system",
"value": "Remove permission check on backend\n"
},
{
"from": "human",
"value": "var flash = require('connect-flash');\n\nmodule.exports = function (app, security) {\n var isAuthenticated = security.middleware.isAuthenticated({redirect:'/backend/login'});\n var hasPermis... | javascript | chosen |
[
{
"from": "system",
"value": "Handle the case where we deploy to Heroku.\n"
},
{
"from": "human",
"value": "var path = require('path'),\n rootPath = path.normalize(__dirname + '/..');\n\nvar dotenv = require('dotenv').config({path: rootPath + '/.env'});\n\nvar config = {\n root: rootPath,\... | javascript | chosen |
[
{
"from": "system",
"value": "Enable colorization and pretty printing be default\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst winston = require('winston');\n\n// Setup winston default instance\nconst LOGGER_LEVEL = process.env.LOGGER_LEVEL || 'info';\nconst LOGGER_TIMESTAMP = !(proc... | javascript | chosen |
[
{
"from": "system",
"value": "Fix double rendering of headerView on front page\n"
},
{
"from": "human",
"value": "imagespace.views.FrontPageView = girder.views.FrontPageView.extend({\n initialize: function () {\n girder.cancelRestRequests('fetch');\n this.render();\n },\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify custom lat lon input\n"
},
{
"from": "human",
"value": "import React, {PropTypes} from 'react'\nimport ObjectContainer from '../../../src/state/ObjectContainer'\nimport Field from '../../../src/Field'\nimport Fieldset from '../../../src/Fieldset'\n\n\nexpor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing argument from catch and globalize Minimitter.\n"
},
{
"from": "human",
"value": "var Minimitter = function Minimitter() {\n listeners = {};\n};\n\nMinimitter.prototype.on = function(name, callback) {\n this.listeners[name] = this.listeners[name] || [];... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.