conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Update component reference in header\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Link } from 'react-router';\nimport ChannelDropdown from '../../containers/ChannelDropdown/ChannelDropdown';\n\n/* component styles */\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "Convert WindowView to an ampersand-view\n\nUses the new base view to mix in jQuery functionality in the manner of\ntraditional backbone views\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Backbone = require( 'backbone' );\n\nvar WindowView = Backbone.View.... | javascript | chosen |
[
{
"from": "system",
"value": "Fix variable indention in build classname test\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar blocks;\n\ndescribe('block class names', function() {\n before(function() {\n var testHTML = document.querySelector('#build-classname');\n\n blocks = testHT... | javascript | chosen |
[
{
"from": "system",
"value": "Select top most note after deleting a note\n"
},
{
"from": "human",
"value": "import Em from 'ember';\nimport { task, timeout } from 'ember-concurrency';\n\nvar applicationController = Em.Controller.extend({\n\tactiveNote: null,\n\n hideSidePanel: false,\n\n\t// da... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify isRTL check by reusing ember-i18n functions\n\n[ci skip]\n[#LEI-348]\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n i18n: Ember.inject.service(),\n\n // Set by login page\n locale: null,\... | javascript | chosen |
[
{
"from": "system",
"value": "Change remaining console.log calls to angular's\nlogger."
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('seaWebApp')\n .controller('JobCtrl', function($scope, $http, $location, $routeParams) {\n $scope.jobId = $routeParams.jobId;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "FIX Change the completed-error state\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U\n *\n * This file is part of iotagent-thinking-things\n *\n * iotagent-thinking-things is free software: you can redistribute i... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where `mrt create` didn't work.\n"
},
{
"from": "human",
"value": "var spawn = require('child_process').spawn;\nvar path = require('path');\nvar fs = require('fs');\nvar _ = require('underscore');\n\n// Just some utilities to `run` meteor commands\nCommand =... | javascript | chosen |
[
{
"from": "system",
"value": "Set token to save in local storage\n"
},
{
"from": "human",
"value": "angular.module( 'app' )\n.service( 'UserSvc', function( $http ) {\n var svc = this\n svc.getUser = function() {\n return $http.get( '/api/users' )\n }\n svc.login = function( us... | javascript | chosen |
[
{
"from": "system",
"value": "Fix circular user serialization bug\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar conf = require('./conf');\nvar pjson = require('../package.json');\n\n// variables for views, this must be before the views are rendered and after any necessary request varia... | javascript | chosen |
[
{
"from": "system",
"value": "Set the title attribute on the audio element.\n\nThis can be used by scripts to identify the track and iOS may use it for the\nNow Playing information.\n"
},
{
"from": "human",
"value": "(function( window, $, undefined ) {\n\t'use strict';\n\n\t$.extend( MediaElemen... | javascript | chosen |
[
{
"from": "system",
"value": "Fix minor bug with parsing JSON for play mode\n"
},
{
"from": "human",
"value": "var WORK = 0, PLAY = 1;\n\nfunction createSession(start, end, tag) {\n\tvar session = new Object();\n\tsession.start = start;\n\tsession.end = end;\n\tsession.tag = tag;\n\treturn sessi... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to follow style guides\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport TooltipEnabled from '../mixins/sl-tooltip-enabled';\n\n/**\n * @module components\n * @class sl-drop-button\n */\nexport default Ember.Component.extend( TooltipEnab... | javascript | chosen |
[
{
"from": "system",
"value": "Use clean content to avoid invalid mentions"
},
{
"from": "human",
"value": "const Discord = require('discord.js');\nmodule.exports = (message, hotline) => {\n let me = message.embeds.shift();\n const embed = new Discord.RichEmbed();\n embed.setAuthor(messa... | javascript | chosen |
[
{
"from": "system",
"value": "Set a flag when config is loaded on a browser\n"
},
{
"from": "human",
"value": "// Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are p... | javascript | chosen |
[
{
"from": "system",
"value": "Improve caching for API & external resources\n"
},
{
"from": "human",
"value": "const { name, version } = self.__wpo;\nconst cacheName = `${name}:${version}:api`;\n\nfunction isApiCall(url) {\n\treturn url.indexOf(process.env.API_ENDPOINT) >= 0;\n}\n\nfunction fetch... | javascript | chosen |
[
{
"from": "system",
"value": "Add dynamic identifier to toast\n"
},
{
"from": "human",
"value": "/*global require, module*/\r\n/** @jsx React.DOM */\r\nvar React = require('react');\r\n\r\nvar Toast = React.createClass({\r\n render : function () {\r\n \"use strict\";\r\n var out... | javascript | chosen |
[
{
"from": "system",
"value": "Use methodize() for the Math aliases\n"
},
{
"from": "human",
"value": "Object.extend(Number.prototype, {\n toColorPart: function() {\n return this.toPaddedString(2, 16);\n },\n\n succ: function() {\n return this + 1;\n },\n \n times: function(iterator) ... | javascript | chosen |
[
{
"from": "system",
"value": "Apply source roots to source maps\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar smaps = require('gulp-sourcemaps');\n\ngulp.task('default', ['build']);\n\ngulp.task('build', function() {\n var babel = require('gulp-babel');\... | javascript | chosen |
[
{
"from": "system",
"value": "Update references to old component name\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Route, IndexRoute } from 'react-router';\n\n/* containers */\nimport { App } from 'components/App';\nimport { Home } from 'components/Home';\nimport { Abo... | javascript | chosen |
[
{
"from": "system",
"value": "Return http status 500 instead of 400 on errors\n\n400 implies that there is a problem with the request. 500 is an internal error.\n"
},
{
"from": "human",
"value": "var express = require('express')\nvar Crudivore = require('./crudivore')\nvar _ = require('lodash')\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to move files in FetchFileFactory\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('fileBrowserApp').factory('FetchFileFactory', ['$http',\n function($http) {\n var _factory = {};\n\n var apiPath = '/browse/api';\n\n function getRes... | javascript | chosen |
[
{
"from": "system",
"value": "Add stability annotation to ol.source.GeoJSON\n"
},
{
"from": "human",
"value": "goog.provide('ol.source.GeoJSON');\n\ngoog.require('ol.format.GeoJSON');\ngoog.require('ol.source.VectorFile');\n\n\n\n/**\n * @constructor\n * @extends {ol.source.VectorFile}\n * @para... | javascript | chosen |
[
{
"from": "system",
"value": "Set default podModule. Run generators with --pod\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'frontend',\n environment: environment,\n baseURL: '/',\n locationType:... | javascript | chosen |
[
{
"from": "system",
"value": "Use ID instead of source_blob.version\n"
},
{
"from": "human",
"value": "'use strict';\n\nlet cli = require('heroku-cli-util');\nlet columnify = require('columnify');\n\nmodule.exports = {\n topic: 'builds',\n needsAuth: true,\n needsApp: true,\n descripti... | javascript | chosen |
[
{
"from": "system",
"value": "Prepare CLI: Wait for all hosts, Capture output\n\nAllow all hosts to finish preparation. Capture output, track on erros, accept limit to single host.\n"
},
{
"from": "human",
"value": "// RockUp\n// Commands-Prepare -- Prepare the server-side to accept deployments\... | javascript | chosen |
[
{
"from": "system",
"value": "Purge style loader from webpack config\n"
},
{
"from": "human",
"value": "import path from 'path'\nimport webpack from 'webpack'\n\nconst { NODE_ENV } = process.env\nconst production = NODE_ENV === 'production'\n\nconst plugins = [\n new webpack.DefinePlugin({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add pending and errors control reducer\n"
},
{
"from": "human",
"value": "import Immutable from 'immutable';\n\nimport {UPDATE_VALUE, INITIALIZE_STATE} from '../action-types';\n\nexport default (state = Immutable.Map(), action) => {\n const {payload} = action;\n s... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up some Avatar code references.\n\n"
},
{
"from": "human",
"value": "import WebComponent from '../../UI/WebComponent';\nimport template from './template.js';\n\nexport default class extends WebComponent {\n constructor(options) {\n let pid = document.query... | javascript | chosen |
[
{
"from": "system",
"value": "Add default label if none is present\n"
},
{
"from": "human",
"value": "const Labels = {\n type: 'object',\n title: 'Labels',\n properties: {\n labels: {\n type: 'array',\n duplicable: true,\n addLabel: 'Add Label',\n getter: function (serv... | javascript | chosen |
[
{
"from": "system",
"value": "Rename constants file to api-constants\n"
},
{
"from": "human",
"value": "import dispatcher from '../dispatcher/dispatcher';\nimport actionTypes from '../constants/action-types';\n\nimport axios from 'axios';\nimport {\n apiConstants\n} from '../constants/constants... | javascript | chosen |
[
{
"from": "system",
"value": "Order votes by creation date when getting all\n"
},
{
"from": "human",
"value": "const db = require('./postgresql');\nconst { plainObject, plainObjectOrNull, deprecateObject } = require('./utils');\n\nconst Vote = db.sequelize.models.vote;\n\nfunction getVotes(quest... | javascript | chosen |
[
{
"from": "system",
"value": "Delete useless configs. Added a space after colon\n"
},
{
"from": "human",
"value": "var preloaders = require(\"./preloaders\");\nvar loaders = require(\"./loaders\");\nvar webpack = require('webpack');\nmodule.exports = {\n entry: ['./src/index.ts'],\n output: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Make the json-template story work.\n"
},
{
"from": "human",
"value": "(function() {\n\nvar json_callback = function(result) {\n log('success');\n /*\n var template_url = json['template_url'];\n var d = MochiKit.Async.doSimpleXMLHttpRequest(template_url);... | javascript | chosen |
[
{
"from": "system",
"value": "Rename functions in SearchBox View\n\n* improves clarity\n* use getter to grab string from text box\n* rename function that triggers search: get -> send\n"
},
{
"from": "human",
"value": "import $ from 'jquery';\nimport * as Backbone from 'backbone';\nimport dispatc... | javascript | chosen |
[
{
"from": "system",
"value": "Add responseTime to console logs\n"
},
{
"from": "human",
"value": "'use strict';\n\n\n// Build message of logs of type `request` as:\n// STATUS [ERROR] - PROTOCOL METHOD /PATH ACTION...\nconst getRequestMessage = function ({\n protocol,\n protocolMethod,\n path... | javascript | chosen |
[
{
"from": "system",
"value": "Correct spacing between brace and paren\n"
},
{
"from": "human",
"value": "(function (env) {\n \"use strict\";\n env.ddg_spice_<: $ia_id :> = function(api_result){\n\n // Validate the response (customize for your Spice)\n if (!api_result || api_r... | javascript | chosen |
[
{
"from": "system",
"value": "Update one of the endpoint tests.\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('Service: vnDataEndpoint', function () {\n\n // load the service's module\n beforeEach(module('Volusion.toolboxCommon'));\n\n // instantiate service\n var vnDa... | javascript | chosen |
[
{
"from": "system",
"value": "Allow data to be sent on job run queue.\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport DrushIORun from '../run/client';\n\nlet apiClient;\n\nclass DrushIORuns {\n\n constructor(client, project, job) {\n apiClient = client;\n this.project = project... | javascript | chosen |
[
{
"from": "system",
"value": "Add check for Windows environment when launching Meteor.\n"
},
{
"from": "human",
"value": "'use strict';\r\n\r\nvar exec = require('./exec');\r\nvar _ = require('lodash');\r\n\r\nfunction runMeteor(inDir, environmentVariables) {\r\n var env = _.extend(environmen... | javascript | chosen |
[
{
"from": "system",
"value": "Move Firefox test to end of nightlies\n\nThis minimizes the impact if the test hangs after the nighlies exec."
},
{
"from": "human",
"value": "/*eslint-disable no-process-env, camelcase */\nvar Async = require('async'),\n Driver = require('./driver'),\n Gulp =... | javascript | chosen |
[
{
"from": "system",
"value": "Remove explicit requirement of JsonApiService\n\nJsonApiService is implicitly import before it is a service\n"
},
{
"from": "human",
"value": "/**\n * Module dependencies\n */\nvar util = require( 'util' ),\n actionUtil = require( './_util/actionUtil' ),\n plurali... | javascript | chosen |
[
{
"from": "system",
"value": "Fix cannot get branch name\n"
},
{
"from": "human",
"value": "'use babel';\n\nimport SaveTabsWithBranchView from './save-tabs-with-branch-view';\nimport { CompositeDisposable } from 'atom';\n\nfunction getBranch() {\n const repos = atom.project.getRepositories();\n... | javascript | chosen |
[
{
"from": "system",
"value": "[chore]: Change ES6 import to CommonJS require\n"
},
{
"from": "human",
"value": "import dotenv from 'dotenv';\n\ndotenv.config();\nconst {\n DB_USERNAME,\n password,\n database,\n host\n} = process.env;\n\nmodule.exports = {\n development: {\n password,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Bump snapshot version in Collect client"
},
{
"from": "human",
"value": "import Objects from 'utils/Objects'\n\nexport default class Constants {\n\n static APP_VERSION = Objects.defaultIfNull(process.env.REACT_APP_COLLECT_PROJECT_VERSION, \"3.14.0-SNAPSHOT\")\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use new Walrus.go method to dinamicaly change version\n"
},
{
"from": "human",
"value": "Walrus.init({\r\n ajaxNavigation: true\r\n});\r\n\r\nSyntaxHighlighter.all();\r\n\r\nWalrus.breadCrumb(function () {\r\n SyntaxHighlighter.highlight();\r\n init();\r\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Disable timeMetric.active check for support button\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport styles from './petition-sidebar.scss';\nimport Countdown from 'components/Countdown';\nimport SupportButton from 'containers/SupportButton';\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Remove blank slides on loop destroy\n\nFixes #2872"
},
{
"from": "human",
"value": "export default function () {\n const swiper = this;\n const { $wrapperEl, params, slides } = swiper;\n $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).r... | javascript | chosen |
[
{
"from": "system",
"value": "Switch off the ENV var again."
},
{
"from": "human",
"value": "import React from 'react'\nimport { Link } from 'react-router'\nimport { ElloMark, ElloRainbowMark, ElloDonutMark } from '../iconography/ElloIcons'\n\nclass NavbarMark extends React.Component {\n\n rend... | javascript | chosen |
[
{
"from": "system",
"value": "Add delay of 1.5s before search list refresh\n\nIt takes one second for elasticsearch to update it's index.\nSee `index.refresh_interval` in\nhttps://www.elastic.co/guide/en/elasticsearch/reference/5.6/index-modules.html#dynamic-index-settings\n"
},
{
"from": "human",
... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'integration' test looking for Node.\n"
},
{
"from": "human",
"value": "var should = require('should');\n\nvar output = '';\noutput += ' PID COMMAND\\n';\noutput += ' 3574 /usr/lib/utmpd\\n';\noutput += ' 7213 /usr/lib/saf/ttymon\\n';\noutput += ' 3039 zsched\\... | javascript | chosen |
[
{
"from": "system",
"value": "Add chapter 3, exercise 2\n"
},
{
"from": "human",
"value": "function isEven(x) {\n x = x < 0 ? -x : x;\n if (x === 0) return true;\n else if (x === 1) return false;\n else return isEven(x-2);\n}\n\nconsole.log(isEven(50));\n// → true\nconsole.log(isEven... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test caused by htmlmin\n"
},
{
"from": "human",
"value": "angular.module('custom_prefix').run(['$templateCache', function($templateCache) {\n\n $templateCache.put('/static/test/fixtures/one.html',\n \"<h1>One</h1>\\n\" +\n \"\\n\" +\n \"<p class=\\\"\\... | javascript | chosen |
[
{
"from": "system",
"value": "Switch two instances of string[n] to string.charAt(n) for IE 7 compatibility.\n"
},
{
"from": "human",
"value": "/* \n * To Title Case 2.0 – http://individed.com/code/to-title-case/\n * Copyright © 2008–2012 David Gouch. Licensed under the MIT License. \n */\n\nStr... | javascript | chosen |
[
{
"from": "system",
"value": "Remove lodash dependency and improve code quality.\n\nThis code was initially written in CoffeeScript and then compiled\ndirectly into ES5.\n"
},
{
"from": "human",
"value": "var lodash = require('lodash');\nvar each = lodash.each;\nvar slice = [].slice;\n\nvar Even... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to use arrow function and reformat\n\nThe brevity of arrow functions are particularly helpful in calls to map.\nRefactor to take advantage of that brevity, and reformat the resulting\nJSX to be correctly indented.\n"
},
{
"from": "human",
"value": "import R... | javascript | chosen |
[
{
"from": "system",
"value": "Fix smoke tests for browsers without innerText support"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport startApp from '../helpers/start-app';\n\nvar application;\n\nfunction contains(selector, string) {\n var element = find(selector)[0];\n if (!... | javascript | chosen |
[
{
"from": "system",
"value": "Add semicolons to js file in wasm bindgen test\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst rand_wasm_bindgen_test = require('./rand_wasm_bindgen_test');\n\nconsole.log(rand_wasm_bindgen_test.generate_from_entropy())\nconsole.log(rand_wasm_bindgen_test.... | javascript | chosen |
[
{
"from": "system",
"value": "Add javascript to show/hide groups depending on sites or authorization level\n"
},
{
"from": "human",
"value": "window.GobiertoAdmin.AdminsController = (function() {\n\n function AdminsController() {}\n\n AdminsController.prototype.form = function() {\n _... | javascript | chosen |
[
{
"from": "system",
"value": "[bug-fix] Fix missing path to take redux action\n"
},
{
"from": "human",
"value": "import twreporterRedux from '@twreporter/redux'\n// lodash\nimport get from 'lodash/get'\n\nconst _ = {\n get\n}\n\nconst { fetchAuthorCollectionIfNeeded, fetchAuthorDetails } = twre... | javascript | chosen |
[
{
"from": "system",
"value": "Add hooks to plugin API\n"
},
{
"from": "human",
"value": "const attachments = require('./data/attachments');\n\nmodule.exports = {\n getPluginAPI({ bot, knex, config, commands }) {\n return {\n bot,\n knex,\n config,\n commands: {\n m... | javascript | chosen |
[
{
"from": "system",
"value": "Use values from settings.json to initialize twitter feed on server start\n"
},
{
"from": "human",
"value": "Meteor.startup(function () {\n // code to run on server at startup\n});"
},
{
"from": "gpt",
"value": "Meteor.startup(function () {\n // cod... | javascript | chosen |
[
{
"from": "system",
"value": "test(Display): Use enzyme in Display tests\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport chai, { expect } from 'chai';\nimport jsxChai from 'jsx-chai';\n\nchai.use(jsxChai);\n\nimport Immutable from 'immutable';\n\nimport {\n createRendere... | javascript | chosen |
[
{
"from": "system",
"value": "Make error notification consistent with others; console log error\n"
},
{
"from": "human",
"value": "import {fetchJSONFeed as fetchJSONFeedAJAX} from 'src/status/apis'\n\nimport {errorThrown} from 'shared/actions/errors'\n\nimport * as actionTypes from 'src/status/c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bad description for bulk delete actions"
},
{
"from": "human",
"value": "import ACTION_TYPES from './ConfirmDeletionActionTypes';\n\n/**\n * Ask for permission to delete\n *\n * @param {Object[]} List of files we want to delete\n */\nexport function confirm(file... | javascript | chosen |
[
{
"from": "system",
"value": "Add icon in the admin submenu item\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Configuring the Articles module\nangular.module('users.admin').run(['Menus',\n function (Menus) {\n Menus.addSubMenuItem('topbar', 'admin', {\n title: 'Manage Users',\... | javascript | chosen |
[
{
"from": "system",
"value": "Set explicit mode for markdown preview code\n\nFixes #119813\n"
},
{
"from": "human",
"value": "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licens... | javascript | chosen |
[
{
"from": "system",
"value": "Fix teardown of resize handler in content management screen\n\nrefs #5659 ([comment](https://github.com/TryGhost/Ghost/issues/5659#issuecomment-137114898))\n- cleans up resize handler on willDestroy hook of gh-content-view-container\n"
},
{
"from": "human",
"value":... | javascript | chosen |
[
{
"from": "system",
"value": "Allow setting error.code as well as error.message for callbackWithError()\n"
},
{
"from": "human",
"value": "// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the ... | javascript | chosen |
[
{
"from": "system",
"value": "Update docs after building Travis build 2441 of\nregro/regolith\n\nThe docs were built from the branch 'master' against the commit\nb839663f04377f1a25fb864d0764f7d2aabd991a.\n\nThe Travis build that generated this commit is at\nhttps://app.travis-ci.com/regro/regolith/jobs/5465... | javascript | chosen |
[
{
"from": "system",
"value": "Fix style test describe block title\n"
},
{
"from": "human",
"value": "import { default as React } from \"react\";\n\nimport { checkParity } from \"./_util\";\n\n\nconst Foobar = () => (\n <div\n style={{\n padding: 10,\n margin: 15,\n opacity: 1,... | javascript | chosen |
[
{
"from": "system",
"value": "Make the list of period dynamic\n"
},
{
"from": "human",
"value": "/* global process */\n'use strict';\n\nfunction config() {\n return {\n port: process.env.PORT || 5000,\n downloadImages: false,\n paths: {\n tableData: './data/{0}... | javascript | chosen |
[
{
"from": "system",
"value": " FIX | Tirando token para inserção de provas\n"
},
{
"from": "human",
"value": "var ormDic = require('../../util/ormDic');\n\nclass OrmProxy {\n constructor() {\n this._orm = null;\n }\n\n setOrm(string) {\n this._orm = ormDic[string];\n }\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused 'shadowSpread' prop type\n\nClose #1357\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE... | javascript | chosen |
[
{
"from": "system",
"value": "Change the context link URL to the result link\n"
},
{
"from": "human",
"value": "// Returns the contexts (short description with bolded matched words) of the\n// search results. This is only a function to allow the implementation to be\n// changed if Google ever ch... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Fix an issue with navigation button types.\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport { PersianNumber } from 'react-persian';\n\nexport default class Heading extends React.Component {\n static propTypes = {\n month:... | javascript | chosen |
[
{
"from": "system",
"value": "Set the mime-type on a test data file to binary.\n\nI just checked this file in, and it shouldn't have a trailing newline.\nHowever when I checked it out, SVN seems to have put back an LF at the end.\nHopefully this will prevent that from happening.\n\nBUG=http://crbug.com/2286... | javascript | chosen |
[
{
"from": "system",
"value": "Fix more comments styles in Firefox\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nclass MoreComments extends React.Component {\n shouldComponentUpdate(nextProps) {\n return this.props.count !== nextProps.count;\n }\n\n render() {\n const ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove default owner & repo call.\n"
},
{
"from": "human",
"value": "import {GitHubIssueRank} from './index';\n\nGitHubIssueRank.run({\n oAuthIoKey: '2UaA4CNWToZIdvoqR8lJY8MclPI',\n\n // owner: 'isaacs',\n // repo: 'github'\n\n // owner: 'AndersDJohnson',\n // ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow reloading same page after user login\n"
},
{
"from": "human",
"value": "Kwf.onJElementShow('.kwcUserLoginFormSuccess', function(el) {\n var url = el.find('input.redirectTo').val();\n location.href = url;\n});"
},
{
"from": "gpt",
"value": "Kw... | javascript | chosen |
[
{
"from": "system",
"value": "Change email validator regexp. Previous one was too dummy :)\n"
},
{
"from": "human",
"value": "angular.module('codebrag.invitations')\n\n .service('invitationService', function($http, $q) {\n\n this.loadRegisteredUsers = function() {\n return $... | javascript | chosen |
[
{
"from": "system",
"value": "Append method definitely working (added new test with three elements to check it)\n"
},
{
"from": "human",
"value": "var expect = require('chai').expect;\nvar CustomList = require('./reverse-linked-list');\n\ndescribe(\"List class -\", function() {\n describe(\"L... | javascript | chosen |
[
{
"from": "system",
"value": "Use render function instead of template\nThis is needed for runtime only environment in Vue\n"
},
{
"from": "human",
"value": "import noop from 'lodash/noop';\nimport omitBy from 'lodash/omitBy';\nimport isArray from 'lodash/isArray';\nimport normalizeProps from './... | javascript | chosen |
[
{
"from": "system",
"value": "Correct use of uploadReleaseAsset function.\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst mime = require('mime');\n\nmodule.exports = ({github, context}) => {\n \n console.log('=========')\n //console.log(github)\n //console.log(context)\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use same primary color as in iOS app\n"
},
{
"from": "human",
"value": "// @flow\n\nconst colors = {}\n\ncolors.transparent = '#FFFFFF00'\ncolors.white = '#FFFFFF'\ncolors.veryLightGray = '#999999'\ncolors.lightGray = '#666666'\ncolors.gray = '#333333'\n\ncolors.pri... | javascript | chosen |
[
{
"from": "system",
"value": "Add back quotes that are needed due to hyphens.\n"
},
{
"from": "human",
"value": "// FIXME add map for noconflict - cf requirejs docs\n\nrequirejs.config({\n baseUrl: \"js/vendor\",\n paths: {\n app: \"..\",\n jquery: \"//ajax.googleapis.com/aja... | javascript | chosen |
[
{
"from": "system",
"value": "Document the service spec blacklist constant\n"
},
{
"from": "human",
"value": "const ServiceSpecConstants = {\n BLACKLIST: [\n 'uris',\n 'ports',\n 'version',\n 'versions',\n 'versionInfo',\n 'deployments',\n 'queue',\n 'lastTaskFailure',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused fields during anonymization instead of storing null\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst Record = require('../schemas/Record')\nconst runUpdate = require('../utils/runUpdate')\n\nconst add = async (data) => {\n\n\treturn Record.crea... | javascript | chosen |
[
{
"from": "system",
"value": "Change main module to 'chat' module.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('test', ['ngTouch', 'restangular', 'ui.router', 'ui.bootstrap'])\n .config(function($stateProvider, $urlRouterProvider) {\n $stateProvider\n .state('home... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a crash on missing node.value.\n"
},
{
"from": "human",
"value": "'use strict';\n\nlet important = node => node.important;\nlet unimportant = node => !node.important;\nlet hasInherit = node => ~node.value.indexOf('inherit');\n\nexport default (...props) => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak matrix output params for westcoast\n"
},
{
"from": "human",
"value": "//----------------------------------------------------------------------------\n// VALUES TO CHANGE PER FIGURE\n\n// scaleFactor: 1 = saturate only at max; 10 = saturate at 1/10 of max.\n// ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove uneeded extra transcript set\n"
},
{
"from": "human",
"value": "import {isVideo, getYoutubeId} from \"../data/topic-tree-helper\";\nimport Immutable from \"immutable\";\nimport APIClient from \"../apiclient\";\n\nexport const loadTranscriptIfVideo = (options,... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Company Default to Total Stock Summary Report\n"
},
{
"from": "human",
"value": "// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors\n// For license information, please see license.txt\n/* eslint-disable */\n\nfrappe.query_reports[\"Total Stock... | javascript | chosen |
[
{
"from": "system",
"value": "Include g elements when converting ids to classes\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function ($, data, done) {\n // Elements on which we want to convert ids to classes...\n var shapesAndText = 'path,rect,circle,ellipse,line,polyl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix coverage path to be included in npm package\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n \n module.exports = function (config) {\n config.set({\n frameworks: ['jasmine'],\n files: [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Introduce a way to add CSRF manually.\n"
},
{
"from": "human",
"value": "var addUrlParam = function (url, key, val) {\n var newParam = encodeURIComponent(key) + '=' + encodeURIComponent(val);\n\n url = url.split('#')[0];\n var twoPart = url.split('?'), params = {... | javascript | chosen |
[
{
"from": "system",
"value": "Set default login mechanism to LDAP\n"
},
{
"from": "human",
"value": "class Authenticate extends React.Component {\n\n constructor(props) {\n super(props)\n this.state = {\n mechanism: \"token\"\n };\n\n this.handleChange =... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused global param from file wrapper\n"
},
{
"from": "human",
"value": "(function(Monarch, $) {\n Monarch.Remote.Server = new JS.Singleton('Monarch.Remote.Server', {\n create: function(record, wireRepresentation) {\n return new Monarch.Remote.Create... | javascript | chosen |
[
{
"from": "system",
"value": "Fix required file in ArrayController.\n"
},
{
"from": "human",
"value": "// ==========================================================================\n// Project: SproutCore Metal\n// Copyright: ©2011 Strobe Inc. and contributors.\n// License: Licensed under MIT... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic model for keys\n"
},
{
"from": "human",
"value": "export default function(state, ctx, model, helpers) {\n\n\tconst ConcretizeIfNative = helpers.ConcretizeIfNative;\n\n\t//TODO: Test IsNative for apply, bind & call\n\tmodel.add(Function.prototype.apply, Con... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.