conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change layout of package definition.\n"
},
{
"from": "human",
"value": "var ProseEditorPackage = require('substance/packages/prose-editor/ProseEditorPackage');\nvar ImagePackage = require('substance/packages/image/ImagePackage');\n\nvar SaveCommand = require('substa... | javascript | chosen |
[
{
"from": "system",
"value": "DEBUG patch for appBuilder identity, so it can fake it when running in indexDebug.html\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright 2015 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n... | javascript | chosen |
[
{
"from": "system",
"value": "Allow resolverNoCache config option to be passed to envelope headers\n"
},
{
"from": "human",
"value": "/* global _postal, SubscriptionDefinition, _config, _ */\n\nvar ChannelDefinition = function( channelName, bus ) {\n\tthis.bus = bus;\n\tthis.channel = channelNam... | javascript | chosen |
[
{
"from": "system",
"value": "Add italic and inverse ansi codes to definition\n"
},
{
"from": "human",
"value": "// ANSI color code outputs for strings\n\nvar ANSI_CODES = {\n \"off\": 0,\n \"bold\": 1,\n \"underline\": 4,\n \"blink\": 5,\n \"hidden\": 8,\n \"black\": 30,\n \"red\": 31,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in ldap login.\n"
},
{
"from": "human",
"value": "var ldap = require('ldapjs');\nvar assert = require('assert');\nvar options = require('./options-handler').options;\nvar log = require('./logger').log;\n\nexports.login = function(uid,password,successCallback... | javascript | chosen |
[
{
"from": "system",
"value": "Add more docs to API file\n"
},
{
"from": "human",
"value": "import events from './events';\nimport tweets from './tweets';\nimport wrap from '../middleware/wrap';\n\n/**\n * @param {Function} method\n */\nfunction makeHandler(method) {\n /**\n * @param {http... | javascript | chosen |
[
{
"from": "system",
"value": "Add updated_at attribute for Dashboard.Repository\n"
},
{
"from": "human",
"value": "require('dashboard/core');\n\nDashboard.Repository = DS.Model.extend({\n name: DS.attr('string'),\n full_name: DS.attr('string'),\n description: DS.attr('string'),\n html_url: D... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for config overrides without recompiling bundles\n"
},
{
"from": "human",
"value": "import 'babel-polyfill';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport MainScreen from './react/MainScreen';\n\nimport config from './config';\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to follow style guidelines\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\n/**\n * @module components\n * @class sl-span\n */\nexport default Ember.Component.extend({\n\n // --------------------------------------------------------------... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ToolbarIcon does not trigger onClick\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nexport default class QuillDynamicToolbarIcon extends React.Component {\n constructor(props) {\n super(props);\n\n th... | javascript | chosen |
[
{
"from": "system",
"value": "Set q2 field as disabled when invisible\n"
},
{
"from": "human",
"value": "$(function() {\n $(\"#class-table tr td:first-child\").each(function() {\n var t = this.textContent;\n if (t.length > 30) {\n var elipsized = t.substring(0, 16) + ... | javascript | chosen |
[
{
"from": "system",
"value": "Read private key from config\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst config = require(__dirname + '/../config')\nconst privateKey = require('fs').readFileSync('staticman_key', 'utf8')\nconst NodeRSA = require('node-rsa')\nconst key = new NodeRSA()\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change contructor parameter in migrations\n"
},
{
"from": "human",
"value": "var NeufundTestToken = artifacts.require(\"./NeufundTestToken.sol\");\nvar Crowdsale = artifacts.require(\"./Crowdsale.sol\");\n\nmodule.exports = function (deployer) {\n /**\n * add... | javascript | chosen |
[
{
"from": "system",
"value": "Add commithash to french translation\n"
},
{
"from": "human",
"value": "/* global define */\n\ndefine({\n HEADER_TITLE: \"Outline\",\n\n TOOLBAR_ICON_TOOLTIP: \"Onglet Outline\",\n\n BUTTON_SETTINGS: \"Configurer Outline\",\n BUTTON_MOVE: \"Changer la po... | javascript | chosen |
[
{
"from": "system",
"value": "Use readFile instead of readFileSync\n"
},
{
"from": "human",
"value": "import fs from 'fs';\nimport path from 'path';\nimport handlebars from 'handlebars';\nimport console from 'node-custom-console';\n\nconst cnsl = console('builder');\n\nexports.build = (eventName... | javascript | chosen |
[
{
"from": "system",
"value": "Add add and remove methods - currently returns promise after set time until api is ready\n"
},
{
"from": "human",
"value": "import http from '../http';\n\nexport default class collections {\n\n static getAll() {\n return http.get(`/zebedee/collections`)\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Improve test structure for themeable\n"
},
{
"from": "human",
"value": "import React, {PropTypes} from 'react'\nimport {render} from 'react-dom'\nimport {getContextualizer} from 'react-context-props'\nimport {equal} from 'assert'\nimport themeable from './themeable'... | javascript | chosen |
[
{
"from": "system",
"value": "Disable separators for a cleaner UI.\n"
},
{
"from": "human",
"value": "import { Component } from 'substance'\n\nexport default class ManuscriptComponent extends Component {\n\n render($$) {\n const article = this.props.node\n let el = $$('div')\n .addCl... | javascript | chosen |
[
{
"from": "system",
"value": "Add options input to initialize method.\n"
},
{
"from": "human",
"value": "var codeMelon = codeMelon || {}; \ncodeMelon.games = codeMelon.games || {}; \n\ncodeMelon.games.AppView = Backbone.View.extend({\n initialize: function() {\n var _this = this;\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Tidy setup code and remove unnecessary variables\n"
},
{
"from": "human",
"value": "// Overwrite this file in your application /app/assets/javascripts/comfortable_mexican_sofa/admin/application.js\n//= require requirejs/require\n//= require require_config\n\nwindow.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove propTypes in favor of real tests that verify the same thing."
},
{
"from": "human",
"value": "import React from 'react';\nimport {default as KataGroupsData} from '../katagroups.js';\n\nexport default class KataGroupsComponent extends React.Component {\n\n st... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Fix error when msg is undefined.\n"
},
{
"from": "human",
"value": "import Vue from 'vue'\nimport Message from './Message.vue'\nimport Modal from './Modal.vue'\n\nconst MessageConstructor = Vue.extend(Message)\n\nconst Msg = function (option) {\n let instance\... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic template for async action creators\n"
},
{
"from": "human",
"value": "export const ADD_ITEM = 'ADD_ITEM';\nexport const COMPLETE_ITEM = 'COMPLETE_ITEM';\n\nexport function addItem(text) {\n return {\n type: ADD_ITEM,\n value: text\n };\n}\n\nexport... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing semicolon to javascript statement.\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\nvar ready = function() {\n // ... | javascript | chosen |
[
{
"from": "system",
"value": "Make push events more obvious\n"
},
{
"from": "human",
"value": "const Score = require('../../../lib/score');\nconst _ = require('lodash');\nconst scorePerCommit = 0.25;\n\nmodule.exports = new Score ('push_event', {\n fn: (event, actor) => {\n const actorEmail ... | javascript | chosen |
[
{
"from": "system",
"value": "feat(label-wrapper): Change label to be optional\n\n\r\nIt makes more sense for the label to be optional because there are no adverse effects by omitting it.\r\n\r\nCloses #78"
},
{
"from": "human",
"value": "export default ngModule => {\n ngModule.config(addWrappe... | javascript | chosen |
[
{
"from": "system",
"value": "Add rate limit and url check for getting feeds\n"
},
{
"from": "human",
"value": "const express = require('express')\nconst feedsAPI = express.Router()\n\n// Remember for stricter rate limit for unauthenticated getFeed\n\nfeedsAPI.get('/:url', require('../../../cont... | javascript | chosen |
[
{
"from": "system",
"value": "Add zipcode to Freegeoip results\n"
},
{
"from": "human",
"value": "'use strict';\n(function () {\n\n var net = require('net');\n\n /**\n * Constructor\n */\n var FreegeoipGeocoder = function(httpAdapter) {\n\n if (!httpAdapter || httpAdapter... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments to actions for detail\n"
},
{
"from": "human",
"value": "import { SWITCH_FACTION, TOGGLE_FILTER, TOGGLE_GROUP } from '../constants/MapConstants';\n\nexport function switchFaction() {\n return {\n type: SWITCH_FACTION\n };\n}\n\nexport function togg... | javascript | chosen |
[
{
"from": "system",
"value": "Increase wait time to 1 second\n"
},
{
"from": "human",
"value": "var net = require('net');\n utils = require('radiodan-client').utils,\n logger = utils.logger(__filename);\n\nfunction create(port, socket) {\n var deferred = utils.promise.defer(),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Remove the description from the API descriptor when printing it.\n\nClose #37\n"
},
{
"from": "human",
"value": "/**\n * Created by david on 27/11/2015.\n */\n/*\n * Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache Lic... | javascript | chosen |
[
{
"from": "system",
"value": "Fix variable + change event\n"
},
{
"from": "human",
"value": "let formId, formValidationFields;\n\n\nwindow.addEventListener('DOMContentLoaded', function() {\n let $_form = $('form#' + formId + '-form'),\n $_formInputs = $_form.find(':input'),\n _f... | javascript | chosen |
[
{
"from": "system",
"value": "Set the proper path for our dummy app\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Arrange desktop header items with flexbox\n\n"
},
{
"from": "human",
"value": "//@flow\n\nimport styled, { css } from \"styled-components\";\n\nexport const Wrapper = styled.div`\n\n ${({ theme }: { theme: Theme }) => css`\n\n box-sizing: border-box;\n positi... | javascript | chosen |
[
{
"from": "system",
"value": "Add chapter 2, exercise 2\n"
},
{
"from": "human",
"value": "for (let i = 1; i <= 100; ++i) {\n let str = \"\";\n if (i % 3 === 0 ) {\n str += \"Fizz\";\n }\n if (i % 5 === 0) {\n str += \"Buzz\"\n }\n if (str === \"\") {\n str... | javascript | chosen |
[
{
"from": "system",
"value": "Add a message when listing queues :)\n"
},
{
"from": "human",
"value": "var util = require('util');\nvar amazon = require(\"amazon\");\nvar sqs = require(\"sqs\");\n\nvar env = process.env;\nvar accessKeyId = process.env.ACCESS_KEY_ID;\nvar secretAccessKey = process... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the git url and template path\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst cfg = require('./config');\nconst { cloneGitProject, applyOneTemplate, tagAndPush, commitAndPush } = require('./utils');\n\nasync function run () {\n\n const templateFilepat... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to register a ServiceWorker\n"
},
{
"from": "human",
"value": "const swPrecache = {\n\tstaticFileGlobs: [\n\t\t'dist/**.html',\n\t\t'dist/**/*.css',\n\t\t'dist/**/*.js',\n\t\t'dist/**.json',\n\t\t'dist/**.txt',\n\t\t'dist/images/*'\n\t],\n\troot: 'dist',\n\tstri... | javascript | chosen |
[
{
"from": "system",
"value": "Select all text when the destination textarea is focused\n"
},
{
"from": "human",
"value": "(function($) {\n\n var prevText = null;\n var convert = function() {\n var text = srcTextarea.val().replace(/^[\\s ]+/, '').replace(/[\\s ]+$/, '');\n if (text === pr... | javascript | chosen |
[
{
"from": "system",
"value": "Improve init function inserting it in callback require propertie\n"
},
{
"from": "human",
"value": "require.config({\n baseUrl: 'js',\n paths: {\n // modules\n 'app': 'app',\n 'topBar': 'topBar',\n 'services': 'services',\n '... | javascript | chosen |
[
{
"from": "system",
"value": "Add trackEvent to report create\n"
},
{
"from": "human",
"value": "import { connect } from 'react-redux';\nimport { createReport } from 'redux-modules/reports';\nimport { NavigationActions } from 'react-navigation';\nimport Map from 'components/map';\n\nfunction map... | javascript | chosen |
[
{
"from": "system",
"value": "fix(website): Include messageformat/compile-module in API docs\n"
},
{
"from": "human",
"value": "const path = require('path')\n\nconst templateDir = path.dirname(require.resolve('ink-docstrap/package.json'))\n\nmodule.exports = {\n source: {\n include: [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ‘TypeError: Object [object Object] has no method 'addError'’\n"
},
{
"from": "human",
"value": "/**\n * Type\n */\nvar typeConstructor = function typeConstructor() {\n\n /**\n * Types\n */\n var types = {\n 'string': isString,\n 'number': isNumber,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing module.exports on integreation test promot file\n\n"
},
{
"from": "human",
"value": "[\n {\n \"name\": \"fastTestCommand\",\n \"message\": \"The command to execute for the 'fast test' task\"\n },\n {\n \"name\": \"buildDockerCommand\",\n \... | javascript | chosen |
[
{
"from": "system",
"value": "Call composer from the webroot\n\ncomposer.json has been moved from /concrete/composer.json to /composer.json\n\n\nFormer-commit-id: 792e79f814aa61c25c99638b1408a0a26fa7be5a\nFormer-commit-id: 5a3b67f6dd81cf05c77b53bd33962b87e67a863b"
},
{
"from": "human",
"value": ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix rock paper scissors test, introduce deck config\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst nodeUuid = require(\"node-uuid\"),\n BeginningState = require(\"dc-game-states\").BeginningState,\n GameData = require(\"dc-engine\").Gam... | javascript | chosen |
[
{
"from": "system",
"value": "Configure the node layer to expect ws event names\n"
},
{
"from": "human",
"value": "var extend = require('cog/extend');\n\nmodule.exports = function(messenger, opts) {\n return require('./index.js')(messenger, extend({\n connect: require('./ws-connect')\n }, o... | javascript | chosen |
[
{
"from": "system",
"value": "FIx import and workers support\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: './base.js',\n plugins: [\n 'prefer-let',\n 'unicorn',\n 'node'\n ],\n rules: {\n 'node/no-unsupported-features/node-builtins': 'error',\n 'node/no-uns... | javascript | chosen |
[
{
"from": "system",
"value": "Fix dispose (WeakMap.clear is obsolete and should not be used)\n"
},
{
"from": "human",
"value": "/**\n * @author mrdoob / http://mrdoob.com/\n */\n\nfunction WebGLObjects( gl, geometries, attributes, info ) {\n\n\tvar updateMap = new WeakMap();\n\n\tfunction update... | javascript | chosen |
[
{
"from": "system",
"value": "Expire 1-to-1 messages after 6 hours\n"
},
{
"from": "human",
"value": "//\n// Message\n//\n\n'use strict';\n\nvar mongoose = require('mongoose'),\n ObjectId = mongoose.Schema.Types.ObjectId;\n\nvar MessageSchema = new mongoose.Schema({\n users: [{\n ty... | javascript | chosen |
[
{
"from": "system",
"value": "Remove prior logic for list render\n"
},
{
"from": "human",
"value": "// export default /(polonox|poloneix|poloium|polonniex|poloiexx|polonium|blocktrads|blocktrade|bittrexx|bittrexxx|bitrex|bitrexx)\\b/;\n\nconst list = `\npolonox\npoloneix\nbitterx\nbittex\nbittra... | javascript | chosen |
[
{
"from": "system",
"value": "Allow start and end index\n"
},
{
"from": "human",
"value": "function* chunks(chunk, range) {\n for (let index = 0; index < range; index++) {\n yield {\n index,\n pause: (index > 0 && (index + 1) % chunk === 0)\n };\n }\n}\n\nexport default {\n of... | javascript | chosen |
[
{
"from": "system",
"value": "Switch ordering of short-circuited OR on line 12."
},
{
"from": "human",
"value": "/*global require:true*/\nvar gutil = require('gulp-util');\nvar Grunticon = require( 'grunticon-lib' );\n\nmodule.exports = function( files, config ) {\n \"use strict\";\n\n return ... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out admin access control\n"
},
{
"from": "human",
"value": "// --------------------\n// Admin namespace controller\n// Default action\n// --------------------\n\n// exports\n\nexports = module.exports = {\n\taccess: function(defaultFn) {\n\t\treturn defaultF... | javascript | chosen |
[
{
"from": "system",
"value": "Make initializer Ember 1.13/2.0/2.1 friendly\n"
},
{
"from": "human",
"value": "import config from '../config/environment';\n\nexport function initialize(container, application) {\n const { serviceName = 'logger' } = config.sentry;\n const lookupName = `service:${... | javascript | chosen |
[
{
"from": "system",
"value": "Make interval longer for update check\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport 'application.scss';\n\nimport Dashboard from 'dashboard';\n\nimport refresher from 'services/refresher';\n\nimport Cell f... | javascript | chosen |
[
{
"from": "system",
"value": "Use /tmp directory instead of local profiles directory\n"
},
{
"from": "human",
"value": "var debug = require('debug')('testbot:farm');\nvar spawn = require('child_process').spawn;\nvar path = require('path');\nvar mkdirp = require('mkdirp');\nvar qs = require('quer... | javascript | chosen |
[
{
"from": "system",
"value": "Add get tile function in tile selection\n"
},
{
"from": "human",
"value": "export class PositionedTile {\n\tconstructor(x, y, id) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.tileId = id;\n\t}\n}\n\nexport class TileSelection {\n\tconstructor(width, height, tiles) ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove test no functions called test\n"
},
{
"from": "human",
"value": "describe(\"Moments\", function() {\n var NO_ALLIES = \"Unselect all\";\n var ALL_ALLIES = \"Select all\";\n\n beforeAll(function() {\n var elements = [];\n elements.push(\"<div id='te... | javascript | chosen |
[
{
"from": "system",
"value": "Add game over when trying to move in game over state\n\nSigned-off-by: Joern Bernhardt <7b85a41a628204b76aba4326273a3ccc74bd009a@campudus.com>\n"
},
{
"from": "human",
"value": "var Board = require('./Board');\n\nvar tiles = document.querySelectorAll('.tile');\n\nva... | javascript | chosen |
[
{
"from": "system",
"value": "Check validation validate function params\n\nEnsure the `answers` object is also passed to the `validate` function.\n"
},
{
"from": "human",
"value": "import AvaTest from './_base-ava-test';\nimport promptBypass from '../lib/prompt-bypass';\n\nconst {test, nodePlop}... | javascript | chosen |
[
{
"from": "system",
"value": "Replace cool new JS features with lodash because node 8/10\n"
},
{
"from": "human",
"value": "export default function() {\n return function({ addBase, addUtilities, e, theme, variants }) {\n const keyframesConfig = theme('keyframes')\n const keyframesStyles =... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spelling errors in JAInputIcon documentation"
},
{
"from": "human",
"value": "import React from 'react';\nimport { View, StyleSheet } from 'react-native';\nimport { Icon } from 'native-base';\nimport styles from './style';\n\n/*\nTo give all icons the same width... | javascript | chosen |
[
{
"from": "system",
"value": "Remove call to the bot when we sync to crowdin\n\nWe do it too often\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst dedent = require('dedent');\nconst { error, success, warn } = require('./log')('proton-i18n');\nconst { bash } = require('./c... | javascript | chosen |
[
{
"from": "system",
"value": "Move to chrome for tests\n"
},
{
"from": "human",
"value": "define([\n './intern'\n], function(intern) {\n intern.tunnel = 'NullTunnel';\n intern.tunnelOptions = {\n hostname: 'localhost',\n port: 4444\n };\n\n intern.environments = [{\n... | javascript | chosen |
[
{
"from": "system",
"value": "Set correct image size in detail view."
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { View, Text, Image } from 'react-native'\nimport { STYLES } from '../../base_styles';\nimport Icon from 'react-native-vector-icons/MaterialIcons... | javascript | chosen |
[
{
"from": "system",
"value": "Add a test for 100% code coverage.\n\nI recently landed a PR for new features without adding tests.\nThis is bad. The tests & tooling should shout at me for this.\n\ncc @dfellis thanks for teaching me this trick.\n"
},
{
"from": "human",
"value": "require('./uncaugh... | javascript | chosen |
[
{
"from": "system",
"value": "Remove absolute paths which were unnecessary and broke dist builds\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\nvar webpackSettings = require('./webpack-helper');\n\nmodule.exports = webpackSettings({\n entry: {... | javascript | chosen |
[
{
"from": "system",
"value": "Align input and not input text\n"
},
{
"from": "human",
"value": "import Theme from 'config/theme';\nimport { StyleSheet } from 'react-native';\n\nexport default StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: Theme.background.main\n },\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix null reference in figure referencing.\n"
},
{
"from": "human",
"value": "define([\"showdown/showdown\", \"showdown/extensions/table\"], function() {\n\n\n\treturn [\"$parse\", \"$compile\", function($parse, $compile) {\n\n\n\t\treturn {\n\n\t\t\trestrict: 'A',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Correct improper overrides in walmart/test\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar _ = require('lodash');\n\nmodule.exports = _.merge({\n env: { mocha: true }\n },\n require('./es6.js'),\n require('../../environments/test.js')\n);\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up JS a bit\n"
},
{
"from": "human",
"value": "$(function () {\n 'use strict';\n\n var sidebarButtonA = $('.sidebar-header-bills');\n var sidebarButtonB = $('.sidebar-header-resources');\n var sidebarContentA = $('.sidebar-content-bills');\n var sidebarCo... | javascript | chosen |
[
{
"from": "system",
"value": "Update teacher survey count script\n"
},
{
"from": "human",
"value": " // Print out teacher survey counts by day\n\n// Usage:\n// mongo <address>:<port>/<database> <script file> -u <username> -p <password>\n\nvar surveyDayMap = {};\nvar cursor = db['trial.requests']... | javascript | chosen |
[
{
"from": "system",
"value": "Replace array by counter value in throttler\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { Transform } = require('stream');\n\nmodule.exports = class Throttler extends Transform {\n constructor (pgstream, ...args) {\n super(...args);\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update map state to props to destructure meals\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { connect } from 'react-redux'\nimport Meal from '../views/Meal'\nimport NewMeal from '../components/NewMeal'\nimport { Container } fro... | javascript | chosen |
[
{
"from": "system",
"value": "Save and restore the page you are on when quitting / restoring the player\n"
},
{
"from": "human",
"value": "import { remote } from 'electron';\n\nconst webview = document.querySelector('webview');\n\nif (webview) {\n let once = true;\n webview.addEventListener('d... | javascript | chosen |
[
{
"from": "system",
"value": "Update store blueprint as per docs\n"
},
{
"from": "human",
"value": "/*\n * @fileOverview\n * @author: Mike Grabowski (@grabbou)\n */\n\n'use strict';\n\nvar Promise = require('bluebird');\nvar Blueprint = require('../../lib/models/blueprint');\n\nmodule.exports = ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix screenshot update not creating dir bug\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Promise = require('bluebird');\n\nvar fsP = require('../promisified/fsP');\nvar outputDiffP = require('../promisified/outputDiffP');\n\nfunction update(buf, p) {\n fs... | javascript | chosen |
[
{
"from": "system",
"value": "[TASK] Use correct URL in routing requests\n"
},
{
"from": "human",
"value": "drawRouteCallback = function (jsonData) {\n\tvar node;\n\tvar trafficLightIcon = L.icon({\n\t\ticonUrl: './img/traffic_light.png',\n\t\tshadowSize: [50, 64],\n\t\tshadowAnchor: [4, 62],\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix improper setting of loginButtonText's innerText property\n"
},
{
"from": "human",
"value": "/**\n * Check if user is logged in\n */\nfunction authUser() {\n fetch('/login')\n .then(response => response.json())\n .then(userAuthInfo => {\n let ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable smartypants mode on marked\n"
},
{
"from": "human",
"value": "const renderer = new marked.Renderer();\nconst katexOpts = {\n throwOnError: false,\n errorColor: '#F44336',\n};\nrenderer.code = function(code) {\n const r = katex.renderToString(code, {\n d... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unecessary action type check\n"
},
{
"from": "human",
"value": "import { LOCATION_CHANGE, CALL_HISTORY_METHOD, push } from 'react-router-redux';\n\nexport default store => next => action => {\n // Can only access test page if test data is prepared\n if ((ac... | javascript | chosen |
[
{
"from": "system",
"value": "Set output.exports to make rollup happy\n"
},
{
"from": "human",
"value": "// @ts-check\n\nimport resolve from '@rollup/plugin-node-resolve';\nimport commonjs from '@rollup/plugin-commonjs';\nimport nodeBuiltins from 'builtin-modules';\n\n/** @type { import('rollup'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix parseNumber in case of 3 numbers after decimal dot\n"
},
{
"from": "human",
"value": "\nif (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\n module.exports = parseNumber;\n}\n\nvar numberRegexp = new RegExp('^(?:((?:\\\\d{1,3}(?:\\\... | javascript | chosen |
[
{
"from": "system",
"value": "Disable $q unhandled rejection exceptions\n\nEver since our Angular 1.5.9 upgrade we have seen exceptions when\nclosing modals. This stems from some of our dependencies not handling\nrejections when using the `$q` service which effectively puts it out of\nour control.\n\nSince ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix path for collection entrypoint\n\nSigned-off-by: Julius Härtl <bf353fa4999f2f148afcc6d8ee6cb1ee74cc07c3@bitgrid.net>\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst { VueLoaderPlugin } = require('vue-loader');\n\nmodule.exports = {\n\tent... | javascript | chosen |
[
{
"from": "system",
"value": "Change orientationchange events to be async\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar withObservable = require(\"../common/withObservable\");\nvar debounceUpdateListener = require(\"../common/debounceUpdateListener\");\n\n\nvar layoutService = withOb... | javascript | chosen |
[
{
"from": "system",
"value": "Fix section listing on Firefox.\n\nSupport browsers, like Firefox, that don't support innerText function\ncall. They call it textContent there. Weirdos.\n"
},
{
"from": "human",
"value": "function create_section_listing() {\n $('div#sidebar h3').click(function(e) {... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Do not clear input field when receiving message\"\n\nThis reverts commit 6e64d42b1a8deffadd325c43eb1184eb0b56a92c.\n"
},
{
"from": "human",
"value": "//= require action_cable\n//= require_self\n//= require_tree .\n\nthis.App = {};\n\nApp.cable = ActionCable... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to Mendeley export single record workaround\n"
},
{
"from": "human",
"value": "(function ($) {\n // Attach Mendeley functionality to \"Save to Mendeley\" buttons\n $(function () {\n $('body').on('click', '.save-to-mendeley', function () {\n var script ... | javascript | chosen |
[
{
"from": "system",
"value": "Add alias for dash_banner directory\n"
},
{
"from": "human",
"value": "var webpack = require(\"webpack\");\nvar path = require(\"path\");\n\nconst PROJECT_ROOT = path.resolve(__dirname);\n\nmodule.exports = {\n entry: [\n \"./bower_components/underscore/undersco... | javascript | chosen |
[
{
"from": "system",
"value": "Fix handling projectTemplate with no name\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport C from 'ui/utils/constants';\n\nexport default Ember.Route.extend({\n catalog: Ember.inject.service(),\n allServices: Ember.inject.service(),\n\n model... | javascript | chosen |
[
{
"from": "system",
"value": "Add logic for password input validation\n"
},
{
"from": "human",
"value": "import models from './../models';\n\nconst User = models.User;\n\nmodule.exports = {\n signin(req, res, next) {\n const username = req.body.username;\n const password = req.body.passwo... | javascript | chosen |
[
{
"from": "system",
"value": "Update Centering decorator to use `minHeight`\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst styles = {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n height: '100vh',\n};\n\nexport default storyFn =>\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Extend the optionset to include ref\n\nThe ref parameter expects a function which will be given the instance to the rendered component."
},
{
"from": "human",
"value": "(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define(['kn... | javascript | chosen |
[
{
"from": "system",
"value": "persist: Refactor slightly to look more like v5-using code.\n\nThis is a pure refactor that just reorganizes the code slightly. This\nversion is perhaps cleaner in itself; but what really motivates the\nchange is to make it look more like what we'll have for using\nredux-persi... | javascript | chosen |
[
{
"from": "system",
"value": "Remove contents of cluster on change\n\nFixes #166\n"
},
{
"from": "human",
"value": "var util = require(\"./util\"),\n addLabel = require(\"./label/add-label\");\n\nmodule.exports = createClusters;\n\nfunction createClusters(selection, g) {\n var clusters = g.n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary traversing of block before expand\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gonzales = require('gonzales-pe'),\n helpers = require('../helpers');\n\nmodule.exports = {\n 'name': 'no-extend',\n 'defaults': {},\n 'detect': functi... | javascript | chosen |
[
{
"from": "system",
"value": "Chrome: Throw an exception when a localised string is not found\n"
},
{
"from": "human",
"value": "/**\n * The MIT License\n *\n * Copyright (c) 2010 Steven G. Brown\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this sof... | javascript | chosen |
[
{
"from": "system",
"value": "Remove mnt patch from non-windows now that FLIF-WASM fixed /mnt/ bug\n"
},
{
"from": "human",
"value": "/* eslint-disable no-multi-spaces */\n\nfunction test () {\n var runAllTests = require('../testers/loopOverAllTestSets.js');\n var testName = 'identify';\n ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.