conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make s.effify handle empty msg\n"
},
{
"from": "human",
"value": "\nmodule.exports = {\n effify: (message, _, msg) => {\n const effify = (str) => {\n const dict = {\n 'á': 'a',\n 'é': 'e',\n 'í': 'i',... | javascript | chosen |
[
{
"from": "system",
"value": "Add synchronous ForeignFunction test case.\n"
},
{
"from": "human",
"value": "\nvar expect = require('expect.js')\n , ffi = require('../')\n\ndescribe('ForeignFunction', function () {\n\n describe('async', function () {\n\n it('should call static \"abs\" bindin... | javascript | chosen |
[
{
"from": "system",
"value": "Fix docs on test name truncation\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\nvar fs = require('fs');\n\nfunction uniqueFile(file) {\n var testPath = file;\n var counter = null;\n while (fs.existsSync(testPath + '.png')) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add assertion message to acceptance tests\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { test } from 'qunit';\nimport moduleForAcceptance from '../../tests/helpers/module-for-acceptance';\n\nconst { $ } = Ember;\n\n// Original images sizes (... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for security policy messages\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n Ember... | javascript | chosen |
[
{
"from": "system",
"value": "Update: Refactor Javascript Filter to match best practices\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('<%= scriptAppName %>')\n .filter('<%= cameledName %>', function () {\n return function (input) {\n return '<%= cameledName %> filt... | javascript | chosen |
[
{
"from": "system",
"value": "Add eslint for js files (fix eslint error)\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n\nrequire('../dist')\n .run(process.argv.slice(2))\n .catch(() => {\n process.exit(1);\n });\n"
},
{
"from": "gpt",
"value": "#! /usr/bin/env node\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use http protocol for Avatar\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from \"react\"\nimport { baseUrl } from \"../../../config\"\nimport joinUri from \"join-uri\"\n\nexport default class Avatar extends Component {\n static propType... | javascript | chosen |
[
{
"from": "system",
"value": "IMCMS-290: Add a \"pin\" icon to imCMS's panel:\n- Implemented streams module.\n"
},
{
"from": "human",
"value": "/**\n * Streams with pub/sub principle\n *\n * @author Serhii Maksymchuk from Ubrainians for imCode\n * 10.05.18\n */\nImcms.define('imcms-streams', [],... | javascript | chosen |
[
{
"from": "system",
"value": "Test that the third parameter to the function is a reference to the array\n"
},
{
"from": "human",
"value": "\nbeforeEach(function() {\n\tthis.array = [0, 2, 4, 6, 8, 10, 12, 14];\n});\n\nit(\"Should accept a function with three parameters: the value of the element,... | javascript | chosen |
[
{
"from": "system",
"value": "Increase maxBuffer to 10MB when compiling using native compiler\n"
},
{
"from": "human",
"value": "const { execSync } = require(\"child_process\");\nconst LoadingStrategy = require(\"./LoadingStrategy\");\nconst VersionRange = require(\"./VersionRange\");\n\nclass N... | javascript | chosen |
[
{
"from": "system",
"value": "Update reducer naming in combine reducers\n"
},
{
"from": "human",
"value": "import { combineReducers, createStore } from 'redux'\nimport auth from '../modules/Auth/reducer'\nimport households from '../modules/Households/reducer'\nimport members from '../modules/Mem... | javascript | chosen |
[
{
"from": "system",
"value": "Fix case of command name\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Subscript = require('./Subscript');\nvar SubscriptHTMLConverter = require('./SubscriptHTMLConverter');\nvar SubscriptXMLConverter = require('./SubscriptXMLConverter');\nvar AnnotationCo... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing metrics.js for worker\n"
},
{
"from": "human",
"value": "/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\n\n'use strict';\n\nimportScripts('console.js');... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug, Shuttle exports Main as `sink`.\n"
},
{
"from": "human",
"value": "var coalesce = require('./coalesce')\nvar assert = require('assert')\nvar fs = require('fs')\nvar path = require('path')\nvar util = require('util')\n\nvar main = require('prolific.main')\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove mistakenly added testing line.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction Kablammo() {\n // When hit is to complement of nucleotide sequence (whether for query or\n // subject), we will show the HSPs relative to the coordinates of the\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure not to scale null values\n"
},
{
"from": "human",
"value": "function halfBandwidth(scale: Function): number {\n if(scale.bandwidth) {\n return scale.bandwidth() / 2;\n }\n return 0;\n}\n\n\n/**\n * applyScaledValue\n *\n * Because primitive... | javascript | chosen |
[
{
"from": "system",
"value": "Add _init check for Vue.http being set"
},
{
"from": "human",
"value": "module.exports = {\n \n _interceptor: function (req, res) {\n var _this = this;\n\n this.options.Vue.http.interceptors.push(function (request, next) {\n if (req) {... | javascript | chosen |
[
{
"from": "system",
"value": "Use Chai to assert CLI\n"
},
{
"from": "human",
"value": "/* global describe, it */\n\nimport {exec} from '../../../src/utils/util';\nimport assert from 'assert';\n\ndescribe(\"Oi CLI\", () => {\n\n it(\"can be invoked\", () => {\n const result = exec('node dist... | javascript | chosen |
[
{
"from": "system",
"value": "Add mutation detection in dev by default\n"
},
{
"from": "human",
"value": "import { createStore, compose, applyMiddleware, combineReducers } from 'redux'\nimport { composeWithDevTools } from 'redux-devtools-extension'\nimport thunk from 'redux-thunk'\n\nimport isPl... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused moment locales from webpack bundle\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar fs = require('fs');\nvar ExtractTextPlugin = require('extract-text-webpack-plugin');\n\nmodule.exports = {\n entry: path.join(__dirname, 'src/fron... | javascript | chosen |
[
{
"from": "system",
"value": "Fix payload sent to RabbitMQ.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst amqplib = require('amqplib');\nconst amqpUri = require('amqp-uri');\n\n\n/**\n * Nortstar client service.\n */\nmodule.exports = {\n /**\n * Configure RabbitMQ client.\n */\... | javascript | chosen |
[
{
"from": "system",
"value": "Use _.each instead of forEach\n\nTo be sure that IE8 and other older browers will not complain.\n"
},
{
"from": "human",
"value": "/**\n *\n * Displays a single property of an object.\n *\n * ## Examples\n *\n * <div\n * data-hull-widget=\"property@hull... | javascript | chosen |
[
{
"from": "system",
"value": "Sort titles by lower case\n"
},
{
"from": "human",
"value": "\"use strict\";\n/**\n * Collection of spines.\n **/\n define([\n \"underscore\",\n \"backbone\"\n], function(_, Backbone) {\n\n var SpineCollection = Backbone.Collection.extend({\n filter... | javascript | chosen |
[
{
"from": "system",
"value": "Move machines to separate files\n"
},
{
"from": "human",
"value": "import { createMachine, interpret } from 'xstate';\nimport './style.css';\n\nconst app = document.querySelector('#app');\n\napp.innerHTML = `\n <h1>XState JavaScript Template</h1>\n <p>Open the con... | javascript | chosen |
[
{
"from": "system",
"value": "Remove export methods as they are in utils now.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PersonCard from '../people/PersonCard'\nimport PersonGrid from '../people/PersonGrid'\nimport { parsePost } from '../posts/PostParser'\nimport { getL... | javascript | chosen |
[
{
"from": "system",
"value": "Remove link to unused color palette"
},
{
"from": "human",
"value": "// http://www.colourlovers.com/palette/3459622/Flowering_Tiles\n\nvar $elements = {\n game_over: document.getElementById('game_over'),\n you_won: document.getElementById('you_won'),\n};\nvar canv... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for current environment display\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Prismic = require('./prismic');\nconst Predicates = require('prismic.io').Predicates;\nconst _ = require('lodash');\n\nconst getQuotes = (api) => api\n .form('everything... | javascript | chosen |
[
{
"from": "system",
"value": "Update js so info box doesn't scroll after window size is < 1000px\n"
},
{
"from": "human",
"value": "function dayOfWeek(){var n=new Date,e=[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"];return e[n.getDay()]}window.onload=func... | javascript | chosen |
[
{
"from": "system",
"value": "Set meta-name for sheet as \"styled-jss\"\n"
},
{
"from": "human",
"value": "import styled from './styled'\n\nimport type {\n BaseStylesType,\n ComponentStyleType,\n StyledType,\n StyledElementAttrsType,\n StyledElementType,\n TagNameOrStyledElementType\n} fro... | javascript | chosen |
[
{
"from": "system",
"value": "Update Post tests to match rendered output\n"
},
{
"from": "human",
"value": "import { expect } from 'chai';\nimport { shallow, mount } from 'enzyme';\nimport React from 'react';\nimport { Post } from '../../src/js/components/Post';\n\n\ndescribe('<Post/>', () => {\... | javascript | chosen |
[
{
"from": "system",
"value": "Use constants instead of magic numbers\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* global Connector */\n\nvar trackInfo = null;\n\nfunction updateTrackInfo() {\n\ttrackInfo = JSON.parse(localStorage.getItem('audio_v10_track'));\n}\n\n/**\n * Decodes HTML ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a maximum hue for link color\n"
},
{
"from": "human",
"value": "define([\n './module',\n 'jquery',\n 'text!./link.html'\n], function(directives, $, linkTpl) {\n 'use strict';\n\n directives.directive('zoriLink', ['$interval',\n function($in... | javascript | chosen |
[
{
"from": "system",
"value": "Test Jump Search: Test coverage improved to 94.12\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\nconst jumpsearch = require('../../../src').algorithms.Searching.jumpsearch;\nconst assert = require('assert');\n\ndescribe('Jump Search', () => {\n it('shou... | javascript | chosen |
[
{
"from": "system",
"value": "Add file name and some (subjective) readability in the log\n"
},
{
"from": "human",
"value": "function maybeLog(log, links) {\n links.forEach((link) => {\n if (link.broken) {\n log(link.description)\n }\n })\n}\n\nfunction maybeThrow(links) {\n const b... | javascript | chosen |
[
{
"from": "system",
"value": "Fix empty window on very first open\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport Dispatcher from '../utils/front-end-dispatcher';\nimport SimpleButton from './simple-button'\n\nvar EmptySitesList = React.createClass({\n reque... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong settings gradle patch\n\nsettings.gradle is not always inside sourceDir. Since we already expose explicit path to it, using it is easier and safer. Fixes #23"
},
{
"from": "human",
"value": "const path = require('path');\n\nmodule.exports = function makeSe... | javascript | chosen |
[
{
"from": "system",
"value": "Use currentUser service to set session.profileId\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';\n\nimport ExpPlayerRouteMixin from 'exp-player/mixins/exp-player... | javascript | chosen |
[
{
"from": "system",
"value": "Remove \"function()\" from database-files. Why was it inserted in the first place?\n"
},
{
"from": "human",
"value": "var esformatter = require('esformatter');\nvar stringify = require(\"json-literal\").stringify;\nvar fs = require(\"fs\");\nvar path = require(\"pat... | javascript | chosen |
[
{
"from": "system",
"value": " Fix bug and update the return value ( port ).\n\n Changes to be committed:\n modified: src/lib/edge/telegram/commandHandler.js\n"
},
{
"from": "human",
"value": "\nmodule.exports = (function(){\n\n function parseCommandOption( args ){\n\n var options... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"updating banner for webinar\"\n\nThis reverts commit 2c4a801b7de8857a1cd58c40f1d7ff8be951102c.\n"
},
{
"from": "human",
"value": "export const ALERT_BANNER_ACTIVE = true\n\n// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner\nex... | javascript | chosen |
[
{
"from": "system",
"value": "Fix incorrect id assign in Timelane\n"
},
{
"from": "human",
"value": "// @flow\nimport _ from 'lodash'\nimport ProxySet from './_proxy-set'\n\nimport type Project from './project'\nimport type Composition from './composition'\nimport Layer from './layer'\n\nexport ... | javascript | chosen |
[
{
"from": "system",
"value": "Change image-width and image-height sass function return type to number"
},
{
"from": "human",
"value": "var sizeOf = require('image-size');\nvar sass = require('node-sass');\nvar project = require('../../package.json');\nvar config = require('../config.js');\n\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Use factory instead of provider\n"
},
{
"from": "human",
"value": "(function (angular, undefined) {\n \n angular.module('expression-builder')\n .provider('expressionBuilder', ExpressionBuilderProvider);\n \n ExpressionBuilderProvider.$inject = [];... | javascript | chosen |
[
{
"from": "system",
"value": "Fix argument read node to be context node\n\nSigned-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction ArgumentReadNode(argIndex) {\n assert(argIndex >= 0);\n\n this.execut... | javascript | chosen |
[
{
"from": "system",
"value": "Add background color for loading photos\n"
},
{
"from": "human",
"value": "import { withStyles } from '@material-ui/core/styles'\nimport { Link } from 'client/routes'\n\nconst styles = theme => ({\n photo: {\n position: 'absolute',\n textAlign: 'center',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use object without prototype as empty object\n"
},
{
"from": "human",
"value": "import { IS_DEBUG } from './debug';\n\nconst obj = {};\n\nif(IS_DEBUG) {\n Object.freeze(obj);\n}\n\nexport default obj;"
},
{
"from": "gpt",
"value": "import { IS_DEBUG }... | javascript | chosen |
[
{
"from": "system",
"value": "Optimize twitter bootstrap nav-tabs javascript\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and they'll automatical... | javascript | chosen |
[
{
"from": "system",
"value": "Fix usage of start, end properties now prohibited :wrench:\n"
},
{
"from": "human",
"value": "const createFixer = ({range, left, right, operator}, source) => fixer => {\n const {start: leftStart, end: leftEnd} = left;\n const {start: rightStart} = right;\n const ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo selectedSting to selectedString"
},
{
"from": "human",
"value": "(function () {\n function CreateNotifyController(\n $scope,\n contentResource,\n navigationService,\n angularHelper) {\n var vm = this;\n var curre... | javascript | chosen |
[
{
"from": "system",
"value": "Move the transform to a separate function\n"
},
{
"from": "human",
"value": "import Injector from 'lib/Injector';\nimport { fileInterface, file, folder } from 'lib/fileFragments';\nimport { buildQueryConfig as buildCreateFolderConfig } from 'state/files/createFolder... | javascript | chosen |
[
{
"from": "system",
"value": "Read iceServers from the querystring\n"
},
{
"from": "human",
"value": "var qs = require('querystring');\nvar defaults = require('cog/defaults');\nvar quickconnect = require('rtc-quickconnect');\nvar getUserMedia = require('getusermedia');\n\nvar params = defaults(q... | javascript | chosen |
[
{
"from": "system",
"value": "Prepare player store for refactoring\n"
},
{
"from": "human",
"value": "import {observable, computed, reaction} from 'mobx';\n\n\nexport default class PlayerStore {\n\t@observable player = {\n\t name: 'Willy'\n };\n\t@observable level = 1;\n\n\t@computed get c... | javascript | chosen |
[
{
"from": "system",
"value": "Return a date object from unstamp()\n"
},
{
"from": "human",
"value": "// stamper.js\n//\n// Make and invert standard timestamps\n//\n// Copyright 2012, StatusNet Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this... | javascript | chosen |
[
{
"from": "system",
"value": "Add hidden false for the role created via UI\n\nhttps://github.com/rancher/rancher/issues/10952\n"
},
{
"from": "human",
"value": "import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport { get } from '@ember/object';\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for JSON-RPC notifications\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { validatePayload } = require('./validate');\n\n// Use JSON-RPC-specific logic to parse the request into an\n// rpc-agnostic `rpcDef`\nconst handler = function ({ payloa... | javascript | chosen |
[
{
"from": "system",
"value": "Move footer to right side\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport styled from 'styled-components'\nimport {\n Navbar, Nav, NavItem, NavLink,\n} from 'reactstrap';\nimport { LinkContainer } from 'react-router-bootstrap'\... | javascript | chosen |
[
{
"from": "system",
"value": "Docs: Fix a typo in maximumNumberOfLines\n\nCloses gh-1660\n"
},
{
"from": "human",
"value": "/**\n * Requires the file to be at most the number of lines specified\n *\n * Type: `Integer`\n *\n * Values:\n* - `Integer`: file should be at most the number of lines sp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug when res.threads is undefined\n"
},
{
"from": "human",
"value": "'use strict';\n/**\n * @file Retrieve threads from the account\n */\n\nvar googleapis = require('googleapis');\n\n// Retrieve all threads associated with this user account,\n// using refresh_... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for app passwords"
},
{
"from": "human",
"value": "const alfy = require('alfy');\nconst bitbucket = require('./bitbucket/core').bitbucket;\n\nconst { clientId, secret } = process.env;\n\nconst ACCESS_TOKEN = 'access_token';\nconst GRANT_TYPE = 'client_cr... | javascript | chosen |
[
{
"from": "system",
"value": "Update the default tor address for OB1.\n"
},
{
"from": "human",
"value": "const defaultSearchProviders = [\n {\n id: 'ob1',\n name: 'OB1',\n logo: '../imgs/ob1searchLogo.png',\n search: 'https://search.ob1.io/search',\n listings: 'https://search.ob1... | javascript | chosen |
[
{
"from": "system",
"value": "Print the error in the iframe\n"
},
{
"from": "human",
"value": "port = undefined\n\nonPortMessage = function (e) {\n data = JSON.parse(e.data);\n\n fetch(data.url, data.requestOptions)\n .then(res => Promise.all([res.headers, res.json()]))\n .then(([headers... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Workaround to deal with an issue in node-webkit where the validate function fails on object literals\"\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar _ = require('lodash');\nvar util = require('util');\n\nvar validateDeprecation = function(value, e... | javascript | chosen |
[
{
"from": "system",
"value": "Implement user aware job controller\n"
},
{
"from": "human",
"value": "module.exports = {\n\n};\n"
},
{
"from": "gpt",
"value": "module.exports = {\n\n find: function(req, res) {\n return Job.find({\n user: req.session.passport.user\n })\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix listing issues (missing semi-colon and use of double quotes)\n"
},
{
"from": "human",
"value": "'use strict';\nmodule.exports = function () {\n return function (scope, element, attrs) {\n element.bind(\"keydown keypress\", function (event) {\n if(event.... | javascript | chosen |
[
{
"from": "system",
"value": "fix(tick-tick): Add support for new TickTick UI\n\nCloses #1514\n"
},
{
"from": "human",
"value": "'use strict';\n\ntogglbutton.render('#task-detail-view:not(.toggl)', { observe: true }, function (\n elem\n) {\n const project = $('#project-setting input', elem).ge... | javascript | chosen |
[
{
"from": "system",
"value": "Revert a JSLint fix: \"\" instead of String works.\n"
},
{
"from": "human",
"value": "/*jslint forin: true */\n\nvar log = console.log;\n\nexports.report = function(file, lint) {\n log(file);\n\n var options = [], key, value,\n i, len, pad, e;\n\n fo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove button component from homepage\n"
},
{
"from": "human",
"value": "/*\n * HomePage\n *\n * This is the first thing users see of our App, at the '/' route\n *\n * NOTE: while this component should technically be a stateless functional\n * component (SFC), hot r... | javascript | chosen |
[
{
"from": "system",
"value": "Move to IPC for log communications\n\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst chalk = require('chalk');\n\nprocess.on('message', (message) => {\n let worker = false;\n let data = {};\n\n if (message.scenario && !worker) {\n let scena... | javascript | chosen |
[
{
"from": "system",
"value": "Set maxWorkers to 2 for example project\n"
},
{
"from": "human",
"value": "/**\n * Metro configuration for React Native\n * https://github.com/facebook/react-native\n *\n * @format\n */\n\nmodule.exports = {\n transformer: {\n getTransformOptions: async () => ({... | javascript | chosen |
[
{
"from": "system",
"value": "Create a Leaflet map in county-map controller\n"
},
{
"from": "human",
"value": "angular.module('earlyVotingApp')\n\n .controller('SelectCountyCtrl', ['$scope', '$http', 'Filter', function ($scope, $http, Filter) {\n\n \t$http.get('models/20150616.json').success(f... | javascript | chosen |
[
{
"from": "system",
"value": "Use getItems to return new list of items after adding\n"
},
{
"from": "human",
"value": "import Item from '../../models/item';\nimport getItems from './getItems';\n\nexport default function addItem(req) {\n return Item.create({\n text: req.body['text'],\n com... | javascript | chosen |
[
{
"from": "system",
"value": "Check for data before broadcasting\n"
},
{
"from": "human",
"value": "var jarvis = jarvis || angular.module('jarvis', ['truncate']);\n\njarvis.controller('EventCtrl', ['$scope',\n function ($scope) {\n 'use strict';\n\n var source = new EventSource('/events')... | javascript | chosen |
[
{
"from": "system",
"value": "Update bad actor list with larger data set, include non case flag\n"
},
{
"from": "human",
"value": "export default /(polonox|poloneix|poloium|polonniex|poloiexx|polonium|blocktrads|blocktrade|bittrexx|bittrexxx|bitrex|bitrexx)\\b/;\n\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Remove override and update token base path\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst { RSVP, run } = Ember;\n\nimport config from '../config/environment';\nimport OAuth2PasswordGrantAuthenticator from 'ember-simple-auth/authenticators/oa... | javascript | chosen |
[
{
"from": "system",
"value": "Add a zero-width word boundary to the start to make it faster\n\n\"\\b\" checks only edge of the words, so it will make the regex faster\nsince it's gonna skip the other locations.\n"
},
{
"from": "human",
"value": "/* This Source Code Form is subject to the terms o... | javascript | chosen |
[
{
"from": "system",
"value": "Remove test for open graph tag that was removed\n"
},
{
"from": "human",
"value": "import { test } from 'qunit';\nimport $ from 'jquery';\nimport { visit } from 'ember-native-dom-helpers';\n\nimport moduleForAcceptance from 'ember-api-docs/tests/helpers/module-for-a... | javascript | chosen |
[
{
"from": "system",
"value": "Print stack when got error on startup.\n"
},
{
"from": "human",
"value": "var argv = require('optimist').argv;\nvar dialog = require('dialog');\nvar path = require('path');\n\n// Start the specified app if there is one specified in command line, otherwise\n// start ... | javascript | chosen |
[
{
"from": "system",
"value": "Print actual error, not [object Object]\n"
},
{
"from": "human",
"value": "const pageConfig = require('../config');\nconst fs = require('fs');\n\nmodule.exports = {\n // Switch to welder-web iframe if welder-web is integrated with Cockpit.\n // Cockpit web service... | javascript | chosen |
[
{
"from": "system",
"value": "lathe[cuboid]: Simplify bounding-box size helper functions.\n"
},
{
"from": "human",
"value": "function sizeBox(geometry) {\n 'use strict';\n\n geometry.computeBoundingBox();\n return geometry.boundingBox.getSize();\n}\n\nfunction widthBox(geometry) {\n 'use str... | javascript | chosen |
[
{
"from": "system",
"value": "Add action$ api to get an action pretty quickly\n"
},
{
"from": "human",
"value": "var originalLookup = Blaze.View.prototype.lookup;\nBlaze.View.prototype.lookup = function(name, options) {\n // FIXME: need a better implementation\n if(name == \"get\") {\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Change perms to use specific validator for badge awarding\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function () {\n return {\n 'cd-badges': {\n 'listBadges': [{\n role: 'none'\n }],\n\n // NOTE: Must be defined b... | javascript | chosen |
[
{
"from": "system",
"value": "Use new send() function arguments\n"
},
{
"from": "human",
"value": "/*jslint node: true */\nvar path = require('path');\nvar logger = require('loge');\nvar send = require('send');\nvar Router = require('regex-router');\n\nvar roots = {\n static: path.join(__dirnam... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with $regex operator\n"
},
{
"from": "human",
"value": "function deepCloneArray(array) {\n return _.map(array, value => {\n if (_.isArray(value)) {\n return deepCloneArray(array);\n } else if (_.isFunction(value)) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix arguments with async functions\n"
},
{
"from": "human",
"value": "const Redis = require('ioredis');\n\nmodule.exports = url => {\n const redis = new Redis(url);\n\n redis.setJSON = async () => {\n arguments[1] = JSON.stringify(arguments[1]);\n if (typeof... | javascript | chosen |
[
{
"from": "system",
"value": "Add GitHub scope to App Constants.\n"
},
{
"from": "human",
"value": "var appConstants = {\n GITHUB_API_USER: 'https://api.github.com/user?access_token=',\n GITHUB_API_REPOS: 'https://api.github.com/user/repo?access_token=',\n PARSE_APP_ID: 'AaX7jjvYNO0hc0DAjy7EH... | javascript | chosen |
[
{
"from": "system",
"value": "Add sinon to global vars\n"
},
{
"from": "human",
"value": "import chai from 'chai';\n\nglobal.chai = chai;\nglobal.expect = chai.expect;\n"
},
{
"from": "gpt",
"value": "import chai from 'chai';\nimport sinon from 'sinon';\n\nglobal.chai = chai;\nglobal... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Send general alert when update is not available\n"
},
{
"from": "human",
"value": "import { ipcMain } from 'electron';\nimport { autoUpdater } from 'electron-updater';\nimport {\n ON_ACCEPT_UPDATE,\n SEND_CHECKING_FOR_UPDATES,\n SEND_ERROR,\n SEND_NEEDS_UPD... | javascript | chosen |
[
{
"from": "system",
"value": "Use async sass render function because it is faster and because there is a problem with the node-sass-magic-importer when using the sync render mode\n"
},
{
"from": "human",
"value": "const autoprefixer = require(`autoprefixer`);\nconst fs = require(`fs`);\nconst ma... | javascript | chosen |
[
{
"from": "system",
"value": "Add File to polyfills list\n"
},
{
"from": "human",
"value": "// Apply Node polyfills as necessary.\nvar window = {\n Date: Date,\n addEventListener: function() {},\n removeEventListener: function() {}\n};\n\nvar location = {\n href: \"\",\n host: \"\",\n host... | javascript | chosen |
[
{
"from": "system",
"value": "js: Move into base JS library one more function.\n\n * Move the setXhrHeader function into the base library.\n\nChange-Id: Id54c0486aeb8ae1d49fc934ba60177a66bfa4187\n"
},
{
"from": "human",
"value": "function setErrorAlert (id, code, reason) {\n /*\n * Pass ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for missing view in design doc\n\nMy Cloudant DB that I replicated to Pouch has design docs with no views present (for some reason).\nFixes nolanlawson/pouchdb-find#100.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar utils = require('../../../utils');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor js to fix bug in the validation\n"
},
{
"from": "human",
"value": "/*\n * Ajax link validator for VZ URL fieldtype\n * by Eli Van Zoeren (http://elivz.com)\n */\n\njQuery(document).ready(function() {\n\tjQuery('.vz_url_field').vzCheckUrl();\n});\n\n\n// jQu... | javascript | chosen |
[
{
"from": "system",
"value": "[usecase] Add test precondition for vehicleinfo\n\n- Add install ico-vic-amb-plugin package precondition.\n"
},
{
"from": "human",
"value": "var step = '<font style=\"font-size:85%\">'\n + '<p>Test Purpose: </p>'\n + '<p>Verifies the device supports t... | javascript | chosen |
[
{
"from": "system",
"value": "Change SIZE to new loader format"
},
{
"from": "human",
"value": "define(function() {\n\n 'use strict';\n \n return function(resource) {\n if (resource.data.length !== 10) {\n console.error('SIZE: expected length 10, got ' + resource.data.length);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set default value for mongoose console serving port @ server configuration.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\n\nvar path = __dirname + '';\nvar port = 8080;\n\napp.use(express.static(path));\napp.get('*', fun... | javascript | chosen |
[
{
"from": "system",
"value": "Set the timeout for mocha correctly when doing `npm test`\n\n"
},
{
"from": "human",
"value": "var fork = require(\"child_process\").fork;\nvar path = require(\"path\");\n\nvar bin = \"./node_modules/.bin/istanbul\";\nvar cov = \"cover --report=lcov --dir=test/cover... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with accounts.length with web interface\n"
},
{
"from": "human",
"value": "define([\"jquery\", \"backbone\", \"ws\"], function($, Backbone, WebServices) {\n\n\tvar user = Backbone.Model.extend({\n\t\turlRoot: WebServices.v1.users,\n\t\tdefaults: {\n\t\t},\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Correct interface definition for nodetype-promisify\n"
},
{
"from": "human",
"value": "declare module \"nodefunc-promisify\" {\n declare function exports<T>(nodefunc: (arg: any, callback: (e: ?Error, result: T) => void) => void) : (arg: any) => Promise<T>;\n}\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Add key prop for SongItem\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react'\nimport SongItem from '../SongItem'\n\nclass SongList extends React.Component {\n static propTypes = {\n fetchSongs: PropTypes.func.isRequired,\n songs: Prop... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.