conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Add chapter 9, exercise 2\n"
},
{
"from": "human",
"value": "let text = \"'I'm the cook,' he said, 'it's my job.'\";\n// Change this call.\nconsole.log(text.replace(/(\\W|^)'|'(\\W|$)/g, '$1\"$2'));\n// → \"I'm the cook,\" he said, \"it's my job.\"\n"
},
{
"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix regex to include .jsx"
},
{
"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 'webpack/hot/only-dev-server'... | javascript | chosen |
[
{
"from": "system",
"value": "Add call to get a single experiment for a project.\n"
},
{
"from": "human",
"value": "class ExperimentsService {\n /*@ngInject*/\n constructor(projectsAPI) {\n this.projectsAPI = projectsAPI;\n }\n\n getAllForProject(projectID) {\n return t... | javascript | chosen |
[
{
"from": "system",
"value": "Update Root with CollectModuleData for legacy compat.\n"
},
{
"from": "human",
"value": "/**\n * Root component.\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 not use this ... | javascript | chosen |
[
{
"from": "system",
"value": "Update namespace to currently used convention\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n function Weapon(game, x, y, coolDown, bulletSpeed, bullets, damage) {\n this.game = game;\n this.x = x;\n this.y = y;\n this.coolDown = c... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure built-in theme assets get compiled\n"
},
{
"from": "human",
"value": "//= link_tree ../images\n//= link_tree ../javascripts\n//= link_tree ../stylesheets\n//= link_tree ../../apps/plugins/visibility_post/assets/js\n//= link plugins/cama_contact_form/admin_... | javascript | chosen |
[
{
"from": "system",
"value": "Add onEnter redirect for 'signin' and 'signup' if current user\n"
},
{
"from": "human",
"value": "angular\n .module('fitnessTracker', ['ui.router', 'templates', 'Devise'])\n .config(function($stateProvider, $urlRouterProvider) {\n $stateProvider\n .s... | javascript | chosen |
[
{
"from": "system",
"value": "Include citation data in search targets\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.controller('searchView', [\n '$scope', 'volumes', 'pageService', function ($scope, volumes, page) {\n page.display.title = page.constants.message('page.title.searc... | javascript | chosen |
[
{
"from": "system",
"value": "Make .pick-[projectname] class toggle correctly when the user clicks the button\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $ (\".project\").each(function(i) {\n $(this).click(function() {\n clickedButton = $(this).attr(\"id\");\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Support for Content Data Objects\n"
},
{
"from": "human",
"value": "import * as url from \"url\";\n\nexport function getBlob(node) {\n var buf = new Buffer(node.value.data, node.value.encoding || \"utf8\");\n var blob = new Blob([buf], { type: node.value.type ... | javascript | chosen |
[
{
"from": "system",
"value": "Use LIMIT_CHARA_LENGTH instead of Magic number\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react'\nimport {keyStringDetector} from '../registories/registory'\n\nexport default class Editor extends Component {\n\n constructor(props) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace setInterval() w/ PubSub in timeline updates socket.\n"
},
{
"from": "human",
"value": "/**\n * Serve automatic timeline updates.\n */\ndefine([], function() {\n\n 'use strict';\n\n var intervalDelay = mainevent.getConfig().timelineUpdateDelay,\n updat... | javascript | chosen |
[
{
"from": "system",
"value": "Remove space after `if` to conform to project's style\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { initialize, instanceInitialize } from 'ember-cli-segment/initializer';\n\nfunction checkVersion(version) {\n var parts = version.split('.')... | javascript | chosen |
[
{
"from": "system",
"value": "Use prerender and postrender events on Vector Clipping Layer example for better readability\n"
},
{
"from": "human",
"value": "import GeoJSON from '../src/ol/format/GeoJSON.js';\nimport Map from '../src/ol/Map.js';\nimport OSM from '../src/ol/source/OSM.js';\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "Remove drop callbacks from demo example\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nimport { VirtualKanban } from '../';\n\nimport './App.css';\n\nclass App extends Component {\n constructor(props) {\n super(props);\n\n thi... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for using conditional operator with tracked strings.\n"
},
{
"from": "human",
"value": "import processJavaScriptCode from \"./processJavaScriptCode\"\n\ndescribe(\"processJavaScriptCode\", function(){\n it(\"Wraps string literals with an object with an ... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for 'Button' component\n\nClose #583\n"
},
{
"from": "human",
"value": "/* eslint-env jasmine, jest */\n\ndescribe('components/Button', () => {\n test.skip('NO TEST COVERAGE', () => {});\n});\n"
},
{
"from": "gpt",
"value": "/* eslint-env jasm... | javascript | chosen |
[
{
"from": "system",
"value": "Add getter and setter for data\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\nimport Realm from 'realm';\n\nexport class Report extends Realm.Object {}\n"
},
{
"from": "gpt",
"value": "/**\n * mSu... | javascript | chosen |
[
{
"from": "system",
"value": "Clean price globally from title\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst cleanWhiteSpaces = require('condense-whitespace')\nconst { flow } = require('lodash')\nconst titleize = require('titleize')\n\nconst REGEX_WORDS = RegExp(require('./words.json')... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for different types with the same value giving the same hash, such as \"1\" and 1\n"
},
{
"from": "human",
"value": "/*\n * Hashcode.js 1.0.0\n * https://github.com/stuartbannerman/hashcode\n *\n * Copyright 2013 Stuart Bannerman (me@stuartbannerman.com) \n *... | javascript | chosen |
[
{
"from": "system",
"value": "[schema] Validate that type name is a string\n"
},
{
"from": "human",
"value": "import leven from 'leven'\nimport humanize from 'humanize-list'\nimport {error, HELP_IDS} from '../createValidationResult'\n\nconst quote = str => `\"${str}\"`\n\nexport function validat... | javascript | chosen |
[
{
"from": "system",
"value": "Make the test for .when() method pass\n"
},
{
"from": "human",
"value": "(function (root, factory) {\n 'use strict';\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add outputPath to test scenario 2.\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 options;\n\n switch (process.en... | javascript | chosen |
[
{
"from": "system",
"value": "Add GLOBAL as global var\n"
},
{
"from": "human",
"value": "var chai = require('chai');\nvar supertest = require('supertest-as-promised');\nvar api = require('../../server');\nvar request = supertest(api);\nvar blueprint_client = require('../../modules/blueprint');\... | javascript | chosen |
[
{
"from": "system",
"value": "Add guards for null values. Move address formatting to internal pr\n"
},
{
"from": "human",
"value": "DDG.require('maps',function(){\n ddg_spice_maps_maps = function(response) {\n \n if (!response) { return Spice.failed('maps'); }\n\n // OSM ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix autofocus in user login dialog\n"
},
{
"from": "human",
"value": "/* Directives */\nangular.module('myApp.directives')\n .directive('ngVisible', function() {\n return function(scope, elem, attr) {\n scope.$watch(attr.ngVisible, f... | javascript | chosen |
[
{
"from": "system",
"value": "Add product name to model.\n"
},
{
"from": "human",
"value": "define(['jquery', 'underscore', 'backbone'], function($, _, Backbone) {\n\tvar Models = {};\n\tModels.Want = Backbone.Model.extend({\n\t\tdefaults: {\n\t\t\tid: '',\n\t\t\tname: '',\n\t\t\tprice: '',\n\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Added a `ci` task for `grunt`.\"\n\nThis reverts commit fc2e56b49ced252632f6d018596131fe51e1b3e2.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n 'use strict';\n\n // Configuration\n grunt.initConfig({\n pkg: grunt.fi... | javascript | chosen |
[
{
"from": "system",
"value": "[Bot] Add constructor and config system\n"
},
{
"from": "human",
"value": "function Bot() {\n}\n\nmodule.exports = Bot;\n"
},
{
"from": "gpt",
"value": "var util = require('util');\nvar path = require('path');\nvar debug = require('debug')('ircapp:bot');... | javascript | chosen |
[
{
"from": "system",
"value": "Add a double requestAnimationFrame to count paint performance\n"
},
{
"from": "human",
"value": "import {PureComponent} from 'react';\nimport parseDiff from 'parse-diff';\nimport File from './File';\nimport './App.css';\n\n/* eslint-disable no-console */\n\nexport d... | javascript | chosen |
[
{
"from": "system",
"value": "Change endpoint for the api calls\n"
},
{
"from": "human",
"value": "import * as $ from \"../../bower_components/jquery/dist/jquery\";\n\nexport const API_ENDPOINT = 'http://localhost:8000';\nexport const DEBUG = true\n\n/**\n * Function to make all the api calls.\n... | javascript | chosen |
[
{
"from": "system",
"value": "Return the appended node to match the DOM api\n"
},
{
"from": "human",
"value": "var mocks = {\n getFakeView: function(width, height) {\n return {\n handler: false,\n clientWidth: width,\n clientHeight: ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused code to create a pojo from an Ember object\n"
},
{
"from": "human",
"value": "// http://timkadlec.com/2013/01/windows-phone-8-and-device-width/\nif (navigator.userAgent.match(/IEMobile\\/10\\.0/)) {\n var msViewportStyle = document.createElement('styl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix that damn algorithm again\n"
},
{
"from": "human",
"value": "// distance.js\n// Finds the closest user match with n dimensions of compatability\n\n// Expects a tag:count map from the user and a tag:count map from a blog\nmodule.exports = {\n\tmatch: function(use... | javascript | chosen |
[
{
"from": "system",
"value": "[Glitch] Reword the direct message warning\n\nPort 53c2164e9c8e2538de386a526a97db187ecae470 to glitch-soc\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport spring from 'react-motion/lib/... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unneeded (and actually not even invokved) chmodSync after the file is written\n"
},
{
"from": "human",
"value": "const Fs = require('fs');\nconst Path = require('path');\n\nconst Hoek = require('hoek');\n\nconst FindNodeVersion = require('./find-node-version'... | javascript | chosen |
[
{
"from": "system",
"value": "Add keyboard shortcuts + browser UI"
},
{
"from": "human",
"value": "var menubar = require('menubar');\n\nvar mb = menubar({\n \"index\": 'https://usecamino.com',\n \"preloadWindow\": true,\n \"width\": 475,\n \"height\": 370,\n \"icon\": \"icon.png\",\n \"sho... | javascript | chosen |
[
{
"from": "system",
"value": "Improve window sizing on Windows\n\ntested on Windows 7 and 10\n"
},
{
"from": "human",
"value": "var electron = require('electron'); // Module to control application life.\nvar process = require('process');\nrequire('electron-debug')({showDevTools: false});\nconst... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce complexity of scrypt params to improve login speed during development\n"
},
{
"from": "human",
"value": "var kdfParams = module.exports;\n\nkdfParams.show = function(req,res,next) {\n res.status(200).send({ \n algorithm: 'scrypt',\n bits: 256,\n n: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix avoiding crash if URL is invalid\n\nSigned-off-by: toshi0123 <661e25bb3f77d7010d4dcf7b0aff8b68fa2b1b9c@users.noreply.github.com>"
},
{
"from": "human",
"value": "'use strict'\nconst URL = require('url').URL\nconst path = require('path')\n\nconst config = require... | javascript | chosen |
[
{
"from": "system",
"value": "Add create(post) method in ticket component:\n- fuck yeah\n"
},
{
"from": "human",
"value": "'use strict';\n\nwoodstock.controller('TicketListController', ['$scope', '$location', '$routeParams', 'TicketService',\n function ($scope, $location, $routeParams, Ticket... | javascript | chosen |
[
{
"from": "system",
"value": "Put the onlick on the entire div, so that clicking on the chevron toggles the accordion\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport \"./AccordionTab.css\";\n\nclass AccordionTab extends React.Component {\n constructor(props) {\n super... | javascript | chosen |
[
{
"from": "system",
"value": "Add build cli command to test\n"
},
{
"from": "human",
"value": "var vows = require('vows'),\n assert = require('assert'),\n fs = require('fs'),\n path = require('path');\n\nfunction testExample(dir) {\n return {\n 'Folder' : {\n topic: function() ... | javascript | chosen |
[
{
"from": "system",
"value": "Change default user image (when user is logged in)\n"
},
{
"from": "human",
"value": "define('app/views/user_menu', ['text!app/templates/user_menu.html', 'ember'],\n /**\n * User Menu View\n *\n * @returns Class\n */\n function(user_menu_html... | javascript | chosen |
[
{
"from": "system",
"value": "Add disconnect on reconnect event\n"
},
{
"from": "human",
"value": "const { Listener } = require('discord-akairo');\nconst Logger = require('../../../util/Logger');\n\nfunction exec() {\n Logger.info('Client reconnecting.');\n}\n\nmodule.exports = new Listener('... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for attribute selectors not being totalled correctly by Identifiers Per Selector metric\n"
},
{
"from": "human",
"value": "/*! Parker v0.0.0 - MIT license */\n\n'use strict';\n\nvar _ = require('underscore');\n\nmodule.exports = {\n id: 'identifiers-per-selec... | javascript | chosen |
[
{
"from": "system",
"value": "Set negative default step where useful\n"
},
{
"from": "human",
"value": "function range(start, end, step = 1) {\n\tlet arr = [];\n\tfor (let n = start; Math.abs(n - start) <= Math.abs(end - start); n += step) {\n\t\tarr.push(n);\n\t}\n\n\treturn arr;\n}\n\nfunction... | javascript | chosen |
[
{
"from": "system",
"value": "Add search input and search button\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport React from 'react';\nimport {\n\tStyleSheet,\n\tText,\n\tTextInput,\n\tView,\n\tImage,\n\tTouchableHighlight,\n\tActivityIndicatorIOS\n} from 'react-native';\n\nconst style... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error reporting in copy script\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst fs = require('fs')\nconst path = require('path')\n\nconst src = path.join(__dirname, '..', '.waiting.html')\nconst dir = path.join(__dirname, '..', 'coverage')\nconst dst = p... | javascript | chosen |
[
{
"from": "system",
"value": "Undo the last commit (will update later)"
},
{
"from": "human",
"value": "exports.BattleFormatsData = {\n\tkangaskhanmega: {\n\t\trandomBattleMoves: [\"fakeout\",\"return\",\"suckerpunch\",\"earthquake\",\"poweruppunch\",\"crunch\"],\n\t\trandomDoubleBattleMoves: [\... | javascript | chosen |
[
{
"from": "system",
"value": "Make specific cache instance for page cache\n"
},
{
"from": "human",
"value": "var P = require('bluebird');\nvar url = require('url');\nvar fetch = require('node-fetch');\nfetch.Promise = P;\n\nvar Cache = require('../lib/background-refresh-cache');\n\nvar debug = r... | javascript | chosen |
[
{
"from": "system",
"value": "Add backwards compatibility for Node.js 0.10\n"
},
{
"from": "human",
"value": "var banner = require('./');\nlet chai = require('chai');\nlet expect = chai.expect;\n\ndescribe('banner', () => {\n\n const FILEPATH = 'test-target.js';\n\n context('without options (u... | javascript | chosen |
[
{
"from": "system",
"value": "Include on necessary parts of plugins\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n'use strict';\n\nconst EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n let app = new EmberApp(defaults, {\n // Add ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove previous spinner before adding spinner\n"
},
{
"from": "human",
"value": "/*\n * Author: CM\n */\n(function($) {\n\n\t$.clickDecorators.spinner = {\n\t\tafter: function(event, returnValue) {\n\t\t\tif (returnValue && _.isFunction(returnValue.promise)) {\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Test clean-empty-lines with other *-empty-line-before option\n"
},
{
"from": "human",
"value": "'use strict';\n\ntest(\n\t`Should do nothing if config is undefined`,\n\t() => runTest('empty-lines-preserve')\n);\n"
},
{
"from": "gpt",
"value": "'use stric... | javascript | chosen |
[
{
"from": "system",
"value": "Fix save disable currency on admin\n"
},
{
"from": "human",
"value": "TinyCore.AMD.define('currency-table', ['devicePackage' ], function () {\r\n return {\r\n onStart: function () {\r\n\r\n setTimeout( function() {\r\n\r\n $('#cur... | javascript | chosen |
[
{
"from": "system",
"value": "Improve view all handling in tenderfoot\n"
},
{
"from": "human",
"value": "$(document).ready(function(){\n $(\"#viewAllTab\").on(\"click\",function(){\n $('[data-toggle=\"tab\"]').parent().removeClass(\"active\");\n $(\"#viewAllTab\").parent().addCl... | javascript | chosen |
[
{
"from": "system",
"value": "Introduce `equalOps` test helper for comparing operations.\n\nProvides comparisons of Operation instances based on their serialized\nform."
},
{
"from": "human",
"value": "var verifyLocalStorageContainsRecord = function(namespace, type, id, record, ignoreFields) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Handle response with 0 results\n"
},
{
"from": "human",
"value": "var apiKey = \"<YOUR-KEY>\";\nvar geocoder = require('node-geocoder') (\"google\", \"https\", { apiKey: apiKey });\nvar csv = require('csv');\n\nprocess.stdin\n\t.pipe(csv.parse())\n\t.pipe(csv.transf... | javascript | chosen |
[
{
"from": "system",
"value": "Fix length for hashtags, increased to 101 characters.\n"
},
{
"from": "human",
"value": "/**\n Supports Discourse's category hashtags (#category-slug) for automatically\n generating a link to the category.\n**/\nDiscourse.Dialect.inlineRegexp({\n start: '#',\n m... | javascript | chosen |
[
{
"from": "system",
"value": "Set up autostart of onboarding imports when ready\n\n- when UI connman receives INIT cmd, it immediately sends off the START cmd to the bg connman (in imports this happens when you press \"Start\" btn)\n"
},
{
"from": "human",
"value": "import { createAction } from ... | javascript | chosen |
[
{
"from": "system",
"value": "Make it usable with international amazon websites\n"
},
{
"from": "human",
"value": "if (window.location.hostname.substr(0, 5) !== 'smile') {\n window.location.hostname = 'smile.amazon.com'\n}\n"
},
{
"from": "gpt",
"value": "if (window.location.hostnam... | javascript | chosen |
[
{
"from": "system",
"value": "Optimize solution for the chapter 1\n"
},
{
"from": "human",
"value": "const readline = require('readline');\n\nconst rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n});\n\n/**\n * 汉诺塔移动函数\n * @param {Number} levels 本次要移动的层级数\n *... | javascript | chosen |
[
{
"from": "system",
"value": "Refresh logs when callback stopped\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n var mod = angular.module('cla.directives');\n\n mod.directive('callbackStatus', ['AppSettings', '$filter', 'flash', function (AppSettings, filter, flash) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add version constraint for xamfoo:reactive-obj\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'blazer:react',\n version: '0.1.1',\n summary: \"Blaze add-on: Create stateful components with methods and mixins like in Facebook's React\",\n git: 'htt... | javascript | chosen |
[
{
"from": "system",
"value": "Include tiles in menu response\n"
},
{
"from": "human",
"value": "/*global FormplayerFrontend, Util */\n\nFormplayerFrontend.module(\"Menus.Collections\", function (Collections, FormplayerFrontend, Backbone, Marionette, $) {\n\n Collections.MenuSelect = Backbone.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix proxy bypass for missing static case\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar path = require('path');\nvar fs = require('fs');\nvar webpack = require('webpack');\nvar WebpackDevServer = require('webpack-dev-server');\n\n// the following will... | javascript | chosen |
[
{
"from": "system",
"value": "Update typescript plugin patch version to match npm version.\n"
},
{
"from": "human",
"value": "Package.describe({\n name: \"typescript\",\n version: \"3.6.2-rc182.3\",\n summary: \"Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files\",\... | javascript | chosen |
[
{
"from": "system",
"value": "Add unload event to force browsers not to use bfcache\n"
},
{
"from": "human",
"value": "'use strict';\nvar $ = require('jquery');\n\nvar pointers = require('js/pointers');\nvar AccountClaimer = require('js/accountClaimer.js');\nvar $osf = require('js/osfHelpers');\... | javascript | chosen |
[
{
"from": "system",
"value": "Add a TODO to gulp tasks\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar gls = require('gulp-live-server');\nvar bs = require('browser-sync').create();\n\ngulp.task('default', ['server', 'browser-sync'], function() {\n});\n\ngulp.task('server', f... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure error type exists before flash message\n"
},
{
"from": "human",
"value": "AutoForm.addHooks('usersEnrollForm', {\n onError (formType, error) {\n // Show the error to end user\n // TODO: add internationalization support for specefic error type(s)\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Create unique id for headings\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Title } from '@patternfly/react-core';\nimport { LinkIcon } from '@patternfly/react-icons';\nimport { slugger } from '../../helpers/slugger';\nimport './autoLinkHea... | javascript | chosen |
[
{
"from": "system",
"value": "eslint: Enable browser in env options\n\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: 'eslint:recommended',\n parserOptions: {\n ecmaVersion: 6,\n sourceType: 'module',\n ecmaFeatures: {\n experimentalObjectRestSpread: true\n }\... | javascript | chosen |
[
{
"from": "system",
"value": "Use capital letters in viget\n"
},
{
"from": "human",
"value": "import Viget from '../components/viget'\nimport DOM from 'react-dom'\nimport React from 'react'\nimport { update } from '../actions/circle'\n\nexport default function Render (app, el, next) {\n funct... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sort content types in role view\n\nSigned-off-by: soupette <367d233c448abb973a0136207eb0cf446765a6f5@strapi.io>\n"
},
{
"from": "human",
"value": "import React, { memo } from 'react';\nimport PropTypes from 'prop-types';\nimport { Box } from '@strapi/parts/Box';... | javascript | chosen |
[
{
"from": "system",
"value": "Remove amount of round trip to the server\n"
},
{
"from": "human",
"value": "liveblogSyndication\n .directive('lbIncomingSyndication',\n ['$routeParams', 'IncomingSyndicationActions', 'IncomingSyndicationReducers', 'Store',\n function($routeParams, ... | javascript | chosen |
[
{
"from": "system",
"value": "Add getter for active job\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vend... | javascript | chosen |
[
{
"from": "system",
"value": "Throw undefined error more friendly\n"
},
{
"from": "human",
"value": "import { helper } from 'ember-helper'\nimport { defaultLocale, changeLocale, localeHasBeenChanged } from '../utils/locale'\nimport generateImageURL from '../utils/image'\nimport faker from 'faker... | javascript | chosen |
[
{
"from": "system",
"value": "Fix [IQSLDSH-107] - the MongoDB server date was used as default, now user date is used.\n"
},
{
"from": "human",
"value": "/*jslint nomen: true, vars: true*/\n/*global _, angular, ApplicationConfiguration*/\n(function () {\n 'use strict';\n angular.module('blu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix journey graph tests following removal of the matrix\n"
},
{
"from": "human",
"value": "define([\n 'common/views/visualisations/journey-graph/journey-graph',\n 'common/collections/journey',\n 'extensions/collections/collection'\n],\nfunction (JourneyGraph, Jou... | javascript | chosen |
[
{
"from": "system",
"value": "feat(redux-module-activities): Update to use Records for initialState\n"
},
{
"from": "human",
"value": "import {fromJS, Record} from 'immutable';\n\nimport {\n STORE_ACTIVITIES,\n UPDATE_ACTIVITY\n} from './actions';\n\nconst Activity = Record({\n id: null,\n a... | javascript | chosen |
[
{
"from": "system",
"value": "Use s instead of s2 for sample standard deviation"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n* Compute a sample standard deviation incrementally.\n*\n* @module @stdlib/math/generics/statistics/incrstdev\n*\n* @example\n* var incrstdev = require( '@stdlib... | javascript | chosen |
[
{
"from": "system",
"value": "Update screen title as per Sarah's edits"
},
{
"from": "human",
"value": "module.exports = {\n checkEligibilityScreenTitle: 'See if you qualify for Premium Assistance',\n incomeDataRequired: 'Please provide income information',\n incomeDataMaxLength: 'Too many ch... | javascript | chosen |
[
{
"from": "system",
"value": "Correct status variable.\nAll methods now return promises, as well as execute the callback.\n"
},
{
"from": "human",
"value": "\nvar argscheck = require('cordova/argscheck'),\n utils = require('cordova/utils'),\n exec = require('cordova/exec');\n\nvar ApplePay... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken require after refactoring"
},
{
"from": "human",
"value": "import program from 'commander'\nimport sagui from './index'\nimport { InvalidPath } from './plugins/path'\nimport { logError, log } from './util/log'\n\nprogram.command('build')\n .description('... | javascript | chosen |
[
{
"from": "system",
"value": "Fix production build broken by tracking\n"
},
{
"from": "human",
"value": "import ua from 'universal-analytics'\nimport { machineIdSync } from 'node-machine-id'\nimport { version as appVersion } from '../package.json'\nimport config from './config'\n\nconst DEFAULT_... | javascript | chosen |
[
{
"from": "system",
"value": "Read from multiple files, not just the first one\n"
},
{
"from": "human",
"value": "import fs from 'fs';\nimport { parse } from './parser';\n\nexport function extractIntl(files) {\n return new Promise((resolve, reject) => {\n if (!Array.isArray(files)) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust Alert snippets to make for equal outcome between programmatic and declarative instantiation\n"
},
{
"from": "human",
"value": "var alert = new Alert({\n 'class': 'alert-success fade in',\n content: \"<strong>Oh yeah!</strong> That's just lookin' fine\",... | javascript | chosen |
[
{
"from": "system",
"value": "Add specific indicator functionality to page indicators\n\nAllows us to specify the precise location we'd like the page indicators\nto appear.\n"
},
{
"from": "human",
"value": "define(['jquery', 'Templates', 'IndicatorFilter'], function($, Templates, IndicatorFilte... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a check for an empty mediaType\n\nWe need it for the old attachments.\n"
},
{
"from": "human",
"value": "define([\"app/app\"], function(App) {\n \"use strict\";\n\n App.Attachment = DS.Model.extend({\n file: DS.attr('file'), // FormData File object\n url... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate account repository to promise based version.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst BaseRepository = require('@gfcc/mongo-tenant-repository/BaseRepository');\n\n/**\n * @class AccountRepository\n */\nclass AccountRepository extends BaseRep... | javascript | chosen |
[
{
"from": "system",
"value": "Use pitch detection to send pitch events to server in hz.\nUses optimized method on top of WebAudio FFT analysis to get pitch\naccurate to 1hz (depending on accuracy of microphone and ambient\nnoise. Todo: noise canceling.)\n"
},
{
"from": "human",
"value": "var con... | javascript | chosen |
[
{
"from": "system",
"value": "Append a link to the file(s) instead of evaluating them\n"
},
{
"from": "human",
"value": "var hostname = location.hostname.replace(/^www\\./, '')\n\n$.ajax({\n\turl: chrome.extension.getURL('styles/' + hostname + '.css'),\n\tdataType: 'text',\n\tsuccess: function(d... | javascript | chosen |
[
{
"from": "system",
"value": "Swap integrate as the generalized version taking any number of variables\n"
},
{
"from": "human",
"value": "var eng = require('./node/engine');\n\nvar integrate = module.exports = function (func, lower, upper, options, callback){\n eng.runPython('single', func, opt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix crash with React 0.13\n"
},
{
"from": "human",
"value": "function hasRender(Class) {\n var prototype = Class.prototype;\n if (!prototype) {\n return false;\n }\n\n return typeof prototype.render === 'function';\n}\n\nfunction descendsFromReactComponent(Cl... | javascript | chosen |
[
{
"from": "system",
"value": "Add anchor icons to all headings with ids\n"
},
{
"from": "human",
"value": "document.addEventListener('DOMContentLoaded', () => {\n const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);\n if ($navbarBurgers.length > 0)... | javascript | chosen |
[
{
"from": "system",
"value": "Update layer migration to use promises\n"
},
{
"from": "human",
"value": "var Layer = require('../models/layer');\n\nexports.id = 'create-initial-osm-layer';\n\nexports.up = function(done) {\n console.log('\\nCreating open street map layer...');\n\n var osm = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add caret to start of regex\n\nThis counteracts an issue where initializers within test directories\ncould be automatically loaded.\n"
},
{
"from": "human",
"value": "(function() {\ndefine(\"ember/load-initializers\",\n [],\n function() {\n \"use strict\";\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve style errors on input block\n"
},
{
"from": "human",
"value": "module.exports = {\n className: 'input-block',\n template: require('./index.html'),\n lazy: false,\n data: {\n name: 'Input',\n icon: '/images/blocks_input.png',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change event to plan in migration file to avoid using a JS keyword... oops\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nexports.up = (knex, Promise) => {\n return knex.schema.createTable(\"dailyplans_events\", (table) => {\n table.increments();\n tab... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.