conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use a single UA code for Buyer App analytics\n\nMissed out of this story (which only changed the\nSupplier App):\n\nhttps://www.pivotaltracker.com/story/show/106115458\n"
},
{
"from": "human",
"value": "(function() {\n \"use strict\";\n var cookieDomain = (documen... | javascript | chosen |
[
{
"from": "system",
"value": "Sort blog entries by date.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Link from 'gatsby-link'\nimport './index.scss'\n\nexport default ({ data }) => {\n return (\n <section>\n <div className=\"container\">\n <header classNam... | javascript | chosen |
[
{
"from": "system",
"value": "Add Goerli and Sepolia to the API list\n\nHey @sebs \r\n\r\nThanks a lot for this amazing library.\r\n\r\nI created this PR to include the Sepolia and Goerli API endpoints. Currently I'm creating the client (with `axios.create`) to support those two, but I'd be cool if I have d... | javascript | chosen |
[
{
"from": "system",
"value": "Move csv in a module\n"
},
{
"from": "human",
"value": "function readSingleFile(e) {\n var file = e.target.files[0];\n if (!file) {\n return;\n }\n var reader = new FileReader();\n reader.onload = function(e) {\n var contents = e.target.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove code duplication from snapshot closed check\n"
},
{
"from": "human",
"value": "class StateSnapshot {\n constructor({ store, initialState, meta, currentState = initialState }) {\n this.store = store;\n this.initialState = { ...initialState };\n this.... | javascript | chosen |
[
{
"from": "system",
"value": "Add actions for user management\n"
},
{
"from": "human",
"value": "import db from '../db';\nimport { createAction } from 'redux-actions';\n\nexport const USER_LOGIN = 'USER_LOGIN';\nexport const USER_LOGIN_SUCCESS = 'USER_LOGIN_SUCCESS';\nexport const USER_SIGNUP = ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable file inputs on browsers that don't support FileReader / FormData.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nangular.module(\"hikeio\").\n\tdirective(\"fileUploader\", [\"$window\", function($window) {\n\treturn {\n\t\tcompile: function(tplElm, tp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mistake in Spanish i18n resource for example widget\n"
},
{
"from": "human",
"value": "define({\n root: {\n SortBy: \"Ordenar por:\",\n Descending: \"Descendente\",\n Name: \"Nombre\",\n DateAdded: \"Fecha de entrada\",\n Pr... | javascript | chosen |
[
{
"from": "system",
"value": "[js] Fix typo and optimize DOM querying\n"
},
{
"from": "human",
"value": "(function() {\n \"use strict\";\n\n // animate moving between anchor links\n smoothScroll.init({\n selector: \"a\",\n speed: 500,\n easing: \"easeInOutCubic\"\n });\n\n // bette... | javascript | chosen |
[
{
"from": "system",
"value": "Fix location dispatched in history listener\n"
},
{
"from": "human",
"value": "import { manualChange } from '../redux/actions';\n\n/**\n * Dispatches a manualChange action once on app start,\n * and whenever a popstate navigation event occurs.\n */\nfunction startLi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix input appearance in the 'All' view\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Redirect } from 'react-router-dom';\nimport TodoItem from './TodoItem';\nimport TodoTextInput from './TodoTextInput';\n\nimport './TaskList.css';\n\nexport... | javascript | chosen |
[
{
"from": "system",
"value": "Hide block hover overlay if it's still there when editing a field.\n"
},
{
"from": "human",
"value": "import inlineFieldMixin from 'mixins/inlineFieldMixin';\nimport imagesLoaded from 'imagesloaded';\nimport { eventBus } from 'plugins/eventbus';\n\nexport default {\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra space from if statement\n"
},
{
"from": "human",
"value": "function Levels(prng, paletteRange, paletteBuilder) {\n this.prng = prng;\n this.paletteRange = paletteRange;\n this.paletteBuilder = paletteBuilder;\n}\n\nLevels.prototype.get = functi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in the HelpPage module\n"
},
{
"from": "human",
"value": "(function (h) {\n 'use strict';\n\n function HelpPage(chromeTabs, extensionURL) {\n this.showHelpForError = function (tab, error) {\n if (error instanceof h.LocalFileError) {\n retur... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console.log debug from toggleDisplayWithCheckedInput JS\n"
},
{
"from": "human",
"value": "(function(window, $){\n window.toggleDisplayWithCheckedInput = function(args){\n var $input = args.$input,\n $element = args.$element,\n showElement = arg... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Set expense categories in component\n\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Component.extend({\n attributeBindings: ['dialog-open'],\n didInsertElement () {\n var dialog = document.g... | javascript | chosen |
[
{
"from": "system",
"value": "Change slug format in Post model\n"
},
{
"from": "human",
"value": "import {DataTypes as t} from \"sequelize\"\n\nimport format from \"date-fns/format\"\n\nimport createSlug from \"lib/helper/util/createSlug\"\n\n/**\n * @const schema\n *\n * @type {import(\"sequeli... | javascript | chosen |
[
{
"from": "system",
"value": "Add error types from REST Api\n"
},
{
"from": "human",
"value": "'use strict';\n\n/*\n * Abstration layer for various RESTful api calls\n */\n\nvar apihandler = angular.module('apihandler', []);\n\napihandler.factory('apiFactory', function ($http, configFactory) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add implementation of no(), copied from nada project (CC0)\n"
},
{
"from": "human",
"value": "/*\n * Namespace: lb.base\n * Adapter Modules for Base JavaScript Library\n *\n * Authors:\n * o Eric Bréchemier <github@eric.brechemier.name>\n * o Marc Delhommeau <ma... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tagName selection for IE8"
},
{
"from": "human",
"value": "(function () {\n\n 'use strict';\n\n moj.Modules.SubmitOnce = {\n el: '.js-SubmitOnce',\n\n init: function () {\n this.cacheEls();\n this.bindEvents();\n this.options = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Break destroy calling when not initialized\n"
},
{
"from": "human",
"value": " // Save the other cropper\n Cropper.other = $.fn.cropper;\n\n // Register as jQuery plugin\n $.fn.cropper = function (options) {\n var args = toArray(arguments, 1),\n result... | javascript | chosen |
[
{
"from": "system",
"value": "Optimize dom replacement for board viewer\n\nThis one line cuts down the \"loading\" slice from the chrome timeline from 25% to\n3%. jQuery.html performs a very expensive html validation before inserting to\ninto the dom.\n\nBecause we *hope* that we're sending valid html befor... | javascript | chosen |
[
{
"from": "system",
"value": "Use the new PageWithMenu component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Relay from 'react-relay';\n\nimport SettingsMenu from './SettingsMenu';\n\nconst SettingsSection = (props) =>\n <div className=\"twbs-container\">\n <div cla... | javascript | chosen |
[
{
"from": "system",
"value": "Fix HEAD requests breaking SVG responses\n"
},
{
"from": "human",
"value": "import interceptor from \"express-interceptor\";\nimport SVGO from \"svgo\";\n\n/**\n * SVGO middleware: optimize any SVG response.\n */\nexport function svgo(options) {\n const svgo = new ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove character escape with template string.\n"
},
{
"from": "human",
"value": "function addRandomQuote() {\n const quotes = [\n `Now. Say my name. Heisenberg. You're god damn right`,\n 'I am the danger.',\n 'You see, but you do not observe.',\n 'There... | javascript | chosen |
[
{
"from": "system",
"value": "Set API prod by AV._config.applicationProduction.\n"
},
{
"from": "human",
"value": "'use strict';\nvar AV = require('avoscloud-sdk');\nvar crypto = require('crypto');\n\nAV._config.disableCurrentUser = true;\nAV.Promise.setPromisesAPlusCompliant(true);\n\n// 调用 API... | javascript | chosen |
[
{
"from": "system",
"value": "Fix chat with us on intercom text wrapping\n\nfbshipit-source-id: 498ec09\n"
},
{
"from": "human",
"value": "import StyleConstants from './StyleConstants';\n\nexport default {\n input: {\n borderColor: StyleConstants.colorBorder,\n borderWidth: 1,\n border... | javascript | chosen |
[
{
"from": "system",
"value": "Return 0 if an element height is not detected\n"
},
{
"from": "human",
"value": "class Dom {\n constructor(el) {\n this.el = el;\n this.style = window.getComputedStyle(el, '');\n }\n\n set text(val) {\n if ('textContent' in this.el) {\n this.el.text... | javascript | chosen |
[
{
"from": "system",
"value": "Change one more CAPTIVA to Intelligent Capture\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { version } from 'root/package.json';\nimport RaisedButton from 'material-ui/lib/raised-button';\nimport FlatButton from 'material-ui/lib/flat-button... | javascript | chosen |
[
{
"from": "system",
"value": "Improve clean task / save lcov data\n"
},
{
"from": "human",
"value": "const gue = require('./index.js');\n\ngue.task('default', ['lint','test']);\n\ngue.task('test', () => {\n return gue.shell('nyc mocha test/**/*.test.js');\n});\n\ngue.task('lint', () => {\n ret... | javascript | chosen |
[
{
"from": "system",
"value": ":no_entry: Validate declarations and providers properly\n"
},
{
"from": "human",
"value": "'use babel'\n\n/* @flow */\n\nimport type {Provider, Declaration} from './types'\n\nexport function validateDeclarations(declarations: Array<Declaration>) {\n\n}\n\nexport fun... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong fix randomBytes for new Buffer\n"
},
{
"from": "human",
"value": "module.exports = class XorShift {\n _hex2seed (size, hex) {\n const arr = new Array(size)\n for (let i = 0; i < size; ++i) {\n arr[i] = parseInt(hex.slice(i * 8, (i + 1) * 8), 16... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for Meteor 1.2\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'aramk:file-upload',\n summary: 'Simple file uploads.',\n version: '0.4.0'\n});\n\nNpm.depends({\n 'mime': '1.3.4'\n})\n\nPackage.onUse(function(api) {\n api.versionsFrom('... | javascript | chosen |
[
{
"from": "human",
"value": "Create video list component and load in the video list item component.\n"
},
{
"from": "gpt",
"value": "import React from 'react';\nimport VideoListItem from './video_list_item';\n\nconst VideoList = (props) => {\n\tconst videoItems = props.videos.map((video) => {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove document contents on injection\n"
},
{
"from": "human",
"value": "(function() {\r\n window.stop();\r\n\r\n const IS_LOCAL = false,\r\n URL_REMOTE = \"https://rawgit.com/ultratype/UltraTypeBot/master/OUT/OUT.js\",\r\n URL_OUT = IS_LOCAL ? c... | javascript | chosen |
[
{
"from": "system",
"value": "Use relative path for the test tarfile\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar root = path.dirname(__filename);\nrequire.paths.unshift(path.join(root, '../build/default'));\nrequire.paths.unshift(path.join(root, '../lib'));\n\nvar sys = r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix comment in statusbar container\n"
},
{
"from": "human",
"value": "import React from \"react-native\";\nimport VersionCodes from \"../../modules/version-codes\";\n\nconst {\n\tPlatform,\n\tStyleSheet,\n\tView\n} = React;\n\nconst styles = StyleSheet.create({\n\ts... | javascript | chosen |
[
{
"from": "system",
"value": "Modify script to allow warnings\n"
},
{
"from": "human",
"value": "var page = require('webpage').create()\n\npage.onConsoleMessage = function(arg) {\n var parts = arg.split('`')\n var msg = parts[1] || '[LOG] ' + arg\n\n console.log(color(msg, parts[0]))\n\n if ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix accidental logic error in argument checking\n"
},
{
"from": "human",
"value": "/* @flow */\n/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in ... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to event bus with different types of events\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar EventBus = require('../lib/messages/EventBus');\n\ndescribe('Event Bus', function () {\n\n it(\"should publish an event\", function () {\n var ev... | javascript | chosen |
[
{
"from": "system",
"value": "Update the max pool size from 10 to 500\n"
},
{
"from": "human",
"value": "const config = require('./config')\n\nmodule.exports = {\n web: {\n client: 'mssql',\n connection: {\n host: config.DATABASE_SERVER,\n user: config.WEB_APP_DATABASE_USERNAME,... | javascript | chosen |
[
{
"from": "system",
"value": "Add commented out lines for easy postgres testing.\n"
},
{
"from": "human",
"value": "// Update with your config settings.\n\nmodule.exports = {\n\n development: {\n client: 'sqlite3',\n connection: {\n filename: './database.sqlite3',\n },\n seeds:... | javascript | chosen |
[
{
"from": "system",
"value": "Remove mock around test storage restore\n"
},
{
"from": "human",
"value": "export default (initialData = {}) => {\n let data = initialData\n\n return {\n reset: () => (data = initialData),\n getData: () => data,\n persist: d => (data = d),\n restore: j... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor placing of first four pieces\n\nI wanted this to be a separate function.\n"
},
{
"from": "human",
"value": "const $ = require('jquery');\nconst board = require('./board');\nconst Piece = require('./piece');\n\nfunction Game(players, board) {\n this.playe... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with Facebook text input elements.\n"
},
{
"from": "human",
"value": "// Listen for keydown events on the main document\n// Note: Will not trigger if focused on an element within an iframe\ndocument.addEventListener('keydown', keyListener, false);\n\n// Ke... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for STORE-1324: Update JS to prevent onclick action when the image link is broken\n"
},
{
"from": "human",
"value": "$(document).ready(function(){\n $('.image-display').click(function(){\n messages.modal_pop({content:'<img src=\"'+$(this).attr('src')+'... | javascript | chosen |
[
{
"from": "system",
"value": "Set ESLint to allow global strict directives.\n\nThe airbnb rules expect es6 modules but with node we don't use them. This\nchange sets the `sourceType` to \"script\", and enforces to have a directive\n\"strict\" in any global scope (i.e. file).\n\nMore info: http://eslint.org/... | javascript | chosen |
[
{
"from": "system",
"value": "Change title for home page\n\nTo get more SEO traffic, we should adjust the title for what people\nsearch for. Change recommended by Joe Lei.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport HomepageBody from '../components/homepage-body';\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Load the analytics and mongoose only in the production mode.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst isProduction = process.env.NODE_ENV === \"production\";\n\nmodule.exports = {\n metadata: {\n siteTitle: \"Bloggify\"\n , descript... | javascript | chosen |
[
{
"from": "system",
"value": "Change language a tiny bit.\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react';\nimport connect from 'react-redux/es/connect/connect';\nimport {Callout, Tag} from '@blueprintjs/core';\nimport {FormattedMessage} from 'react-intl';\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "Add chapter 3, exercise 3\n"
},
{
"from": "human",
"value": "function countBs(s) {\n let count = 0;\n for (let i = 0; i < s.length; ++i) {\n if (s[i] == \"B\") ++count;\n }\n return count;\n}\n\nfunction countChar(s, c) {\n let count = 0;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused shared prop types\n\nSigned-off-by: Victor Porof <4f672cb979ca45495d0cccc37abaefc8713fcc24@gmail.com>\n"
},
{
"from": "human",
"value": "/*\nCopyright 2016 Mozilla\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nth... | javascript | chosen |
[
{
"from": "system",
"value": "Remove createTrigger import from triggers file\n\nThe primeStateTriggers file still had an import for createTrigger.\nThis removes it.\n"
},
{
"from": "human",
"value": "// TODO: Switch this out with a proper import from the module when it's ready.\nimport { createT... | javascript | chosen |
[
{
"from": "system",
"value": "Handle case where reference list is undefined due to filtering\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst ReferenceCell = (refs) => {\n return refs.map((ref) => {\n if (ref.pubMedId && ref.pubMedUrl) {\n return <a href={ref.pubMe... | javascript | chosen |
[
{
"from": "system",
"value": "Monitor if the lander is crashed\n"
},
{
"from": "human",
"value": ";(function(lander, undefined){\n var display = document.getElementById('display');\n var horizon = new Array(display.width);\n var horizon_height = 50;\n horizon[0] = horizon_height;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "[GD2] Allow full screen on dacast embeds\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { webcastPropType } from '../../utils/webcastUtils'\n\nconst EmbedDacast = (props) => {\n const channel = props.webcast.channel\n const file = props.webca... | javascript | chosen |
[
{
"from": "system",
"value": "Call `filter` and not `use` for filters."
},
{
"from": "human",
"value": "/**\n * Dump outgoing stanzas to the console.\n *\n * This filter prints XML stanzas to the console. This is useful to inspect\n * stanzas as they are transmitted on the wire, and aids in deb... | javascript | chosen |
[
{
"from": "system",
"value": "Extend time lenght of animations\n\nExtend time lenght of animations to show blocks"
},
{
"from": "human",
"value": "jQuery(document).ready(function($){\n\tvar timelineBlocks = $('.cd-timeline-block'),\n\t\toffset = 0.8;\n\n\t//hide timeline blocks which are outside... | javascript | chosen |
[
{
"from": "system",
"value": "Add a die function to quickly throw errors\n"
},
{
"from": "human",
"value": "var round = function(num)\n{\n return (num + 0.5) | 0\n}\nvar floor = function(num)\n{\n return num | 0\n}\nvar ceil = function(num)\n{\n return (num | 0) == num ? num | 0 : (num + 1) |... | javascript | chosen |
[
{
"from": "system",
"value": "Update the event endpoint from v3 to v4\n"
},
{
"from": "human",
"value": "import { apiProxyAxios } from '../../../components/Task/utils'\nimport { transformResponseToEventDetails } from '../transformers'\n\nexport const getEventDetails = (eventId) =>\n apiProxyAxi... | javascript | chosen |
[
{
"from": "system",
"value": "Increase the chances of seeing the actual lag when on narrow page tabs\n"
},
{
"from": "human",
"value": "const lag = require('./lag');\n\nmodule.exports = (user, pings) => {\n const original = document.title;\n user.events.on('read', () => {\n document.title =... | javascript | chosen |
[
{
"from": "system",
"value": "Move supervisor autocomplete into function\n\nChange-Id: Iebcd27893f1801084ab8b39753b9c779bab16ead\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n var supervisor_provider = new Bloodhound({\n datumTokenizer: Bloodhound.tokenizers.obj.whitespa... | javascript | chosen |
[
{
"from": "system",
"value": "Set permission to download photo from CFS\n"
},
{
"from": "human",
"value": "var imageStore = new FS.Store.GridFS('images')\n\nImages = new FS.Collection('images', {\n stores: [imageStore]\n});\n\nImages.allow({\n 'insert' : function(){\n return true;\n },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Test reaching end of stack\n"
},
{
"from": "human",
"value": "\n/*\n * composable-middleware\n * https://github.com/randymized/composable-middleware\n *\n * Copyright (c) 2013 Randy McLaughlin\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.expor... | javascript | chosen |
[
{
"from": "system",
"value": "Add GeoJSON transform for geometry\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\n\nexport default DS.Transform.extend({\n deserialize(serialized) {\n return serialized;\n },\n\n serialize(deserialized) {\n return deserialized;\n }\n});\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove .js suffix in imports for consistency\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes, StyleSheet, Text, View } from 'react-native';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport getLocat... | javascript | chosen |
[
{
"from": "system",
"value": "Update timestamp and trip title fields to better naming convention.\n"
},
{
"from": "human",
"value": "/**\n * This file specifies the database collection and field names.\n */\nexport const COLLECTION_TRIPS = 'trips';\nexport const TRIPS_NAME = 'name';\nexport cons... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to avoid dynamic module resolution\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Time in seconds since the epoch.\n*\n* @module @stdlib/time/now\n*\n* @example\n* var now = require( '@stdlib/time/now' );\n*\n* var ts = now();\n* // returns <num... | javascript | chosen |
[
{
"from": "system",
"value": "Fix portolio tab loading when loaded by pjax\n"
},
{
"from": "human",
"value": "const State = require('../../binary/base/storage').State;\nconst Client = require('../../binary/base/client').Client;\nconst PortfolioWS = require('../../binary/websocket_pages/user/acc... | javascript | chosen |
[
{
"from": "system",
"value": "Use `_method=DELETE` instead for deletion\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may o... | javascript | chosen |
[
{
"from": "system",
"value": "Add some wrapper code which defines the public API.\n\n* There is now also a default configuration for the algorithm. Which is for\n now the only one.\n"
},
{
"from": "human",
"value": "})();\n"
},
{
"from": "gpt",
"value": "\n /**\n * This is the de... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce grid layout logic delay.\n"
},
{
"from": "human",
"value": "module.exports = Zeppelin.CollectionView.extend({\n tagName: 'ol',\n\n className: 'cards-list list-unstyled clearfix',\n\n subscriptions: {\n 'cardsList:layout': 'triggerLayout'\n },\n\n item... | javascript | chosen |
[
{
"from": "system",
"value": "[FEATURE] Rename userIndex controller action to index.\n"
},
{
"from": "human",
"value": "RippleTransaction = require(\"../models/ripple_transaction\");\nvar async = require(\"async\");\n\nmodule.exports = (function(){\n function userIndex(req, res) {\n req.user... | javascript | chosen |
[
{
"from": "system",
"value": "Remove extra slash in URL\n"
},
{
"from": "human",
"value": "import Route from '@ember/routing/route';\nimport ajax from 'ember-fetch/ajax';\n\nexport default Route.extend({\n async model(params) {\n try {\n await ajax(`/api/v1//me/crate_owner_invitations/a... | javascript | chosen |
[
{
"from": "system",
"value": "Update annotation list on job completion\n"
},
{
"from": "human",
"value": "histomicstk.views.AnnotationSelectorWidget = histomicstk.views.Panel.extend({\n events: _.extend(histomicstk.views.Panel.prototype.events, {\n 'click .h-annotation > span': 'toggle... | javascript | chosen |
[
{
"from": "system",
"value": "Add alert functionality to modal handler\n"
},
{
"from": "human",
"value": "'use strict';\n\n/*\n * Simple wrapper around $ionicPopup for modals and alerts and such\n */\n\nvar modalhandler = angular.module('modalhandler', []);\n\nmodalhandler.factory('modalFactory'... | javascript | chosen |
[
{
"from": "system",
"value": "Move cursor after embed when inserting\n\nRight now, when you insert an embed the cursor is afterwards _above_ the embed, rather than below it. With this fix the cursor is correctly moved after the embed, which makes for a much nicer writing experience.\r\n\r\nReference `image-... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bad invocation of old, dead code\n"
},
{
"from": "human",
"value": "export default function createNodeIterator(root, whatToShow, filter = null) {\n var iter = _create.call(window.document, root, whatToShow, filter, false);\n return typeof(iter.referenceNode) =... | javascript | chosen |
[
{
"from": "system",
"value": "Generalize and internalize view methods\n"
},
{
"from": "human",
"value": "// Marionette.Component\n// --------------------\n// An object to represent an application component, typically \n// something visual, encapsulated in to an object that can be \n// instantiat... | javascript | chosen |
[
{
"from": "system",
"value": "Add date updated, remove required from text\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\n\nvar COLLECTION_NAME = 'tweet';\n\nvar tweetSchema = new mongoose.Schema({\n id: {type: String, required: true},\n text: {type: String, required: t... | javascript | chosen |
[
{
"from": "system",
"value": "Add integration tests to standard `grunt test`\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n\n 'use strict';\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n nodeunit: {\n unit: ['test/unit/test*... | javascript | chosen |
[
{
"from": "system",
"value": "Use dynamic process (json) ajax load\n"
},
{
"from": "human",
"value": "angular.module('OpenMining', [])\n.value('API_URL', '/process.json?')\n\n.controller('Process',\n function($scope, $http, $location, API_URL) {\n for (var key in $location.search()){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Include dotfiles when copying the site\n\nPart one of fixing issue #141.\n"
},
{
"from": "human",
"value": "'use strict';\nconst gulp = require('gulp');\nconst shell = require('shelljs');\nconst size = require('gulp-size');\nconst argv = require('yargs').argv;\n\n//... | javascript | chosen |
[
{
"from": "system",
"value": "Format how time from now is displayed\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport moment from 'moment';\nimport stringToHue from 'bus-detective/utils/string-to-hue';\nvar inject = Ember.inject;\n\nexport default Ember.Component.extend({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update the zip task to dist and correct api task\n"
},
{
"from": "human",
"value": "'use strict';\n\n\nmodule.exports = function (grunt) {\n\n // Load the project's grunt tasks from a directory\n require('grunt-config-dir')(grunt, {\n configDir: require... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up node_modules after updating them\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = function (grunt) {\n grunt.initConfig({\n bump: {\n options: {\n files: [\"package.json\"],\n commit: ... | javascript | chosen |
[
{
"from": "system",
"value": "examples: Update to use v_normals for color\n"
},
{
"from": "human",
"value": "FamousFramework.scene('famous-tests:webgl:custom-shader:fragment', {\n behaviors: {\n '.sphere': {\n 'size': [200, 200],\n 'align': [0.5, 0.5],\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Reboot when there are no fillers (as opposed to no creeps at all)\n"
},
{
"from": "human",
"value": "'use strict'\n\n/**\n * Attempts to prevent stalled rooms by launching filler creeps at 300 energy.\n */\n\nclass CityReboot extends kernel.process {\n constructor ... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional simulations to show different results\n"
},
{
"from": "human",
"value": "function simulateNumericDecision(fleet1, fleet2){\n if (fleet1.ships > fleet2.ships) return fleet1;\n if (fleet1.ships < fleet2.ships) return fleet2;\n return null;\n}\n\ncons... | javascript | chosen |
[
{
"from": "system",
"value": "Correct french translation module documents\n"
},
{
"from": "human",
"value": "/* eslint-disable no-undef */\nimport { Bert } from 'meteor/themeteorchef:bert';\nimport { upsertDocument } from '/imports/api/documents/methods';\nimport '/imports/lib/validation';\n\nle... | javascript | chosen |
[
{
"from": "system",
"value": "Remove paragraph that adds too much padding."
},
{
"from": "human",
"value": "module.exports = function(req, res) {\n console.log('req.body', req.body)\n var data = JSON.parse(req.body.params);\n if (!data) {\n res.status(403 /* Unauthorized */ ).send('Invalid... | javascript | chosen |
[
{
"from": "system",
"value": "Fix apollo client in SSR mode\n"
},
{
"from": "human",
"value": "import { ApolloClient, InMemoryCache } from 'apollo-boost';\nimport { createUploadLink } from 'apollo-upload-client';\nimport fetch from 'isomorphic-unfetch';\n\nlet apolloClient = null;\n\nlet isBrows... | javascript | chosen |
[
{
"from": "system",
"value": "Update jsdoc type for values param of the escapeURI function.\n\nCo-authored-by: Evan Mattson <04b4a59aa52dbba0fe4139b6afe8885fd3fa41ec@10up.com>"
},
{
"from": "human",
"value": "/**\n * Escape URI components utility.\n *\n * Site Kit by Google, Copyright 2020 Googl... | javascript | chosen |
[
{
"from": "system",
"value": "Add verbose prelude from browser-pack\n"
},
{
"from": "human",
"value": "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");... | javascript | chosen |
[
{
"from": "system",
"value": "Fix things the linter doesn't like\n"
},
{
"from": "human",
"value": "module.exports = {\n commands: {\n random: {\n help: 'Selects a random choice or number',\n command: function (bot, msg) {\n if (msg.args.length > 2) {\n msg.args.shi... | javascript | chosen |
[
{
"from": "system",
"value": "Update servers list on remove\n"
},
{
"from": "human",
"value": "class ServersListCtrl {\n constructor($scope, Servers, Socket) {\n this.$scope = $scope;\n this.Servers = Servers;\n this.socket = Socket;\n this.init();\n }\n\n init() {\n this.serve... | javascript | chosen |
[
{
"from": "system",
"value": "Add a couple of unit tests.\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('controllers', function(){\n var scope;\n\n beforeEach(module('wallet'));\n\n beforeEach(inject(function($rootScope) {\n \tscope = $rootScope.$new();\n }));\n\n it('should... | javascript | chosen |
[
{
"from": "system",
"value": "Fix hound issues: [ci full]\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar TaskList = require('../POMs/TasksList.js');\n\ndescribe('Check that task name can be updated', function() {\n\n beforeAll(function() {\n TaskList.actionsBeforeAll();\n });\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor selecting the plugins to use for parsing.\n"
},
{
"from": "human",
"value": "\n'use strict';\n\nfunction Parser(plugins) {\n var filterPluginsForServices = function(serviceNames) {\n return plugins.filter(function (plugin) {\n return se... | javascript | chosen |
[
{
"from": "system",
"value": "Check for window.location undefined on auto config setup\n"
},
{
"from": "human",
"value": "(function(window)\n{\n // if we're running on the Cloud CMS hosted platform, we can auto-acquire the client key that we should use\n (function() {\n\n var uri =... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.