conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use an anonymous module declaration for AMD.\n\nThis allows loading via AMD using require('bluebird'), to match the npm module name.\n"
},
{
"from": "human",
"value": "if( typeof module !== \"undefined\" && module.exports ) {\n module.exports = Promise;\n}\nelse ... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up the default page controller a bit.\n"
},
{
"from": "human",
"value": "/**\n * The default controller for your page structure.\n */\nvar turnpike = require('turnpike');\nvar util = require('util');\nvar _ = require('underscore');\n\nfunction Page(... | javascript | chosen |
[
{
"from": "human",
"value": "Add Duplicate Encode solution suite\n"
},
{
"from": "gpt",
"value": "var DuplicateEncode = function(){};\n\nDuplicateEncode.prototype.duplicateencode = function (word) {\n var letterCount = 0, counter = {}, out = \"\";\n for(var x = 0; x < word.length; x++){\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Add CORS to make demo easier\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\nvar widgets = require('./widgets');\nvar log = require('bunyan').createLogger({name: 'widgets'});\n\n// Log HTTP requests\napp.use(express.logger... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem accessing getter properties from render\n\nForce the object has the values instead of getter and setter properties.\nThis is necessary because seems there is some bug around React accessing getter properties from objects comming from Electron remote API."
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Change EntityPool to not jsonify save/load data.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction EntityPool() {\n\tthis.nextId = 0;\n\tthis.entities = {};\n}\nEntityPool.prototype.add = function() {\n\tvar id = this.nextId;\n\tthis.nextId++;\n\tvar en... | javascript | chosen |
[
{
"from": "system",
"value": "Rename field to signify privacy\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction EntityPool() {\n\tthis.nextId = 0;\n\tthis.entities = {};\n}\nEntityPool.prototype.create = function() {\n\tvar id = this.nextId++;\n\tthis.entities[id] = {};\n\treturn id... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'print' function visible inside the webworker\n"
},
{
"from": "human",
"value": "\nimportScripts('../dom.js');\n\nfunction mutation(evt) {\n postMessage(JSON.stringify(evt));\n}\n\nonmessage = function(message) {\n\ttry {\n var body = message.data.body.toS... | javascript | chosen |
[
{
"from": "system",
"value": "Update order to include rule for \"is\" property.\n"
},
{
"from": "human",
"value": "module.exports.sortMemberRules = {\n\t\"sort-class-members/sort-class-members\": [2, {\n\t\t\"order\": [\n\t\t \"[static-properties-getter]\",\n\t\t \"[static-styles-getter]\",\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Change pre from 'save' to 'validate'\n\nValidate is called before save or udpate so now I don't get plain\npasswords on update. That's good...\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\nvar bcrypt = require... | javascript | chosen |
[
{
"from": "system",
"value": "Update Db Information to settings from mLab\n"
},
{
"from": "human",
"value": "module.exports = {\n 'secret': 'longobnoxiouspassphrase',\n 'database': 'mongodb://localhost:saas-tutorial/saas-tutorial'\n};\n"
},
{
"from": "gpt",
"value": "module.exports... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error message when revoking an app's access\n"
},
{
"from": "human",
"value": "var Token = require('../../app/models/token');\n\nmodule.exports = (req, res) => {\n Token.find({ user: req.user._id, appId: req.params['id'] }).remove(function(err) {\n if (!err)... | javascript | chosen |
[
{
"from": "system",
"value": "Change action creator name to changeGridAction\n"
},
{
"from": "human",
"value": "import {gridChangedAction, GRID_CHANGED} from \"../../src/actions/GameActions.js\";\n\ndescribe(\"Game Actions\", () => {\n\n it(\"should exist\", () => {\n gridChangedAction.shoul... | javascript | chosen |
[
{
"from": "system",
"value": "Update eslint configuration for Webpack 2\n\nThe webpack options for resolver settings has changed with Webpack 2 (which is what the upcoming version of `@zeal/react-scripts` uses, so we need to change our configuration a bit.\n\nIdeally, we'd just point at `@zeal/react-scripts... | javascript | chosen |
[
{
"from": "system",
"value": "Comment out csv test case Travis\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar grunt = require('grunt');\n\nfunction readFile(file) {\n var contents = grunt.file.read(file);\n\n if (process.platform === 'win32') {\n contents = contents.replace(/\\r\\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment about when auto layout doesn't work\n"
},
{
"from": "human",
"value": "/**\n * Convert monitors from VM format to what the GUI needs to render.\n * - Convert opcode to a label and a category\n * - Add missing XY position data if needed\n */\nconst Opcode... | javascript | chosen |
[
{
"from": "system",
"value": "Fix place of broadcasting of 'user logged in' event\n- It was called only for standard authentication\n"
},
{
"from": "human",
"value": "angular.module('codebrag.auth')\n\n .factory('authService', function($http, httpRequestsBuffer, $q, $rootScope) {\n\n v... | javascript | chosen |
[
{
"from": "system",
"value": "Change extraction of status for AUTH_ERROR\n\nBased on this merged fix on AOR:\r\nhttps://github.com/marmelab/admin-on-rest/pull/1409/files#diff-c3ae69f3d76aad8177df8dd3a54c9476"
},
{
"from": "human",
"value": "import storage from './storage';\n\nexport const authCl... | javascript | chosen |
[
{
"from": "system",
"value": "Add domain name to event properties\n"
},
{
"from": "human",
"value": "var config = {};\n\nvar doRequest = function(method, path, body, callback) {\n var xhr = new XMLHttpRequest();\n xhr.open(method, config.host+\"/api/\"+path, true);\n xhr.setRequestHeade... | javascript | chosen |
[
{
"from": "system",
"value": "Add browser & amd support\n"
},
{
"from": "human",
"value": "/*globals module*/\n/**\n* Simple workaround for non-universal array destructuring assignment\n* @param {array} arr Array of values to destructure\n* @param {function} unpackCb The callback which will be p... | javascript | chosen |
[
{
"from": "system",
"value": "Comment it, change it so that it works properly on errors\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n alertTemplateText = $('#alertTemplateText').html();\n alertTemplate = Handlebars.compile(alertTemplateText);\n\n for (var i = 0; i < urls... | javascript | chosen |
[
{
"from": "system",
"value": "Fix one coding styleguide violation\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2016 Jeremy Thomerson\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar _ = require('underscore'),\n cheerio = require('cheerio'),\n BasePlugin = require... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up profiling completion code\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Fidelity = require('../lib/index.js');\nconst Genet = require('genet');\n\nconst someWork = (resolve) => {\n setImmediate(() => resolve(Math.floor(Math.random() * (10 - 0))... | javascript | chosen |
[
{
"from": "system",
"value": "Use JSON to pass in data to CommentList\n"
},
{
"from": "human",
"value": "var CommentBox = React.createClass({\n render: function() {\n return (\n <div className=\"commentBox\">\n <h1>Comments</h1>\n <CommentList />\n <CommentForm />\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove plus signs and spaces from sent phone number\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport express from 'express';\nimport models from '../models';\nimport { verifyJWT } from '../middleware';\n\nlet User = models.User;\n\nlet router = express.Ro... | javascript | chosen |
[
{
"from": "system",
"value": "Update self-test for new text for meteor remove-platform\n"
},
{
"from": "human",
"value": "var selftest = require('../selftest.js');\nvar Sandbox = selftest.Sandbox;\nvar files = require('../files.js');\n\nselftest.define(\"add cordova platforms\", function () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add cwd option to sonar client. Update to execFile instead of spawn\n"
},
{
"from": "human",
"value": "const {\n spawn\n} = require(\"child_process\");\n\nconst options = {\n sources: function (path) {\n return `-Dsonar.sources=\"${path}\"`;\n },\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update midi player javascript file\n"
},
{
"from": "human",
"value": "var $ = require(\"jquery\");\n\nvar playTrack = function (filename, pk) {\n // Load a MIDI file\n MIDIjs.stop();\n MIDIjs.play(filename);\n $(\"#play-\" + pk).hide();\n $(\"pause-\" + pk).sho... | javascript | chosen |
[
{
"from": "system",
"value": "Remove manual API token param in ReederSidebarController\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('reeder.sidebar.controllers', []).\n controller('ReederSidebarController', [\n '$scope', '$http', '$cookies',\n function SidebarControl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix prompt validator that broke netrc saving\n"
},
{
"from": "human",
"value": "import { promisify } from 'bluebird';\nimport { prompt as promptCallback } from 'promptly';\n\nimport { getNetrc, saveNetrc } from '../netrc';\n\nconst prompt = promisify(promptCallback)... | javascript | chosen |
[
{
"from": "system",
"value": "Add semantic tags for devsys\n"
},
{
"from": "human",
"value": "import React, {PropTypes} from 'react'\nimport SyntaxHighlighter from 'react-syntax-highlighter'\nimport { docco } from 'react-syntax-highlighter/dist/styles'\nimport Button from '../Button'\nimport Ava... | javascript | chosen |
[
{
"from": "system",
"value": "Stop avoiding if radio changes station\n\nAvoider listens for a play or stopAvoiding action whilst avoiding.\nFinding play will trigger `stopAvoiding`, finding `stopAvoiding` will\njust cancel the listener.\n"
},
{
"from": "human",
"value": "var utils = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Change default log level to info and above\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Load requirements\nconst winston = require('winston'),\n path = require('path'),\n fs = require('fs');\n\n// Add rotation to winston logs\nrequire('winston-da... | javascript | chosen |
[
{
"from": "system",
"value": "Set auth token on page reloads"
},
{
"from": "human",
"value": "(function (angular) {\n \"use strict\";\n\n angular.module(\"mflAdminAppConfig\", [\n \"sil.common.logging\",\n \"sil.api.wrapper\",\n \"sil.grid\"\n ])\n\n .constant(\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add style tags if needed\n"
},
{
"from": "human",
"value": "/**\n * @desc appendCss() appends css once jQuery + head element have finished loading\n *\n * @param {String} should be wrapped in style tags <style>+ 'css' + </style>\n */\nimport when from './when';\n\nf... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug: change playerId to userId\n"
},
{
"from": "human",
"value": "const Board = require('../board/board.model');\nconst User = require('./user.model');\n\nconst controller = {};\n\ncontroller.newPlayer = (req, res) => {\n const playerId = User.getUniqueId();\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Store likes on root scope for access in layout\n\n* Inject rootScope service into home controller\n* (Is this even necessary?)\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* Controllers */\n\nangular.module('myApp.controllers', []).\n controller('HomeCtrl',... | javascript | chosen |
[
{
"from": "system",
"value": "Add editMode as query parameter to speed up coding and possible future use\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n isAdmin: Ember.computed('node', function(){\n return this.get('model.node... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error in default page title\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst Joi = require('joi');\n\nexports.main = {\n auth: {\n mode: 'try',\n strategy: 'session',\n },\n plugins: {\n 'hapi-auth-cookie': {\n redirectTo: false,\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Modify formatQuantLabel so it attempts to always show something\n\nAs it stood, formatQuantLabel would simply show 0.0 for values in the\nbrowser where the value was \"too small\". This meant that the upper and lower\nvalues in the vertical \"ruler\" wouldn't be very helpful fo... | javascript | chosen |
[
{
"from": "system",
"value": "Add global chai `expect` for system tests\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\nrequire('shelljs/global');\nrequire('colors');\n\nvar async = require('async'),\n fs = require('fs'),\n path = require('path'),\n Mocha = require('mocha'),\n\n... | javascript | chosen |
[
{
"from": "system",
"value": ":new: Support comma separated watch targets in cli\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n'use strict'\nprocess.title = 'ucompiler'\n\nrequire('debug').enable('UCompiler:*')\nvar UCompiler = require('..')\nvar knownCommands = ['go', 'watch']\nvar pa... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Useless Logs and Add Error Handler\n"
},
{
"from": "human",
"value": "module.exports = function (app) {\n var ACL = app.models.ACL\n var accessControls = [\n\t\t{\n model: 'AccessToken',\n accessType: '*',\n principalType: 'ROLE',\n prin... | javascript | chosen |
[
{
"from": "system",
"value": "fix(server): Add field data to team controller\n"
},
{
"from": "human",
"value": "'use strict';\n\nlet mongoose = require('mongoose');\nlet Schema = mongoose.Schema;\n\nlet teamSchema = new Schema({\n name : {\n type: String,\n required: true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Sort Gulp tasks in executing order\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar eslint = require('gulp-eslint');\nvar excludeGitignore = require('gulp-exclude-gitignore');\nvar jsonlint = require(\"gulp-jsonlint\");\nvar mocha... | javascript | chosen |
[
{
"from": "system",
"value": "Update let definitions to const\n"
},
{
"from": "human",
"value": "let gulp = require(\"gulp\");\nlet babel = require(\"gulp-babel\");\n\ngulp.task(\"babel\", () =>\n gulp.src([\"src/**/*.js\", \"!src/**/*.test.js\"])\n .pipe(babel())\n .pipe(gulp.d... | javascript | chosen |
[
{
"from": "system",
"value": "Update copyright/license info in source file\n"
},
{
"from": "human",
"value": "/**\n * @fileoverview Bootstrap for the Treesaver library.\n */\n\n/**\n * @preserve Copyright 2010 Filipe Fortes ( www.fortes.com ).\n * Version: 0.1.\n *\n * Open source license to be ... | javascript | chosen |
[
{
"from": "system",
"value": "Add and default to `build` task\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar del = require('del');\nvar spawn = require('child_process').spawn;\nvar browserSync = require('browser-sync');\nvar prefix = require('gulp-a... | javascript | chosen |
[
{
"from": "system",
"value": "UI: Fix for duplicate items in navs.\n\nWe now clear out the nav list before appending new items to it.\n"
},
{
"from": "human",
"value": "function setupNav(nav) {\n nav.forEach(function(i) {\n $('.nav.current').append('<li><a href=\"#\">' + i + '</a></li>... | javascript | chosen |
[
{
"from": "system",
"value": "Make 'read' the default 'file' action\n"
},
{
"from": "human",
"value": "const actionTypes = require('../actions/actionTypes');\nconst actions = require('../actions');\nconst { identity, omit } = require('lodash/fp');\nconst fs = require('fs');\nconst request = requ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a set width function\n"
},
{
"from": "human",
"value": "var Controls = require('./controls');\n\n\nfunction StompScreen(options) {\n if(typeof options.el === 'string') {\n options.el = document.querySelector(options.el);\n }\n\n this.el = options.el;\n th... | javascript | chosen |
[
{
"from": "system",
"value": "Fix range slider merged values tooltip\n"
},
{
"from": "human",
"value": "import React, { forwardRef, useLayoutEffect } from 'react'\nimport PropTypes from 'prop-types'\n\nimport styles from './styles.module.scss'\n\nconst MergedValues = forwardRef(({ handles, ...pr... | javascript | chosen |
[
{
"from": "system",
"value": "Implement multiply, subtract, and divide methods\n"
},
{
"from": "human",
"value": "var add = function(x, y) { return x + y; };"
},
{
"from": "gpt",
"value": "var add = function(x, y) { return x + y; };\n\nvar multiply = function(x, y) { return x * y; };... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for headers post-processing in error cases.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar angular = require('angular');\nvar HyRes = require('hy-res');\n\nangular.module('hrCore', [])\n .factory('hrHttp', ['$http', function($http) {\n return functi... | javascript | chosen |
[
{
"from": "system",
"value": "Add code to subscribe to sources on click\n"
},
{
"from": "human",
"value": "var eventSources = [];\n\n$(function() {\n createEventSource({\n source: 'Police',\n uri: 'http://156.35.95.69/server-sent-events/server/server.php',\n options: {},\n onMessage... | javascript | chosen |
[
{
"from": "system",
"value": "Fix symlink creation for the examples\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function (gulp, $) {\n\n gulp.task('scripts:setup', function () {\n return gulp.src('source')\n .pipe($.symlink('examples/source', { force: true }));\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplication and extra knowledge\n\nI guess we can trust when.isPromise here.\nMaybe we should consider using buster.assertions.add('isPromise')\n"
},
{
"from": "human",
"value": "(function(buster, fn, when) {\n\nvar assert = buster.assert;\n\nfunction f(x, y)... | javascript | chosen |
[
{
"from": "system",
"value": "Increase timeout on UI tests\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar assert = require('assert');\nvar Browser = require('zombie');\nvar app = require('../../app');\nvar config = require('config');\n\nBrowser.localhost(config.hosting_server.host, co... | javascript | chosen |
[
{
"from": "system",
"value": "Improve error handling and reporting in executable.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar path = require('path')\n , target = require(path.join(process.cwd(), process.argv[2]))\n\nvar result = require('../lib/execute')(target)\n\nif (!resu... | javascript | chosen |
[
{
"from": "system",
"value": "Create angular Category $resource service for data handling\n"
},
{
"from": "human",
"value": "\n\napp.factory('SessionService', function($http, $state, $location) {\n var bogusSession = injectedSession\n , pre\n , status;\n\n function init() { //... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reference to context in require.context\n"
},
{
"from": "human",
"value": "import history from '!json!../assets/data/history.json'\nimport metadata from '!json!../assets/data/metadata.json'\n// Loading latest season in the main bundle itself\nimport latestSeason... | javascript | chosen |
[
{
"from": "system",
"value": "Delete version works now in cli\n"
},
{
"from": "human",
"value": "var program = require('commander');\nvar AWS = require('aws-sdk'); \nvar versions = require('./lib/versions');\nvar stacks = require('./lib/stacks');\n\nAWS.config.update({region: 'us-east-1'});\n\np... | javascript | chosen |
[
{
"from": "system",
"value": "Update tasks to Grunt 0.4 API\n"
},
{
"from": "human",
"value": "var wordpress = require( \"../\" );\n\nmodule.exports = function( grunt ) {\n\nvar client = (function() {\n\tvar _client;\n\n\treturn function() {\n\t\tif ( !_client ) {\n\t\t\tvar config = grunt.confi... | javascript | chosen |
[
{
"from": "system",
"value": "Update Registry.once tests to match Registry.on\n"
},
{
"from": "human",
"value": "import test from 'ava';\nimport Registry from '../src/registry';\n\ntest('Registry.once registers one handler to singles', t => {\n\n let registry = Registry([]);\n registry.onc... | javascript | chosen |
[
{
"from": "system",
"value": "Update api-list JSON with new angular.io\n"
},
{
"from": "human",
"value": "var https = require('https'),\n fs = require('fs'),\n options = {\n hostname: 'angular.io',\n path: '/docs/ts/latest/api/api-list.json',\n method: 'GET'\n },\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Update server-route sub-generator;\nRefactor Code, wrap in IFFE\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar express = require('express');\n\n/*\n * Require Some Controller\n */\n// var controller = require()\n\nmodule.exports = function(app) {\n\n var r... | javascript | chosen |
[
{
"from": "system",
"value": "Add Expression alias to BindExpression"
},
{
"from": "human",
"value": "/* @flow */\n\nimport defineType, { assertNodeType } from \"./index\";\n\ndefineType(\"AwaitExpression\", {\n builder: [\"argument\"],\n visitor: [\"argument\"],\n aliases: [\"Expression\", \... | javascript | chosen |
[
{
"from": "system",
"value": "fix: Make the card name more clear on a multiple result\n"
},
{
"from": "human",
"value": "const utilities = require('./utilities');\n\nconst limited = (card) => card.limited ? ' | limited' : '';\nconst unique = (card) => card.unique ? ' | unique' : '';\nconst ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix fullscreen to work also with first level items\n"
},
{
"from": "human",
"value": "angular.module('sgApp')\n .controller('ElementCtrl', function($scope, $stateParams, $state,\n $rootScope, Styleguide) {\n\n var section = $stateParams.section.split('.'),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Enable latest version of newrelic agent"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"meteor sql bindings for server-side calls\"\n});\n\nNpm.depends({ \"newrelic\": \"1.0.1\" });\n\nPackage.on_use(function(api) {\n if (api.export) api.export('n... | javascript | chosen |
[
{
"from": "system",
"value": "Use native sort + treat empty data\n"
},
{
"from": "human",
"value": "import sortBy from 'lodash/sortBy';\nimport { validateAssessmentItem } from '../../utils';\n\nfunction sorted(items) {\n return sortBy(items, ['order']);\n}\n\nexport function getNodeAssessmentIt... | javascript | chosen |
[
{
"from": "system",
"value": "Verify that buttons are disabled after voting\n"
},
{
"from": "human",
"value": "/**\n * Created by larryjones on 6/22/17.\n */\n\nimport React from 'react';\nimport { mount } from 'enzyme';\nimport Voting from './Voting';\n\ndescribe('Voting', () => {\n it('render... | javascript | chosen |
[
{
"from": "system",
"value": "Add DELETE_POST to reducer function\n"
},
{
"from": "human",
"value": "import _ from 'lodash';\nimport { FETCH_POSTS, FETCH_POST } from '../actions';\n\nexport default function(state = {}, action) {\n switch (action.type) {\n case FETCH_POST:\n const post =... | javascript | chosen |
[
{
"from": "system",
"value": "[WEB-819] Add active, hover, focus styles to Link\n"
},
{
"from": "human",
"value": "export default ({ colors, fonts }) => {\n const defaultStyles = {\n fontFamily: fonts.default,\n textDecoration: 'none',\n color: colors.text.link,\n };\n\n return {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Chapter 04, exercise 3\n"
},
{
"from": "human",
"value": "function arrayToList(arr) {\n var list = null;\n for (var i = arr.length - 1; i >= 0; --i)\n list = { value: arr[i], rest: list };\n return list;\n}\n\nfunction listToArray(list) {\n va... | javascript | chosen |
[
{
"from": "system",
"value": "Update git url and bump version to 0.1.1\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'hubaaa:easy-meteor-settings',\n version: '0.1.0',\n // Brief, one-line summary of the package.\n summary: \"Easily read deep values from Meteor.settings using... | javascript | chosen |
[
{
"from": "system",
"value": "Attach version to simple schema.\n"
},
{
"from": "human",
"value": "Package.describe({\n summary: \"S3 signed uploads for meteorjs.\",\n version: \"0.0.1\",\n git: \"https://github.com/jimmiebtlr/s3-signed-upload.git\"\n});\n\nPackage.on_use(function(api){\n api... | javascript | chosen |
[
{
"from": "system",
"value": "[bot] Add in previously uncommited stuff\n"
},
{
"from": "human",
"value": "const e = require('eris')\n\nconst fs = require('fs')\n\n// Please edit config.json with your token.\nvar conf = JSON.parse(fs.readFileSync('../config.json', 'utf8'))\n\n// You may change th... | javascript | chosen |
[
{
"from": "system",
"value": "Add Read single Product method to Angular Controller.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('products').controller('ProductsController', ['$scope', '$stateParams', '$location', 'Products',\n\tfunction($scope, $stateParams, $location, Pro... | javascript | chosen |
[
{
"from": "system",
"value": "Complete asserts tests to pass\n"
},
{
"from": "human",
"value": "\nmodule(\"About Asserts (topics/about_asserts.js)\");\n\ntest(\"ok\", function() {\n ok(__ === true, 'what will satisfy the ok assertion?');\n});\n\ntest(\"not ok\", function() {\n ok(__ === fa... | javascript | chosen |
[
{
"from": "system",
"value": "Rename a variable for clarity\n\ncurrentDomains → blockedDomains"
},
{
"from": "human",
"value": "function checkForPeevskiDomain(url) {\n\tvar currentDomains = [\n\t\t'monitor.bg',\n\t\t'telegraph.bg',\n\t\t'politika.bg',\n\t\t'europost.eu',\n\t\t'europost.bg',\n\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test description in barnumbers test\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst assert = require('assert');\nconst xpath = require('fontoxpath');\nconst utils = require('./utils');\n\nconst mei = utils.getTestMeiDom('barnumbers.mei');\n\ndescribe... | javascript | chosen |
[
{
"from": "system",
"value": "Set defaults value to fields\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar UserSchema = new Schema(\n{\n lastName : String,\n firstName : String,\n username : String,\n email : St... | javascript | chosen |
[
{
"from": "system",
"value": "Remove useless code +cache improvement\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar config = require('./server/config');\nvar items = require('./server/data/items');\nvar express = require('express');\nvar handlebars = require('express-handlebars');\nvar ... | javascript | chosen |
[
{
"from": "system",
"value": "Make _filename and save non-enumerable and fixed indentation\n\nPR: https://github.com/brendanashworth/flatfile/pull/1\n"
},
{
"from": "human",
"value": "var fs = require('fs');\n\n// This is the flatfile.db() function. It instantiates a local database asynchronousl... | javascript | chosen |
[
{
"from": "system",
"value": "Fix add and delete methods\n"
},
{
"from": "human",
"value": "class PGroup {\n\tconstructor(array) {\n\t\tthis.members = array;\n\t}\n\n\tadd(element) {\n\t\treturn new PGroup(this.members.slice().push(element));\n\t}\n\n\tdelete(element) {\n\t\treturn new PGroup(th... | javascript | chosen |
[
{
"from": "system",
"value": "Move graphiql to a separate bundle to save 150kb\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react'\n\nimport GraphiQL from 'graphiql'\nimport 'graphiql/graphiql.css'\n\nimport Breadcrumbs from 'components/Breadcrumbs'\n\nexport default class ... | javascript | chosen |
[
{
"from": "system",
"value": "FIX : fenêtre login ne se ferme plus sur clic en dehors popup ou esc"
},
{
"from": "human",
"value": "/* \n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the tem... | javascript | chosen |
[
{
"from": "system",
"value": "Update CH-DW -> CH-RW to match latest spec\n"
},
{
"from": "human",
"value": "var defaults = [\n {\n title: 'iPad 2',\n ch: {\n dpr: '1.0'\n }\n },\n {\n title: 'Nexus S',\n ch: {\n dpr: '1.5'\n }\n },\n {\n title: 'Nexus 4',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add tracking to all pages\n"
},
{
"from": "human",
"value": "Router.map( function () {\n this.route('home', {\n path: '/',\n template: 'home'\n });\n this.route('about', {\n path: '/about',\n template: 'about'\n });\n this.route('cesium', {\n pat... | javascript | chosen |
[
{
"from": "system",
"value": "[DOCS] Add a proper file description for the 'test' grunt task\n"
},
{
"from": "human",
"value": "/**\n * Test task.\n * Replaces all t3b_template strings and other meta-data with the data\n * specified inside the 'package.json'. (Should be run after downloading the... | javascript | chosen |
[
{
"from": "system",
"value": "Make ButtonIconText button proptypes explicit\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport IconText from '../IconText';\nimport css from './ButtonIconText.css';\n\nclass ButtonIconText extends Component {\n constru... | javascript | chosen |
[
{
"from": "system",
"value": "Add `lodash` to `externals` option of webpack\n"
},
{
"from": "human",
"value": "import path from 'path'\n\nconst library = 'style-script'\nconst srcPath = path.resolve(__dirname, 'src')\nconst libPath = path.resolve(__dirname, 'lib')\n\nexport default {\n devtool:... | javascript | chosen |
[
{
"from": "human",
"value": "Rebuild tests for stream methods.\n\n On branch master\n\n\tmodified: test/stream_methods_test.js\n"
},
{
"from": "gpt",
"value": "var FS = require('fs')\n\n , FILESTREAM = require('../index')\n\n\nexports[\"#newReadStream() method\"] = {\n\n \"creates new ReadSt... | javascript | chosen |
[
{
"from": "system",
"value": "Update login and signup api url\n"
},
{
"from": "human",
"value": "const router = require('koa-router');\n\nconst userController = require('../controller/user');\n\nexports.init = (router) => {\n router\n .post('/auth/login', userController.login)\n .post('/auth/... | javascript | chosen |
[
{
"from": "system",
"value": "Change the way we retrieve statistics\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst config = require(`${__dirname}/../config/init`);\n\n/**\n * makeAllRowRequestBody(str)\n * @param string field Field to query parameters from.\n * @param string from Date... | javascript | chosen |
[
{
"from": "system",
"value": "Update test for browser warning component\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport BrowserWarning from './BrowserWarning';\nimport { shallowWithIntl } from 'utils/testUtils';\n\ndescribe('pages/browser-warning/BrowserWarning', () => {\... | javascript | chosen |
[
{
"from": "system",
"value": "Use cache factory to save questionnaire and return url on add new question\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('ngQuestionnaires.questionnaireNewController', [\n 'ng'\n ])\n .controller('questionnaireNewController', [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Restructure integration test to load fixture data in beforeEach\n"
},
{
"from": "human",
"value": "import pg from 'pg-promise';\nimport dbConfig from '../../../../server/api/util/db-config';\n\nconst pgp = pg();\n\nconst TABLE_NAME = 'transaction';\n\nfunction getIn... | javascript | chosen |
[
{
"from": "system",
"value": "Use plain random generator instead of time based\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar element = require('../valid-html-element')\n , randomId = require('time-uuid');\n\nmodule.exports = function () {\n\tif (element(this).id) return this.id;\n\tr... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.