conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "news: Fix click behavior of like button\n" }, { "from": "human", "value": "function likebutton(el, url) {\n var dropdown;\n var button;\n\n init();\n\n function init() {\n button = el.querySelector('.button');\n el.removeAttribute('onmoused...
javascript
chosen
[ { "from": "system", "value": "Use generator to get random character buffers\n" }, { "from": "human", "value": "var mt = require('mersenne-twister')\n\nvar generator\n\nmain()\nfunction main() {\n seed = process.argv[2]\n if (!seed) {\n console.log('no seed provided - using default s...
javascript
chosen
[ { "from": "system", "value": "Make sure entity exist before trying to use it\n" }, { "from": "human", "value": "var index = function(req, res) {\n res.writeHead(200);\n return res.end();\n};\n\nvar app = require('http').createServer(index);\nvar io = require('socket.io')(app);\nvar _ = req...
javascript
chosen
[ { "from": "system", "value": "Add node shebang for use in the executable" }, { "from": "human", "value": "require('colors');\n\nvar assert = require('assert'),\n program = require('commander');\n\nvar Xbox = require('./index');\n\nvar ip,\n liveId;\n\nprogram\n .usage('-i <ip_address> -l ...
javascript
chosen
[ { "from": "system", "value": "Reduce number of files copied for TS web build\n" }, { "from": "human", "value": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the M...
javascript
chosen
[ { "from": "system", "value": "Fix issue that is crashing the node sdk tests\n\nNode SDK tests won’t populate `web`\n\nModified this error message with some more information." }, { "from": "human", "value": "'use strict';\n\nvar extend = require('cloneextend').extend;\n\n/**\n * Represents a stra...
javascript
chosen
[ { "from": "system", "value": "Extend simple test case and it fails again\n" }, { "from": "human", "value": "describe(\"The constructor is supposed a proper Biom object\", function() {\n it('Constructor Biom exists', function(){\n expect(Biom).toBeDefined();\n });\n});\n\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Add volume and volumeshift commands to help command\n" }, { "from": "human", "value": "\nmodule.exports = {\n help: (message, config) => {\n const p = config.prefix;\n message.channel.send(\n`\\`\\`\\`diff\n++ MUSIC COMMANDS ++\n${p}play URL - Plays...
javascript
chosen
[ { "from": "system", "value": "Fix name being cut off\n" }, { "from": "human", "value": "import React from \"react-native\";\n\nconst {\n StyleSheet,\n Text,\n View,\n Image\n} = React;\n\nconst styles = StyleSheet.create({\n author: {\n flexDirection: \"row\",\n padd...
javascript
chosen
[ { "from": "system", "value": "Change type for private blog settings\n\nrefs #5614 and #5503\n\n- update private blog type, including update to settings.edit\n- switch order of populate settings & update fixtures + populate all settings\n\nPrivate blog settings should not be returned by public endpoints\nthe...
javascript
chosen
[ { "from": "system", "value": "Add Month/Year selectors to default datetime widget\n" }, { "from": "human", "value": "jQuery( function($) {\n$(document).ready(function(){\n\tdateFormat = window.jsi18n_bika('date_format_short_datepicker');\n\t$('[datepicker=1]').datepicker({\n\t\tdateFormat: dateF...
javascript
chosen
[ { "from": "system", "value": "Add helper function for creating classes\n" }, { "from": "human", "value": "(function () {\n\tif (!this.Drop) {\n\t\tthis.Drop = {\n\t\t\tViews: {}\n\t\t};\n\t}\n\n\tvar __hasProp = {}.hasOwnProperty;\n\n\tthis.Drop.Utils = {\n\t\textends: function(child, parent) {\...
javascript
chosen
[ { "from": "system", "value": "Check muted value is true\n" }, { "from": "human", "value": "function talk() {\n var participants = gapi.hangout.getParticipants();\n\n for (var index in participants) {\n var participant = participants[index];\n\n if (participant.id !== gapi.hangout.getLoca...
javascript
chosen
[ { "from": "system", "value": "Add Emittery back into the event mangager\n" }, { "from": "human", "value": "const { ReporterAggregator } = require(\"truffle-reporters\");\n\nclass EventManager {\n constructor(eventManagerOptions) {\n const { logger, muteReporters, globalConfig } = eventManage...
javascript
chosen
[ { "from": "system", "value": "title: Mark `narrow` param optional in `getIsInTopicOrStreamNarrow`.\n\nBecause `isStreamNarrow` and `isTopicNarrow` handle this case and\nreturn false, this function does the same.\n\nIn fact, we already call it with `narrow` undefined: it's called by\n`getTitleBackgroundColor...
javascript
chosen
[ { "from": "system", "value": "Use html directory for webpack server\n" }, { "from": "human", "value": "var info = require('../package.json');\nvar path = require('path');\n\nvar clientAppPath = path.join(__dirname, '../');\n\nvar devRelativeOutput = '/assets/';\nvar prodRelativeOut...
javascript
chosen
[ { "from": "system", "value": "Simplify constructor, don't copy if unchanged\n" }, { "from": "human", "value": "class PGroup {\n\tconstructor() {\n\t\tthis.members = [];\n\t}\n\n\tadd(elem) {\n\t\tlet newMembers = this.members.slice(0);\n\t\tif (!newMembers.includes.elem) {\n\t\t\tnewMembers.push...
javascript
chosen
[ { "from": "system", "value": "Add delay to chat response\n" }, { "from": "human", "value": "/**\n * This is the main server entry point into the\n * chatbot example.\n */\n\nimport Chat from './app/components/chat'\nimport ChatBot from './app/chatbot'\nimport DOM from 'react-dom/server...
javascript
chosen
[ { "from": "system", "value": "Update server to support throng 4.x\n" }, { "from": "human", "value": "'use strict';\n\nconst throng = require('throng');\n\nconst app = require('./app');\n\nconst WORKERS = process.env.WEB_CONCURRENCY || 1;\n\nthrong(app, {\n workers: WORKERS,\n lifetime: Infinit...
javascript
chosen
[ { "from": "system", "value": "debug(logger): Enable redux logger to debug document state\n" }, { "from": "human", "value": "import { createStore, applyMiddleware } from 'redux';\n\nimport middlewares from './middlewares';\nimport rootReducer from './reducers';\n\n/* istanbul ignore if -- only us...
javascript
chosen
[ { "from": "system", "value": "Increase delay for running tests\n" }, { "from": "human", "value": "/**\n description: Content script that runs after DOM loaded to look for the Library\n Detector meta element. If found, notifies the extension of the\n script info...
javascript
chosen
[ { "from": "system", "value": "Fix support for multiple tests in the same directory\n" }, { "from": "human", "value": "import test from \"ava\";\nimport {runKaba} from \"./lib/runner\";\n\n\n/**\n * @typedef {{\n * status: number,\n * args?: string[],\n * match?: RegExp,\n * n...
javascript
chosen
[ { "from": "system", "value": "Modify friendlyName of force pxe boot task\n" }, { "from": "human", "value": "// Copyright 2017, Dell EMC, Inc.\n\n'use strict';\n\nmodule.exports = {\n friendlyName: 'Reboot Node',\n injectableName: 'Task.Obm.Force.Pxe.Boot',\n implementsTask: 'Task.Base.O...
javascript
chosen
[ { "from": "system", "value": "Fix panel for when there is no masterPasswordState\n" }, { "from": "human", "value": "/*\n * This Source Code is subject to the terms of the Mozilla Public License\n * version 2.0 (the \"License\"). You can obtain a copy of the License at\n * http://mozilla.org/MPL/...
javascript
chosen
[ { "from": "system", "value": "Use single quotes around strings in example file\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp'),\n pkg = require('./package.json'),\n toolkit = require('gulp-wp-toolkit');\n\ntoolkit.extendConfig({\n theme: {\n name: \...
javascript
chosen
[ { "from": "system", "value": "Refactor autoSlugGeneration to work all the time\n\nUse a single event listener on a parent element, rather than having to\nadd new listeners each time a part is added or removed.\n" }, { "from": "human", "value": "// Javascript specific to guide admin\n// When we a...
javascript
chosen
[ { "from": "system", "value": "9397: Fix warning when rendering null value\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass FormSelect extends React.Component {\n static propTypes = {\n id: PropTypes.string,\n includeBlank: PropTyp...
javascript
chosen
[ { "from": "system", "value": "Remove unused http and random dependencies from autoupdate.\n" }, { "from": "human", "value": "Package.describe({\n summary: \"Update the client when new client code is available\",\n version: '1.4.0'\n});\n\nPackage.onUse(function (api) {\n api.use([\n 'webap...
javascript
chosen
[ { "from": "system", "value": "Fix path separator regular expression\n" }, { "from": "human", "value": "var config = require(\"nconf\").file({ \"file\": \"./config/config.json\" }),\n path = require(\"path\"),\n pathSepExp = new RegExp(path.sep + '$'),\n root_dir = config.get(\"root_dir\...
javascript
chosen
[ { "from": "system", "value": "Create simple service to communication with the API\n" }, { "from": "human", "value": "/**\n * Created by Tomasz Gabrysiak on 2016-03-12.\n */\n\n\nvar app = angular.module(\"myRestApp\", []);\n\napp.controller(\"MyRestAppCtrl\", function($scope) {\n $scope.books =...
javascript
chosen
[ { "from": "system", "value": "[babel] Move default plugins to before\n" }, { "from": "human", "value": "/**\n * Copyright 2013-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 the root directory of thi...
javascript
chosen
[ { "from": "system", "value": "Add tests for Select component\n\nAdd `SelectComponent.setValue` tests to ensure that\ninput value and component value get cleared when\n`setValue` called with empty value.\n" }, { "from": "human", "value": "import Harness from '../../../test/harness';\nimport Selec...
javascript
chosen
[ { "from": "system", "value": "Disable varsnap JS tests for now\n" }, { "from": "human", "value": "const expect = require('chai').expect;\nconst process = require('process');\nconst varsnap = require('varsnap');\n\nvarsnap.updateConfig({\n varsnap: process.env.VARSNAP,\n env: process.env.ENVIRO...
javascript
chosen
[ { "from": "system", "value": "Remove the fetch event DSL\n" }, { "from": "human", "value": "export const PROJECT_REVISION = '{{PROJECT_REVISION}}';\nexport const VERSION = '{{BUILD_TIME}}';\n\nlet FETCH_HANDLERS = [];\n\nself.addEventListener('fetch', function fetchEventListenerCallback(event) {...
javascript
chosen
[ { "from": "system", "value": "Fix polygon handler to show correct label text\n" }, { "from": "human", "value": "L.Polygon.Draw = L.Polyline.Draw.extend({\n\tPoly: L.Polygon,\n\n\toptions: {\n\t\tshapeOptions: {\n\t\t\tstroke: true,\n\t\t\tcolor: '#f06eaa',\n\t\t\tweight: 4,\n\t\t\topacity: 0.5,\...
javascript
chosen
[ { "from": "system", "value": "Add SMS terms & conditions\n" }, { "from": "human", "value": "$(document).on('can_embed_loaded', function () {\n console.log('Form loaded.');\n phoneField = $('#phone');\n zipField = $('#form-zip_code');\n emailField = $('#form-email');\n theForm = $('form#new_...
javascript
chosen
[ { "from": "system", "value": "Add play and pause to data emitter\n" }, { "from": "human", "value": "const { UPLOAD_PERIOD } = require('../../simulation/constants');\n\nAFRAME.registerComponent('data-emitter', {\n schema: {\n characterId: {default: window.characterId},\n simulationAttribut...
javascript
chosen
[ { "from": "system", "value": "Add semicolon to match code style rules\n" }, { "from": "human", "value": "/**\n * Run a function on every insertion of an iframe on the current document\n * @param {object} currentDocument The document interface where to start\n * the Mutation Observer\n * @param {...
javascript
chosen
[ { "from": "system", "value": "Fix lecturerService being spelled wrong for logging out\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular\n .module('lecturer')\n .factory('lecturerFactory', lecturerFactory);\n\n /* @ngInject */\n function lectur...
javascript
chosen
[ { "from": "system", "value": "Correct HackCWRU spelling to hackCWRU\n" }, { "from": "human", "value": "import React from 'react';\nimport styles from 'components/Summary/Summary.scss';\n\nexport default class Summary extends React.Component {\n\n render() {\n return (\n \t<div className={...
javascript
chosen
[ { "from": "system", "value": "Fix running blueprint when entityName is not specified\n" }, { "from": "human", "value": "/*jshint node:true*/\nmodule.exports = {\n description: 'ember-cli-tooltipster',\n\n afterInstall: function(options) {\n return this.addBowerPackageToProject('tool...
javascript
chosen
[ { "from": "system", "value": "[*] Switch to requirejs alternate syntax" }, { "from": "human", "value": "define(function(require) {\n \n var $ = require('jquery');\n var _ = require('underscore');\n var Backbone = require('backbone');\n var Thorax = require('thorax');\n var Colle...
javascript
chosen
[ { "from": "system", "value": "Add sk.args() for processing function arguments by synopses\n" }, { "from": "human", "value": ";(function(sk){" }, { "from": "gpt", "value": ";(function(sk){\n\nsk.args = function(args){\n\tvar synopses = [], out, defaults = {};\n\tfor(var i = 1; i < arg...
javascript
chosen
[ { "from": "system", "value": "Add block form test for assertTooltipContent\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\nimport { assertTooltipContent } from '../../helpers/ember-tooltips';\n\nmoduleForC...
javascript
chosen
[ { "from": "system", "value": "Add try…catch block to track\n" }, { "from": "human", "value": "import { addCallback } from 'meteor/vulcan:core';\n\nexport const initFunctions = [];\n\nexport const trackFunctions = [];\n\nexport const addInitFunction = f => {\n initFunctions.push(f);\n // execut...
javascript
chosen
[ { "from": "system", "value": "Remove setupWebServer call from borq\n\nSetting up the webserver and spawning a bot is better handled by a\nspecific bot that way it can have additional endpoints.\n\nSigned-off-by: Njagi Mwaniki <b6a4ba60ad861b9c9afb6daea7294be4be68f44c@urbanslug.com>\n" }, { "from": "...
javascript
chosen
[ { "from": "system", "value": "Add functions to handle ajax call\n" }, { "from": "human", "value": "\n\n$(function () {\n // Hide unnecessary div for DTM\n $('#normalize-options').css({'visibility': 'hidden'})\n // set the normalize option to raw count\n $('#normalizeTypeRaw').attr('checked',...
javascript
chosen
[ { "from": "system", "value": "Check the presence of focus on the window reference\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/share-button';\n\nexport default Ember.Component.extend({\n layout: layout,\n tagName: 'button',\n title...
javascript
chosen
[ { "from": "system", "value": "Use what isDark is doing under the hood\n" }, { "from": "human", "value": "import parse from \"./parse\";\nimport relativeLuminance from \"./relativeLuminance\";\n\nconst contrast = (color, dark = parse(\"#000\"), light = parse(\"#FFF\")) => {\n const baseColor = p...
javascript
chosen
[ { "from": "system", "value": "Use imported constants in middleware\n" }, { "from": "human", "value": "const _SUCCESS = '_SUCCESS'\nconst _ERROR = '_ERROR'\nconst pendingIds = {} // requestIDs to timeoutIDs\nlet nextRequestID = 0\n\nexport default function createSocketMiddleware(socket, prefix) {...
javascript
chosen
[ { "from": "system", "value": "Add constant; fix var name\n" }, { "from": "human", "value": "import { _ERROR } from 'constants'\nconst pendingIds = {} // requestIDs to timeoutIDs\nlet nextRequestID = 0\n\nexport default function createSocketMiddleware (socket, prefix) {\n return ({ dispatch }) =...
javascript
chosen
[ { "from": "system", "value": "Clean up the clean up \n\nTypo :(" }, { "from": "human", "value": "(function () {\n\tCKEDITOR.plugins.add('structuredheadings', {\n\t\ticons: 'structuredheadings',\n\t\tinit: (editor) => {\n\t\t\t// The command to add an autonumbering class\n\t\t\teditor.addCommand(...
javascript
chosen
[ { "from": "system", "value": "Implement privileged functions for executing OAuth methods with ze secrets\n" }, { "from": "human", "value": "'use strict';\n\nvar OAuth = require('OAuth');\nvar querystring = require('querystring');\n\n// Wrapper for the OAuth 1.0 consumer used to make authenticate...
javascript
chosen
[ { "from": "system", "value": "Use $document and don't try to add or remove if the element is not found\n" }, { "from": "human", "value": "(function () {\n \"use strict\";\n\n function focusLockService() {\n var elementToInert = document.querySelector('#mainwrapper');\n\n func...
javascript
chosen
[ { "from": "system", "value": "Set loaded flag on a task to false. Only load the task template if the task is clicked on (preloading the templates for all tasks is an expensive operation when there are a decent (20+) number of tasks).\n" }, { "from": "human", "value": "angular.module('materialsco...
javascript
chosen
[ { "from": "system", "value": "Refactor generation of posts into method\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { fetchPosts } from '../actions';\nimport Post from '../components/Post';\n\n// Smart component\ncla...
javascript
chosen
[ { "from": "system", "value": "Set connection driver as `postgres` by default.\n" }, { "from": "human", "value": "import typeorm from 'typeorm';\nimport {\n resetCache\n} from '../src';\nimport User from './entity/UserSchema';\n\nbeforeEach(resetCache);\n\n\nexport const createConnection = () ...
javascript
chosen
[ { "from": "system", "value": "Add layouts route to routes module\n" }, { "from": "human", "value": "module.exports = {\n base : require('./base'),\n forms : require('./forms'),\n grids : require('./grids'),\n home : require('./home'),\n lists : require('./lists'),\n tables: re...
javascript
chosen
[ { "from": "system", "value": "Use variables to cache values\n" }, { "from": "human", "value": "import React from 'react';\n\nexport class Checkbox extends React.PureComponent {\n\n handleToggle = () => {\n this.props.handleToggle(this.props.node);\n }\n\n render() {\n if (this.props.nod...
javascript
chosen
[ { "from": "system", "value": "Fix proptype checking in wallet recovery instructions component\n" }, { "from": "human", "value": "// @flow\nimport React, { Component, PropTypes } from 'react';\nimport { observer } from 'mobx-react';\nimport styles from './WalletRecoveryInstructions.scss';\n\n@obs...
javascript
chosen
[ { "from": "system", "value": "Use rmtree and mkdir function instead of rm -rf and mkdir to make the code more\nportable.\n" }, { "from": "human", "value": "/*\n * Licensed to Cloudkick, Inc ('Cloudkick') under one or more\n * contributor license agreements. See the NOTICE file distributed with\...
javascript
chosen
[ { "from": "system", "value": "Move ModuleConcatenationPlugin to the end of plugins list\n" }, { "from": "human", "value": "import webpack from 'webpack';\nimport UglifyJSPlugin from 'uglifyjs-webpack-plugin';\n\nmodule.exports = (\n { target },\n { vendor = target.name === 'browsers', manifest...
javascript
chosen
[ { "from": "system", "value": "Test if git allows push from vscode\n" }, { "from": "human", "value": "function authUser() {\n fetch('/login')\n .then(response => response.json())\n .then(userAuthInfo => {\n if(userAuthInfo.isLoggedIn) {\n console.log(\"User is logged ...
javascript
chosen
[ { "from": "system", "value": "Update Chakra regex to grab latest version\n\nFixes #31. Closes #32." }, { "from": "human", "value": "// Copyright 2017 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the “License”);\n// you may not use this file except in compliance with the Li...
javascript
chosen
[ { "from": "system", "value": "Test incorrect creation of attributes." }, { "from": "human", "value": "describe(\"Species;\", function() {\n var Human, bob;\n\n beforeEach(function() {\n Human = Species({\n bringToLife: function() {\n return function(name) {\n this.name ...
javascript
chosen
[ { "from": "system", "value": "Improve message for recovered dirty state.\n" }, { "from": "human", "value": "// @flow\nimport React from \"react\";\nimport { connect } from \"react-redux\";\nimport Dialog from \"material-ui/Dialog\";\nimport FlatButton from \"material-ui/FlatButton\";\nimport { i...
javascript
chosen
[ { "from": "system", "value": "Check if a track is playing\n" }, { "from": "human", "value": "import React from 'react';\nimport './RecentTracks.css';\nimport RecentTrack from './RecentTrack.js';\nimport _map from 'lodash/map';\nimport {\n fetchRecentTracks\n} from '../actions/action-creators';\...
javascript
chosen
[ { "from": "system", "value": "Edit sentence list to show a detail\n" }, { "from": "human", "value": "import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst SentenceList = ({sentences, isLoading}) => (\n <div>\n {isLoading ? (\n <img alt='loading' src='/img/loading.gif' /...
javascript
chosen
[ { "from": "system", "value": "Use bluebird Promise library in node-fetch > Response\n" }, { "from": "human", "value": "/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT...
javascript
chosen
[ { "from": "system", "value": "Add `ellipsis` prop & conditionally apply the `overflow-ellipsis` class from `ui-typography`\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\nimport Box from '../box';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames'...
javascript
chosen
[ { "from": "system", "value": "Remove continuous test grunt task in favor of single-run test\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n jshint: {\n all: [\n 'Gruntfile.js',\n ...
javascript
chosen
[ { "from": "system", "value": "Update grunt to use bower_components\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // 1. All configuration goes here\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n sass: {\n options: {\n sou...
javascript
chosen
[ { "from": "system", "value": "Break up 'default' task into 'default' and 'watch', so that traditional build processes can work\n" }, { "from": "human", "value": "module.exports = function(grunt){\n grunt.loadNpmTasks('grunt-contrib-coffee');\n grunt.loadNpmTasks('grunt-contrib-watch');\n\n...
javascript
chosen
[ { "from": "system", "value": "Use getElasticsearchData method / reactive variable\n" }, { "from": "human", "value": "import { ReactiveVar } from 'meteor/reactive-var'\nimport { Template } from 'meteor/templating';\n\nTemplate.dashboard.onCreated(function () {\n // Get reference to template inst...
javascript
chosen
[ { "from": "system", "value": "Modify `open`function to use sanitize hash" }, { "from": "human", "value": "var _window = (typeof window !== 'undefined' && window) || null;\n\nexport function open(uri, name) {\n var df = this.context.dataflow;\n if (_window && _window.open) {\n df.loader().sa...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded collections that are actually subdocuments\nChange name of classes collection to courses for consistency\n" }, { "from": "human", "value": "const dbConnection = require(\"./mongoConnection\");\n\nlet getCollectionFn = (collection) => {\n\tlet _col = ...
javascript
chosen
[ { "from": "system", "value": "Add Reference list model for Media Eligibilities.\n" }, { "from": "human", "value": "var keystone = require('keystone'),\n\tTypes = keystone.Field.Types;\n\n// Create model. Additional options allow menu name to be used what auto-generating URLs\nvar MediaEligibilit...
javascript
chosen
[ { "from": "system", "value": "Fix error for the first days of the month.\n" }, { "from": "human", "value": "function update_audio() {\n var audioplayer = document.getElementById(\"audioplayer\");\n var src = \"http://telechargement.rfi.fr.edgesuite.net/rfi/francais/audio/journaux/r001/jour...
javascript
chosen
[ { "from": "system", "value": "Adjust unit test for new props webpage\n" }, { "from": "human", "value": "import DomMock from '../../helpers/dom-mock';\nimport jsdom from 'mocha-jsdom';\nimport expect from 'expect';\nimport React from 'react';\nimport TestUtils from 'react-addons-test-utils';\nimp...
javascript
chosen
[ { "from": "system", "value": "Fix formatRelative in Latvian locale\n" }, { "from": "human", "value": "import isSameUTCWeek from '../../../../_lib/isSameUTCWeek/index.js'\nvar weekdays = [\n 'svētdienā',\n 'pirmdienā',\n 'otrdienā',\n 'trešdienā',\n 'ceturtdienā',\n 'piektdienā',\n 'sestdi...
javascript
chosen
[ { "from": "system", "value": "Add cost element to the event detail\n" }, { "from": "human", "value": "chrome.identity.getAuthToken({ 'interactive': true }, function(token) {\n console.log(\"token\" + token);\n});\n\nvar encoded = $(\"div.ep[data-eid]\").attr(\"data-eid\");\nif (encoded !== un...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix no duplicate property interp issue\n" }, { "from": "human", "value": "'use strict';\n\nvar helpers = require('../helpers');\n\nmodule.exports = {\n 'name': 'no-duplicate-properties',\n 'defaults': {\n 'exclude': []\n },\n 'detect': function (ast, pa...
javascript
chosen
[ { "from": "system", "value": "Change default button ripple color to almost-black\n" }, { "from": "human", "value": "import { createMuiTheme } from '@material-ui/core/styles'\n\n// Theme\nconst primaryMainColor = '#9d4ba3'\nconst primaryContrastTextColor = '#fff'\nconst secondaryMainColor = '#4a9...
javascript
chosen
[ { "from": "system", "value": "Support configuring the host and port of devserver\n\nThe HOST and PORT env variables may now be used to explicitly set the\nhost and port.\n\nSigned-off-by: Byron Ruth <e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98@devel.io>\n" }, { "from": "human", "value": "export def...
javascript
chosen
[ { "from": "system", "value": "Add preview and share handlers. Share is still broken\n\nSigned-off-by: Kaustav Das Modak <ba1ce5b1e09413a89404909d8d270942c5dadd14@yahoo.co.in>\n" }, { "from": "human", "value": "(function () {\n\n app(function (api) {\n\n api.on(\"load:detail\", function...
javascript
chosen
[ { "from": "system", "value": "Test visits last 7 days metric\n" }, { "from": "human", "value": "describe(\"visits-metric\", function() {\r\n\r\n it(\"compiles\", function() {\r\n expect(this.element.html()).toBeDefined();\r\n });\r\n\r\n it(\"has the supplied title\", function() {\r\n e...
javascript
chosen
[ { "from": "system", "value": "Fix one missed logger instance\n" }, { "from": "human", "value": "'use strict';\n\nconst Worker = require('./Worker');\n\nclass FetchWorker extends Worker {\n\n constructor(blink) {\n super(blink);\n this.blink = blink;\n }\n\n setup() {\n this.queue = t...
javascript
chosen
[ { "from": "system", "value": "Add unit test for catchcatch() method\n" }, { "from": "human", "value": "'use strict';\n\nimport moduleName from '../../../../Frontend/js/app/angular/name';\n\ndescribe('Controllers', function() {\n let $controller;\n let $rootScope;\n\n beforeEach(function() {\n...
javascript
chosen
[ { "from": "system", "value": "Add a warning about being in early demo stage\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport Relay from 'react-relay';\nimport { Link } from 'react-router';\nimport FontAwesome from 'react-fontawesome';\nimport TeamRo...
javascript
chosen
[ { "from": "system", "value": "Add margin for vault label\n" }, { "from": "human", "value": "/* @flow */\n\nimport { BUTTON_LABEL, CLASS } from '../../../constants';\n\nexport const labelStyle = `\n\n .${ CLASS.BUTTON }.${ CLASS.LABEL }-${ BUTTON_LABEL.CARD } {\n border-radius: 0 !impor...
javascript
chosen
[ { "from": "system", "value": "Revert \"Added new version of stub registrator.\"\n\nThis reverts commit f1290352576071e93fc0b543d3ae6fafd2987ead.\n" }, { "from": "human", "value": "// ==UserScript==\n// @name BWI And GD SSN Registration for Stub server\n// @namespace bwin.it registratio...
javascript
chosen
[ { "from": "system", "value": "Test now failing in the correct way.\n" }, { "from": "human", "value": "var expect = require('expect');\nvar getDays = require('../getDays');\nvar moment = require('moment');\n\ndescribe('getDays', () => {\n it('should align weeks with the correct start days of wee...
javascript
chosen
[ { "from": "system", "value": "Add results to result table\nDisplay table when results are loaded\n" }, { "from": "human", "value": "$(document).ready(function(){\n\t$('#form').submit(function(e){\n\t\te.preventDefault();\n\t\tvar query = $('#query').val();\n\t\tvar docs = [];\n\t\t$.get('/search...
javascript
chosen
[ { "from": "system", "value": "Make button list more fault tolerant\n" }, { "from": "human", "value": "// ==UserScript==\n// @name Selfish Youtube\n// @namespace https://github.com/ASzc/selfish-youtube\n// @description On the watch page, remove the share panel.\n/...
javascript
chosen
[ { "from": "system", "value": "Improve the performance of attribute parsing for .b3dm\n\nThe previous implementation would use a lot of string allocations which\nwould cause the garbage collector to kick in often and that was a major\nfit for performance.\n\nThis patch fixes the issue by using the built-in T...
javascript
chosen
[ { "from": "system", "value": "Add addEventListener to test browser env setup\n" }, { "from": "human", "value": "import { jsdom } from 'jsdom';\n\nglobal.document = jsdom(`\n <body></body>\n`);\n\nglobal.window = document.defaultView;\nglobal.navigator = window.navigator;\n" }, { "from...
javascript
chosen
[ { "from": "system", "value": "Add Orbit.pluralize and Orbit.singularize methods for testing." }, { "from": "human", "value": "import Orbit from 'orbit/main';\nimport { Promise } from 'rsvp';\nimport jQuery from 'jquery';\n\nOrbit.Promise = Promise;\nOrbit.ajax = jQuery.ajax;\n" }, { "fro...
javascript
chosen
[ { "from": "system", "value": "Update hard-coded rate of challenge completion to reflect recent acceleration\n" }, { "from": "human", "value": "import dedent from 'dedent';\nimport moment from 'moment';\n\nimport { observeMethod } from '../utils/rx';\n\nfunction numberWithCommas(x) {\n return x....
javascript
chosen
[ { "from": "system", "value": "Handle errors if redis is not available\n" }, { "from": "human", "value": "var redis = require(\"redis\");\n\nvar cache = null;\nvar settings = null;\n\nvar pub = redis.createClient();\nvar sub = redis.createClient();\n\nfunction init(_settings, handle) {\n setti...
javascript
chosen
[ { "from": "system", "value": "Set the width and height to the window\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n game: {\n width: 1920,\n height: 1080,\n },\n};\n" }, { "from": "gpt", "value": "/* eslint-env browser */\n\n'use strict';\n\nmodule....
javascript
chosen