conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Make ESLint happy with Main.js"
},
{
"from": "human",
"value": "CKEDITOR.config.extraPlugins = \"structuredheadings\";\r\n\r\nvar initSample = ( function() {\r\n\r\n return function() {\r\n var editorElement = CKEDITOR.document.getById(\"editor\");\r\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add unique constraint on username.\n"
},
{
"from": "human",
"value": "var db = require('../db');\n\n\nmodule.exports = function() {\n\n db.serialize(function() {\n db.run(\"CREATE TABLE IF NOT EXISTS users (username TEXT, hashed_password BLOB, salt BLOB, name TE... | javascript | chosen |
[
{
"from": "system",
"value": "Update file to test Jenkins\n"
},
{
"from": "human",
"value": "process.title = \"note-my-strength-api\";\n\nconst http = require(\"http\");\n\nconst PORT = 8088;\n\nhttp.createServer(function (req, res) {\n console.log(\"Listening on port: \" + PORT);\n res.wr... | javascript | chosen |
[
{
"from": "system",
"value": "Add posibility to run only worker for debug\n"
},
{
"from": "human",
"value": "var pstarter = require('pstarter');\n\npstarter.startMaster(__dirname + '/config', {}, function() {\n\tvar config = require('./config');\n\tpstarter.statServer(config.http.statPort, confi... | javascript | chosen |
[
{
"from": "system",
"value": "Implement detection of services in funcitons folder.\n"
},
{
"from": "human",
"value": "/**\n * @module server.config\n */\n\n'use strict'\n\n// A list with the folder name of the services to load\nconst defaultServices = [\n 'routes',\n 'user'\n]\n\nconst readSer... | javascript | chosen |
[
{
"from": "system",
"value": "Improve example to showcase forceLogin\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport TwitterLogin from 'react-twitter-auth/lib/react-twitter-auth-component.js';\n\nclass App extends Component {\n\n constructor() {\n super()... | javascript | chosen |
[
{
"from": "system",
"value": "Create a map of hosted files at client startup\n"
},
{
"from": "human",
"value": "import dir from 'node-dir';\nimport watch from 'watch';\nimport path from 'path';\nimport commandLineArgs from 'command-line-args';\n\nconst cli = commandLineArgs([\n {\n nam... | javascript | chosen |
[
{
"from": "system",
"value": "Fix another incorrect test setup\n"
},
{
"from": "human",
"value": "import nodeFetch from 'node-fetch'\nimport app from '../server'\n\ndescribe('server', () => {\n function fetch (path, init) {\n return nodeFetch(`http://localhost:3000${path}`, init)\n }\n\n l... | javascript | chosen |
[
{
"from": "system",
"value": "ADD collection description to the graduation Requirement database\n"
},
{
"from": "human",
"value": "import { mongo } from 'meteor/mongo';\nimport { SimpleSchema } from 'meteor/aldeed:simple-schema';\n\nclass GraduationRequirementCollection extends Mongo.Collection ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing MR widget status icons\n\nFix https://gitlab.com/gitlab-org/gitlab-ce/issues/40283\n\nRegressed in\nhttps://gitlab.com/gitlab-org/gitlab-ce/commit/d01d509bd8612f9879fa762de8ea3763bcff81cf\n"
},
{
"from": "human",
"value": "import ciIcon from '../../vue_s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem with english system\n"
},
{
"from": "human",
"value": "\ndocument.addEventListener(\"DOMContentLoaded\", function(event) {\n safari.self.addEventListener(\"message\", messageHandler);\n safari.self.addEventListener(\"refreshVideoState\",messageHand... | javascript | chosen |
[
{
"from": "system",
"value": "Fix order of TS extends for Vue\n"
},
{
"from": "human",
"value": "/* eslint-env node */\nmodule.exports = {\n extends: [\"@vue/typescript\", \"./typescript.js\"],\n rules: {}\n};\n"
},
{
"from": "gpt",
"value": "/* eslint-env node */\nmodule.exports =... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to using actual backend for now\n"
},
{
"from": "human",
"value": "module.exports = {\n backendRoot: 'https://obscure-woodland-71302.herokuapp.com/',\n graphQLRoot: (process.env.NODE_ENV === 'production') ? '//localhost:5000/graphql' : '//catapp-console.her... | javascript | chosen |
[
{
"from": "system",
"value": "MAke build work on Windows platform\n"
},
{
"from": "human",
"value": "var ExtractTextPlugin = require('extract-text-webpack-plugin');\n\nmodule.exports = {\n entry: [\"./js/main.js\", \"./css/main.scss\"],\n output: {\n path: __dirname + \"/build\",\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add stage 0 to babel\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar path = require('path')\nvar node_modules = path.resolve(__dirname, 'node_modules')\n\n// var production = process.argv.indexOf('--production') > -1\n\nmodule.exports = {\n entry: path.resol... | javascript | chosen |
[
{
"from": "system",
"value": "Improve flexibility, readability and performance\n\nExtracting the operation of counting jobs into a single variable has many\nadvantages:\n1. Flexibility: it's easier now to modify the statement and be sure that the\nchange will be propagated to the rest of the code\n2. Readab... | javascript | chosen |
[
{
"from": "system",
"value": "Add derived eves to Eves array\n"
},
{
"from": "human",
"value": "import settings from './helpers/settings'\nimport {findDistance, limitPositions, chooseOne, randomInt, getAvgPostion} from './helpers/general'\nimport {applyLimbForces, updateBodyPartPositions} from '... | javascript | chosen |
[
{
"from": "system",
"value": "Add zebra background color for table section.\n"
},
{
"from": "human",
"value": "W.TableSections = function () {\n var win = UI.Win({title:'Table Sections'});\n \n // Create the first TableViewSections.\n var section1 = Ti.UI.createTableViewSection({headerTitle:... | javascript | chosen |
[
{
"from": "system",
"value": "Fix arrays and add path support\n"
},
{
"from": "human",
"value": "/**\n * @file\n * Text reporter\n */\nvar Colors = require('colors/safe');\nvar _ = require('lodash');\n\n/**\n * Text reporter\n * @param {Object} validationData\n * @param {Object} [options]\n * @p... | javascript | chosen |
[
{
"from": "system",
"value": "Update extension with mime type workaround.\n"
},
{
"from": "human",
"value": "// inject the main script from the latest github source\nvar s = document.createElement('script');\ns.src = 'https://raw.github.com/apottere/DripBot/master/dripBot.js';\n(document.head||d... | javascript | chosen |
[
{
"from": "system",
"value": "Fix regex to include .jsx"
},
{
"from": "human",
"value": "var path = require('path');\nvar 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'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in language selection switching\n\nhttps://github.com/globaleaks/GlobaLeaks/issues/452\n"
},
{
"from": "human",
"value": "GLClient.controller('toolTipCtrl',\n ['$scope', '$rootScope', 'Authentication',\n '$location', '$cookies', 'Translations', 'Node', '$... | javascript | chosen |
[
{
"from": "system",
"value": "Use Ember.Application's container in initializers blueprint\n"
},
{
"from": "human",
"value": "/* jshint expr:true */\nimport { expect } from 'chai';\nimport {\n describe,\n it,\n beforeEach\n} from 'mocha';\nimport Ember from 'ember';\nimport { initialize } from... | javascript | chosen |
[
{
"from": "system",
"value": "Add __completion and updatedAt to 'Vie scolaire'\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('impactApp')\n .config(function($stateProvider) {\n var index = 'espace_perso.mes_profils.profil.vie_scolaire';\n $stateProvider\n .state(... | javascript | chosen |
[
{
"from": "system",
"value": "Check we've got a result object before exiting the results loop.\n"
},
{
"from": "human",
"value": "/**\n * bit.ly access library code.\n */\nShortener = {\n displayName: 'Shortener',\n \n shorten: function() {\n var uri, callback, name;\n \n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update server.js to run after compilation\n"
},
{
"from": "human",
"value": "import { startServer } from \"./server\";\nstartServer();"
},
{
"from": "gpt",
"value": "import _ from \"lodash\";\nimport express from \"express\";\nimport http from \"http\";\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix credentials path - 2\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nconst fs = require('fs');\nconst credentialsPath = __dirname + '/../credentials.json');\nif(fs.existsSync(credentialsPath) || (process.argv[2] === '--config')) {\n\trequire('../lib/co... | javascript | chosen |
[
{
"from": "system",
"value": "Use Object.keys instead of Ember.keys"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n session: Ember.inject.service('session'),\n\n sessionData: Ember.computed('session.session.content.authenticated', funct... | javascript | chosen |
[
{
"from": "system",
"value": "Fix merge conflict - Remove TopNav story\n"
},
{
"from": "human",
"value": "/**\nCopyright 2016 Autodesk,Inc.\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 cop... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Remove fname from error msg\n\nWe cannot use `callee` in ESM :-(\n"
},
{
"from": "human",
"value": "import * as _ from \"../deps/underscore-1.10.2-esm.js\"\nimport { to_write } from \"./_writer.js\"\nimport { BiwaError } from \"./error.js\"\n//\n// assertions -... | javascript | chosen |
[
{
"from": "system",
"value": "Set chai dependency to latest version - v2.1.0_1\n"
},
{
"from": "human",
"value": "Package.describe({\n name: \"practicalmeteor:loglevel\",\n summary: \"Simple logger with app and per-package log levels and line number preserving output.\",\n version: \"1.2.0_1\... | javascript | chosen |
[
{
"from": "system",
"value": "Change mocha reporter to default cli\n"
},
{
"from": "human",
"value": "module.exports = {\n networks: {\n development: {\n host: \"localhost\",\n port: 8545,\n network_id: \"*\" // Match any network id\n }\n }\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'forceNew' instead of 'force new connection'\n"
},
{
"from": "human",
"value": "\n/* global require, describe, before, after, it */\n\nvar io = require('socket.io-client');\nvar should = require('should');\n\ndescribe('server-cdp', function () {\n var server = ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable resolve.alias for production build too\n"
},
{
"from": "human",
"value": "const path = require('path');\nmodule.exports = {\n webpack: (config, env) => {\n if (env === 'development') {\n config.resolve.alias = {\n 'react': path.resolve('node_m... | javascript | chosen |
[
{
"from": "system",
"value": "Update the path to QUnit css"
},
{
"from": "human",
"value": "var path = require('path')\n\nfunction createPattern (pattern) {\n return {\n pattern: pattern,\n included: true,\n served: true,\n watched: false\n }\n}\n\nfunction initQUnit (files, qunit)... | javascript | chosen |
[
{
"from": "system",
"value": "Change wording in utils test\n"
},
{
"from": "human",
"value": "const { expect } = require('chai');\nconst { generateTitle } = require('../lib/utils');\n\n\ndescribe('utils', function() {\n describe('.generateTitle()', function() {\n it('should generate a valid ... | javascript | chosen |
[
{
"from": "system",
"value": "[Admin] Improve the shipment ship form\n"
},
{
"from": "human",
"value": "(function($) {\n $.fn.extend({\n requireConfirmation: function() {\n return this.each(function() {\n return $(this).on('click', function(event) {\n event.preventDefaul... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong reference to songsList.js\n"
},
{
"from": "human",
"value": "var React = require('react');\nvar Songs = require('./components/songs.js');\n\nReact.render(\n <Songs />,\n document.getElementById('app')\n);\n"
},
{
"from": "gpt",
"value": "var ... | javascript | chosen |
[
{
"from": "system",
"value": "Add routes to get created and saved pins\n"
},
{
"from": "human",
"value": "const express = require('express')\nconst users = require('../Controllers/userCtrl')\nconst jwt = require('../Lib/jwt.js')\n\nconst router = express.Router()\n\nconst isAuthenticated = funct... | javascript | chosen |
[
{
"from": "system",
"value": "Implement following via many-to-many relation\n"
},
{
"from": "human",
"value": "import Knex from 'knex';\nimport Bookshelf from 'bookshelf';\n\nexport default function initBookshelf(config) {\n let knex = Knex(config);\n let bookshelf = Bookshelf(knex);\n\n book... | javascript | chosen |
[
{
"from": "system",
"value": "Remove filters restriction so that all tests are run.\n"
},
{
"from": "human",
"value": "// require all modules ending in \".tests.ts\" from source and all subdirectories\n\nvar testsContext = require.context('./source', true, /filters.*\\.tests\\.ts$/);\ntestsConte... | javascript | chosen |
[
{
"from": "system",
"value": "Install MuiThemeProvider in Root component.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport Game from './game';\nimport DevTools from './devTools';\nimport { connect } from 'redux';\nimport { createStore } from 'redux';\nimport { Provider } fro... | javascript | chosen |
[
{
"from": "system",
"value": "Add alert post guestbook sign (remove this later)\n"
},
{
"from": "human",
"value": "import { useMoralis } from 'react-moralis';\nimport { navigate } from 'gatsby-link';\n\nexport function GuestbookAuth() {\n const { authenticate, logout, Moralis } = useMoralis();\... | javascript | chosen |
[
{
"from": "system",
"value": "Revert the extension table reservation\n"
},
{
"from": "human",
"value": "let db;\ntry {\n db = require(\"rethinkdbdash\")(require(\"./config.json\").connectionOpts);\n} catch (err) {\n console.error(\"You haven't installed rethinkdbdash npm module or you don'... | javascript | chosen |
[
{
"from": "system",
"value": "Add adaptor for multiple argument functions\n"
},
{
"from": "human",
"value": "// Matching the public exports in husl-colors/husl\nmodule['exports'] = {};\nmodule['exports'][\"fromRGB\"] = husl.Husl.rgbToHusl;\nmodule['exports'][\"fromHex\"] = husl.Husl.hexToHusl;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add --form <id> --form <id> --form <id> support to sync command to limit the forms that are sync'd.\n"
},
{
"from": "human",
"value": "import Task from './task';\nimport DownloadRecords from './download-records';\nimport DownloadPhotos from './download-photos';\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Support just one storage as in kimar's patch\n"
},
{
"from": "human",
"value": "var errors = require('../errors'),\n storage = {};\n\nfunction getStorage(storageChoice) {\n // TODO: this is where the check for storage apps should go\n // Local file system ... | javascript | chosen |
[
{
"from": "system",
"value": "Add variables to 'parseJson' error message\n"
},
{
"from": "human",
"value": "import areObjectValuesDefined from '../utils/areObjectValuesDefined';\nimport pickVariablesFromJson from '../utils/pickVariablesFromJson';\n\n/**\n * \"parseJson\" Express middelware\n * @... | javascript | chosen |
[
{
"from": "system",
"value": "Update bubble sort test title\n"
},
{
"from": "human",
"value": "/**\n * @author Arnold Koh <arnold@kohded.com>\n * Developed: 4/10/2017\n * File: bubble-sort-test.js\n */\n\nconst expect = require('chai').expect;\nconst bubbleSort = require('../../../algorithms/sor... | javascript | chosen |
[
{
"from": "system",
"value": "Support pattern provided on relation\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar d = require('es5-ext/lib/Object/descriptor')\n , DOMInput = require('../_controls/input')\n\n , StringLine = require('dbjs/lib/objects')._get('StringLine')\n , Inp... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test that has conflicting globals\n"
},
{
"from": "human",
"value": "'use strict';\n\n// test MemberLookupExpression\nfunction f(a) {\n var b = [42];\n return (a||b)[0];\n}\n\nassert.equal(42, f(null));\nassert.equal(43, f([43]));\n\n// test NewExpression\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Rename constructor option to avoid collision with prototype constructor\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst _ = require('lodash')\n\nmodule.exports = function createError (message, status) {\n let props\n let Constructor = Error\n\n if (_.isP... | javascript | chosen |
[
{
"from": "system",
"value": "Add type=message for high priority notifications\n"
},
{
"from": "human",
"value": "var request = require('request');\nvar url = require('url');\n\nvar messageJson = function (token, message, cb) {\n\n if (!token) {\n cb(new Error('Needs token'));\n return;\n... | javascript | chosen |
[
{
"from": "system",
"value": "Check if vnode is function\n"
},
{
"from": "human",
"value": "export default function render(vnode, parent) {\n\tif (typeof vnode==='string') return document.createTextNode(vnode);\n\n let n = document.createElement(vnode.nodeName);\n\n let a = vnode.attributes ||... | javascript | chosen |
[
{
"from": "system",
"value": "Test that Ownable prevents non-owners from changing ownership.\n"
},
{
"from": "human",
"value": "contract('Ownable', function(accounts) {\n it(\"should have an owner\", function(done) {\n var ownable = Ownable.deployed();\n return ownable.owner()\n .then(... | javascript | chosen |
[
{
"from": "system",
"value": "Make naive HTML output work\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n// Usage: ghw <input> <output dir>\n// where <input> is either a file or a dir.\nvar VERSION = '0.0.1'\n\nvar fs = require('fs');\nvar marked = require('marked');\n\nvar args = proc... | javascript | chosen |
[
{
"from": "system",
"value": "Handle fields without validation objects attached"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport layout from '../templates/components/smd-form';\n\nexport default Ember.Component.extend({\n // Services\n toaster: Ember.inject.service('smd-toas... | javascript | chosen |
[
{
"from": "system",
"value": "Fix: Use the raw GitHub URL for old blacklist\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar https = require('https');\n\nvar concat = require('concat-stream');\n\nvar url = 'https://gulpjs.com/plugins/blackList.json';\n\nfunction collect(stream, cb) {\n s... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug with check for require()\n"
},
{
"from": "human",
"value": "/*\n * Setup for browser-based dig.\n */\n(function() {\n if (typeof require === undefined) {\n function require() {};\n }\n"
},
{
"from": "gpt",
"value": "/*\n * Setup for browser-... | javascript | chosen |
[
{
"from": "system",
"value": "Fix module name not being wrapped to read from variable"
},
{
"from": "human",
"value": "/**\n * @author {{{author}}}\n * @since {{{date}}}\n */\n\n(function () {\n 'use strict';\n\n angular\n .module(moduleName)\n .service('{{{elementName}}}', {... | javascript | chosen |
[
{
"from": "system",
"value": "fix(uglify): Fix the order of uglify.\n"
},
{
"from": "human",
"value": "const browserify = require('browserify')\nconst path = require('path')\nconst uglifyify = require('uglifyify')\n\nconst transform = require('./js-transform')\n\nmodule.exports = function ({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change ApplicationController to be an Ember.Controller\n"
},
{
"from": "human",
"value": "require('dashboard/core');\n\nDashboard.ApplicationController = Ember.ObjectController.extend();\n\nDashboard.RepositoriesController = Ember.ArrayController.extend({\n sortPro... | javascript | chosen |
[
{
"from": "system",
"value": "Add failing unit test for getFolderSubjects() with actual object\n"
},
{
"from": "human",
"value": "const assert = require('chai').assert\nconst { getFolderSubjects } = require('../checkAnyDataPresent.js')\n\ndescribe('checkAnyDataPresent', () => {\n describe('getF... | javascript | chosen |
[
{
"from": "system",
"value": "Improve description of wrapper functions\n"
},
{
"from": "human",
"value": "// Misc operations\n\nframework.addJavaScriptHelp(\"startGUI\", \"\", \"start GUI\");\n\nfunction startGUI() {\n framework.startGUI();\n}\n\n\nframework.addJavaScriptHelp(\"stoptGUI\", \"... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test failure due to missing Object.assign polyfill"
},
{
"from": "human",
"value": "// Because the tests need to be run through Webpack, we use this file as a single\n// entry point for all the tests, so any tests to be run must be require()'d here.\n\n'use stri... | javascript | chosen |
[
{
"from": "system",
"value": "Enable throwing asserts for tests.\n"
},
{
"from": "human",
"value": "import './AnnotationCommand.test'\nimport './annotationHelpers.test'\nimport './ArrayOperation.test'\nimport './ChangeHistory.test'\nimport './Clipboard.test'\nimport './Component.test'\nimport '.... | javascript | chosen |
[
{
"from": "system",
"value": "Create a function that generate random question\n"
},
{
"from": "human",
"value": "var questions = [\n Q1 = {\n question: \"What do HTML means?\",\n answer: \"HyperText Markup Language\"\n },\n Q2 = {\n question: \"What do CSS means?\",\n answer: \"Ca... | javascript | chosen |
[
{
"from": "system",
"value": "Make an object for areas in AreaOfStudy\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\nvar React = require('react');\n\nvar RequirementSet = require('./requirementSet');\n\nvar getRandomInt = require('../helpers/getRandomInt')\n\nvar AreaOfStudy = Re... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error from unchanged name\n"
},
{
"from": "human",
"value": "var util = require(\"./util\");\nvar colorify = util.colorify;\nvar argsToString = util.argsToString\n\nmodule.exports = new Wog;\n\nfunction Olg () {}\n\n// log to server\nOlg.prototype.log = function... | javascript | chosen |
[
{
"from": "system",
"value": "Fix method name typo in examples\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n//\n// See https://github.com/attm2x/m2x-nodejs/blob/master/README.md#example-usage\n// for instructions\n//\n\nvar config = require(\"./config\");\nvar M2X = require(\"m2x-te... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic predicate-matcher to API\n"
},
{
"from": "human",
"value": "var Promise = require('promise');\n\nfunction respondTo(message) {\n return new Promise(function(resolve, reject) {\n if (message) {\n resolve('Received message: ' + message);\n } else... | javascript | chosen |
[
{
"from": "system",
"value": "Allow gulp build to work on Windows\n\nThe problem with gulp pipeline is that it replaces /src/ with /lib/ in\nfilenames as a regex replace operation. The regex only worked for Unix\nbefore. Here we add a 2nd regex accomodate Windows backslashes and choose\nbetween the two by l... | javascript | chosen |
[
{
"from": "system",
"value": "Write min file to /dist\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n var gulp = require('gulp');\n var clean = require('gulp-clean');\n var uglify = require('gulp-uglify');\n var rename = require('gulp-rename');\n\n gulp.task('clean'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug a elements are not deleted at index 0\n"
},
{
"from": "human",
"value": "/**\n * Deletes an element from an array by its index in the array.\n *\n * @param {Array} array The original array.\n * @param {Number} index The index of the element to delete in the ... | javascript | chosen |
[
{
"from": "system",
"value": "Exit process if BBC_SERVICES_URL is not set\n"
},
{
"from": "human",
"value": "var EventSource = require(\"eventsource\"),\n EventEmitter = require(\"events\").EventEmitter,\n utils = require(\"radiodan-client\").utils,\n http = requ... | javascript | chosen |
[
{
"from": "system",
"value": "ui: Add keyboardShouldPersistTaps to Topic List screen\n\nNow that we have a search field and potentially a keyboard popped\nmake sure to process the first tap on the topic list.\n"
},
{
"from": "human",
"value": "/* @flow */\nimport React, { PureComponent } from 'r... | javascript | chosen |
[
{
"from": "system",
"value": "Add initial support for info windows\n"
},
{
"from": "human",
"value": "(function(window, google) {\n 'use strict';\n\n var Placard = {};\n\n Placard.Map = function(el, config) {\n this.el = el;\n this.config = config;\n this._map = this._createMap();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "fix(select-feed): Make sure the feed exists before checking its routes\n"
},
{
"from": "human",
"value": "/** Select a (group of) patterns from the GTFS feed */\n\nimport React, {Component, PropTypes} from 'react'\n\nimport SelectPatterns from './select-patterns'\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Standardize callback for exec... this isn't dry, probably should go into util\n"
},
{
"from": "human",
"value": "var shovel = require('../shovel'),\n util = require('../util'),\n temp = require('temp'),\n exec = require('child_process').exec;\n\nfunction co... | javascript | chosen |
[
{
"from": "system",
"value": "Create getIndex and Search functions\n"
},
{
"from": "human",
"value": "var data = [{\n \"title\": \"Alice in Wonderland\",\n \"text\": \"Alice falls into a rabbit hole and enters a world full of imagination.\"\n },\n\n {\n \"title\": \"Th... | javascript | chosen |
[
{
"from": "system",
"value": "Implement validation for numeric/integer parameter\n"
},
{
"from": "human",
"value": "function searchRequestBuilder(request) {\n var params = request.params;\n\n var queries = {};\n queries.result = {\n source: params.tableName,\n output: {\n startTime... | javascript | chosen |
[
{
"from": "system",
"value": "PATCH should 204 on success\n\nCloses #8\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst BaseHandler = require('./BaseHandler');\n\nclass PatchHandler extends BaseHandler {\n /**\n * Write data to the DataStore and return the new offset.\n *\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Simplify js that generates promises and fix bc break\n"
},
{
"from": "human",
"value": "// Returns a jQuery or AngularJS deferred object, or pass a success and fail callbacks if you don't want to use jQuery or AngularJS\nvar getAppVersion = {\n getVersionNumber: fu... | javascript | chosen |
[
{
"from": "system",
"value": "Test .set(key, value) resolves to value\n"
},
{
"from": "human",
"value": "import test from 'ava';\nimport Keyv from '../';\n\ntest('Keyv is a function', t => {\n\tt.is(typeof Keyv, 'function');\n});\n\ntest('Keyv cannot be invoked without \\'new\\'', t => {\n\tt.th... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for relative path and renderString\n"
},
{
"from": "human",
"value": "(function() {\n var expect, Environment, Loader, templatesPath;\n\n if(typeof require != 'undefined') {\n expect = require('expect.js');\n Environment = require('../sr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem filename in require\n"
},
{
"from": "human",
"value": "module.exports = {\n entityManager: require( 'easy/test/entitymanager.mock' ),\n request: require( 'easy/test/request.mock' ),\n response: require( 'easy/test/response.mock' ),\n fakeAsyn... | javascript | chosen |
[
{
"from": "system",
"value": "Make the bound value more perdictable.\n\nIf the file input is set to multiple, always bind an array. If it's not set to multiple is gets the single file.\n"
},
{
"from": "human",
"value": "//\n// angular-file-model\n// ==================\n//\n// Directive that make... | javascript | chosen |
[
{
"from": "system",
"value": "Add playlists reducer to store\n"
},
{
"from": "human",
"value": "import { combineReducers } from 'redux';\nimport { routerReducer as routing } from 'react-router-redux';\nimport auth from './auth';\n\nconst rootReducer = combineReducers({\n auth,\n routing,\n});\... | javascript | chosen |
[
{
"from": "system",
"value": "Select button to search for opponent"
},
{
"from": "human",
"value": "/**\n * Welcome to Pebble.js!\n *\n * This is where you write your app.\n */\n\nvar UI = require('ui');\nvar Vector2 = require('vector2');\n\nvar main = new UI.Card({\n title: 'PokePebble',\n ba... | javascript | chosen |
[
{
"from": "system",
"value": "Add npm package require fallback in generator example\n"
},
{
"from": "human",
"value": "// Load our letter icon generator\nvar materialLetterIcons = require('../generator');\n\n// Generate the letter icons and export them to dist/\nmaterialLetterIcons.generateIcons... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dashboards from peers list\n"
},
{
"from": "human",
"value": "var bluebird = require('bluebird');\nvar request = bluebird.promisify(require('browser-request'));\n\nmodule.exports.remotes = function remotes(host) {\n return request(host + '/api/clients')\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove header tag from app\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport InputForm from './components/InputForm';\nimport OutputTable from './components/OutputTable';\n\nfunction App() {\n return (\n <div className=\"App\">\n <header... | javascript | chosen |
[
{
"from": "system",
"value": "Fix users with multiple ranks moving randomly in the userlist\n"
},
{
"from": "human",
"value": "Filters.filter(\"sortUsers\", [function () {\n return function (input, channel)\n {\n if (input)\n {\n var users = input.sort(function (a,... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to use spawn and more events.\n"
},
{
"from": "human",
"value": "var tmp = require('tmp');\nvar express = require('express');\nvar app = express();\napp.use(express.bodyParser());\n\napp.get('/vocalization/fr/homme', function (request, response) {\n respon... | javascript | chosen |
[
{
"from": "system",
"value": "Use es6 notation in serveronly"
},
{
"from": "human",
"value": "const app = require(\"../js/app.js\");\nconst Log = require(\"logger\");\n\napp.start(function (config) {\n\tvar bindAddress = config.address ? config.address : \"localhost\";\n\tvar httpType = config.u... | javascript | chosen |
[
{
"from": "system",
"value": "build(Build): Exclude giant, static JS files from transpilation.\n"
},
{
"from": "human",
"value": "'use strict';\n(() => {\n module.exports = (gulp, plugins, config) => {\n return () => {\n return gulp.src([`${config.patternsPath}/**/*.js`, `!${config.patt... | javascript | chosen |
[
{
"from": "system",
"value": "Fix style errors on form validation\n"
},
{
"from": "human",
"value": "// django-dynamic-formset fixes for bootstrap 3\n\n(function($) {\n $(document).ready(function(){\n function fixDeleteRow ($deleteClickable) {\n // Move .delete-row link imme... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment that results depend on timezone\n"
},
{
"from": "human",
"value": "const startDate = new Date(Date.UTC(2007, 0, 10, 10, 0, 0)); // > 'Wed, 10 Jan 2007 10:00:00 GMT'\nconst endDate = new Date(Date.UTC(2007, 0, 10, 11, 0, 0)); // > 'Wed, 10 Jan 2007 11:0... | javascript | chosen |
[
{
"from": "system",
"value": "Use same data processing for main and summary charts.\n"
},
{
"from": "human",
"value": "function example () {\n\n var\n container = document.getElementById('demo'),\n H = Humble.Vis,\n E = Flotr.EventAdapter,\n data = [],\n hash = window.location.ha... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for when views/partials/ doesn't exist.\n"
},
{
"from": "human",
"value": "var fs = require('fs'),\n hbs = require('hbs');\n\nmodule.exports = function(hbs) {\n var blocks = {};\n\n hbs.registerHelper('extend', function(name, context) {\n var blo... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.