conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Stop jumping to the top of the page.\n"
},
{
"from": "human",
"value": "(function($) {\n var _addToggleLink = function(contentSelector) {\n var section = $(this);\n var content = $(contentSelector, section);\n\n content.hide();\n var toggleLink = $.a(\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to change string to upper camel case\n"
},
{
"from": "human",
"value": "define(function (require, exports, module) {\n 'use strict';\n\n function CodeWriter(indentString) {\n this.lines = [];\n this.indentString = (indentString ? indentString : ... | javascript | chosen |
[
{
"from": "system",
"value": "Update Turkish translation by Goktug Ozturk\n"
},
{
"from": "human",
"value": "/* Turkish translation for the jQuery Timepicker Addon */\n/* Written by Fehmi Can Saglam */\n(function($) {\n\t$.timepicker.regional['tr'] = {\n\t\ttimeOnlyTitle: 'Zaman Seçiniz',\n\t\tt... | javascript | chosen |
[
{
"from": "system",
"value": "Add string as a possible prop type\n"
},
{
"from": "human",
"value": "import React, { Fragment, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nclass Link extends PureComponent {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change location of lower case conversion to fix issue.\n"
},
{
"from": "human",
"value": "Template.foundbill.created = function(){\n Meteor.subscribe(\"allbills\");\n Session.set('message', '');\n};\n\nTemplate.foundbill.events({\n \"submit form\": function(e){\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug calling v5 LTS.\n\nCloses #298\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst semver = require('semver')\n\nexports.stable = (versions) => {\n const matched = versions.find((version) => typeof version.lts === 'undefined').version\n return semver.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix filtering for item objects\n\nThis class expects items to be strings by default. In our case, we are\ngiving it objects, so we need to tell it what key to use when filtering.\n\nI wasn't entirely sure if displayName is what we want here, but it seems\nfine so I went with it... | javascript | chosen |
[
{
"from": "system",
"value": "Disable fuzzy output in po2json for disco\n"
},
{
"from": "human",
"value": "/*\n * This is the default (production) config for the discovery pane app.\n */\n\nconst amoCDN = 'https://addons.cdn.mozilla.net';\nconst staticHost = 'https://addons-discovery.cdn.mozilla... | javascript | chosen |
[
{
"from": "system",
"value": "Change map from var to let\n"
},
{
"from": "human",
"value": "var map;\nfunction initMap() {\n map = new google.maps.Map(document.getElementById(\"map\"), {\n center: { lat: 32.819595, lng: -96.945419},\n zoom: 10\n });\n}"
},
{
"from": "... | javascript | chosen |
[
{
"from": "system",
"value": "Refactoring: Replace single quotes -> double quotes\n"
},
{
"from": "human",
"value": "module.exports = [\n {\n test: /\\.ts(x?)$/,\n loader: 'ts-loader'\n }, {\n test: /\\.css$/,\n loader: 'style-loader!css-loader'\n }, {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change router mode to 'history'\n"
},
{
"from": "human",
"value": "import Vue from 'vue';\nimport Router from 'vue-router';\nimport Home from '@/pages/Home';\nimport Blog from '@/pages/Blog';\nimport Page from '@/pages/Page';\n\nVue.use(Router);\n\nexport default ne... | javascript | chosen |
[
{
"from": "system",
"value": "Put server process.env.NODE_ENV check back\n\nWhen you deploy app to Heroku, and you forget to set NODE_ENV\nenvironment variable, this will warn you. Of course you have to set to\nproduction on Heroku.\n"
},
{
"from": "human",
"value": "require('babel-register');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reverse date range migration for Mongo 3.2\n"
},
{
"from": "human",
"value": "/**\n * Swap reversed DateRange values\n */\n\nvar updated = 0;\n\n// Match all Dataset having temporal_coverage.start > temporal_coverage.end\nconst pipeline = [\n {$project: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lp:1302500 by evaluating an empty context to avoid error\n"
},
{
"from": "human",
"value": "openerp.web_context_tunnel = function(instance) {\n\n instance.web.form.FormWidget.prototype.build_context = function() {\n var v_context = false;\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Exit /search if no area of interest\n\nPreviously we would query APIs with the bounding box of the\nentire map in view. Now as we prepare to switch to searching\nfor the area of interest only, we disable being able to come\nto this page without an area of interest drawn already... | javascript | chosen |
[
{
"from": "system",
"value": "Fix logic and show proper error\n"
},
{
"from": "human",
"value": "\nStirrup.prototype.buildStaticFunctions = function(constructor) {\n var staticFuncs = this.getConfig().staticFuncs;\n for(var i = 0, len = staticFuncs.length; i < len; i++) {\n var def = static... | javascript | chosen |
[
{
"from": "system",
"value": "Remove (hopefully final) references to browserifyable-paper\n"
},
{
"from": "human",
"value": "var angular = require('angular');\nvar Board = require('../../../../src/HexBoard.js'); //\nvar paper = require('browserifyable-paper');\nmodule.exports = angular.module( '... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"client side redirect for unauth user\"\n\nThis reverts commit 8577dc1dd2675aa06538954d299d1a47a40f9174.\n"
},
{
"from": "human",
"value": "\n\npjax_config_page(\"profit_table\", function(){\n return {\n onLoad: function() {\n if (!getCo... | javascript | chosen |
[
{
"from": "system",
"value": "Update path to convert template\n"
},
{
"from": "human",
"value": "var Hogan = require('hogan.js'),\n fs = require('fs'),\n path = require('path'),\n govukDir = path.normalize(__dirname + '/../govuk_modules'),\n govukConfig = require(__dirname + '/templa... | javascript | chosen |
[
{
"from": "system",
"value": "[fix] Enable save button if custom and not in developer mode\n"
},
{
"from": "human",
"value": "// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n// MIT License. See license.txt\n\nfrappe.require('assets/frappe/js/lib/jscolor/jscolor.js');\n\nfr... | javascript | chosen |
[
{
"from": "system",
"value": "Use simpler close button logic\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { FaTimes } from 'react-icons/fa';\nimport './CloseButton.css';\n\nexport default (\n <button\n className=\"close\"\n onClick={() => {\n // eslint-disabl... | javascript | chosen |
[
{
"from": "system",
"value": "Use view.$ instead of view.$el.find\n"
},
{
"from": "human",
"value": "define([\n 'base/view',\n 'modules/user/userDetailView',\n 'hgn!modules/user/user',\n 'component/eventBus'\n], function(View, UserDetailView, userTemplate, events) {\n\n var UserVi... | javascript | chosen |
[
{
"from": "system",
"value": "Replace `unshift()` with `push()` plus `reverse()`\n\nAs predicted, this is faster. Not sure if as fast as what I had before.\nWill do actual profiling and revert to prior state if it ends up being\nbetter.\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2003-p... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path to navigation component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport Link from 'gatsby-link';\nimport Helmet from 'react-helmet';\nimport { rhythm } from '../utils/typography';\nimport Navigation... | javascript | chosen |
[
{
"from": "system",
"value": "[display] Rewrite component and pass all props to the children.\n"
},
{
"from": "human",
"value": "//Dependencies.\nvar builder = require('focus').component.builder;\nvar React = require('react');\nvar type = require('focus').component.types;\n\n/**\n * Input text m... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug when no DI for methods is used\n"
},
{
"from": "human",
"value": "(function (ng) {\n 'use strict';\n\n /**\n * Angular.js utility for cleaner dependency injection.\n */\n var $inject = function (cls, self, args) {\n var i;\n var key;\n var st... | javascript | chosen |
[
{
"from": "system",
"value": "Fix file-loader exclusion in react-app-rewire-less\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst { getLoader } = require('react-app-rewired');\n\nfunction createRewireLess(lessLoaderOptions = {}) {\n return function(config, env) {\n con... | javascript | chosen |
[
{
"from": "system",
"value": "Test Extended Euclidean: Add more test cases\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\nconst extendedEuclidean = require('../../../src').algorithms.math.extendedEuclidean;\n\nconst assert = require('assert');\n\ndescribe('Extended Euclidean', () => ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the error when there's no thumbnail available\n\nIn case the API returns null for the thumbnail, a dummy image is set as\nthe thumbnail prop\n"
},
{
"from": "human",
"value": "var React = require('react');\n\nvar Character = React.createClass({\n getThumbnail: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix CSP failures in FastBoot tests\n\nThis was caused by several facts:\n* `ember-a11y-testing` adds two styles tags with inline content\n* `ember-cli-fastboot-testing` parses the FastBoot rendered HTML string here: https://github.com/embermap/ember-cli-fastboot-testing/blob/47... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak sortable selector for sortable tests\n"
},
{
"from": "human",
"value": "/*jshint multistr: true, unused: false*/\n\n'use strict';\n\nvar $ = require('jquery'),\n PulsarSortableComponent = require('../../../js/PulsarSortableComponent');\n\n$.fx.off = !$.fx.o... | javascript | chosen |
[
{
"from": "system",
"value": "Change the colours of the 'A' and 'G' to make them slightly darker and them more consistent with the colours of the genotypes on the website\n"
},
{
"from": "human",
"value": "// $Revision$\n\nEnsembl.Panel.PopulationGraph = Ensembl.Panel.Piechart.extend({\n init: ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable metadata tool until ready.\n"
},
{
"from": "human",
"value": "var CoreModule = require(\"substance/writer\").CoreModule;\n\nvar ArchivistModule = require(\"./archivist\");\nvar SubjectsModule = require(\"./subjects\");\nvar EntitiesModule = require(\"./entit... | javascript | chosen |
[
{
"from": "system",
"value": "Update `istanbul` to report on `untested` code\n"
},
{
"from": "human",
"value": "'use strict';\n/*global jasmine:true */\n\nvar\n clean = require('./lib/clean'),\n middle = require('@whitneyit/middle'),\n\n gulp = require('gulp'),\n eslint = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add gulp-watch ability to auto build\n\nThis way we don't forget to build as it will just watch the files and\nbuild when I change any file in helmsman\n"
},
{
"from": "human",
"value": "// Include gulp\nvar gulp = require('gulp');\n\n// Include plugins\nvar concat ... | javascript | chosen |
[
{
"from": "system",
"value": "Update trace function to template string.\n"
},
{
"from": "human",
"value": " /* exported trace */\n\n// Logging utility function.\nfunction trace(arg) {\n var now = (window.performance.now() / 1000).toFixed(3);\n console.log(now + ': ', arg);\n}\n"
},
{
"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Firefox 18.0.2 complaining about a missing parameter for a setter\n"
},
{
"from": "human",
"value": "//.CommonJS\nvar CSSOM = {};\n///CommonJS\n\n\n/**\n * @constructor\n * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSValue\n *\n * TODO: add if ne... | javascript | chosen |
[
{
"from": "system",
"value": "Remove listener on component unmount\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport LoadingSpinner from './LoadingSpinner';\n\nclass IFrame extends React.Component {\n constructor() {\n super();\n this.state = {\n loaded: false,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure to support new linter\n"
},
{
"from": "human",
"value": "// @flow\n\nimport pushUniqueVariable from '../helpers/pushUniqueVariable'\n\ntype Context = {\n [number]: Array<VariableName>,\n}\n\nfunction getVariablesInContext(context: Context, column: number)... | javascript | chosen |
[
{
"from": "system",
"value": "Support set anchor to header\n"
},
{
"from": "human",
"value": "var marked = require('marked');\nvar fs = require('fs');\n\nvar markedRenderer = new marked.Renderer();\n\nmarked.setOptions({\n renderer: markedRenderer,\n gfm: true,\n tables: true,\n brea... | javascript | chosen |
[
{
"from": "system",
"value": "Document the membershipFinder mongoose plugin\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction membershipFinder(schema, options) {\n schema.pre('init', function(next, data) {\n var queries = [];\n var query = {};\n query[options.field] = data... | javascript | chosen |
[
{
"from": "system",
"value": "Disable button if name & pattern are empty; prettify\n"
},
{
"from": "human",
"value": "import m from 'mithril';\n\nexport const Col = (el) => m('div.col', [el])\n\nexport class NewOptionForm {\n\toninit(vnode) {\n\t\tvnode.state.newOption = {\n\t\t\tname: '',\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with messages not showing up for the user that sends the message\n"
},
{
"from": "human",
"value": "// require('./Pad.js')\n\nfunction DrawingAppCtrl($scope, socket, drawingPad) {\n console.log(\"starting\");\n $socket = socket;\n $scope.message;\n $scop... | javascript | chosen |
[
{
"from": "system",
"value": "[refactor]: Write updateUser and deleteUser as one route\n"
},
{
"from": "human",
"value": "import express from 'express';\nimport UserController from '../controllers/UserController';\n\nconst userRouter = express.Router();\nuserRouter.post('/api/user/signup', UserC... | javascript | chosen |
[
{
"from": "system",
"value": "Update test results for js\n"
},
{
"from": "human",
"value": "/* Generated with Sango, by Afero.io */\n\nvar Sango = {\n VERSION = \"Sango © 2016,2017 Afero, Inc - Build 223\";\n}\n\nmodule.exports = Sango;\n"
},
{
"from": "gpt",
"value": "/* Generated... | javascript | chosen |
[
{
"from": "system",
"value": "Replace kwfLocal, begin with lower-case letter\n\nIn order to target classes generated by a react application from component.scss,\nthe class name needs to start with a lower-case letter. kwcClass and kwcBem\nstart with lower-case letter as well.\n"
},
{
"from": "human"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error in cachebuster for workspace show sidebar\n"
},
{
"from": "human",
"value": "chorus.views.WorkspaceShowSidebar = chorus.views.Sidebar.extend({\n constructorName: \"WorkspaceShowSidebarView\",\n className:\"workspace_show_sidebar\",\n\n subviews: {... | javascript | chosen |
[
{
"from": "system",
"value": "Test the single filter view\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst expect = require('chai').expect;\nconst jsdomify = require('jsdomify').default;\n\nconst Controller = require('../source/components/filter/filter.controller.js');\n\ndescribe('For ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable source maps in default Babel transform\n"
},
{
"from": "human",
"value": "var module_ = require(\"module\")\nvar babel\n\nexports.init = function(path) {\n var dummyMod = {\n id: path,\n paths: module_._nodeModulePaths(path).concat(module_.globalPaths)... | javascript | chosen |
[
{
"from": "system",
"value": "Add CSP to make console less noisy during testing\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: '... | javascript | chosen |
[
{
"from": "system",
"value": "Change to use src js files directly in node test\n"
},
{
"from": "human",
"value": "/**\n * Created by ginger on 2017/10/29.\n */\n\nvar Kekule = require('../../dist/kekule.js').Kekule;\n\n// Create a simple CO2 molecule\nvar mol = new Kekule.Molecule();\nvar atomC ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix of the terminal parser functions passed without context\n"
},
{
"from": "human",
"value": "import {\n TerminalRuntimeError,\n TerminalParsingError,\n} from './TerminalErrors';\n\nconst errorHandler = (rsp) => {\n throw new TerminalRuntimeError(rsp);\n};\n\nco... | javascript | chosen |
[
{
"from": "system",
"value": "Fix 'onKeyDown', 'onKeyPress' and 'onKeyUp' callback name\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) 2017-present, Raphael Amorim.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this so... | javascript | chosen |
[
{
"from": "system",
"value": "Add a broader set of events for inline event handler rewrite function\n"
},
{
"from": "human",
"value": "\n// Rewrite in-line event handlers (eg. <input ... onclick=\"\"> for a sub-set of common standard events)\n\ndocument.addEventListener('DOMContentLoaded', funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for reset flag\n"
},
{
"from": "human",
"value": "/** @babel */\n\nimport helpers from './spec-helpers'\nimport MarkerManager from '../lib/marker-manager'\n\ndescribe('MarkerManager', () => {\n beforeEach(() => {\n waitsForPromise(() => {\n return ... | javascript | chosen |
[
{
"from": "system",
"value": "Rename spinner operations to the right name\n"
},
{
"from": "human",
"value": "var Spinner = require('./../index');\n\nSpinner.prototype.show = function() {\n this.model.set('spinning', true);\n};\n\nSpinner.prototype.hide = function() {\n this.model.set('spinning... | javascript | chosen |
[
{
"from": "system",
"value": "Add uid and another URL property.\n\nSigned-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@stormz.me>\n"
},
{
"from": "human",
"value": "var icalendar = require('icalendar');\n\nexports.generateIcal = function(boards) {\n var ical = new icalen... | javascript | chosen |
[
{
"from": "system",
"value": "Revert back not replacing content for general likes directive\n"
},
{
"from": "human",
"value": "angular.module('codebrag.commits')\n\n .directive('generalLikes', function (authService) {\n\n return {\n restrict: 'E',\n replace: true,... | javascript | chosen |
[
{
"from": "system",
"value": "Set breaks off by default\n"
},
{
"from": "human",
"value": "// Default options\n\n'use strict';\n\n\nmodule.exports = {\n html: false,\n xhtml: false,\n breaks: true,\n langprefix: 'language-'\n};\n"
},
{
"from": "gpt",
"value": "// Default options\... | javascript | chosen |
[
{
"from": "system",
"value": "Add yahoo bot user agent\n"
},
{
"from": "human",
"value": "/**\n * Expose\n */\nmodule.exports = {\n /**\n * @param {Request} req\n * @return {Boolean}\n */\n hasEscapedFragment: function(req) {\n return !!req.query['_escaped_fragment_'];\n },\n\n /**\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove markup-accepting signature of Document\n"
},
{
"from": "human",
"value": "'use strict';\nvar util = require('util');\n\nvar Node = require('./node');\nvar Element = require('./nodes/element');\nvar makeElement = require('./nodes/make-element');\n\nfunction Do... | javascript | chosen |
[
{
"from": "system",
"value": "Use toString() to print the error coming from the API request\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar request = require('request');\n\nfunction removeEmptyItemFilter(item) {\n return item.length > 0;\n}\n\nfunction tasksFromTextToObject(text) {\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up the make release script\n"
},
{
"from": "human",
"value": "var childProcess = require('child_process');\nvar fs = require('fs-extra');\nvar glob = require('glob');\nvar path = require('path');\nvar sortPackageJson = require('sort-package-json');\n\n// Updat... | javascript | chosen |
[
{
"from": "system",
"value": "Break the char counter long line\n"
},
{
"from": "human",
"value": "var locastyle = locastyle || {};\n\nlocastyle.charCounter = (function() {\n 'use strict';\n\n function updateCounter(index, count) {\n $('.ls-number-counter-'+index).text(count);\n }\n\n func... | javascript | chosen |
[
{
"from": "system",
"value": "Update component if spacing has been changed\n"
},
{
"from": "human",
"value": "var Extend = require('../utils/extend');\n\nvar Types = {\n LIGHT: require('./themes/light-theme'),\n DARK: require('./themes/dark-theme')\n};\n\nvar ThemeManager = function() {\n ret... | javascript | chosen |
[
{
"from": "system",
"value": "Use an iframe to create a testDocument…\ninstead of `createHTMLDocument` since it isn't fully support by the browsers we care about.\n\nfixes #606\nfixes #454"
},
{
"from": "human",
"value": "/**\n * Copyright 2013 Facebook, Inc.\n *\n * Licensed under the Apache Li... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Set a more verbose key in transformText\n"
},
{
"from": "human",
"value": "'use babel'\n\nimport {transform as babelTransform} from 'flint-babel-core'\nimport {Parser} from '../compiler'\nimport {transformPlugin, getBabelConfig} from '../helpers'\n\nconst NEWL... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak the class for 'today' in the bootstrap theme\n"
},
{
"from": "human",
"value": "\nvar BootstrapTheme = Theme.extend({\n\n\tclasses: {\n\t\twidget: 'fc-bootstrap3',\n\n\t\ttableGrid: 'table-bordered', // avoid `table` class b/c don't want margins. only border c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix racey forceUpdate call when components are being rebuilt\n"
},
{
"from": "human",
"value": "// A helper mixin for react components.\n// Use by setting this.store to your root store,\n// and call this.grab(path) to get a store link that\n// will also trigger forc... | javascript | chosen |
[
{
"from": "system",
"value": "Update Jest test setup to add mock document.createRance method and refactor global exposed methods\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n *\n * WSO2 Inc. licenses this file to you under th... | javascript | chosen |
[
{
"from": "system",
"value": "Add alert and logout when no login details given\n\n\nFormer-commit-id: 78b396c1adfca2470a9e0f44a36e91513779f424"
},
{
"from": "human",
"value": "/**\n * Generic error handler method for ajax responses.\n * Apply your specific requirements for an error response and ... | javascript | chosen |
[
{
"from": "system",
"value": "Use relative path for HTTP requests. This way it doesn't matter where the application is deployed.\n"
},
{
"from": "human",
"value": "(function () {\n var moneyTracker = angular.module(\"moneyTracker\");\n\n moneyTracker.service(\"ExpenseService\", [\"traverson\",... | javascript | chosen |
[
{
"from": "system",
"value": "Indent promise chain two space\n"
},
{
"from": "human",
"value": "import * as React from \"react\";\nimport {BuildSnapshot} from \"./BuildSnapshot\";\n\n/**\n * Container Component for BuildSnapshots.\n * \n * @param {*} props input property containing an array of b... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve promise before setting JSON\n"
},
{
"from": "human",
"value": "import * as React from \"react\";\nimport {BuildSnapshot} from \"./BuildSnapshot\";\n\n/**\n * Container Component for BuildSnapshots.\n * \n * @param {*} props input property containing an array... | javascript | chosen |
[
{
"from": "system",
"value": "Add save method to temp db serv\n"
},
{
"from": "human",
"value": "const db = function () {\n let localData = JSON.parse(localStorage.getItem(\"data\"));\n return localData || { index: 0 };\n};\nlet server = {\n add(item) {\n const data = db();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove reference to Closure, expose State instead\n\nClosure was removed in 32e3b21."
},
{
"from": "human",
"value": "/**\n * The MIT License (MIT)\n * Copyright (c) 2015-present Dmitry Soshnikov <dmitry.soshnikov@gmail.com>\n */\n\n// To require local modules from ... | javascript | chosen |
[
{
"from": "system",
"value": "Update @ Mon Mar 13 2017 11:13:52 GMT+0800 (CST)\n"
},
{
"from": "human",
"value": "process.env.NODE_ENV = process.env.NODE_ENV || 'production'\n\nconst ora = require('ora')\nconst rm = require('rimraf')\nconst path = require('path')\nconst chalk = require('chalk')\... | javascript | chosen |
[
{
"from": "system",
"value": "Support voices and half operators as well\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst {\n computed\n} = Ember;\n\nexport default Ember.Component.extend({\n username: null,\n\n role: computed('username', function() {\n if (this.get('u... | javascript | chosen |
[
{
"from": "system",
"value": "Fix save objectve to use a default competency.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n title: null,\n competency: null,\n needs: ['programyear'],\n programYear: Ember.computed.alias(\"controller... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dupe vars and bad syntax; tidy string\n"
},
{
"from": "human",
"value": "var request = require( 'request' );\nmodule.exports = {\n\tcommands: {\n\t\tisup: {\n\t\t\taliases: [ 'get', 'web' ],\n\t\t\tprivileged: true,\n\t\t\thelp: 'Performs a HTTP(S) request to... | javascript | chosen |
[
{
"from": "system",
"value": "Use flex to fix vertical alignment issue\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport Box from '../box';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nclass Icon ex... | javascript | chosen |
[
{
"from": "system",
"value": "Add unit test for label event count (complex data)\n"
},
{
"from": "human",
"value": "import labels from '../../../lib/drawer/labels';\n\ndescribe('Labels drawer', () => {\n const scales = {\n x: d3.time.scale(),\n y: d3.scale.ordinal(),\n };\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure to return the promise when in a resolve function.\n\nngResource's returned from resolve will render immediately. This is of course\nbroken, as the result may come later. If the html page takes a similar amount\nof time to be fetched as the result, it appears to comp... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Return empty string node for `false` values\n\nVery specifically doing a strict `false` check here to try & avoid\ncoercion perf costs.\n"
},
{
"from": "human",
"value": "function Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, att... | javascript | chosen |
[
{
"from": "system",
"value": "Change HTTP method to GET\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar Global = require('../global');\nvar search = require('../commands/search');\n\nvar router = express.Router();\n\nrouter.get('/*', function(req, res) {\n var respon... | javascript | chosen |
[
{
"from": "system",
"value": "Fix CI (broken by commit 1ad75b346e97a19)\n"
},
{
"from": "human",
"value": "\n/*\n * Helper functions to integrate Python unittest test cases with QUnit\n */\n\n;(function() {\n this.qunit_unittest_wrapper = function(test, result) {\n return function(assert) {\... | javascript | chosen |
[
{
"from": "system",
"value": "Use Ember.computed instead of using prototype extension\n\n- This will work with consumer applications that must run with\nthe Prototype Extensions turned off.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport layout from '../templates/components... | javascript | chosen |
[
{
"from": "system",
"value": "Disable IE ajax request caching\n"
},
{
"from": "human",
"value": "import axios from 'axios';\n\nexport const HTTP = axios.create({\n});\n"
},
{
"from": "gpt",
"value": "import axios from 'axios';\n\n// disable IE ajax request caching\naxios.defaults.hea... | javascript | chosen |
[
{
"from": "system",
"value": "Update with new functionality for quad view\n"
},
{
"from": "human",
"value": "function loadTheFrame() {\n document.getElementById('upper-left').src = window.localStorage.getItem('upper-left');\n document.getElementById('upper-right').src = window.localStorage... | javascript | chosen |
[
{
"from": "system",
"value": "[native] Use hook instead of connect functions and HOC in ConnectedStatusBar\n\nSummary: Switched to hooks instead of the connect function for the ConnectedStatusBar class\n\nTest Plan: Made sure the statusbar still showed up and functioned normally.\n\nReviewers: ashoat, palys... | javascript | chosen |
[
{
"from": "system",
"value": "Add HeaderHoc to ConversationError component so you can navigate back\n"
},
{
"from": "human",
"value": "// @flow\nimport React from 'react'\nimport {Box, CopyableText, Text} from '../../../common-adapters'\nimport {globalStyles, globalMargins} from '../../../styles... | javascript | chosen |
[
{
"from": "system",
"value": "Update mongoose error module name\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Removes server error when user updates input\n */\nangular.module('its110App')\n .directive('mongooseError', function () {\n return {\n restrict: 'A',\n requi... | javascript | chosen |
[
{
"from": "system",
"value": "Add grid trait file header"
},
{
"from": "human",
"value": "LSD.Trait.Grid = new Class({\n \n sort: function() {\n \n },\n \n filter: function() {\n \n }\n \n})"
},
{
"from": "gpt",
"value": "/*\n---\n \nscript: Grid.js\n \ndescription: Filt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Publication should convert time into Date at setter\n"
},
{
"from": "human",
"value": "/**\n * Publication that represents a publication to novel sites.\n */\nexport default class Publication {\n /**\n * @param {Object} settings - Publication settings.\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust server test message welcome page\n"
},
{
"from": "human",
"value": "// request-promise is just like the HTTP client 'Request', except Promises-compliant.\n// See https://www.npmjs.com/package/request-promise.\nvar requestPromise = require('request-promise');\... | javascript | chosen |
[
{
"from": "system",
"value": "Change camera position to use state\n"
},
{
"from": "human",
"value": "import {Entity} from 'aframe-react';\nimport React from 'react';\nimport CameraAnimation from './CameraAnimation';\nimport Cursor from './Cursor';\n\nexport default class Camera extends React.Com... | javascript | chosen |
[
{
"from": "system",
"value": "Add padding to the basket input.\n"
},
{
"from": "human",
"value": "import { Util } from \"../../util.js\";\n\nexport class BasketTemplate {\n static update(render, state, events) {\n const headerClasses = \"fw6 bb b--black-20 tl pb1 pr1 bg-black-10\";\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add route for creating processes.\n"
},
{
"from": "human",
"value": "module.exports = function(model) {\n 'use strict';\n\n let validateProjectAccess = require('./project-access')(model.access);\n let schema = require('.././schema')(model);\n let router ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix server monitoring to mark correct servers as offline\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar logger = require('./logger');\nvar db = require('./db');\n\nvar r = require('rethinkdb');\nvar schedule = require('node-schedule');\n\nc... | javascript | chosen |
[
{
"from": "system",
"value": "Make the API call to bitstamp\n"
},
{
"from": "human",
"value": "/* Get orders listing. */\nexports.list = function(req, res){\n //res.setHeader('Content-Type', 'application/json'); \n res.send({\n orders: [\n {\n time: '10:57 am',\n... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.