conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change template for the ranking route\n"
},
{
"from": "human",
"value": "var subscriptions = new SubsManager();\n\nRouter.configure({\n\tlayoutTemplate: 'layout',\n\tloadingTemplate: 'loading',\n\tnotFoundTemplate: 'notFound'\n});\n\nRouter.route('/', {\n\tname: 'ho... | javascript | chosen |
[
{
"from": "system",
"value": "Fix loading public site when SSL is enabled\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport DS from 'ember-data';\nimport ENV from 'public/config/environment';\n\nexport default DS.RESTAdapter.extend({\n fastboot: Ember.inject.service(),\n\tna... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment to example github repo auth config.\n"
},
{
"from": "human",
"value": "var nodegit = require('nodegit'),\n cred = nodegit.Cred;\n\nmodule.exports = function(url, userName) {\n // return cred.sshKeyFromAgent(userName);\n return cred.sshKeyNew(user... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the entrypoint missing the path prefix\n"
},
{
"from": "human",
"value": "import SubmissionError from '../error/SubmissionError'\nimport { ENTRYPOINT } from '../config/entrypoint';\n\nconst MIME_TYPE = 'application/ld+json'\n\nexport default function (id, option... | javascript | chosen |
[
{
"from": "system",
"value": "Add description to category slug ember model\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\n\nexport default DS.Model.extend({\n slug: DS.attr('string'),\n});\n"
},
{
"from": "gpt",
"value": "import DS from 'ember-data';\n\nexport de... | javascript | chosen |
[
{
"from": "system",
"value": "Handle carriage return in build system\n\nMocha uses carriage return to clear the current line. At least if its output\nis not a TTY. If we don't want that to interfere with what's already\nwritten to the terminal, we have to handle it somewhere.\n"
},
{
"from": "human... | javascript | chosen |
[
{
"from": "system",
"value": "Fix packageName not being added to query params\n"
},
{
"from": "human",
"value": "var packageName = document.title;\n\nvar runkitLinkNode = document.querySelector('[href*=runkit]');\nrunkitLinkNode.innerText = 'Test ' + packageName + ' on 2runkit';\n\nvar replitLin... | javascript | chosen |
[
{
"from": "system",
"value": "Complete sendMail and retrySendMail function\n"
},
{
"from": "human",
"value": "//Require Module\nvar log4js = require('log4js');\nvar logger = log4js.getLogger('sendNotification');\nvar promise = require('promised-io');\nvar mailer = require('emailjs');\n\n/**\n *\... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing preventDefault when opening links in _blank window\n"
},
{
"from": "human",
"value": "$(document).on('click', 'a', function(event) {\n var lnk = event.currentTarget;\n\n //for backwards compatibility\n var rels = lnk.rel.split(' ');\n $.each(... | javascript | chosen |
[
{
"from": "system",
"value": "Change URL bar result ordering\n"
},
{
"from": "human",
"value": "user_pref(\"beacon.enabled\", false);\nuser_pref(\"browser.contentblocking.enabled\", false);\nuser_pref(\"browser.library.activity-stream.enabled\", false);\nuser_pref(\"browser.safebrowsing.download... | javascript | chosen |
[
{
"from": "system",
"value": "Add an endpoint for clearing visit data\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Visit = require('../models/visit-model');\nvar Domain = require('../models/domain-model');\n\n/**\n * Read all visits to a given domain (authenticated)\n */\n\nmodule.exp... | javascript | chosen |
[
{
"from": "system",
"value": "Create test for make chat open\n"
},
{
"from": "human",
"value": "module.exports = {\n 'Does Chat Exist' : function (browser) {\n browser\n .url(browser.launchUrl)\n .waitForElementVisible('body', 1000)\n .waitForElementVisible('iframe#drift-widge... | javascript | chosen |
[
{
"from": "system",
"value": "Use function to fix lint"
},
{
"from": "human",
"value": "\"use strict\";\nlet map;\n\nvar init = function(options) {\n\tmap = setupMap(options);\n}\n\nvar commands = function(bot, options, action) {\n\tconst message = action.message;\n\tconst words = message.split(... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'tomorrow' to date range filter\n\nAs requested by CITA.\n"
},
{
"from": "human",
"value": "/* global moment */\n\n(function($) {\n 'use strict';\n\n var dateRangePicker = {\n init: function() {\n this.$picker = $('.js-date-range-picker');\n\n thi... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust field for platform to platform_type as in json\n"
},
{
"from": "human",
"value": "const m = require('mithril');\n\nconst User = module.exports = function (data) {\n this.id = m.prop(data.userId);\n this.username = m.prop(data.username);\n this.platform = m... | javascript | chosen |
[
{
"from": "system",
"value": "Fix accidentally erased command handler tests.\n"
},
{
"from": "human",
"value": "import chai, { expect } from 'chai';\nimport chaiAsPromised from 'chai-as-promised';\nchai.use(chaiAsPromised);\n\nimport ScheduledCommand from '../src/commandScheduling/scheduledComma... | javascript | chosen |
[
{
"from": "system",
"value": "Create images FS.Collection and a GridFS store.\n"
},
{
"from": "human",
"value": "var Images = new FS.Collection(\"images\", {\n stores: [new FS.Store.FileSystem(\"images\", {path: \"~/uploads\"})]\n});"
},
{
"from": "gpt",
"value": "var imageStore = n... | javascript | chosen |
[
{
"from": "system",
"value": "Return the block type and data for a given position\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nlet path = require('path'),\n Map = require('./index'),\n World = Map.World;\n\nlet home = process.env[\"HOME\"];\nlet saves = path.join(home, \"Library... | javascript | chosen |
[
{
"from": "system",
"value": "Update WebSocketService so it can respond to new players properly\n"
},
{
"from": "human",
"value": "export class WebsocketService {\n\tconstructor($log, _) {\n\t\t'ngInject';\n\n\t\tthis._ = _;\n\t\tthis.$log = $log;\n\n\t\tthis.$log.info('constructor()', this);\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add android google source code link\n\n * Make the android google source code translation rule.\n"
},
{
"from": "human",
"value": "/*! Kernel CI Dashboard | Licensed under the GNU GPL v3 (or later) */\ndefine(function() {\n 'use strict';\n var rules;\n // ... | javascript | chosen |
[
{
"from": "system",
"value": "Add stderr option to hello-world command\n"
},
{
"from": "human",
"value": "CLI.registerCommand('hello-world', function(opts) {\n console.info(\"Hello world from spacejamio:mcli!\");\n});\n"
},
{
"from": "gpt",
"value": "CLI.registerCommand('hello-world... | javascript | chosen |
[
{
"from": "system",
"value": "Update alert banner for HashiConf\n\nFinal cleanup/closer exp date\n"
},
{
"from": "human",
"value": "export const ALERT_BANNER_ACTIVE = true\n\n// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner\nexport default {\n tag: 'Oct 19-21',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add test delay for CI\n"
},
{
"from": "human",
"value": "const WAIT = 1000;\nconst NODE_PORT = process.env.NODE_PORT || 3000;\n\nmodule.exports = {\n 'Smoketest' (browser) {\n browser\n .url(`http://localhost:${NODE_PORT}/`)\n .waitForElementVisible('b... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust path to current url\n"
},
{
"from": "human",
"value": "$('form').submit(function(event) {\n\n event.preventDefault();\n\n if ($(this).hasClass('shake')) {\n return;\n }\n\n $.post('/api/login', $(this).serialize(), function(response) {\n location.re... | javascript | chosen |
[
{
"from": "system",
"value": "Reset size of editor inspector section\n"
},
{
"from": "human",
"value": "import { StyleSheet } from 'react-native';\n\nexport default StyleSheet.create({\n container: {\n backgroundColor: '#808080',\n flex: 1,\n flexDirection: 'row',\n },\n\n mainSectio... | javascript | chosen |
[
{
"from": "system",
"value": "Delete edit button if timer goes below 0\n"
},
{
"from": "human",
"value": "$(function () {\n $(document).ready(function () {\n\n if($('.button--confession-edit').length) {\n $('.button--confession-edit').each(function() {\n var el = $(this);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove parens from queryFill options\n"
},
{
"from": "human",
"value": "export const LINEAR = '(linear)'\nexport const NONE = '(none)'\nexport const NULL = '(null)'\nexport const NUMBER = '(number)'\nexport const PREVIOUS = '(previous)'\n\nexport const QUERY_FILL_OP... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate UpdatingPopover component to functional\n\nIt is forwarding a ref since it needs a reference to the DOM\ninstance for this example.\n"
},
{
"from": "human",
"value": "class UpdatingPopover extends React.Component {\n componentDidUpdate(prevProps) {\n if ... | javascript | chosen |
[
{
"from": "system",
"value": "Validate CSS props by checking if its not a SCSS/LESS variable\n"
},
{
"from": "human",
"value": "/**\n * Validate if a property is a valid CSS one.\n *\n * @param {string} prop\n * @return {boolean} Whether or not the property is valid (true = valid)\n */\n\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Add query to IceFire API using routeParams\n"
},
{
"from": "human",
"value": "angular.\n\tmodule('characterDetail').\n\tcomponent('characterDetail', {\n\t\ttemplateUrl: '/character-detail/character-detail.template.html',\n\t\tcontroller: ['IceFire', '$routeParams',\... | javascript | chosen |
[
{
"from": "system",
"value": "Add logic to toggle the price between litecoin and bitcoin\n"
},
{
"from": "human",
"value": "var wsUri = \"ws://localhost:8000/ws/\";\n\nfunction setupWebSocket() {\n var websocket = new WebSocket(wsUri);\n websocket.onopen = function(evt) { onOpen(evt) };\n web... | javascript | chosen |
[
{
"from": "system",
"value": "FIX : double result lol\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar _ = require('lodash');\n\n\nfunction process(result){\n\n\tlet result = {\n\t\tnbCacheServers: 1,\n\t\tcacheServers: [\n\t\t\t{\n\t\t\t\tid: 0,\n\t\t\t\tvideoIds:[]\n\t\t\t}\n\t\t]\n\t};\... | javascript | chosen |
[
{
"from": "system",
"value": "Add className prop to FormattedMessage\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { intlShape } from './shape';\n\nconst FormattedMessage = ({ id, values, defaultMessage = '', html = false }, { intl }) => {\n const message ... | javascript | chosen |
[
{
"from": "system",
"value": "Add in link to upstream issue\n"
},
{
"from": "human",
"value": "// This is the entrypoint for the Rails asset pipeline, and is new\n// as part of Sprockets 4.0. See https://github.com/rails/sprockets/blob/master/UPGRADING.md#manifestjs\n\n\n// Most JS is built sep... | javascript | chosen |
[
{
"from": "system",
"value": "Remove video device from tests\n"
},
{
"from": "human",
"value": "/*\n * Mach-84: The Virtual Machinery Playpen\n * Inspired by the Vintage Computer Club\n *\n * Copyright (c) 2014 blackchip.org\n *\n * Permission is hereby granted, free of charge, to any person obt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix docker SIGTERM issue on CoreOS\n"
},
{
"from": "human",
"value": "/* jshint node: true, browser: false */\n'use strict';\n\n// CREATE HTTP SERVER AND PROXY\n\nvar app = require('express')();\napp.set('views', __dirname + '/app');\napp.set('view engine', 'ejs');\... | javascript | chosen |
[
{
"from": "system",
"value": "Add another test file location\n"
},
{
"from": "human",
"value": "'use babel';\n\nimport { CompositeDisposable, File } from 'atom';\n\nexport default {\n subscriptions: null,\n\n activate() {\n // Events subscribed to in atom's system can be easily cleaned up w... | javascript | chosen |
[
{
"from": "system",
"value": "Use results instead of result in search part.\n"
},
{
"from": "human",
"value": "// DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details.\n'use strict';\n\nmodule.exports = function searchResultsTemplate(searchResultsPart, renderer, d... | javascript | chosen |
[
{
"from": "system",
"value": "[fix] Adjust to the new layout\n"
},
{
"from": "human",
"value": "pipe.once('package:initialize', function (pagelet) {\n 'use strict';\n\n //\n // We don't need to have any other information from the pagelet then the\n // placeholders/elements that contain our p... | javascript | chosen |
[
{
"from": "system",
"value": "Fix var. In strict mode\n"
},
{
"from": "human",
"value": "/*global define */\ndefine(['jquery'], function($) {\n 'use strict';\n // Loads the specified JSON config file and returns a promise\n // to tell you when it's done.\n return function(url) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix menu is not shown.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar app = require('app');\nvar BrowserWindow = require('browser-window');\nvar Menu = require('menu');\n\nvar mainWindow = null;\n\nvar menu = Menu.buildFromTemplate([\n {\n label: 'er',\... | javascript | chosen |
[
{
"from": "system",
"value": "Stop sequelize from logging to the console\n"
},
{
"from": "human",
"value": "const Sequelize = require('sequelize');\n\nconst db = new Sequelize('postgres', 'postgres', ' ', {\n dialect: 'postgres',\n port: 5432,\n});\n\ndb.authenticate()\n .then((err) => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Increase default timeout for yahoo geocoder.\n"
},
{
"from": "human",
"value": "var YAHOO = require('../../../../src/geo/geocoder/yahoo-geocoder');\n\ndescribe('geo/geocoder/yahoo-geocoder', function () {\n it(\"we shouldn't get a direction that doesn't exist\", fu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a legit broken import\n"
},
{
"from": "human",
"value": "import '../components/comments/CommentsItem/_comments-unit-tests.js';\nimport '../components/posts/timeframeUtils.tests.js';\nimport './moderation/moderation.client.tests.js';\n"
},
{
"from": "gpt"... | javascript | chosen |
[
{
"from": "system",
"value": "Update react-relay to account for React-internals change\n\nReviewed By: threepointone\n\nDifferential Revision: D13653660\n\nfbshipit-source-id: 124758f7a5804f9ed7525fa4e31f6f4b5844aa8f\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) Facebook, Inc. and its... | javascript | chosen |
[
{
"from": "system",
"value": "Change initial state of branchTitles\n"
},
{
"from": "human",
"value": "const intialState = ['hotels', 'points of interest', 'museums', 'nightlife', 'restaurants'];\n\nconst branchTitles = (state = intialState, action) => {\n switch (action.type) {\n case 'UPDAT... | javascript | chosen |
[
{
"from": "system",
"value": "Update resource for audio components, pointing to jit.su api\n"
},
{
"from": "human",
"value": "(function () {\n app.collections.Packages = Backbone.Collection.extend({\n model : app.models.Package,\n\n url : '/packages',\n\n initialize: function () {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use `error` in both cases, instead of `errors` sometimes\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Compiler = require('traceur').NodeCompiler\n , xtend = require('xtend')\n ;\n\nvar traceurOptions = {\n modules : 'commonjs',\n sourceMaps : t... | javascript | chosen |
[
{
"from": "system",
"value": "Add encrypt key list and styles to main\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport React, { Component } from 'react';\nimport ReactCSS from 'reactcss';\n\nimport colors from '../styles/variables/colors';\nimport 'normalize.css';\nimport '../fonts/wor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix vendor bundle example with polyfills\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n modify(defaultConfig, { target, dev }, webpack) {\n const config = defaultConfig; // stay immutable here\n\n // Change the name of the server out... | javascript | chosen |
[
{
"from": "system",
"value": "Write CSV file with Julian date\n"
},
{
"from": "human",
"value": "const fs = require('fs'), os = require('os');\nconst sqlite = require('sqlite3');\n\nvar out = fs.createWriteStream('tweets.csv');\nout.write('ID\\tUser\\tTimestamp' + os.EOL);\n\nvar db = new sqlite... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"maintain group draggability (why?)\"\n\nThis reverts commit 5c851f3da1e055e10f9bfa8c44f8841e459835cc.\n"
},
{
"from": "human",
"value": "define([\n 'views/editor_collection_base',\n 'underscore',\n 'jquidrag',\n 'text!templates/groups.tpl',\n 'views/gr... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust disable button create task."
},
{
"from": "human",
"value": "/**\n * Created by eurides on 25/04/16.\n */\n\n(function ($) {\n\n $.fn.serverStatus = function () {\n $.ajax({\n type: 'GET',\n dataType: 'json',\n url: ... | javascript | chosen |
[
{
"from": "system",
"value": "Update default extractor to extract examples\n"
},
{
"from": "human",
"value": "var parse = require('dox').parseComments;\nvar extractModuleMeta = require('./utils/extract-module-meta');\n\n/**\n * @param {string} content\n * @param {Object} context\n * @param {Obje... | javascript | chosen |
[
{
"from": "system",
"value": "Add deprecation when accessing `experiments.INSTRUMENTATION`.\n"
},
{
"from": "human",
"value": "'use strict';\nconst symbol = require('../utilities/symbol');\n\nlet experiments = {\n BUILD_INSTRUMENTATION: symbol('build-instrumentation'),\n INSTRUMENTATION: 'inst... | javascript | chosen |
[
{
"from": "system",
"value": "Update response to match swagger spec\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst url2Domain = require('./ext/url2domain');\nconst credibleSources = require('./data/credible');\nconst notCredibleSources = require('./data/notCredible');\n\nmodule.export... | javascript | chosen |
[
{
"from": "system",
"value": "Use test helpers in EnumValuesHaveDescriptions tests\n"
},
{
"from": "human",
"value": "import assert from 'assert';\nimport { parse } from 'graphql';\nimport { visit, visitInParallel } from 'graphql/language/visitor';\nimport { validate } from 'graphql/validation';... | javascript | chosen |
[
{
"from": "system",
"value": "Upgrade ecmascript-containers to the latest NPM version.\n\nThe salient difference is that this version reuses existing Map and Set\nconstructors, if any are found.\n"
},
{
"from": "human",
"value": "Package.describe({\n name: \"ecmascript-containers\",\n version:... | javascript | chosen |
[
{
"from": "system",
"value": "Fix DOM error for File input type\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nimport {\n FieldContainer,\n FieldLabel,\n FieldInput,\n} from '@keystonejs/ui/src/primitives/fields';\n// TODO: Upload component?\nimport { Input } ... | javascript | chosen |
[
{
"from": "system",
"value": "Update name of root to currentRoot\n"
},
{
"from": "human",
"value": "import { UPDATE_ROOT } from '../actions/update_root_action';\n\n\nconst intialState = {\n currentRoot: '',\n};\n\nconst root = (state = intialState, action) => {\n switch (action.type) {\n ca... | javascript | chosen |
[
{
"from": "system",
"value": "Make RegExps with an empty character set (`[]`) invalid\n"
},
{
"from": "human",
"value": "import TextFieldWithButton from '../text-field-with-button';\nimport NotificationHandler from '../../mixins/notification-handler';\n\nexport default TextFieldWithButton.extend... | javascript | chosen |
[
{
"from": "system",
"value": "Create all the subroutes and pass logOut to the DashNav\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { connect } from 'react-redux';\n// Components\nimport { Route, Redirect } from 'react-router';\nimport DashNav from '../components/dashboar... | javascript | chosen |
[
{
"from": "system",
"value": "Use builder index as key for component instances\n"
},
{
"from": "human",
"value": "import * as React from \"react\";\n\n/**\n * Component used as an indicator for build status.\n * Statuses are differentiated by alternative\n * styling rules.\n * @param props.statu... | javascript | chosen |
[
{
"from": "system",
"value": "Use tilde, not backtick, for logging.\n"
},
{
"from": "human",
"value": "!function(seine, exports) {\n 'use strict';\n\n var Component = seine.Component,\n keyboard = demo.keyboard;\n\n var PositionLogger = Component.extend();\n\n PositionLogger.prototype.u... | javascript | chosen |
[
{
"from": "system",
"value": "Update scoring to match simplified Web of Trust response\n"
},
{
"from": "human",
"value": "'use strict';\n\n/** @method score\n * @description Calculate credibility score\n * @param {Object} criteria - Object containing score criteria\n */\nfunction score(criteria)... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary hooks for styles\n"
},
{
"from": "human",
"value": "const React = require('react');\nconst { ScrollView, Text, Image } = require('react-native');\n\nconst gStyles = require('styles'); // global styles\nconst lStyles = require('./styles'); // local... | javascript | chosen |
[
{
"from": "system",
"value": "Add second parameter to issueStrategizer call\n"
},
{
"from": "human",
"value": "/* eslint no-process-exit:0 */\nimport fsp from 'fs-promise';\nimport _ from 'lodash';\nimport * as issueHandler from './issue-handler';\nimport {findProjectKey} from './jira-operations... | javascript | chosen |
[
{
"from": "system",
"value": "Make the example to work with Safari\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { storiesOf } from '@kadira/storybook';\nimport moment from 'moment';\nimport {\n withKnobs,\n number,\n object,\n boolean,\n text,\n select,\n date\n} ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove tagName and class from PillChoiceView\n"
},
{
"from": "human",
"value": "// qgr-cntrl-pills\n\ndefine(function (require) {\n var $ = require('jquery');\n var _ = require('underscore');\n var Backbone = require('backbone');\n var Handlebars = require('hand... | javascript | chosen |
[
{
"from": "system",
"value": "Fix onSubmit() method in forgot password form."
},
{
"from": "human",
"value": "module.exports = Zeppelin.FormView.extend({\n name: 'ForgotPasswordForm',\n\n el: 'form.forgot-password__form',\n\n template: require('templates/forgot-password-form'),\n\n bindings:... | javascript | chosen |
[
{
"from": "system",
"value": "Add endAsync function as listener for end of queue\n"
},
{
"from": "human",
"value": "import AsyncQueue from '../utils/asyncQueueStructures';\n\nlet asyncQueue = new AsyncQueue();\n\nconst endAsync = () => {\n return { type: 'ASYNC_INACTIVE' };\n};\n\nconst callAsy... | javascript | chosen |
[
{
"from": "system",
"value": "Change the way the configuration is accessed\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\n\nexport default DS.RESTAdapter.extend({\n host: window.HexoPluginSite.APP.apiHost,\n namespace: '/v1'\n});\n"
},
{
"from": "gpt",
"value": "i... | javascript | chosen |
[
{
"from": "system",
"value": "FIX : Header et Footer non déclaré\n\n"
},
{
"from": "human",
"value": "/**\n *\n * App\n *\n * This component is the skeleton around the actual pages, and should only\n * contain code that should be seen on all pages. (e.g. navigation bar)\n */\n\nimport React from... | javascript | chosen |
[
{
"from": "system",
"value": "Implement state variable to indicate if element 'open'\n"
},
{
"from": "human",
"value": "import * as React from \"react\";\nimport {getFields} from \"./utils/getFields.js\";\n\n/**\n * Component used to render Build Information.\n *\n * @param {*} props input prope... | javascript | chosen |
[
{
"from": "system",
"value": "Allow init command to bypass.\n"
},
{
"from": "human",
"value": "// @todo adapt this to a file checker on an adapter folder.\nvar builtIn = ['S3'];\n\nvar AdapterInjector = function(config) {\n this.config = config;\n};\n\nAdapterInjector.prototype.inject = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused references from external submission model\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport DS from 'ember-data';\nimport Score from 'code-test-bot-app/models/score';\nimport Submission from 'code-test-bot-app/models/submission';\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Format bundled schema with lispy-json\n"
},
{
"from": "human",
"value": "require('json-schema-ref-parser').bundle(\n require('./schema.json'),\n function(error, schema) {\n if (error) {\n console.error(error)\n process.exit(1) }\n else {\n con... | javascript | chosen |
[
{
"from": "system",
"value": "Hide log chart when empty\n"
},
{
"from": "human",
"value": "/* global google Gabra $ */\n// $(document).ready(function () {\n google.load('visualization', '1.0', {'packages': ['corechart']})\n google.setOnLoadCallback(function () {\n $.ajax({\n method: 'G... | javascript | chosen |
[
{
"from": "system",
"value": "Use strict condition in action list watcher (SAAS-1361)\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function() {\n angular.module('ncsaas')\n .directive('actionListResource', ['actionUtilsService', actionListResource]);\n\n function actionListResource(... | javascript | chosen |
[
{
"from": "system",
"value": "Add menu to navi to create hamburger menu\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types'; \nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Typ... | javascript | chosen |
[
{
"from": "system",
"value": "Use === insteadOf == even for strings\n"
},
{
"from": "human",
"value": "/*global TodoMVC */\n'use strict';\n\nTodoMVC.module('Todos', function (Todos, App, Backbone) {\n\t// Todo Model\n\t// ----------\n\tTodos.Todo = Backbone.Model.extend({\n\t\tdefaults: {\n\t\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Make it easier to repro tests in the wild\n"
},
{
"from": "human",
"value": ";(function(){\n\n var __filename = (function(){\n var scripts = document.getElementsByTagName('script');\n var a = document.createElement('a');\n a.href = scripts[scripts.length-1... | javascript | chosen |
[
{
"from": "system",
"value": "Add some additional fudge factor to the phantomjs callback\n"
},
{
"from": "human",
"value": "var PubSub = require('pubsub-js');\n\nvar events = {\n fonts: false,\n leaflet: false\n};\n\n\n// Wait for webfonts to load\nPubSub.subscribe('webfonts.active', function(... | javascript | chosen |
[
{
"from": "system",
"value": "Update Pizza server to use correct common API\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar common = require('../../../server/common');\n\n/**\n * Create an express server\n *\n * @param {Object} options\n * - port port to listen to. Defaults to 0.\n * ... | javascript | chosen |
[
{
"from": "system",
"value": "Add toggle functionality to auth btns\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n \t\n \t$(\".login_btn\").on(\"click\", function(event){\n \t\t\tevent.preventDefault();\n \t\t\tconsole.log(\"YOU CLICKED\")\n \t});\n\n \t$(\".signup_btn\").on... | javascript | chosen |
[
{
"from": "system",
"value": "Implement Disable REST Methods Except Function\n"
},
{
"from": "human",
"value": "var columnify = require('columnify')\nvar columnsOptins = {\n showHeaders: false,\n minWidth: 35,\n columnSplitter: ' | '\n}\n\nfunction reportDisabledMethod(model, methods) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add player name from props\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react';\nimport {Table} from 'react-bootstrap';\nimport {connect} from 'react-redux';\nimport _ from 'lodash';\n\nclass UsersTable extends Component {\n\n render() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove \"Tuvero Basic\" maxteams restriction\n"
},
{
"from": "human",
"value": "/**\n * Basic presets: swiss direct matchings, round similar to chess, and ko\n * with a matched cadrage. Simple rankings\n *\n * @return Presets\n * @author Erik E. Lorenz <erik@tuvero.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the toolbar once a color has been picked.\n"
},
{
"from": "human",
"value": "L.ColorPicker = L.ToolbarHandler.extend({\n\toptions: {\n\t\ttoolbarIcon: { className: 'leaflet-color-swatch' }\n\t},\n\n\tinitialize: function(map, shape, options) {\n\t\tthis._shap... | javascript | chosen |
[
{
"from": "system",
"value": "Fix some texts (again lol)\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nconst WelcomeMessage = () => (\n <div className=\"welcome-message-container\">\n <div className=\"logo\">\n <img src=\"images/logo.svg\" />\n </div>\n <div clas... | javascript | chosen |
[
{
"from": "system",
"value": "Set debugger webpack test config to development mode\n"
},
{
"from": "human",
"value": "const path = require(\"path\");\nconst webpack = require(\"webpack\");\nconst merge = require(\"webpack-merge\");\nconst WriteFilePlugin = require(\"write-file-webpack-plugin\");... | javascript | chosen |
[
{
"from": "system",
"value": "Create a factory method for the MyTitle component.\n"
},
{
"from": "human",
"value": "\nvar MyTitle = React.createClass({\n render: function () {\n return (\n React.DOM.div(null,\n React.DOM.h1(null, 'check out this component!'))\n )\n }\n})\n\nv... | javascript | chosen |
[
{
"from": "system",
"value": "Add $event to onClicked function so it doesn't go to form\n"
},
{
"from": "human",
"value": "ManageIQ.angular.app.component('miqButton', {\n bindings: {\n name: '@',\n enabled: '<',\n enabledTitle: '@?',\n disabledTitle: '@?',\n primary: '<?',\n o... | javascript | chosen |
[
{
"from": "system",
"value": "Use a hash to keep track of selected items.\n"
},
{
"from": "human",
"value": "function MaterialsFilePicker(callback) {\n this.doneCallback = callback;\n this.selectedMaterials = [];\n \n var courseId = gon.course;\n var that = this;\n $.ajax({\n url: '/cou... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure to load essentials to bootstrap mongoose connection\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst logger = require('./logging');\n\nconst app = express();\n\nconst server = require('http').Server(app);\nconst routes = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the test commit from Working Copy/Textastic.\n\nIt is so awesome to be able to commit changes from your\niOS device when you're not near a computer.\n"
},
{
"from": "human",
"value": "// Server startup script\n// =====================\n// Responsible for con... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Change reducers to return a new state\n\nThe changes in the comment reducer were not committed befire\n"
},
{
"from": "human",
"value": "import {\n ADD_VOTE_COMMENT,\n CREATE_COMMENT,\n REMOVE_COMMENT,\n REMOVE_VOTE_COMMENT,\n SET_COMMENTS,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix browser name (one does not simply lowercase :bomb:.\n"
},
{
"from": "human",
"value": "/* globals module */\nmodule.exports = function(grunt) {\n return {\n options: {\n configFile: 'test/karma.conf.js',\n hostname: 'localhost',\n singleRun: t... | javascript | chosen |
[
{
"from": "system",
"value": "Allow spaces in template variables\n"
},
{
"from": "human",
"value": "JSONEditor.defaults.templates[\"default\"] = function() {\n return {\n compile: function(template) {\n var matches = template.match(/{{\\s*([a-zA-Z0-9\\-_\\.]+)\\s*}}/g);\n var l = m... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite progress bar test with avoriaz\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\nimport Vue from 'vue-test';\nimport assert from 'assert';\nimport progressBar from '../src/views/progress-bar';\n\nconst ProgressBarComponent = Vue.extend(progressBar);... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.