conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "[ci-skip] Fix issue that would cause a falsey value like 0 to pass the tests\n"
},
{
"from": "human",
"value": "/**\n * Checks if value is array-like.\n * A value is considered array-like if it’s not a function and has a `value.length` that’s an\n * integer greater ... | javascript | chosen |
[
{
"from": "system",
"value": "Add temporary monetary rounding fix\n"
},
{
"from": "human",
"value": "define(function () {\n return {\n\n /**\n * Format monetary to standard format with ISO 4217 code.\n */\n format: function (m) {\n if (m.isInvalid()) {\n return \"Inval... | javascript | chosen |
[
{
"from": "system",
"value": "Make buildUrl return a non-encoded url by default\n"
},
{
"from": "human",
"value": "// We faced a bug in babel so that transform-runtime with export * from 'x' generates import statements in transpiled code\r\n// Tracked here : https://github.com/babel/babel/issues... | javascript | chosen |
[
{
"from": "system",
"value": "Correct commands are sent to Saucelabs, but they are misinterpreted. Maybe the Firefox driver works better?\n"
},
{
"from": "human",
"value": "exports.config = {\n specs: ['ui/**/*.spec.js'],\n sauceUser: process.env.SAUCE_USERNAME,\n sauceKey: process.env.... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Fix DB vendor alias\"\n\nThis reverts commit 695b5998b3e7aa0d2a6e10737fca263e85bcc304.\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nmodule.exports = {\n\n development: {\n client: 'pg',\n connection: 'postgres://localhost/envel... | javascript | chosen |
[
{
"from": "system",
"value": "Fix mistake in face detection example\n\nFixed #274 by changing the x2,y2 second array when drawing the rectangle to width,height (see Matrix.cc)"
},
{
"from": "human",
"value": "var cv = require('../lib/opencv');\n\nvar COLOR = [0, 255, 0]; // default red\nvar thic... | javascript | chosen |
[
{
"from": "system",
"value": "Refactoring: Replace single quotes -> double quotes, var -> const\n"
},
{
"from": "human",
"value": "var loaders = require(\"./loaders\");\nvar preloaders = require(\"./preloaders\");\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\nvar webpack = require('w... | javascript | chosen |
[
{
"from": "system",
"value": "Test user service until better times\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { moduleFor, test } from 'ember-qunit';\nimport { Offline } from 'ember-flexberry-data';\nimport startApp from 'dummy/tests/helpers/start-app';\n\nlet App;\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add search-node 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(... | javascript | chosen |
[
{
"from": "system",
"value": "Use black and white basemap\n\nSigned-off-by: Thanh Ha <09ea4d3a79c8bee41a16519f6a431f6bc0fd8d6f@alumni.carleton.ca>\n"
},
{
"from": "human",
"value": "var southWest = L.latLng(45.36638, -75.73674),\n northEast = L.latLng(45.36933, -75.73316),\n bounds = L.lat... | javascript | chosen |
[
{
"from": "system",
"value": "Use a separate counting function.\n"
},
{
"from": "human",
"value": "function Words(sentence){\n \"use strict\";\n sentence = sentence.toLowerCase();\n var wordMatches = sentence.match(/\\w+/g);\n var result = {};\n for(var idx = 0 ; idx < wordMatches... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure exists filter values are sent to backend\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar SearchService = function($http, $q) {\n\n\tthis.search = function(query) {\n\n\t\tvar deferred = $q.defer();\n\n\t\tvar from = query.from ? '&from=' + query.fr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken redirects and serving of older websites\n"
},
{
"from": "human",
"value": "var express = require('express')\nvar vhost = require('vhost')\n\nvar app2014 = require('./2014/app')\nvar app2015 = require('./2015/app')\nvar app2016 = require('./2016/app')\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Disable Good cause pm2 pukes\n"
},
{
"from": "human",
"value": "var hapi = require('hapi');\nvar moonboots = require('moonboots_hapi');\nvar config = require('getconfig');\nvar templatizer = require('templatizer');\nvar Good = require('good');\nvar ElectricFence = r... | javascript | chosen |
[
{
"from": "system",
"value": "Set timer for app so it will retrieve the data from heroku every 4.5 min\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\nvar port = process.env.PORT || 3000;\n\n// Asset paths first\napp.get('/js/:file', serveFile.bind(nul... | javascript | chosen |
[
{
"from": "system",
"value": "Update asset loader path resolution\n"
},
{
"from": "human",
"value": "// Licensed under the Apache License, Version 2.0 (the “License”); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n//\n// http://... | javascript | chosen |
[
{
"from": "system",
"value": "Move variable declaration up a level to ensure it exists later\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport { prefixLink } from './gatsby-helpers'\n\nif (process.env.NODE_ENV === `production`) {\n let stylesStr\n try {\n stylesStr = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Include code the cancels the request after 5s\n"
},
{
"from": "human",
"value": "var media = require('rtc-media');\nvar h = require('hyperscript');\nvar crel = require('crel');\nvar screenshare = require('..')({\n chromeExtension: 'rtc.io screenshare',\n version: ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Test for Travis CI.\"\n\nThis reverts commit 6a840248036cf030994cfb23f1f7d81baba1d600.\n"
},
{
"from": "human",
"value": "Tinytest.add('meteor-assert', function (test) {\n var isDefined = false;\n try {\n assert;\n isDefined = true;\n }\n catch (e... | javascript | chosen |
[
{
"from": "system",
"value": "Replace local copy of TimerMixin with module from npm.\n\nReviewed By: spicyj, davidaurelio\n\nDifferential Revision: D3819543\n\nfbshipit-source-id: 69d68a7653fce05a31cbfd61e48878b7a0a2ab51\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) 2015-present, Face... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue in detail pane where dragging entities to empty space in detail pane would cause it to stay there\n"
},
{
"from": "human",
"value": "define([], function() {\n 'use strict';\n\n return withFileDrop;\n\n function withFileDrop() {\n\n this.aft... | javascript | chosen |
[
{
"from": "system",
"value": "Convert QueryContext to ES class."
},
{
"from": "human",
"value": "import { Class } from '../lib/objects';\nimport { isQueryExpression } from './expression';\n\nexport default Class.extend({\n evaluator: null,\n\n init(evaluator) {\n this.evaluator = evaluator;... | javascript | chosen |
[
{
"from": "system",
"value": "Make bundle-visualizer depend on webapp, since it imports meteor/webapp.\n"
},
{
"from": "human",
"value": "Package.describe({\n version: '1.1.2',\n summary: 'Meteor bundle analysis and visualization.',\n documentation: 'README.md',\n});\n\nNpm.depends({\n \"d3-... | javascript | chosen |
[
{
"from": "system",
"value": "Make Spanish tutorial images also load for Latinamerican Spanish\n"
},
{
"from": "human",
"value": "/**\n * @fileoverview\n * Utility functions for handling tutorial images in multiple languages\n */\n\nimport {enImages as defaultImages} from './en-steps.js';\n\nlet... | javascript | chosen |
[
{
"from": "system",
"value": "Revert back to evaluating scripts\n\n- Rather this than including jQuery manually resulting in potential duplicates\n"
},
{
"from": "human",
"value": "var hostname = location.hostname.replace(/^www\\./, '');\n\nvar style = document.createElement('link');\nstyle.rel ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix errors format to when creating a DS.InvalidError object\n"
},
{
"from": "human",
"value": "import callbacks from 'ember-encore/mixins/adapter-callbacks';\n\nexport default DS.RESTAdapter.extend(callbacks, {\n defaultSerializer: '-encore',\n\n pathForType: func... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for multiple IndVars\n"
},
{
"from": "human",
"value": "// import React and Redux dependencies\nvar React = require('react');\nvar connect = require('react-redux').connect;\nvar $ = require('jquery');\n\nvar DepVar = require('./DepVar');\n\nfunction mapS... | javascript | chosen |
[
{
"from": "system",
"value": "Fix \"const\" search and replace\n"
},
{
"from": "human",
"value": "'use strict';\n\nlet rpc = require('./rpc');\nlet util = require('./util');\n\nlet idKey = util.idKey;\nlet realmKey = util.realmKey;\nlet registeredConstructors = {};\n\nexports.create = create;\ne... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong counting of total pages for infinite lists\n"
},
{
"from": "human",
"value": "import update from 'immutability-helper'\n\nimport ActionTypes from '../actionTypes'\n\nconst initialState = {\n currentPageIndex: 0,\n isLoading: false,\n listItems: [],\n t... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing page action (popup icon) on page reload\n\nRelated to #25.\n"
},
{
"from": "human",
"value": "import openDevToolsWindow from './openWindow';\n\nconst menus = [\n { id: 'devtools-left', title: 'To left' },\n { id: 'devtools-right', title: 'To right' },\... | javascript | chosen |
[
{
"from": "system",
"value": "Add document title and page header\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport Immutable from 'immutable';\nimport { Button } from 'react-bootstrap';\nimport styles from '../styles.module.css';\n\nconst EditProfile = ({onSubm... | javascript | chosen |
[
{
"from": "system",
"value": "Test for element instance creating\n"
},
{
"from": "human",
"value": "/*globals PushStateTree, it, expect */\ndescribe('ObjectEvent should', function() {\n 'use strict';\n\n it('be available on global scope', function() {\n expect(PushStateTree).toBeDefined();\... | javascript | chosen |
[
{
"from": "system",
"value": "Add rest endpoint for beacon data\n"
},
{
"from": "human",
"value": "\"use strict\";\r\nlet fs = require(\"fs\");\r\nlet path = require(\"path\");\r\n\r\nlet Q = require(\"q\");\r\nlet express = require(\"express\");\r\nlet bodyParser = require(\"body-parser\");\r\n... | javascript | chosen |
[
{
"from": "system",
"value": "Watch location update instead of listening events since there is no event when $locatoin update is failed: window -> $window typo\n"
},
{
"from": "human",
"value": "if ('angular' in window) {\n angular.module('ng').run(['$rootScope', '$window', function ($rootScope... | javascript | chosen |
[
{
"from": "system",
"value": "Disable node-notifier's which call of notify-send\n"
},
{
"from": "human",
"value": "import NotificationProvider from \"./NotificationProvider\";\nimport LibNotify from \"node-notifier/notifiers/notifysend\";\nimport which from \"utils/node/fs/which\";\nimport UTIL ... | javascript | chosen |
[
{
"from": "system",
"value": "Set up for compilation from src to lib\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: '<json:package.json>',\n test: {\n files: ['test/**/*.js']\n },\n lint: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add less preprocessor to the mini-harp app\n"
},
{
"from": "human",
"value": "connect = require('connect');\nserveServer = require('serve-static');\njade = require(\"./lib/processor/jade.js\");\n\nfunction miniharp(root) {\n //console.log(root);\n var app = connec... | javascript | chosen |
[
{
"from": "system",
"value": "Add image property to callback data\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar got = require('got');\nvar cheerio = require('cheerio');\nvar md = require('html-md');\n\nmodule.exports = function(id, callback) {\n var url = 'http://www.stm.dk/_p_' + id ... | javascript | chosen |
[
{
"from": "system",
"value": "Add reminder that ascii is awesome.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n// Generates a string from \"color-1\" to \"color-32\" based on an input string\nmodule.exports = function(str) {\n\tlet hash = 0;\n\n\tfor (let i = 0; i < str.length; i++) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Switch doc to closure compiler templating\n"
},
{
"from": "human",
"value": "// http://stackoverflow.com/questions/11935175/sampling-a-random-subset-from-an-array\nvar featureCollection = require('turf-featurecollection');\n\n/**\n * Takes a {@link FeatureCollection... | javascript | chosen |
[
{
"from": "system",
"value": "Use koa-static to serve static files\n"
},
{
"from": "human",
"value": "require('./env');\nvar http = require('http');\nvar koa = require('koa');\nvar app = koa();\n\napp.use(require('koa-bodyparser')());\napp.use(function *(next) {\n if (typeof this.request.body =... | javascript | chosen |
[
{
"from": "system",
"value": "Add OnClick and Onload for reaction and create times\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react'\nimport './Reaction.sass'\n\nclass Reaction extends Component {\n constructor() {\n super();\n this.state = { React: false };\n }\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove function constructor name patch\n"
},
{
"from": "human",
"value": "'use strict';\n\nrequire('./patch/functionName');\n\n(function (window, document, undefined) {\nvar oldMappy = window.Mappy\nvar Mappy = require('./lib/main')\n\n//Node style module export\nif... | javascript | chosen |
[
{
"from": "system",
"value": "Read confluence url from env\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar program = require('commander');\nvar userArgs = process.argv.splice(2);\nvar message = userArgs.join(' ');\n\nif (message.length > 140) {\n console.log('Message was too long.... | javascript | chosen |
[
{
"from": "system",
"value": "Determine whether pathwatcher built without running it. Ref GH-98.\n"
},
{
"from": "human",
"value": "/*\n * gaze\n * https://github.com/shama/gaze\n *\n * Copyright (c) 2014 Kyle Robinson Young\n * Licensed under the MIT license.\n */\n\ntry {\n // Attempt to reso... | javascript | chosen |
[
{
"from": "system",
"value": "Fix CORS handling for POST and DELETE\n"
},
{
"from": "human",
"value": "var httpProxy = require('http-proxy');\nvar http = require('http');\n\nvar CORS_HEADERS = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'HEAD, POST, GET, PUT, PATC... | javascript | chosen |
[
{
"from": "system",
"value": "Improve speed of detection of scoped packages\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar path = require('path')\n\nmodule.exports = function (file) {\n var segments = file.split(path.sep)\n var index = segments.lastIndexOf('node_modules')\n if (index ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor main weather module to use API\n\nSigned-off-by: Riyadh Al Nur <d7e60315016355bdcd32d48dde148183e3d8bb86@verticalaxisbd.com>\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst YQL = require('yql');\nconst _ = require('lodash');\n\nmodule.exports = (o... | javascript | chosen |
[
{
"from": "system",
"value": "Call connect() on the Users component only once, and cache the result. This seems to fix STRIPES-97 at last!\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Match from 'react-router/Match';\nimport Miss from 'react-router/Miss';\nimport Users f... | javascript | chosen |
[
{
"from": "system",
"value": "Update dependencies to be an exact copy of jquery-ui's custom download option\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-ui-sortable',\n\n included: function(app) {\n app.import(app.bowerDirect... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lambda invoke with no payload\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst { config, Lambda } = require('aws-sdk')\n\nconst { stringify } = JSON\n\nconfig.update({\n accessKeyId: 'ABC',\n secretAccessKey: 'SECRET',\n})\n\nconst lambda = new Lambda(... | javascript | chosen |
[
{
"from": "system",
"value": "Use the first workload owner id in e2e test\n"
},
{
"from": "human",
"value": "const expect = require('chai').expect\n\nconst dataHelper = require('../helpers/data/aggregated-data-helper')\n\nvar workloadOwnerId\nvar workloadOwnerGrade\n\ndescribe('View overview', f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for the \"More at...\" link to correct lineId\n\nThe sourceUrl link which controls the \"More at tfl.gov.uk\" href is now\nfixed to link to the correct anchor for the line in question. This will\nopen the further information accordion and zoom the SVG map to the\ncorrect li... | javascript | chosen |
[
{
"from": "system",
"value": "Prepend ember fingerprints with Julz.jl path"
},
{
"from": "human",
"value": "/*jshint node:true*/\n/* global require, module */\nvar EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n var app = new EmberApp(defaults,... | javascript | chosen |
[
{
"from": "system",
"value": "Handle zero-padding for millisecond component\n\nFixes tests for 1 and 12 milliseconds.\n"
},
{
"from": "human",
"value": "(function (millisecondsToISO8601Duration) {\n\t'use strict';\n\n\tmillisecondsToISO8601Duration.iso8601duration = function(milliseconds) {\n\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Add method to create an event\n"
},
{
"from": "human",
"value": "import { Mongo } from 'meteor/mongo';\n\nexport const Events = new Mongo.Collection('events');\n"
},
{
"from": "gpt",
"value": "import { Mongo } from 'meteor/mongo';\nimport { ValidatedMeth... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error `cannot read split of undefined`\n"
},
{
"from": "human",
"value": "(function () {\n\n var options = (function () {\n // Holy shit\n var optionsArray = location.href.split('?')[1].split('#')[0].split('=')\n var result = {}\n\n optionsArray.for... | javascript | chosen |
[
{
"from": "system",
"value": "Use module name instead of path"
},
{
"from": "human",
"value": "\nwindow._ = require('lodash');\n\n/**\n * We'll load jQuery and the Bootstrap jQuery plugin which provides support\n * for JavaScript based Bootstrap features such as modals and tabs. This\n * code ma... | javascript | chosen |
[
{
"from": "system",
"value": "Add scroll to here logic\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport layout from '../templates/components/scroll-to-here';\n\nexport default Ember.Component.extend({\n layout: layout\n});\n"
},
{
"from": "gpt",
"value": "import... | javascript | chosen |
[
{
"from": "system",
"value": "Fix authorizer missing from container\n\nUsing routes with authorization was failing because the container didn't\ncontain a definition for the factory. Adding the authorizer in the\ninitialization fixes this.\n\nFixes issue #6\n"
},
{
"from": "human",
"value": "imp... | javascript | chosen |
[
{
"from": "system",
"value": "Remove acme challenge and enable forcing https\n"
},
{
"from": "human",
"value": "// This script is used to serve the built files in production and proxy api requests to the service.\n// Would be preferrable to replace with apache.\n\nconst express = require('expres... | javascript | chosen |
[
{
"from": "system",
"value": "Add list editor and list selector\n"
},
{
"from": "human",
"value": "import app from '../app';\nimport '../services/PlusMinClient';\n\napp.controller('plusMinController', function ($element, $scope, $http, PlusMinClient) {\n let client = PlusMinClient;\n $scope.st... | javascript | chosen |
[
{
"from": "system",
"value": "Hide fields if \"Consumption items\" is selected\n"
},
{
"from": "human",
"value": "$(document).ready(function () {\n if (!id_category_0.checked && !id_category_1.checked){\n $(\"#id_institution\").parents('.row').hide();\n $(\"#id_department\").par... | javascript | chosen |
[
{
"from": "system",
"value": "Edit model associations using new syntax\n"
},
{
"from": "human",
"value": "module.exports = (sequelize, DataTypes) => {\n const User = sequelize.define('User', {\n username: {\n type: DataTypes.STRING,\n allowNull: false,\n unique: true,\n },\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove pinned version of `modules` from `npm-bcrypt`.\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"Wrapper around the bcrypt npm package\",\n version: \"0.9.2\",\n documentation: null\n});\n\nNpm.depends({\n bcryptjs: \"2.3.0\"\n});\n\nPack... | javascript | chosen |
[
{
"from": "system",
"value": "Add poor validation for plugins\n"
},
{
"from": "human",
"value": "/**\n * @flow\n */\nimport path from \"path\"\n\nimport flattenConfiguration from \"./configuration/flattenConfiguration\"\nimport start from \"./commands/start\"\nimport build from \"./commands/buil... | javascript | chosen |
[
{
"from": "system",
"value": "Fix some ENV add bugs\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(kbox) {\n\n var events = kbox.core.events;\n var deps = kbox.core.deps;\n var envs = [];\n\n // EVENT: pre-engine-create\n events.on('pre-engine-create', functio... | javascript | chosen |
[
{
"from": "system",
"value": "Create hidden picture element when respimage is loaded.\n\nSeen in this example: https://github.com/fabianmichael/kirby-imageset#23-template-setup.\n"
},
{
"from": "human",
"value": "/**\n * head.script.js\n *\n * Essential scripts, to be loaded in the head of the d... | javascript | chosen |
[
{
"from": "system",
"value": "Fix regex to comply with no-useless-escape ESLint rule\n"
},
{
"from": "human",
"value": "// slack invite links expire after 30 days and you can't(at least as far as i can tell) create tokens for things like slackin anymore\n\nconst fs = require('fs')\n\nconst slack... | javascript | chosen |
[
{
"from": "system",
"value": "Add option to only return a string instead of JSX\n"
},
{
"from": "human",
"value": "'use strict';\nimport React from 'react';\n\n/**\n * Method to display the title of a variant.\n * 1st option is the ClinVar Preferred Title if it's present.\n * 2nd alternative is ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle list of media/collections that aren't clickable\n"
},
{
"from": "human",
"value": "import PropTypes from 'prop-types';\nimport React from 'react';\nimport { Col } from 'react-flexbox-grid/lib';\nimport { DeleteButton } from './IconButton';\n\nconst SourceOrCo... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'Animated.View.propTypes' to avoid warnings.\n\nThe propTypes Validation must be based on `Animated.View.propTypes` instead of just `View.propTypes` \r\notherwise a Warning is displayed when passing Animated values to TabBar."
},
{
"from": "human",
"value": "'us... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Counter subscription filter definition\n"
},
{
"from": "human",
"value": "export default {\n countUpdated: () => ({\n // Run the query each time count updated\n countUpdated: () => true\n })\n};\n"
},
{
"from": "gpt",
"value": "export default... | javascript | chosen |
[
{
"from": "system",
"value": "Update annotation on reset events\n"
},
{
"from": "human",
"value": "import _ from 'underscore';\nimport Model from 'girder/models/Model';\n\nimport ElementCollection from '../collections/ElementCollection';\nimport convert from '../annotations/convert';\n\nexport d... | javascript | chosen |
[
{
"from": "system",
"value": "Set the AMD module name in the UMD build\n"
},
{
"from": "human",
"value": "import path from 'path';\n\nconst projectRoot = path.join(__dirname, '..');\n\nexport default {\n cache: true,\n entry: [\n path.join(projectRoot, 'src', 'hibp.js'),\n ],\n output: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Call user migrate down callback\n"
},
{
"from": "human",
"value": "var dbm = require('db-migrate');\nvar type = dbm.dataType;\n\nexports.up = function(db, callback) {\n db.createTable('users', {\n columns: {\n id: { type: 'int', primaryKey: true, au... | javascript | chosen |
[
{
"from": "system",
"value": "Change development reload shortcut to F5\n\nThis prevents interference when using bash's Ctrl-R command\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst electron = require(\"electron\");\nconst {app} = electron;\nconst {Menu} = electron;\nconst {BrowserWi... | javascript | chosen |
[
{
"from": "system",
"value": "Add a sample of jade\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar assert = require('assert');\nvar jade = require('jade');\n\n\nvar source = [\n'each v, i in list',\n' div #{v},#{i}'\n].join('\\n');\n\nvar fn = jade.compile(source);\nvar html = fn(... | javascript | chosen |
[
{
"from": "system",
"value": "Split up vars for consistency with official Sanity terms\n"
},
{
"from": "human",
"value": "import array from 'role:@sanity/form-builder/input/array?'\nimport boolean from 'role:@sanity/form-builder/input/boolean?'\nimport date from 'role:@sanity/form-builder/input/... | javascript | chosen |
[
{
"from": "system",
"value": "Remove HipsterScript-style comments from JS sources.\n"
},
{
"from": "human",
"value": "# Place all the behaviors and hooks related to the matching controller here.\n# All this logic will automatically be available in application.js.\n# You can use CoffeeScript in t... | javascript | chosen |
[
{
"from": "system",
"value": "Add user to the leaderboard\n\nadds the user to the bottom of the leaderboard in last place\n"
},
{
"from": "human",
"value": "\n// Use Parse.Cloud.define to define as many cloud functions as you want.\n// For example:\nParse.Cloud.define(\"hello\", function(request... | javascript | chosen |
[
{
"from": "system",
"value": "Fix TimeInterval test by acknowledging time zones\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:/... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Add help to add-locale command\n"
},
{
"from": "human",
"value": "const fs = require('fs')\nconst path = require('path')\nconst chalk = require('chalk')\nconst program = require('commander')\nconst getConfig = require('lingui-conf').default\nconst plurals = req... | javascript | chosen |
[
{
"from": "system",
"value": "Throw on invalid params argument\n"
},
{
"from": "human",
"value": "module.exports = function allowQueryParams(params) {\n return function allowQueryParamsMiddleware(req, res, next) {\n req.context.allowedQueryParams = params;\n next();\n };\n};\... | javascript | chosen |
[
{
"from": "system",
"value": "Add gradient to test page\n"
},
{
"from": "human",
"value": "'use strict';\n\nrequire.config({\n paths: {\n raphael: '../raphael'\n //you will need eve if you use the nodeps version\n /*eve: '../bower_components/eve/eve'*/\n }\n});\n\nrequ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the navigation generating js\n"
},
{
"from": "human",
"value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascript... | javascript | chosen |
[
{
"from": "system",
"value": "Rename 'reporter' plugin hook to 'listener' as it's more semantic\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://... | javascript | chosen |
[
{
"from": "system",
"value": "Use browserHistory to get rid of url queries\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport {\n Router,\n Route,\n hashHistory,\n IndexRoute\n} from 'react-router';\nimport App from './App';\nimport RecentTracks from './components/RecentTr... | javascript | chosen |
[
{
"from": "system",
"value": "Update quantity widget tooltips per prototype\n"
},
{
"from": "human",
"value": "\nvar DEFAULT_MIN = 1;\nvar DEFAULT_MAX = 3;\n\nApp.QuantityWidgetComponent = Ember.Component.extend({\n\n tagName: 'div',\n classNameBindings: [ ':quantity-widget', 'isMin', 'isMax' ... | javascript | chosen |
[
{
"from": "system",
"value": "[style] Fix linting errors in generated code\n"
},
{
"from": "human",
"value": "import {\n addParameters,\n addDecorator,\n setCustomElements,\n withA11y\n} from '@open-wc/demoing-storybook';\n\nasync function run() {\n const customElements = await (\n await... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor auth reducer to handler the new auth-card actions\n"
},
{
"from": "human",
"value": "import {\n AUTH_USER,\n UNAUTH_USER,\n AUTH_ERROR,\n SET_USER_DATA,\n SET_CREDIT_CARDS,\n SET_DEFAULT_CARD\n} from '../constants/';\n\nconst initialState = {\n authe... | javascript | chosen |
[
{
"from": "system",
"value": "Fix keys implementation - Object.keys does not work on functions\n"
},
{
"from": "human",
"value": "if (typeof buster == \"undefined\") {\n var buster = {};\n}\n\nbuster.util = (function () {\n var toString = Object.prototype.toString;\n var div = typeof do... | javascript | chosen |
[
{
"from": "system",
"value": "Sort test results according to version\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction TestResults(dataTable) {\n var Cucumber = require('cucumber');\n var TestResult = require('./testResult');\n var maximums = [0, 0, 0, 0];\n\n var testColl... | javascript | chosen |
[
{
"from": "system",
"value": "Check for multiple target routes for deciding when to transition.\n"
},
{
"from": "human",
"value": "var route = Ember.Route.extend({\n model: function() {\n return this.store.all('task');\n },\n afterModel: function(tasks, transition) {\n if ... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify regex for finding links\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport _ from 'lodash'\nimport fp from 'lodash/fp'\n\nexport default props => {\n const { children: text } = props\n\n const linkPattern = /([a-z]+:\\/\\/[^,\\s]+)/g\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add support of two way binding\n\nin object-list-view-input-cell component\n"
},
{
"from": "human",
"value": "import BaseComponent from './flexberry-base';\n\nexport default BaseComponent.extend({\n tagName: 'td',\n classNames: [],\n column: null,\n record: null... | javascript | chosen |
[
{
"from": "system",
"value": "Modify binary payload to be called payload instead of data\n"
},
{
"from": "human",
"value": "import dissolve from 'dissolve'\n\nfunction createDataStream() {\n return dissolve()\n .loop(function() {\n this\n .uint32(\"length\")\n .int8(\"type... | javascript | chosen |
[
{
"from": "system",
"value": "Add github activity job frequency option\n"
},
{
"from": "human",
"value": "export default {\n authToken: process.env.AUTH_TOKEN || 'secret',\n env: process.env.NODE_ENV,\n host: process.env.HOST || 'localhost',\n github: {\n apiUrl: 'https://api.github.com',... | javascript | chosen |
[
{
"from": "system",
"value": "Add line breaks between methods in HTMLRenderer\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport renderHTML from 'react-render-html';\nimport SocketClient from './socket-client';\nimport PropTypes from 'prop-types';\n\nclass HTMLRenderer extends... | javascript | chosen |
[
{
"from": "system",
"value": "Update to proper customElements spec\n"
},
{
"from": "human",
"value": "import '@webcomponents/webcomponentsjs';\n\nclass View extends HTMLElement {\n static wrapped() {\n const Cls = document.registerElement(this.name, this);\n return (params) => O... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.