conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Extend `Albums` to render album images\n\n... when a certain album is selected.\n\nComponent `Albums` is not a stateless component like the other components.\nThe component needs the life cycle method `componentWillMount`, that's why it's stateful.\n\nA stateless component woul...
javascript
chosen
[ { "from": "system", "value": "Set escalation threshold to null by default\n" }, { "from": "human", "value": "GLClient.controller('AdminContextsCtrl', \n ['$scope', '$rootScope', 'localization', 'AdminContexts',\n function($scope, $rootScope, localization, AdminContexts) {\n\n $scope.new_c...
javascript
chosen
[ { "from": "system", "value": "Make API calls to mockable through https" }, { "from": "human", "value": "import fetch from 'isomorphic-fetch'\n\nexport const REQUEST_LIBRARY = 'REQUEST_LIBRARY'\nexport const RECEIVE_LIBRARY = 'RECEIVE_LIBRARY'\nexport const INVALIDATE_LIBRARY = 'INVALIDATE_LIBRAR...
javascript
chosen
[ { "from": "system", "value": "Fix thread reducer -> history\n" }, { "from": "human", "value": "import initialState from './initialState';\nimport { \n THREAD_LOADED, \n THREAD_REQUESTED, \n THREAD_DESTROYED\n} from '../constants'\n\nexport default function (state = initialState.thread, ...
javascript
chosen
[ { "from": "system", "value": "Fix typo that was preventing the fetching of data\n" }, { "from": "human", "value": "import axios from 'axios';\n\nexport const FETCH_POSTS = 'fetch_posts';\n\nconst ROOT_URL = axios.get('http://reduxblog.herokuapp.com/api/');\nconst API_KEY = '?key=YOLO1984';\n\nex...
javascript
chosen
[ { "from": "system", "value": "Handle errors in consoles proxy.\n" }, { "from": "human", "value": "import partialStream from 'partial-stream'\nimport {connect} from 'tls'\nimport {parse} from 'url'\n\nexport default function proxyConsole (ws, vmConsole, sessionId) {\n const url = parse(vmConsole...
javascript
chosen
[ { "from": "system", "value": "Add normalizeEntityName() to the blueprint\n\nThe normalizeEntityName() is required for the addon’s default\nblueprint, or else you’ll get an “entity-name” error when trying to\n`ember install`\n" }, { "from": "human", "value": "/*jshint node:true*/\nvar RSVP = requ...
javascript
chosen
[ { "from": "system", "value": "Fix bug - when clicking \"Join\" on a project - it now goes to the project's page.\n" }, { "from": "human", "value": "Template.projectItem.helpers({\n joinProject: function(projectId) {\n var projectOwnerOrMember = Projects.find({ $or:\n [{\n 'owner...
javascript
chosen
[ { "from": "system", "value": "Make _.include call the method from underscore_string if passed a string\n" }, { "from": "human", "value": ";(function($) {\n window.t = function(key, options) {\n if (_.isObject(options)) {\n return I18n.t(key, options);\n } else {\n ...
javascript
chosen
[ { "from": "system", "value": "gltfpack: Fix texture compression spawn in node.js\n\nOur previous code blindly replaced the executable in the input command\nwith the env. variable value, which actually didn't handle cases when\nthe environment variable wasn't set and additionally didn't handle paths\nwith sp...
javascript
chosen
[ { "from": "system", "value": "Apply entity parameter to serverless log\n" }, { "from": "human", "value": "'use strict'\n\nlet log\n\nmodule.exports = function serverlessLog(...args) {\n log(...args)\n}\n\nmodule.exports.setLog = function setLog(serverlessLogRef) {\n log = serverlessLogRef\n}\n...
javascript
chosen
[ { "from": "system", "value": "Add API base url and key\n" }, { "from": "human", "value": "'use strict';\n\n" }, { "from": "gpt", "value": "/* @flow */\n\n'use strict';\n\nexport const settings = {\n\tAPI_BASE_URL: 'https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/',\n API...
javascript
chosen
[ { "from": "system", "value": "Handle map load event to expose instance\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n mapState: Ember.inject.service(),\n lat: 40.7071266,\n lng: -74,\n zoom: 10,\n 'tooltip-text': '',\n\n selected...
javascript
chosen
[ { "from": "system", "value": "Fix csrf header bug II\n" }, { "from": "human", "value": "const randomString = require('randomstring');\n\nconst TOKEN_LENGTH = 32;\n\nmodule.exports = function handleCsrfProtection(cookies, config) {\n if (!config.csrfProtection) {\n return {};\n }\n\n const ...
javascript
chosen
[ { "from": "system", "value": "Fix hotel restart on OS X\n" }, { "from": "human", "value": "const fs = require('fs')\nconst path = require('path')\nconst mkdirp = require('mkdirp')\nconst startup = require('user-startup')\nconst common = require('../common')\nconst conf = require('../conf')\ncons...
javascript
chosen
[ { "from": "system", "value": "Support rendering templates without any data\n" }, { "from": "human", "value": "var fs = require('fs');\n\nmodule.exports = {\n loadTemplate: function (path, data, type) {\n\n type = type || 'underscore';\n\n var template = fs.readFileSync(path);\n\n if (t...
javascript
chosen
[ { "from": "system", "value": "Remove all children of a folder when it is deleted\n" }, { "from": "human", "value": "import syncClient from '../db/sync_client';\nimport { DELETE_BOOKMARK, DELETE_FOLDER } from '../constants';\n\nexport function deleteBookmark(id) {\n return (dispatch) => {\n s...
javascript
chosen
[ { "from": "system", "value": "UIU-989: Exclude Shared Fee/Fine Owner and UIU-1000: Create BigTest Transfer accounts\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\n\nimport {\n Row,\n Col,\n Se...
javascript
chosen
[ { "from": "system", "value": "Reset searchQuery when fetching endpoint/oath list pages\n" }, { "from": "human", "value": "import {\n SEARCH_QUERY,\n} from '../constants';\n\nexport const initialState = {\n searchQuery: '',\n};\n\nexport default function reducer(state = initialState, action...
javascript
chosen
[ { "from": "system", "value": "Use walkSync instead of hand-written\n" }, { "from": "human", "value": "'use strict';\n\n\n// stdlib\nvar path = require('path');\nvar fs = require('fs');\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nfunction require...
javascript
chosen
[ { "from": "system", "value": "Fix smooth scrolling breaking new navigation\n" }, { "from": "human", "value": "function figure_downloads() {\n\tvar figs = $(\"div[id^=F]\");\n\t$( figs ).each( function( index, element ){\n\t $(this).find('.fig-caption').prepend('<p class=\"fig-download\"><i cl...
javascript
chosen
[ { "from": "system", "value": "Use Node.textContent instead of innerText\n" }, { "from": "human", "value": "function Actuator (board) {\n this.board = board;\n}\n\nActuator.prototype.render = function () {\n this.sync();\n this.adjustSpacing();\n};\n\nActuator.prototype.sync = function () {\n ...
javascript
chosen
[ { "from": "system", "value": "QS-1015: Fix show statistics in question list (own profile)\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from 'react';\nimport Question from './Question';\n\nexport default class QuestionList extends Component {\n static propTypes = {...
javascript
chosen
[ { "from": "system", "value": "Remove trailing slash (needed for jetty-upgrade)\n" }, { "from": "human", "value": "//Establish the WebSocket connection and set up event handlers\nvar webSocket = new WebSocket(\"ws://\" + location.hostname + \":\" + location.port + \"/chat/\");\nwebSocket.onmessag...
javascript
chosen
[ { "from": "system", "value": "Add some additional commenting to detail store\n" }, { "from": "human", "value": "var glimpse = require('glimpse'),\n requestRepository = require('../repository/request-repository.js'),\n _requests = {};\n\nfunction requestsChanged(targetRequests) {\n glimp...
javascript
chosen
[ { "from": "system", "value": "Add 'directory' prop to base template" }, { "from": "human", "value": "\nmodule.exports = {\n\n name: \"Base template\",\n\n params: [\"Name\", \"Body\"],\n\n rules: function(config) {\n\n return({\n items: [\n { destinationFile: \"inde...
javascript
chosen
[ { "from": "system", "value": "Update pet insurance nav links" }, { "from": "human", "value": "const submenuItems = [\n {\n header: 'Advice',\n subHeader: 'What Does Pet Insurance Cover?',\n link: '/pet-insurance/guide/',\n imageSrc: 'https://res-4.cloudinary.com/policygenius/image/u...
javascript
chosen
[ { "from": "system", "value": "Add basic function which echoes spotify code\n" }, { "from": "human", "value": "const functions = require('firebase-functions');\n\n// // Create and Deploy Your First Cloud Functions\n// // https://firebase.google.com/docs/functions/write-firebase-functions\n//\n// ...
javascript
chosen
[ { "from": "system", "value": "Change pubnub to version 3.7.15\n" }, { "from": "human", "value": "module.exports = {\n description: \"Provides the PubNub JavaScript SDK\",\n normalizeEntityName: function() {},\n \n afterInstall: function() {\n return this.addBowerPackageToProject(\"pubnub\...
javascript
chosen
[ { "from": "system", "value": "Fix Gen 4 learnset checking\n" }, { "from": "human", "value": "exports.BattleScripts = {\n\tgen: 4,\n\tinit: function() {\n\t\tfor (var i in this.data.Pokedex) {\n\t\t\tvar template = this.getTemplate(i);\n\t\t\tif (template.gen > 4) template.isNonstandard = true;\n...
javascript
chosen
[ { "from": "system", "value": "Remove question regarding scope in functions\n" }, { "from": "human", "value": "var data = {\n \"title\": \"Funktioner\",\n \"questions\": [\n {\n \"description\": \"När en tupel skickas som argument till en funktion skickas en\",\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unexpected whitespace between return and regexp. It is not consistently\nremoved.\n" }, { "from": "human", "value": "function testIssue74(){return /'/;}\n!function(s){return /^[£$€?.]/.test(s);}();typeof\n/ ' /;x=/ [/] /;1/foo;(2)/foo;function(){return/foo/};...
javascript
chosen
[ { "from": "system", "value": "Handle slect all and clear buttuns on buic side" }, { "from": "human", "value": "/**\r\n * Handling of BUIC selects.\r\n *\r\n * @mixin\r\n * @namespace Bolt.buic.select\r\n *\r\n * @param {Object} bolt - The Bolt module.\r\n * @param {Object} $ - jQuery.\r\n */\r\n...
javascript
chosen
[ { "from": "system", "value": "Update JS docs + better function name\n" }, { "from": "human", "value": "/* See license.txt for terms of usage */\r\n\r\n\"use strict\";\r\n\r\n(function({content, addMessageListener, sendAsyncMessage, removeMessageListener}) {\r\n\r\nconst document = content.docume...
javascript
chosen
[ { "from": "system", "value": "Use weirder port to avoid 8888 collision\n\nFixes #790\n" }, { "from": "human", "value": "\nvar request = require('../..')\n , express = require('express')\n , assert = require('better-assert')\n , app = express()\n , url = require('url');\n\napp.get('/', functi...
javascript
chosen
[ { "from": "system", "value": "Add JS function number formatting\n" }, { "from": "human", "value": "// Simple Email Validation\nfunction vlidEmail(email) {\n\tvar pattern = /^([a-z0-9_\\.-])+@[a-z0-9-]+\\.([a-z]{2,4}\\.)?[a-z]{2,4}$/i;\n\tvar r = false;\n\tif(pattern.test(email)){\n\t\tr = true;\...
javascript
chosen
[ { "from": "system", "value": "Remove console log from NotificationsRoot\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport NotificationSystem from 'react-notification-system';\n\nexport class NotificationsRoot extends Component {\n static propTypes =...
javascript
chosen
[ { "from": "system", "value": "Clean dir in a proper way.\n\nmake clean dir right" }, { "from": "human", "value": "var rimraf = require('rimraf');\nvar fs = require('fs');\n\nvar dir = '../build';\n\nrimraf(dir, function (err) {\n\tif (err) {\n\t\tthrow err;\n\t}\n\t\n\tif (process.argv.indexOf(\...
javascript
chosen
[ { "from": "system", "value": "Add images and ng-click handlers\n" }, { "from": "human", "value": "function panel() {\n return {\n restrict: 'E',\n scope: {\n category: '='\n },\n templateUrl: 'category.edit.html',\n controller: 'CategoryCtrl'\n };\n}\n\nmodule.exports.panel...
javascript
chosen
[ { "from": "system", "value": "Change config key to salinger-home\n" }, { "from": "human", "value": "#!/usr/bin/env node\nvar path = require('path')\nvar configKey = 'npm_package_config_salinger_tasks'\nvar homePath = path.resolve(process.cwd(), process.env[configKey] || 'scripts')\nprocess.env.S...
javascript
chosen
[ { "from": "system", "value": "Fix bug of the last commit 3\n" }, { "from": "human", "value": "Errors = Mongo.Collection(null);\nthrowError = function(message) {\n Errors.insert({\n message: message\n })\n}" }, { "from": "gpt", "value": "Errors = new Mongo.Collection(null...
javascript
chosen
[ { "from": "system", "value": "Add hover design to controls\n\nSigned-off-by: soupette <0a59f0508aa203bc732745954131d022d9f538a9@gmail.com>\n" }, { "from": "human", "value": "import styled from 'styled-components';\nimport PropTypes from 'prop-types';\nimport { themePropTypes } from 'strapi-helpe...
javascript
chosen
[ { "from": "system", "value": "Add --executed-from as first argument\n" }, { "from": "human", "value": "var path = require('path');\nvar spawn = require('child_process').spawn;\n\nvar atomCommandPath = path.resolve(__dirname, '..', 'atom.exe');\nvar arguments = process.argv.slice(2);\narguments....
javascript
chosen
[ { "from": "system", "value": "Fix client manifest download url.\n" }, { "from": "human", "value": "angular.module( 'App.Views' ).controller( 'ClientCtrl', function( $sce, $http, App, Device, Growls )\n{\n\tvar _this = this;\n\n\tApp.title = 'Game Jolt Client'\n\n\tthis.platform = Device.os();\n\...
javascript
chosen
[ { "from": "system", "value": "Remove certain meddlesome ActBlue filing from a skip list\n" }, { "from": "human", "value": "var async = require('async'),\n fs = require('fs'),\n filingQueue = require('./import'),\n yauzl = require('yauzl');\n\nvar filings_dir = __dirname + '/../../data/f...
javascript
chosen
[ { "from": "system", "value": "Update code to comply with Ember 2.8.0.\n\nCheck discussion in https://github.com/emberjs/ember.js/issues/14266\n" }, { "from": "human", "value": "import Component from '@ember/component';\nimport { computed } from '@ember/object';\nimport { alias } from '@ember/obj...
javascript
chosen
[ { "from": "system", "value": "Extend QueryResults to return the date period covered by the results\n" }, { "from": "human", "value": "/** Data model encapsulating the results we got back from the server */\n\nmodulejs.define( \"query-results\", [\n \"lib/lodash\",\n \"query-result\"\n], functi...
javascript
chosen
[ { "from": "system", "value": "Fix first path check on builder helpers\n" }, { "from": "human", "value": "/**\n * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You\n * may not use this file ex...
javascript
chosen
[ { "from": "system", "value": "Add function to check whether a music file\n" }, { "from": "human", "value": "(function (exports) {\n 'use strict';\n\n function BrowserMusicPlayer () {\n var AudioContext = window.AudioContext || window.webkitAudioContext;\n this.ctx = new Audio...
javascript
chosen
[ { "from": "system", "value": "Update Toast page in docs\n" }, { "from": "human", "value": "import React from 'react';\nimport Row from 'Row';\nimport Col from 'Col';\nimport ReactPlayground from './ReactPlayground';\nimport PropTable from './PropTable';\nimport Samples from './Samples';\nimport ...
javascript
chosen
[ { "from": "system", "value": "Add getCountry method that gets country of apple music track\n" }, { "from": "human", "value": "import {\n formatOpenURL,\n parse,\n} from 'spotify-uri';\n\nimport { getCountryParam } from './Playlist';\n\nexport const getOwnerUrl = (track) => {\n if (!track || !...
javascript
chosen
[ { "from": "system", "value": "Append new line to text area\n" }, { "from": "human", "value": " var socket;\n\n function sendMessage()\n {\n \tvar message = $('#themessage').val();\n\t$('#themessage').val('');\t \t\n \tsocket.emit('newMessage', { message:message });\n \t\n\n }\n \n function reci...
javascript
chosen
[ { "from": "system", "value": "Remove page, add offset and limit to filtered filters\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { isArray, forEach } from 'lodash'\nimport qs from 'qs'\nimport Datasets from './Datasets'\n\nconst DISABLED_FILTERS = ['q', 'pa...
javascript
chosen
[ { "from": "system", "value": "Fix dropdown not being cleared when no value set\n" }, { "from": "human", "value": "import { inject, bindable, bindingMode, containerless } from 'aurelia-framework';\n\n@inject(Element)\nexport class UiDropdownCustomElement {\n @bindable({ defaultBindingMode: bin...
javascript
chosen
[ { "from": "system", "value": "Update alowed paths for GGJ.\n" }, { "from": "human", "value": "const routeRegex = /^\\/(global-game-jam-2021|ggj2021|ggj21)(?:\\/.*)?$/;\n\nconst githubUrl = 'https://levilindsey.github.io/global-game-jam-2021';\n\n// Attaches the route handlers for this app.\nexpo...
javascript
chosen
[ { "from": "system", "value": "Allow single line comments to be empty (no characters between \"//\" and line break).\n" }, { "from": "human", "value": "/*\n * grunt-strip-comments\n * https://github.com/kkemple/grunt-strip-comments\n *\n * Copyright (c) 2013 Kurtis Kemple\n * Licensed under the M...
javascript
chosen
[ { "from": "system", "value": "Update routes from deployed heroku version.\n" }, { "from": "human", "value": "var router = require('express').Router();\nvar Incident = require('../incidents');\n\nrouter.get('/incidents/latest', (req, res) => {\n Incident.find().sort('-date').limit(100).exec((err...
javascript
chosen
[ { "from": "system", "value": "Change require tree for javascripts\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascr...
javascript
chosen
[ { "from": "system", "value": "Fix invitations in Russian and Bulgarian, add locales to moment.js\n\nFixes #940\n" }, { "from": "human", "value": "//= require jquery\n//= require jquery_ujs\n//= require twitter/bootstrap\n//= require lodash\n//= require handlebars.runtime\n//= require diacritics\...
javascript
chosen
[ { "from": "system", "value": "Update JS to use individual components\n" }, { "from": "human", "value": "//= require govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind\n//\n//= require support\n//= require browse-columns\n//= require organisation-list-filter\n//= require modules/curren...
javascript
chosen
[ { "from": "system", "value": "Add test for `mutationObserverInjection` config flag\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport sinon from 'sinon';\nimport { initialize } from 'dummy/initializers/mutation-observer';\nimport { module, test } from 'qunit';\nimport destroyA...
javascript
chosen
[ { "from": "system", "value": "Fix link to medias in UserCard\n" }, { "from": "human", "value": "import React from 'react'\n\nimport style from './style.styl'\nimport avatarUrl from '../../utils/avatarUrl.js'\n\nimport Link from 'react-router/Link'\n\nconst UserCard = ({id, name, gender, mediaCou...
javascript
chosen
[ { "from": "system", "value": "Fix wrong locationType on test ENV\n\nCordova init blueprint shouldn't change test locationType to \"auto\". To be able to run the test on the browser it needs to be \"none\"." }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(envi...
javascript
chosen
[ { "from": "system", "value": "Add a light grey color for disabled buttons" }, { "from": "human", "value": "export default {\n primary: '#9E9E9E',\n primary1: '#4d86f7',\n primary2: '#6296f9',\n secondary: '#8F0CE8',\n secondary2: '#00B233',\n secondary3: '#00FF48',\n grey0: '#393e42',\n ...
javascript
chosen
[ { "from": "system", "value": "Reduce the number of assets cached in the service worker\n" }, { "from": "human", "value": "const webpack = require(\"webpack\");\nconst merge = require(\"webpack-merge\");\nconst workboxPlugin = require(\"workbox-webpack-plugin\");\nconst GitRevisionPlugin = requir...
javascript
chosen
[ { "from": "system", "value": "Fix preload directive with IE10.\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module(\"hikeio\").\n\tdirective(\"preloadResource\", [\"resourceCache\", function(resourceCache) {\n\t\treturn {\n\t\t\tlink: function (scope, element, attrs) {\n\t\t\t\t...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix a bug affecting shared workers\n" }, { "from": "human", "value": "'use babel'\n\nimport {Disposable, CompositeDisposable} from 'sb-event-kit'\nimport Communication from 'sb-communication'\n\nclass Exchange {\n constructor(worker) {\n this.worker = work...
javascript
chosen
[ { "from": "system", "value": "Add try/catch block for cases where click method not supported.\n" }, { "from": "human", "value": "/**\n * Android browser doesn't trigger a label's associated\n * form item when tapping the label. We only want to\n * enable 'option' styled checkboxes/radio buttons ...
javascript
chosen
[ { "from": "system", "value": "Add support for intent slot's value as a object\n" }, { "from": "human", "value": "'use strict';\n\nconst _ = require('underscore');\n\nfunction buildSlots(slots) {\n const res = {};\n _.each(slots, (value, key) => {\n res[key] = {\n name: key,\n valu...
javascript
chosen
[ { "from": "system", "value": "Remove obsolete DI in fakeMorphRetriever\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.morph').service('fakeMorphRetriever', function($http) {\n this.getStubData = function(callback) {\n var result;\n var request = $.ajax({\n ...
javascript
chosen
[ { "from": "system", "value": "Fix `pauseOnHover` default value to true\n\nWhich is described in README" }, { "from": "human", "value": "var defaultProps = {\n className: '',\n accessibility: true,\n adaptiveHeight: false,\n arrows: true,\n autoplay: false,\n autoplaySpeed: 3000...
javascript
chosen
[ { "from": "system", "value": "Connect decorator should pass props into select function\n" }, { "from": "human", "value": "import React from 'react';\nimport Connector from './Connector';\nimport getDisplayName from '../utils/getDisplayName';\nimport shallowEqualScalar from '../utils/shallowEqual...
javascript
chosen
[ { "from": "system", "value": "Fix custom Okular path arg\n" }, { "from": "human", "value": "\"use babel\";\n\nimport Opener from \"../opener\";\nimport child_process from \"child_process\";\n\nexport default class CustomOpener extends Opener {\n // Used the custom pdf viewer method\n open(file...
javascript
chosen
[ { "from": "system", "value": "Fix bug with Parameter Node not getting correct value\n" }, { "from": "human", "value": "/*!\n * @depends ../core/AudioletNode.js\n */\n\n/**\n * A type of AudioletNode designed to allow AudioletGroups to exactly replicate\n * the behaviour of AudioletParameters. B...
javascript
chosen
[ { "from": "system", "value": "Remove localStorage var that clobbers the global\n\nDeclaring a var localStorage at the top level clobbers the global localStorage defined by the browser with `undefined`." }, { "from": "human", "value": "var nextTick = process && process.nextTick ? process.nextTick...
javascript
chosen
[ { "from": "human", "value": "Use old say command code as template.\n" }, { "from": "gpt", "value": "var l10n_file = __dirname + '/../l10n/commands/tell.yml';\nvar l10n = require('../src/l10n')(l10n_file);\nvar CommandUtil = require('../src/command_util').CommandUtil;\nexports.command = function(...
javascript
chosen
[ { "from": "system", "value": "Fix Escaped expression\ncompile the alias when used in a select clause\n" }, { "from": "human", "value": "\nimport Expression from './base'\n\n/**\n * \n */\nexport default class Escaped extends Expression {\n \n \n /**\n * \n * @param {Any} value\n * @cons...
javascript
chosen
[ { "from": "system", "value": "Call the actual `subscribeForExpiry` method.\n\nTests are making assertions that this method is called.\n" }, { "from": "human", "value": "(function(exports) {\n\n var Ember = exports.Ember, NullTransport = {\n subscribe: Ember.K,\n unsubscribe: Ember.K\n };...
javascript
chosen
[ { "from": "system", "value": "Fix register syntax. Also, prepare to implement the Firebase utility functions.\n" }, { "from": "human", "value": "var React = require('react');\nvar firebaseUtils = require('../../utils/firebaseUtils');\nvar Router = require('react-router');\n\nvar Register = React...
javascript
chosen
[ { "from": "system", "value": "Fix updating nodes: Use new $http API.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('ffffng')\n.controller('UpdateNodeCtrl', function ($scope, Navigator, NodeService, config) {\n $scope.config = config;\n $scope.node = undefined;\n $sc...
javascript
chosen
[ { "from": "system", "value": "Remove errant char and pass in encoding to make readFileSync read as text and not a buffer\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\nvar stripComments = require('strip-json-comments');\n\nif (process.argv.length < 3) {\...
javascript
chosen
[ { "from": "system", "value": "Fix IE7&8 error by loading es5shim and es5sham before flight :)" }, { "from": "human", "value": "define([ 'backbone', 'bootstrap_plugins', 'flight', 'text', 'moment_pl', 'es5shim', 'es5sham', 'jquery_migrate' ], function() {\n 'use strict';\n\n require([ 'legacy/c...
javascript
chosen
[ { "from": "system", "value": "Add dummy URLs to header nav items\n\n" }, { "from": "human", "value": "//@flow\nimport React from \"react\";\n\nimport { Ul, Li, Nav } from \"./styled-components\";\nimport { LinkedInIcon } from \"../../../../elements/linkedin-icon\";\nimport { OctocatIcon } from \...
javascript
chosen
[ { "from": "system", "value": "Fix in memory datasource to point to the correct relative directory depending on whether it's called via cityscope-data-starter or the main loopback boot file\n" }, { "from": "human", "value": "var path = require('path');\nvar appDir = path.dirname(require.main.file...
javascript
chosen
[ { "from": "system", "value": "Read from sessionStorage before localStorage when loading view state\n" }, { "from": "human", "value": "import debug from 'debug';\n\nconst log = debug('scope:storage-utils');\n\n// localStorage detection\nconst storage = (typeof Storage) !== 'undefined' ? window.lo...
javascript
chosen
[ { "from": "system", "value": "Test props change -> state change\n" }, { "from": "human", "value": "import React from 'react';\n\nimport { shallow, mount } from 'enzyme';\nimport {expect} from 'chai';\n\nimport MarkdownCell from '../../../../src/notebook/components/cell/markdown-cell';\nimport * ...
javascript
chosen
[ { "from": "system", "value": "Remove broken test, add first real test case\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\n\nmoduleForComponent('editable-field', 'Integration | Component | editable field...
javascript
chosen
[ { "from": "system", "value": "Change strava url to more readable and better working (?) location.\nOld url doesn't seem to work on mobile browsers very well.\n" }, { "from": "human", "value": "// Define tile layers\nvar MapQuestOpen_OSM = L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z...
javascript
chosen
[ { "from": "system", "value": "Update tour tests to use enzyme.\n" }, { "from": "human", "value": "/* Copyright (C) 2017 Canonical Ltd. */\n'use strict';\n\nconst React = require('react');\n\nconst Tour = require('./tour');\nconst SvgIcon = require('../../svg-icon/svg-icon');\n\nconst jsTestUtils...
javascript
chosen
[ { "from": "system", "value": "Read the body selector from the module config (if present)\n" }, { "from": "human", "value": "define(['knockout', 'jquery'], function (ko, $) {\n var defaultBodySelector = 'body';\n\n var createGetContext = function createGetContext () {\n return function getCo...
javascript
chosen
[ { "from": "system", "value": "Fix recoverySheet import for case sensitive build environment\n" }, { "from": "human", "value": "/**\n * Copyright (C) 2019 Mailvelope GmbH\n * Licensed under the GNU Affero General Public License version 3\n */\n\nimport React from 'react';\nimport ReactDOM from 'r...
javascript
chosen
[ { "from": "system", "value": "Fix Langs path operator for Windows using 'links.js'\n" }, { "from": "human", "value": "var path = require(\"path\");\nvar swig = require('swig');\nvar hljs = require('highlight.js');\n\nvar links = require('../utils/').links;\nvar pkg = require('../../package.json'...
javascript
chosen
[ { "from": "system", "value": "Use the viewFactory to spawn a new FormulaView for InlineFormulas.\n" }, { "from": "human", "value": "var AnnotationView = require('../annotation').View;\nvar FormulaView = require('../formula').View;\n\nvar InlineFormulaView = function(node, viewFactory) {\n Annot...
javascript
chosen
[ { "from": "system", "value": "Remove impossible todo about loc status enum validation\n" }, { "from": "human", "value": "const geom = require('./geom');\nconst time = require('./time');\nconst objectid = require('./objectid');\n\nmodule.exports = {\n type: 'object',\n properties: {\n _id: o...
javascript
chosen
[ { "from": "system", "value": "Add convenience route generation functions\n\nMany instances throughout the app need to be updated to use these :)\n" }, { "from": "human", "value": "import IndexPage from 'flarum/components/index-page';\nimport DiscussionPage from 'flarum/components/discussion-page...
javascript
chosen
[ { "from": "system", "value": "Add osm id into exportde nodes [skip ci]\n" }, { "from": "human", "value": "const parseNode = (node) => {\n const parsedNode = {\n name: null,\n amenity: null,\n address: {\n location: {\n latitude: parseFloat(node.$.lat),\n longitude: p...
javascript
chosen
[ { "from": "system", "value": "Make seeking work in player controls storybook\n" }, { "from": "human", "value": "import React from 'react';\nimport {storiesOf} from '@storybook/react';\n\nimport {PlayerControls} from 'pageflow-scrolled/frontend';\n\nconst stories = storiesOf('Frontend/Player Cont...
javascript
chosen
[ { "from": "system", "value": "Remove turbolinks support as it introduces some nasty bugs.\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this direc...
javascript
chosen
[ { "from": "system", "value": "Add remove text and count features to js\n" }, { "from": "human", "value": "var removeStyles = function(html) {\n var originalHtml = html;\n var answer =\"test\";\n\n return answer;\n};\n\n$(document).ready(function() {\n $(\"form#html-stripper\").submit(functio...
javascript
chosen
[ { "from": "system", "value": "Use a total polyfill for lower risk.\n" }, { "from": "human", "value": "\n// include global styles\nrequire('normalize.css');\nrequire('../styles/font-NotoSans.css');\nrequire('../styles/core-global.styl');\n\n// polyfill for older browsers\nrequire('core-js/es6/obj...
javascript
chosen