conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Allow plugin to be called without callback functions\n"
},
{
"from": "human",
"value": "var exec = require('cordova/exec');\n\nexports.checkAppUpdate = function(success, error, updateUrl, options) {\n updateUrl = updateUrl ? updateUrl : '';\n options = options... | javascript | chosen |
[
{
"from": "system",
"value": "Modify httpService for handling a case if callback is not provided\n"
},
{
"from": "human",
"value": "angular.module('sparrow')\n.service('httpService', function ($http) {\n\n this.getData = function (url, callback) {\n\n $http.get(url)\n .then( function (res... | javascript | chosen |
[
{
"from": "system",
"value": "Select search input on focus instead of click.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport P from 'prop-types'\n\n\nexport default class AppSearchInput extends React.Component {\n constructor(props) {\n super(props)\n this.state = {se... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude Containers From Form Data Set\n"
},
{
"from": "human",
"value": "export function findNearestView(view, selector, predicate) {\n if (!view || !selector || view.matches(\"[data-jsua-app]\")) return null;\n \n var matching = view.querySelector(selector);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make constructor for lifecycle subjects\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n digestDefinitionFnOutput: function digestDefinitionFnOutput(output) {\n var vtree$;\n var onMount;\n var dispose;\n var customEvents;\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to dummy meteo data\n"
},
{
"from": "human",
"value": "window.sampleStations = [{\n id: \"1\",\n name: \"Kluane Lake Research Station\",\n shortName: \"KLRS\",\n _links: {\n aina_info: {\n description: \"AINA: KLRS\",\n href: \"http://arcti... | javascript | chosen |
[
{
"from": "system",
"value": "Fix channel topics not being set after channel creation.\n"
},
{
"from": "human",
"value": "import cacheManager from 'cache-manager'\n\nimport getChannelList from './getChannelList'\nimport getUserList from './getUserList'\nimport {usernameFor} from './util'\n\ncons... | javascript | chosen |
[
{
"from": "system",
"value": "[native] Use SafeAreaView instead of useSafeArea\n\nGuaranteed synchronous instead of JS-thread asynchronous\n"
},
{
"from": "human",
"value": "// @flow\n\nimport type { ViewStyle } from '../types/styles';\n\nimport * as React from 'react';\nimport { View } from 're... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to packages instead of extensions and theme\n\n"
},
{
"from": "human",
"value": "import { combineReducers } from 'redux';\nimport { omit, find } from 'lodash';\nimport * as types from '../types';\n\nexport const extensions = (state = [], action) => {\n if (a... | javascript | chosen |
[
{
"from": "system",
"value": "Remove semantic altering postcss transformation\n"
},
{
"from": "human",
"value": "module.exports = {\n plugins: [\n require('autoprefixer'),\n require('cssnano')({\n preset: 'default'\n }),\n ]\n};"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for main export\n"
},
{
"from": "human",
"value": "/* global describe, it, expect */\nimport { Tab, Tabs, TabList, TabPanel } from '../main';\nimport TabComponent from '../components/Tab';\nimport TabListComponent from '../components/TabList';\nimport Tabs... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure mixpanel is fully loaded by checking not only the object but also the relevant field in the mixpanel global\n"
},
{
"from": "human",
"value": "/**\n * @license Angulartics v0.14.15\n * (c) 2013 Luis Farzati http://luisfarzati.github.io/angulartics\n * Cont... | javascript | chosen |
[
{
"from": "system",
"value": "Sort the select options after converting to local time\n\nThe current implentation leaves the original order (UTC) but just\nchanges the labels so it appears out of order to the user. The\nproposed change is not amazing code, but seem effective to order based\non the user's loc... | javascript | chosen |
[
{
"from": "system",
"value": "Use functional component and effect hook\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Clipboard from 'clipboard'\n\nimport clippy from '../assets/clippy.svg'\n\nexport class FileHash extends React.PureComponent {\n\n constructor(props) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the command to update\n"
},
{
"from": "human",
"value": "const Base = require('yeoman-generator');\nrequire('colors');\nconst checkVersion = require('../../checkUpdate');\n\nclass CheckVersionGenerator extends Base {\n initializing() {\n return checkVersion(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug involving datatype mixup\n"
},
{
"from": "human",
"value": "/*global $*/\nconst m = require('mithril');\n\nconst ItemsCount = module.exports = {};\n\nItemsCount.view = function (ctrl, args) {\n const ITEMS_PER_PAGE = args.possibleItemsPerPage;\n\n let getI... | javascript | chosen |
[
{
"from": "system",
"value": "Add the Box type to make some ori type can use composition.\n"
},
{
"from": "human",
"value": "export const isValidJsonString = (str) => {\n try {\n JSON.parse(str);\n } catch (e) {\n return false;\n }\n return true;\n};"
},
{
"from": "gpt",
"v... | javascript | chosen |
[
{
"from": "system",
"value": "Remove last generated, it's a lie anyways\n"
},
{
"from": "human",
"value": "import React from \"react\";\n\nexport default function Footer({ siteTitle }) {\n return (\n <footer>\n <p>\n © {new Date().getFullYear()}, Built with <a href=\"https://www.... | javascript | chosen |
[
{
"from": "system",
"value": "Send msg from bot to channel\n"
},
{
"from": "human",
"value": "const TeleBot = require('telebot');\nconst config = require('./config');\n\nconst bot = new TeleBot({\n token: config.token, // Add telegram token bot here.\n sleep: 1000, // Optional. How often check... | javascript | chosen |
[
{
"from": "system",
"value": "Break test to check notifications\n"
},
{
"from": "human",
"value": "//noinspection JSUnusedAssignment\nvar dashlight = (function (module) {\n module.greeting = \"Hello, world!\";\n\n return module;\n\n})(dashlight || {});\n"
},
{
"from": "gpt",
"v... | javascript | chosen |
[
{
"from": "system",
"value": "Add a sample of babel\n"
},
{
"from": "human",
"value": "#!/usr/bin/env babel-node\n\nimport assert from 'assert';\n\n\n//\n// 分割代入内で代入ができる\n//\nfunction getObj() {\n return {\n x: 2,\n y: 3\n };\n}\n\nlet {\n x,\n y,\n z = 6\n} = getObj();\n\nassert.stri... | javascript | chosen |
[
{
"from": "system",
"value": "Stop hardcoding the url, just reconnect to the origin\n"
},
{
"from": "human",
"value": "/* -*- js2-basic-offset: 2; indent-tabs-mode: nil; -*- */\n/* vim: set ft=javascript ts=2 et sw=2 tw=80; */\n\"use strict\";\n\nlet $ = require(\"jquery\"),\n {SocketConn} = ... | javascript | chosen |
[
{
"from": "system",
"value": "Move favorite button inside h1 tag\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport numeral from 'numeral';\nimport { Link } from 'react-router';\nimport FavoriteCategoryButton from '../favorites/FavoriteCategoryButton';\nimport Icon from '../wi... | javascript | chosen |
[
{
"from": "system",
"value": "Convert TransformLog to ES class."
},
{
"from": "human",
"value": "import { Class } from 'orbit/lib/objects';\nimport { TransformNotLoggedException } from 'orbit/lib/exceptions';\n\nexport default Class.extend({\n init() {\n this._log = [];\n },\n\n append(tra... | javascript | chosen |
[
{
"from": "system",
"value": "Remove console logging of response.\n"
},
{
"from": "human",
"value": "define(['jquery', 'underscore', 'backbone', 'model_want', 'utils'], function($, _, Backbone, Models, Utils) {\n\tModels.Wants = Backbone.Collection.extend({\n\t\tmodel: Models.Want,\n\t\tinitiali... | javascript | chosen |
[
{
"from": "system",
"value": "Change the unit of timeout\n"
},
{
"from": "human",
"value": "// straw-ios-service-http.js\n\n// This library depends on es6 Promise.\n\n/**\n * @class\n * @singleton\n */\nstraw.service.http = (function (straw) {\n 'use strict';\n\n var exports = {};\n\n v... | javascript | chosen |
[
{
"from": "system",
"value": "Make forward speed same during turns\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar transform = require('./transform.js')\n\nfunction Fixmove(data) {\n if (!data) data = {}\n this.speed = data.speed || {position: 1, angle: 10}\n}\n\nFixmove.prot... | javascript | chosen |
[
{
"from": "system",
"value": "Add TODO to handle no-new-line case\n"
},
{
"from": "human",
"value": "export default function discardChangesInBuffer(buffer, filePatch, discardedLines) {\n // TODO: store of buffer for restoring in case of undo\n\n buffer.transact(() => {\n let addedCount = 0;... | javascript | chosen |
[
{
"from": "system",
"value": "Change awkward Korean seconds, week text."
},
{
"from": "human",
"value": "/* @flow */\nimport type {L10nsStrings} from '../formatters/buildFormatter'\n\n// Korean\nconst strings: L10nsStrings = {\n prefixAgo: null,\n refixFromNow: null,\n suffixAgo: '전',\n suff... | javascript | chosen |
[
{
"from": "system",
"value": "Add import { User } from \"./user\";\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n// src/app.js\n\nimport { Post } from \"./post\";\nimport { ui } from \"./ui\";\n\nPost.findAll()\n .then(ui.renderPosts)\n .catch( (error) => {\n console.error(\"Error: ... | javascript | chosen |
[
{
"from": "system",
"value": "Expand the entire tree by default.\n"
},
{
"from": "human",
"value": "// Auto-magically referenced. Yay.\n\n$(document).ready(function() {\n var rubyFolders = gon.folders;\n var folders = {};\n \n var currentId = gon.currentFolder.id;\n \n // Convert all the f... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust the bit-bundler config file to pipe data to a TCP connection logstash is listening on\n"
},
{
"from": "human",
"value": "var loggers = require(\"bit-bundler/loggers\");\nvar loaderFilter = require(\"bit-bundler/loggers/loaderFilter\");\nvar JSONStream = requi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where a validator chain was called as a promise instead of a function\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport BPromise from 'bluebird';\n\nexport function parallel(...validators) {\n return function(context) {\n return BPromise... | javascript | chosen |
[
{
"from": "system",
"value": "Improve type checking in ol.ImageUrlFunction\n"
},
{
"from": "human",
"value": "goog.provide('ol.ImageUrlFunction');\ngoog.provide('ol.ImageUrlFunctionType');\n\ngoog.require('ol.Size');\n\n\n/**\n * @typedef {function(this:ol.source.Source, ol.Extent, ol.Size, ol.P... | javascript | chosen |
[
{
"from": "system",
"value": "Use lazy imports in binary entry-point, so logging is deferred until completion/erroring\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nif (!require('import-local')(__filename)) {\n (async () => {\n const { createErrorLogo } = require('../utils/brandi... | javascript | chosen |
[
{
"from": "system",
"value": "Use same interface as for other loaders, returning an editorSession.\n"
},
{
"from": "human",
"value": "import { Configurator, EditorSession } from '../ui'\nimport { registerSchema, XMLDocumentImporter } from '../xml'\nimport ManifestSchema from './ManifestSchema'\n... | javascript | chosen |
[
{
"from": "system",
"value": "Switch base generator to es6\n"
},
{
"from": "human",
"value": "var generators = require('yeoman-generator');\n\nmodule.exports = generators.Base.extend({\n prompting: function() {\n return this.prompt([{\n type : 'input',\n name : 'appName',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem with dropping Q on enc that only supports O (for example)"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('vleApp')\n .directive('fieldDrop', function (Dataset) {\n return {\n templateUrl: 'templates/fielddrop.html',\n rest... | javascript | chosen |
[
{
"from": "system",
"value": "Allow other query params to be used when testing.\n\nResolves https://github.com/emberjs/ember.js/issues/3873."
},
{
"from": "human",
"value": "if (window.location.search === \"?test\") {\n document.write(\n '<div id=\"qunit\"></div>' +\n '<div id=\"qunit-fix... | javascript | chosen |
[
{
"from": "system",
"value": "FIX: Use another port number because this port is already bound by another test somewhere.\n"
},
{
"from": "human",
"value": "/**\n * Modules dependencies\n */\n\nvar mocha = require('mocha'),\n\tassert = require('chai').assert,\n\tlibPath = process.env['SCRAPINODE_... | javascript | chosen |
[
{
"from": "system",
"value": "Fix menu conflict with share\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n $('.toggle').click(function(event) {\n event.stopPropagation();\n event.preventDefault();\n\n $('.menu-wrapper').toggleClass('visible');\n });\n\n $(document... | javascript | chosen |
[
{
"from": "system",
"value": "Set cursor to hand when over simplestyle points.\n"
},
{
"from": "human",
"value": "function simplestyle_factory(feature) {\n\n var sizes = {\n small: [20, 50],\n medium: [30, 70],\n large: [35, 90]\n };\n\n var fp = feature.properties || {};... | javascript | chosen |
[
{
"from": "system",
"value": "Make aux comments opt in"
},
{
"from": "human",
"value": "/* eslint-disable object-shorthand */\nmodule.exports = {\n // We need to make sure that the transpiler hit the linoleum source since we are\n // not building to npm or simliar.\n ignore: function(filename... | javascript | chosen |
[
{
"from": "system",
"value": "Add viewbox to empty svg\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport SVG from \"./assets/_sprite.svg\";\nimport s4e from \"svg4everybody\";\n\nexport default class Sprite extends React.Component {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add code to update the read count when reading items in the \"all items\"\nfolder\n"
},
{
"from": "human",
"value": "var AllItemsFolder = Backbone.Model.extend({\n\tinitialize: function() {\n\t\tthis.items = new ItemCollection();\n\t\tthis.items.url = '/item';\n\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Add setSpriteTexture to the SpriteSheet class\n"
},
{
"from": "human",
"value": "'use strict';\r\n\r\nimport Sprite from './sprite';\r\n\r\nexport default class SpriteSheet {\r\n\tconstructor(texture, width, height) {\r\n\t\tthis.texture = texture;\r\n\t\tthis.width... | javascript | chosen |
[
{
"from": "system",
"value": "Add storedAt date for serialized environment state\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports =\nclass StateStore {\n constructor () {\n this.dbPromise = new Promise((resolve, reject) => {\n let dbOpenRequest = indexedDB.open('AtomEnv... | javascript | chosen |
[
{
"from": "system",
"value": "Update blueprint installed package versions.\n\nThis was already updated upstream, just want to make sure we keep these\nin sync.\n"
},
{
"from": "human",
"value": "module.exports = {\n normalizeEntityName: function() {\n // this prevents an error when the entit... | javascript | chosen |
[
{
"from": "system",
"value": "Throw a ReferenceError on animations.select(unregisterName)\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports = function (animations) {\n let index = 0\n let running = false\n\n const api = {\n set index (i) {\n console.log(animations[i].n... | javascript | chosen |
[
{
"from": "system",
"value": "Trim email address before submitting to API.\n"
},
{
"from": "human",
"value": "(function (window, document, $) {\n var app = window.devsite;\n\n app.pages.signup = function () {\n var $btn = $('.notify-btn');\n\n $btn.on('click', function() {\n $btn.ad... | javascript | chosen |
[
{
"from": "system",
"value": "Fix req stream race condition due to middleware\n"
},
{
"from": "human",
"value": "// Requires\nvar _ = require('underscore');\n\nvar express = require('express');\n\n\nfunction setup(options, imports, register) {\n // Import\n var app = imports.server.app;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Rename polyline, it was too technical\n"
},
{
"from": "human",
"value": "export default {\n pan: {\n id: 'pan',\n name: 'Pan',\n title: 'Pan Tool'\n },\n text: {\n id: 'text',\n name: 'Text',\n title: 'Text Label Tool',\n options: {\n te... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo bug in sap b1 http POST to sap\n\n"
},
{
"from": "human",
"value": "import _ from 'underscore';\nimport { HTTP } from 'meteor/http'\n\n/**\n * SAP B1 Integration Methods\n */\nMeteor.methods({\n 'sapB1integration/testConnectionToWindowsService': (sapSer... | javascript | chosen |
[
{
"from": "system",
"value": "Remove custom eslint configs for ember rules\n\nAll linter warnings have been fixed, so we can just use ember/recommended again.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n root: true,\n parser: 'babel-eslint',\n parserOptions: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add jest to eslint env\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: \"airbnb\",\n globals: {\n Urls: true\n },\n env: {\n browser: true\n },\n rules: {\n \"react/jsx-filename-extension\": [\n 1,\n {\n extensions: [... | javascript | chosen |
[
{
"from": "system",
"value": "Create test when click to close alert browser unsupported."
},
{
"from": "human",
"value": "describe(\"Alert unsupported browser: \", function(){\n beforeEach(function(){\n loadFixtures('browser-unsupported-bar_fixture.html');\n });\n\n describe(\"When userAge... | javascript | chosen |
[
{
"from": "system",
"value": "Remove consumer hosted view before initializing payment menu\n"
},
{
"from": "human",
"value": "payex.hostedView.consumer({\n container: 'checkout',\n culture: 'nb-NO',\n onConsumerIdentified: function(consumerIdentifiedEvent) {\n var request = new X... | javascript | chosen |
[
{
"from": "system",
"value": "Load locally based on localStorage value\n"
},
{
"from": "human",
"value": "(function() {\r\n window.stop();\r\n document.documentElement.innerHTML = null;\r\n\r\n const IS_LOCAL = false,\r\n URL_REMOTE = \"https://rawgit.com/ultratype/UltraTypeBot/m... | javascript | chosen |
[
{
"from": "system",
"value": "Update geolocation provider to follow new API\n"
},
{
"from": "human",
"value": "import { PureComponent } from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\n\nimport actions from './geolocation-provider-actions';\nimport redu... | javascript | chosen |
[
{
"from": "system",
"value": "Correct selector for CVV field\n"
},
{
"from": "human",
"value": "/**\n * @TODO \"Donate now\" instead of Contribute.\n * @TODO \"Join Now\"\n */\n(function($) {\n var alvCustom = {\n init: function() {\n $('form#Main.CRM_Contribute_Form_Contribution_Main')... | javascript | chosen |
[
{
"from": "system",
"value": "Convert sortable tables to Sortable.js\n"
},
{
"from": "human",
"value": "Spree.ready(function() {\n // Fix sortable helper\n var fixHelper = function(e, ui) {\n ui.children().each(function() {\n $(this).width($(this).width());\n });\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Remove `only` from unit tests\n"
},
{
"from": "human",
"value": "import App from '../../src/app';\n\ndescribe.only('App StateModel', function() {\n describe('when passing StateModel on Toolkit.App definition', function() {\n before(function() {\n this.MyMod... | javascript | chosen |
[
{
"from": "system",
"value": "Revert my previous 'fix' for point projection\n"
},
{
"from": "human",
"value": "var cornerstoneTools = (function ($, cornerstone, cornerstoneTools) {\n\n \"use strict\";\n\n if(cornerstoneTools === undefined) {\n cornerstoneTools = {};\n }\n if(c... | javascript | chosen |
[
{
"from": "system",
"value": "Add localtunnel option to browserSync\n"
},
{
"from": "human",
"value": "// Local web server running on port 9001 with livereload functionality\nmodule.exports = function(grunt) {\n grunt.config('browserSync', {\n options: {\n watchTask: true,\n... | javascript | chosen |
[
{
"from": "system",
"value": "[ADD] Change the icon on instructions view to chevrons\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport autobind from 'core-decorators/es/autobind';\nimport { Button, Intent, Collapse } from '@blueprintjs/core';\nimport MarkdownRenderer from '..... | javascript | chosen |
[
{
"from": "system",
"value": "Fix some leftover issues from renaming browserify-dataset-sync-wrapper\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar config = require('../config');\n\ngulp.task('watch', function() {\n gulp.watch(config.css.watch, ['css']);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Upgrade to 1.3.1, add Zepto support"
},
{
"from": "human",
"value": "(function(e){e.fn.hugeOnFacebook=function(t){var n={linkClass:\"\",addData:!1,minLikes:10,hugeLikes:50,popClass:\"popular\",hugeClass:\"hugeonfacebook\",likesVisible:!1,likesVisibleClass:\"likesVis... | javascript | chosen |
[
{
"from": "system",
"value": "Update default response on root API endpoint\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function(req, res, next) {\n res.status(200).send('This is the Journey app.');... | javascript | chosen |
[
{
"from": "system",
"value": "Fix capturing the twitter identity information\n"
},
{
"from": "human",
"value": "(function () {\n\n Accounts.oauth.registerService('twitter', 1, function(oauthBinding) {\n var identity = oauthBinding.get('https://api.twitter.com/1/account/verify_credentials.jso... | javascript | chosen |
[
{
"from": "system",
"value": "Add brief documentation for Ember.Object\n"
},
{
"from": "human",
"value": "// ==========================================================================\n// Project: Ember Runtime\n// Copyright: ©2011 Strobe Inc. and contributors.\n// License: Licensed under MIT... | javascript | chosen |
[
{
"from": "system",
"value": "Remove non existent filter from Analytics.\n"
},
{
"from": "human",
"value": "/**\n * Analytics-4 module initialization.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u... | javascript | chosen |
[
{
"from": "system",
"value": "Add class to render for ten day.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport WeatherIcons from '../weather_icons/WeatherIcons';\n\n\nconst TenDay = ({ tenDayForecast }) => {\n if(!tenDayForecast) {\n return(\n <div></div>\n )\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix blueprint polymer version 🔨\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n\nmodule.exports = {\n normalizeEntityName: function() {}, // no-op since we're just adding deps\n\n afterInstall: function() {\n return this.addBowerPackagesToProject(... | javascript | chosen |
[
{
"from": "system",
"value": "Add @since for escapeURI function.\n\nCo-authored-by: Evan Mattson <04b4a59aa52dbba0fe4139b6afe8885fd3fa41ec@10up.com>"
},
{
"from": "human",
"value": "/**\n * Escape URI components utility.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed unde... | javascript | chosen |
[
{
"from": "system",
"value": "Add polling for new questions\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc function\n * @name conferenceAppApp.controller:QuestionlistCtrl\n * @description\n * # QuestionlistCtrl\n * Controller of the conferenceAppApp\n */\nangular.module('mean... | javascript | chosen |
[
{
"from": "system",
"value": "Add utility method to getCurrentScript"
},
{
"from": "human",
"value": "module.exports = {\n getViewPortInfo: function getViewPort () {\n var e = document.documentElement\n var g = document.getElementsByTagName('body')[0]\n var x = window.innerWidth || e.c... | javascript | chosen |
[
{
"from": "system",
"value": "Update song count and total track play time\n"
},
{
"from": "human",
"value": "var socket = io.connect(window.location.href);\n\n$(document).ready(function() {\n\n});"
},
{
"from": "gpt",
"value": "var socket = io.connect(window.location.href);\n\n$(docu... | javascript | chosen |
[
{
"from": "system",
"value": "Move extra log params under 'janus' namespace\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\nvar layouts = require('log4js').layouts;\nvar sprintf = require(\"sprintf-js\").sprintf;\nvar stringify = require('json-stringify-safe');\nvar NestedErro... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for data-event-key attribute to avoid polluting standard attributes and be more explicit\n"
},
{
"from": "human",
"value": "import { getDomNodePath } from './getDomNodePath';\n\nexport function getDomNodeProfile(el) {\n return {\n action: el.action,\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow { unused, ...rest } in ESLint rules\n"
},
{
"from": "human",
"value": "module.exports = {\n \"parser\": \"babel-eslint\",\n \"env\": {\n \"browser\": true,\n \"jest\": true,\n \"node\": true,\n \"es6\": true\n },\n \"extends\": [\"eslint:recomm... | javascript | chosen |
[
{
"from": "system",
"value": "Load string comparison algorithm from config\n"
},
{
"from": "human",
"value": "// utils -> chooseBestURL\n\nimport {\n slugify,\n} from 'bellajs';\n\nimport stringComparision from 'string-comparison';\n\nimport {\n error,\n} from './logger';\n\n\nexport default (... | javascript | chosen |
[
{
"from": "system",
"value": "Change how templateSelection is build"
},
{
"from": "human",
"value": "/**\n * Handling of relationship input fields.\n *\n * @mixin\n * @namespace Bolt.fields.relationship\n *\n * @param {Object} bolt - The Bolt module.\n * @param {Object} $ - jQuery.\n */\n(functi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug that caused improper initialization with overrides\n"
},
{
"from": "human",
"value": "(function( $ ){\n\n $.fn.placeholder = function(restoreOverride, removeOverride){\n \n return $(this).each(function(){\n \n var $this... | javascript | chosen |
[
{
"from": "system",
"value": "Make async functions work in workflow package\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n'use strict';\n\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n let app = new EmberAddon(defaults, ... | javascript | chosen |
[
{
"from": "system",
"value": "Reconfigure progress report record type calculation\n"
},
{
"from": "human",
"value": "/*jslint browser: true, undef: true, white: false, laxbreak: true *//*global Ext,Slate*/\nExt.define('SlateAdmin.model.person.ProgressReport', {\n extend: 'Ext.data.Model',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable send button when user enters text.\n"
},
{
"from": "human",
"value": "import React from 'react/addons';\n\nexport class ChatForm extends React.Component {\n static propTypes = {\n onSend: React.PropTypes.func.isRequired\n }\n\n constructor(pro... | javascript | chosen |
[
{
"from": "system",
"value": "Make ISPC default to SSE2 if no target is specified\n"
},
{
"from": "human",
"value": "var Compile = require('../base-compiler');\n\nfunction compileISPC(info, env) {\n var compiler = new Compile(info, env);\n compiler.optionsForFilter = function (filters, out... | javascript | chosen |
[
{
"from": "system",
"value": "Make video card a link\n"
},
{
"from": "human",
"value": "import * as _ from 'lodash'\nimport React from 'react'\nimport {connect} from 'react-redux'\nimport {compose} from 'recompose'\n\nimport {withDatabaseSubscribe} from '../hocs'\nimport {refreshVideo} from '../... | javascript | chosen |
[
{
"from": "system",
"value": "Add constituent lookup tab, shorten tab labels\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Relay from 'react-relay';\nimport {Styles} from 'material-ui';\nimport MuiThemeProvider from 'material-ui/lib/MuiThemeProvider';\nimport TopNav from ... | javascript | chosen |
[
{
"from": "system",
"value": "Update clear cache to electron promise APIs\n"
},
{
"from": "human",
"value": "import { ipcRenderer, remote } from 'electron';\nimport du from 'du';\n\nimport { getServicePartitionsDirectory } from '../../helpers/service-helpers.js';\n\nconst debug = require('debug'... | javascript | chosen |
[
{
"from": "system",
"value": "Use iterative way to solve inorder traversal.\n"
},
{
"from": "human",
"value": "/**\n * Given a binary tree, return the inorder traversal of its nodes' values.\n * \n * For example:\n * Given binary tree [1,null,2,3],\n * 1\n * \\\n * 2\n * /\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Split LessonsData into Lessons and LessonsData components\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport Login from './login'\nimport Signup from './signup'\nimport Classes from './teacher/classes/Classes'\nimport Lessons from './teacher/classe... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for truncated text 'see more' click triggering text click events.\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n angular\n .module('GVA.Common')\n .directive('truncatedText', truncatedText);\n\n truncatedText.$injec... | javascript | chosen |
[
{
"from": "system",
"value": "Load background faster first time\n"
},
{
"from": "human",
"value": "var default_opacity = 0.2;\nvar animate_time = 1000;\nvar num_images = 152;\n\nfunction fix_resolutions() {\n var img = $('#imgloader').get(0);\n var img_ratio = img.naturalWidth / img.naturalHei... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for ES5/ES6 module styles in role getter\n"
},
{
"from": "human",
"value": "function createSanity({roles}) {\n return {\n getRole(roleName) {\n return roles[roleName]\n }\n }\n}\n\nexport default createSanity\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reference to previous function name\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst expect = require('chai').expect\nconst packageSettings = require('./package.json')\n\nconst Up = require('./' + packageSettings.main)\n\n\ndescribe('The `main` field ... | javascript | chosen |
[
{
"from": "system",
"value": "Configure VuewJS to use Material Design.\n"
},
{
"from": "human",
"value": "// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\nimport Vue from 'vue';\nimport App from './App';... | javascript | chosen |
[
{
"from": "system",
"value": "Add items to cart UI on ITEM_ADDED\n"
},
{
"from": "human",
"value": "import { addClass, addId, button, div, h1, i, p, section, text, ul } from '../builders';\nimport { $ } from '../helpers';\nimport modalItem from './modalItem';\n\nexport default function modal(sto... | javascript | chosen |
[
{
"from": "system",
"value": "Add last action time calc.\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction getTimeInList(actions) {\n actions.reverse();\n var duration = [];\n var listBefore = {};\n var listAfter = {};\n\n actions.forEach(function(action) {\n // get date and l... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Added a check for any URL param. If found, strips them out before\"\n\nThis reverts commit 13de845e95da9ea579516c4480789819c9a26edd.\n"
},
{
"from": "human",
"value": "// Update the local timeline from a Meteor server\n// XXX: If @a is subscribed to @b, @a ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.