conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Correct support for ngl NPM commands\n" }, { "from": "human", "value": "'use strict';\n\nconst spawn = require('child_process').spawn;\n\nmodule.exports = function (rootDir, type) {\n const args = Array.from(arguments).slice(2);\n\n spawn('npm', ['run'].concat...
javascript
chosen
[ { "from": "system", "value": "Allow the external webpack bundles to be specified with the global file list.\n" }, { "from": "human", "value": "// Default karma configuration\n\nvar _ = require('lodash');\n\nvar sharedConfig = require('./shared.config');\n\nvar webpackPreprocessorLibrary = 'webpa...
javascript
chosen
[ { "from": "system", "value": "Add additional ignoreDelimiter code to fixture\n" }, { "from": "human", "value": "(function foo() {\n 'use strict';\n <%\n if someCondition do\n %>\n someMethod('<?php foo('test') ?>')\n <% end %>\n return '<%= asset_path('foo.png') %>' + '<% some_method() ...
javascript
chosen
[ { "from": "system", "value": "Set the number in sessions and correclty compare the values\n" }, { "from": "human", "value": "// Dependencies\nvar CaptchaPng = require(\"captchapng\");\n\n// Sessions\nvar sessions = {};\n\n// Captcha configuration\nvar serverConfig = {\n width: 100,\n heigh...
javascript
chosen
[ { "from": "system", "value": "Set valid variable as false\n" }, { "from": "human", "value": "var cordova = require(\"cordova\");\nwindow.onload = action\nvar action = document.pesan.action = login();\t\nvar rs = [\"Royal Progress\", \"RSUP Dr Cipto Mangunkusumo\", \"RSUP Fatmawati\", \"RSUP Pers...
javascript
chosen
[ { "from": "system", "value": "Change navbar to be static at top of app.\n" }, { "from": "human", "value": "import React from 'react';\nimport { Link } from 'react-router-dom';\nimport { Navbar, Nav, NavItem } from 'react-bootstrap';\n\nconst Navigation = (props) => {\n return (\n <Navbar fix...
javascript
chosen
[ { "from": "system", "value": "Fix the name of handler_url in the runtime\n" }, { "from": "human", "value": "function runtime_1(element) {\n return {\n handler: function(handler_name) {\n var usage = $(element).data('usage');\n return \"/\" + usage + \"/\" + handle...
javascript
chosen
[ { "from": "system", "value": "Add header check to example\n" }, { "from": "human", "value": "var ntf = require('../../lib/ntf')\n , test = ntf.http.test(exports, 'https://github.com')\n\ntest.get('ntf project page', '/silas/ntf', function(test, res) {\n test.statusCode(res, 200)\n test.body(r...
javascript
chosen
[ { "from": "system", "value": "Remove unused code that seems to stem from PointText.\n" }, { "from": "human", "value": "/*\n * Paper.js\n *\n * This file is part of Paper.js, a JavaScript Vector Graphics Library,\n * based on Scriptographer.org and designed to be largely API compatible.\n * http:...
javascript
chosen
[ { "from": "system", "value": ":guitar: Sort posts by descending postedAt\n" }, { "from": "human", "value": "/*\nLet's add a callback to the new post method that\nappends a random emoji to the newly submitted post's title.\n*/\n\nimport { addCallback } from 'meteor/vulcan:core';\n\nfunction Posts...
javascript
chosen
[ { "from": "system", "value": "Add minor refactoring to the drawing of objects.\n" }, { "from": "human", "value": "var drawObstacles = function(obstacles, skier, obstaclesImg, increasedSpeed, speedBoost) {\n for (var i = 0; i < obstacles.length; i++) {\n if (skier.jumping === true) {\n s...
javascript
chosen
[ { "from": "system", "value": "Fix aspect ratio and add an option to change it\n\nFixed: The canvas fills the whole browser on mobile phones." }, { "from": "human", "value": "var acg = acg || {};\nvar cc = cc || {};\n\nacg.bootstrap = function (elem, callback) {\n 'use strict';\n cc.game.on...
javascript
chosen
[ { "from": "system", "value": "Load polyfills for testing older browsers\n" }, { "from": "human", "value": "const serverEndpoints = require('./server')\n\nmodule.exports = function(config) {\n config.set({\n basePath: '..',\n frameworks: ['mocha', 'chai'],\n client: {\n mocha: {\n ...
javascript
chosen
[ { "from": "system", "value": "Use a more clear assertion\n" }, { "from": "human", "value": "class Fixture extends React.Component {\n render () {\n return (\n <div>\n <span />\n </div>\n )\n }\n}\n\nconst it = createTest(<Fixture />)\n\ndescribe('#tagName', () => {\n de...
javascript
chosen
[ { "from": "system", "value": "Fix label of gps longitude\n" }, { "from": "human", "value": "import SimpleSettings from './SimpleSettings';\nimport { bindStateForComponent } from '../../utils/parameters';\n\nclass GPSLongitude extends SimpleSettings {\n name = 'simple settings';\n}\n\nexport def...
javascript
chosen
[ { "from": "system", "value": "Allow absolute paths as destDir\n" }, { "from": "human", "value": "'use strict';\n\nvar Y = require('yuidocjs');\nvar rsvp = require('rsvp');\nvar CachingWriter = require('broccoli-caching-writer');\n\nBroccoliYuidoc.prototype = Object.create(CachingWriter....
javascript
chosen
[ { "from": "system", "value": "Fix bug with stub-api. Add /contests/:id\n" }, { "from": "human", "value": "module.exports = function(server) {\n\n // Create an API namespace, so that the root does not\n // have to be repeated for each end point.\n server.namespace('/api', function() {\n\n s...
javascript
chosen
[ { "from": "system", "value": "Bring back `jquery` and `lodash`.\n" }, { "from": "human", "value": "//= require vendor/powertip/jquery.powertip\n\n//= require vendor/bootstrap/bootstrap\n//= require babelfish-runtime\n//= require pointer\n//= require vendor/history/history.adapter.jquery\n//= req...
javascript
chosen
[ { "from": "system", "value": "Reorder setupController and model for consistency\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n queryParams: {\n page: { refreshModel: true },\n sort: { refreshModel: true },\n },\n data...
javascript
chosen
[ { "from": "system", "value": "Add a new line before @param\n\nCo-authored-by: Zach Ghera <7d293d7aa3d73ce243886706f2742c0d78eb864e@gmail.com>" }, { "from": "human", "value": "/**\n * Format a timestamp (in milliseconds) into a pretty string with just the time.\n * @param {int} msTimestamp \n * @...
javascript
chosen
[ { "from": "system", "value": "Fix a display bug when two dates are the same day.\n" }, { "from": "human", "value": "(function init() {\n var input1 = document.getElementById(\"input1\");\n var input2 = document.getElementById(\"input2\");\n var searchParams = new URLSearchParams(window....
javascript
chosen
[ { "from": "system", "value": "Use wind direction icon from weather-icons based on the value directly\n\n- It is not necessary to add our own calculation since weather-icons pro-\n vides CSS classes for all wind directions between 0Β° and 360Β°.\n" }, { "from": "human", "value": "(function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Support upper & lowercase, www. prefix, trailing slash, intent links\n" }, { "from": "human", "value": "if( document.location.host != 'twitter.com' && document.links.length >= 1 ) {\n\tfor( var l in document.links ) {\n\t\tvar link = document.links[l]\n\t\tif( link....
javascript
chosen
[ { "from": "system", "value": "Update migration game collection url\n" }, { "from": "human", "value": "define([\n\t'collections/json_collection_base',\n\t'models/migration_game'\n], function(JsonCollection, MigrationGame) {\n\n\treturn JsonCollection.extend({\n\n\t\tmodel: MigrationGame,\n\n\t\ta...
javascript
chosen
[ { "from": "system", "value": "Set cron back to Friday.\n" }, { "from": "human", "value": "export default (app) => {\n app.jobs.schedule('send audit email', '0 21 * * TUE', async () => {\n app.info('CRON: sending audit email - starting')\n\n const mailerConfig = app.get('mailer')\n\n co...
javascript
chosen
[ { "from": "system", "value": "Add the definition of the Buffer\n" }, { "from": "human", "value": "/**\n * Many objects in Node.js emit events.\n *\n * @see https://nodejs.org/api/events.html\n *\n * @typedef {Object} EventEmitter\n */\n" }, { "from": "gpt", "value": "/**\n * Many obj...
javascript
chosen
[ { "from": "system", "value": "Call engine.resize() after stylesheets load.\n\nOtherwise engine would look pixely sometimes.\n" }, { "from": "human", "value": "import React from 'react';\r\nimport BABYLON from 'babylonjs';\r\n\r\nexport class BabylonJS extends React.Component {\r\n get defaultPr...
javascript
chosen
[ { "from": "system", "value": "Reset lastVotes state when new issue is opened\n" }, { "from": "human", "value": "import { RECEIVE_VOTE } from 'common/actionTypes/voting';\n\nconst lastVotes = (state = [], action) => {\n switch (action.type) {\n case RECEIVE_VOTE: {\n return [...state.sli...
javascript
chosen
[ { "from": "system", "value": "Check if there’s actually a carousel to init\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = Carousel;\n\nimport Flickity from 'flickity'\n\n/**\n * Initializes Carousel components\n * @param {string} selector as a string\n * @returns {Object} F...
javascript
chosen
[ { "from": "system", "value": "Fix version check output for Windows\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar path = require('path');\n\nvar getBundledNodeVersion = require('./bundled-node-version')\n\nvar bundledNodePath = path.join(__dirname, '..', 'bin', 'node')\nif (proces...
javascript
chosen
[ { "from": "system", "value": "Hide link if no photo\n" }, { "from": "human", "value": "import React from 'react';\nimport {NavigationLink} from 'navigation-react';\nimport Banner from './Banner';\nimport Tweets from './Tweets';\n\nexport default ({tweet: {account: {id: accountId, name, username,...
javascript
chosen
[ { "from": "system", "value": "Fix minor issues in CollisionManager\n" }, { "from": "human", "value": "\"use strict\";\n\nfunction CollisionManager() {\n\n var objects = [];\n\n this.intersect = function(object1, object2) {\n var pos1 = object1.getLocation();\n var pos2 = obje...
javascript
chosen
[ { "from": "system", "value": "Use a better unique strings." }, { "from": "human", "value": "import React from 'react';\n\nexport default class KatasNavigation extends React.Component {\n\n render() {\n if (!this.props.katas) {\n return null;\n }\n const selectedKataId = null;\n ...
javascript
chosen
[ { "from": "system", "value": "Use a real function for linting\n\nESLint now warns about this. Fix it.\n\nSigned-off-by: Kevin Locke <ffb4761cba839470133bee36aeb139f58d7dbaa9@kevinlocke.name>\n" }, { "from": "human", "value": "/**\n * @copyright Copyright 2016 Kevin Locke <kevin@kevinlocke.name>...
javascript
chosen
[ { "from": "system", "value": "Build tweak to launch chrome for tests\n" }, { "from": "human", "value": "module.exports = function (config) {\n const cfg = {\n basePath: '',\n frameworks: ['jasmine'],\n files: [\n { pattern: './main.js', watched: false }\n ],\n exclude: [\n ...
javascript
chosen
[ { "from": "system", "value": "Update source of loader cordova script\n" }, { "from": "human", "value": "/*globals Polymer */\n'use strict';\n\nPolymer(\n {\n is: 'cordova-core',\n\n properties: {\n /**\n * Return if cordova deviceready event has been fired.\n */\n re...
javascript
chosen
[ { "from": "system", "value": "Add 'rc' as prereleaseName in grunt bump\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n watch: {\n all: {\n options: {\n livereload: true\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Define 'deploy' task. Much nicer than doing 'grunt buildcontrol' all the time.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\r\n // Project configuration.\r\n grunt.initConfig({\r\n\r\n // Various Grunt tasks...\r\n\r\n bu...
javascript
chosen
[ { "from": "system", "value": "[BUGFIX] Set the new name for the css compile task in teh default grunt task array\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\t\"use strict\";\n\n\t// Display the execution time of grunt tasks\n\trequire(\"time-grunt\")(grunt);\n\n\t// L...
javascript
chosen
[ { "from": "system", "value": "Fix grunt not copying files correctly when syncing sometimes\n" }, { "from": "human", "value": "'use strict';\n\n// # Globbing\n// for performance reasons we're only matching one level down:\n// 'test/spec/{,*/}*.js'\n// use this if you want to match all subfolders:...
javascript
chosen
[ { "from": "system", "value": "Allow flip between local remote server. Improved error report." }, { "from": "human", "value": "/**\n * Copyright (C) 2016 Joshua Auerbach \n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance ...
javascript
chosen
[ { "from": "system", "value": "Add StringLiteralNode to ast constructors\n" }, { "from": "human", "value": "function KIFNode(kifExpressions) {\n this.type = 'KIFNode';\n this.expressions = this.expressions || [];\n this.expressions = this.expressions.concat(kifExpressions);\n}\n\nfunction Word...
javascript
chosen
[ { "from": "system", "value": "Add round function to round numbers by specified decimal place or 2 places\n" }, { "from": "human", "value": "var SCREEN_WIDTH = 0;\r\nvar SCREEN_HEIGHT = 0;\r\nvar PLAYER_RADIUS = 12;\r\nvar PLAYER_SPEED = 4;\r\nvar FRICTION = 0.8;\r\nvar LEVELS = [\r\n { l: 48, t...
javascript
chosen
[ { "from": "system", "value": "Add script to truncate discounted prices in 'priceDiscount()' function\n" }, { "from": "human", "value": "// priceDiscount function\n// Discounts sale price by 15% is price is > $8,000\nmodule.exports.priceDiscount = (price) => {\n\tif (price > 8000) {\n\t\treturn p...
javascript
chosen
[ { "from": "system", "value": "[BPK-978] Fix unused import / export\n" }, { "from": "human", "value": "/*\n * Backpack - Skyscanner's Design System\n *\n * Copyright 2017 Skyscanner Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except ...
javascript
chosen
[ { "from": "system", "value": "Fix mixed tabs and spaces error\n" }, { "from": "human", "value": "import {resetSettingsUI} from \"../UIActions\";\nimport {connect} from \"react-redux\";\nimport React from \"react\";\n\nclass ErrorBoundary extends React.Component {\n state = {\n \thasError: ...
javascript
chosen
[ { "from": "system", "value": "Add feedback for unidentified errors\n" }, { "from": "human", "value": "import config from '../config'\n\nexport const feedback: (feedback) => any =\n (feedback) => {\n const options = {\n method: 'POST',\n headers: {\n 'Content-Type': \"applica...
javascript
chosen
[ { "from": "system", "value": "Add tests for AND operation\n" }, { "from": "human", "value": "'use strict';\n\nvar expect = require('chai').expect;\nvar Expression = require('../app/scripts/expression');\n\ndescribe('expression', function () {\n\n it('should initialize expression with unmodified...
javascript
chosen
[ { "from": "system", "value": "Add getScript helper to test\n" }, { "from": "human", "value": "var request = require( 'request' );\nvar config = require( '../../config' );\n\nexports.postManifest = function ( manifest, callback ) {\n var options = {\n uri: 'http://localhost:' + config.port + ...
javascript
chosen
[ { "from": "system", "value": "Remove old masonry plugin code.\n" }, { "from": "human", "value": "module.exports = Zeppelin.CollectionView.extend({\n tagName: 'ol',\n\n className: 'cards-list list-unstyled clearfix',\n\n subscriptions: {\n 'cardsList:layout': 'triggerLayout'\n },\n\n addM...
javascript
chosen
[ { "from": "system", "value": "Stop polling if fluentd-ui server is unreachable\n" }, { "from": "human", "value": "(function(){\n \"use strict\";\n var POLLING_INTERVAL = 3 * 1000;\n var POLLING_URL = \"/polling/alerts\";\n\n $(function(){\n var alert = new Vue({\n el: \"#alert\",\n ...
javascript
chosen
[ { "from": "system", "value": "Use just one call system\n" }, { "from": "human", "value": "const shell = require('shelljs');\nconst path = require('path');\n\nshell.echo('');\nshell.echo('πŸ•“ The setup process can take few minutes.');\nshell.echo('');\nshell.echo('πŸ”Έ Administration Panel');\nshe...
javascript
chosen
[ { "from": "system", "value": "Reset settings form when not saving\n" }, { "from": "human", "value": "app.controller('settingsProfile' , function ($scope, $document, $sessionStorage, api) {\n $scope.$storage = $sessionStorage;\n $scope.imgSrc = 'assets/img/jobs.png';\n $scope.showName = ...
javascript
chosen
[ { "from": "system", "value": "Delete Minutes: Popup dialog shows concerning minutes date.\n" }, { "from": "human", "value": "\nimport { MeetingSeries } from '/imports/meetingseries'\n\nTemplate.minutesList.helpers({\n buttonBackground: function () {\n return (this.isFinalized) ? \"defa...
javascript
chosen
[ { "from": "system", "value": "Add better defaults, plus load function\n" }, { "from": "human", "value": "import { flow, types } from 'mobx-state-tree'\nimport { optionalArrayOfStrings } from './commonModels'\nimport { GET } from './fetch'\n\nconst ChildArticle = types.model('ChildArticle', {\n ...
javascript
chosen
[ { "from": "system", "value": "Set default lease to a higher value.\n" }, { "from": "human", "value": "/*******************************************************************************\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in...
javascript
chosen
[ { "from": "system", "value": "Handle undefined results from the db\n" }, { "from": "human", "value": "var pg = require(\"pg\");\n\nvar database = {\n query: function(connection, sql, callback) {\n pg.connect(connection, function(err, client, done) {\n if(err) {\n done();\n ...
javascript
chosen
[ { "from": "system", "value": "Remove default value. Use a thing straight, don't stuff it to var\n" }, { "from": "human", "value": "var get = require('lodash.get')\n\nfunction getAcceptedLanguage (request) {\n if (!request || typeof request.get !== 'function') {\n return\n }\n\n var header ...
javascript
chosen
[ { "from": "system", "value": "Load html, hbs, or handlebars files when looking for layouts\n" }, { "from": "human", "value": "var fs = require('fs');\nvar glob = require('glob');\nvar path = require('path');\n\nmodule.exports = function(dir) {\n var layouts = glob.sync(path.join(dir, '**/*.ht...
javascript
chosen
[ { "from": "system", "value": "Refactor Partitioner class: add class hierarchy.\n" }, { "from": "human", "value": "ο»Ώvar _ = require('lodash');\n\n'use strict';\n\nfunction DefaultPartitioner() {\n this.getPartition = function (partitions) {\n if (partitions && _.isArray(partitions) && p...
javascript
chosen
[ { "from": "system", "value": "Remove static var from side effect" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { getDisplayName } from './utils'\n\nexport default function withSideEffect (reduceComponentsToState, handleStateChangeOnClient) {\n return function...
javascript
chosen
[ { "from": "system", "value": "Fix install submodules on Windows\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar ted = require('../ted')\nvar sh = require('shelljs')\nvar path = require('path')\nvar exec = require('child_process').execFile\n\n// Install an array of submodules with p...
javascript
chosen
[ { "from": "system", "value": "Create two promises per social media request. Heroku deployment.\n" }, { "from": "human", "value": "module.exports = (function(){\n\n\t// GET /users/:id/media?lat=<LAT>&lng=<LNG>&time=<TIME>\n\treturn function* collection(id) {\n var Q = require('q');\n var Tw...
javascript
chosen
[ { "from": "system", "value": "Add should global as well.\n" }, { "from": "human", "value": "(function(window) {\n window.chai.should();\n window.expect = window.chai.expect;\n window.assert = window.chai.assert;\n})(window);" }, { "from": "gpt", "value": "(function(window) {\n wi...
javascript
chosen
[ { "from": "system", "value": "Tiershift: Fix 'LC Uber' Pokemon being unchanged\n\nAdd a case for 'LC Uber', fixing a bug where Pokemon in the LC Uber tier did not receive any stat adjustments." }, { "from": "human", "value": "exports.BattleScripts = {\n\tinit: function() {\n\t\tfor (var i in thi...
javascript
chosen
[ { "from": "system", "value": "Add checking for info is exists\n" }, { "from": "human", "value": "/**\n * isAuthenticated\n * @description :: Policy that inject user in `req` via JSON Web Token\n */\n\nvar passport = require('passport');\n\nmodule.exports = function (req, res, next) {\n passport...
javascript
chosen
[ { "from": "system", "value": "Remove Regex validation on Throttle" }, { "from": "human", "value": "/**\n * A rate-limiting Throttle model, by IP address\n *\n */\nvar mongoose = require('mongoose')\nvar ipRegex = require('ip-regex')\nvar Schema = mongoose.Schema\nmongoose.Promise = global.Promis...
javascript
chosen
[ { "from": "system", "value": "fix(password): Remove dated configuration property check" }, { "from": "human", "value": "/**\n * Module dependencies\n */\n\nvar util = require('util')\n , LocalStrategy = require('passport-local').Strategy\n , User = require('../models/User')\n...
javascript
chosen
[ { "from": "system", "value": "Add function to post a message to the channel\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('chatApp', [])\n\n.controller('ChatCtrl', function($scope, $http) {\n\n $scope.chatChannel = \"chatApp\";\n $scope.messageLimit = 50;\n $scope.defa...
javascript
chosen
[ { "from": "system", "value": "Use preferred error handling from Traceur docs\n\nAs per https://github.com/google/traceur-compiler/wiki/CompilingOffline#nodejs-api\n" }, { "from": "human", "value": "var traceur = Npm.require('traceur');\nvar os = Npm.require('os');\n\nPlugin.registerSourceHandler...
javascript
chosen
[ { "from": "system", "value": "Use all-caps env var name\n\nMakes HTTP_PROXY consistent with PORT or TRAVIS_BUILD_NUMBER\r\nelsewhere in the application. Are parsed case insensitive by Node anyway." }, { "from": "human", "value": "'use strict'\n\nvar proxy = {\n proxyType: 'autodetect'\n}\n\nif ...
javascript
chosen
[ { "from": "system", "value": "Add item and clear input now functional\n" }, { "from": "human", "value": "//Running BB Router and immediately extending itself\nwindow.TodoApp = new (Backbone.Router.extend({\n\troutes: { '' : 'index'}, //when base route ('') run the index function/controller\n\tin...
javascript
chosen
[ { "from": "system", "value": "Add some event listeners on example page to track progress of worker.\n" }, { "from": "human", "value": "ο»Ώ/*global WebWorker:false */\n(function () {\n 'use strict';\n\n var worker = null,\n $output = null;\n\n $output = $('#worker-output');\n\n /...
javascript
chosen
[ { "from": "system", "value": "Use callback instead of sync\n" }, { "from": "human", "value": "'use strict'\nconst grunt = require('gruntfile-api')\nconst fs = require('fs')\nconst path = require('path')\nconst spawn = require('child_process').spawn\n\nglobal.processes = {}\n\nexports.getTasks = ...
javascript
chosen
[ { "from": "system", "value": "Add render and renderFile methods\n" }, { "from": "human", "value": "/**\n * Module dependencies\n */\n\nvar defaults = require('./helpers');\nvar template = require('./template');\n\nmodule.exports = createInstance;\n\n/**\n * Create an instance of JSONt\n *\n * @r...
javascript
chosen
[ { "from": "system", "value": "Clean emitted files for types.ts\n" }, { "from": "human", "value": "const fs = require(\"fs\");\nconst glob = require(\"glob\");\n\nconst ext = \"{js,js.map,d.ts,d.ts.map}\";\n\nglob.sync(\"{def,lib}/**/*.\" + ext)\n .concat(glob.sync(\"test{*,/!(data)/**}/*.\" + e...
javascript
chosen
[ { "from": "system", "value": "Add option to use \"Secure\" attribute on cookies\n\nThis addresses #68 where some (most?) browsers default to `SameSite: None` and don't like cookies without the `Secure` attribute set" }, { "from": "human", "value": "var Cookielaw = {\n ACCEPTED: '1',\n REJE...
javascript
chosen
[ { "from": "system", "value": "Reduce redundancy be inspecting manifest\n" }, { "from": "human", "value": "var activeIcons = {\n path: {\n '19': 'icons/active-19.png',\n '38': 'icons/active-38.png'\n }\n};\n\nvar inactiveIcons = {\n path: {\n '19': 'icons/inactive-19.png',\n '38': ...
javascript
chosen
[ { "from": "system", "value": "fix(): Fix bug on home page\n\nApartment and Tenant components were rendering on home page when it shouldn't be\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';\nimport Ap...
javascript
chosen
[ { "from": "system", "value": "Add a more involved test case.\n" }, { "from": "human", "value": "var el = require('./el');\nvar outputEl = document.querySelector('#el-js');\n\nfunction assertDomContent(elTree, expected) {\n el(outputEl, elTree);\n var actual = outputEl.innerHTML.replace(/\\...
javascript
chosen
[ { "from": "system", "value": "Disable voting if already voted\n" }, { "from": "human", "value": "jQuery(function() {\n jQuery('[data-star-rating]').each(function(index, element) {\n element = $(element);\n\n var data = element.data('star-rating'),\n globalOptions = wi...
javascript
chosen
[ { "from": "system", "value": "Fix Guild IE CSS loadPath\n" }, { "from": "human", "value": "'use strict';\n\nvar paths = require('./_paths');\nvar gulp = require('gulp');\nvar filter = require('gulp-filter');\nvar sass = require('gulp-ruby-sass');\nvar browserSync = require('browser-sync');\nvar ...
javascript
chosen
[ { "from": "system", "value": "Update comment to reflect new package name" }, { "from": "human", "value": "/*\n * grunt-contrib-rename (unofficial)\n * https://github.com/jasonlam604/grunt-contrib-rename\n *\n * Copyright (c) 2013 Jason Lam\n * Licensed under the MIT license.\n * https://github.c...
javascript
chosen
[ { "from": "system", "value": "Add support for configurable function to extract code from item for sorting\n\n" }, { "from": "human", "value": "Ext.define('Slate.sorter.Code', {\n extend: 'Ext.util.Sorter',\n\n\n config: {\n numberRe: /^\\d+$/,\n numberDelim: '.',\n\n s...
javascript
chosen
[ { "from": "system", "value": "Terminate worker before every task start\n" }, { "from": "human", "value": "import store from 'store';\nimport uuid from 'node-uuid';\nimport later from 'later';\n\nfunction initDeviceID() {\n\tlet deviceID = store.get('device_id');\n\tif (!deviceID) {\n\t\tstore.se...
javascript
chosen
[ { "from": "system", "value": "Change getAll to use a callback in place of return\n" }, { "from": "human", "value": "var nano = require('nano')('http://localhost:5984');\nvar db = nano.db.use('todo');\n\nvar todo = {};\n\ntodo.getAll = function() {\n var results = [];\n db.view('todos', 'all_to...
javascript
chosen
[ { "from": "system", "value": "chore(install): Add make and gcc to dependencies\n" }, { "from": "human", "value": "if (process.platform != 'win32') {\n var commandExists = require('command-exists');\n var colors = require('colors');\n var depedencies = [\n 'automake',\n 'autoconf',\n ...
javascript
chosen
[ { "from": "system", "value": "Refactor and add new Events unit tests\n" }, { "from": "human", "value": "var assert = require('assert');\nvar equal = assert.equal;\nvar path = require('path');\nvar basePath = process.cwd();\n\nmodule.exports = function() {\n var Events = require(path.resolve(bas...
javascript
chosen
[ { "from": "system", "value": "Save mcc-mnc data to WS connector, so monitor is able to print logs for Deployment KPIs\n" }, { "from": "human", "value": "/* jshint node:true */\n/**\n * PUSH Notification server\n * (c) Telefonica Digital, 2012 - All rights reserved\n * License: GNU Affero V3 (see...
javascript
chosen
[ { "from": "system", "value": "Add size loging for vendor.js file\n" }, { "from": "human", "value": "module.exports = function(gulp, speck) {\n return gulp.task('js:vendor', function() {\n var uglify = require('gulp-uglify'),\n gulpif = require('gulp-if'),\n insert = require('gulp-i...
javascript
chosen
[ { "from": "system", "value": "Add a lag to incomming messages\n" }, { "from": "human", "value": "global.simulatency = {}\n\nglobal.simulatency.timeout = 0\n\ninject(Meteor.server.stream_server.server._events, 'connection', function (args, done) {\n inject(args[0], 'write', function (args, done)...
javascript
chosen
[ { "from": "system", "value": "Fix indentation and parse error\n" }, { "from": "human", "value": "/* Set up the environment before loading the rest of the files into Zotero */\nvar $rdf = {\n\tUtil: {\n\t\tArrayIndexOf: function (arr, item, i) {\n\t\t\t//supported in all browsers except IE<9\n\t\...
javascript
chosen
[ { "from": "system", "value": "chore(styleguide): Add a note to the copy to clipboard example on styleguide\n" }, { "from": "human", "value": "/*doc\n ---\n title: Copy To Clipboard\n name: copy_to_clipboard_react\n categories:\n - react_components_copy-to-clipboard\n - react_all\n ---\n\n <code ...
javascript
chosen
[ { "from": "system", "value": "Fix timing issue with browser test\n" }, { "from": "human", "value": "test('script_proxy_dynamic.php', function (assert, document) {\n var h1s = document.getElementsByTagName('h1');\n assert.equal(h1s.length, 1, \"There should be one <H1> element on the page\"...
javascript
chosen
[ { "from": "system", "value": "Fix for variations in language tags\n" }, { "from": "human", "value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/M...
javascript
chosen
[ { "from": "system", "value": "Clean up old STRATEGY object\n" }, { "from": "human", "value": "import _ from 'lodash';\n\n\nclass ChainStart {\n constructor(name)Β {\n this.name = name;\n this.type = 'CHAIN_START';\n }\n}\n\nclass Step {\n constructor(name) {\n this.name = name;\n t...
javascript
chosen
[ { "from": "system", "value": "Check for error message when an empty array is passed.\n" }, { "from": "human", "value": "import React from 'react'\nimport { render } from 'react-dom'\nimport './stylesheets/ui.scss'\nimport { SkiDayList } from './components/SkiDayList'\n\nwindow.React = React\n\nr...
javascript
chosen
[ { "from": "system", "value": "Switch to using export statements\n" }, { "from": "human", "value": "import configureUrlQuery from './configureUrlQuery';\n\nimport * as Serialize from './serialize';\nimport {\n replaceInUrlQuery,\n replaceUrlQuery,\n pushInUrlQuery,\n pushUrlQuery,\n} from './...
javascript
chosen
[ { "from": "system", "value": "Update controls behavior on update\n" }, { "from": "human", "value": "var scene = require('./Utils/Scene').create();\nvar camera = require('./Utils/Camera').create();\nvar renderer = require('./Utils/Renderer').create();\n\nvar terrain = require('./Terrain').create(...
javascript
chosen
[ { "from": "system", "value": "Increase some timeouts.\nHopefully that resolves some \"Disconnected\" issues on AppVeyor.\n" }, { "from": "human", "value": "module.exports = function (config) {\n 'use strict'\n\n config.set({\n frameworks: ['jspm', 'mocha', 'chai', 'sinon'],\n\n jspm: {\n...
javascript
chosen