conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Increase margin and remove the padded space\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root dire... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor internal use of constants\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* Expose. */\nmodule.exports = visit;\n\nvisit.CONTINUE = true;\nvisit.SKIP = 'skip';\nvisit.EXIT = false;\n\nvar is = require('unist-util-is');\n\n/* Visit. */\nfunction visit(t... | javascript | chosen |
[
{
"from": "system",
"value": "Add scraper for user packages\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\"use strict\";\nconst meow = require(\"meow\");\nconst Promise = require(\"pinkie-promise\");\nconst Xray = require(\"x-ray\"), xray = Xray();\n\nconst periods = ['day', 'week', '... | javascript | chosen |
[
{
"from": "system",
"value": "Fix logic for style overrides.\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-medium-editor',\n\n included: function(app) {\n this._super.included(app);\n var options = app.options.mediumEdi... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to use generic `changeinside` in new retext\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar stemmer;\n\n/**\n * Module dependencies.\n */\n\nstemmer = require('lancaster-stemmer');\n\n/**\n * `changetextinside` handler;\n *\n * @this Node\n */\n\nfu... | javascript | chosen |
[
{
"from": "system",
"value": "Add logging info for request\n"
},
{
"from": "human",
"value": "const config = require('./config');\nconst express = require('express');\nconst cors = require('cors');\nconst importer = require('./middleware/importer');\nconst mongoose = require('mongoose');\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to improve bundle size\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports = visit\n\nvar visitParents = require('unist-util-visit-parents')\n\nvar CONTINUE = visitParents.CONTINUE\nvar SKIP = visitParents.SKIP\nvar EXIT = visitParents.EXIT\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix polygon, add semicolons, rpl-ize\n"
},
{
"from": "human",
"value": "var explode = require('turf-explode');\nvar point = require('turf-point');\n\n/**\n * Calculates the centroid of a polygon Feature or\n * FeatureCollection using the geometric mean of all vertic... | javascript | chosen |
[
{
"from": "system",
"value": "Upgrade to new Seminarjs plugin system\n"
},
{
"from": "human",
"value": "module.exports = function (App) {\n\tif (typeof (App) == 'undefined') {\n\t\tconsole.error('ERROR: Seminarjs not detected');\n\t\tprocess.exit(-1);\n\t}\n\n\ttry {\n\n\t\tApp.express.use('/plu... | javascript | chosen |
[
{
"from": "system",
"value": "Make it work in Firefox\n\nFirefox returns `[object Window]` if object is window"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = isJsObject;\n\nfunction isJsObject(obj) {\n return /^\\[object (?:object|global)\\]$/i\n .test(Object.prototype.to... | javascript | chosen |
[
{
"from": "system",
"value": "Reconfigure RequireJS with the module-local `require` for each call"
},
{
"from": "human",
"value": "var PATH_SEPARATOR = require('path').sep;\nvar requirejs = exports.requirejs = require('requirejs');\nvar getStackTrace = require('./stack-trace');\n\nrequirejs.conf... | javascript | chosen |
[
{
"from": "system",
"value": "Move addEventListener back to prototype so webworkers can call it on themselves in constructor\n"
},
{
"from": "human",
"value": "\nvar EventEmitter = require('events').EventEmitter;\nvar inherits = require('inherits');\n\nmodule.exports = function(fn) {\n\n inheri... | javascript | chosen |
[
{
"from": "system",
"value": "Change forEach to lodash each functions\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar bluebird = require('bluebird');\nvar fs = bluebird.promisifyAll(require('fs'));\nvar glob = require('glob');\nvar hljs = require('../../build');\nvar path ... | javascript | chosen |
[
{
"from": "system",
"value": "Use default host and port\n\nSigned-off-by: Alexandre Bodin <70f0c7aa1e44ecfca5832512bee3743e3471816f@gmail.com>\n"
},
{
"from": "human",
"value": "module.exports = ({ env }) => ({\n host: env('HOST'),\n port: env.int('PORT'),\n});\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Disable the mobile menu on desktop\n"
},
{
"from": "human",
"value": "// JavaScript Document\n\n// Scripts written by __gulp_init__author_name @ __gulp_init__author_company\n\nimport Slideout from \"slideout\";\n\n// get the elements\nconst PANEL = document.getEleme... | javascript | chosen |
[
{
"from": "system",
"value": "Test parse errors aren't treated as partial input"
},
{
"from": "human",
"value": "var test = require('tape')\nvar parse = require('../parser')\n\ntest('partial input', function (t) {\n // These should all produce syntax errors at the end of the input\n var exampl... | javascript | chosen |
[
{
"from": "system",
"value": "Change the way text message egress initializes\n"
},
{
"from": "human",
"value": "import BaseWorker from '../../base'\nimport twilio from 'twilio'\nimport path from 'path'\n\nconst client = new twilio.RestClient(\n process.env.TWILIO_SID,\n process.env.TWILIO_TOKE... | javascript | chosen |
[
{
"from": "system",
"value": "Use dt and dd elements for displaying file metadata\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport styled from 'styled-components'\n\nconst Wrapper = styled.div`\n margin-top: 2rem;\n`\n\nconst Key = styled.label`\n font-weight: 700;\n`\n\nco... | javascript | chosen |
[
{
"from": "system",
"value": "Use clearResult instead of destroy on measurement so that user's selection will clear when switching tools or when the user clicks same tool again\n"
},
{
"from": "human",
"value": "import Measurement from 'esri/dijit/Measurement';\nimport React, {\n Component,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests up to recent Enum change\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar isError = require('es5-ext/lib/Error/is-error');\n\nmodule.exports = function (t, a) {\n\tvar week = t.create('Enumweektest', {\n\t\toptions: ['MO', 'TU', 'WE', 'TH', 'FR', 'S... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Remove date_of_joining from field list\n"
},
{
"from": "human",
"value": "frappe.listview_settings['Employee Separation'] = {\n\tadd_fields: [\"boarding_status\", \"employee_name\", \"date_of_joining\", \"department\"],\n\tfilters:[[\"boarding_status\",\"=\", \... | javascript | chosen |
[
{
"from": "system",
"value": "Add description to category search\n"
},
{
"from": "human",
"value": "Meteor.publish('categories', function (name) {\n return Categories.find({\n name: { $regex: name }\n });\n});\n\nCategories.allow({\n insert: function(userId, doc){\n return... | javascript | chosen |
[
{
"from": "system",
"value": "Fix node name when saving to Firebase\n"
},
{
"from": "human",
"value": "import express from 'express';\nimport Firebase from 'firebase';\n\nconst router = express.Router();\n\nrouter.post('/dump', (req, res) => {\n const distance = req.body.distance;\n const remo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix party logo mouseover text\n"
},
{
"from": "human",
"value": "import React from 'react';\n\n\nexport default function PartyMatchViz({partyAbbr, partyFit, partyLogo}) {\n const indicatorStyle = {\n backgroundImage: `url(${partyLogo})`,\n };\n return (<div cl... | javascript | chosen |
[
{
"from": "system",
"value": "Interpolate parameters in baseURL as well\n"
},
{
"from": "human",
"value": "import _merge from 'lodash/merge'\nimport _template from 'lodash/template'\n\n/**\n * Send a request using axios. Designed to be used by Model and their instance\n *\n * @param {Object} ca... | javascript | chosen |
[
{
"from": "system",
"value": "Delete `window.__reactTransmitPacket` after first use.\n"
},
{
"from": "human",
"value": "/**\r\n * @copyright © 2015, Rick Wong. All rights reserved.\r\n */\r\n\"use strict\";\r\n\r\nvar React = require(\"./react\");\r\nvar assign = React.__spread;\r\n\r\n/**\r\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use test helpers in FieldsHaveDescriptions tests\n"
},
{
"from": "human",
"value": "import assert from 'assert';\nimport { parse } from 'graphql';\nimport { validate } from 'graphql/validation';\nimport { buildASTSchema } from 'graphql/utilities/buildASTSchema';\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix trailing whitespace in build output\n"
},
{
"from": "human",
"value": "import buble from 'rollup-plugin-buble';\n\nexport default {\n input: \"src/codemirror.js\",\n output: {\n banner: `// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distri... | javascript | chosen |
[
{
"from": "system",
"value": "Use Object.assign to dereference object.\n"
},
{
"from": "human",
"value": "const glob = require(`glob`);\n\nconst buildArticleHtml = require(`./build/article-html.js`);\nconst buildBaseCss = require(`./build/base-css.js`);\nconst buildBaseHtml = require(`./build/ba... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded -p from mkdir call\n"
},
{
"from": "human",
"value": "const FS = require('fs');\nconst Child = require('child_process').execSync;\n\n// Copy local package files\nChild('npm run clean');\nChild('npm run compile');\nChild('npm run compile:module');\nCh... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for opening Saka in chrome and firefox\n"
},
{
"from": "human",
"value": "export function toggleHelpMenu () {\n // TODO\n}\n\nexport function toggleSaka () {\n try {\n browser.runtime.sendMessage(\n 'nbdfpcokndmapcollfpjdpjlabnibjdi',\n 'toggleSak... | javascript | chosen |
[
{
"from": "system",
"value": "Add a paragraph on computed props\n"
},
{
"from": "human",
"value": "import md from 'components/md'\n\nconst WhenToUseAttrs = () => md`\n ## When to use attrs?\n\n You can pass in attributes to styled components using [attrs](/docs/basics#attaching-additional-prop... | javascript | chosen |
[
{
"from": "system",
"value": "Move copy pasta'ed comment out.\n"
},
{
"from": "human",
"value": "import {\n createMessage,\n} from '../api/messaging';\n\n// Usage, assuming using Fluorine\n// dispatch(executeCell(id,source)(channels))\n\nexport default function kernelInfo(channels) {\n if (!ch... | javascript | chosen |
[
{
"from": "system",
"value": "Fix doc version 0.7 link\n"
},
{
"from": "human",
"value": "function insert_version_links() {\n var labels = ['dev', '0.7', '0.6', '0.5', '0.4', '0.3'];\n\n for (i = 0; i < labels.length; i++){\n open_list = '<li>'\n if (typeof(DOCUMENTATION_OPTI... | javascript | chosen |
[
{
"from": "system",
"value": "Add rAF and rIC to jsdom browser globals\n"
},
{
"from": "human",
"value": "const { JSDOM } = require('jsdom');\n\nfunction getBrowserGlobals(html) {\n const dom = new JSDOM(html);\n const { window } = dom;\n const noop = function noop() {};\n\n const EventSourc... | javascript | chosen |
[
{
"from": "system",
"value": "GF-5039: Add small property and changed method\n\nEnyo-DCO-1.1-Signed-off-by: David Um <david.um@lge.com>\n"
},
{
"from": "human",
"value": "/**\n\t_moon.Button_ is an <a href=\"#enyo.Button\">enyo.Button</a> with Moonstone\n\tstyling applied. The color of the butto... | javascript | chosen |
[
{
"from": "system",
"value": "Complete first pass of dom-manipulation\n"
},
{
"from": "human",
"value": "// DOM Manipulation Challenge\n\n\n// I worked on this challenge [by myself, with: ].\n\n\n// Add your JavaScript calls to this page:\n\n// Release 0:\n\n\n\n\n// Release 1:\n\n\n\n\n// Relea... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for: comments and attachments adding only available for user with write permission - test fix\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Enzyme, {mount} from 'enzyme';\nimport {ProcessAttachments} from '../components/ProcessAttachments... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sample event listener should call next\n"
},
{
"from": "human",
"value": "/* global assert */\nmodule.exports = function(runner, options) {\n var called = {};\n\n runner.on('setup', function (next) {\n console.log('called \"setup\"');\n calle... | javascript | chosen |
[
{
"from": "system",
"value": "Improve error message when encountering missing type builders\n"
},
{
"from": "human",
"value": "import PropTypes from 'proptypes'\n\nexport default {\n any: {\n options: {\n of: PropTypes.array.isRequired\n },\n parse(options, typeBuilders, schema) {... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment how to use variable from the site\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name SFcomic Viewer\n// @namespace \n// @version 0.2.1\n// @description Auto load comic picture.\n// @author AntonioTsai\n// @match ... | javascript | chosen |
[
{
"from": "system",
"value": "Trim fetch data to remove errors with extra spaces in data\n"
},
{
"from": "human",
"value": "import { createAction } from 'redux-actions';\nimport { createThunkAction } from 'utils/redux';\nimport qs from 'query-string';\n\nconst fetchGhgEmissionsInit = createActio... | javascript | chosen |
[
{
"from": "system",
"value": "Move variable declaration out of loop.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('arachne.widgets.directives')\n\n.directive('con10tSearchQuery', function() {\nreturn {\n restrict: 'A',\n link: function(scope, element, attrs) {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make framework for running JS between steps\n"
},
{
"from": "human",
"value": "introJs()\n .start()\n .onexit(function() {\n window.location = \"../../newtab/newtab.html\";\n })\n .oncomplete(function() {\n window.location = \"../../newtab/newtab.html\";\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add tax to tax_total property in Invoice model\n"
},
{
"from": "human",
"value": "var Invoice = DS.Model.extend({\n\n tax: DS.attr('number'),\n invoice_number: DS.attr('number', {default: new Date()}),\n issued: DS.attr('date'),\n items: DS.hasMany('InvoiceItem'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for error when clicking on browser market share pie charts\n"
},
{
"from": "human",
"value": "(function () {\n\n document.addEventListener('mousedown', function (event) {\n if (event.target && event.target.className.indexOf('ripple') !== -1) {\n let $di... | javascript | chosen |
[
{
"from": "system",
"value": "Add Referer to proxy server.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst webpack = require(\"webpack\");\nconst path = require(\"path\");\nconst ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\n\nmodule.exports = {\n context: path.re... | javascript | chosen |
[
{
"from": "system",
"value": "Update web pack to using spaces\n"
},
{
"from": "human",
"value": "var webpack = require('webpack');\nvar path = require('path');\n\nmodule.exports = {\n\tcontext: __dirname + \"/app\",\n\tentry: \"./index.js\",\n\n\toutput: {\n\t\tpath: __dirname + '/bin',\n\t\tpub... | javascript | chosen |
[
{
"from": "system",
"value": "Set public folder as the content base for webpack dev server\n"
},
{
"from": "human",
"value": "var webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n app: './src/js/app.jsx',\n vendors: ['react', 'react-dom', 'react-router', 'redux', 'redux-thu... | javascript | chosen |
[
{
"from": "system",
"value": "Reorder assets to remove a js warning\n"
},
{
"from": "human",
"value": "//= require tolk/prototype.js\n//= require tolk/controls.js\n//= require tolk/dragdrop.js\n//= require tolk/effects.js\n"
},
{
"from": "gpt",
"value": "//= require tolk/prototype.js... | javascript | chosen |
[
{
"from": "system",
"value": "docs: Add doc comments for program builder\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar program = require('commander');\nvar path = require('path');\nvar os = require('os');\nvar appDir = path.resolve(os.tmpDir(), 'cartridge');\n\nvar newCommand = r... | javascript | chosen |
[
{
"from": "system",
"value": "Improve layout of animation example index page\n\nMake buttons full-width to make them easier to tap. Inline MARGIN\nconstants, since extracting sizes to constants in snippets and examples\nmay be introducing unnecessary complexity and making layout harder to\nunderstand.\n\nCh... | javascript | chosen |
[
{
"from": "system",
"value": "Add target='_blank' to the info page link in the banner\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Banner from './Banner';\nimport { Link } from 'react-router';\n\nexport default () => (\n <Banner>\n <Banner.Element background='green'>... | javascript | chosen |
[
{
"from": "system",
"value": "Update webpack dev config to fix sourcemap warning\n\nSee this: https://github.com/webpack/webpack/issues/91"
},
{
"from": "human",
"value": "'use strict';\n\nvar webpack = require('webpack');\nvar config = require('./webpack.config.base.js');\n\nif (process.env.NOD... | javascript | chosen |
[
{
"from": "system",
"value": "Set port to dev server\n"
},
{
"from": "human",
"value": "process.env.BABEL_ENV = 'development';\nprocess.env.NODE_ENV = 'development';\n\nconst WebpackServe = require('webpack-serve');\nconst config = require('../config/webpack.config.base');\n\nfunction createDevS... | javascript | chosen |
[
{
"from": "system",
"value": "Fix form submit-button for Chrome\n"
},
{
"from": "human",
"value": "document.addEventListener(\n 'DOMContentLoaded',\n function () {\n var button = document.getElementById(\"submit_button\");\n button.addEventListener(\n 'click',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update the init script for the checkbox component\n"
},
{
"from": "human",
"value": "module.exports = {\n title: 'Form radio group',\n status: 'wip',\n context: {\n setup: {\n initScript: 'var $blockLabels = $(\".gv-c-form-custom input[type=\\'radio\\'], ... | javascript | chosen |
[
{
"from": "system",
"value": "FIX Неправильно обрабатывались юзеры без дисплейнейма\n"
},
{
"from": "human",
"value": "registerAction(function (node) {\n if (!settings[\"fixNames\"]) return;\n node = node || document.body;\n\n toArray(node.querySelectorAll(\".content > .l_profile, .lbod... | javascript | chosen |
[
{
"from": "system",
"value": "Add the correct folder for deploy.\n"
},
{
"from": "human",
"value": "module.exports = function (shipit) {\n require('shipit-deploy')(shipit);\n\n shipit.initConfig({\n default: {\n workspace: 'tmp',\n deployTo: '/var/api/abcdef',\n deployTo: '/v... | javascript | chosen |
[
{
"from": "system",
"value": "Use subdomain now it's setup\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n environment: environment,\n baseURL: '/dashboard',\n locationType: 'auto',\n EmberENV: {\n FEATURES:... | javascript | chosen |
[
{
"from": "system",
"value": "Correct syntax errors in user-lesson-tokens service\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst service = require('feathers-mongoose');\nconst user-lesson-tokens = require('./user-lesson-tokens-model');\nconst hooks = require('./hooks');\n\nmodule.expo... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify javascript a little bit\n"
},
{
"from": "human",
"value": "import Controller from 'ember-controller';\nimport $ from 'jquery';\n\nexport default Controller.extend({\n calculatePosition(trigger, content) {\n let { top, left, width, height } = trigger.get... | javascript | chosen |
[
{
"from": "system",
"value": "Remove JsHamCrest and JsMockito initialization."
},
{
"from": "human",
"value": "\r\nJsHamcrest.Integration.JsUnit();\r\nJsMockito.Integration.JsUnit(); \r\n\r\nvar JsTestClass = new Class({\r\n Implements: [Events, Options],\r\n options: {\r\n testCase: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add option to enable response with payload\n\nThis allows the server to respond with an object representing the\n.payload as sent by the request, and the corresponding .method used by\nthe caller.\n"
},
{
"from": "human",
"value": "var http = require(\"http\");\n\nf... | javascript | chosen |
[
{
"from": "system",
"value": "Fix new form template requirement\n"
},
{
"from": "human",
"value": "/**\n * Add app view\n */\n\nvar _ = require('underscore');\nvar Backbone = require('backbone');\n\nvar templates = require('../../dist/');\n\nvar App = require('../../models/app');\n\nmodule.expor... | javascript | chosen |
[
{
"from": "system",
"value": "Update AJAX fn to ES6\n"
},
{
"from": "human",
"value": "import axios from 'axios'\n\nlet links\n\nexport default async function AJAX({\n url,\n resource,\n id,\n method = 'GET',\n data = {},\n params = {},\n headers = {},\n}) {\n try {\n const basepath =... | javascript | chosen |
[
{
"from": "system",
"value": "Update blueprint to current versions.\n"
},
{
"from": "human",
"value": "var EOL = require('os').EOL;\n\nmodule.exports = {\n name: 'ember-cli-mocha',\n\n normalizeEntityName: function() {\n // this prevents an error when the entityName is\n // not specified... | javascript | chosen |
[
{
"from": "system",
"value": "Fix export syntax that is tripping compilation up for some reason\n"
},
{
"from": "human",
"value": "export default from 'codemirror';\n\nimport 'codemirror/lib/codemirror.css';\nimport 'codemirror/addon/hint/show-hint.css';\nimport 'codemirror/addon/hint/show-hint'... | javascript | chosen |
[
{
"from": "system",
"value": "Add bump insurancePolicy discount rate from float to double for better precision\n"
},
{
"from": "human",
"value": "import Realm from 'realm';\n\nexport class InsurancePolicy extends Realm.Object {\n get policyNumber() {\n return `${this.policyNumberPerson} ${th... | javascript | chosen |
[
{
"from": "system",
"value": "Add success alert indicating registration began and to verify email.\n"
},
{
"from": "human",
"value": "core.controller('RegistrationController', function ($controller, $location, $scope, $timeout, AlertService, RestApi) {\n\t\n angular.extend(this, $controller('... | javascript | chosen |
[
{
"from": "system",
"value": "Test login with valid credentials\n"
},
{
"from": "human",
"value": "\n\"use strict\";\n\ndescribe('Login component', () => {\n let element = undefined;\n let $rootScope = undefined;\n let $compile = undefined;\n let tpl = angular.element(`\n<monad-login... | javascript | chosen |
[
{
"from": "system",
"value": "Remove json and an unused alias\n\n"
},
{
"from": "human",
"value": "const paths = require('./paths');\r\nconst utils = require('../build/utils');\r\nconst vueLoaderConfig = require('../build/vue-loader.conf');\r\nconst FriendlyErrorsPlugin = require('friendly-error... | javascript | chosen |
[
{
"from": "system",
"value": "Add in module to use react materialize-ui\n"
},
{
"from": "human",
"value": "var React = require(\"react\");\nvar Router = require('react-router');\nvar App = require(\"./components/App\");\nvar WallView = require(\"./components/WallView/WallView\");\nvar NotFoundVi... | javascript | chosen |
[
{
"from": "system",
"value": "Update to comply with linter"
},
{
"from": "human",
"value": "let {setExamSubmitting, setDirty, isUnsubmitted} =\n require('../examSubmission.js');\n\ntest('check set exam submitting', () => {\n expect(setExamSubmitting()).toBe(true);\n});\n\ntest('check set dir... | javascript | chosen |
[
{
"from": "system",
"value": "Change @include settings so that the script is not run on all pages\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name Turn off age gate on Amazon.co.jp\n// @namespace curipha\n// @description Click \"I'm over 18\" automatically\n// @in... | javascript | chosen |
[
{
"from": "system",
"value": "Fix deepMerge() with undefined arguments\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Like Lodash merge() but faster and does not mutate input\nconst deepMerge = function (objA, objB, ...objects) {\n if (objects.length > 0) {\n const newObjA = deepMerg... | javascript | chosen |
[
{
"from": "system",
"value": "Use Array.map to transform classes response\n"
},
{
"from": "human",
"value": "/*jslint browser: true, undef: true *//*global Ext*/\nExt.define('SlateAdmin.store.people.UserClasses', {\n extend: 'Ext.data.Store',\n requires: [\n 'SlateAdmin.proxy.API'\n... | javascript | chosen |
[
{
"from": "system",
"value": "Update rootUrl for dummy app\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n rootURL: '/',\n locationType: 'auto',\n EmberENV:... | javascript | chosen |
[
{
"from": "system",
"value": "Change build type to module\n"
},
{
"from": "human",
"value": "/**\n * 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 http://mozilla.org/MPL/... | javascript | chosen |
[
{
"from": "system",
"value": "Update tests to mock generic helper function\n"
},
{
"from": "human",
"value": "jest.mock('../../../models/meeting');\nconst { toggleRegistration } = require('../meeting');\nconst { getActiveGenfors, toggleRegistrationStatus } = require('../../../models/meeting');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use keyCode '4' instead of '27' to prevent conflicts in platforms where '27' key code works\n"
},
{
"from": "human",
"value": "if (navigator.userAgent.indexOf('Android') >= 0) {\n\tlog = console.log.bind(console)\n\n\tlog(\"Android detected\")\n\texports.core.vendor... | javascript | chosen |
[
{
"from": "system",
"value": "Update UserCtrl to user userService values\n"
},
{
"from": "human",
"value": "angular.module('myApp')\n.controller('UserCtrl', ['userService', '$scope', '$rootScope', 'ctrlPanelService',\n function(userService, $scope, $rootScope, ctrlPanelService) {\n\n \t// initia... | javascript | chosen |
[
{
"from": "system",
"value": "Remove reaction if there is some error\n\n"
},
{
"from": "human",
"value": "const { Listener } = require('discord-akairo');\n\nclass MessageReactionAddListener extends Listener {\n\tconstructor() {\n\t\tsuper('messageReactionAdd', {\n\t\t\teventName: 'messageReactio... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dumb logging stuff in initial radio channel\n\n"
},
{
"from": "human",
"value": "define([\n \"jquery\",\n \"underscore\",\n \"parse\",\n \"backbone\",\n \"marionette\"\n], function( $, _, Parse, Backbone, Marionette ) {\n\n var userChannel =... | javascript | chosen |
[
{
"from": "system",
"value": "Enable death listener to disable data-emitter\n"
},
{
"from": "human",
"value": "AFRAME.registerComponent('death-listener', {\n schema: {\n characterId: {default: undefined}\n },\n\n init: function () {\n const el = this.el;\n const data = this.data;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set HTTP transaction type during construction\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar shimmer = require('shimmer')\nvar asyncState = require('../../async-state')\n\nvar SERVER_FNS = ['on', 'addListener']\n\nmodule.exports = function (http, client) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Support undo functions that return a promise"
},
{
"from": "human",
"value": "PromiseAllSync = {\n extend: function(PromiseClass) {\n var emptyPromise = PromiseClass.resolve || PromiseClass.when;\n PromiseClass.allSync = function(collection, fn, unfn) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to configure store for server-side rendering\n"
},
{
"from": "human",
"value": "import { createStore, applyMiddleware, compose } from 'redux';\nimport { reduxReactRouter } from 'redux-router';\nimport thunk from 'redux-thunk';\nimport createHistory from... | javascript | chosen |
[
{
"from": "system",
"value": "Use dimension shape instead of coordinate system type\n"
},
{
"from": "human",
"value": "define(function (require) {\n\n return function (seriesType, ecModel) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var data = seriesM... | javascript | chosen |
[
{
"from": "system",
"value": "Stop the loader in the finally to make sure it allways stops\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('app.controllers')\n .controller('HomeController', ['$scope', '$state', 'fileModel', 'imageModel', function HomeController($scope, $sta... | javascript | chosen |
[
{
"from": "system",
"value": "Check if content is different from undefined\n"
},
{
"from": "human",
"value": "module.exports.in = function(_msg) {\n if (_msg.properties.contentType === 'application/json') {\n try {\n return JSON.parse(_msg.content.toString());\n } catch(e) {}\n }\n... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Apply colored image when you hover the link\n\nNot just the image itself (there's padding on the link).\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\n\nimport './SocialLink.css';\n\nclass SocialLink extends Component ... | javascript | chosen |
[
{
"from": "system",
"value": "Add conversion to bar plot\n"
},
{
"from": "human",
"value": "export default function bars (data, x, y) {\n x = x || 'x'\n y = y || 'y'\n\n return {\n type: 'vegalite',\n data: {\n values: data\n },\n mark: 'bar',\n encoding: {\n x: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Clear views array on job_create event\n\nFixes juttle/outrigger#83\n\nWhen running a different program from our original program, there\nwas an issue with the old views getting reinstantiated because they\nstill existed in redux store. This change resets the views in the store\... | javascript | chosen |
[
{
"from": "system",
"value": "Set status button in serial no\n"
},
{
"from": "human",
"value": "// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors\n// License: GNU General Public License v3. See license.txt\n\ncur_frm.add_fetch(\"customer\", \"customer_name\", \"customer_na... | javascript | chosen |
[
{
"from": "system",
"value": "Use Ember.observer over named properties\n\nThe named properties are a convenience but makes it harder to overload\nlater on. It is better to use observers and in the case of an addon the\nEmber.observer() pattern\n"
},
{
"from": "human",
"value": "import Ember from... | javascript | chosen |
[
{
"from": "system",
"value": "Update parse() to grab the business URL\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Backbone = require('backbone');\nvar BusinessModel = Backbone.Model.extend({\n\tidAttribute: 'id',\n\tparse: function(data) {\n var hash = {};\n hash.name =... | javascript | chosen |
[
{
"from": "system",
"value": "Change property for painting element\n"
},
{
"from": "human",
"value": "/**\n * Class for drawing elements in canvas\n * @param {object} canvasElem handler of canvas\n*/\nvar CanvasScreen = function ( canvasElem ) {\n const SIZE = 40; //size of square\n let ct... | javascript | chosen |
[
{
"from": "system",
"value": "Remove newline characters at the end of each string\n"
},
{
"from": "human",
"value": "const Assert = require('assert');\nconst Child = require('child_process');\nconst Fs = require('fs');\nconst Path = require('path');\n\nvar packagePath = Path.join(process.cwd(), ... | javascript | chosen |
[
{
"from": "system",
"value": "Set default contact if present\n"
},
{
"from": "human",
"value": "/* eslint camelcase: 0 */\nconst { get, merge, pickBy } = require('lodash')\n\nconst { transformInteractionResponseToForm } = require('../transformers')\nconst { transformDateStringToDateObject } = re... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.