conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Improve eval so third example works again but still evals object defs\n"
},
{
"from": "human",
"value": "define([], function() {\n \"use strict\"\n\n const EvalUtils = {\n \n evalOrError(text) {\n let result\n try {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update API base url in static JS\n"
},
{
"from": "human",
"value": "var API_URL = 'http://127.0.0.1:8000'\n\n$().ready( function(){\n\n var $emailField = $('#email-field')\n var $signupButton = $('#signup-button')\n var $form = $('#signup-form')\n var $e... | javascript | chosen |
[
{
"from": "system",
"value": "Add serializeIRCMsg function to IRC module.\n"
},
{
"from": "human",
"value": "// irc.js\n//\n// Defines helper functions for working with IRC messages in Javascript.\nvar irc = (function(window){\n var my = {};\n\n // The regex used to parse IRC messages. I s... | javascript | chosen |
[
{
"from": "system",
"value": "Use authorization header for authentication\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar request = require(\"request\");\nvar defaultUserAgent = require(\"./user_agent\");\n\nmodule.exports = {\n\n // @param {string} apiToken the Dialog API token\n // @... | javascript | chosen |
[
{
"from": "system",
"value": "Duplicate changes to correct ipv4-prefix format\n"
},
{
"from": "human",
"value": "export const networkMaskMax = 32\nexport const networkMaskMin = 0\n\n/**\n * Convert decimal value to binary representation\n * @param {Number} decimal - decimal value to convert to b... | javascript | chosen |
[
{
"from": "system",
"value": "Change cardinality of the color range\n"
},
{
"from": "human",
"value": "define([\n 'streamhub-map/point',\n 'streamhub-map/views/marker-view',\n 'inherits',\n 'd3',\n 'colorbrewer'\n],\nfunction (Point, MarkerView, inherits, d3, colorbrewer) {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor similar operation(s) per Code Climate\n"
},
{
"from": "human",
"value": "$(window).load(function(){\nvar timerMessage = 'It is time to work: ';\nvar workToggle = true;\nvar minWorked = 0;\nvar minGoofed = 0;\nvar bell = document.createElement('audio');\nbel... | javascript | chosen |
[
{
"from": "system",
"value": "Fix service worker 404 page\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst WorkboxPlugin = require('workbox-webpack-plugin')\n\nconst DIST_DIR = 'dist'\n\nmodule.exports = {\n plugins: [\n new WorkboxPlugin({\n globDirectory: DIST_DI... | javascript | chosen |
[
{
"from": "system",
"value": ":muscle: Define methods in more-readable syntax\n"
},
{
"from": "human",
"value": "// Copyright (c) 2017 The Regents of the University of Michigan.\n// All Rights Reserved. Licensed according to the terms of the Revised\n// BSD License. See LICENSE.txt for details.\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in symbols file name\n\nThe correct file containing the symbols for filellist.js is filelist-symbols, not file-symbols."
},
{
"from": "human",
"value": "\"use strict\";\n\nconst filelistSymbols = require(\"./file-symbols\");\n\nmodule.exports = function (co... | javascript | chosen |
[
{
"from": "system",
"value": "Allow sub-parts in dash and underscore styles to start with a digit\n"
},
{
"from": "human",
"value": "var lodash = require('lodash');\n\nvar formats = {\n lowercase: /^[a-z][a-z\\d]*$/,\n underscore: /^[a-z][a-z\\d]*(_[a-z][a-z\\d]*)*$/,\n dash: /^[a-z][a-... | javascript | chosen |
[
{
"from": "system",
"value": "Speed up polling interval for changes in Tokend.\n"
},
{
"from": "human",
"value": "'use strict';\n\nglobal.Log = new (require('winston').Logger);\nglobal.Config = require('nconf');\n\nConfig.defaults({\n // The S3 Source module uses some Config parameters as defau... | javascript | chosen |
[
{
"from": "system",
"value": "Add a simple test for Map shim.\n"
},
{
"from": "human",
"value": "export var tests = {\n \n};\n"
},
{
"from": "gpt",
"value": "var data = [\n\n [\"foo\", \"bar\"],\n [\"constructor\", \"zootsuit\"],\n [1, {}],\n [NaN, \"hello\"],\n [In... | javascript | chosen |
[
{
"from": "system",
"value": "Set meta descripting for the main page.\n\ncloses #77\n"
},
{
"from": "human",
"value": "import Vue from 'vue'\nimport Router from 'vue-router'\nimport index from '@/components/index'\nimport four from '@/components/four'\n\nVue.use(Router)\n\nexport default new Rou... | javascript | chosen |
[
{
"from": "system",
"value": "Add extra keys to telegram UI\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { FormattedMessage } from 'react-intl'\n\nexport const TelegramDetails = ({ measurement }) => {\n return (\n <div>\n {measurement.test_keys.telegram_tcp_block... | javascript | chosen |
[
{
"from": "system",
"value": "Remove args from the chain to pass tests\n"
},
{
"from": "human",
"value": "import { inject as service } from '@ember/service';\nimport Component from '@ember/component';\n\nexport default class ClassFieldDescription extends Component {\n @service\n legacyModuleMa... | javascript | chosen |
[
{
"from": "system",
"value": "ADD INSTANTIATED ROUTERS TO GLOBAL VARIABLE\n\nIn order to access the Router defined by App.Routers.Router(), it's\nneccesary to add the new instance of the router to the Globals\nvariable App.Globals.Router.\n"
},
{
"from": "human",
"value": "(function() {\n\tnew A... | javascript | chosen |
[
{
"from": "system",
"value": "Allow jsx extension as some people prefer it"
},
{
"from": "human",
"value": "var webpack = require('webpack');\n\nmodule.exports = {\n devtool: 'eval',\n entry: [\n 'webpack-dev-server/client?http://localhost:3000',\n 'webpack/hot/only-dev-server',\n './... | javascript | chosen |
[
{
"from": "system",
"value": "Replace _.pick by _.pickBy to support Lodash 4"
},
{
"from": "human",
"value": "var Sequelize = require('sequelize'),\n _ = Sequelize.Utils._;\n\nmodule.exports = function(target) {\n if (target instanceof Sequelize.Model) {\n // Model\n createHook(target)... | javascript | chosen |
[
{
"from": "system",
"value": "Add yahoo check for all yahoo domains\n"
},
{
"from": "human",
"value": "module.exports = function(email) {\n if (!email) return null\n if ('string' !== typeof email) return null\n var domain\n , username\n\n email = email.toLowerCase()\n email = email.trim(... | javascript | chosen |
[
{
"from": "system",
"value": "Change reference to web token secret environment variable\nRefactor auth controller to return an instance of the authenticated user\n"
},
{
"from": "human",
"value": "var authController = (models, _validate, _h, jwt, co) => {\n var Authenticate = (req, res) => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add override methods for Status\n"
},
{
"from": "human",
"value": "var NodeGit = require(\"../\");\n\nvar Status = NodeGit.Status;\n\nmodule.exports = Status;\n"
},
{
"from": "gpt",
"value": "var NodeGit = require(\"../\");\nvar normalizeOptions = requir... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust the difficulties a bit\n"
},
{
"from": "human",
"value": "module.exports = {\n Env: process.env.NODE_ENV || 'development',\n Permissions: {\n viewPage: 'viewPage'\n },\n boxWidth: 55,\n boxHeight: 30,\n Difficulties: {\n 1: {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Set blocked attribute when account is created\n"
},
{
"from": "human",
"value": "/** facebook.js\n* @file: /config/passport/facebook.js\n* @description: Handles passport authentication for Facebook strategy\n* @parameters: Object(config)\n* @exports: Facebook authen... | javascript | chosen |
[
{
"from": "system",
"value": "Fix API generation run of static part\n"
},
{
"from": "human",
"value": "core.Module(\"unify.core.Statics\", {\n\tannotate: function(Clazz, statics) {\n\t\tvar clsname = (\"\"+Clazz).substring(7);\n\t\tclsname = clsname.substring(0, clsname.length-1);\n\t\tcore.Main... | javascript | chosen |
[
{
"from": "system",
"value": "feat: Add optional form to BiwaError\n"
},
{
"from": "human",
"value": "import Class from \"./class.js\"\nimport * as _ from \"../deps/underscore-1.10.2-esm.js\"\n\n//\n// Errors\n//\n\nconst BiwaError = Class.create({\n initialize: function(msg){\n this.message... | javascript | chosen |
[
{
"from": "system",
"value": "[enh] Fix log on desktop start up, in desktop service\n"
},
{
"from": "human",
"value": "var App, nw;\n\nangular.module('cesium.desktop.services', ['cesium.device.services', 'cesium.settings.services'])\n\n .factory('csDesktop', function($rootScope, Device) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change the source map and minimise the source\n"
},
{
"from": "human",
"value": "/* eslint import/no-extraneous-dependencies: 0 */\n\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n watch: f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove module sinon in test file\n"
},
{
"from": "human",
"value": "const chai = require(\"chai\");\r\nconst CNJokes = require(\"./index.js\");\r\n\r\nconst sinon = require(\"sinon\");\r\n\r\ndescribe(\"get chucknorris joke\", function() {\r\n let sandbox;\r\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix location updates in controller\n"
},
{
"from": "human",
"value": "const mongoose = require('mongoose')\nconst Store = mongoose.model('Store')\n\nexports.addStore = (req, res) =>\n res.render('edit', { title: 'Add Store' })\n\nexports.createStore = async (req, r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the default value of 'positional'\n"
},
{
"from": "human",
"value": "const { assign } = require('../../common')\n\n\nconst OPTION_PROPERTIES = {\n long: {\n type: 'boolean',\n default: true,\n },\n short: {\n type: 'boolean',\n default: true,\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Use gallery only for more than one image\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport ImageGallery from \"react-image-gallery\";\n\nclass ItemGallery extends React.Component {\n constructor(props) {\n super(props);\n this.defineImag... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where chapter wasn't being saved into ref\n"
},
{
"from": "human",
"value": "import Core from './core';\n\n// A search result for a Bible reference search\nclass Reference {\n\n // Build the JSON for a search result\n constructor({name, uid, book, query, v... | javascript | chosen |
[
{
"from": "system",
"value": "Add middleware for react-router-redux navigation\n"
},
{
"from": "human",
"value": "// This file merely configures the store for hot reloading.\n// This boilerplate file is likely to be the same for each project that uses Redux.\n// With Redux, the actual stores are... | javascript | chosen |
[
{
"from": "system",
"value": "Add space at end of files\n"
},
{
"from": "human",
"value": "import * as React from \"react\";\nimport {render} from \"react-dom\";\nimport {App} from \"./App\";\n\n// Render our App Component to element with ID == target\nconst target = 'root';\nrender (\n\t<App na... | javascript | chosen |
[
{
"from": "system",
"value": "Put controller to anonymous function\n"
},
{
"from": "human",
"value": "myApp.controller('CustomersController', ['$scope', function($scope) {\n $scope.sortBy = 'name';\n $scope.reverse = false;\n $scope.customers = [{name:'John', city:'London', joined:'2014-12-02... | javascript | chosen |
[
{
"from": "system",
"value": "Stop videos auto playing in the background.\n"
},
{
"from": "human",
"value": "user_perf(\"privacy.userContext.enabled\", true);\nuser_perf(\"privacy.userContext.ui.enabled\", true);\nuser_pref(\"browser.ctrlTab.previews\", true);\nuser_pref(\"browser.fixup.alternat... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify all teams dt definition [SCI-936]\n"
},
{
"from": "human",
"value": "// Initialize teams DataTable\nfunction initTeamsTable() {\n teamsDatatable = $('#teams-table').DataTable({\n order: [[0, 'asc']],\n dom: 'RBltpi',\n stateSave: true,\n button... | javascript | chosen |
[
{
"from": "system",
"value": "Use the correct UMD pattern"
},
{
"from": "human",
"value": "(function (root, factory) {\n if (typeof define === 'function' && define.amd) define(['exports'], factory);\n else if (typeof exports === 'object') factory(exports);\n else factory(root.Inverse = ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Construct proper URL for org projects\"\n\nThis reverts commit 8748f46ce1e1f93de5c343e3f2d2bcaf3844b4e9.\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { NavLink } from 'react-router-dom'\nimport EditTools from './EditTools'\nimport Pr... | javascript | chosen |
[
{
"from": "system",
"value": "Exclude State component from the propTypes information table\n"
},
{
"from": "human",
"value": "import { configure, addDecorator } from '@storybook/react';\nimport { setDefaults } from '@storybook/addon-info';\nimport { setOptions } from '@storybook/addon-options';\... | javascript | chosen |
[
{
"from": "system",
"value": "Store variables for signal status\n"
},
{
"from": "human",
"value": "/**\n * Get the network speed from zebedee/ping endpoint and output the network health\n **/\n\nfunction networkStatus(ping) {\n if (ping > 0 && ping < 100) {\n $('.icon-status div').css... | javascript | chosen |
[
{
"from": "system",
"value": "Switch logout from GET to POST.\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar passport = require('passport');\n\nvar router = express.Router();\n\n/* GET users listing. */\nrouter.get('/login', function(req, res, next) {\n res.render('lo... | javascript | chosen |
[
{
"from": "system",
"value": "Check for existence of isMounted\n"
},
{
"from": "human",
"value": "var Reflux = require('./index'),\n _ = require('./utils');\n\nmodule.exports = function(listenable,key){\n return {\n getInitialState: function(){\n if (!_.isFunction(listena... | javascript | chosen |
[
{
"from": "system",
"value": "Set secret for creating and verifying jwt\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst jwt = require('jsonwebtoken');\n\nconst auth = (req, res, next) => {\n // Get the token for request\n const token = req.body.token || req.headers['x-access-token'];... | javascript | chosen |
[
{
"from": "system",
"value": "Send 'Click' events rather than 'Clicked Gallery Website'\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict'\n\n $('.partner-profile-contact-email a').click(function (e) {\n analytics.track('Clicked Contact Gallery Via Email', {\n partner_id:... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve test config paths with node.path\n"
},
{
"from": "human",
"value": "module.exports = {\n title: 'Test Styleguide',\n overviewPath: 'test/projects/scss-project/source/test_overview.md',\n appRoot: '/my-styleguide-book',\n extraHead: [\n '<link rel=\"st... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for disabled localstorage\n"
},
{
"from": "human",
"value": "var assert = require('chai').assert;\nvar sinon = require('sinon');\nvar localStorage = require('../../store/localStorage');\n\ndescribe(\"storage/localStorage()\", function() {\n var mockLocal... | javascript | chosen |
[
{
"from": "system",
"value": "Update headers to allow file access origin\n"
},
{
"from": "human",
"value": "var exec = require('child_process').exec;\nvar express = require('express');\nvar fs = require('fs');\nvar socket = require('./socket').socket;\n\nvar serve = function () {\n exec('mkdir ... | javascript | chosen |
[
{
"from": "system",
"value": "Check that passwords match in frontend\n"
},
{
"from": "human",
"value": "'use strict';\n\ndefine(['ChoPidoTurnos', 'services/usersService'], function(ChoPidoTurnos) {\n ChoPidoTurnos.controller('RecoverPasswordCtrl', ['$stateParams', 'usersService', '$state', func... | javascript | chosen |
[
{
"from": "system",
"value": "Remove DataStore from BEST global object\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar DataStore = require('./data-store/data-store');\nvar Messenger = require('./messenger/messenger');\nvar Deployer = require('./deploy/deployer');\nvar helpers = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Add theme color meta tags for mobile browsers & IE9"
},
{
"from": "human",
"value": "var webpack = require(\"webpack\");\n\nmodule.exports = {\n resolve: true,\n html: {\n template: \"./src/templates/index.html\",\n title: \"Kakimasu\",\n baseURL: \"https... | javascript | chosen |
[
{
"from": "system",
"value": "Use robot.send instead of msg.send\n"
},
{
"from": "human",
"value": "// Description:\n// PM's you as a Service\n//\n// Dependencies:\n// None\n//\n// Configuration:\n// None\n//\n// Commands:\n// hubot pm me\n//\n// Author:\n// J3RN\n\n'use strict';\n\nmo... | javascript | chosen |
[
{
"from": "system",
"value": "Change how the path are resolved\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst morgan = require('morgan');\nconst path = require('path');\n\nconst app = express();\n\n// Setup logger\napp.use(morgan(':remote-addr - :remote-user [:date... | javascript | chosen |
[
{
"from": "system",
"value": "Order tests by query name."
},
{
"from": "human",
"value": "var SparqlParser = require('../lib/sparql');\n\nvar fs = require('fs'),\n expect = require('chai').expect;\n\nvar queriesPath = __dirname + '/../queries/';\nvar parsedQueriesPath = __dirname + '/../test/... | javascript | chosen |
[
{
"from": "system",
"value": "Update comment in error test\n"
},
{
"from": "human",
"value": "var test = require('tape');\nvar path = require('path');\nvar curli = require(path.join(__dirname, '..'));\nvar server = require(path.join(__dirname, './server.js')).createServer();\n\nserver.listen(0, ... | javascript | chosen |
[
{
"from": "system",
"value": "Throw explicit error when we can't find a skin.\n"
},
{
"from": "human",
"value": "const { getSkinToReview } = require(\"../../s3\");\nconst Utils = require(\"../utils\");\n\nasync function reviewSkin(message) {\n const { md5 } = await getSkinToReview();\n await U... | javascript | chosen |
[
{
"from": "system",
"value": "Handle empty messages on echo\n"
},
{
"from": "human",
"value": "\nmodule.exports = {\n ping: (message) => {\n message.reply('pong!');\n },\n\n echo: (message, _, msg) => {\n if (msg) {\n message.channel.send(msg);\n }\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor out methods; use JS-style names\n"
},
{
"from": "human",
"value": "var socket = io.connect('http://fueledby.us');\nvar name_has_been_set = false;\n\nsocket.on('download', function (data) {\n console.log(\"Received broadcast: \" + data);\n $('#content'... | javascript | chosen |
[
{
"from": "system",
"value": "Change page target to unprotected sandbox"
},
{
"from": "human",
"value": "var Bot = require( 'nodemw' ),\n\treadline = require( 'readline' ),\n\tfs = require( 'fs' ),\n\tc = require( 'ansicolors' ),\n\trl = readline.createInterface( {\n\t\tinput: process.stdin,\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Improve compatibility with Twitter Bootstrap styles.\n"
},
{
"from": "human",
"value": "define(['tip',\n 'anchor/class'],\nfunction(Tip, clazz) {\n \n // TODO: Improve compatibility with Twitter Bootstrap styles.\n \n function Popover(el, options) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add use of angular storage in registerCtrl\n"
},
{
"from": "human",
"value": "(function(){\n\n'use strict';\n\nangular\n .module('secondLead')\n \n .controller('RegisterCtrl', [\n 'store',\n 'Restangular',\n '$state', \n 'UserModel',\n function (sto... | javascript | chosen |
[
{
"from": "system",
"value": "Check in built Stateful mixin\n"
},
{
"from": "human",
"value": "define(\n [\"ember\",\"./machine\",\"exports\"],\n function(__dependency1__, __dependency2__, __exports__) {\n \"use strict\";\n var Mixin = __dependency1__.Mixin;\n var computed = __depende... | javascript | chosen |
[
{
"from": "system",
"value": "Add roadmap and node routes\n"
},
{
"from": "human",
"value": "var userController = require('./users/userController.js');\n\nmodule.exports = function (apiRouter) {\n\n /*\n * All routes begin with /api/\n */\n\n apiRouter.get( '/login', userController.l... | javascript | chosen |
[
{
"from": "system",
"value": "Add `Meteor.isPackageTest` to mirror `isAppTest` and `isTest`.\n\nFor #6535"
},
{
"from": "human",
"value": "var TEST_METADATA_STR;\nif (Meteor.isClient) {\n TEST_METADATA_STR = meteorEnv.TEST_METADATA;\n} else {\n TEST_METADATA_STR = process.env.TEST_METADATA;\n}... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to USA election mapplet\n"
},
{
"from": "human",
"value": "// Copyright 2010 Michael Geary\n// http://mg.to/\n// Free Beer and Free Speech License (any OSI license)\n// http://freebeerfreespeech.org/\n\ndocument.write(\n\t'<script type=\"text/javascript\" src... | javascript | chosen |
[
{
"from": "system",
"value": "Drop meteor-base version to 1.5 for tests to pass\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'meteor-base',\n version: '2.0.0-beta230.2',\n // Brief, one-line summary of the package.\n summary: 'Packages that every Meteor app needs',\n // By ... | javascript | chosen |
[
{
"from": "system",
"value": "Add eslint disable to externs file\n\nChange-Id: Ic086deaca6a45abb4c594ef307f6a5450901d4cc\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licens... | javascript | chosen |
[
{
"from": "system",
"value": "Remove grey background on premium listings\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name Rightmove Enhancement Suite\n// @namespace https://github.com/chigley/\n// @description Keyboard shortcuts\n// @include http://www.rightmove.co.uk/... | javascript | chosen |
[
{
"from": "system",
"value": "Add add-method to doubly linked list\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n// DOUBLY-LINKED LIST\n\n// define constructor\nfunction Node(val) {\n\tthis.data = val;\n\tthis.previous = null;\n\tthis.next = null;\n}\n\nfunction DoublyLinkedList() {\n\tt... | javascript | chosen |
[
{
"from": "system",
"value": "Make resolver import work for 1.13 and 2.2 ember-cli apps.\n"
},
{
"from": "human",
"value": "import Resolver from 'ember-resolver';\n\nResolver.reopen({\n pluralizedTypes: {\n ability: 'abilities'\n }\n});\n\nexport default {\n name: 'setup-ember-can',\n ini... | javascript | chosen |
[
{
"from": "system",
"value": "Fix : replace deprecated request.param() api by request.params\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst router = express.Router();\nconst puppeteer = require('puppeteer');\n\n\nrouter.get('/', function (req, res, next) {\n puppe... | javascript | chosen |
[
{
"from": "system",
"value": "Change onTick function cron jobs\n"
},
{
"from": "human",
"value": "// Cron.js - in api/services\n\n\"use strict\";\nconst CronJob = require('cron').CronJob;\nconst _ = require('lodash');\n\nconst crons = [];\n\nmodule.exports = {\n start: () => {\n sails.... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure git up to date\n"
},
{
"from": "human",
"value": "var insertWrapper = function(wrapper) {\n var cursor = $('.cursor');\n if (cursor.length > 0) {\n var container = cursor.parent().data('eqObject');\n if (cursor.parent().hasClass('square... | javascript | chosen |
[
{
"from": "system",
"value": "Add tags property to work CarouselCard\n"
},
{
"from": "human",
"value": "/** Represents a single project in the work carousel */\nexport class CarouselCard {\n constructor(elem) {\n this.elem = elem;\n this.elem.classList.add('carousel-card');\n }\n}\n\n/**... | javascript | chosen |
[
{
"from": "system",
"value": "Fix handling of invalid token\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n actions: {\n accessDenied() {\n this.transitionTo('login');\n },\n\n error() {\n this.transitionTo('catchall', 'a... | javascript | chosen |
[
{
"from": "system",
"value": "Change URL to reference configured port\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst request = require('request-promise-native');\nconst logger = require('winston');\n\nconst router = new express.Router();\n\nrouter.get('/', (req, re... | javascript | chosen |
[
{
"from": "system",
"value": "Add index to Row props\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst TableBody = ({ rowIds, Row, style, className }) => (\n <tbody style={style} className={className}>\n { rowIds && rowIds.map(r => <Row key={r} griddleKey={r} />) }\n </... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused function param caught by eslint\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n beforeModel(transition) {\n if (this.get('session.isAuthenticated')) {\n this.transitionTo('/');\n }\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Enable Google Analytics on production site\n\n- Note, this does not record or track any user data. It just helps\n me keep track of how many people are using the site and where they\n are accessing it from.\n"
},
{
"from": "human",
"value": "require('babel-core/re... | javascript | chosen |
[
{
"from": "system",
"value": "Rename cuecard config file from .cuecard.js to cuecard.js\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n\nvar cuecard = require('./cuecard.js'),\n\tpath = require('path'),\n\tcuecardFile = require(path.join(process.cwd(), '.cuecard.js'));\n\nif (cuecardFi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix pure profile balance read issue\n"
},
{
"from": "human",
"value": "function readBalance() {\n\tvar outer = $(\"#topbar\");\n\tif (outer.length == 0) {\n\t\touter = $('nav.navbar-fixed-top');\n\t}\n\t\n\tif (outer.length > 0) {\n\t\tvar metric = outer.find(\".pro... | javascript | chosen |
[
{
"from": "system",
"value": "Change cap on view file name.\n"
},
{
"from": "human",
"value": "var OppQuery = require('../models/OppQuery');\nvar Opp = require('../models/Opportunity');\n\nmodule.exports = function(app) {\n app.get('/fundme', oppQueryCreate);\n app.get('/fundme.json', oppQuery... | javascript | chosen |
[
{
"from": "system",
"value": "Add instruction comments to example secret config.\n"
},
{
"from": "human",
"value": "var secrets = {};\n\nsecrets.sensiUsername = 'user@email.com';\nsecrets.sensiPassword = 'password';\n\nmodule.exports = secrets;\n"
},
{
"from": "gpt",
"value": "/*\nCo... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for requiring a package's main module without .js extension\n"
},
{
"from": "human",
"value": "var test = require('test');\n\ntest.assert(require('dot-slash') === 10, 'main with \"./\"');\ntest.assert(require('js-ext') === 20, 'main with \".js\" extension')... | javascript | chosen |
[
{
"from": "system",
"value": "Throw Error if subclass doesn't call super\n"
},
{
"from": "human",
"value": "class Annotation {\n constructor(objectOf) {\n this.value = null;\n this.objectOf = objectOf;\n }\n\n value() { return this.value; }\n objectOf() { return this.ob... | javascript | chosen |
[
{
"from": "system",
"value": "chore(babel): Add babel polyfill to the mix\n\n"
},
{
"from": "human",
"value": "// @flow\nexport {scenarios, State} from './scenarios';\nexport {setupForRspec, setupForAva} from './test-runners';\nexport {Stage} from './Stage';\n"
},
{
"from": "gpt",
"v... | javascript | chosen |
[
{
"from": "system",
"value": "Handle the case where there is no search object in the store\n"
},
{
"from": "human",
"value": "import { SET_BODY } from '../actions/Search'\nimport { RESULT_CLICKED } from '../actions/Analytics'\nimport { SEARCH_REQUEST_SUCCESS } from '../../api/actions/query'\n\nl... | javascript | chosen |
[
{
"from": "system",
"value": "BUGFIX: Add the Generator constructor to the global scope to support Flow generator annotations"
},
{
"from": "human",
"value": "module.exports = {\n\tparser: 'babel-eslint',\n\textends: [\n\t\t'xo',\n\t\t'xo-react',\n\t\t'plugin:jsx-a11y/recommended',\n\t\t'plugin:... | javascript | chosen |
[
{
"from": "system",
"value": "Debug message for missing coords\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Clusters from './Clusters';\nimport Pin from './Pin';\nimport SlippyMap from './SlippyMap';\nimport SlippyMapWithControls from './SlippyMapWithControls';\nimport {... | javascript | chosen |
[
{
"from": "system",
"value": "Rename to use route instead of append, allow multiple main apps per node instance\n"
},
{
"from": "human",
"value": "(function () {\n\n var baseApp, onCreate, onAppend;\n\n module.exports = function (_onCreate, _onAppend) {\n onCreate = _onCreate;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Validator's route path to breadcumb components\n"
},
{
"from": "human",
"value": "const routes = {\n /* '/': 'Home', */\n '/private': 'Area Privata',\n '/private/home': 'DAF - Data Analytics Framework',\n '/private/notifications': 'Notifiche',\n '/private/d... | javascript | chosen |
[
{
"from": "system",
"value": "Add Circle helper methods à la Rect's.\n"
},
{
"from": "human",
"value": "/*globals define*/\ndefine([\n 'object2d'\n], function( Object2D ) {\n 'use strict';\n\n function Circle( x, y, radius ) {\n Object2D.call( this, x, y );\n\n this.radius = radius || 0... | javascript | chosen |
[
{
"from": "system",
"value": "Bring back property inheritance workaround\n- Introduced with the Babel 5.1.* upgrade"
},
{
"from": "human",
"value": "export class SassDocError extends Error {\n constructor(message) {\n super(message);\n this.message = message; // rm when native class suppo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove underscore prefix to 'private' fields and methods\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\n\nclass Blink extends Component {\n constructor(props) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \":bug: fixes datastore class name in example import\"\n\nThis reverts commit 1cf3a99a267679a7d422e2fb53c625e1e7f0a81f.\n"
},
{
"from": "human",
"value": "\nconst { App, Util } = require('jovo-framework');\nconst { GoogleAssistant } = require('jovo-platform-g... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify Package.on_use\nThis removes the `where` argument (deprecated?) and shortens the\ndirectory path to Meteor’s 80-char limit.\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"JavaScript.next-to-JavaScript-of-today compiler\",\n version: \"... | javascript | chosen |
[
{
"from": "system",
"value": "Make the files server only"
},
{
"from": "human",
"value": "Package.describe({\n name: 'capsulecat:model-factories',\n version: '1.0.0',\n summary: 'Easily generate data for your models using factories',\n git: 'https://github.com/CapsuleCat/MeteorModelFactories... | javascript | chosen |
[
{
"from": "system",
"value": "Remove common domain from prod env to get staging to work\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n angular\n .module('davisCru')\n .config(config);\n\n /** @ngInject */\n function config($logProvider, envServiceProvider) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "BUGFIX: Disable the require prop-types rule since we create them automatically via flow annotations\n"
},
{
"from": "human",
"value": "module.exports = {\n parser: 'babel-eslint',\n extends: [\n 'standard',\n 'standard-react',\n 'plugin:flowtype/recommend... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.