conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Use deep equal over array join\n"
},
{
"from": "human",
"value": "/* global QUnit */\nimport Em from 'ember';\nimport ArrayOffset from 'array-offset';\n\nQUnit.module('ArrayOffset');\n\nQUnit.test('constructor exists', function (assert) {\n\tassert.ok(ArrayOffset, '... | javascript | chosen |
[
{
"from": "system",
"value": "Use Ajax if it is available\n\nAjax may be less buggy than XMLHttpRequest."
},
{
"from": "human",
"value": "function getCookie(name) {\n var cookieValue = null;\n if (document.cookie && document.cookie !== '') {\n var cookies = document.cookie.split(';'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix plotline getting removed when children present\n"
},
{
"from": "human",
"value": "import React, { useRef, useEffect, useState } from 'react';\nimport uuid from 'uuid/v4';\nimport { attempt } from 'lodash-es';\nimport useModifiedProps from '../UseModifiedProps';\... | javascript | chosen |
[
{
"from": "system",
"value": "Use utility and fun packages\n"
},
{
"from": "human",
"value": "export const name = 'My Module';\n"
},
{
"from": "gpt",
"value": "import memGen from './example/memoized-fib-gen';\nimport console from 'better-console';\nimport ordinal from 'ordinal-number... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JSLint to pass build\n"
},
{
"from": "human",
"value": "/**\n * Created by i070970 on 8/26/14.\n */\n(function () {\n 'use strict';\n\n\n function sapSharedNotificationsService($rootScope) {\n\n var items = [];\n\n this.setItems = function (c... | javascript | chosen |
[
{
"from": "system",
"value": "Restructure to include ws version of code\n"
},
{
"from": "human",
"value": "module.exports = require('./index.js');\n"
},
{
"from": "gpt",
"value": "var extend = require('cog/extend');\n\nmodule.exports = function(messenger, opts) {\n return require('.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix w/ pool of canvases\n"
},
{
"from": "human",
"value": "var fs = require(\"fs\"),\n path = require(\"path\"),\n Canvas = require(\"canvas\"),\n queue = require(\"d3\").queue;\n\nfunction drawFrames(renderer, options, cb) {\n\n var frameQueue = queue(10)... | javascript | chosen |
[
{
"from": "system",
"value": "Replace observer with a computed property\n"
},
{
"from": "human",
"value": "import Component from '@ember/component';\nimport { get, observer } from '@ember/object';\nimport { once } from '@ember/runloop';\n\nexport default Component.extend({\n tagName: 'span',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add radio toggling to the beginning of the test\n\nThe toggling was added in a way that the Android crash should not occur.\n"
},
{
"from": "human",
"value": "/*\n * This file needs to be renamed as app.js when we want to run unit tests\n * in order this to get load... | javascript | chosen |
[
{
"from": "system",
"value": "Add logic for index Controller\n"
},
{
"from": "human",
"value": "// js/controllers/users-index-controller\n"
},
{
"from": "gpt",
"value": "// js/controllers/users-index-controller\n\n(function() {\n \"use strict\";\n\n angular.module(\"NoteWrangler\")... | javascript | chosen |
[
{
"from": "system",
"value": "Use destructuring to access this.props.route properties\n\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react';\nimport CourseList from './CourseList';\nimport GpaList from './GpaList';\nimport { loadSchedule, loadGpa } from '../../data-source';... | javascript | chosen |
[
{
"from": "system",
"value": "Remove a blank whitespace at the top"
},
{
"from": "human",
"value": "\n/*eslint-disable */\nvar path = require('path')\nvar express = require('express')\nvar app = express()\n\napp.use(express.static('public'))\napp.use(express.static('public/assets'))\n\n// TODO W... | javascript | chosen |
[
{
"from": "system",
"value": "Fix site label decorate example - specify correct accessors and pad x-domain\n"
},
{
"from": "human",
"value": "var width = 500, height = 250;\nvar container = d3.select('#decorate-labels')\n .append('svg')\n .attr({'width': width, 'height': height});\n\nvar d... | javascript | chosen |
[
{
"from": "system",
"value": "Check that display_name actually exists\n"
},
{
"from": "human",
"value": "const CoreView = require('backbone/core-view');\nconst template = require('./support-view/support-banner.tpl');\nconst checkAndBuildOpts = require('../../cartodb3/helpers/required-opts');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in rerender test helper\n"
},
{
"from": "human",
"value": "import { Component } from '../../src';\n\n/**\n * Setup the test environment\n * @returns {HTMLDivElement}\n */\nexport function setupScratch() {\n\tconst scratch = document.createElement('div');\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix The Seven Deadly Sins search.\nBug reported on chrome web store\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003).\n I left this object because it could be us... | javascript | chosen |
[
{
"from": "system",
"value": "Connect protractor directly with browsers\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulpConfig = require(__dirname + '/../gulpfile').config;\n\nvar sessionPage = require(__dirname + '/e2e/pages/session');\n\nexports.config = {\n allScriptsTimeout: 900... | javascript | chosen |
[
{
"from": "system",
"value": "Modify the strip react component to use the reducer state\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react';\nimport {connect} from 'react-redux';\nimport {Link} from 'react-router';\n\nclass ListStrips extends Component {\n\n componentDidMo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix observation of reduced events\n"
},
{
"from": "human",
"value": "// Returns fragment of specified records\n\n'use strict';\n\nvar aFrom = require('es5-ext/array/from')\n , uniq = require('es5-ext/array/#/uniq')\n , ensureString = requir... | javascript | chosen |
[
{
"from": "system",
"value": "ecs: Use `instanceof` checks when retrieving components.\n"
},
{
"from": "human",
"value": "/* exported withEntity */\n\nfunction withEntity(Class) {\n return class WithEntity extends Class {\n constructor(...args) {\n super(...args);\n\n this.componen... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the rows fetching for the enum\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Promise = require('bluebird');\n\nconst db = require('../shared/db');\n\nconst getSources = require('./sources');\nconst entries = require('./entries');\nconst insertEntries... | javascript | chosen |
[
{
"from": "system",
"value": "Disable BETA and CANARY scenarios\n"
},
{
"from": "human",
"value": "/*jshint node:true*/\nmodule.exports = {\n};\n"
},
{
"from": "gpt",
"value": "/*jshint node:true*/\nmodule.exports = {\n useVersionCompatibility: true,\n scenarios: [\n {\n na... | javascript | chosen |
[
{
"from": "system",
"value": "Add ember 1.11.1 to testing\n"
},
{
"from": "human",
"value": "module.exports = {\n scenarios: [\n {\n name: 'Ember 1.10',\n dependencies: {\n 'ember': '1.10.0'\n }\n },\n {\n name: 'Ember 1.11.0',\n dependencies: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make $id property be concepts key\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports =\n\n/*@ngInject*/\nfunction GrammarActivitiesEditCmsCtrl (\n $scope, GrammarActivity, $state, _, ConceptsFBService\n) {\n $scope.grammarActivity = {};\n $scope.g... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error when creating categories\n\nResolves #267\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport emoji from '../../../common/services/js-emoji';\n\nexport default function CategoryListItem(props) {\n const {\n category, isOnline, onClick... | javascript | chosen |
[
{
"from": "system",
"value": "Read aws creds from env vars\n"
},
{
"from": "human",
"value": "var AWS = require('aws-sdk');\nvar Promise = require('bluebird');\n\nfunction createInstance() {\n AWS.config.accessKeyId = 'AKIAJQLV5HHIH4QP3PRQ';\n AWS.config.secretAccessKey = '9CbG40kr1yOUfq5K... | javascript | chosen |
[
{
"from": "system",
"value": "Store the app on window for debugging.\n"
},
{
"from": "human",
"value": "import { getQueryStringParam, substanceGlobals, platform } from 'substance'\nimport { TextureWebApp } from 'substance-texture'\n\nwindow.addEventListener('load', () => {\n substanceGlobals.DE... | javascript | chosen |
[
{
"from": "system",
"value": "Rename angular-mocks path and shim\n"
},
{
"from": "human",
"value": "// requiring global requireJS config\nrequire(['/base/config/require.conf.js'], function() {\n 'use strict';\n\n // first require.config overload: Karma specific\n require.config({\n baseUrl... | javascript | chosen |
[
{
"from": "system",
"value": "Change granularity of the time picker to minutes\n"
},
{
"from": "human",
"value": "function initDatePicker(container, elem, pickerOptions) {\n $(container + ' ' + elem).fdatepicker(pickerOptions);\n\n $(container + ' ' + elem + '-wrapper .prefix i').on('click', f... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor function name for consistency\n\nDb -> DB (as in PouchDB)\n"
},
{
"from": "human",
"value": "import path from 'path'\nimport url from 'url'\nimport PouchDB from 'pouchdb'\n\nconst dbNamePrefix = global.dbNamePrefix || ''\n\nexport default function getDB(nam... | javascript | chosen |
[
{
"from": "system",
"value": "Change from Date.now to performance.now for time delta extension\n"
},
{
"from": "human",
"value": "/*global Engine2D*/\n/**\n * @author jackdalton\n */\n;(function() {\n /**\n * Delta timer constructor.\n * \n * @param {boolean} [true] autoInit - Aut... | javascript | chosen |
[
{
"from": "system",
"value": "Clean out expired tokens periodically\n"
},
{
"from": "human",
"value": "var LamassuConfig = require('lamassu-config');\nvar psql = process.env.DATABASE_URL || 'postgres://lamassu:lamassu@localhost/lamassu';\nmodule.exports = new LamassuConfig(psql);\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Add checkAuth to api routes\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar bodyParser = require('body-parser');\nvar session = require('express-session');\nvar passport = require('passport');\nvar sockets = require('./routes/sockets.js');\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the message relationship strategy for the time being\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar _ = require('lodash');\nvar glimpse = require('glimpse');\n\nvar _straties = []; \n\nmodule.exports = { \n registerStrategy: function(strategy) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Insert newlines and add decimal point\n"
},
{
"from": "human",
"value": "'use strict';\n\n// MODULES //\n\nvar gammaFactory = require( '@stdlib/math/base/dist/gamma/pdf' ).factory;\n\n\n// MAIN //\n\n/**\n* Returns a function for evaluating the probability density f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix workshop loading spinner not showing properly\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport Radium from 'radium'\nimport Helmet from 'react-helmet'\nimport Axios from 'axios'\nimport { NavBar, LoadingSpinner } from '../../co... | javascript | chosen |
[
{
"from": "system",
"value": "Update template away from legacy variation setting\n"
},
{
"from": "human",
"value": "$(function () {\n // We move the background image and class from data-stripe-wrapper up to the closest\n // div containing the special custom template class. Because it's thi... | javascript | chosen |
[
{
"from": "system",
"value": "Add client ID for heroku [ci skip]\n"
},
{
"from": "human",
"value": "// Angular js application\n(function() {\n var app = angular.module('checkit', ['satellizer'])\n .config(function($authProvider){\n $authProvider.github({\n clientId: ''\n });... | javascript | chosen |
[
{
"from": "system",
"value": "Change game description to medium size.\n"
},
{
"from": "human",
"value": "'use strict';\nmodule.exports = {\n up: function(queryInterface, Sequelize) {\n return queryInterface.createTable('Games', {\n id: {\n allowNull: false,\n autoIncrement... | javascript | chosen |
[
{
"from": "system",
"value": "Add uncontrolled with default example\n"
},
{
"from": "human",
"value": "import React, { Component } from \"react\";\nimport PlaygroundSection from \"../PlaygroundSection\";\nimport { Checkbox } from \"../../react-hig\";\n\nconst checkboxStyle = {\n display: \"flex... | javascript | chosen |
[
{
"from": "system",
"value": "Copy over some functionality from old\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('repicbro.controllers', ['repicbro.services'])\n .controller('MainCtrl', function ($scope, $http, Posts) {\n $scope.posts = [];\n $scope.current = null;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add release build at proper step"
},
{
"from": "human",
"value": "var async = require('async'),\n git = require('./util/git'),\n semver = require('semver');\n\nmodule.exports = function(grunt) {\n grunt.registerTask('version', 'Updates the current release ver... | javascript | chosen |
[
{
"from": "system",
"value": "Stop spinner when done :fistpump:\n"
},
{
"from": "human",
"value": "// When the document is ready\n$(document).ready(function() {\n // Grab the Handlebars template from a <script> tag\n alertTemplateText = $('#alertTemplateText').html();\n // Compile the Handleb... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor with intention of adding state for command prompt.\n"
},
{
"from": "human",
"value": "function init() {\n console.log('Loaded');\n var cmdline = document.getElementById('cmdline');\n cmdline.oninput = readChar;\n}\n\nfunction readChar(evt) {\n var cmd =... | javascript | chosen |
[
{
"from": "system",
"value": "Remove bower file from project\n"
},
{
"from": "human",
"value": "(function() {\n\t'use strict';\n\n\tmodule.exports = function(config) {\n\t\tvar fs = require('fs-extra'),\n\t\t\tpath = require('path'),\n\t\t\tfiles = [\n\t\t\t\t'bower.json',\n\t\t\t\t'LICENSE',\n\... | javascript | chosen |
[
{
"from": "system",
"value": "building-hours: Change tests to use a constant\n\nSigned-off-by: Kristofer Rye <1ed31cfd0b53bc3d1689a6fee6dbfc9507dffd22@gmail.com>\n"
},
{
"from": "human",
"value": "// @flow\nimport moment from 'moment-timezone'\nexport {moment}\n\nexport const dayMoment = (time: ... | javascript | chosen |
[
{
"from": "system",
"value": "Change initializer arity for Ember 2.x\n"
},
{
"from": "human",
"value": "export default {\n name: 'rails-csrf',\n initialize: function(container, app) {\n app.inject('route', 'csrf', 'service:csrf');\n app.inject('controller', 'csrf', 'service:csrf');\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong parameter on fail message in init game\n"
},
{
"from": "human",
"value": "/* global angular */\nimport {web3, Chess} from '../../contract/Chess.sol';\nangular.module('dappChess').controller('InitializeGameCtrl',\n function ($rootScope, $scope) {\n $sco... | javascript | chosen |
[
{
"from": "system",
"value": "Add gzipped and non-gzipped file size output\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n rename = require('gulp-rename'),\n basswork = require('gulp-basswork'),\n minifyCss = require('gulp-minify-css'),\n transform = require('vinyl-t... | javascript | chosen |
[
{
"from": "system",
"value": "Watch on any file (js, html, etc.)\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\n\n// Tasks\ngulp.task('browserify', require('./gulp/browserify'));\ngulp.task('lint', require('./gulp/eslint'));\ngulp.task('karma', require('./gulp/karma'));\n\n// Wa... | javascript | chosen |
[
{
"from": "system",
"value": "Improve the attrs key usability\n\nchange semantics from 2D array to a more intuitive object notation.\n"
},
{
"from": "human",
"value": "function createElement(hash, context){\n var element;\n\n //create the element\n if(hash.direct) element = hash.direct;\n el... | javascript | chosen |
[
{
"from": "system",
"value": "Add crypto module for pass\n"
},
{
"from": "human",
"value": "/**\n * 全局配置\n * 部署到服务端时,请去掉文件名中的default\n * 并将以下参数配置完整,重要信息请妥善保管\n */\nvar config = {\n // port\n port: process.env.PORT || '3000',\n\n // mongodb\n mongodb:\n 'mongodb://mongodb-master:27017,mong... | javascript | chosen |
[
{
"from": "human",
"value": "Copy pasted into the seperate file\n"
},
{
"from": "gpt",
"value": "const ms = require('ms');\nconst moment = require('moment');\n function functionName() {\n setInterval(async () => {\n let arr = await r.table('timers').filter({userID : \"NONE\"}).run();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change order of home page elements\n"
},
{
"from": "human",
"value": "/* configure jshint globals */\n/* globals numeral */\n(function ($) {\n 'use strict';\n\n // Set langauge for Numeral library.\n numeral.language('es');\n\n var $toggle = $('<div id=c... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"fixxed controller for login\"\n\nThis reverts commit d3fccddb534ffee732125af1284c0f00708422ae.\n"
},
{
"from": "human",
"value": "var app = angular.module(\"adminApp\", [\"ngRoute\"]);\napp.config(function ($routeProvider) {\n $routeProvider\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow disabling video or dash via browser feature flag\n\nUsed for debugging.\n\nREDMINE-18067\n"
},
{
"from": "human",
"value": "export function sources(videoFile, quality = 'auto') {\n if (quality === 'auto') {\n let result = [\n {\n type: 'applica... | javascript | chosen |
[
{
"from": "system",
"value": "Update password state after clear the mod\n"
},
{
"from": "human",
"value": "function solvePasswords() {\n $(\".js-mod-passwords .js-mod-passwords-word\").each(function() {\n wordOfInput = $(this).attr('js-data-word');\n arrayOfWordInput = wordOfInput.split('... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Explicitly set database connection pool\"\n\nThis reverts commit 6caedcbb0045d6df7d499497738a8e61aa80d8df.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n development: {\n client: 'pg',\n connection: process.env.DATABASE_URL ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue where server error thrown if user does not have aecData\n"
},
{
"from": "human",
"value": "AECData = new Mongo.Collection('aecData');\n\nMeteor.methods({\n profileInsert: function (profileData) {\n check(Meteor.userId(), String);\n check(M... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused string in path\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst path = require('path');\n\nconst link = (directories, cwd = process.cwd()) => {\n Object.keys(directories).forEach((name) => {\n const cwdDist = path.join(cwd, 'node... | javascript | chosen |
[
{
"from": "system",
"value": "Add e.preventDefault to comments form.\n"
},
{
"from": "human",
"value": "app.Comments = React.createClass({\n //get all loaded comments\n getInitialState: function () {\n return {\n displaying: false,\n comments: app.CommentStore.getAll(this.props.id... | javascript | chosen |
[
{
"from": "system",
"value": "Add code comment for server-start-chatting\n"
},
{
"from": "human",
"value": "import io from 'socket.io-client';\n\nfunction realtimeConnector(cookie, realtimeUrl, roomId, handleNewMessageCallback, handleNextCallback, disableChatCallback) {\n this._chatting = fal... | javascript | chosen |
[
{
"from": "system",
"value": "Check the x-forwarded-proto header before redirecting to HTTPS (again)\n"
},
{
"from": "human",
"value": "var configuration = require(\"configvention\"),\n urlUtil = require(\"url\"),\n\n redirectRequestToHttps = function(req, res) {\n var secureRoot = ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle new simpl-schema way of storing fields\n"
},
{
"from": "human",
"value": "import uniq from 'lodash/uniq'\n\n\nexport const topLevelFieldsFromSchema = schemaOrMongoFieldsDef =>\n schemaOrMongoFieldsDef &&\n uniq(\n Object.keys(schemaOrMongoFieldsDef)\... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Make global module name consistent with d3\n"
},
{
"from": "human",
"value": "import babel from 'rollup-plugin-babel';\n\nexport default {\n entry: 'index.js',\n moduleName: 'fc_datajoin',\n format: 'umd',\n plugins: [ babel() ],\n dest: 'build/d... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in getPrefFast (first time use)\n"
},
{
"from": "human",
"value": "/* global sauce */\n/* Just add some client side caching to the proxy calls. */\n\nsauce.ns('storage', ns => {\n 'use strict';\n\n let _prefs;\n let _prefsCache = new Map();\n let... | javascript | chosen |
[
{
"from": "system",
"value": "fix:docs: Fix sitemap generator to use doc.id instead of doc.name\n\ndoc.id should be used instead of doc.name, otherwise links are wrongly\ngenerated\n"
},
{
"from": "human",
"value": "exports.SiteMap = SiteMap;\n\n/**\n * @see http://www.sitemaps.org/protocol.php\... | javascript | chosen |
[
{
"from": "system",
"value": "Add option to Petition.js to skip post submit action\n"
},
{
"from": "human",
"value": "const GlobalEvents = require('shared/global_events');\n\nconst Petition = Backbone.View.extend({\n\n el: '.petition-bar',\n\n globalEvents: {\n 'form:submitted': 'handleSucc... | javascript | chosen |
[
{
"from": "system",
"value": "Improve floating button item label styles\n"
},
{
"from": "human",
"value": "'use strict'\n\nimport React, { Component } from 'react'\nimport ReactCSS from 'reactcss'\n\nimport colors from '../../assets/styles/variables/colors'\nimport { spacing, sizing } from '../.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix regex for link messages\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport styles from '../../chat.scss';\nimport emojify from '../../utils/emojify';\n\nexport default class VideoContainer extends Component {\n const... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with batch destroy functionality being blocked by loading overlay\n"
},
{
"from": "human",
"value": "App.ready(function() {\n \"use strict\";\n var body = $('body');\n var links = $('a:not([data-method=\"delete\"]):not(.has_many_add):not(.dropdown_menu_... | javascript | chosen |
[
{
"from": "system",
"value": "Fix enhanced object literal lint error\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport sweetAlert from '../index';\n\nconst { Mixin } = Ember;\n\nexport default Mixin.create({\n sweetAlert: sweetAlert\n});\n"
},
{
"from": "gpt",
"v... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional suggested security headers\n"
},
{
"from": "human",
"value": "// sets default headers for all responses\n\n// USAGE\n// (should come AFTER any express.static middleware, including\n// react-scripts/lib/assetMiddleware)\n//\n// app.use(defaultHeadersM... | javascript | chosen |
[
{
"from": "system",
"value": "Change \"list\" to \"menu\" in directive name\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc directive\n * @name eeh-navigation-menu\n * @restrict AE\n *\n * @description\n * This directive allows for the creation of a framework-agnostic menu.\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix string typo and remove a extra newline\n\nChecklist instead of Checlist"
},
{
"from": "human",
"value": "/*\n#\n# img2musicXML.js - v0.1-Alpha\n# Apache v2 License\n#\n*/\n\n// Create img2musicXML (abbreviated as i2mx) namespace\nvar i2mx = i2mx || { };\n\n// Cr... | javascript | chosen |
[
{
"from": "system",
"value": "Delete generator objects after pushing to the capsul response object.\n"
},
{
"from": "human",
"value": "module.exports = (function(){\n\n\t// GET /users/:id/media?lat=<LAT>&lng=<LNG>&time=<TIME>\n\treturn function* collection(id) {\n\n\t\t// Twitter Requests\n\t\tv... | javascript | chosen |
[
{
"from": "system",
"value": "Use compact stringify for vega output formatting. "
},
{
"from": "human",
"value": "import React from 'react';\nimport { connect } from 'react-redux';\nimport MonacoEditor from 'react-monaco-editor';\nimport * as EditorActions from '../../../actions/editor';\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "Fix multiple colons issue on my reservations page\n\nCloses #511.\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\n\nimport { injectT } from 'i18n';\n\nfunction ReservationAccessCode({ reservation, t, text }) {\n if (!reservation.access... | javascript | chosen |
[
{
"from": "system",
"value": "Support loose option on readFile\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar callable = require('es5-ext/object/valid-callable')\n , path = require('path')\n , common = require('path2/common')\n , defaultReadFile = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dynamic require to prevent browserify issue\n"
},
{
"from": "human",
"value": "var chains = {}\nchains['names'] = {}\n\nlet availableChains = {\n 1: 'mainnet',\n 3: 'ropsten',\n 4: 'rinkeby',\n 42: 'kovan'\n}\n\nfunction addChainParams (id, name) {\n cha... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for commented out media rule"
},
{
"from": "human",
"value": "import {\n ruleTester,\n warningFreeBasics,\n} from \"../../../testUtils\"\nimport rule, { ruleName, messages } from \"..\"\n\nconst testRule = ruleTester(rule, ruleName)\n\ntestRule(undefined,... | javascript | chosen |
[
{
"from": "system",
"value": "Change route to support custom size parameter\n"
},
{
"from": "human",
"value": "const requestsController = require('../../controllers/requests.js');\nconst requestHelper = require('../../helpers/requestHelper.js');\n\nmodule.exports = {\n '/:request/top10': {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Debug why module receiving info, not acting on it\n"
},
{
"from": "human",
"value": "Module.register(\"recognizer\",{\n start() {\n console.log(\"Recognizer started\");\n this.sendSocketNotification(\"RECOGNIZER_STARTUP\");\n return;\n },\n\n socketNotif... | javascript | chosen |
[
{
"from": "system",
"value": "Update log settings for warnings\n"
},
{
"from": "human",
"value": "export const Logsettings = {\n MESSAGE_EDIT: 1,\n MESSAGE_DELETE: 2,\n MESSAGE_BULKDELETE: 4,\n\n ROLE_ADD: 8,\n ROLE_REMOVE: 16,\n ROLE_CREATE: 32,\n ROLE_DELETE: 64,\n ROLE... | javascript | chosen |
[
{
"from": "system",
"value": "Update store to use new Vuex plugins.\n\nOverall this feels like a much cleaner approach.\n"
},
{
"from": "human",
"value": "import Vue from 'vue';\nimport Vuex from 'vuex';\nimport undoRedo from '../plugins/undo-redo';\n\nimport page from './modules/page';\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow committing of build theme"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar plumber = require('gulp-plumber');\nvar add = require('gulp-add');\nvar notify = require('gulp-notify');\n\n// utils\nvar pumped = req... | javascript | chosen |
[
{
"from": "system",
"value": "Fix web components not loading properly.\n"
},
{
"from": "human",
"value": "/**\n * index.js\n * OneSquare web application entry point.\n *\n * @author Francis Brito <fr.br94@gmail.com>\n * @license ISC\n */\n'use strict';\n\nvar express = require('express'),\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Use the correct upper scope\n\nI'm not sure what bugs this is causing, but it definitely looks broken. There is no such thing as `scopeManager.upper`. Following the [docs](https://github.com/estools/escope/blob/aa35861faa76a09f01203dee3497a939d70b463c/README.md#example), we sho... | javascript | chosen |
[
{
"from": "system",
"value": "Switch test runtime widget to show runtime by classes. Not only was information overflow, also optimizing runtime by slowest class first should bring most change (instead of slowest test)\n"
},
{
"from": "human",
"value": "(function (widget, zoomableSunburst) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Hide weekday menu on navigate:start\n"
},
{
"from": "human",
"value": "/**\n * @class Denkmal_Component_HeaderBar\n * @extends Denkmal_Component_Abstract\n */\nvar Denkmal_Component_HeaderBar = Denkmal_Component_Abstract.extend({\n\n /** @type String */\n _class: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix copy/paste error in saga function name\n"
},
{
"from": "human",
"value": "import { takeLatest, put, select } from 'redux-saga/effects';\nimport {\n MODIFY_PASSWORD1,\n MODIFY_PASSWORD2,\n MODIFY_PASSWORDS_NOT_IDENTICAL,\n} from '../actiontypes';\n\nfunc... | javascript | chosen |
[
{
"from": "system",
"value": "Build the Programs authoring app when compiling static assets\n"
},
{
"from": "human",
"value": "/* jshint asi:true, expr:true */\n({\n mainConfigFile: 'programs/static/js/config.js',\n baseUrl: 'programs/static',\n dir: 'programs/static/build',\n remove... | javascript | chosen |
[
{
"from": "system",
"value": "Fix `unsafeReadProtoTagged` so it works in IE\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nexports._unsafeReadProtoTagged = function (name) {\n return function (failure) {\n return function (success) {\n return function (value) {\n var obj =... | javascript | chosen |
[
{
"from": "system",
"value": "Use activated and deactivated event to ensure that overriding those methods doesn't conflict\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport function initialize(instance) {\n const config = instance.container.lookupFactory('config:environmen... | javascript | chosen |
[
{
"from": "system",
"value": "Add functionality for pathway owner to choose 3 projects then be redirected to pathway\n"
},
{
"from": "human",
"value": "'use strict'\n\nangular.module('pathwayApp')\n.controller('ProjectController', function ($scope, $http, $stateParams, $state) {\n $http({method... | javascript | chosen |
[
{
"from": "system",
"value": "Add a copy of modelsActionCreators.loadSubject()\n"
},
{
"from": "human",
"value": "import { createAction } from 'redux-actions';\n\nexport default {\n selectSubject: createAction('SELECT_SUBJECT')\n};\n"
},
{
"from": "gpt",
"value": "import { createAct... | javascript | chosen |
[
{
"from": "system",
"value": "Fix NaN sizes in SSR\n"
},
{
"from": "human",
"value": "import { extend } from '../../../utils/utils';\n\nexport default function updateSize() {\n const swiper = this;\n let width;\n let height;\n const $el = swiper.$el;\n if (typeof swiper.params.width !== 'un... | javascript | chosen |
[
{
"from": "system",
"value": "Add explanation for background component\n"
},
{
"from": "human",
"value": "var classnames = require('classnames');\nvar React = require('react/addons');\n\nmodule.exports = React.createClass({\n displayName: 'BackgroundPanel',\n\n propTypes: {\n backgr... | javascript | chosen |
[
{
"from": "system",
"value": "Add method to access an element of load-button\n"
},
{
"from": "human",
"value": "(function(app) {\n 'use strict';\n\n var jCore = require('jcore');\n var helper = app.helper || require('../helper.js');\n var dom = app.dom || require('../dom.js');\n var Sidebar... | javascript | chosen |
[
{
"from": "system",
"value": "Handle links with leading double slashes\n"
},
{
"from": "human",
"value": "function matchAll(str, regex) {\n var matches = [];\n while (result = regex.exec(str)) {\n matches.push(result[1]);\n }\n return matches;\n}\n\nangular.module('reeder.helpers', []).\n... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.