conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Write some horrible js to show status of orders\n"
},
{
"from": "human",
"value": "$(\".spinner\").addClass(\"hidden\");\n$(\".status\").removeClass(\"hidden\");\n\n$.post(\"https://209.235.214.90/setistatus/checkstatus.asp\", function(data) {\n console.log(data);\... | javascript | chosen |
[
{
"from": "system",
"value": "Bring formified inputs into the world of the filter.\n"
},
{
"from": "human",
"value": "$(function(){\n $('.more-or-less').each(function(i, el) {\n console.log(el);\n $(el).find(\"li a\").click(function() {\n $(el).find(\"button\").html($(this).text() + ' <s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in class declaration\n"
},
{
"from": "human",
"value": "import React, { Pureomponent } from \"react\";\nimport PropTypes from \"prop-types\";\nimport styled from \"styled-components\";\nimport { NonIdealState } from \"@blueprintjs/core\";\nimport Entries fr... | javascript | chosen |
[
{
"from": "system",
"value": "Call CourseInstructorPanel only when having instructors\n"
},
{
"from": "human",
"value": "var CourseCardContentPanel = {\n\n render: function (c_section, fetched_eval) {\n\n var eval_data = (fetched_eval? WSData.iasystem_data(): null);\n var index ... | javascript | chosen |
[
{
"from": "system",
"value": "Move key to correct element\n"
},
{
"from": "human",
"value": "import React from 'react'\n\nimport BlankSlate from './BlankSlate'\nimport EventCard from '../EventCard'\nimport StyledEvents, {\n StyledLink,\n StyledList,\n StyledListItem,\n} from './Events.css'\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Add lastTaskFailure to service config black list\n"
},
{
"from": "human",
"value": "let ServiceConfig = {\n BLACKLIST: [\n 'uris',\n 'ports',\n 'version',\n 'versions',\n 'versionInfo',\n 'deployments',\n 'queue',\n 'tasks',\n 'taskStats'... | javascript | chosen |
[
{
"from": "system",
"value": "Add asset prefix when served as cordova app in android\n"
},
{
"from": "human",
"value": "\nvar v = {\n origin: {\n box: 'https://box.outofindex.com',\n org: 'https://json.varnalab.org'\n // box: 'http://192.168.1.101:3000',\n // org: 'http://192.168.1.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused event from player Controller\n"
},
{
"from": "human",
"value": "export\ndefault class PlayerController {\n\tconstructor($rootScope, $scope, $localStorage, $log, playersStore, playerModel, websocket) {\n\t\t'ngInject';\n\n\t\tthis.$rootScope = $rootScop... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bad version description if no env vars\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar conf = require('./conf');\nvar pjson = require('../package.json');\n\n// variables for views, this must be before the views are rendered and after any necessary reques... | javascript | chosen |
[
{
"from": "system",
"value": "Allow only one review step per mentoring block.\n"
},
{
"from": "human",
"value": "function MentoringWithStepsEdit(runtime, element) {\n \"use strict\";\n // Disable \"add\" buttons when a message of that type already exists:\n var $buttons = $('.add-xblock... | javascript | chosen |
[
{
"from": "system",
"value": "Remove some references to files that don't exist\n"
},
{
"from": "human",
"value": "var pkg = require(\"./package.json\");\n\nmodule.exports = {\n build: require(\"./lib/build\"),\n create: require(\"./lib/create\"),\n config: require(\"./lib/config\"),\n consol... | javascript | chosen |
[
{
"from": "system",
"value": "Make colors more obvious for diff\n\nAt some point we'll want to do custom classes for these.\n"
},
{
"from": "human",
"value": "var jsdiff = require('diff');\n\n// Taken from diff.js\nfunction removeEmpty(array) {\n var ret = [];\n for (var i = 0; i < array.l... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure each app has its own template instance\n\nIf the templates instance is created outside of the configuration block\nthen the hosting app and the instance app both end up sharing the same\ninstance of the templates module. Because both of these apps have an\n'index.html... | javascript | chosen |
[
{
"from": "system",
"value": "Add handling for URL fetch issues.\n"
},
{
"from": "human",
"value": "/**\n * External dependencies\n */\nimport amphtmlValidator from 'amphtml-validator';\nimport fetch from 'node-fetch';\n\nexport async function toHaveValidAMP( path = '/' ) {\n\tconst result = {};... | javascript | chosen |
[
{
"from": "system",
"value": "Change 'toggle' to 'change' to read less oddly.\n"
},
{
"from": "human",
"value": "$(function() {\n $('.js-barchart-table').each(function() {\n $.magnaCharta($(this));\n })\n});\n"
},
{
"from": "gpt",
"value": "$(function() {\n $('.js-bar... | javascript | chosen |
[
{
"from": "system",
"value": "Reorder js libraries for grayscale theme in order to work on heroku\n"
},
{
"from": "human",
"value": "//= require jquery\n//= require jquery_ujs\n//= require bootstrap\n//= require grayscale/grayscale\n//= require grayscale/jquery.easing.min\n\n\n"
},
{
"fr... | javascript | chosen |
[
{
"from": "system",
"value": "config: Update webpack for CSS and JS\n\nRemoved babel from JS loaders (done by local environment). On\nproduction we also will do a babel build before running webpack\nso no need to have it as part of the js loaders.\n\nAdded SASS loading for CSS and the extract text plugin fo... | javascript | chosen |
[
{
"from": "system",
"value": "Remove isValidUrl function and add getValidUrl\n"
},
{
"from": "human",
"value": "\n\nmodule.exports.isValidUrl = function(_url) {\n if (_url && typeof _url === 'string' && (_url.indexOf('amqp://') === 0 || _url.indexOf('amqps://') === 0)) {\n return true;\n }\... | javascript | chosen |
[
{
"from": "system",
"value": "Add config option for WebSockets port\n"
},
{
"from": "human",
"value": "var Reflux = require('reflux');\nvar ApiActions = require('./../actions/ApiActions');\nvar ConfigStore = require('./ConfigStore');\n\nvar buffer = [];\nvar ws = null;\n\nvar ApiStore ... | javascript | chosen |
[
{
"from": "system",
"value": "Adjust validation for API change in validation dependency.\n"
},
{
"from": "human",
"value": "var validate = require('validate');\n\n/**\n * Simple validator plugin.\n *\n * @param {Object} cls The rhom-ified class to extend with validation.\n * @param {Object} sche... | javascript | chosen |
[
{
"from": "system",
"value": ":white_check_mark: Use inputError for json output\n"
},
{
"from": "human",
"value": "// Copyright (c) 2017 The Regents of the University of Michigan.\n// All Rights Reserved. Licensed according to the terms of the Revised\n// BSD License. See LICENSE.txt for details... | javascript | chosen |
[
{
"from": "system",
"value": "Support {parameter} styles in swagger routes\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar routington = require(\"routington\");\n\n/**\n * Generates the checking router from the swagger def\n * @param def {Swagger} The swagger complete definition\n * @r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for Uncaught TypeError: Cannot read property 'match' of undefined\n\nIf no content type provided with function to match request parameters it will fail with specified error\r\n\r\n`\r\nlet nockRequest = nock('https:/...')\r\n .replyContentLength()\r\n .post('/... | javascript | chosen |
[
{
"from": "system",
"value": "Use camelCase for javascript variable names.\n"
},
{
"from": "human",
"value": "$(document).ready(function () { \n var contents_container = $('.js-fixed-content-top')\n if (contents_container.length > 0) {\n var top = $('.js-fixed-content-top').offset().top - ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle 'end' event in the right way"
},
{
"from": "human",
"value": "const Duplex = require('stream').Duplex;\nconst Transform = require('stream').Transform;\nconst JlTransform = require('./JlTransform');\n\nclass JlTransformsChain extends Transform\n{\n\tconstructo... | javascript | chosen |
[
{
"from": "system",
"value": "Use spaces instead of tabs\n"
},
{
"from": "human",
"value": "angular\n\t.module('ngSharepoint.Lists')\n\t.factory('Query', function() {\n\t\tvar Query = function() {\n\t\t\t//this.__queries = {};\n\t\t};\n Query.prototype.unpackItem = function(item) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Modify url for mentor search get request\n"
},
{
"from": "human",
"value": "app.controller('SearchController', ['$http', function($http) {\n console.log('SearchController running');\n var self = this;\n self.mentors = [];\n self.newSearch = {\n first_name: nu... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure each time the ckeditor config is not overwrite by server restart\n"
},
{
"from": "human",
"value": "/*\nCopyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\nFor licensing, see LICENSE.html or http://ckeditor.com/license\n*/\n\nCKED... | javascript | chosen |
[
{
"from": "system",
"value": "Add two properties for navdata option masks.\n"
},
{
"from": "human",
"value": "exports.TAG_TYPE_MASK = function (tagtype) {\n return (tagtype == 0) ? 0 : 1 << (tagtype - 1);\n};\n\nexports.NAVDATA_OPTION_MASK = function (option) {\n return 1 << option;\n};\n\nexp... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unecessary dependencies in blueprint\n"
},
{
"from": "human",
"value": "const blueprintHelper = require('ember-frost-core/blueprint-helper')\n\nmodule.exports = {\n afterInstall: function (options) {\n const addonsToAdd = [\n {name: 'ember-frost-core... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a typo on about page\n"
},
{
"from": "human",
"value": "const React = require('react');\nimport { PAGES } from '../constants';\nconst PACKAGE = require('../../../package.json');\n\nmodule.exports = class PageAbout extends React.Component {\n \n goToFeedback (e... | javascript | chosen |
[
{
"from": "system",
"value": "Add new actions to filter\n"
},
{
"from": "human",
"value": "'use strict'\n\nexport const FETCH_EVENTS = 'FETCH_EVENTS'\nexport const EVENTS_SUCCESS = 'EVENTS_SUCCESS'\nexport const EVENTS_FAILED = 'EVENTS_FAILED'\n\nexport { fetchEvents } from './events'\n"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Add back and forward shortcut\n"
},
{
"from": "human",
"value": "function onKeyPress(key) {\n\tif (this.jwplayer) {\n\t\tlocation.href = \"javascript:window.jwplayer().play()\";\n\t}\n}\n"
},
{
"from": "gpt",
"value": "function onKeyPress(key) {\n\tif (t... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"force a build failure through jshint\"\n\nThis reverts commit b956ecf5a9c62053a60f210b3ef0ba4b9ff0a8eb.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nconst get = Ember.get;\nconst { guidFor } = Ember\n\nfunction updateTitle(tokens) {\n d... | javascript | chosen |
[
{
"from": "system",
"value": "Add new line to bottom of file\n"
},
{
"from": "human",
"value": "if (Meteor.isServer) {\n Meteor.methods({\n // send user an email when they get a notifcation\n createNotification: function ( giblet, url, notificationKeys ) {\n Notifications.insert({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use sendFile method instead of deprecated sendfile method.\n"
},
{
"from": "human",
"value": "\nmodule.exports = function ClickJackingConstructor(opts) {\n\n opts = opts || {};\n opts.deny = typeof opts.deny != \"undefined\" ? opts.deny : false;\n opts.same... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong import for the test setup.\n"
},
{
"from": "human",
"value": "import 'Utils/TestSetup';\nimport React from 'react';\nimport sinon from 'sinon';\nimport { shallow } from 'enzyme';\n\nimport { LikeButton } from 'Components/LikeButton/LikeButton';\n\nconst on... | javascript | chosen |
[
{
"from": "system",
"value": "Fix loading message when updating submission\n"
},
{
"from": "human",
"value": "$(function() {\n\nfunction updateSubmission(url, spam, callback) {\n $.ajax({\n type: 'PUT',\n url: url,\n data: { spam: spam }, \n dataType: 'json',\n success: functi... | javascript | chosen |
[
{
"from": "system",
"value": "Refresh layout header on login-changed event\n\nRefresh layout header on login-changed event so that the header\ncorrectly shows the logged-in user when following an invitation link.\n"
},
{
"from": "human",
"value": "isic.views.LayoutHeaderView = isic.View.extend({... | javascript | chosen |
[
{
"from": "system",
"value": "Remove silly stylism for \"( document )\"\n"
},
{
"from": "human",
"value": "/**\n * Interactive features for the external menus functionality\n *\n * This piece of JS is loaded on both the list view app for the\n * epfl-external-menu custom post type, and in the Ap... | javascript | chosen |
[
{
"from": "system",
"value": "Switch back to clearing individual collections\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose'),\n fs = require('fs');\n\nfunction rm (file) {\n if (fs.existsSync(file)) {\n fs.unlinkSync(file);\n }\n}\n\nvar secrets = require('../config... | javascript | chosen |
[
{
"from": "system",
"value": "Add note about a test to implement later\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport Popover from '@material-ui/core/Popover'\nimport { withTheme } from '@material-ui/core/styles'\n\nconst DashboardPopover... | javascript | chosen |
[
{
"from": "system",
"value": "REMOVE the animation, as it's very awkward\n"
},
{
"from": "human",
"value": "import window from 'global';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\n// this component renders an iframe, which gets updates via post-messages\ne... | javascript | chosen |
[
{
"from": "system",
"value": "Remove comma before 'and' in error messages\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst { toSentence } = require('underscore.string');\n\n// Turn ['a', 'b', 'c'] into 'a, b or c'\nconst getWordsList = function (\n words,\n {\n op = 'or',\n quot... | javascript | chosen |
[
{
"from": "system",
"value": "Fix errors caused by updating Ramda\n"
},
{
"from": "human",
"value": "import { parse } from 'papaparse'\nimport {\n compose, filter, find, flatten, identity,\n join, map, match, not, drop, takeWhile\n} from 'ramda'\n\nconst clean = compose(filter(identity), f... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic Auth token presence check\n"
},
{
"from": "human",
"value": "import {graphql} from 'graphql';\n\nimport todoSchema from './graphql/schema';\n\nfunction handlePost(req, res) {\n graphql(todoSchema, req.body).then((result) => {\n res.send(result);\n });... | javascript | chosen |
[
{
"from": "system",
"value": "Add routes for posting new products and retrieving list of products\n"
},
{
"from": "human",
"value": "// npm dependencies\nconst express = require('express');\nconst hbs = require('hbs');\n\n// local packages\nlet {mongoose} = require('./db/mongoose');\nlet {Produc... | javascript | chosen |
[
{
"from": "system",
"value": "Add mirage route for Slack user.info endpoint\n\nThis is enough to support a very basic custom Ember Data adapter.\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default function() {\n this.get('/slack/users.list', function(db, request) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Reorganize the amd build script."
},
{
"from": "human",
"value": "// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\nvar fs = require('fs');\nvar files = ['base.js', 'controls.js', 'index.js', 'libembed-amd.js'... | javascript | chosen |
[
{
"from": "system",
"value": "Use the loader from the scope\n"
},
{
"from": "human",
"value": "module.exports = function(data){\n\n\t// If this is not a CanJS project\n\tif(typeof can === \"undefined\" || !can.view) {\n\t\treturn {};\n\t}\n\n\tvar oldCanImport;\n\n\tvar canImport = function(el, ... | javascript | chosen |
[
{
"from": "system",
"value": "Add TODO for compiling the AST into JS output\n"
},
{
"from": "human",
"value": "var tokenizer = require('./tokens'),\n\tparser = require('./parser'),\n\tsourceCode = require('fs').readFileSync('./example_code.fun').toString()\n\nrequire('./underscore')\n\nvar token... | javascript | chosen |
[
{
"from": "system",
"value": "Add targetType to JavaScripPaintWorklet prototype\n"
},
{
"from": "human",
"value": "const replaceDescendantNode = require('../replaceDescendantNode');\nconst Relation = require('./Relation');\n\nclass JavaScriptPaintWorklet extends Relation {\n get href() {\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Migrate Remote test to new HTTP API\n"
},
{
"from": "human",
"value": "var assert = require('assert');\nvar expect = require('chai').expect;\n\nvar Remote = require('../lib/remote');\nvar HTTP = require('../lib/http');\n\nvar server = new HTTP();\nvar index = '/';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make code compatible with older nodes\n"
},
{
"from": "human",
"value": "import http from 'http';\n\nfunction generateTestCode(hasError, hasWait) {\n let code;\n\n if (hasError) {\n if (hasWait) {\n code = 'setTimeout(function () { throw new ... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up Ember.Application ext tests"
},
{
"from": "human",
"value": "/**\n These tests ensure that Ember Data works with Ember.js' application\n initialization and dependency injection APIs.\n*/\n\nvar app;\n\nmodule(\"Ember.Application extensions\", {\n setup: ... | javascript | chosen |
[
{
"from": "system",
"value": "Make tests more resilient by using a better selector\n"
},
{
"from": "human",
"value": "module.exports = {\n get zero () { return browser.element('.digits:nth-child(1)'); },\n get one () { return browser.element('.digits:nth-child(2)'); },\n get two () { return b... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor simple select path logic\n"
},
{
"from": "human",
"value": "function q(path) {\n var fn = selectPath(path);\n\n if (arguments.length > 1) {\n return fn(arguments[1]);\n } else {\n return fn;\n }\n}\n\nfunction selectPath(path) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert changes to function signature and add comment\n\nThe comment is to clarify that there are 2 arguments being passed\ninto `handleChange`, as the current docs for `ToggleButtonGroup`\naren't entirely clear about that.\n"
},
{
"from": "human",
"value": "function... | javascript | chosen |
[
{
"from": "system",
"value": "Fix `iconClasses` and `iconText` tests\n"
},
{
"from": "human",
"value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('bs-datetimepicker', 'Integration | Component | bs datetimepicker',... | javascript | chosen |
[
{
"from": "system",
"value": "DEICH-329: Fix resetting page parameter when using search filters\n"
},
{
"from": "human",
"value": "import { replace } from 'react-router-redux'\n\nexport function toggleParameter (queryParamName, locationQuery) {\n return (dispatch, getState) => {\n const path... | javascript | chosen |
[
{
"from": "system",
"value": "Add ajax call to return positions json for a given issue search.\n"
},
{
"from": "human",
"value": "var initializeSearch = function() {\n var substringMatcher = function(strs) {\n return function findMatches(q, cb) {\n var matches, substrRegex;\n match... | javascript | chosen |
[
{
"from": "system",
"value": "Fix link to example pipelines\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport PipelineIcon from '../icons/Pipeline';\n\nclass Welcome extends React.Component {\n static propTypes = {\n organization: React.PropTypes.string.isRequired\n }\... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Use fake timer to execute Jest\"\n\nThis reverts commit bc4801161c9f1d688be7ebfa3198430c5d82cfad.\n"
},
{
"from": "human",
"value": "module.exports = {\n\ttransform: {\n\t\t'^.+\\\\.tsx?$': 'ts-jest',\n\t},\n\ttestRegex: '(/__tests__/.*|(\\\\.|/)(test|spec)... | javascript | chosen |
[
{
"from": "system",
"value": "Add reminder timer to the default mod list.\n"
},
{
"from": "human",
"value": "\nvar rModsList = [];\n\n/* start ui_mod_list */\nvar global_mod_list = [\n\n];\nvar scene_mod_list = {'connect_to_game': [\n\n],'game_over': [\n\n],\n'icon_atlas': [\n\n],\n'live_game': ... | javascript | chosen |
[
{
"from": "system",
"value": "Use attachments for individual work items, all in the same reply.\n"
},
{
"from": "human",
"value": "/*eslint-env node*/\n\n//------------------------------------------------------------------------------\n// node.js starter application for Bluemix\n//--------------... | javascript | chosen |
[
{
"from": "system",
"value": "Remove error handlers for now.\n"
},
{
"from": "human",
"value": "require('node-jsx').install({extension:'.jsx'});\nvar express = require('express');\nvar path = require('path');\n\nvar favicon = require('serve-favicon');\nvar logger = require('morgan');\nvar cookie... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken build due to missing config file\n"
},
{
"from": "human",
"value": "const restify = require('restify');\nconst builder = require('botbuilder');\n\nconst config = require('./config');\n\n//=========================================================\n// Bot S... | javascript | chosen |
[
{
"from": "system",
"value": "Add Weather and Traffic methods.\n"
},
{
"from": "human",
"value": "var jf = require('jsonfile');\nvar TelegramBot = require('node-telegram-bot-api');\nvar chalk = require('chalk')\nvar credentialsFilePath = './private/telegram_credentials.json';\nvar logger = requi... | javascript | chosen |
[
{
"from": "system",
"value": "Join user table to select speaker name\n"
},
{
"from": "human",
"value": "var mysql = require('./mysql');\n\nexports.getSessions = function(dbPool, callback) {\n dbPool.query(\"SELECT * FROM session\", function(err, result) {\n callback(err, result);\n });\n}\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add the user id to raygun logs\n"
},
{
"from": "human",
"value": "/* global Raygun */\nimport Ember from 'ember';\n\nexport default {\n\tname: 'logging',\n\n\tinitialize: function(container, application) {\n\t\t// Capture Exceptions and log them to Raygun\n\t\tRaygu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug if script fired in styleguide view\n"
},
{
"from": "human",
"value": "const dataElement = $('#messages-container');\nconst data = dataElement.data('messages');\n\n// -----\n\nObject.keys(data).forEach((key) => {\n Materialize.toast(data[key], 5000);\n});\n"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spacing for linting purposes\n"
},
{
"from": "human",
"value": "'use strict';\nconst express = require('express');\nconst router = express.Router();\nconst bodyParser = require('body-parser');\nconst request = require('request');\nconst models = require('../../d... | javascript | chosen |
[
{
"from": "system",
"value": "Load the latest 6 release notes to the start page.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst AbstractController = require('./AbstractController');\nconst ReleaseNotesLoader = require('@release-notes/node/lib/ReleaseNotesLoader');\nconst multer = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Add crowd GET controller methods\n"
},
{
"from": "human",
"value": "/**\n * Created by Stein-Otto Svorstøl on 26.08.15.\n * Logic of requests regarding crowds\n */\n\nvar Crowds = require('../models/crowd.js');\n\nmodule.exports = {\n create: function(req, res){\... | javascript | chosen |
[
{
"from": "system",
"value": "Rename query function to specify input fbId not fbProfile\n"
},
{
"from": "human",
"value": "const getBasicInfo = require('../db/controllers/getSelfBasicInfoGivenFBProfile.js');\n\nmodule.exports = (req, res, next) => {\n console.log('reached');\n const fbId = req... | javascript | chosen |
[
{
"from": "system",
"value": "[client] Make the withCredentials flag configurable\n"
},
{
"from": "human",
"value": "const projectHeader = 'X-Sanity-Project-ID'\n\nmodule.exports = config => {\n const headers = {}\n\n if (config.token) {\n headers.Authorization = `Bearer ${config.token}`\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove x-permitted-cross-domain-policies on redirect and apply error page when resource is not found\n"
},
{
"from": "human",
"value": "/**\n * Created by Omnius on 18/07/2016.\n */\n'use strict';\n\nconst Boom = require('boom');\n\nmodule.exports = (route, options)... | javascript | chosen |
[
{
"from": "system",
"value": "Set gasprice for Ropsten to 23 gwei\n"
},
{
"from": "human",
"value": "module.exports = {\n migrations_directory: \"./migrations\",\n networks: {\n development: {\n host: \"localhost\",\n port: 8545,\n network_id: \"6666... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure that both result and error are reset."
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction send(packet) {\n var event = document.createEvent(\"CustomEvent\")\n event.initCustomEvent(\"client\", false, true, packet)\n window.dispatchEvent(event)\... | javascript | chosen |
[
{
"from": "system",
"value": "[web] Use hook instead of connect function and HOC in VerificationModal\n\nTest Plan: Flow\n\nReviewers: palys-swm, ashoat\n\nReviewed By: ashoat\n\nSubscribers: ashoat, KatPo, zrebcu411, Adrian, atul, karol-bisztyga\n\nDifferential Revision: https://phabricator.ashoat.com/D776... | javascript | chosen |
[
{
"from": "system",
"value": "Add proper success/error logging to Sass task.\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar path = require('path');\nvar sass = require('node-sass');\n\nmodule.exports = function(grunt) {\n function writeFile(path, contents) {\n if(grunt.file.... | javascript | chosen |
[
{
"from": "system",
"value": "Implement dom ready functionality without jquery\n"
},
{
"from": "human",
"value": "ReactLayout = {};\n\nReactLayout._getRootNode = function() {\n var rootNode = $('#react-root').get(0);\n\n if(rootNode) {\n return rootNode;\n } else {\n $('body').append('<... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the issue in SimpleTower with using that by using bind instead\n"
},
{
"from": "human",
"value": "function SimpleTower(coord) {\n this.x = coord['x'];\n this.y = coord['y'];\n this.damage = 10;\n this.range = 4;\n this.fireRate = 1000;\n this.timeSinceLast... | javascript | chosen |
[
{
"from": "system",
"value": "INFORCRM-16614: Align icon on recurring field\n"
},
{
"from": "human",
"value": "import declare from 'dojo/_base/declare';\nimport lang from 'dojo/_base/lang';\nimport EditorField from 'argos/Fields/EditorField';\nimport FieldManager from 'argos/FieldManager';\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Add spinner to external preview\n"
},
{
"from": "human",
"value": "function applyClickCallbackOnProtocolCards() {\n $('.protocol-card').off('click').on('click', function(e) {\n $.ajax({\n url: $(this).data('show-url'),\n type: 'GET',\n dataType: '... | javascript | chosen |
[
{
"from": "system",
"value": "[ES6] Use import/export, let, and shorthand arrow function syntax\n"
},
{
"from": "human",
"value": "var assert = require('assert');\n\nclass AwaitLock {\n\n constructor() {\n this._acquired = false;\n this._waitingResolvers = [];\n }\n\n acquireAsync() {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add ok button to version popup\n"
},
{
"from": "human",
"value": "// INTERACTIONS_OBJECT = {};\nINTERACTIONS_OBJECT.help_interactions = [\"Help Contents\", \"Version Info\"]\n\nIONUX.Views.HelpMenu = Backbone.View.extend({\n el: \"#topbar #help\",\n events: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Correct a typo in a describe block title\n"
},
{
"from": "human",
"value": "/* global angular */\ndescribe('json2j preprocessor', function () {\n 'use strict';\n\n beforeEach(module('test/fixtures/empty.json'));\n beforeEach(module('test/fixtures/complex.js... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant assignment from cube-single-res demo.\n"
},
{
"from": "human",
"value": "/*\n * Copyright 2016 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in complia... | javascript | chosen |
[
{
"from": "system",
"value": "Return Error when provided with wrong prams to ZSGameService.evaluate\n"
},
{
"from": "human",
"value": "\nclass ZSGameService {\n constructor() {\n this.rules = {};\n }\n\n addRule(aRule) {\n aRule.parent = this;\n this.rules[aRule.id... | javascript | chosen |
[
{
"from": "system",
"value": "Make the processor reject pulses with targets that don't match the client config\n"
},
{
"from": "human",
"value": "require('./pulses/flash.js');\nrequire('./pulses/ball.js');\nrequire('./pulses/pulsar-splash.js');\n\nvar Processor = function () {};\n\nProcessor.pro... | javascript | chosen |
[
{
"from": "system",
"value": "Add official field to log\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Db = require('dbjs')\n , StringLine = require('dbjs-ext/string/string-line');\n\nexports = module.exports = Db.Object.create('StatusLog', {\n\tlabel: StringLine.required,\n\tt... | javascript | chosen |
[
{
"from": "system",
"value": "Use variable for key name\n"
},
{
"from": "human",
"value": "/*\nCopyright 2016 OpenMarket Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the Licens... | javascript | chosen |
[
{
"from": "system",
"value": "Select local deployment when -l flag is present\n"
},
{
"from": "human",
"value": "const { LogUtils } = require('../shared/utils')\n\nconst { ConfigurationFileNotExist } = require('../services/config')\n\nmodule.exports = exports = fileService => (modules, options) ... | javascript | chosen |
[
{
"from": "system",
"value": "Replace google maps with openstreetmaps\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport ReactDOM from 'react-dom'\n\nconst KRUEMELKISTE_POSITION = {\n lat: 52.54846,\n lng: 13.4653\n}\n\nclass MapContainer extends React.Component {\n\n constr... | javascript | chosen |
[
{
"from": "system",
"value": "Add create command to cli\n"
},
{
"from": "human",
"value": "import program from 'commander'\nimport path from 'path'\nimport fs from 'fs'\nimport chalk from 'chalk'\nimport util from '../util'\n\nimport init from './init'\nimport search from './search'\nimport star... | javascript | chosen |
[
{
"from": "system",
"value": "Test if partition calls func once for each item\n"
},
{
"from": "human",
"value": "/* eslint-env node, jest */\nconst { partition, range } = require('iter-tools')\n\ndescribe('partition', function () {\n describe('evens and odds', function () {\n const isEven = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add commented snippets for service worker\n"
},
{
"from": "human",
"value": "function onInstall() {\n console.log('[Serviceworker]', \"Installing!\");\n}\n\nfunction onActivate() {\n console.log('[Serviceworker]', \"Activating!\");\n}\n\nfunction onFetch() {\n}\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix route to setting user\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\nvar userModel = require('../models/user');\nvar mongoose = require('mongoose');\n\nrouter.get('/:id', function (req, res) {\n userModel.f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix click handler for Metrics Tab ticks.\n"
},
{
"from": "human",
"value": "<%page args=\"section_data\"/>\n\n$(function () {\n\n // Click handler for x axis major ticks\n $('.metrics-container').on('click', '.stacked-bar-graph-axis .tick.major', function () {\n\n... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.