conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add themes to default config\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = {\n\n twitter: {\n consumer_key: \"\",\n consumer_secret: \"\",\n access_token: \"\",\n access_token_secret: \"\"\n },\n\n timezone: \"Asia/Tokyo\",\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add previewImage on Common js\n"
},
{
"from": "human",
"value": "function successMessage(message) {\n new PNotify({\n title: 'Success!!',\n text: message,\n type: 'success'\n });\n}\n\nfunction errorMessage(message) {\n new PNotify({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change mongo URI environment var\n"
},
{
"from": "human",
"value": "// config/initializers/database.js\n\nvar config = require('nconf');\nvar mongoose = require('mongoose');\n\nmodule.exports = function(cb) {\n 'use strict';\n // Initialize the component here then... | javascript | chosen |
[
{
"from": "system",
"value": "Check if beta flag is activated\n"
},
{
"from": "human",
"value": "/**\n * Validate if the application is in beta\n * and the user has the access token to\n * view the beta version.\n *\n * If not authorized session, then display coming soon\n */\nconst env = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify with async and await\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { execFile } = require('child_process');\n\nconst exec = (...args) => {\n return new Promise((resolve, reject) => {\n execFile(...args, (err, stdout) => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Edit file to include async actions instead of sync actions\n\n*/ reducers now resolve promises with new middleware\n"
},
{
"from": "human",
"value": "import { createAction } from 'redux-actions';\nimport backend from '../service/backend.js';\n\n\nexport default crea... | javascript | chosen |
[
{
"from": "system",
"value": "Fix text for new component\n"
},
{
"from": "human",
"value": "import HomeRoute from 'routes/Home'\n\ndescribe('(Route) Home', () => {\n let _component\n\n beforeEach(() => {\n _component = HomeRoute.component()\n })\n\n it('Should return a route configuration... | javascript | chosen |
[
{
"from": "system",
"value": "Set the state of the component and output it to the screen\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\n\n//class-based component (ES6)\nclass SearchBar extends Component {\n constructor(props) {\n super(props);\n\n this.state ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix default value for monitor record\n"
},
{
"from": "human",
"value": "const {Record} = require('immutable');\n\nconst MonitorRecord = Record({\n id: null, // Block Id\n /** Present only if the monitor is sprite-specific, such as x position */\n spriteName... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test: JSX pragma is deprecated in React 0.12\n"
},
{
"from": "human",
"value": "/** @jsx React.DOM */\n'use strict'\n\nvar React = require('react-tools/build/modules/React');\n\nvar statusForm = React.createClass({\n render: function(){\n return <form class... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up before running this test.\n"
},
{
"from": "human",
"value": "'use strict';\nrequire('../helpers');\nconst assert = require('assert');\nconst Ironium = require('../..');\n\n\ndescribe('Queue with delay', function() {\n\n const captureQueue = Ironium.queue(... | javascript | chosen |
[
{
"from": "system",
"value": "Update FF icon to correct size\n"
},
{
"from": "human",
"value": "var buttons = require('sdk/ui/button/action');\nvar panels = require(\"sdk/panel\");\nvar self = require(\"sdk/self\");\nconst {Cu} = require(\"chrome\");\n\nCu.import(self.data.url('freedom-for-firef... | javascript | chosen |
[
{
"from": "system",
"value": "Fix crash when camera doesn't have size\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = function(ecs, data) { // eslint-disable-line no-unused-vars\n\tecs.addEach(function(entity, context) { // eslint-disable-line no-unused-vars\n\t\tvar posit... | javascript | chosen |
[
{
"from": "system",
"value": "Use the value accessor as the binding context for the template\n"
},
{
"from": "human",
"value": "// Expose plugin as an AMD module if AMD loader is present:\n(function (factory) {\n 'use strict';\n\n if (typeof define === 'function' && define.amd) {\n define([... | javascript | chosen |
[
{
"from": "system",
"value": "Implement reduce and fix map.\n"
},
{
"from": "human",
"value": "(function (context) {\n var λ = {};\n\n λ.map = function (coll, func) {\n var output = [];\n for (var index in coll) {\n output.push(func(coll[index]));\n }\n return output;\n };\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add patrol behavior with a simple yoyo tween\n"
},
{
"from": "human",
"value": "export class Enemy extends Phaser.Sprite {\n constructor(game, x, y) {\n super(game, x, y, 'enemy');\n this.anchor.setTo(0.5);\n this.game.add.existing(this);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove test alert on page load\n"
},
{
"from": "human",
"value": "\r\n$(document).ready(function () {\r\n\talert('page loaded.');\r\n\tmixpanel.track(\"Page loaded\");\r\n\t\r\n\t$(\"#my_button\").click(function() {\r\n // This sends us an event every time a user... | javascript | chosen |
[
{
"from": "system",
"value": "Add classes to identify Upload Field interface actions.\n"
},
{
"from": "human",
"value": "jQuery(document).ready(function() {\n\tjQuery('.field-upload').each(function() {\n\t\tvar field = jQuery(this);\n\t\tvar file = field.find('.file');\n\t\tvar upload = field.fi... | javascript | chosen |
[
{
"from": "system",
"value": "BB-701: Create editor for input=radio, apply it in select-cell\n - CR fix\n"
},
{
"from": "human",
"value": "/*global define*/\ndefine([\n 'underscore',\n 'backgrid'\n], function (_, Backgrid) {\n 'use strict';\n\n var SelectCellRadioEditor;\n\n Selec... | javascript | chosen |
[
{
"from": "system",
"value": "Update strapi-generate-new boostrapi function template\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * An asynchronous bootstrap function that runs before\n * your application gets started.\n *\n * This gives you an opportunity to set up your data model,... | javascript | chosen |
[
{
"from": "system",
"value": "Change wording for 0 and 1 day\n"
},
{
"from": "human",
"value": "export default date => {\n const diff = new Date(date).getTime() - Date.now();\n const days = Math.floor(diff / 86400 / 1000);\n\n return `${days} days`;\n};\n"
},
{
"from": "gpt",
"val... | javascript | chosen |
[
{
"from": "system",
"value": "Use toBe and not.toBe matcher. Look spec as a function\n"
},
{
"from": "human",
"value": "describe(\"My demo suite\", function() {\n\tit(\"contains spec with my demo expectation\", function() {\n\t\texpect(1).toBe(1);\n\t});\n});\n\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor code to use arrow functions\n"
},
{
"from": "human",
"value": "function createSleepPromise(timeout) {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n}\n\nfunction sleep(timeout) {\n // Pass value through, if ... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out validation for now\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar BridgeObservable = require('vigour-native/lib/bridge/BridgeObservable')\nvar Plugin = require('vigour-native/lib/bridge/Plugin')\nvar name = require('../package.json').name\n\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Update New Feature form to use the Form Helper. Add validations and alerts."
},
{
"from": "human",
"value": "angular\n .module('app')\n .controller('featureNewController', [\n '$scope',\n '$location',\n '$routeParams',\n 'userService',\n 'featureSer... | javascript | chosen |
[
{
"from": "system",
"value": "Move functions out of route endpoint.\n"
},
{
"from": "human",
"value": "var async = require('async');\nvar User = require('../models/user');\nvar BadgeInstance = require('../models/badge-instance');\n\nexports.showFlushDbForm = function (req, res) {\n return res.r... | javascript | chosen |
[
{
"from": "system",
"value": "Support arrays and array-like objects\n"
},
{
"from": "human",
"value": ";(function(root) {\n 'use strict';\n\n var blankshield = function(ele) {\n addEvent(ele, 'click', function(e) {\n var href, usedModifier, child;\n\n href = e.target.getAttribute(... | javascript | chosen |
[
{
"from": "system",
"value": "Remove csslint fron the grunt build task\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n sass: {\n dist: {\n files: {\n 'css/application.css': '.... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing i18n and use bootstrap-react\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Link } from 'react-router';\nimport gamepad from '../dependencies/img/gamepad.png';\nimport keyboard from '../dependencies/img/keyboard.pn... | javascript | chosen |
[
{
"from": "system",
"value": "Fix anonymous upload challenge verification\n"
},
{
"from": "human",
"value": "/* jslint node: true */\n'use strict'\n\nvar utils = require('../lib/utils')\nvar challenges = require('../data/datacache').challenges\n\nmodule.exports = function (sequelize, DataTypes) ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong value in cookie opt change event\n"
},
{
"from": "human",
"value": "var $ = require('jQuery');\nvar componentEvent = require('kwf/component-event');\nvar cookies = require('js-cookie');\n\nvar onOptChangedCb = [];\nvar api = {\n getDefaultOpt: function(... | javascript | chosen |
[
{
"from": "system",
"value": "Change incorrect comment for error handler\n"
},
{
"from": "human",
"value": "var config = require(\"./config.js\");\n\nvar express = require('express');\nvar http = require('http');\nvar path = require('path');\n\nvar app = express();\nvar server = http.createServe... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing --gitignore --npmignore argument keys\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\nvar log = require('verbalize');\nvar argv = require('minimist')(process.argv.slice(2));... | javascript | chosen |
[
{
"from": "system",
"value": "Fix server program to show game result.\n"
},
{
"from": "human",
"value": "var Runner = require('./runner').Runner;\n\nmodule.exports = function (ws) {\n\n /*var id = setInterval(function() {\n ws.send(JSON.stringify(process.memoryUsage()), function() { })... | javascript | chosen |
[
{
"from": "system",
"value": "Fix GH-115 Cannot select documents with checkboxes on DNN 9\n"
},
{
"from": "human",
"value": "function r7d_selectDocument(documentId, checked, value) {\n var values = JSON.parse(value);\n var index = values.indexOf(documentId);\n if (checked) {\n if... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JSX parsing with Babel\n"
},
{
"from": "human",
"value": "var HtmlWebpackPlugin = require('html-webpack-plugin');\nvar HTMLWebpackPluginConfig = new HtmlWebpackPlugin({\n template: __dirname + '/app/index.html',\n filename: 'index.html',\n inject: 'body'\n});... | javascript | chosen |
[
{
"from": "system",
"value": "Fix resolution of submit function\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assign = require('es5-ext/object/assign')\n , promisify = require('deferred').promisify\n , bcrypt = require('bcrypt')\n , dbjsCreate = require('man... | javascript | chosen |
[
{
"from": "system",
"value": "Fix webpack context path on windows\n"
},
{
"from": "human",
"value": "/* global __dirname */\n\n'use strict';\n\nvar webpack = require('webpack');\n\nvar commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js');\n\nmodule.exports = {\n context: __dirna... | javascript | chosen |
[
{
"from": "system",
"value": "Fix type cache getting result on func calls\n"
},
{
"from": "human",
"value": "import { GraphQLObjectType, GraphQLID } from 'graphql';\nimport buildAttributes from './buildAttributes';\nimport buildRelationships from './buildRelationships';\nimport titleizeType from... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for Chrome filepath C:\\fakepath\\\n"
},
{
"from": "human",
"value": "/**\n\n*/\n(function($) {\n \n $.fn.inputFileText = function(userOptions) {\n var MARKER_ATTRIBUTE = 'data-inputFileText';\n\n if(this.attr(MARKER_ATTRIBUTE) === 'true') {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make export button only export jpegs\n"
},
{
"from": "human",
"value": "export default {\n standard: {\n credits: { enabled: false },\n chart: {\n spacingBottom: 20,\n style: {\n fontFamily: \"'proxima', 'Helvetica', sans-serif' \",\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicate call to storeAutocomplete\n\nThis was causing javascript errors. storeAutocomplete also doesn't work\nuntil the store rule partial is run, since Spree.routes.store_search\nwon't be set.\n"
},
{
"from": "human",
"value": "$.fn.storeAutocomplete = fun... | javascript | chosen |
[
{
"from": "system",
"value": "Remove other HTML pages from precaching\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nconst BUILD_DIR = 'build';\n\nmodule.exports = {\n globDirectory: BUILD_DIR,\n globPatterns: ['/', '**/*.{html,js,css,woff2,webmanifest}'],\n swSrc: path.j... | javascript | chosen |
[
{
"from": "system",
"value": "Handle concurrent calls to the same channel in ipc helpers\n"
},
{
"from": "human",
"value": "const Disposable = require('event-kit').Disposable\nlet ipcRenderer = null\nlet ipcMain = null\nlet BrowserWindow = null\n\nexports.on = function (emitter, eventName, callb... | javascript | chosen |
[
{
"from": "system",
"value": "Change order of initial app render and router activation.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar View = require(\"./view\");\nvar Router = require(\"./router\");\nvar util = require(\"substance-util\");\nvar _ = require(\"underscore\");\n\n// Subs... | javascript | chosen |
[
{
"from": "system",
"value": "Remove braces for simple return\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport { Sticky } from 'react-sticky'\n\nimport styles from './Warning.scss'\n\nclass Warning extends React.PureComponent {\n static pr... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Use data attribute instead of val()\"\n\nThis reverts commit 680debc53973355b553155bdfae857907af0a259.\n\nRef #471\n"
},
{
"from": "human",
"value": "var EDSN_THRESHOLD = 30;\n\nvar EdsnSwitch = (function(){\n var editing;\n var validBaseLoads = /^(base_l... | javascript | chosen |
[
{
"from": "system",
"value": "Add success and failure events\n"
},
{
"from": "human",
"value": "var debug = require('debug')('navigateAction');\n\nmodule.exports = function (context, payload, done) {\n if (!context.router || !context.router.getRoute) {\n debug('no router available for ... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude AccountsTemplates routes in ensureSignedIn\n"
},
{
"from": "human",
"value": "Router.configure({\n layoutTemplate: 'mainLayout'\n});\n\n/*\n Actions\n*/\n\nvar requiresUserLogin = function () {\n if (!Meteor.user()) {\n this.render('login');\n } else ... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Reduce stability threshold in watcher for faster HMR\n"
},
{
"from": "human",
"value": "// @flow\n\nimport chokidar from 'chokidar'\n\nexport default class AdapterChokdiar {\n handle: Object\n rootDirectory: string\n constructor(rootDirectory: string, onCha... | javascript | chosen |
[
{
"from": "system",
"value": "Update expert store card tests to use enzyme.\n"
},
{
"from": "human",
"value": "/* Copyright (C) 2018 Canonical Ltd. */\n'use strict';\n\nconst React = require('react');\n\nconst EXPERTS = require('../expert-card/experts');\nconst ExpertCard = require('../expert-ca... | javascript | chosen |
[
{
"from": "system",
"value": "Return MongoDB data for class and professor requests.\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Class = mongoose.model('Class');\n\nvar sendJSONresponse = function(res, status, content) {\n res.status(status);\n res.json(content);... | javascript | chosen |
[
{
"from": "system",
"value": "Use eq function to ge element by index.\n"
},
{
"from": "human",
"value": "import cheerio from 'cheerio';\nimport moment from 'moment-timezone';\n\nconst originalTimeZone = 'Europe/Kiev';\nconst skiLiftDateFormat = 'DD.MM.YYYY HH:mm:ss';\n\nexport default function p... | javascript | chosen |
[
{
"from": "system",
"value": "Set error message at the bottom, if input field is filled.\n"
},
{
"from": "human",
"value": "/**\n * Created by elisahilprecht on 09/04/15.\n */\n(function(){\n var clickOnErrorMessage = function(e) {\n e.toElement.setAttribute('class','help-inline display-none... | javascript | chosen |
[
{
"from": "system",
"value": "[fix] Fix post request to send status 201\n"
},
{
"from": "human",
"value": "var dbHelpers = require('../database_queries/database_queries.js');\n\nmodule.exports = function(app){\n\tapp.post('/users', function(req, res){\n\t\tvar packet = req.body;\n\t\tif(packet.u... | javascript | chosen |
[
{
"from": "system",
"value": "Store timer as variable instead of state\n"
},
{
"from": "human",
"value": "import React, { Children, Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport LoadingView from '../loading-view/LoadingView';\nimport { appStateSelector } fr... | javascript | chosen |
[
{
"from": "system",
"value": "Add some tests for stripStyle()\n\nWhile fixing #180, I noticed that stripStyle() was untested, so I\ndecided to add a couple of basic tests here.\n"
},
{
"from": "human",
"value": "import stripStyle from '../src/stripStyle';\n\ndescribe('stripStyle', () => {\n it(... | javascript | chosen |
[
{
"from": "system",
"value": "Add url to meal index\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nexport default (props) => (\n <div>\n {props.name}\n </div>\n)"
},
{
"from": "gpt",
"value": "import React from 'react'\n\nexport default props =>\n <div>\n <a... | javascript | chosen |
[
{
"from": "system",
"value": "Change adapter set to CHATTILE\n"
},
{
"from": "human",
"value": "/*\n Copyright 2013 Weswit Srl\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of t... | javascript | chosen |
[
{
"from": "system",
"value": "Change appName to appId since appName no longer works\n\nI used this example only to find out a few hours later the example code is outdated"
},
{
"from": "human",
"value": "/**\n * example ebay API request to Trading:GetOrders\n */\n\nvar ebay = require('../index.j... | javascript | chosen |
[
{
"from": "system",
"value": "Update lline 15 and 21\n\nIt's about the dummy string replacement."
},
{
"from": "human",
"value": "function r_d(a) {\n \"use strict\";\n var b = a.slice(), //copy array\n i = 0,\n k = 0,\n length = b.length,\n j,\n buffer = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add cwd to docker-compose to make it actually work"
},
{
"from": "human",
"value": "var spawn = require('child_process').spawn;\n\nfunction Runner() {\n}\n\nRunner.prototype.init = function(bosco, next) {\n this.bosco = bosco;\n next();\n};\n\nRunner.prototype.lis... | javascript | chosen |
[
{
"from": "system",
"value": "Check to make sure haunt hasn't started before starting it.\n"
},
{
"from": "human",
"value": "/**\n* Event.js\n*\n* @description :: TODO: You might write a short summary of how this model works and what it represents here.\n* @docs :: http://sailsjs.org/#!do... | javascript | chosen |
[
{
"from": "system",
"value": "Add route to retrieve a single test resource\n\nAlso make API a bit more robust\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst pg = require('pg');\n\nconst router = express.Router();\n\n// SSL must be used to connect to the DB\nconst D... | javascript | chosen |
[
{
"from": "system",
"value": "Make every plugin receive a bound version of the lifecycle\n"
},
{
"from": "human",
"value": "const Hooter = require('hooter')\n\n\nconst EVENTS = [\n ['init', 'sync'],\n ['start', 'sync'],\n ['execute', 'async'],\n ['execute.batch', 'async'],\n ['execute.one',... | javascript | chosen |
[
{
"from": "system",
"value": "Test that Node is a function before using instanceof on it\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2013-2014 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with... | javascript | chosen |
[
{
"from": "system",
"value": "Remove outdated comment in FastFillStyle\n"
},
{
"from": "human",
"value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.... | javascript | chosen |
[
{
"from": "system",
"value": "Check `o.name` docstring (\"doc:\" was omitted from comment test)\n"
},
{
"from": "human",
"value": "Date; //doc: Creates JavaScript Date instances which let you work with dates and times.\nnew Date; //doc: Creates JavaScript Date instances which let you work with d... | javascript | chosen |
[
{
"from": "system",
"value": "Insert missing line break at end-of-file\n"
},
{
"from": "human",
"value": "/*global define:false */\ndefine([\"underscore\", \"backbone\"], function (_, Backbone) {\n \"use strict\";\n\n var views = {\n\n BookListItem: Backbone.View.extend({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix options argument in regex parser\n"
},
{
"from": "human",
"value": "var main = require('./main');\nvar extend = require('extend');\nvar defaultOptions = {\n\tdefinitions: false,\n quotes: '\"'\n};\n\nmodule.exports = function (data, options) {\n var regexOpti... | javascript | chosen |
[
{
"from": "system",
"value": "Increase timeout to see if it fixes invalid packet sequence in Travis\n"
},
{
"from": "human",
"value": "var assert = require('assert'),\n Lapidus = require('../index.js'),\n spawnSync = require('child_process').spawnSync,\n fs = require('fs');\n\ndescribe(... | javascript | chosen |
[
{
"from": "system",
"value": "Remove IIFE and app module path.\n"
},
{
"from": "human",
"value": "(function(window, document, undefined) {\n \"use strict\";\n\n require.config({\n paths: {\n // Libraries\n \"jquery\": \"../../libraries/jquery/jquery\",\n \"hljs\": \"../../lib... | javascript | chosen |
[
{
"from": "system",
"value": "Make queenling.destroy non-writable, non-enumerable, non-configurable"
},
{
"from": "human",
"value": "if (typeof define !== 'function') { var define = require('amdefine')(module); }\ndefine(['./deferred', './tools'], function(Deferred, tools) {\n\n return {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Sahasrahla's nicknames to the 404 page\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Image from './Image';\n\nimport { Link } from 'react-router';\n\nconst NotFoundPage = () => {\n const locations = [\n 'Sahasrahla\\'s pocket',\n '... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for configured tagName to HTMLMessage\n"
},
{
"from": "human",
"value": "/* global React */\n/* jslint esnext:true */\n\nimport escape from '../escape';\nimport IntlMixin from '../mixin';\n\nfunction escapeProps(props) {\n return Object.keys(props).re... | javascript | chosen |
[
{
"from": "system",
"value": "Add a service to get the posts\n"
},
{
"from": "human",
"value": "// we don't need to use a variable\n// or the from keyword when importing a css/styl file\n// thanks the the styles loader it gets added as a\n// <style> tag in the head by default but can be changed\... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify action type generation code\n"
},
{
"from": "human",
"value": "// This function generates the five statuses from a single CRUD action.\n// For instance, you'd probably pass \"CREATE\", \"READ\", \"UPDATE\", or \"DELETE\"\n// as `crudAction`.\nconst mapConst... | javascript | chosen |
[
{
"from": "system",
"value": "Fix rule parser to allow certain rules\n\nSpecifically, rules that have control characters as their \"variable\"\n(thse should always be \"constant\" rules). An example is (+ -> +).\n"
},
{
"from": "human",
"value": "// L-System Rule Parser\nfunction RuleParser(str)... | javascript | chosen |
[
{
"from": "system",
"value": "Use standard sms: format rather than MozActivity for SMS brick.\n"
},
{
"from": "human",
"value": "module.exports = {\n className: 'sms',\n template: require('./index.html'),\n data: {\n name: 'SMS',\n icon: '/images/blocks_sms.png',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Rename delay to lowDelay as original name conflicts with Prototype\n"
},
{
"from": "human",
"value": "/*\n==================================================================================================\n Lowland - JavaScript low level functions\n Copyright (C) ... | javascript | chosen |
[
{
"from": "system",
"value": "Change language to en_US for patient view API\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\nvar pipe = require('../transformers/pipe');\n\nrouter.post('/\\\\$cds-hook', function(req, res, next) {\n\n var con... | javascript | chosen |
[
{
"from": "system",
"value": "Use PORT env variable for compatibility with Heroku\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Initialize express.\nconst config = {};\n\n// Port\nconfig.port = process.env.LISTEN_PORT || 5050;\n\nmodule.exports = config;\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Test that await preserves event order\n"
},
{
"from": "human",
"value": "require('buster').spec.expose();\nvar expect = require('buster').expect;\n\nvar await = require('../lib/combinators/await').await;\nvar observe = require('../lib/combinators/observe').observe;\... | javascript | chosen |
[
{
"from": "system",
"value": "Add Young and Hungry and The 100 to fullTitles search\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003).\n I left this object because it could be useful for other... | javascript | chosen |
[
{
"from": "system",
"value": "Include Firefox for CI testing.\n"
},
{
"from": "human",
"value": "module.exports = function (config) {\n\tvar CI = process.env.CI;\n\n\tconfig.set({\n\t\tbasePath: '..',\n\t\tframeworks: ['mocha', 'chai'],\n\t\tbrowsers: CI ? ['PhantomJS'] : ['Chrome', 'Firefox', '... | javascript | chosen |
[
{
"from": "system",
"value": "Fix CircleCI artifacts env path\n"
},
{
"from": "human",
"value": "const fs = require('fs')\nconst glob = require('glob')\n\nconst outputDirectory = [process.env.CIRCLE_ARTIFACTS, 'snapshots']\n .filter(x => x)\n .join('/')\n\nconst createDir = dir => {\n const s... | javascript | chosen |
[
{
"from": "system",
"value": "Update Slack notifier to use new data format.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar util = require('util');\n\n/**\n * @param {secret} SLACK_WEBHOOK_URL\n * @param {secret} SLACK_CHANNEL_NAME\n */\nmodule.exports = function(ctx, cb) {\n var para... | javascript | chosen |
[
{
"from": "system",
"value": "Add a meta viewport. The app doesn't quite look right on mobile, but at least this paves the way.\n"
},
{
"from": "human",
"value": "\n// Blank the document so the 404 page doesn't show up visibly.\ndocument.documentElement.style.display = 'none';\n\n// Can't use DO... | javascript | chosen |
[
{
"from": "system",
"value": "Increase timeout for Travis test\n"
},
{
"from": "human",
"value": "module.exports = function (config) {\n config.set({\n frameworks: ['browserify', 'mocha'],\n reporters: ['mocha'],\n preprocessors: { 'build/karma.js': ['browserify'] },\n browserify: {... | javascript | chosen |
[
{
"from": "system",
"value": "Add event automation for on prefixes.\n"
},
{
"from": "human",
"value": "function createElement (el) {\n const realNode = document.createElement(el.tagName);\n\n if (el.attributes) {\n for (let a = 0; a < el.attributes.length; a++) {\n const attr = el.attr... | javascript | chosen |
[
{
"from": "system",
"value": "Add onChangeAccount callback and selectedAccount context variable\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types'\n\nclass Web3Provider extends Component {\n render() {\n if (window.web3) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix card image/links that have Æ in the name\n"
},
{
"from": "human",
"value": "app.service(\"cardService\", function() {\n this.getCardUrl = function(name) {\n return \"http://gatherer.wizards.com/Pages/Card/Details.aspx?name=\" + name;\n };\n \n this.getCar... | javascript | chosen |
[
{
"from": "system",
"value": "Throw the error so IE sets the stack property\n"
},
{
"from": "human",
"value": "var test = require('tape')\nvar error = require('../')\n\ntest('message', function(t) {\n t.plan(3)\n var MyError = error('MyError')\n t.equals(MyError().name, 'MyError', 'name shoul... | javascript | chosen |
[
{
"from": "system",
"value": "Fix circleci test config file\n"
},
{
"from": "human",
"value": "module.exports = {\n store_url: 'http://localhost:8080',\n account_user: 'test:tester',\n account_password: 'testing',\n account_name: 'AUTH_test',\n container_name: 'test_container',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve unit tests for passive event support logic\n"
},
{
"from": "human",
"value": "const testsContext = require.context('./specs', true, /\\.spec$/);\ntestsContext.keys().forEach(testsContext);\n\nconst srcContext = require.context('../../src', true, /^\\/(?!inde... | javascript | chosen |
[
{
"from": "system",
"value": "Update tape template so that tape is assigned to a variable of the same name\n"
},
{
"from": "human",
"value": "'use strict';\n\n// MODULES //\n\nvar test = require( 'tape' );\nvar lib = require( './../lib' );\n\n\n// TESTS //\n\ntest( 'main export is a function', f... | javascript | chosen |
[
{
"from": "system",
"value": "Add vi scrolling keys to scrolling key-binding\n"
},
{
"from": "human",
"value": "exports = module.exports = function (UI) {\n\n var setHistoryHeight = function () {\n // Set the history component dynamic height\n UI.components.history.height = UI.screen.heig... | javascript | chosen |
[
{
"from": "system",
"value": "Add icons to item template.\n"
},
{
"from": "human",
"value": "var Templates = {};\n\nTemplates.ItemListingTemplate = _.template('\\\n\t<div class=\"item media\">\\\n\t\t<img class=\"pull-left\" src=\"<%= imageUrl %>\" />\\\n\t\t<div class=\"media-body\">\\\n\t\t\t<... | javascript | chosen |
[
{
"from": "system",
"value": "Store resolved path in path property (don't use separate resolvedPath property)\n"
},
{
"from": "human",
"value": "var ThemingContext = require('./ThemingContext');\nvar lessParser = require('./less-parser');\nvar logger = require('raptor-logging').logger(module);\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove browser history for now\n\n...since it was playing up on github pages\n"
},
{
"from": "human",
"value": "/* @flow */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport createBrowserHistory from 'history/lib/createBrowserHistory';\nimport {... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.