conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Store the author id in the local storage\n"
},
{
"from": "human",
"value": "var createEditor;\r\nvar author;\r\n\r\nfunction injectCreate(id) {\r\n $(\"#\" + id).load(\"create/html/createHTML\", function() {\r\n injectCreateEditor();\r\n\t\t\r\n\t// Genera... | javascript | chosen |
[
{
"from": "system",
"value": "Remove all .pager instances after each test\n"
},
{
"from": "human",
"value": "var pager;\nvar items = 100;\nvar itemsOnPage = 10;\nvar pageCount = items/itemsOnPage;\n\nbeforeEach(function() {\n\n $('<div id=\"pager\"></div>').appendTo('body').pagination({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out the second read to the database for debug purposes\n\nI retain it just in case weird stuff happens to the database again, but we\ncertainly don't need to read it again.\n"
},
{
"from": "human",
"value": "// Ionic Starter App\n\n// angular.module is a glo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix logic error in inlineKeyboard"
},
{
"from": "human",
"value": "'use strict'\n\nvar tgTypes = {};\n\ntgTypes.InlineKeyboardMarkup = function (rowWidth) {\n this['inline_keyboard'] = [[]];\n var rowWidth = (rowWidth > 8 ? 8 : rowWidth) || 8; //Currently max... | javascript | chosen |
[
{
"from": "system",
"value": "Modify embedDefs path attribute naming\n"
},
{
"from": "human",
"value": "\nvar gulp = require('gulp');\n\nvar embedDefs = [\n {\n componentPath: 'src/js/components/hello-world.jsx',\n webPath: 'hello-world/'\n },\n {\n componentPath: 'src/js/components/... | javascript | chosen |
[
{
"from": "system",
"value": "Update post URL and viewModel params\n"
},
{
"from": "human",
"value": "/**\n * Reset Password page\n */\n'use strict';\nvar $ = require('jquery');\n\nvar SetPassword = require('js/setPassword');\nvar verificationKey = window.contextVars.verification_key;\nvar reset... | javascript | chosen |
[
{
"from": "system",
"value": "Disable search form while loading\n"
},
{
"from": "human",
"value": "$(function(){\n\n\tvar $form = $('#pet-search-form'),\n\t\t\t$container = $('.homepage-box-list');\n\n\t$form.on('submit', function(e) {\n\t\te.preventDefault();\n\n\t\tvar action = $(this).attr('a... | javascript | chosen |
[
{
"from": "system",
"value": "Copy over errors from bad response\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n\tbeforeModel: function(){\n\t\tthis.store.unloadAll();\n\t},\n\tcreateFeedFromGtfsService: Ember.inject.service('create-feed-fro... | javascript | chosen |
[
{
"from": "system",
"value": "Add You can't merge! logic\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function($){\n $('#js-discussion-header').text('foo bar');\n})(jQuery);\n"
},
{
"from": "gpt",
"value": "'use strict';\n\n(function($){\n var $container = $('#js-repo-pjax-... | javascript | chosen |
[
{
"from": "system",
"value": "Load files using the new `pack` scene configuration.\n"
},
{
"from": "human",
"value": "import files from '@/constants/assets';\nimport fontConfig from '@/constants/bitmap-fonts';\n\nexport default class Loader extends Phaser.Scene {\n /**\n * Takes care of load... | javascript | chosen |
[
{
"from": "system",
"value": "Align images to center for bigger screens\n"
},
{
"from": "human",
"value": "import Theme from 'config/theme';\nimport { StyleSheet } from 'react-native';\n\nexport default StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: Theme.background.main... | javascript | chosen |
[
{
"from": "system",
"value": "Update Laravel .htaccess to fix redirect loop on DirectoryIndex pages such as /tests/\n"
},
{
"from": "human",
"value": "(function(exports) {\n \"use strict\";\n var request = require('request');\n var Sink = require('pipette').Sink;\n var unzipper = require('..... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor for redux-form data and better error checking\n"
},
{
"from": "human",
"value": "import axios from 'axios'\nimport { API } from '../constants'\n\nexport const LOGIN = 'LOGIN'\nexport const LOGIN_SUCCESS = 'LOGIN_SUCCESS'\nexport const LOGIN_FAILURE = 'LOGIN... | javascript | chosen |
[
{
"from": "system",
"value": "Change a method to receiving additional information"
},
{
"from": "human",
"value": "'use strict';\n\nfunction ApiResponse () {\n};\n\nApiResponse.error = function (err) {\n var result = {};\n\n result = {\n ok: false\n };\n\n if (err instanceof Error) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set cookies to expire in ten years\n"
},
{
"from": "human",
"value": "var $ = require('npm-zepto');\nvar Cookies = require('js-cookie');\n\n$(function () {\n var cookiesElement = $('#cookies');\n if (Cookies.get('cookies_closed')) {\n cookiesElement.hide();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update Iuchi Daiyu to use AbilityDsl\n"
},
{
"from": "human",
"value": "const DrawCard = require('../../drawcard.js');\n\nclass IuchiDaiyu extends DrawCard {\n setupCardAbilities(ability) {\n this.action({\n title: '+1 military for each faceup p... | javascript | chosen |
[
{
"from": "system",
"value": "Update server to latest Firebase\n"
},
{
"from": "human",
"value": "import Firebase from 'firebase'\nimport LRU from 'lru-cache'\n\nlet api\n\nif (process.__API__) {\n api = process.__API__\n} else {\n api = process.__API__ = new Firebase('https://hacker-news.fire... | javascript | chosen |
[
{
"from": "system",
"value": "Remove local index of listeners.\n"
},
{
"from": "human",
"value": "function Coordinator (consensus) {\n this._listeners = []\n this._consensus = consensus\n}\n\nCoordinator.prototype.listen = function (url, callback) { // <- listen, POST, -> get them started\... | javascript | chosen |
[
{
"from": "system",
"value": "Add fixture for getting an xform from an external server\n"
},
{
"from": "human",
"value": "module.exports = function() {\n return [];\n};\n"
},
{
"from": "gpt",
"value": "var sample_xform = require('./sample_xform');\n\nmodule.exports = function() {\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove a tmp directory unless told not to\n"
},
{
"from": "human",
"value": "/*\n * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTIC... | javascript | chosen |
[
{
"from": "system",
"value": "Use Meteor.setTimeout to re-run tryInsert function.\n"
},
{
"from": "human",
"value": "process.stdout.write(\"once test\\n\");\n\nif (process.env.RUN_ONCE_OUTCOME === \"exit\")\n process.exit(123);\n\nif (process.env.RUN_ONCE_OUTCOME === \"kill\") {\n process.kill... | javascript | chosen |
[
{
"from": "system",
"value": "Use proper method name in `CoreGETAuthenticator`\n\n"
},
{
"from": "human",
"value": "/**\n * This file is reserved for future development\n * \n * Not ready for use\n */\n'use strict';\n\n/**\n * Module dependencies.\n */\nimport { Router } from 'express';\nimport ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the string literal action type\n"
},
{
"from": "human",
"value": "import { TAB_NAV__SELECT } from '../../actions'\n\nexport default (state = {}, { type, ...action }) =>\n type === 'TAB_NAV__SELECT' ? action : state\n"
},
{
"from": "gpt",
"value": "i... | javascript | chosen |
[
{
"from": "system",
"value": "Add sandbox route for payment testing\n"
},
{
"from": "human",
"value": "'use strict';\nvar MP = require('mercadopago');\n\nmodule.exports = function(app) {\n app.mp = new MP(process.env.MP_ID, process.env.MP_SECRET);\n\n if(process.env.MP_SANDBOX) {\n app.mp.s... | javascript | chosen |
[
{
"from": "system",
"value": "Use href if there is no name\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { linkList } from './LinksSection.css'\n\nconst LinksSection = ({links, style}) => {\n return (\n <div>\n <h3>Liens</h3>\n {links.length ? (\n <ul ... | javascript | chosen |
[
{
"from": "system",
"value": "Add toolSearch keyup textacular functionality to app.js. Require jquery star rating to app.js\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaSc... | javascript | chosen |
[
{
"from": "system",
"value": "Add all JavaScript dependencies from govuk_publishing_components\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and t... | javascript | chosen |
[
{
"from": "system",
"value": "Add preview to default JS\n"
},
{
"from": "human",
"value": "//= require jquery\n//= require underscore\n//= require backbone\n//= require moment\n//= require jquery_ujs\n//= require spin\n\n//= require jquery-ui-1.10.0.custom.min\n//= require date.min\n//= require ... | javascript | chosen |
[
{
"from": "system",
"value": "Use process.env more safely with Webpack 5.\n"
},
{
"from": "human",
"value": "const baseUrl = process.env.SB_SERVER ? process.env.SB_SERVER : process.webpackEnv.SB_SERVER\n\n// Returns an absolute server URL for a path, if necessary (if running in Electron). If it'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix authors in databrary citation\n"
},
{
"from": "human",
"value": "module.filter('cite', [\n\t'pageService', function (page) {\n\t\treturn function (volume) {\n\t\t\tif (!angular.isObject(volume) || angular.isUndefined(volume.access) || angular.isUndefined(volume.... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct timezone for meeting initial values\n"
},
{
"from": "human",
"value": "// @flow\nimport { compose } from 'redux';\nimport { connect } from 'react-redux';\nimport { push } from 'connected-react-router';\nimport MeetingEditor from './components/MeetingEdit... | javascript | chosen |
[
{
"from": "system",
"value": "Add clean task to gulp config\n"
},
{
"from": "human",
"value": "/// <binding AfterBuild='nuget-pack' />\n\"use strict\";\n\nvar gulp = require('gulp'),\n path = require('path'),\n exec = require('child_process').exec,\n fs = require('fs');\n\nvar solution... | javascript | chosen |
[
{
"from": "system",
"value": "Add constructor function for Cars\n"
},
{
"from": "human",
"value": "var colors = [\"red\", \"blue\", \"magenta\", \"yellow\"]\nvar names = [\"Dan\", \"Dave\", \"Eleanor\", \"Rupert\"]\n\ncolors.push(\"green\")\nnames.push(\"Nathaniel\")\n\nhappyHorses = {}\n\nfor (... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for $.ajaxSetup not working in Chrome. Usage is not recommended.\nThis caused changes to custom request headers to be ignored. Calling ajaxSetup wasn't updating the headers used by the next AJAX call.\n"
},
{
"from": "human",
"value": "HAL.Http.Client = function... | javascript | chosen |
[
{
"from": "system",
"value": "Add back call to setStyle on options\n"
},
{
"from": "human",
"value": "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\nconst vectorlayer = require('./VectorLayer.js');\n\nexport class LeafletPathModel exten... | javascript | chosen |
[
{
"from": "system",
"value": "Add constant for the poll timeout value and fix quotes\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1393982\n"
},
{
"from": "human",
"value": "/* global miqSparkleOn miqSparkleOff showErrorMessage clearMessages */\n\nvar GitImport = {\n retrieveDatastoreClickHand... | javascript | chosen |
[
{
"from": "system",
"value": "Disable lint for line with unused var\n"
},
{
"from": "human",
"value": "/*eslint-disable react/no-danger*/\nimport React from \"react\";\nimport serialize from \"serialize-javascript\";\nimport path from \"path\";\nimport process from \"process\";\n\n// Make sure p... | javascript | chosen |
[
{
"from": "system",
"value": ":zap: Add Clock settings to the list of settings\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport Layout from 'react-toolbox/lib/layout/Layout';\nimport Panel from 'react-toolbox/lib/layout/Panel';\nimport { Settings as Background... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for missing browser history\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport {Router} from \"react-router\";\nimport Transmit from \"react-transmit\";\nimport routes from \"views/routes\";\n\n\n/**\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Complete the Expects Koans\"\n\nThis reverts commit d41553a5d48d0d5f10e9f90e0cf4f84e1faf1a73.\n"
},
{
"from": "human",
"value": "describe(\"About Expects\", function() {\n\n // We shall contemplate truth by testing reality, via spec expectations. \n it(\... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust to the new api of Nightwatch\n\nUpdating Nightwatch from 0.9.x to 1.0.x changed Nightwatch API a little,\nso adjust gulp-nightwatch to the new api of Nightwatch.\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar nightwatch = require('nightwa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix up reference to moved module.\n"
},
{
"from": "human",
"value": "compiler.modulator.compiled = def(\n [\n ephox.bolt.module.modulator.compiled,\n compiler.tools.io\n ],\n\n function (delegate, io) {\n var create = function () {\n var instance = ... | javascript | chosen |
[
{
"from": "system",
"value": "Update ZeroClipboard to the newest version available at CDN\n\n@XhmikosR, No 1.3.4 yet. I guess next time we'll update to 2.x.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('osscdnApp', ['ngAnimate', 'ui.router', 'ngDropdowns', 'semverSort',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Declare html5mode in ng template properly\n"
},
{
"from": "human",
"value": "var dataLoaderRunner = [\n 'dataLoader',\n function (dataLoader) {\n return dataLoader();\n }\n];\n\nangular.module('${appName}', ['ngRoute'])\n.config(function ($routeProvider, $loca... | javascript | chosen |
[
{
"from": "system",
"value": "Add fixme comment for user timings on Firefox.\n"
},
{
"from": "human",
"value": "(function() {\n /**\n * Browsertime (http://www.browsertime.com)\n * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog\n * and other contributors\n * Released under the Apac... | javascript | chosen |
[
{
"from": "system",
"value": "Disable the indent rule in eslint\n"
},
{
"from": "human",
"value": "module.exports = {\n parser: \"babel-eslint\",\n env: {\n es6: true,\n node: true,\n },\n extends: \"eslint:recommended\",\n parserOptions: {\n sourceType: \"module\",\n ecmaFeatur... | javascript | chosen |
[
{
"from": "system",
"value": "Add sign in/sign out to navbar\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react'\nimport { Link } from 'react-router'\n\nclass Navbar extends PureComponent {\n render() {\n return(\n <header className='page-header'>\n <s... | javascript | chosen |
[
{
"from": "system",
"value": "Update eslint config for typescript\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: [\n 'eslint-config-xo-space/esnext',\n 'eslint-config-prettier',\n 'eslint-config-prettier/standard',\n ],\n env: {\n node: true,\n },\n rules: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Break up lines then insert tabs to lines after 1st\n"
},
{
"from": "human",
"value": "'use babel';\n\nimport { TextEditor } from 'atom';\n\nexport default class EditorInserter {\n setText(text) {\n this.insertionText = text;\n }\n\n performInsertion(... | javascript | chosen |
[
{
"from": "system",
"value": "Use const keyword to declare variables\n"
},
{
"from": "human",
"value": "var dataviews = require('./');\n\nmodule.exports = class DataviewFactory {\n static get dataviews() {\n return Object.keys(dataviews).reduce((allDataviews, dataviewClassName) => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update require to use npm jquery not a local version\n"
},
{
"from": "human",
"value": "var $ = require('./jquery');\nvar jQueryVersion = require('./lib.js');\n\n$(function() {\n console.log(jQueryVersion());\n})();\n"
},
{
"from": "gpt",
"value": "var ... | javascript | chosen |
[
{
"from": "system",
"value": "Add route handler for PUT /api/nodes/:nodeID\n"
},
{
"from": "human",
"value": "var Node = require('./nodeModel.js'),\n handleError = require('../../util.js').handleError,\n handleQuery = require('../queryHandler.js');\n\nmodule.exports = {\n\n createN... | javascript | chosen |
[
{
"from": "system",
"value": "Add localStorage save on expectation complete.\n"
},
{
"from": "human",
"value": "var Expectation = Backbone.Model.extend({\n\tinitialize: function(){\n \n \t},\n\n \tdefaults: {\n\t\tcomplete: false,\n \t},\n\n \tvalidate: function(attributes){\n\t if(att... | javascript | chosen |
[
{
"from": "system",
"value": "Call cythsInit function after internationalization"
},
{
"from": "human",
"value": "// 2016-10-21 V 1.0.0\n// - Initial release\n\n//\n// i18next configuration\n//\nvar i18nextOptions =\n{\n\t// evtl. use language-detector https://github.com/i18next/i18next-browse... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for export declarations to findUsedIdentifiers\n\nI recently added some test that changed how identifiers were visited,\nand I just wanted to make sure I didn't break anything for the\nfindUsedIdentifiers module.\n"
},
{
"from": "human",
"value": "import fi... | javascript | chosen |
[
{
"from": "system",
"value": "docs: Add links to opinion rules\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * Rules in this file are ultimately random choices.\n *\n * No human should have to type on a keyboard to comply.\n * If it can't be --fix'ed, it doesn't belong in here.\n */\... | javascript | chosen |
[
{
"from": "system",
"value": "Add approvedApplications and totalApplications to tickets\n\nThis is groundwork for resolving CoderDojo/community-platform#778. It\nallows us to see how many applications there are for a given ticket\ntype.\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunctio... | javascript | chosen |
[
{
"from": "system",
"value": "Repair validation needed for replication.\n"
},
{
"from": "human",
"value": "function (newDoc, oldDoc, userCtx) {\n function forbidden(message) { \n throw({forbidden : message});\n };\n \n function unauthorized(message) {\n throw({unauthorized : message... | javascript | chosen |
[
{
"from": "system",
"value": "Add category mapping for \"onsdagsdebatt\"\n"
},
{
"from": "human",
"value": "module.exports = {\n \"Dagens bedrift\": \"PRESENTATIONS\",\n \"Fest og moro\": \"NIGHTLIFE\",\n \"Konsert\": \"MUSIC\",\n \"Kurs og events\": \"PRESENTATIONS\",\n \"Revy og... | javascript | chosen |
[
{
"from": "system",
"value": "[webpack] Add missing loader for CSS\n"
},
{
"from": "human",
"value": "const path = require('path');\nmodule.exports = {\n entry: [\n './src/component/index'\n ],\n output: {\n path: path.join(__dirname, 'dist'),\n filename: 'focus-fil... | javascript | chosen |
[
{
"from": "system",
"value": "Fix es6 highlight for prism\n"
},
{
"from": "human",
"value": "import React, {PureComponent, PropTypes} from 'react'\nimport {highlightElement} from 'prismjs'\nimport 'prismjs/themes/prism.css'\nimport 'prismjs/components/prism-css'\nimport 'prismjs/components/prism... | javascript | chosen |
[
{
"from": "system",
"value": "Add delay to anchoring code\n"
},
{
"from": "human",
"value": "import { bodyLoader } from 'src/util/loader'\nimport { remoteFunction } from 'src/util/webextensionRPC'\nimport * as rendering from './rendering'\nimport * as interactions from './interactions'\n\nexport... | javascript | chosen |
[
{
"from": "system",
"value": "Add source map to prod\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\nvar webpackStripLoader = require('strip-loader');\n\nmodule.exports = {\n\tplugins: [\n\t\tnew webpack.DefinePlugin({\n\t\t\t'process.env': {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Make all Scala snippets highlighted\n\nElement with id `leftToggler` doesn't exist on some pages, which could sometimes\nthrow an error before hljs syntax for Scala is loaded, which prevented it from\nworking properly.\n"
},
{
"from": "human",
"value": "window.addEv... | javascript | chosen |
[
{
"from": "system",
"value": "Fix usage of Nock in unit tests - much cleaner now\n"
},
{
"from": "human",
"value": "var config = require('./config');\nvar should = require('should');\nvar nock = require('nock');\nvar up = require('../index')(config);\n\nvar baseApi = nock('https://jawbone.com:44... | javascript | chosen |
[
{
"from": "system",
"value": "Improve Length Of Last Word\n"
},
{
"from": "human",
"value": "// https://leetcode.com/problems/length-of-last-word/#/description\n\n/**\n * @param {string} s\n * @return {number}\n */\nvar lengthOfLastWord = function (s) {\n if (!s) return 0;\n s = s.trimRight();... | javascript | chosen |
[
{
"from": "system",
"value": "Add more tests cases and sleeps to view tests slowly\n"
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('My App', function() {\n it('should automatically redirect to /home when location hash/fragment is empty', function() {\n browser.get('index.html');... | javascript | chosen |
[
{
"from": "system",
"value": "Fix left & top edges for tooltips.\n"
},
{
"from": "human",
"value": "export default function checkEdges(tooltipEl) {\n const tooltipBounds = tooltipEl.getBoundingClientRect();\n const bodyBounds = document.body.getBoundingClientRect();\n\n if (tooltipBound... | javascript | chosen |
[
{
"from": "system",
"value": "Change await promises to counter\n"
},
{
"from": "human",
"value": "$().ready(() => {\n loadContentSection().then(() =>{ \n $('body').removeClass('loading');\n });\n});\n\n$(\"body\").on('click', '.keyword', function() {\n $(this).addClass(\"active\");\n $(\"... | javascript | chosen |
[
{
"from": "system",
"value": "Use process.exit() to clean up after tests\n"
},
{
"from": "human",
"value": "// We need to prime vertx since jasmine tests don't run in the vert.x container.\nif ((typeof nodyn) !== 'object') {\n load('./node.js');\n}\n\n// jasmine's fake clock thinks it's using m... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak execution timing of highlighting\n"
},
{
"from": "human",
"value": "/* global hljs */\n(function() {\n 'use strict';\n var cells = document.querySelectorAll('.diff tbody td');\n for (var i = 0, len = cells.length; i < len; i++) {\n hljs.highli... | javascript | chosen |
[
{
"from": "system",
"value": "Add new test case in wordpress\n"
},
{
"from": "human",
"value": "import sinon from 'sinon';\nimport chai from 'chai';\nconst expect = chai.expect;\nimport * as fetch from '../../../src/functions/fetch.js';\nimport checkWordpress from '../../../src/wordpress/wordpre... | javascript | chosen |
[
{
"from": "system",
"value": "Fix not chached user bug\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport React from 'react';\nimport ProfileImage from 'components/atoms/profile_image/ProfileImage';\nimport Username from 'components/atoms/username/Username';\nimport Badges from 'componen... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"fix links from test page\"\n\nThis reverts commit 27dd0e3170bb185e385deed11b153d86983ae0c6.\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: e... | javascript | chosen |
[
{
"from": "human",
"value": "Add a unit test for notYankedOrIsOwner (authored by @efx).\n"
},
{
"from": "gpt",
"value": "import { module, test } from 'qunit';\nimport { setupTest } from 'ember-qunit';\nimport { A } from '@ember/array';\nimport Service from '@ember/service';\n\nmodule('Unit | Con... | javascript | chosen |
[
{
"from": "human",
"value": "Add Reference list model for Genders.\n"
},
{
"from": "gpt",
"value": "var keystone = require('keystone'),\n\tTypes = keystone.Field.Types;\n\n// Create model. Additional options allow menu name to be used what auto-generating URLs\nvar Gender = new keystone.List('Ge... | javascript | chosen |
[
{
"from": "human",
"value": "Update project jQuery.leanModal2 to 2.3\n"
},
{
"from": "gpt",
"value": "// jQuery.leanModal2.min.js v2.3 - MIT Licensed by eustasy http://eustasy.org\n(function($){function leanModal_Close(modal_id){$('.js-target-jquery-leanmodal-overlay').fadeOut(300);$(modal_id).f... | javascript | chosen |
[
{
"from": "human",
"value": "Add helper to check if platform is windows\n"
},
{
"from": "gpt",
"value": "/**\n * Created by JiaHao on 5/10/15.\n */\n\nvar os = require('os');\n\nfunction platformIsWindows() {\n var platform = os.platform();\n return platform.indexOf('win') > -1;\n}\n\nmodu... | javascript | chosen |
[
{
"from": "system",
"value": "Send authorization headers with upload requests\n\nOur new simple auth library doesn’t do this automatically so we have to\nhand it on our own.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport EmberUploader from 'ember-uploader';\n\nconst { File... | javascript | chosen |
[
{
"from": "human",
"value": "Add script to add properties to processes that don't have any template properties.\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env node\n\n\"use strict\";\n\nvar ropts = {\n db: process.env.MCDB || 'materialscommons',\n port: process.env.MCDB_PORT || 30815\n};\... | javascript | chosen |
[
{
"from": "human",
"value": "Move parseFields function to its own module\n"
},
{
"from": "gpt",
"value": "function parseFields (payload) {\n if (Array.isArray(payload)) {\n payload.forEach(parseFields);\n return;\n }\n\n if (typeof payload === 'object' && payload.hasOwnProperty('fields'... | javascript | chosen |
[
{
"from": "system",
"value": "Add some ways to get warnings.\n"
},
{
"from": "human",
"value": "var tap = require(\"tap\")\nvar normalize = require(\"../lib/normalize\")\nvar path = require(\"path\")\nvar fs = require(\"fs\")\nvar _ = require(\"underscore\")\nvar async = require(\"async\")\n\nva... | javascript | chosen |
[
{
"from": "human",
"value": "Add benchmark comparison for trianglepath construction with rounded corners.\n"
},
{
"from": "gpt",
"value": "var suite = new PerfSuite({\n name: 'RedRaphael Compare Trianglepath Construction With and Without Rounded Corners',\n jquery: true,\n\n assets: [\n... | javascript | chosen |
[
{
"from": "human",
"value": "Make a generic trivago api call function\n"
},
{
"from": "gpt",
"value": "'use strict'\n\nconst crypto = require('crypto')\nconst config = require('../config')\nconst rp = require('request-promise')\nconst Q = require('q')\nconst _ = require('lodash')\n\nvar fixDate ... | javascript | chosen |
[
{
"from": "human",
"value": "Add the example to use postgres to insert data into db.\n"
},
{
"from": "gpt",
"value": "var pg = require('pg');\nvar uri = 'postgres://fred:12345678@localhost/mydb';\n\npg.connect(uri, function(err, client, done) {\n if (err) {\n return console.error('erro... | javascript | chosen |
[
{
"from": "human",
"value": "tests: Add tests for \"open-editor\" utility\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nvar openEditor = require('../../../lib/utilities/open-editor');\n\nvar expect = require('chai').expect;\nvar td = require('testdouble');\n\ndescribe('open-editor', function... | javascript | chosen |
[
{
"from": "human",
"value": "Add untyped acl test resource\n"
},
{
"from": "gpt",
"value": "module.exports = `@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n\n<#authorization>\n # Not present: a acl:Authorization;\n\n acl:agent \n <http... | javascript | chosen |
[
{
"from": "human",
"value": "Add first version of code.\n\nUntil this point, development of this javascript was handled through codepen. However, this side project has reached a level of ambition that requires the power of real version control."
},
{
"from": "gpt",
"value": "/* backfeed.js */\nv... | javascript | chosen |
[
{
"from": "human",
"value": "Add Zillow link Answer Generator\n"
},
{
"from": "gpt",
"value": "/*jslint continue: true, devel: true, evil: true, indent: 2, plusplus: true, rhino: true, unparam: true, vars: true, white: true */\nfunction isNonBlankString(s) {\n 'use strict';\n return s && (s.tr... | javascript | chosen |
[
{
"from": "human",
"value": "Add first version of Ceylon language file\n"
},
{
"from": "gpt",
"value": "/*\nLanguage: Ceylon\nAuthor: Lucas Werkmeister <mail@lucaswerkmeister.de>\n*/\nfunction(hljs) {\n // 2.3. Identifiers and keywords\n var KEYWORDS =\n 'assembly module package import alia... | javascript | chosen |
[
{
"from": "human",
"value": "Implement music box parsing command\n"
},
{
"from": "gpt",
"value": "/* Music Box chat-plugin\n * parses links into the HTML for music boxes\n * by panpawn\n */\n\nvar https = require(\"https\");\n\nexports.commands = {\n musicbox: function (target, room, user) {\... | javascript | chosen |
[
{
"from": "human",
"value": "Fix service worker (sw path and scope were messed up)\n"
},
{
"from": "gpt",
"value": "var CACHE_NAME = 'v1'\n\nvar CAHCED_DEFAULTS = [\n '/',\n\n '/styles/main.css',\n '/styles/normalize.css',\n\n '/scripts/main.js',\n \n '/slides.json',\n\n 'ht... | javascript | chosen |
[
{
"from": "human",
"value": "Install bower deps on addon install\n"
},
{
"from": "gpt",
"value": "/*jshint node:true*/\nmodule.exports = {\n name: 'ember-purify',\n\n afterinstall: function(options) {\n this.addBowerPackageToProject('DOMPurify', '^0.8.3');\n }\n};\n"
}
] | javascript | chosen |
[
{
"from": "human",
"value": "Make color information available to iwindow\n\nNo user-visible changes. If you don't plan to use the tract colors in\nthe info window, disregard.\n"
},
{
"from": "gpt",
"value": "define([], function() {\n return {\n getColor: function(colorSeries, boundsArr... | javascript | chosen |
[
{
"from": "human",
"value": "Add tests for moving a file\n"
},
{
"from": "gpt",
"value": "const r = require('@lib/r');\nconst files = require('@dal/files')(r);\nconst tutil = require('@lib/test-utils')(r);\nconst dirUtils = require('@dal/dir-utils')(r);\n\ndescribe('Test moveFileToDirectory', ()... | javascript | chosen |
[
{
"from": "human",
"value": "Document workspace API completable arguments\n"
},
{
"from": "gpt",
"value": "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compli... | javascript | chosen |
[
{
"from": "human",
"value": "Add script to convert from binary representation to symbolic notation\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nvar toBinaryString = require( '@stdlib/number/uint16/base/to-binary-string' );\nvar lpad = require( '@stdlib/string/left-pad' );\n\n// Set this to ... | javascript | chosen |
[
{
"from": "human",
"value": "Add the POST method for /images and /reports\n"
},
{
"from": "gpt",
"value": "module.exports = function(options, callback) {\n\n var fs = require('fs'),\n restify = require('restify'),\n util = require('util');\n\n var serverOptions = {\n name: 'queixi... | javascript | chosen |
[
{
"from": "human",
"value": "Add test challenge list test\n"
},
{
"from": "gpt",
"value": "/* eslint-disable no-undef */\nconst controllers = require('../controllers');\n// const db = require('../utils').db;\nconst fixtures = require('../spec/fixtures');\n\nconst Challenges = new controllers.Cha... | javascript | chosen |
[
{
"from": "human",
"value": "Create a spec for TimePaneCtrler\n"
},
{
"from": "gpt",
"value": "describe('tab-panes TimePaneCtrler', function() {\n\tvar $rootScope;\n\tvar $controller;\n\tbeforeEach(module('popupApp'));\n\tbeforeEach(inject(function(_$rootScope_, _$controller_) {\n\t\t$rootScope ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.