conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Improve the sticky banner scroll detection.\n"
},
{
"from": "human",
"value": "$(function () {\n var isElementOnScreen = function($el, scrollTop) {\n // Get very bottom of element\n var elementBottom = $el.offset().top + $el.outerHeight();\n // Get very to... | javascript | chosen |
[
{
"from": "system",
"value": "Change AddListing title field from textarea\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Form } from 'semantic-ui-react';\n\nexport const ListingTitle = ({ title, onChange }) => {\n return (\n <Form.TextArea\n rows=\"1\"\n cl... | javascript | chosen |
[
{
"from": "system",
"value": "Set up old data conversion on update\n\n- we'll probably remove this after the first update?\n- either way, if it's left and runs a second time, it will still run fine without the data in local storage without doing anything\n"
},
{
"from": "human",
"value": "import... | javascript | chosen |
[
{
"from": "system",
"value": "Add method to add a complete manga\n"
},
{
"from": "human",
"value": "MangasData = new Mongo.Collection('mangasData');\n"
},
{
"from": "gpt",
"value": "MangasData = new Mongo.Collection('mangasData');\n\nMeteor.methods({\n\taddCompleteMangas: function(se... | javascript | chosen |
[
{
"from": "system",
"value": "Fix minor typo in JSONFormatter comment\n\nSigned-off-by: Daniel Bevenius <ae63d1d4d7994483a3e520cafec7a829fe25c0a1@gmail.com>\n"
},
{
"from": "human",
"value": "\nfunction JSONFormatter(){\n\n}\n\n/*\n * Every internal data structure are JSON by nature, them\n * no... | javascript | chosen |
[
{
"from": "system",
"value": "Fix header link on GitHub pages\n\nThe public URL on GH pages is /etmobile, not /.\n"
},
{
"from": "human",
"value": "import React from 'react';\n\n// <a /> should be a <Link /> to avoid reloading the page, but avoids having to\n// wrap many tests in a <MemoryRouter... | javascript | chosen |
[
{
"from": "system",
"value": "Check path for safe uri\n\n\nFormer-commit-id: f359bd81b4764b394025af1322575fc3b2ea3837"
},
{
"from": "human",
"value": "function checkPathParsed (uri) {\n if (uri.charAt(0) !== '/') {\n uri = '/' + uri;\n }\n var safeUrl;\n var myUrl = parseURL(uri);\n if (... | javascript | chosen |
[
{
"from": "system",
"value": "Add settings to svg sprite task\n"
},
{
"from": "human",
"value": "'use strict';\n\nif (!config.tasks.svgSprite) {\n\treturn false;\n}\n\nconst svgstore = require('gulp-svgstore');\nlet paths = {\n\tsrc: path.join(config.root.base, config.root.src, config.tasks.svgS... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor wallet receive page to work with new ui store\n"
},
{
"from": "human",
"value": "// @flow\nimport React, { Component, PropTypes } from 'react';\nimport { observer } from 'mobx-react';\nimport WalletReceive from '../../components/wallet/WalletReceive';\n\n@o... | javascript | chosen |
[
{
"from": "system",
"value": "Fix lack of value variable in Number validator\n"
},
{
"from": "human",
"value": "Astro.createValidator({\n name: 'number',\n validate: function() {\n return !_.isNaN(value) && _.isNumber(value);\n },\n events: {\n validationerror: function(e) {\n var... | javascript | chosen |
[
{
"from": "system",
"value": "Check for git prior to calling shell.exec\n"
},
{
"from": "human",
"value": "'use strict';\nvar shell = require('shelljs');\n\nvar nameCache = {};\nvar emailCache = {};\n\n/**\n * @mixin\n * @alias actions/user\n */\nvar user = module.exports;\n\n/**\n * Git related... | javascript | chosen |
[
{
"from": "system",
"value": "Change injection method to append\n"
},
{
"from": "human",
"value": "(function() {\r\n const IS_LOCAL = !!(localStorage[\"ultratypedev\"]),\r\n URL_REMOTE = \"https://rawgit.com/ultratype/UltraTypeBot/master/OUT/OUT.js\",\r\n URL_OUT = IS_LOCAL ? ch... | javascript | chosen |
[
{
"from": "system",
"value": "Add createElementNS, just calls createElement\n"
},
{
"from": "human",
"value": "var Element = require('./Element')\nvar Window = require('./Window')\n\nvar ReactFauxDOM = {\n Element: Element,\n defaultView: Window,\n createElement: function (nodeName) {\n re... | javascript | chosen |
[
{
"from": "system",
"value": "Fix token getter and improve error reporting\n"
},
{
"from": "human",
"value": "import React, {Component, PropTypes} from 'react';\nimport lodash from 'lodash';\n\nexport function listeningTo(storeTokens, getter) {\n return decorator;\n\n function decorator(Ch... | javascript | chosen |
[
{
"from": "system",
"value": "Read files in raw buffers instead of binary strings\n"
},
{
"from": "human",
"value": "'use strict';\nvar fs = require('fs')\n , request = require('./request');\n\nexports.getContentsFromFile = function(file, callback) {\n fs.readFile(file, 'binary', functi... | javascript | chosen |
[
{
"from": "system",
"value": "Change the way to initialize session in order to suppress error message.\n"
},
{
"from": "human",
"value": "/// <reference path=\"../typings/node/node.d.ts\" />\n/// <reference path=\"../typings/express/express.d.ts\" />\n/// <reference path=\"../typings/express-ses... | javascript | chosen |
[
{
"from": "system",
"value": "Correct url to project details\n"
},
{
"from": "human",
"value": "define(['app', 'bloodhound'], function(app, Bloodhound) {\n 'use strict';\n\n return {\n parent: 'admin_layout',\n url: 'new/project/',\n templateUrl: 'partials/admin/project-create.html',\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove attributes and defaults in favor of init implementation\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport { createAttributesObject } from 'ui-library/utils/create-attributes-object';\n\nconst { Mixin, get, setProperties } = Ember;\n\nexpor... | javascript | chosen |
[
{
"from": "system",
"value": "Support Message Type of CONNECT\n"
},
{
"from": "human",
"value": "var assert = require('assert');\n\nvar messageTypes = {\n RESERVED : 0\n}\n\nfunction parseMessageType(inputBuffer){\n var firstByte = inputBuffer.readUInt8(0);\n var fourBitTransformation = ((0xf... | javascript | chosen |
[
{
"from": "system",
"value": "Add option to provide callback for request, ok and error actions\n\nThe callbacks are passed dispatch and getState along with the other\narguments.\n"
},
{
"from": "human",
"value": "import {createAction} from 'redux-act'\nimport _defaults from 'lodash.defaults';\n\... | javascript | chosen |
[
{
"from": "system",
"value": "refactor(babel): Remove direct transform runtime requirement and turn on the userBuiltIns flag for b\n"
},
{
"from": "human",
"value": "const addExports = require('babel-plugin-add-module-exports')\nconst babelEnv = require('@babel/preset-env')\nconst flow = require... | javascript | chosen |
[
{
"from": "system",
"value": ":memo: Enable Ghost Instance Context Menu\n\n- Enables the context menu in Ghost instances\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * This file is being preloaded in Ghost Instances.\n * ⚠ Remember: No jQuery! ⚠\n */\n\n/**\n * Simple timeout functi... | javascript | chosen |
[
{
"from": "system",
"value": "Change default language to zh-CN\n"
},
{
"from": "human",
"value": "'use strict';\n\nexport default function($translateProvider, $mdIconProvider) {\n 'ngInject';\n // put your common app configurations here\n\n // register icons from outsides\n $mdIconProvider\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use arrow notation for anonymous test functions\n"
},
{
"from": "human",
"value": "/*\n * biojs-io-biom\n * https://github.com/iimog/biojs-io-biom\n *\n * Copyright (c) 2015 Markus J. Ankenbrand\n * Licensed under the MIT license.\n */\n\n// chai is an assertion lib... | javascript | chosen |
[
{
"from": "system",
"value": "Remove stale options from open test\n"
},
{
"from": "human",
"value": "var amok = require('../');\nvar test = require('tape');\n\ntest('open chrome', function(t) {\n var client = amok.open('chrome', ['about:blank'], options);\n client.on('ready', function() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert change to watch script invocation\n"
},
{
"from": "human",
"value": "var childProcess = require('child_process');\nvar fs = require('fs-extra');\nvar glob = require('glob');\nvar path = require('path');\nvar sortPackageJson = require('sort-package-json');\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use hasOwnProperty instead of in keyword\n"
},
{
"from": "human",
"value": "function format (string) {\n /*eslint-disable no-unused-vars*/\n const [ _, action, state ] = `${ string }`.match(/(\\w*)\\_\\d+\\_(\\w*)/, ' ') || []\n /*eslint-enable no-unused-vars*/\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove bubbles when animation is done.\n"
},
{
"from": "human",
"value": "$(function() {\n function randomInt (min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n\n function newBubble () {\n var radius = randomInt(10, 208);\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Reconnect tab debugger when it gets detached.\n"
},
{
"from": "human",
"value": "function _attach(tabId) {\n var protocolVersion = '1.1';\n\n return new Promise((resolve, reject) => {\n chrome.debugger.attach({\n tabId: tabId\n }, protocolVersion, () =>... | javascript | chosen |
[
{
"from": "system",
"value": "Fix case insensitive import of FritzBoxAPI.js\n\nOn case sensitive filesystems (e.g. when running on a Raspberry Pi), the `require` failed since the file is called `FritzBoxAPI.js` instead of `FritzBoxApi.js`."
},
{
"from": "human",
"value": "\"use strict\";\nvar ex... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for dataset health score table\n"
},
{
"from": "human",
"value": "import { module, test } from 'qunit';\nimport { setupRenderingTest } from 'ember-qunit';\nimport { render } from '@ember/test-helpers';\nimport hbs from 'htmlbars-inline-precompile';\n\nmodu... | javascript | chosen |
[
{
"from": "system",
"value": "Add vanilla Js DOMContentLoaded event\n"
},
{
"from": "human",
"value": "/**\n* Open external links in new tabs automatically\n*/\n\nvar links = document.links;\n\nfor (var i = 0; i < links.length; i++) {\n if (links[i].hostname != window.location.hostname) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for bug where path variable did not exist\n"
},
{
"from": "human",
"value": "var Package = require('dgeni').Package;\n\n/**\n * @dgPackage examples-ext\n * @description Extensions for the dgeni-packages/examples\n */\nmodule.exports = new Package('examples-ext',... | javascript | chosen |
[
{
"from": "system",
"value": "Update Help Intent with new Instruction\n"
},
{
"from": "human",
"value": "module.exports = HelpIntentFunction\n\n// Purpose: To provide the user with more information on how to use the skill\n// param (in): intent: given by Alexa, allows code to access parts of the... | javascript | chosen |
[
{
"from": "system",
"value": "Use new 'tags' property instead of old 'tagged' property on posts\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport Tags from '../Tags';\nimport StatusButton from '../StatusButton';\n\nclass ReviewBlock extends React.Component {\n setStatus(st... | javascript | chosen |
[
{
"from": "system",
"value": "Make dummy dancer data and export it\n"
},
{
"from": "human",
"value": "const makeDancer = (mass, x, y, z) => ({ mass, position: [x, y, z] });\nmodule.export = [\n makeDancer(100, -3, 4, -8),\n makeDancer(200, -2, -1, -12),\n makeDancer(700, 3, 2, -8),\n makeDan... | javascript | chosen |
[
{
"from": "system",
"value": "Change how the path is set for Express\n"
},
{
"from": "human",
"value": "/* \n * This file exports the configuration Express.js back to the application\n * so that it can be used in other parts of the product.\n */\n\nvar path = require('path');\nvar logger = requi... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments for hello word controller\n"
},
{
"from": "human",
"value": "const winston = require('winston');\n\n/**\n * Says Hello World and compute 1+1.\n *\n * @param req Request\n * @param res Response\n * @return {Promise.<void>} Nothing\n */\nasync function s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix use the document as the proxy for jquery\nWe proxy the jquery object. This lets us use the jQuery that FCC\nuses in the iframe.\n\nSince jQuery sets the context, the main document object or DOM, at script\nload, we need to create a proxy with the context of the iframe,\nthe... | javascript | chosen |
[
{
"from": "system",
"value": "Return current domain if the document.referrer is empty string (dynamic iframe created)\n"
},
{
"from": "human",
"value": "\nimport util from './util';\n\n/**\n * @namespace\n *\n */\nvar urlUtils = {\n\n /***\n * @param {String} url\n * @type String\n */\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor split one ‘it’ block that was testing two things into two ’it blocks’\n"
},
{
"from": "human",
"value": "import setCurrentScreenAction from \"src/actions/ScreenActions.js\";\nimport { SET_CURRENT_SCREEN, MENU_SCREEN,\n GAME_SCREEN} from \"src/action... | javascript | chosen |
[
{
"from": "system",
"value": "Improve logging from errors in LLVM tests\n"
},
{
"from": "human",
"value": "var expect = require('expect.js'),\n child_process = require('child_process')\n\nfunction spawnSync (cmd, args, input) {\n var opts = {\n stdio: 'pipe',\n env: process.en... | javascript | chosen |
[
{
"from": "system",
"value": "Support since_id param on .more() calls\n"
},
{
"from": "human",
"value": "YUI.add(\"model-list-list-tweets\", function(Y) {\n \"use strict\";\n \n var tristis = Y.namespace(\"Tristis\"),\n models = Y.namespace(\"Tristis.Models\"),\n \n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable ripple-lib in Safari iOS < 5 and Safari Mac < 6.\n\nActively disabling support for these browsers allows us to catch and report the\nproblem rather than trying to connect and failing for unknown reasons.\n"
},
{
"from": "human",
"value": "// If there is no W... | javascript | chosen |
[
{
"from": "system",
"value": "Hide notification about talent images\n"
},
{
"from": "human",
"value": "import { CLOSE_NOTIFICATION } from '../constants';\n\nconst initialState = {\n isClosed: false,\n notes: []\n}\n\nexport default function update(state = initialState, action) {\n if(action.t... | javascript | chosen |
[
{
"from": "system",
"value": "Add server folder copy to build\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst extractSass = new ExtractTextPlugin({\n filename: '[nam... | javascript | chosen |
[
{
"from": "system",
"value": "Use normal exports here, not messing with the modules.exports\n"
},
{
"from": "human",
"value": "/*\n * Licensed to Cloudkick, Inc ('Cloudkick') under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove sources from source maps.\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\nconst glob = require('glob');\nconst pkg = require('./package.json');\n\n\nfunction newConfig() {\n return {\n resolve: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Solve a problema with Webpack 4\n"
},
{
"from": "human",
"value": "const path = require('path')\nconst UglifyjsPlugin = require('uglifyjs-webpack-plugin')\nconst BannerPlugin = require('webpack').BannerPlugin\nconst { name, version, author } = require('./package.jso... | javascript | chosen |
[
{
"from": "system",
"value": "Use include over exclude so npm link works\n"
},
{
"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": "Fix the port env variable\n"
},
{
"from": "human",
"value": "module.exports = {\n server: {\n port: process.env.NODE_PORT || 8080\n , host: null\n }\n};\n"
},
{
"from": "gpt",
"value": "module.exports = {\n server: {\n port: p... | javascript | chosen |
[
{
"from": "system",
"value": "Remove needless providing for jQuery\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n index: './src/js/index.js',\n options: './src/js/options.js'\n },\n output: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Split the removal of pro from session and db into separate functions\n\nBoth now use promises keeping flow control simple and less buggy\n"
},
{
"from": "human",
"value": "'use strict';\nvar models = require('../../models');\nvar sessionStore = require('../../app').... | javascript | chosen |
[
{
"from": "system",
"value": "Use index instead of shifting data\n"
},
{
"from": "human",
"value": "window.AdventOfCode.Day8 = ( input ) =>\n{\n\tinput = input.split( ' ' ).map( x => +x );\n\n\tlet part1 = 0;\n\n\tconst process = () =>\n\t{\n\t\tconst childrenSize = input.shift();\n\t\tconst met... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Buble classes being transpiled to variable\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport transform from './transform'\nimport errorBoundary from './errorBoundary'\nimport evalCode from './evalCode'\n\nexport const generateElement = (\n { ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix publicPath for assets in dev mode\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\nvar path = require('path');\nvar webpack = require('webpack');\nvar getWebpackConfig = require('./webpack.config.js');\n\nvar devConfig = _.assign(getWebpackConfig()... | javascript | chosen |
[
{
"from": "system",
"value": "Fix distinct asset in the basket.\n"
},
{
"from": "human",
"value": "\"use strict\";\r\n\r\n(function () {\r\n angular\r\n .module(\"conpa\")\r\n .factory(\"basketService\", basketService);\r\n\r\n function basketService() {\r\n var assets... | javascript | chosen |
[
{
"from": "system",
"value": "Improve error behaviour in webpack dev server boot\n"
},
{
"from": "human",
"value": "import url from 'url'\n\nimport webpack from 'webpack'\nimport WebpackDevServer from 'webpack-dev-server'\n\nimport webpackDevConfig from '../../webpack.config.dev'\n\n\nconst publ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove last message after new sending\n"
},
{
"from": "human",
"value": "(function ($, Vue, marked) {\n /* eslint-disable no-console */\n\n 'use strict';\n\n Vue.filter('marked', marked);\n\n new Vue({\n el: '#mail-form',\n data: {\n busy: false,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add http error 415 Unsupported Media Type\n"
},
{
"from": "human",
"value": "// Copyright 2012 Mark Cavage, Inc. All rights reserved.\n\nvar jsonParser = require('./json_body_parser');\nvar formParser = require('./form_body_parser');\nvar multipartParser = require(... | javascript | chosen |
[
{
"from": "system",
"value": "Fix segmentation fault on linux\n"
},
{
"from": "human",
"value": "const DBus = require('dbus');\n\nfunction executeMediaKey(win, key) {\n win.webContents.executeJavaScript(`\n window.electronConnector.emit('${key}')\n `);\n}\n\nfunction registerBindings(win, d... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for modules with null [[Prototype]] chain\n\nA module created in the following ways:\n\nmodule.exports = Object.create(null)\nmodule.exports = { __proto__: null }\n\nwon't have hasOwnProperty() available on it.\n\nSo it’s safer to use Object.prototype.hasOwnProperty.call(my... | javascript | chosen |
[
{
"from": "system",
"value": "Set a correct controller name\n"
},
{
"from": "human",
"value": "/**\n * @file Instantiates and configures angular modules for your module.\n */\ndefine(['angular'], function (ng) {\n 'use strict';\n\n ng.module('{{template_name}}.controllers', []);\n ng.module('... | javascript | chosen |
[
{
"from": "system",
"value": "Add units and different translation types to translate from position effect\n"
},
{
"from": "human",
"value": "import { SplashEffect } from \"./effect.js\";\nimport { Linear } from \"../interpolation.js\";\n\nexport class TranslateFromPosition extends SplashEffect {... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused dependencies from AMD testing.\n"
},
{
"from": "human",
"value": "var require = {\n paths: {\n \"power-assert\": \"../build/power-assert\",\n expect: \"../bower_components/expect/index\",\n \"power-assert-formatter\": \"../bower... | javascript | chosen |
[
{
"from": "system",
"value": "Fix button block new tab bug.\n"
},
{
"from": "human",
"value": "/* @flow */\nimport React from 'react';\nimport Button from 'grommet/components/Button';\nimport Anchor from 'grommet/components/Anchor';\nimport type { AssetType, ButtonType } from './BlockButtonForm'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix directory path memory stats test\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar MemoryStats = require('../../lib/models/memory_stats')\n , SQliteAdapter = require('../../lib/models/sqlite_adapter')\n , chai = require('chai')\n , expect = chai.expect\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix JS-Include in dummy app\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/javascripts, ve... | javascript | chosen |
[
{
"from": "system",
"value": "Use separate block to specify CSS classes in show item view.\n\nThis is required to cope with a bug found in webkit-based browsers\n(e.g. Chrome, Safari) which produced a corrupt highlighted text\nupon both double-click and triple-click selection.\n"
},
{
"from": "human... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor HttpThrottlingView to be defined inside an anonymous namespace.\n\nBUG=90857\nReview URL: http://codereview.chromium.org/7544009\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@94909 0039d316-1c4b-4281-b951-d872f2087c98\n"
},
{
"from": "human",
"val... | javascript | chosen |
[
{
"from": "system",
"value": "Send proper path to views\n"
},
{
"from": "human",
"value": "var path = require(\"path\"),\n Files = require(\"../modules\"),\n config = require(\"../config\"),\n root_dir = config.get(\"root_dir\") + '/';\n\n// Parse the request path and figure out how to ... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing export for {{join}} helper\n"
},
{
"from": "human",
"value": "export { default as ComputeHelper } from './helpers/compute';\nexport { default as PipeHelper } from './helpers/pipe';\nexport { default as MapByHelper } from './helpers/map-by';\nexport { def... | javascript | chosen |
[
{
"from": "system",
"value": "Change server port to be node convention\n"
},
{
"from": "human",
"value": "/* eslint-disable import/no-extraneous-dependencies */\n\nconst path = require('path');\nconst express = require('express');\nconst webpack = require('webpack');\nconst config = require('../... | javascript | chosen |
[
{
"from": "system",
"value": "Add API to get one story\n"
},
{
"from": "human",
"value": "var State = require('./state')\nvar Story = require('./model/story')\n\nmodule.exports = function (router) {\n router.get('/stories/list', function (req, res, next) {\n Story.find((err, stories) => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Add newlines to amd shim\"\n\nThis reverts commit 2443acc1f8881735f2eab0cb6384fe5e9723f52a.\n"
},
{
"from": "human",
"value": "'use strict';\nvar stew = require('broccoli-stew');\n\nmodule.exports = function shimAmd(tree, nameMapping) {\n return stew.map(t... | javascript | chosen |
[
{
"from": "system",
"value": "Prepend sign in button to dashboard.html\n"
},
{
"from": "human",
"value": "function createClassroom() {\n var auth2 = gapi.auth2.getAuthInstance();\n var name = \"\";\n var email = \"\";\n if (auth2.isSignedIn.get()) {\n var name = auth2.currentU... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for error: Cannot find module '../modules' when --ls specified.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar fs = require('fs');\nvar version = JSON.parse(fs.readFileSync(__dirname + '/../package.json', 'utf8')).version\n\nvar opt = require('opt... | javascript | chosen |
[
{
"from": "system",
"value": "Maintain current speed if user cancels out."
},
{
"from": "human",
"value": "var media = document.querySelectorAll('video, audio');\nvar rate = prompt('Speed? Currently playing back at ' + media[0].playbackRate + 'x.','');\nArray.prototype.forEach.call(media, functi... | javascript | chosen |
[
{
"from": "system",
"value": "Clean global themes after themability test\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { expect } from 'chai';\nimport TestUtils from 'react-addons-test-utils';\nimport * as components from 'components';\n\ndescribe('themability', () => {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the ‘Cannot read property 'content' of undefined’ error.\n"
},
{
"from": "human",
"value": "import protagonist from 'protagonist';\n\nexport default function parseMson(mson, cb) {\n protagonist.parse(mson.trim(), (err, parseResult) => {\n let dataStructureEl... | javascript | chosen |
[
{
"from": "system",
"value": "[NAPI-22] Revert the last change, as that removes the req and err serializers\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2012, Joyent, Inc. All rights reserved.\n *\n * Main entry-point for the Networking API.\n */\n\nvar napi = require('./lib/napi');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add prod config for scraper\n"
},
{
"from": "human",
"value": "var config = module.exports = require('./config_defaults.js');\n\nconfig.fundraising_file = '/home/ec2-user/tcbr/fundraising-total.txt'\n\n// config.logger.scraper = {\n// \tname: \"pixo-scraper\",\n// ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove port to automatically scan for a port\n\nwebpack-dev-server will automatically scan for a port (starting at the default 8080) if you don't specify a port.\n"
},
{
"from": "human",
"value": "/* global __dirname */\nrequire('es6-promise').polyfill();\n\nconst p... | javascript | chosen |
[
{
"from": "system",
"value": "Expand Keys enum to include: backspace, delete, and insert.\nRELNOTES: n/a\n\nPiperOrigin-RevId: 315440495\n"
},
{
"from": "human",
"value": "/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileove... | javascript | chosen |
[
{
"from": "system",
"value": "Bugfix: Correct call to answer method\n"
},
{
"from": "human",
"value": "if (typeof define !== 'function') { var define = require('amdefine')(module); }\nif (typeof expect !== 'function') { var expect = require('expect.js'); }\n\ndefine([\n 'app/flowControl'\n], fu... | javascript | chosen |
[
{
"from": "system",
"value": "Copy formatted text to clipboard\n"
},
{
"from": "human",
"value": "const { clipboard, ipcRenderer } = require('electron');\nconst beautify_js = require('js-beautify');\nconst lang = require('language-classifier');\n\nipcRenderer.on('shortcut-hit', (event, arg) => {... | javascript | chosen |
[
{
"from": "system",
"value": "Use subsitution for bundle names\n"
},
{
"from": "human",
"value": "const path = require('path');\nconst webpack = require('webpack');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\n\nmodule.exports = {\n\n entry: [\n 'webpack-dev-server/client?http... | javascript | chosen |
[
{
"from": "system",
"value": "Add onclick and ondblclick event listeners\n\nMake named functions so listener can be removed.\n"
},
{
"from": "human",
"value": "const elements = document.querySelectorAll('bracket-less');\n\n// when paused will collapse text to (...)\n// when playing doesn't cause... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Use absolute path for auth0 callback\n"
},
{
"from": "human",
"value": "import { auth0 } from '../../config/secrets';\nimport { homeLocation } from '../../config/env';\n\nconst { clientID, clientSecret, domain } = auth0;\n\nconst successRedirect = `${homeLocati... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust Polling Interval and Implement Data Read\n\n5 second polling interval\n"
},
{
"from": "human",
"value": "const OBEX_utils = require('./obex_utils'),\n\t sleep = require('./sleep');\n\n(function pollForNewData(){\n\tconst device = OBEX_utils.mount(process.arg... | javascript | chosen |
[
{
"from": "system",
"value": "Change to eval mode source map\n"
},
{
"from": "human",
"value": "import path from 'path';\nimport webpack from 'webpack';\n\nconst buildPath = path.resolve(__dirname, 'dist');\nconst clientPath = path.resolve(__dirname, 'src', 'client.js');\n\nconst devPlugins = [\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix storage manager returning wrong level result\n"
},
{
"from": "human",
"value": "function StorageManager(storageMethod) {\n this.storageMethod = storageMethod;\n}\n\nStorageManager.prototype.setCurrentLevel = function(level) {\n this.storageMethod.setItem('... | javascript | chosen |
[
{
"from": "system",
"value": "Call log() function - testing functionallity.\n"
},
{
"from": "human",
"value": "/*\n * I am working on this\n */\n(function() {\n var test = \"test\",\n test2 = \"test2\";\n\n function log() {\n console.log(test + \" - \" + test2);\n }\n})()"... | javascript | chosen |
[
{
"from": "system",
"value": "Call placePath() on each iteration of evolve.\n"
},
{
"from": "human",
"value": "genotower.geneticAlgorithm = {\n\n evolve : function () {\n genotower.generation.mutateGenome(genotower.towers);\n genotower.generation.mutateGenome(genotower.walls);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'arguments' to check for variable arguments\n"
},
{
"from": "human",
"value": "angular.module('mqWebApp').provider('mqWebQueue', {\n\tqmgr : '',\n\t\n\t$get : ['$http', function($http) {\n\t\treturn {\n\t\t\tgetQueueManager : function() {\n\t\t\t\treturn qmgr;\n... | javascript | chosen |
[
{
"from": "system",
"value": "recent_topics: Return false in `is_in_focus` if a modal is present.\n\nThis prevents a bug where keypresses are received by recent_topics view\neven if a modal is present on it, which prevents, for instance, the modal\nfrom receiving text input.\n"
},
{
"from": "human",... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to get forecasts by latitude and longitude.\n"
},
{
"from": "human",
"value": "const fmiRequest = require('../lib/fmiRequest');\n\nconst queryId = 'fmi::forecast::hirlam::surface::point::simple';\nexports.queryId = queryId;\nexports.params = ['place'];\... | javascript | chosen |
[
{
"from": "system",
"value": "Check auth status before retrieving notifications\n"
},
{
"from": "human",
"value": "app.directive('pbNotifications', ['Restangular', 'AuthService', 'config', function(Restangular, AuthService, config) {\n return {\n restrict: 'E',\n templateUrl: co... | javascript | chosen |
[
{
"from": "system",
"value": "Add strict option to recursive directory browser\n"
},
{
"from": "human",
"value": "var fs = fs || require('fs');\n\nvar getDirRecursiveSync = function(dir, filelist) {\n\n var files = fs.readdirSync(dir);\n filelist = filelist || [];\n var fileLength = fil... | javascript | chosen |
[
{
"from": "system",
"value": "Add logic to verify the token without doing a database lookup\n\n -- I am hoping to replace passport-jwt, since it kinder\n forces me to do a database lookup every time I want\n to verify the token.\n"
},
{
"from": "human",
"value": "const bcrypt = requi... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.