conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Refactor Tag Manager with registered components.\n"
},
{
"from": "human",
"value": "/**\n * Tag Manager module initialization.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment about sync method\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst sass = require('sass')\n\n/**\n * Transform SASS to CSS.\n * @public\n * @param {String} folderPath - Path to the folder containing the SASS file.\n * @param {String} str - SASS.\... | javascript | chosen |
[
{
"from": "system",
"value": "Return 0 for window if server side rendering"
},
{
"from": "human",
"value": "/**\n * Get the version of Internet Explorer in use, or undefined\n *\n * @return {?number} ieVersion - IE version as an integer, or undefined if not IE\n */\nexport function getIEVersion(... | javascript | chosen |
[
{
"from": "system",
"value": "Set component style via jquery instead of style attribute to prevent content security warnings\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Component.extend({\n classNames: ['spin-spinner'],\n\n attributeBindings: ['style']... | javascript | chosen |
[
{
"from": "system",
"value": "Add gotoday link in date if it is not today\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nconst Date = (props) => {\n const styles = {\n section: {\n padding: '20px 0',\n },\n }\n\n return (\n <section style={styles.section}>\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use the custom reporter on AppVeyor builds\n"
},
{
"from": "human",
"value": "import {createRunner} from 'atom-mocha-test-runner';\nimport chai from 'chai';\nimport chaiAsPromised from 'chai-as-promised';\n\nchai.use(chaiAsPromised);\nglobal.assert = chai.assert;\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Load permissions when school isn't defined yet\n\nCan't use the resource here because we can't pass an undefined school to\nthe checker so we need to check if it exists first.\n"
},
{
"from": "human",
"value": "import Controller from '@ember/controller';\nimport { t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix AMS Style to use propper setPacker function arguments.\n"
},
{
"from": "human",
"value": "\n'use strict';\n\nangular.module('restmod').factory('AMSApi', ['restmod', 'inflector', 'DefaultPacker', function(restmod, inflector, DefaultPacker) {\n\n\t// special snake... | javascript | chosen |
[
{
"from": "system",
"value": "Build app before running bozon test with no arguments\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\nvar path = require('path')\nvar program = require('commander')\nvar bozon = require('../bozon')\nvar json = require('../../package.json')\n\nprogram\n .ve... | javascript | chosen |
[
{
"from": "system",
"value": "Add a pointer to the raw file for easier use and comparison\n"
},
{
"from": "human",
"value": ";(function (f) {\n // module name and requires\n var name = '';\n var requires = [];\n\n // CommonJS\n if (typeof exports === \"object\" && typeof module !== \"undefi... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment to explain existence of this file\n\n"
},
{
"from": "human",
"value": "var template = require('lodash.template');\nvar reEscape = require('lodash._reescape');\nvar reEvaluate = require('lodash._reevaluate');\nvar reInterpolate = require('lodash._reinterp... | javascript | chosen |
[
{
"from": "system",
"value": "Introduce compact and image props for list item component\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport classnames from 'classnames';\n\nfunction ListItem({ children, onClick, active }) {\n const className = classnames('ui-list-item', {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow dots in phone numbers\n"
},
{
"from": "human",
"value": "import i18n from '@/i18n'\n\nexport function mandatory() {\n\treturn v => !!v || i18n.t('validation.mandatory')\n}\n\nfunction regexMatch(regex, key) {\n\treturn v => {\n\t\tif (!v) {\n\t\t\treturn true\... | javascript | chosen |
[
{
"from": "system",
"value": "Make global title available from layout, request, and render stream\n"
},
{
"from": "human",
"value": "// DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details.\n'use strict';\n\n/**\n * @description\n * The title part handler looks fo... | javascript | chosen |
[
{
"from": "system",
"value": "Add the correct path for the dropdown test\n"
},
{
"from": "human",
"value": "import test from 'tape';\nimport Dropdown from '../components/Dropdown.jsx';\nimport React from 'react/addons';\nconst { TestUtils } = React.addons;\n\nconst setup = () => {\n const rende... | javascript | chosen |
[
{
"from": "system",
"value": "Increase base menu count in e2e tests\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('Navigation', function () {\n\n var baseMenuCount = 5;\n\n it('should cope with a list with menu options', function () {\n browser().navigateTo('/#!/b_using_optio... | javascript | chosen |
[
{
"from": "system",
"value": "Add css support for assertExpected"
},
{
"from": "human",
"value": "var fs = require('fs'),\n glob = require('glob'),\n path = require('path'),\n wrench = require('wrench');\n\nvar counter = 0;\ntry { fs.mkdirSync('/tmp/lumbar-test', 0755); } catch (err) {}... | javascript | chosen |
[
{
"from": "system",
"value": "tests: Add test to check required keys exist for module object\n"
},
{
"from": "human",
"value": "var chai = require('chai');\nvar expect = chai.expect;\n\nvar promptModuleOptionsModule = require('../bin/promptModuleOptions');\n\nchai.should();\n\ndescribe('As a use... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor Group Selection form when creating new individual\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport graphqlApi from '../graphql-api'\n\nexport default class GroupSelectionForm extends React.Component {\n state = {\n groups: []\n }\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add test helpers for dominant scenarios.\n"
},
{
"from": "human",
"value": "import config from 'dummy/config/environment';\nimport test from 'ember-sinon-qunit/test-support/test';\n\nconst currentBootstrapVersion = parseInt(config.bootstrapVersion);\n\nfunction test... | javascript | chosen |
[
{
"from": "system",
"value": "test: Fix import test of rules\n"
},
{
"from": "human",
"value": "/* eslint-disable global-require */\nimport test from 'ava';\n\nimport Validator from '../validator';\nimport extend from '../extend';\nimport rules from '../rules';\n\ntest('should export Validator',... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test setup after adding draggabilly\n"
},
{
"from": "human",
"value": "/*jslint sloppy: true */\nmodule.exports = function (config) {\n config.set({\n basePath: '../',\n frameworks: ['jasmine'],\n browsers: ['Chrome', 'PhantomJS'],\n autoWatch: true... | javascript | chosen |
[
{
"from": "system",
"value": "HOTFIX: Handle possible error in resource creation\n"
},
{
"from": "human",
"value": "/**\n * Module dependencies\n */\nvar util = require( 'util' ),\n actionUtil = require( './_util/actionUtil' ),\n pluralize = require('pluralize');\n\n/**\n * Create Record\n *\n... | javascript | chosen |
[
{
"from": "system",
"value": "Allow nock to be installed locally\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2014 IBM Corp.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test. Everything works ok with CI and reporting. Yikes!\n"
},
{
"from": "human",
"value": "import assert from 'assert';\nimport fs from 'fs';\nimport rimraf from 'rimraf';\n\nconst tmpProjectName = 'testRjankoProject';\n\ndescribe('Rjanko', function() {\n descr... | javascript | chosen |
[
{
"from": "system",
"value": "Remove min and avg, because useless.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nif (!process.argv[2]) return console.error(\n 'Usage: npm-me <username>'\n)\n\nvar columnify = require('columnify')\n\nrequire('./')(process.argv[2], function(err, downlo... | javascript | chosen |
[
{
"from": "system",
"value": "Update access token for Instagram feed\n"
},
{
"from": "human",
"value": "const Instafeed = require('instafeed.js');\nconst $ = require('jquery');\n\nvar feed = new Instafeed({\n get: 'user',\n userId: '3120245646',\n clientId: '5d325f2ba927465d9c3933be01ee870c',... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spacing between month names\n"
},
{
"from": "human",
"value": "Datepicker.language['pt-br'] = {\n days: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado'],\n daysShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],\n daysMin: ['... | javascript | chosen |
[
{
"from": "system",
"value": "Fix HTML converter for headings.\n"
},
{
"from": "human",
"value": "export default {\n type: 'heading',\n\n matchElement (el) {\n return /^h\\d$/.exec(el.tagName)\n },\n\n import (el, node, converter) {\n node.content = converter.annotatedText(el, [node.id... | javascript | chosen |
[
{
"from": "system",
"value": "Change title on collection change\n\nSigned-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@codigy.nl>\n"
},
{
"from": "human",
"value": "(function() {\n\nwindow.TitleView = Backbone.View.extend({\n\n initialize: function(opts) {\n this.model.on('change... | javascript | chosen |
[
{
"from": "system",
"value": "Improve error messages when the profile store XHR fails.\n"
},
{
"from": "human",
"value": "\n\nexport function uploadBinaryProfileData(data, progressChangeCallback = undefined) {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add source maps.\nIt has no effect yet, but you never know...\n"
},
{
"from": "human",
"value": "const webpack = require('@cypress/webpack-preprocessor')\n\nmodule.exports = (on) => {\n on('file:preprocessor', webpack({\n webpackOptions: {\n resolve: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a small cache control header\n"
},
{
"from": "human",
"value": "module.exports = function (req, res) {\n return function (error, data) {\n if (error) {\n res.status(500);\n } else {\n res.status(200);\n }\n\n res.set('Content-Type', 'appli... | javascript | chosen |
[
{
"from": "system",
"value": "Remove trailing comma from json"
},
{
"from": "human",
"value": "module.exports = {\n port: 3000,\n public_url: 'http://127.0.0.1:3000/',\n expire_minutes: 15,\n db: {\n host: 'localhost',\n user: 'root',\n password: '',\n database: 'nappikauppa2'\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update api status on change\n"
},
{
"from": "human",
"value": "import {connect} from 'react-redux'\nimport {setOriginalText} from './synonymizationActions';\nimport InputBox from \"./InputBox\";\nimport apiConstants from \"../api/apiConstants\";\n\nconst mapStateToP... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing semi-colons and if/else that statement\n"
},
{
"from": "human",
"value": "var gaTracker = (function(dLayer) {\n\n // Push the object to the dataLayer\n // Parameters:\n // eventName, category, action, label, Type String\n // value Type Number... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude PropTypes from UMD build\n"
},
{
"from": "human",
"value": "var config = {\n output: {\n libraryTarget: 'umd',\n library: 'ReactTabs'\n },\n\n resolve: {\n extensions: ['', '.js'],\n alias: {\n src: __dirname +... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Give proper name to webpack output\"\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n devtool: 'sourcemap',\n entry: {\n app: ['./src/index.ts']\n },\n output: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix warning on module not found for moment locale\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n app: path.resolve(__dirname, 'app/Resources/assets/js/app.js')\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Use eval-source-map instead of eval for webpack\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n devtool: 'eval',\n entry: [\n 'webpack-dev-server/client?http://localhost:3000',\n 'webp... | javascript | chosen |
[
{
"from": "system",
"value": "fix(Bundle): Update new package name including @plone scope.\n"
},
{
"from": "human",
"value": "process.traceDeprecation = true;\nconst package_json = require(\"./package.json\");\nconst path = require(\"path\");\nconst patternslib_config = require(\"@patternslib/pa... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude `.test.js` files in babel transpile\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nmodule.exports = {\n entry: './src',\n output: {\n filename: 'react-animation-components.js',\n path: path.resolve(__dirname, 'lib'),\... | javascript | chosen |
[
{
"from": "system",
"value": "Add 414 Third Maximum Number\n"
},
{
"from": "human",
"value": "/**\n * Created by wanlipeng on 2017/4/18.\n */\n"
},
{
"from": "gpt",
"value": "// Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, ... | javascript | chosen |
[
{
"from": "system",
"value": "Change finishing main window to finishing applicatoin\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\nvar BrowserWindow = require('browser-window');\n\nmodule.exports.createMainWindow = function() {\n\tconst WINDOW_WIDTH = 300;\n\tco... | javascript | chosen |
[
{
"from": "system",
"value": "Set up Travis test environment\n\nThis specifies using a headless version of Chrome when\nwe run the tests on Travis. It still uses regular Chrome\nas the test browser on their development box.\n"
},
{
"from": "human",
"value": "// Karma configuration file, see link... | javascript | chosen |
[
{
"from": "system",
"value": "Add /history/:month and default non-matching route\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Provider } from 'react-redux';\nimport {\n BrowserRouter as Router,\n Route\n} from 'react-router-dom';\n\nimport HomePage from './compon... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tweet text includes \"@\"\n"
},
{
"from": "human",
"value": "import { postPage } from './pages.js'\n\nexport const compareNotices = (a, b) => {\n if (a.inserted_at > b.inserted_at) {\n return -1\n } else if (a.inserted_at < b.inserted_at) {\n return 1\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Reset dispayed tree when going to main menu\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { Router, hashHistory } from 'react-router';\nimport { syncHistoryWithStor... | javascript | chosen |
[
{
"from": "system",
"value": "Attach current user to context.user\n"
},
{
"from": "human",
"value": "import User from '../models/users'\nimport config from '../../config'\nimport { getToken } from '../utils/auth'\nimport { verify } from 'jsonwebtoken'\n\nexport async function ensureUser (ctx, ne... | javascript | chosen |
[
{
"from": "system",
"value": "Change dummy video in video section\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport styles from './videosection.css'\n\nexport default class VideoSection extends React.Component {\n\n render() {\n return (\n <div className=\"wrappe... | javascript | chosen |
[
{
"from": "system",
"value": "Check JWT token on socket connection\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport { log, LOG_TYPES } from './log';\n\n/*\n * Socket.io related things go !\n */\n\nlet io;\n\nlet connections = [];\n\nfunction createSocketIO(server, app) {\n io = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Use https when getting the info from the server\n"
},
{
"from": "human",
"value": "\n// Allows to get the video of the url through the api_url (optional)\nfunction BaseVideoInfo(url, api_url) {\n\tthis.url = url || 'null';\n\tthis.api_url = api_url || \"http://youtu... | javascript | chosen |
[
{
"from": "system",
"value": "Set default mode for webpack to none.\n"
},
{
"from": "human",
"value": "var path = require('path');\nconst UglifyJsPlugin = require('uglifyjs-webpack-plugin');\n\nmodule.exports = {\n entry: {\n \"zinc\": \"./src/zinc.js\",\n \"zinc.min\": \"./src/zinc.js\",... | javascript | chosen |
[
{
"from": "system",
"value": "Fix uglify removing source map\n"
},
{
"from": "human",
"value": "const webpack = require('webpack')\nconst { execSync } = require('child_process')\nconst path = require('path')\n\nlet hash = execSync('git rev-parse --short HEAD').toString().trim()\n\nlet plugins = ... | javascript | chosen |
[
{
"from": "system",
"value": "Attach NODE_ENV to bundle using webpack DefinePlugin\n"
},
{
"from": "human",
"value": "\nmodule.exports = {\n entry: './index.js',\n\n output: {\n path: 'public',\n filename: 'bundle.js',\n publicPath: '/'\n },\n module: {\n loaders: [\n { test... | javascript | chosen |
[
{
"from": "system",
"value": "Rename Message container component because type error\n"
},
{
"from": "human",
"value": "/**\n * Created by ivan on 8/10/16.\n */\n\nvar MessageContarinerComponent = React.createClass({\n render: function () {\n return (\n <div id=\"message-contain... | javascript | chosen |
[
{
"from": "system",
"value": "feat(client): Hide breadcrumbs bar on front page\n"
},
{
"from": "human",
"value": "import React, {Component, PropTypes} from 'react'\n\nimport BreadcrumbBar from '../components/breadcrumb-bar'\nimport Footer from './footer'\nimport Navigation from '../containers/na... | javascript | chosen |
[
{
"from": "system",
"value": "Use lstatSync to know is a file exist\n\naccess function follow symbolic links and tests if target file exist and\nnot the link\n"
},
{
"from": "human",
"value": "const fs = require('fs')\nconst util = require('util')\nconst path = require('path')\n\nclass FsUtils {... | javascript | chosen |
[
{
"from": "system",
"value": "Update 11ty config to use imports\n"
},
{
"from": "human",
"value": "module.exports = function(config) {\n\n // If prod or stage, minify the html\n if (process.env.NODE_ENV !== 'development') {\n config.addTransform('minifyHtml', require('./eleventy/utilities/m... | javascript | chosen |
[
{
"from": "system",
"value": "Add globals to make eslint pass\n"
},
{
"from": "human",
"value": "module.exports = {\n \"env\": {\n \"browser\": true\n },\n \"extends\": \"eslint:recommended\",\n \"rules\": {\n \"indent\": [\n \"error\",\n 4\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Check if a wallet is loaded before accessing private states\n"
},
{
"from": "human",
"value": "function AppRun(AppConstants, $rootScope, $timeout, Wallet) {\n 'ngInject';\n\n // change page title based on state\n $rootScope.$on('$stateChangeSuccess', (event... | javascript | chosen |
[
{
"from": "system",
"value": "fix(check): Include more action names in various checks.\n"
},
{
"from": "human",
"value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at... | javascript | chosen |
[
{
"from": "system",
"value": "Update with reference to global nav partial\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar postcss = require('postcss')\nvar cssstats = require('cssstats'... | javascript | chosen |
[
{
"from": "system",
"value": "Update zopfli binary URL to the latest commit\n\nhttps://github.com/google/zopfli/commit/64c6f362fefd56dccbf31906fdb3e31f6a6faf80\n"
},
{
"from": "human",
"value": "'use strict';\nconst BinBuild = require('bin-build');\nconst log = require('logalot');\nconst bin = r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the CoffeeScript and TOML dependency injection\n"
},
{
"from": "human",
"value": "/**\n * Gray Matter\n * Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.\n * Licensed under the MIT license.\n */\n\n'use strict';\n\n// node_modules\nvar YAML = re... | javascript | chosen |
[
{
"from": "system",
"value": "refactor: Remove unnecessary reference from webpack dev build.\n"
},
{
"from": "human",
"value": "// For output.filename configuration:\n//\n// Change \"component-name\" in this file to your real component name!\n// DO NOT CHANGE \"[name]\", which denotes the entry ... | javascript | chosen |
[
{
"from": "system",
"value": "Use /dist as the base output dir for all plugins\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n\nconst webpack = require('webpack');\nconst debug = require('debug')('app:webpack');\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\nconst CleanWe... | javascript | chosen |
[
{
"from": "system",
"value": "Fix RegExp pattern to match single quote imports\n"
},
{
"from": "human",
"value": "// Inspired from https://github.com/markokajzer/discord-soundbot\n// MIT License - Copyright (c) 2020 Marko Kajzer\nconst path = require('path');\nconst replace = require('replace-in... | javascript | chosen |
[
{
"from": "system",
"value": "Remove header from new note form\n"
},
{
"from": "human",
"value": "import React, { Component } from \"react\";\nimport NewNoteForm from \"./NewNoteForm\";\n\nclass NewNote extends Component {\n submit = values => {\n console.log(\"submitting new note\", values)... | javascript | chosen |
[
{
"from": "system",
"value": "Add the length into a simplified video\n"
},
{
"from": "human",
"value": "var exports = {};\n\nexports.simplePrint = function(video) {\n return `**${video.title}**`;\n};\n\nexports.prettyPrint = function(video) {\n try {\n viewCount = video.view_count.replace(/... | javascript | chosen |
[
{
"from": "system",
"value": "Add loading state to transactions list\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {bindActionCreators} from 'redux';\nimport {connect} from 'react-redux';\nimport Transaction from '../transaction';\nimport * as transactionsActionCreators f... | javascript | chosen |
[
{
"from": "system",
"value": "Allow various fields to be null\n\nProbably need to rethink this, though. Likely most of those fields\nshould be required and marked as such.\n"
},
{
"from": "human",
"value": "'use strict';\n\n\nmodule.exports = {\n 'properties': {\n 'id': require('./id')... | javascript | chosen |
[
{
"from": "system",
"value": "Add a button that calls chrome.runtime.reload()\n"
},
{
"from": "human",
"value": "/**\n * Listens for the app launching then creates the window.\n * Ignores the provided window size.\n *\n * @see http://developer.chrome.com/trunk/apps/app.window.html\n */\n\nfuncti... | javascript | chosen |
[
{
"from": "system",
"value": "Add a precompile step for WebUtils.\n"
},
{
"from": "human",
"value": "const gulp = require(\"gulp\");\nconst lkpm = require('lkpm');\n\nvar taskExporter = new lkpm.TaskExporter({\n moduleBase: __dirname\n}, gulp);\n\ntaskExporter.exportTasks();"
},
{
"fr... | javascript | chosen |
[
{
"from": "system",
"value": "Add filter as queryParam that triggers a refreshModel\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Mixin.create({\n queryParams: {\n page: { refreshModel: true },\n sort: { refreshModel: true }... | javascript | chosen |
[
{
"from": "system",
"value": "Fix execution of test watch 🐝"
},
{
"from": "human",
"value": "export default {\n name: 'base',\n configure ({ projectPath }) {\n return {\n basePath: projectPath,\n\n files: [\n 'src/**/*.spec.*',\n { pattern: 'src/**/*', watched: true... | javascript | chosen |
[
{
"from": "system",
"value": "Stop reactotron saga monitor. Fix redux-logger.\n"
},
{
"from": "human",
"value": "import { createStore, applyMiddleware, compose } from 'redux'\nimport createSagaMiddleware from 'redux-saga'\nimport rootReducer from 'rootReducer'\nimport rootSaga from 'sagas'\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix embed code not updating on page load\n"
},
{
"from": "human",
"value": "$(function () {\n\t// General-purpose code for showing and hiding modals\n\tvar activeClass = 'modal-active';\n\tvar $overlays = $('.modal-foreground, .modal-background');\n\t$('.modal').eac... | javascript | chosen |
[
{
"from": "system",
"value": "Add slugified category and slugified url\n"
},
{
"from": "human",
"value": "import urlSlug from './urlSlug';\n\nfunction getPosts() {\n const req = require.context(\"../posts\", true, /^\\.\\/.*\\.md$/);\n const dirtyFileNames = req.keys();\n\n return dirty... | javascript | chosen |
[
{
"from": "system",
"value": "Throw an exception when unable to find rendering type\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport refractToComponentsMap from 'refractToComponentMap';\n\nimport './attribute.styl'\n\nclass AttributeComponent extends React.Component {\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Add express-history-api-fallback to static app\n\nSigned-off-by: Jordan Overbye <5b42e62121a3968f51bc2e512229a23195e6d9fe@gmail.com>\n"
},
{
"from": "human",
"value": "const fs = require('fs-extra');\nconst express = require('express');\nconst pathModule = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor DocEdit to work on mobile\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) 2014-present, Facebook, Inc. 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 this... | javascript | chosen |
[
{
"from": "system",
"value": "Test for bitter font in styles\n"
},
{
"from": "human",
"value": "/*global $:true, casper:true, document:true */\n'use strict';\n\ncasper.test.comment('Face Value - Fonts')\n\ncasper.start('http://localhost:3001/', function () {\n casper.test.info('Testing for Bitt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix an insidious dependency bug\n"
},
{
"from": "human",
"value": "// Organizational classes\ndefine(function() {\n return function(id, name) {\n this.id = id;\n this.name = ko.observable(name);\n }\n});\n"
},
{
"from": "gpt",
"value"... | javascript | chosen |
[
{
"from": "system",
"value": "Check if access field of document has a correct value\n"
},
{
"from": "human",
"value": "const docHelper = {\n checkDocDetails: (req) => {\n const document = req.body;\n if (!(document.title && document.content && document.access)) {\n return false;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Reimplement auto scroll to bottom\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport styles from '../chat.scss';\nimport Message from './message/Message';\n\nexport default class ChatArea extends Component {\n render() {... | javascript | chosen |
[
{
"from": "system",
"value": "Update fetch json\nIt gotta keep trying, and never give up!\n"
},
{
"from": "human",
"value": "\"use strict\";\nlet fetch = require('node-fetch');\nmodule.exports = function searchDeclaration(link) {\n return fetch(link)\n .then(response => response.text()... | javascript | chosen |
[
{
"from": "system",
"value": "Add Bridge of flic framework.\n\nIt is a sort of plugin register."
},
{
"from": "human",
"value": "\"use strict\";\n\nvar util = require(\"util\"),\n express = require(\"express\"),\n seneca = require(\"seneca\"),\n routes = require(\"./routes\");\n\n\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Add crossorigin attribute to images so they can be laoded into canvases\n"
},
{
"from": "human",
"value": "const hash = {};\nconst cache = [];\n\nconst add = url => {\n if (!hash[url]) {\n hash[url] = new Image();\n hash[url].src = url;\n\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Remove initial state test key\n"
},
{
"from": "human",
"value": "// ------------------------------------\n// Constants\n// ------------------------------------\nconst MAKE_SCREENSHOT = 'MAKE_SCREENSHOT'\nconst MAKE_SCREENSHOT_RESULT = 'MAKE_SCREENSHOT_RESULT'\n\n// ... | javascript | chosen |
[
{
"from": "system",
"value": "Select random pivot in quick sort\n"
},
{
"from": "human",
"value": "export default function quicksort(list) {\n if (list.length < 2) {\n return list;\n }\n\n const pivot = list[0]; // TODO: random\n const less = list.filter(i => i < pivot);\n const greater ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix endpoint to get borrow requests and return requests\n"
},
{
"from": "human",
"value": "// import necesary module\nimport express from 'express';\nimport verifyToken from '../middlewares/verifyToken.js';\nimport users from '../controllers/users';\n\nconst router ... | javascript | chosen |
[
{
"from": "system",
"value": "Add integration test to confirm proper component rendering\n"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('trix-editor', 'Integration | Component | trix ... | javascript | chosen |
[
{
"from": "system",
"value": "Extend options before chaning them\n"
},
{
"from": "human",
"value": "module.exports = function (options) {\n options = options || {};\n var unexpected = (options.unexpected || require('unexpected')).clone();\n unexpected.output.preferredWidth = options.pre... | javascript | chosen |
[
{
"from": "system",
"value": "Add a lint task for Grunt\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n grunt.loadNpmTasks('grunt-contrib-csslint');\n grunt.loadNpmTasks('grunt-contrib-jshint');\n grunt.loadNpmTasks('grunt-docco');\n\n grunt.initConfig({\n jshint:... | javascript | chosen |
[
{
"from": "system",
"value": "Remove predefined globals list in favor of node:true and browser:true\n"
},
{
"from": "human",
"value": "(function () {\n \"use strict\";\n\n var configureGrunt = function (grunt) {\n\n var cfg = {\n // JSLint all the things!\n jsl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix an issue with chat field focus commands.\n\nOccasionally, hitting '/' when the chat field was not focused would\ncause two slashes to appear in the chat field. Similarly, hitting '.'\nwhen the field was not focused could cause a period to appear at the end\nof the chat fiel... | javascript | chosen |
[
{
"from": "system",
"value": "Update plyr.io version in AudioVideo player\n"
},
{
"from": "human",
"value": "define(function(require, exports, module) {\n 'use strict';\n var TSCORE = require(\"tscore\");\n console.log(\"Loading: ext.api.js\");\n \n window.addEventListener(\"message\", hand... | javascript | chosen |
[
{
"from": "system",
"value": "Add in settimeout for class creation\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n var classview = new window.ClassesView();\n\n var message_class = '#create-class-message';\n var create_class_form = '.create-class-form';\n var crea... | javascript | chosen |
[
{
"from": "system",
"value": "Remove white space before colon\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nclass FileLoader extends Component {\n render() {\n return (\n <div className='flex justify-center mt4 b'>\n Loading file : {this.props.fi... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.