conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add actions to push notifications\n"
},
{
"from": "human",
"value": "self.addEventListener('push', function(event) {\n console.log('[Service Worker] Push Received');\n console.log(`[Service Worker] Push had this data: \"${event.data.text()}\"`);\n\n const title =... | javascript | chosen |
[
{
"from": "system",
"value": "Remove button on mobile to show static image\n\nStatic images are replaced with chart\nCommented out as temp measure\n"
},
{
"from": "human",
"value": "$(function() { \n // if on mobile inject overlay and button elements\n if ($(\"body\").hasClass(\"viewpo... | javascript | chosen |
[
{
"from": "system",
"value": "Set text color to blue\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\n\nclass NotFind extends Component {\n render() {\n const styles = {\n notFind: {\n display: 'flex',\n flexDirection: 'column',\n alignIt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to correctly display resource not found message when navigating to a non-existent state.\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function() {\n var app = angular.module('pncui', [\n 'ngResource',\n 'ui.router',\n 'pnc.Dashboard',\n 'pnc... | javascript | chosen |
[
{
"from": "system",
"value": "Update course schema to make settings optional\n"
},
{
"from": "human",
"value": "Courses = new Mongo.Collection(\"courses\");\n\nCourses.schema = new SimpleSchema({\n name: {type: String},\n description: {type: String, optional: true},\n listserv: {type: String,... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for the 2 sets that somehow dont have a time on their first rep\n"
},
{
"from": "human",
"value": "// this is here because of legacy issues\n// originally, sets saved their start and end times\n// however, once rep deletion was added, the rest calculation is off... | javascript | chosen |
[
{
"from": "system",
"value": "Fix git URL so Atmosphere shows it"
},
{
"from": "human",
"value": "Package.describe({\n name: 'astrocoders:infinite-scroll',\n version: '0.0.1',\n summary: 'Simple infinite scroll',\n git: 'git@github.com:Astrocoders/meteor-infinite-scroll.git',\n documentatio... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct dependencies for tests\n"
},
{
"from": "human",
"value": "Package.describe({\n git: 'https://github.com/zimme/meteor-active-route.git',\n name: 'zimme:active-route',\n summary: 'Active route helpers',\n version: '2.1.0'\n});\n\nPackage.onUse(function... | javascript | chosen |
[
{
"from": "system",
"value": "Add version contraint for practicalmeteor:mocha\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'practicalmeteor:mocha-console-reporter',\n version: '0.1.0',\n summary: 'A mocha console reporter for running your package tests from the command line w... | javascript | chosen |
[
{
"from": "system",
"value": "Add Changelog podcast to default tracks... for a while\n"
},
{
"from": "human",
"value": "import skin from \"../skins/base-2.91-png.wsz\";\nimport llamaAudio from \"../mp3/llama-2.91.mp3\";\n\n/* global SENTRY_DSN */\n\nconst { hash } = window.location;\nlet config ... | javascript | chosen |
[
{
"from": "system",
"value": "Change import option to dataset -> now we can donwload variants from the same cli\n"
},
{
"from": "human",
"value": "//Biomart Import\n//Usage: node biomart-import.js --specie SPECIE --assembly ASSEMBLY --import IMPORT\n\n//Import dependencies\nvar commandLineArgs =... | javascript | chosen |
[
{
"from": "system",
"value": "Add Route to school detail page\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('berlinerSchulenApp', [\n\t'leaflet-directive',\n\t'ui.router',\n\t'ngMaterial',\n\t'lumx']);\n\nangular.module('berlinerSchulenApp')\n\t.config(function($stateProvide... | javascript | chosen |
[
{
"from": "system",
"value": "Speed up audio extraction by using input seeking\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport { getBinariesPath } from '../util/appPaths';\n\nconst tmp = window.require('tmp-promise');\nconst { spawn } = window.require('child_process');\nconst... | javascript | chosen |
[
{
"from": "system",
"value": "Update to work with makara\n"
},
{
"from": "human",
"value": "var moment = require('moment');\n\n(function(dust) {\n // format\n dust.helpers.moment = function(chunk, context, bodies, params) {\n var type = dust.helpers.tap(params.type, chunk, context) || 'form... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'future_or_past' for the Meetup API scroll parameter.\n\nHopefully this will fix the issue of the blank Meetup section after the meetup begins.\n"
},
{
"from": "human",
"value": "(function($) {\n \"use strict\"; // Start of use strict\n\n var meetupEventsUrl =... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug when dest directory is already existing in temp folder\n"
},
{
"from": "human",
"value": "var gulp = require('gulp')\nvar gulpSequence = require('gulp-sequence')\nvar getEnabledTasks = require('../lib/getEnabledTasks')\nvar os = re... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for windows-specific symlink types\n"
},
{
"from": "human",
"value": "const { prep, Volume } = require('./_common');\n\ndescribe('If a symlink target does not exist', function () {\n it('should throw an ENOENT error with default options', function () {\... | javascript | chosen |
[
{
"from": "system",
"value": "Enable sourcemaps for easier debugging\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack')\n\nvar modules = {\n preLoaders: [\n { test: /\\.js$/, loader: 'eslint-loader', exclude: /node_modules/ }\n ],\n loaders: [\... | javascript | chosen |
[
{
"from": "system",
"value": "Use mapDispatchToProps and bindActionCreators to streamline the dispatch process.\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport Heading from '../components/heading'\nimport Cou... | javascript | chosen |
[
{
"from": "system",
"value": "Return the correct cookie-opt value\n\nPreviously the old value would be returned after setting the new value.\n"
},
{
"from": "human",
"value": "var $ = require('jQuery');\nvar componentEvent = require('kwf/component-event');\nvar cookies = require('js-cookie');\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add specifity to prevent Fuel UX module from installing bower\n"
},
{
"from": "human",
"value": "\nif (process.env.INSTALL_BOWER === 'true') {\n require(\"bower\").commands.install();\n}\n"
},
{
"from": "gpt",
"value": "\nif (process.env.INSTALL_FUELUX... | javascript | chosen |
[
{
"from": "system",
"value": "Add warn method to Logger"
},
{
"from": "human",
"value": "const config = require('./config')\n\nfunction timestamp() {\n return new Date().toISOString()\n}\n\nfunction logMsg(level, msg, args) {\n // eslint-disable-next-line no-console\n console.log(`${timestamp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a typo in a comment :p\n"
},
{
"from": "human",
"value": "/*\n * Include a logger in your module with:\n *\n * var logger = require('triton/core/logging').getLogger(__LOGGER__);\n *\n * This `logger` has methods for each level specified in logging/common.js.\n... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Move article route under articles\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport config from './config/environment';\n\nvar Router = Ember.Router.extend({\n location: config.locationType\n});\n\nRouter.map(function() {\n this.route('lo... | javascript | chosen |
[
{
"from": "system",
"value": "Split Webpack build to main and vendor chunks\n"
},
{
"from": "human",
"value": "const webpack = require(\"webpack\");\nconst { CleanWebpackPlugin } = require(\"clean-webpack-plugin\");\nconst HtmlWebpackPlugin = require(\"html-webpack-plugin\");\nconst CopyWebpackP... | javascript | chosen |
[
{
"from": "system",
"value": ":wrench: Improve minification of browser bundle.\n"
},
{
"from": "human",
"value": "\"use strict\";\nconst webpack = require('webpack');\nconst nodeExternals = require('webpack-node-externals');\nconst env = process.env.NODE_ENV;\n\nconst config = {\n context: `$... | javascript | chosen |
[
{
"from": "system",
"value": "Include czech moment locales in webpack\n"
},
{
"from": "human",
"value": "/* eslint-disable import/no-extraneous-dependencies */\n\nimport path from 'path';\nimport webpack from 'webpack';\n\nexport const globalOptions = {\n resolve: {\n extensions: ['', '.js',... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the path of config file of unit test\n"
},
{
"from": "human",
"value": "var logger = require('log4js').getLogger('telegram');\n\nvar nconf = require('nconf');\nnconf.file('bots', __dirname + '/../config/bots.json')\n .file('receviers', __dirname + '/../confi... | javascript | chosen |
[
{
"from": "system",
"value": "Set iframe styles more easily\n"
},
{
"from": "human",
"value": "/* global tabID */\n\"use strict\";\nconst existingIframe = document.querySelector(\"iframe#dom-distiller-result-iframe\");\nif(existingIframe) {\n existingIframe.remove();\n} else {\n const ifra... | javascript | chosen |
[
{
"from": "system",
"value": "Add request duration in milliseconds\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Profiler = require('../../stats/profiler-proxy');\nconst { name: prefix } = require('../../../package.json');\n\nmodule.exports = function profiler ({ statsClient, logOnEv... | javascript | chosen |
[
{
"from": "system",
"value": "Improve routing: Routing checks for static files, redirects to home, or uses req.params.pageName to invoke builder\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar pages = require('./pages.js');\nvar app = express();\n\napp.use(express.logge... | javascript | chosen |
[
{
"from": "system",
"value": "Add appropriately positioned wrapper for Tooltip story\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport {\n boolean, text, select\n} from '@storybook/addon-knobs';\nimport OptionsHelper from '../..... | javascript | chosen |
[
{
"from": "system",
"value": "Add a minified version to the build process\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar webpack = require(\"webpack\");\nvar webpackOpt =\n{\n entry : \"./src/main.js\"\n, output :\n {\n filename : \"./dist/BBM.js\"\n , libraryTarget : \"umd\"\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove babel polyfill from test app\n"
},
{
"from": "human",
"value": "/*jshint node:true*/\n/* global require, module */\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n var app = new EmberAddon(defaults, ... | javascript | chosen |
[
{
"from": "system",
"value": "Add debug logging for Travis\n"
},
{
"from": "human",
"value": "import {childProcess} from 'node-promise-es6';\nimport {path as phantomJsPath} from 'phantomjs-prebuilt';\nimport PhantomJS from 'phantomjs-promise-es6';\n\nasync function sleep(ms) {\n await new Promi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in initial state"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport GatewayRegistry from './GatewayRegistry';\nimport {deprecated} from 'react-prop-types';\n\nexport default class GatewayDest extends Rea... | javascript | chosen |
[
{
"from": "system",
"value": "Add method for creating SVGs\n"
},
{
"from": "human",
"value": "/**\n * Copyright: (c) 2016-2017 Max Klein\n * License: MIT\n */\n\ndefine(function () {\n\tvar NS = 'http://www.w3.org/2000/svg';\n\n\tfunction createSvgElement(name) {\n\t\treturn document.createEleme... | javascript | chosen |
[
{
"from": "system",
"value": "Add https_proxy support to gitlab oauth\n\n\n\nSigned-off-by: Ruben ten Hove <46f1a0bd5592a2f9244ca321b129902a06b53e03@rhtenhove.nl>"
},
{
"from": "human",
"value": "'use strict'\n\nconst Router = require('express').Router\nconst passport = require('passport')\ncons... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Fix karma compile fail when installed\"\n\nThis reverts commit ff4cac5f44a1adabbe7521608ae769d3fc3cfe94.\n"
},
{
"from": "human",
"value": "// Using es5 in this module as it won't be transpiled in child projects\n// due to the node_modules babel loader excl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix babel errors on generated app.\n"
},
{
"from": "human",
"value": "require('babel-polyfill');\nrequire('babel-core/register')({\n only: /gluestick.*/,\n presets: [\n 'react',\n 'es2015',\n 'stage-0',\n ],\n plugins: [\n 'transform-decorators-legac... | javascript | chosen |
[
{
"from": "system",
"value": "Move a global style and add my correct email address.\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport styled from \"styled-components\";\nimport Link from \"gatsby-link\";\nimport PictureFrame from \"../components/PictureFrame\";\nimport Soci... | javascript | chosen |
[
{
"from": "system",
"value": "Add next params to state\n"
},
{
"from": "human",
"value": "angular.module('resourceSolver', [])\n.provider('resourceSolver', function ResourceSolver() {\n var baseUrl = '';\n\n this.setBaseUrl = function(url) {\n baseUrl = url;\n };\n\n this.$get = function(... | javascript | chosen |
[
{
"from": "system",
"value": "Change broken url to wayback one\n"
},
{
"from": "human",
"value": "define([\n\t\"../core\",\n\t\"../queue\",\n\t\"../effects\" // Delay is optional because of this dependency\n], function( jQuery ) {\n\n// Based off of the plugin by Clint Helfers, with permission.\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the mocha report to be in TAP form.\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar mocha = require('gulp-mocha');\nvar istanbul = require('gulp-istanbul');\n\ngulp.task('default', ['mocha'], function() {\n gulp.watch('**/*.js', '!node_m... | javascript | chosen |
[
{
"from": "system",
"value": "Add carousel initialization for the fullscreen background image slider\n"
},
{
"from": "human",
"value": "$(document).ready(function(){$(\".smoothie\").on('click',function(event){var target=$(this.hash),navOffset=$('#navbar').height();event.preventDefault();return $... | javascript | chosen |
[
{
"from": "system",
"value": "Add day number to game state\n"
},
{
"from": "human",
"value": "var React = require( \"react\" );\n\nmodule.exports = React.createClass({\n\tdisplayName: \"RepubliaTimes\",\n\n\trender() {\n\t\treturn (\n\t\t\t<h1>The Republia Times</h1>\n\t\t);\n\t}\n});\n"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor toPairs to object map; move private function to top\n"
},
{
"from": "human",
"value": "import _ from 'lodash'\nimport postcss from 'postcss'\n\nexport default function(options) {\n let breakpoints = options.breakpoints\n\n return function(css) {\n Obje... | javascript | chosen |
[
{
"from": "system",
"value": "Use AudioListener for better positional audio integration\n"
},
{
"from": "human",
"value": "elation.extend(\"engine.systems.sound\", function(args) {\n elation.implement(this, elation.engine.systems.system);\n\n this.system_attach = function(ev) {\n console.lo... | javascript | chosen |
[
{
"from": "system",
"value": "Add helper function for assigning guest names\n"
},
{
"from": "human",
"value": "var socketio = require('socket.io');\nvar io;\nvar guestNumber = 1;\nvar nickNames = {};\nvar namesUsed = [];\nvar currentRoom = {};\n\nexports.listen = function(server) {\n io = socke... | javascript | chosen |
[
{
"from": "system",
"value": "Use jQuery prop instead of attr\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $(\".additional-options-toggle\").on(\"click\", function(e) {\n e.preventDefault();\n $(\"#\" + $(this).data(\"export-section\") + \"_options\").toggle();\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Fix URL for servers with spaces in their name\n"
},
{
"from": "human",
"value": "$(function() {\n $('#applicant_server_id').change(populateArmory);\n $('#applicant_character_name').change(populateArmory);\n});\n\nfunction populateArmory() {\n cserver = $('#... | javascript | chosen |
[
{
"from": "system",
"value": "Add draft implementation of widget.\n"
},
{
"from": "human",
"value": "/** @jsx React.DOM */\n'use strict';\n\nvar React = require('react');\n\nvar App = React.createClass({\n render() {\n return (\n <h1>Hello, world.</h1>\n );\n }\n});\n\nmodule.export... | javascript | chosen |
[
{
"from": "system",
"value": "Dropdown::Content: Remove unused `.rl-dropdown` CSS class assignment\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\n\nexport default Component.extend({\n classNames: ['rl-dropdown'],\n classNameBindings: ['isExpanded:open'],\n});\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Set up route for scraping wikipedia\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\nconst {\n getEntry,\n getAllEntries,\n addEntry,\n deleteEntry\n} = require('./../db/entries')\nconst {\n getDataFromUrl,... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the test with a good js\n\nThe promise API of watt is very limited. It's better to use the\ncallback way.\n\nSee https://github.com/mappum/watt/issues/15\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst path = require ('path');\nconst {expect} = req... | javascript | chosen |
[
{
"from": "system",
"value": "Add default host and port to karma server\n"
},
{
"from": "human",
"value": "module.exports = function(config){\n config.set({\n\n basePath : '../',\n\n files : [\n 'app/bower_components/angular/angular.js',\n 'app/bower_components/angular-route/ang... | javascript | chosen |
[
{
"from": "system",
"value": "Add minimum value for range of audio time\n"
},
{
"from": "human",
"value": "var audio = document.getElementById(\"chris\");\n\nfunction pauseChris() {\n\tif (audio.currentTime >= 1283) {\n\t\taudio.pause();\n\t\taudio.currentTime = 952;\n\t}\n}\n\nfunction playChri... | javascript | chosen |
[
{
"from": "system",
"value": "Improve deserializer by normalizing ember models.\n"
},
{
"from": "human",
"value": "const deserializeFromEmber = function(o, depth = 10) {\n if(o && o.toJSON) {\n var constructor = o.get && o.get('constructor').toString();\n return constructor ? \n {'_c... | javascript | chosen |
[
{
"from": "system",
"value": "Support more than just Windows\n\nCloses #4\n"
},
{
"from": "human",
"value": "// Really want to replace this with something more multi-OS-friendly\nvar xhr = new XMLHttpRequest();\nxhr.open('GET', 'manifest.json');\nxhr.onload = function(){\n\tvar manifest = JSON.p... | javascript | chosen |
[
{
"from": "system",
"value": "Update test for project avatar\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { mount, shallow } from 'enzyme';\nimport { expect } from 'chai';\nimport sinon from 'sinon';\nimport { IndexLink, Link } from 'react-router';\nimport { project, wor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix: Remove middleware preventing videos from loading on the homepage\n"
},
{
"from": "human",
"value": "var User = require('./controllers/user.server.controller'),\n Upload = require('./controllers/upload.server.controller'),\n Video = requi... | javascript | chosen |
[
{
"from": "system",
"value": "Add .git to git url\n"
},
{
"from": "human",
"value": "Package.describe({\n git: 'https://github.com/zimme/meteor-collection-behaviours',\n name: 'zimme:collection-behaviours',\n summary: 'Define and attach behaviours on collections',\n version: '1.0.2'\n});\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Delete some deps used for testing\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'kriegslustig:simulatency',\n version: '0.0.0',\n description: 'Adds a lag to all connections you make to the server',\n repository: 'https://github.com/Kriegslustig/... | javascript | chosen |
[
{
"from": "system",
"value": "Change order of karma tests\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */\n\ndescribe('my app', function() {\n\n beforeEach(function() {\n browser().navigateTo('../../app/index.html');\n });\n\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Save model in a separate variable.\n"
},
{
"from": "human",
"value": "var mistigri = require(\"../mistigri.js\");\nvar fs = require(\"fs\");\n\n// Some generic setup\n\nmistigri.options.escapeFunction = String;\n\nfunction readFile(name, options) {\n return new P... | javascript | chosen |
[
{
"from": "system",
"value": "Add rule requiring curly brackets for arrow functions\n"
},
{
"from": "human",
"value": "module.exports = {\n parser: \"@typescript-eslint/parser\",\n plugins: [\"react-hooks\"],\n extends: [\n \"plugin:react/recommended\",\n \"plugin:@typescript-eslint/rec... | javascript | chosen |
[
{
"from": "system",
"value": "BHV-12598: Call the super and set the content property directly.\n\nEnyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>\n"
},
{
"from": "human",
"value": "(function (enyo, scope) {\n\t/**\n\t* {@link moon.Divider} is a simply styled component that may be used ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix packages test for CI env.\n"
},
{
"from": "human",
"value": "/*global describe, it */\n\n\"use strict\";\n\nvar opencpu = require(\"../lib/opencpu\"),\n config = require(\"./opencpu-config\"),\n assert = require(\"assert\");\n\ndescribe(\"Packages test:\",... | javascript | chosen |
[
{
"from": "system",
"value": "BLD: Remove test resources created during tests\n"
},
{
"from": "human",
"value": "describe( 'csscomb', function () {\n var expand = require( 'glob-expand' );\n var path = require( 'path' );\n\n var exec = require( '../lib/exec' );\n var read = function ( file )... | javascript | chosen |
[
{
"from": "system",
"value": "Remove debug log devido à reclamação da Mozilla\n"
},
{
"from": "human",
"value": "var code = null;\nif (/([^\\/].)?oglobo\\.globo\\.com/.test(document.location.host))\n code = 'paywallAtivo = false;';\n\nelse if (/www\\.economist\\.com/.test(document.location.ho... | javascript | chosen |
[
{
"from": "system",
"value": "Add req/res to res.locals not global nunjucks instance\n"
},
{
"from": "human",
"value": "module.exports = (req, res, next) => {\n req.app.settings.nunjucksEnv\n .addGlobal('req', req)\n .addGlobal('res', res);\n\n next();\n}\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error route no match\n"
},
{
"from": "human",
"value": "/**\n * requires rcmApi from core\n */\nangular.module('rcmAdminApi', [])\n .factory(\n 'rcmAdminApiUrlService',\n [\n function () {\n\n /**\n * url map for APIs - The... | javascript | chosen |
[
{
"from": "system",
"value": "Use gaeron's shallowEqual algo instead\n"
},
{
"from": "human",
"value": "import shallowEqual from 'is-equal-shallow';\nimport { bindActionCreators } from 'redux';\n\nexport const observeStore = (store, currState, select, onChange) => {\n if (typeof onChange !== 'f... | javascript | chosen |
[
{
"from": "system",
"value": "chore(package): Fix issue with generating doc for src instead of lib\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst jsdoc2md = require('jsdoc-to-markdown');\nconst fs = require('fs');\n\njsdoc2md({src: './node_modules/kittik-animation-*/**/*.js'}).pipe(... | javascript | chosen |
[
{
"from": "system",
"value": "Handle an event using react class, or using a function\n"
},
{
"from": "human",
"value": "\nclass MyClock extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {date: new Date()};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div>\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Install apm using ci\"\n\nThis reverts commit c7b55e5ceae15343be28e4ddca954c2277ea1970.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst childProcess = require('child_process');\n\nconst CONFIG = require('../config');\n\nmodule.exports = function(c... | javascript | chosen |
[
{
"from": "system",
"value": "Test case for dev reloader\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nexport default class App extends React.Component {\n render() {\n return (\n <h1>hello admin</h1>\n )\n }\n}\n"
},
{
"from": "gpt",
"value": "import ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error after login: V1 is not a function\n"
},
{
"from": "human",
"value": "(function () {\n angular\n .module('auth')\n .controller('LoginController', LoginController);\n\n LoginController.$inject = [\n 'AuthService',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove webview focus when parent window loses focus\n\nThis fixes desktop push notifications when the app is not active.\n"
},
{
"from": "human",
"value": "const webViewElement = document.querySelector('.messages-iframe');\r\n\r\nwebViewElement.addEventListener('new... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a typo in user model\n"
},
{
"from": "human",
"value": "/**\n * User\n *\n * @module :: Model\n * @description :: A short summary of how this model works and what it represents.\n * @docs\t\t:: http://sailsjs.org/#!documentation/models\n */\n\nmodule.export... | javascript | chosen |
[
{
"from": "system",
"value": "Fix null or undefined for remove key in object\n\nSigned-off-by: soupette <0a59f0508aa203bc732745954131d022d9f538a9@gmail.com>\n"
},
{
"from": "human",
"value": "const removeKeyInObject = (obj, keyToRemove) => {\n return Object.keys(obj).reduce((acc, current) => {\... | javascript | chosen |
[
{
"from": "system",
"value": "Handle CSRF changes in response headers.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { request } from 'ic-ajax';\nimport Config from './config';\n\nexport default Ember.Object.extend({\n setPrefilter: function() {\n var token = this.get... | javascript | chosen |
[
{
"from": "system",
"value": "Configure log level to debug\n"
},
{
"from": "human",
"value": "\"use strict\";\nvar winston = require('winston');\nvar loggers = [];\nvar currentLevel = 'error';\n\n/**\n* Convenience function to get logger directly\n*/\n\nvar newLogger = function () {\n var newIn... | javascript | chosen |
[
{
"from": "system",
"value": "Add language to html tag\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Document, { Html, Head, Main, NextScript } from 'next/document'\n\nimport { GA_TRACKING_ID } from 'libs/gtag'\n\nexport default class extends Document {\n render() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Support coercing functions to strings.\n"
},
{
"from": "human",
"value": "function circular(ref) {\n ref = ref || '[Circular]';\n var seen = [];\n return function (key, val) {\n if(!val || typeof (val) !== 'object') {\n return val;\n }\n if(~seen.in... | javascript | chosen |
[
{
"from": "system",
"value": "Update Gravatar to use protocol relative URL\n\nStops warnings over SSL."
},
{
"from": "human",
"value": "/**\n* @ngdoc directive\n* @name umbraco.directives.directive:umbAvatar\n* @restrict E\n**/\nfunction avatarDirective() {\n return {\n restrict: \"E\... | javascript | chosen |
[
{
"from": "system",
"value": "Use node's resolve mechanism when attempting to locate vgno-coding-standard (npm3 fix)\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\nvar fs = require('fs');\n\nmodule.exports = function readConfig(file) {\n var content = fs.read... | javascript | chosen |
[
{
"from": "system",
"value": "Change assoc. map array to use an object\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar markovDictionaryBuilder = (function(logger) {\n\n\tfunction buildDict(wordSet, chainSize) {\n\n\t\tlogger.logDebug(\"building dictionary from \" + wordSet.length + \" wo... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to check current status\n"
},
{
"from": "human",
"value": "var CommandQueue = require('./command-queue');\n\n/**\n * Creates a new robot arm\n * @constructor\n * @param {object} options The options object.\n * @param {object|array} options.axis A list ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove debug output, add note that it doesn't work through web servers\n"
},
{
"from": "human",
"value": "var fs = require(\"fs\");\nvar path = require(\"path\");\n\nmodule.exports = {\n website: {\n assets: \".\",\n html: {\n \"body:start\": function(cu... | javascript | chosen |
[
{
"from": "system",
"value": "Allow string as expectedKeys parameter and update jsdocs\n"
},
{
"from": "human",
"value": "/*global require, module*/\n/*!\n * missing-keys <https://github.com/tobiasoberrauch/missing-keys>\n *\n * Copyright (c) 2015, Tobias Oberrauch.\n * Licensed under the MIT Li... | javascript | chosen |
[
{
"from": "system",
"value": "Allow addon to be used as a nested addon\n\nSee https://github.com/ember-cli/ember-cli/issues/3718\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-page-object',\n\n options: {\n nodeAssets: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Convert request body to JSON\n"
},
{
"from": "human",
"value": "class API extends Function {\n\n constructor(path = '/', config) {\n super('next', 'return this(next)');\n this.path = path;\n this.globalConfig = Object.assign({ credentials: 'include' }, con... | javascript | chosen |
[
{
"from": "system",
"value": "Add example of git data\n\nJust log those.\n"
},
{
"from": "human",
"value": "import React from \"react\"; // must be in scope when using JSX\nimport ReactDOM from \"react-dom\";\n\n\nfunction HelloWorld() {\n return (\n <div>React.js Hello World!</div>\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Convert the output to numbers, not strings\n"
},
{
"from": "human",
"value": "// ----------------------------------------------------------------------------\n//\n// cigar-plugin-device\n//\n// Copyright 2013 Andrew Chilton. All Rights Reserved.\n//\n// License: MIT... | javascript | chosen |
[
{
"from": "system",
"value": "Allow empty string in translation.\n"
},
{
"from": "human",
"value": "define([\n 'leaflet', 'leaflet.draw', 'i18n!find/nls/bundle', 'leaflet.draw.negate'\n], function(leaflet, leafletDraw, i18n){\n\n function updateTranslations(prefix, mappedPrefix, obj) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add linting task before test task\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst gulp = require('gulp');\nconst babel = require('gulp-babel');\nconst eslint = require('gulp-eslint');\nconst Server = require('karma').Server;\n\nconst src = 's... | javascript | chosen |
[
{
"from": "system",
"value": "Update test config with coverage\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst gulp = require( 'gulp' );\nconst mocha = require( 'gulp-mocha' );\n\ngulp.task( 'test', () => {\n return gulp.src([ 'src/**/*.js', 'test/**/*.js' ], { read: false })\n .... | javascript | chosen |
[
{
"from": "system",
"value": "Replace vars with consts and add better comments\n"
},
{
"from": "human",
"value": "// Load required plugins\nconst mdRegex = require('markdown-it-regexp')\n\nvar chordPattern = mdRegex(\n // regexp to match \n // Assuming anything within square brackets to be a c... | javascript | chosen |
[
{
"from": "system",
"value": "Remove now useless timers polyfill\n"
},
{
"from": "human",
"value": "\n'use strict';\n\n// Move to titaniumifier!\nprocess.execPath || (process.execPath = '/path/to/node');\n\n// Move to titaniumifier!\nglobal.setTimeout = (function (setTimeout) {\n return functio... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.