conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Test that getOptions returns default options when none are provided\n"
},
{
"from": "human",
"value": "QUnit.test( \"hello test\", function( assert ) {\n assert.ok( 1 == \"1\", \"Passed!\" );\n});"
},
{
"from": "gpt",
"value": "QUnit.test( \"getOptions ... | javascript | chosen |
[
{
"from": "system",
"value": "Refresh the CodeMirror view if it's inside a md-tabs\n\nFeaturing a setTimeout\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc directive\n * @name grafterizerApp.directive:clojurePipeline\n * @description\n * # clojurePipeline\n */\nangular.module... | javascript | chosen |
[
{
"from": "system",
"value": "Add inheritance from Error for ApiError\n"
},
{
"from": "human",
"value": "/**\n * Copyright © 2017 Highpine. All rights reserved.\n *\n * @author Max Gopey <gopeyx@gmail.com>\n * @copyright 2017 Highpine\n * @license https://opensource.org/licenses/MIT MIT Li... | javascript | chosen |
[
{
"from": "system",
"value": "Add heroku url to axios request\n"
},
{
"from": "human",
"value": "// import axios from 'axios';\n\nexport const FETCH_SEARCH_RESULTS = 'fetch_search_results';\n\n// const ROOT_URL = 'http://herokuapp.com/';\n\nexport function fetchSearchResults(term, location) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Return all poet attributes except password from create method\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\n\nmodule.exports = function(dbConfig) {\n\n\tvar db = require('./poemlab_database')(dbConfig);\n\n\treturn {\n\n\t\tcreate: function(user... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for bug where script might not be called\n\nFirefox and IE/Edge won't load links that appear after the polyfill.\r\nWhat I think has been happening is the w.load event fires and clears the \"run\" interval before it has a chance to load styles that occur in between the last... | javascript | chosen |
[
{
"from": "system",
"value": "Change & to ? | FIXED\n"
},
{
"from": "human",
"value": "function submitEmail() {\n var button = document.getElementById('submit');\n button.onclick = function() {\n var parent = document.getElementById('parent').value;\n var phone = document.getElementById(... | javascript | chosen |
[
{
"from": "system",
"value": "Make request header optional in authentication middleware.\n"
},
{
"from": "human",
"value": "export default (config) => {\n\tif ( ! config.enabled) return (req, res, next) => { next() }\n\n\tvar header = (config.header || 'Authorization').toLowerCase()\n\tvar token... | javascript | chosen |
[
{
"from": "system",
"value": "Fix propTypes warning in FuzzyWrapper"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from \"prop-types\";\n\nexport default class FuzzyWrapper extends React.Component {\n constructor(props) {\n super();\n this.state = {\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Build module to fetch issues for a selected repo\n"
},
{
"from": "human",
"value": "const Request = require('request');\n\nmodule.exports = (user, cb) => {\n Request.get({\n url: `https://api.github.com/users/${user}/repos`,\n headers: {\n 'User-Agent': ... | javascript | chosen |
[
{
"from": "system",
"value": "Make RoseTexManager use global normalizePath.\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction _RoseTextureManager() {\n this.textures = {};\n}\n\n_RoseTextureManager.prototype.normalizePath = function(path) {\n return path;\n};\n\n_RoseTextureManager.... | javascript | chosen |
[
{
"from": "system",
"value": "Add else to into populate board to create a div elemento for the not used squares\n"
},
{
"from": "human",
"value": "// View\n$(document).ready(function() {\n console.log(\"Ready!\");\n // initialize the game and create a board\n var game = new Game();\n Populat... | javascript | chosen |
[
{
"from": "system",
"value": "Change loggers and move some options\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar _ = require('lodash')\n , defaultConf, developmentConf, env, extraConf, productionConf, testConf;\n\nenv = process.env.NODE_ENV || 'development';\n\ndefaultConf = {\n logg... | javascript | chosen |
[
{
"from": "system",
"value": "Add check for invalid connection\n\n"
},
{
"from": "human",
"value": "// client start file\n\nconst Display = require('./interface.js');\nconst network = require('./network.js');\n\nlet dis = new Display();\n\n// TODO: placeholder nick\nlet nick = \"Kneelawk\";\n// ... | javascript | chosen |
[
{
"from": "system",
"value": "Make 'button' component more obviously private.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar VNode = require('virtual-dom').VNode;\nvar VText = require('virtual-dom').VText;\n\n/**\n * Button.\n *\n * @param {object} props\n * @param {string} props.text\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add route handler for DELETE /api/nodes/:nodeID\n"
},
{
"from": "human",
"value": "var Node = require('./nodeModel.js'),\n handleError = require('../../util.js').handleError,\n handleQuery = require('../queryHandler.js');\n\nmodule.exports = {\n\n crea... | javascript | chosen |
[
{
"from": "system",
"value": "Add Schemes to JSON preview\n"
},
{
"from": "human",
"value": "import {header} from './header';\nimport {mime} from './mime';\nimport {security} from './security';\nimport {tags} from './tags';\nimport {paths} from './paths';\nimport {types} from './types';\n\nexpor... | javascript | chosen |
[
{
"from": "system",
"value": "Add error for number constructor, too\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of t... | javascript | chosen |
[
{
"from": "system",
"value": "Disable the selection of past dates\n"
},
{
"from": "human",
"value": "$(document).ready(function(){\n $('.datepicker').pickadate({\n onSet: function (ele) {\n if(ele.select){\n this.close();\n }\n }\n });\n $('.timepicker').pickati... | javascript | chosen |
[
{
"from": "system",
"value": "Replace bodyParser by json middleware\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar _ = require('lodash');\n\nvar app = express();\n\napp.use(express.favicon('public/img/favicon.ico'));\napp.use(express.static('public'));\napp.use(express... | javascript | chosen |
[
{
"from": "system",
"value": "Use the node engine by default\n"
},
{
"from": "human",
"value": "require('../lib/fin/lib/js.io/packages/jsio')\n\njsio.addPath('./lib/fin/js', 'shared')\njsio.addPath('./lib/fin/js', 'server')\njsio.addPath('.', 'fan')\n\njsio('import fan.Server')\njsio('import fan... | javascript | chosen |
[
{
"from": "system",
"value": "Include reference to parameter received by analyzers\n"
},
{
"from": "human",
"value": "'use strict';\nvar codeCopter = require('../');\n\n/**\n * A pretty harsh analyzer that passes NO files for the reason that \"it sucks\" starting on line 1.\n *\n * @returns {Obj... | javascript | chosen |
[
{
"from": "system",
"value": "Use the `css` property of `Result`\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst fs = require('fs')\nconst path = require('path')\nconst concise = require('../src/index')\n\nconst command = {\n name: process.argv[2],\n input: process.argv[3],\n ... | javascript | chosen |
[
{
"from": "system",
"value": "[chore]: Update default view user renders due to Melody\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { Route, IndexRoute } from 'react-router';\nimport $ from 'jQuery';\n\nimport CoreLayout from 'layouts/CoreLayout';\nimport HomeView from 'v... | javascript | chosen |
[
{
"from": "system",
"value": "Disable steps that are not needed in Highcharts Editor\n"
},
{
"from": "human",
"value": "angular.module('yds').directive('ydsWorkbenchNew', ['$ocLazyLoad', '$timeout', '$window', 'Data', 'Basket', 'Workbench',\n function ($ocLazyLoad, $timeout, $window, Data, Ba... | javascript | chosen |
[
{
"from": "system",
"value": "Add / Fouc out (on link clic)\n\n"
},
{
"from": "human",
"value": "console.log('main.js');\n\n// Load Css async w LoadCSS & +1 polyfill / https://www.npmjs.com/package/fg-loadcss?notice=MIvGLZ2qXNAEF8AM1kvyFWL8p-1MwaU7UpJd8jcG\nvar stylesheet = loadCSS( \"styles/mai... | javascript | chosen |
[
{
"from": "system",
"value": "Add the .query() method to the Nock noop\n"
},
{
"from": "human",
"value": "/**\n * Copyright (c) 2015 IBM Cloudant, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file\n * except in complianc... | javascript | chosen |
[
{
"from": "system",
"value": "Use ES6 import for Portfolio JS dependencies\n"
},
{
"from": "human",
"value": "var observer = lozad(\".lazy\", {\n\trootMargin: \"25%\",\n\tthreshold: 0\n});\nobserver.observe();\n"
},
{
"from": "gpt",
"value": "import IntersectionObserver from 'interse... | javascript | chosen |
[
{
"from": "system",
"value": "Use template name for statts file name\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst baseConfig = require(\"./rollup.config\");\nconst plugin = require(\"./plugin\");\nconst path = require(\"path\");\n\nmodule.exports = baseConfig.map((config, index) =... | javascript | chosen |
[
{
"from": "system",
"value": "Add default value for owner_details.\n"
},
{
"from": "human",
"value": "/*@ngInject*/\nfunction ProjectModelService(projectsAPI) {\n class Project {\n constructor(id, name, owner) {\n this.id = id;\n this.name = name;\n thi... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unnecessary return in ResponseToObjects\n"
},
{
"from": "human",
"value": "module.exports = ResponseToObjects;\n\nvar Transform = require('readable-stream/transform');\nvar inherits = require('inherits');\nvar isArray = require('is-array');\n\n/**\n * Parse w... | javascript | chosen |
[
{
"from": "system",
"value": "Add pseudo code for game update according to game state.\n"
},
{
"from": "human",
"value": "\nvar GameEngine = ( function () {\n\tfunction start(){\n\t\tvar x,\n y,\n color,\n i,\n j,\n lengthBoard,\n lengthField;\n\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Remove preset date filters in investment collection\n"
},
{
"from": "human",
"value": "const { concat } = require('lodash')\n\nconst currentYear = (new Date()).getFullYear()\n\nconst GLOBAL_NAV_ITEM = {\n path: '/investment-projects',\n label: 'Investment projects... | javascript | chosen |
[
{
"from": "system",
"value": "Put the language first in the screen shot generation"
},
{
"from": "human",
"value": "var target = UIATarget.localTarget();\n\nfunction captureLocalizedScreenshot(name) {\n var target = UIATarget.localTarget();\n var model = target.model();\n var rect = target.re... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error. Thought this was Python for a second xD\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\nvar util = require('util');\n\nexports.setup = function() {\n\tglobal.commands = {};\n};\n\nexports.handle = function(evt, msg) {\n\tif(msg.slice(0,... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the test 1 at case 5\n"
},
{
"from": "human",
"value": ";((rc) => {\n 'use strict';\n var tagContent = 'router2-content';\n var tagView = 'router2-view';\n\n var div = document.createElement('div');\n div.innerHTML = `\n <${tagContent} id=\"case5-1\" hash=... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with removing parent and speed up the process\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.ObjectController.extend(Ember.I18n.TranslateableProperties, {\n proxiedObjectives: [],\n session: null,\n course: null,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add protocol API only to the REPL context\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar repl = require('repl');\nvar Chrome = require('../');\n\nChrome(function (chrome) {\n var chromeRepl = repl.start({\n 'prompt': 'chrome> '\n });\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add localeData for requested lanuage\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport * as ReactIntl from 'react-intl'\n\nimport languageResolver from './languageResolver'\nimport messagesFetcher from './messagesFetcher'\n\nfunction wrappedReactI... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo: `OccurenceOrderPlugin` to `OccurrenceOrderPlugin`\n"
},
{
"from": "human",
"value": "import webpack from 'webpack';\nimport ExtractTextPlugin from 'extract-text-webpack-plugin';\nimport baseConfig from './webpack.config.base';\n\nconst config = {\n ...bas... | javascript | chosen |
[
{
"from": "system",
"value": "Remove max-length on links control\n\nThe `max-length` attribute was inadvertently added.\n\n[Finishes: #119027729](https://www.pivotaltracker.com/story/show/119027729)\n[#119014219](https://www.pivotaltracker.com/story/show/119014219)\n\n"
},
{
"from": "human",
"va... | javascript | chosen |
[
{
"from": "system",
"value": "Remove exposing React as that was fixed in the React update\n"
},
{
"from": "human",
"value": "// Common webpack configuration used by webpack.hot.config and webpack.rails.config.\n\nvar path = require(\"path\");\n\nmodule.exports = {\n context: __dirname, // the p... | javascript | chosen |
[
{
"from": "system",
"value": "Move responsibility for appending nodes into variant generators themselves\n"
},
{
"from": "human",
"value": "import _ from 'lodash'\nimport postcss from 'postcss'\n\nconst variantGenerators = {\n hover: (container, config) => {\n const cloned = container.clone(... | javascript | chosen |
[
{
"from": "system",
"value": "Change test to use card concept\n"
},
{
"from": "human",
"value": "var tape = require(\"tape\"),\n jsdom = require(\"jsdom\"),\n d3 = Object.assign(require(\"../\"), require(\"d3-selection\"));\n\n/*************************************\n ************ Component... | javascript | chosen |
[
{
"from": "system",
"value": "Use addEventListener rather than onmessage\n"
},
{
"from": "human",
"value": "$(function() {\n var socket = new WebSocket(\"ws://\" + window.location.host + \"/\");\n\n socket.onmessage = function(message){\n console.log('got a message: ')\n console.log(mess... | javascript | chosen |
[
{
"from": "system",
"value": "Add encoding to output server streams\n"
},
{
"from": "human",
"value": "/*\n * grunt-external-daemon\n * https://github.com/jlindsey/grunt-external-daemon\n *\n * Copyright (c) 2013 Joshua Lindsey\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nprocess... | javascript | chosen |
[
{
"from": "system",
"value": "Connect to PG via ENV string\n"
},
{
"from": "human",
"value": "//For Heroku Deployment\nvar URI = require('urijs');\nvar config = URI.parse(process.env.DATABASE_URL);\nconfig['ssl'] = true;\n\nmodule.exports = config;\n// module.exports = {\n// database: 'sonder'... | javascript | chosen |
[
{
"from": "system",
"value": "Use lowercase name of gbgtech\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport RightColumn from \"./RightColumn\";\n\nconst UserApp = ({ children }) => (\n <div className=\"main-container\">\n <section className=\"who-are-we\">\n <h1>... | javascript | chosen |
[
{
"from": "system",
"value": "Add API for derivative, vector root\n"
},
{
"from": "human",
"value": "var eng = require('./node/engine');\n\nvar index = module.exports = {\n localMinimize: function(func, options, callback) {\n eng.runPython('local', func, options, callback);\n },\n globalMi... | javascript | chosen |
[
{
"from": "system",
"value": "Change case for required Delighted in lib\n\nLinux is case sensitive and fails to load the required file."
},
{
"from": "human",
"value": "var Delighted = require('./lib/delighted');\n\nmodule.exports = function(key) {\n return new Delighted(key);\n};\n"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Test cases for ThemePlugin Class added to the unit test file.\n"
},
{
"from": "human",
"value": "/**\n*\tcom.spinal.ioc.plugins.ThemePlugin Class Tests\n*\t@author Patricio Ferreira <3dimentionar@gmail.com>\n**/\ndefine(['ioc/plugins/theme'], function(ThemePlugin) {... | javascript | chosen |
[
{
"from": "system",
"value": "Remove useless & wrong code for CreateResultBox\n\n* Copy & paste sucks.\n"
},
{
"from": "human",
"value": "'use strict';\n\n(function (module, undefined) {\n function CreateResultBox(elem) {\n // TODO: add property 'list' and 'details' for each UI state.\n t... | javascript | chosen |
[
{
"from": "system",
"value": "Split out to parse function"
},
{
"from": "human",
"value": "$(function() {\n var formatted_string = 'hoge';\n // $('#text_output').text(formatted_string);\n $('#text_input').bind('keyup', function(e) {\n var text = $('#text_input').val();\n console.log(tex... | javascript | chosen |
[
{
"from": "system",
"value": "Update code to pass tests\n"
},
{
"from": "human",
"value": "/*!\n * templateLayout tests\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\nTestCase(\"templateLayout\", {\n \"test templateLayout registration\":function () {\n assertNotUndefined(... | javascript | chosen |
[
{
"from": "system",
"value": "Use core-js and js-polyfills instead of babel-polyfill\n"
},
{
"from": "human",
"value": "// ES2015 polyfill\nimport 'babel-polyfill';\n\n// Modernizr\nimport './modernizr';\n\n// Components\nimport './components/example';\n"
},
{
"from": "gpt",
"value":... | javascript | chosen |
[
{
"from": "system",
"value": "Use stylelint standalone API in test\n"
},
{
"from": "human",
"value": "import config from \"../\"\nimport postcss from \"postcss\"\nimport stylelint from \"stylelint\"\nimport test from \"tape\"\n\ntest(\"basic properties of config\", t => {\n t.ok(isObject(config... | javascript | chosen |
[
{
"from": "system",
"value": "Add remaining building types to MOSColors\n"
},
{
"from": "human",
"value": "(function () {\n'use strict';\n\n /**\n * ngInject\n */\n function StateConfig($urlRouterProvider) {\n $urlRouterProvider.otherwise('/');\n }\n\n // color ramp fo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where chip cannot be placed in last row\n"
},
{
"from": "human",
"value": "import _ from 'underscore';\n\nclass Grid {\n\n // The state of a particular game grid\n constructor({ columnCount = 7, rowCount = 6, columns = _.times(columnCount, () => []), lastP... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'change' event handler if tag attribute is an observable.\n"
},
{
"from": "human",
"value": "var deps = [\n '/stdlib/tag.js',\n '/stdlib/observable.js'\n];\n\nfunction increment(x) {\n return String(parseInt(x, 10) + 1);\n}\n\nfunction onReady(tag, obse... | javascript | chosen |
[
{
"from": "system",
"value": "Make riot control compatible with other observable systems"
},
{
"from": "human",
"value": "var RiotControl = {\n _stores: [],\n addStore: function(store) {\n this._stores.push(store);\n }\n};\n\n['on','one','off','trigger'].forEach(function(api){\n RiotContr... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up method names and internals\n"
},
{
"from": "human",
"value": "var Keen = require('keen-tracking');\nvar extend = require('keen-tracking/lib/utils/extend');\n\n// Accessor methods\n\nfunction readKey(str){\n if (!arguments.length) return this.config.readKey... | javascript | chosen |
[
{
"from": "system",
"value": "Rewrite source map URLs for consistency\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar rump = module.exports = require('rump');\nvar configs = require('./configs');\nvar originalAddGulpTasks = rump.addGulpTasks;\n\n// TODO remove on next major core update\n... | javascript | chosen |
[
{
"from": "system",
"value": "Update handling of datasources.txt URL\n"
},
{
"from": "human",
"value": "var config = require('./config.js');\nvar jsonLdContext = require('./context.json');\nvar MetadataService = require('./metadata-service.js');\nvar Organism = require('./organism.js');\nvar Xre... | javascript | chosen |
[
{
"from": "system",
"value": "Add getTime function to get remaining time"
},
{
"from": "human",
"value": "var Util = require('./util.js');\n\nmodule.exports = Track = function(vid, info) {\n this.vid = vid;\n this.title = info.title;\n this.author = info.author;\n this.viewCount = info.viewC... | javascript | chosen |
[
{
"from": "system",
"value": "Use addEventListener('load' instead of onload\n"
},
{
"from": "human",
"value": "\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// This file must be webpacked because it contains .css imports\n\n// Load j... | javascript | chosen |
[
{
"from": "system",
"value": "Fix date and label calculation\n"
},
{
"from": "human",
"value": "var angular = require('angular');\n\nangular.module('DashCtrl', ['chart.js']).controller('DashController', ['$scope', $scope => {\n const colorScheme = ['#2a9fd6'];\n\n let weekDays = ['Sunday',... | javascript | chosen |
[
{
"from": "system",
"value": "Use Materialize toasts to show the status\n"
},
{
"from": "human",
"value": "$(document).ready(function()\n{ \n $(\"#invite-form\").on('submit', function()\n { \n var inviteeEmail = $(\"#email\").val();\n console.log(inviteeEmail)\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix behaviour for redirect with query params\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar url = require('url');\n\nvar getHost = require('./get-host');\n\nmodule.exports = function redirectToOrganization(req, res, organization) {\n res.redirect(req.proto... | javascript | chosen |
[
{
"from": "system",
"value": "Add debug information in Jobs Queue\n"
},
{
"from": "human",
"value": "'use strict';\n\nfunction JobQueue(metadataBackend, jobPublisher) {\n this.metadataBackend = metadataBackend;\n this.jobPublisher = jobPublisher;\n}\n\nmodule.exports = JobQueue;\n\nvar QUE... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo in playground listen log\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Playground from './index.js';\nimport express from 'express';\nimport ReactDOMServer from 'react-dom/server';\n\nconst app = express();\nconst port = 8000;\n\napp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix qs params in screenshot url tests\n"
},
{
"from": "human",
"value": "var renderPng = require('../../app/render_png');\ndescribe('renderPng', function () {\n describe('getScreenshotPath', function () {\n\n it('creates the URL for the screenshot service call',... | javascript | chosen |
[
{
"from": "system",
"value": "[previews] Fix wrong resolving of referenced type\n"
},
{
"from": "human",
"value": "import React, {PropTypes} from 'react'\nimport resolveRefType from './resolveRefType'\nimport {resolver as previewResolver} from 'part:@sanity/base/preview'\nexport default class Sa... | javascript | chosen |
[
{
"from": "system",
"value": "Add commented-out permission guards. Part of UIU-197.\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport React from 'react';\nimport Settings from '@folio/stripes-components/lib/Settings';\n\nimport PermissionSets from './permissions/PermissionSets';... | javascript | chosen |
[
{
"from": "system",
"value": "Add eslint 'fix' flag to config.\n\nCan be flipped to 'true' to auto-fix linting violations!\n"
},
{
"from": "human",
"value": "module.exports = function (grunt) {\n var allJSFilesInJSFolder = \"js/**/*.js\";\n\n var distFolder = '../wikipedia/assets/';\n\n grunt... | javascript | chosen |
[
{
"from": "system",
"value": "Update README for CLI options.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst generate = require('./generator')\nconst program = require('commander')\n\nprogram\n .version('1.0.0')\n .option('-w, --words [num]', 'number of words [2]', 2)\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable button should be the first thing to do\n"
},
{
"from": "human",
"value": "function dform(formElement) {\n var eventEmitter = {\n on: function (name, handler) {\n this[name] = this[name] || [];\n this[name].push(handler);\n return this;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a license header on code files\n\nSigned-off-by: Laurent Grangeau <919068a1571bc1b5deaaf9ac4d631597f8dd629f@gmail.com>\n"
},
{
"from": "human",
"value": "function transform(line) {\n var values = line.split(',');\n\n var obj = new Object();\n obj.name = value... | javascript | chosen |
[
{
"from": "system",
"value": "Use sugarjs for date parsing\n"
},
{
"from": "human",
"value": "const timetrack = require('./timetrack');\nconst calculateDuration = require('./calculateDuration');\n\nmodule.exports = (pluginContext) => {\n return (project, env = {}) => {\n return new Pro... | javascript | chosen |
[
{
"from": "system",
"value": "Use my new lib events-to-any-promise\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport bunyan from 'bunyan';\nimport http from 'http';\nimport { createApp } from './app.js';\n\nconst logger = bunyan.createLogger({name: \"Graphql-Swapi\"});\n\nlogger.info('S... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct GitHub header name when checking requests\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst childProcess = require('child-process-promise');\nconst express = require('express');\nconst path = require('path');\nconst fs = require('fs');\n\nconst c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix eslint-disable for unresolved messages line\n"
},
{
"from": "human",
"value": "import {addLocaleData} from 'react-intl';\nimport {updateIntl as superUpdateIntl} from 'react-intl-redux';\nimport languages from '../languages.json';\nimport messages from '../../loc... | javascript | chosen |
[
{
"from": "system",
"value": "Add missing field to query\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport Relay from 'react-relay';\n\nimport ProductPrice from './ProductPrice';\n\nclass ProductItem extends Component {\n\n static propTypes = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify inline styles for inheritance\n"
},
{
"from": "human",
"value": "const DEFAULT_IN = 'fadeIn'\nconst DEFAULT_OUT = 'fadeOut'\n\nclass Slide extends BaseElement {\n static get observedAttributes () {\n return ['active', 'in', 'out']\n }\n\n get active (... | javascript | chosen |
[
{
"from": "system",
"value": "Make a check if end_date exists on the project in the hasDate function\n"
},
{
"from": "human",
"value": "angular\n .module('app')\n .directive('projectQuickView', function() {\n return {\n restrict: 'EA',\n replace: false,\n templateUrl: 'app/te... | javascript | chosen |
[
{
"from": "system",
"value": "Fix channel updating\n(Well, that was dumb)\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst TelegramBot = require('node-telegram-bot-api');\n\nconst config = require('../config');\nconst utils = require('./utils');\nconst Kinospartak = require('./Kinosparta... | javascript | chosen |
[
{
"from": "system",
"value": "Change port of websocket to 1091\n"
},
{
"from": "human",
"value": "var app = require('express')();\nvar http = require('http').Server(app);\nvar io = require('socket.io')(http);\n\napp.get('/', function(req, res){\n res.sendfile('index.html');\n});\n\n\nio.on('con... | javascript | chosen |
[
{
"from": "system",
"value": "Use Ember.create vs Object.create for polyfill fix\n"
},
{
"from": "human",
"value": "var get = Ember.get,\n set = Ember.set,\n meta = Ember.meta;\n\nEmber.attr = function(type) {\n return Ember.computed(function(key, value) {\n var data = get(this, 'data'... | javascript | chosen |
[
{
"from": "system",
"value": "Add Math to calibrator VM and allow use of functions (not only function strings).\n"
},
{
"from": "human",
"value": "import {VM} from 'vm2'\nimport SensorData from './SensorData'\n\nexport default class Calibrator {\n\tcalibrate (data, cb) {\n\t\tif ( ! (data instan... | javascript | chosen |
[
{
"from": "system",
"value": "Add published year to title\n"
},
{
"from": "human",
"value": "(function (env) {\n \"use strict\";\n env.ddg_spice_arxiv = function(api_result){\n\n if (!api_result) {\n return Spice.failed('arxiv');\n }\n\n Spice.add({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix cookieValueHandler to work with IE\n\n\ngit-svn-id: 4b387fe5ada7764508e2ca96c335714e4c1692c6@406 0d517254-b314-0410-acde-c619094fa49f\n"
},
{
"from": "human",
"value": "function cookieValueHandler() {\n Cookies.set(this.name, this.value, 365)\n window.loca... | javascript | chosen |
[
{
"from": "system",
"value": "Enable VueX strict mode in dev\n"
},
{
"from": "human",
"value": "import Vue from \"vue\";\nimport Vuex from \"vuex\";\n\nVue.use(Vuex);\n\nexport default new Vuex.Store({\n\tstate: {},\n\tmutations: {},\n\tactions: {},\n\tmodules: {}\n});\n"
},
{
"from": "g... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the content and table to prevent covering the download link\n"
},
{
"from": "human",
"value": "// Override download path to files_sharing/public.php\nfunction fileDownloadPath(dir, file) {\n\tvar url = $('#downloadURL').val();\n\tif (url.indexOf('&path=') != ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix leftover reference to v4.0.0-alpha.6\n\nRunning `./build/change-version.js v4.0.0-alpha.6 v4.0.0` fixed this,\nso the version change script works fine. I'm presuming instead this\nchange was just omitted from 35f80bb12e4e, and then wouldn't have\nbeen caught by subsequent r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bundle arguments for latest browserify\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar $ = require('gulp-load-plugins')({ lazy: false });\n\nvar source = require('vinyl-source-stream2');\nvar browserify = require('browserify');\n\nvar path = ... | javascript | chosen |
[
{
"from": "system",
"value": "Make builds platform specific and add zipping\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar shell = require('gulp-shell')\nvar sass = require('gulp-sass');\nvar electron = require('electron-connect').server.create();\n\ngulp.ta... | javascript | chosen |
[
{
"from": "system",
"value": "Add tasks test and tdd\n"
},
{
"from": "human",
"value": "var gulp = require('gulp'),\n coffee = require('gulp-coffee'),\n concat = require('gulp-concat'),\n uglify = require('gulp-uglify'),\n sourcemaps = require('gulp-sourcemaps'),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix place of \"tags\" option in the default options"
},
{
"from": "human",
"value": "$(document).ready(function () {\n $.fn.select24entity = function (action) {\n // Create the parameters array with basic values\n var select24entityParam = {\n ajax: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make the link work from a \"file://\" URI.\n"
},
{
"from": "human",
"value": "// This is a simple test that is meant to demonstrate the ability\n// interact with the 'document' instance from the global scope.\n//\n// Thus, the line: `exports.document = document;`\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix assertion for not existing files\n"
},
{
"from": "human",
"value": "/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar assert = require('yeoman-generator').assert;\nvar helpers = require('yeoman-generator').test;\nvar os = req... | javascript | chosen |
[
{
"from": "system",
"value": "Update to revised event methods.\n"
},
{
"from": "human",
"value": "var expr = require('vega-expression'),\n args = ['datum', 'event', 'signals'];\n\nmodule.exports = expr.compiler(args, {\n idWhiteList: args,\n fieldVar: args[0],\n globalVar: args[2],\n ... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.