conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add meaningful tests to canvas-block-filter\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('canvas-block-filter',\n 'Integration | Comp...
javascript
chosen
[ { "from": "system", "value": "[TEST] Fix test failures due to missing mixpanel JS\n" }, { "from": "human", "value": "/**\n * Event tracker (analytics)\n */\n\nvar module = angular.module('tracker', []);\n\nmodule.factory('rpTracker', ['$rootScope', function ($scope) {\n var track = function (ev...
javascript
chosen
[ { "from": "system", "value": "Add an error event listener for FileStream.\n" }, { "from": "human", "value": "import {Readable} from \"stream\"\n\nimport File from \"lib/File\"\nimport getFieldPath from \"lib/util/getFieldPath\"\n\nconst onFile = (options, cb) => (fieldname, stream, filename, enc...
javascript
chosen
[ { "from": "system", "value": "Update job when job detail clicked\n" }, { "from": "human", "value": "minerva.views.JobsPanel = minerva.View.extend({\n\n initialize: function () {\n var columnEnum = girder.views.jobs_JobListWidget.prototype.columnEnum;\n var columns = columnEnum.C...
javascript
chosen
[ { "from": "system", "value": "Fix unsensible default for page size\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/page-pagination';\n\nexport default Ember.Component.extend({\n layout: layout,\n keys: ['first', 'prev', 'next', 'last']...
javascript
chosen
[ { "from": "system", "value": "Add MediaDevices support for mock getUserMedia\n\nSigned-off-by: Kaustav Das Modak <ba1ce5b1e09413a89404909d8d270942c5dadd14@yahoo.co.in>\n" }, { "from": "human", "value": "\n// Takes a mockOnStreamAvailable function which when given a webrtcstream returns a new str...
javascript
chosen
[ { "from": "system", "value": "Fix default host IP for docker.\n" }, { "from": "human", "value": "// Linux machines should use Docker's default gateway IP address to connect to.\nlet hostname = '172.17.0.2';\n\n// On MacOS and Windows, `host.docker.internal` is available to point to the\n// host ...
javascript
chosen
[ { "from": "system", "value": "Disable Azure, Gitlab, Application, Support providers (SAAS-1329)\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('ncsaas')\n .constant('MODE', {\n modeName: 'modePortal',\n toBeFeatures: [\n 'localSignup',\n 'localSignin',\n ...
javascript
chosen
[ { "from": "system", "value": "Make class name unique for dynamic inlines.\n" }, { "from": "human", "value": "\n$(function() {\n\n var grappelli = !!$('#bookmarks');\n var parentSelector = grappelli ? 'div.items' : 'tbody';\n\n // Hide the exta inlines.\n $(parentSelector + ' > *:not(...
javascript
chosen
[ { "from": "system", "value": "Remove forEach fallback in Common.each\n" }, { "from": "human", "value": "'use strict';\n\n\nvar Common = module.exports = {};\n\n\n// iterates through all object keys-value pairs calling iterator on each one\n// example: $$.each(objOrArr, function (val, key) { /* ....
javascript
chosen
[ { "from": "system", "value": "Stop button always visible when clock is running\n" }, { "from": "human", "value": "$(function(){\n var yourSound = new Audio('notification.ogg');\n yourSound.loop = true;\n $('.start button').click(function(ev){\n $('.start').toggleClass('hidden');\...
javascript
chosen
[ { "from": "system", "value": "Fix bug in dropdowns, where they didn’t disappear correctly" }, { "from": "human", "value": "'use strict';\n\n// Toogle asset images - zome in and out\n$(function() {\n\n var Snackbar = window.Snackbar;\n Snackbar.init();\n\n var AssetPage = window.AssetPage;\n ...
javascript
chosen
[ { "from": "system", "value": "Switch to template literals for the help screen.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n'use strict';\n\nconst fs = require('fs');\nconst minimist = require('minimist');\nconst pkg = require('./package.json');\nconst oust = require('.');\n\nconst ...
javascript
chosen
[ { "from": "system", "value": "Fix path to commit.sh script\n\nIt should be relative to __dirname, not to cwd()\n" }, { "from": "human", "value": "var exec = require('child_process').exec;\nvar temp = require('temp');\nvar fs = fs = require('fs');\nvar log = require('./logger');\n\nexports.head...
javascript
chosen
[ { "from": "system", "value": "Refactor it out into a class." }, { "from": "human", "value": "function minifyJson(data) {\n return JSON.stringify(JSON.parse(data));\n}\n\nexport function minifyJsonFile(readFileFn, fileName) {\n return minifyJson(readFileFn(fileName));\n}" }, { "from": "...
javascript
chosen
[ { "from": "system", "value": "Fix minor issue about making redux-undo state permanent\n" }, { "from": "human", "value": "/* eslint-env browser */\n\nconst fs = window.require('fs');\n\nconst fetchInitialState = () => {\n const data = fs.readFileSync('.config/db', 'utf-8');\n if (data) {\n r...
javascript
chosen
[ { "from": "system", "value": "fix(scripts): Fix fs-extra breaking change :bread:\n" }, { "from": "human", "value": "#!/usr/bin/env node\nimport childProcess from 'child_process';\nimport fs from 'fs-extra';\nimport moment from 'moment';\n\nconst today = new Date();\nconst path = `pages/posts/${m...
javascript
chosen
[ { "from": "system", "value": "Reduce default sampling period to make testing easier\n" }, { "from": "human", "value": "// Copyright © 2013-2014 Esko Luontola <www.orfjackal.net>\n// This software is released under the Apache License 2.0.\n// The license text is at http://www.apache.org/licenses/...
javascript
chosen
[ { "from": "system", "value": "Remove .js extension in require()\n" }, { "from": "human", "value": "\"use strict\";\n\nvar db = require('../../models');\nvar config = require('../../config.js');\nvar authHelper = require('../../lib/auth-helper');\n\nmodule.exports = function (app, opt...
javascript
chosen
[ { "from": "system", "value": "Update variant title explanation text\n" }, { "from": "human", "value": "'use strict';\nimport React from 'react';\nimport { ContextualHelp } from './bootstrap/contextual_help';\n\n/**\n * Method to render a mouseover explanation for the variant title\n */\nexport f...
javascript
chosen
[ { "from": "system", "value": "Add chuck norris and rambo\n" }, { "from": "human", "value": "var faker = require('faker');\nvar _ = require('lodash');\n\n/**\n * Generate a list of random users.\n * @return {Array<{\n * name: string,\n * email: string,\n * phone: string\n * }>}\n */\nvar ge...
javascript
chosen
[ { "from": "system", "value": "Make linter know when JSX is using React variable\n" }, { "from": "human", "value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"commonjs\": true,\n \"es6\": true\n },\n \"extends\": \"eslint:recommended\",\n \"installed...
javascript
chosen
[ { "from": "system", "value": "Google+: Change the name from \"Google Plus\" to \"Google+\"\n\nIt's just not how it's styled.\n" }, { "from": "human", "value": "function ddg_spice_google_plus (api_result) {\n \"use strict\";\n\n if(!api_result || !api_result.items || api_result.items.length...
javascript
chosen
[ { "from": "system", "value": "Patch parseInt usage to specify radix explicitly\n\nMy node install informed me that parseInt('000039') === 3, so: womp\nwomp. This commit also avoids a couple of globals.\n" }, { "from": "human", "value": "function TcpReader(callback) {\n this.callback = callback;...
javascript
chosen
[ { "from": "system", "value": "Resolve conflict - add module ngAnimate\n" }, { "from": "human", "value": "var ServiceURL = \"/api/\";\nangular.module('Wegas', [\n 'ui.router',\n 'wegas.service.auth',\n 'wegas.behaviours.tools',\n 'public',\n 'private'\n])\n.config(function ($stateP...
javascript
chosen
[ { "from": "system", "value": "Fix small property rename issue after rebase.\n" }, { "from": "human", "value": "import React from 'react';\n\nfunction applyProperties(text, properties) {\n // TODO: support more than 1 property\n const property = properties[0];\n return React.createElement('p',...
javascript
chosen
[ { "from": "system", "value": "Use 2 spaces for deeply nested objects\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Sets up the routes.\n * @param {object} app - Express app\n */\nmodule.exports.setup = function (app) {\n\n /**\n * @swagger\n * /:\n * get:\n ...
javascript
chosen
[ { "from": "system", "value": "Comment out leaflet test for now since it depends upon manually installing leaflet to a given directory path.\n" }, { "from": "human", "value": "\ndescribe('LeafletMap Ext Component', function() {\n describe('Basics', function() {\n var Map = vrs.ux.touch.Lea...
javascript
chosen
[ { "from": "system", "value": "Add test for requiring a package's main module without .js extension\n" }, { "from": "human", "value": "var test = require('test');\n\ntest.assert(require('dot-slash') === 10, 'main with \"./\"');\ntest.assert(require('js-ext') === 20, 'main with \".js\" extension')...
javascript
chosen
[ { "from": "system", "value": "Add basic TouchOSC data structures.\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n var params = window.location.search.substring(1)\n .split( '&' )\n .reduce(function( object, param ) {\n var pair = param.split( '=' ).map( decodeUR...
javascript
chosen
[ { "from": "system", "value": "Change left-right for test CI\n" }, { "from": "human", "value": "'use strict';\n\nvar MAX = 1000;\n\nfunction Node( number ){\n this.number = 0;\n this.parent = null;\n this.left = null;\n this.right = null;\n this.depth = 0;\n\n if( number === und...
javascript
chosen
[ { "from": "system", "value": "Fix this context in ready callback.\n" }, { "from": "human", "value": "define(['render',\n 'events',\n 'class'],\nfunction(render, Emitter, clazz) {\n \n function Application() {\n Application.super_.call(this);\n this.render = render;\n thi...
javascript
chosen
[ { "from": "system", "value": "Add reducer to root reducer\n" }, { "from": "human", "value": "'use strict';\nlet generator = require('yeoman-generator');\nlet utils = require('generator-react-webpack/utils/all');\nlet path = require('path');\n\nmodule.exports = generator.NamedBase.extend({\n\n c...
javascript
chosen
[ { "from": "system", "value": "Use new jquery jqXHR API.\n" }, { "from": "human", "value": "define([\n 'jquery'\n], function($) {\n\n var Auth = function () {};\n Auth.prototype = {\n init: function (authconfig) {\n navigator.id.watch({\n loggedInUser: au...
javascript
chosen
[ { "from": "system", "value": "Update back to business scenarios\n" }, { "from": "human", "value": " // Don't commit this file to your public repos. This config is for first-run\n exports.creds = {\n mongoose_auth_local: 'mongodb://localhost/tasklist', // Your mongo auth uri goes here\n ...
javascript
chosen
[ { "from": "system", "value": "Test for jekyll env - 1.1\n" }, { "from": "human", "value": "import 'bootstrap/dist/css/bootstrap.min.css';\nimport 'nvd3/build/nv.d3.min.css';\nimport 'react-select/dist/react-select.min.css';\nimport 'fixed-data-table/dist/fixed-data-table.min.css';\nimport ReactD...
javascript
chosen
[ { "from": "system", "value": "Add calcualtion for standard deviation\n" }, { "from": "human", "value": "export default class DataProcessor {\n\n static dataToPoints(data, width, height, limit) {\n\n if (limit && limit < data.length) {\n data = data.slice(data.length - limit)...
javascript
chosen
[ { "from": "system", "value": "feat: Add base browser sync config options\n" }, { "from": "human", "value": "/* jshint node: true */\n\n'use strict';\n\nfunction getTaskConfig(projectConfig) {\n\tvar taskConfig = {\n\t\tserver: {\n\t\t\tbaseDir: taskConfig.baseDir\n\t\t}\n\t};\n\n\treturn taskCon...
javascript
chosen
[ { "from": "system", "value": "Fix infinite recursion in onAuth\n" }, { "from": "human", "value": "'use strict';\n\n// module Web.Firebase.Authentication.Eff\n\n\nexports._onAuth = function (callback, firebase) {\n var cbEffect = function(data) {\n return cbEffect(data)(); // ensure effect ge...
javascript
chosen
[ { "from": "system", "value": "Use correct header height for scrolling back up.\n" }, { "from": "human", "value": "Zepto(function($) {\n prettyPrint();\n\n var $frameLines = $('[id^=\"frame-line-\"]');\n var $activeLine = $('.frames-container .active');\n var $activeFrame = $('.active[id^=\...
javascript
chosen
[ { "from": "system", "value": "Fix bug where hasSentResponse would not be reset stalling further requests.\n" }, { "from": "human", "value": "var express = require('express');\n\nfunction createMethodWrapper(app, verb) {\n var original = app[verb];\n\n return function (route, handler) {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove comment, project using md5 package not blueimp-md5\n" }, { "from": "human", "value": "import md5 from 'md5';\n\nexport default class GravatarImageRetriever {\n constructor(picturePxSize) {\n this.picturePxSize = picturePxSize;\n }\n\n getImageUrl(email)...
javascript
chosen
[ { "from": "system", "value": "Build ajax request for new snippet form\n" }, { "from": "human", "value": "'use strict';\n\n$(document).ready(() => {\n\t$('.new').click((event) => {\n\t\tevent.preventDefault();\n\t\t\n\n\n});\n\n// This is a manifest file that'll be compiled into application.js, w...
javascript
chosen
[ { "from": "system", "value": "Add key to list item\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\n\nimport './index.css';\n\nconst SearchResults = React.createClass({\n propTypes: {\n displayOptions: PropTypes.object.isRequired,\n },\n\n render() {\n const...
javascript
chosen
[ { "from": "system", "value": "Fix styl/img watching in gulp tasks\n" }, { "from": "human", "value": "import gulp from 'gulp';\nimport requireDir from 'require-dir';\nimport runSequence from 'run-sequence';\n\n// Require individual tasks\nrequireDir('./gulp/tasks', { recurse: true });\n\ngulp.tas...
javascript
chosen
[ { "from": "system", "value": "Add a reset method to the Timer class.\n\nRefs #9.\n" }, { "from": "human", "value": "const moment = require('moment');\n\nfunction Timer(element) {\n this.element = element;\n this.secondsElapsed = 0;\n}\n\nTimer.prototype = {\n start: function() {\n var self...
javascript
chosen
[ { "from": "system", "value": "Fix file size prop warning\n\n" }, { "from": "human", "value": "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Col, Row } from \"react-bootstrap\";\n\nimport { byteSize } from \"../../utils\";\nimport { Icon, ListGroupItem, RelativeTim...
javascript
chosen
[ { "from": "system", "value": "Change time frequency: one virtual day per second\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from 'react'\nimport moment from 'moment'\n\nimport eventActions from '../actions/eventActionCreators'\n\nconst TIME_INIT = moment('2190-07-02...
javascript
chosen
[ { "from": "system", "value": "Handle error if autocomplete query fails\n" }, { "from": "human", "value": "$(document).ready(function() {\n $(\"[data-autocomplete-source]\").each(function() {\n var url = $(this).data(\"autocomplete-source\");\n var target = $(this).data(\"autocomplete-rel\...
javascript
chosen
[ { "from": "system", "value": "Add gridImageId to continueReading fragments\n" }, { "from": "human", "value": "import gql from 'graphql-tag';\nimport { graphql } from 'react-apollo';\nimport { getFragment } from 'meteor/vulcan:core';\n\nexport const withContinueReading = component => {\n // FIXM...
javascript
chosen
[ { "from": "system", "value": "Add to auth and signup component\n" }, { "from": "human", "value": "import angular from 'angular';\nimport Dogs from './dogs/dogs';\nimport DogProfile from './dog-profile/dog-profile';\nimport Users from './users/users';\nimport DogPost from './dog-post/dog-post';\n...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary code for the extension.\n" }, { "from": "human", "value": "import {\n setupTokenEditor,\n setTokenEditorValue,\n useDefaultToken\n} from '../editor';\nimport { getParameterByName } from '../utils.js';\nimport { publicKeyTextArea } from './dom-e...
javascript
chosen
[ { "from": "system", "value": "Change mocha's reporter type to spec" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.registerTask(\"default\", [\"test-server\", \"test-client\"]);\n grunt.registerTask(\"test-client\", function() {\n var done = this.async();...
javascript
chosen
[ { "from": "system", "value": "Set of generic functions to test the chrome.* APIs\n" }, { "from": "human", "value": "chrome.tabs.onCreated.addListener(function(tab) {\n\tconsole.log(\"Tab Created\", tab);\n});\n\nchrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {\n\tconsole.log(...
javascript
chosen
[ { "from": "system", "value": "Adjust limits to meet what we have currently\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['gruntfile.js'...
javascript
chosen
[ { "from": "system", "value": "Add bail option to mochacli to halt on the first failed test.\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n clean: ['.tmp'],\n babel: {\n options: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add all JS files to JSHint\n" }, { "from": "human", "value": "/*\n * generator-init\n * https://github.com/use-init/generator-init\n *\n */\n\n'use strict';\n\nmodule.exports = function (grunt) {\n // Load all grunt tasks matching the `grunt-*` pattern.\n require(...
javascript
chosen
[ { "from": "system", "value": "Fix warning, add assignment operator\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'), // the package file to use\n\n qunit: { // internal task or name of a plugin ...
javascript
chosen
[ { "from": "system", "value": "Add dynamic alias task for running individual tests\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n 'use strict';\n grunt.initConfig({\n benchmark: {\n all: {\n src: ['benchmarks/*.js'],\n options: { times: 10 }\n ...
javascript
chosen
[ { "from": "system", "value": "Align Logger component with new AppiComponent api\n" }, { "from": "human", "value": "import intelLogger from 'intel'\nimport joi from 'joi'\nimport { validateObject } from '../../core'\n\n/**\n * Returns config data and its schema\n * @param {Object} env\n * @return...
javascript
chosen
[ { "from": "system", "value": "Return document if offsetParent is null\n\nThis because `.offsetParent` null is returned by documentElement\n" }, { "from": "human", "value": "import isOffsetContainer from './isOffsetContainer';\n\nexport default function findCommonOffsetParent(element1, element2) ...
javascript
chosen
[ { "from": "system", "value": "Split get method into 2 single methods for url and id\n" }, { "from": "human", "value": "// Copyright 2015 Fabian Dietenberger\n\n'use-strict'\n\nvar q = require('q'),\n request = require('request');\n\nvar hypemResolver = {};\n\nhypemResolver.getUrl = function ...
javascript
chosen
[ { "from": "system", "value": "Set migration for compare_readings/group_compare_readings sql functions\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 ca...
javascript
chosen
[ { "from": "system", "value": "Set ApplicationInsights batch size to 1\n\nSet the batch size for ApplicationInsights to 1 to try and prevent setTimeout() ever being called and causing the lambda function to timeout from hanging.\nRelates to #45.\n" }, { "from": "human", "value": "// Copyright (c)...
javascript
chosen
[ { "from": "system", "value": "Add TimeSlot belongsTo order relationship\n" }, { "from": "human", "value": "Occasion.Modules.push(function(library) {\n library.TimeSlot = class TimeSlot extends library.Base {};\n\n library.TimeSlot.className = 'TimeSlot';\n library.TimeSlot.queryName = 'time_s...
javascript
chosen
[ { "from": "system", "value": "Improve mongoose schema, index user.name\n" }, { "from": "human", "value": "const mongoose = require('mongoose');\n\nconst reminderSchema = new mongoose.Schema({\n user_address: { type: Object, required: true, index: true },\n value: { type: String, required: ...
javascript
chosen
[ { "from": "system", "value": "Add everypolitician.org to allowed CORS addresses\n" }, { "from": "human", "value": "\"use strict\";\n\nvar cors = require('cors');\n\nvar originWhitelist = [\n 'http://openpoliticians.org',\n 'http://localhost:4000',\n];\n\nvar openPoliticiansCors = cors({\n ori...
javascript
chosen
[ { "from": "system", "value": "Switch experiment to performing 1000 parallel requests\n" }, { "from": "human", "value": "const io = require('socket.io'),\n winston = require('winston');\n\nwinston.remove(winston.transports.Console);\nwinston.add(winston.transports.Console, {'timestamp': true...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"Use window.stringsLanguage by default if fulfilled\"\"\n\nThis reverts commit 6c738f09b3c930a90847440c564d65179417c469.\n" }, { "from": "human", "value": "$(document).ready(function() {\n if (window.taskData) {\n var taskInstructionsHtml = $('#...
javascript
chosen
[ { "from": "system", "value": "[minor] Correct link in code comment\n" }, { "from": "human", "value": "var util = require('util');\n\nvar log = require('minilog')('http');\n\nmodule.exports = function requestLogger(req, res, next) {\n\n //\n // Pretty much copypasta from\n // https://github.co...
javascript
chosen
[ { "from": "system", "value": "Add support for an index mode\n" }, { "from": "human", "value": "'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\n\n\n// FUNCTIONS //\n\n/**\n* Returns an array element.\n*\n* @private\n* @param {integer} i - ind...
javascript
chosen
[ { "from": "system", "value": "Make generator work with `yo` v1.0.5\n\nRef #12.\nFix #11.\n" }, { "from": "human", "value": "'use strict';\n\nvar util = require('util');\nvar yeoman = require('yeoman-generator');\n\nvar Generator = module.exports = function () {\n\tvar cb = this.async();\n\tvar i...
javascript
chosen
[ { "from": "system", "value": "Fix sourcemaps when in a directory\n" }, { "from": "human", "value": "var autoprefixer = require('autoprefixer-core');\n\nmodule.exports = function(less) {\n function AutoprefixProcessor(options) {\n this.options = options || {};\n };\n\n AutoprefixP...
javascript
chosen
[ { "from": "system", "value": "Restructure Person prototype and add family array\n" }, { "from": "human", "value": "function Person(name)\n{\n\tthis.name = name;\n\tthis.parent = null;\n\tthis.children = [];\n\tthis.siblings = [];\n\t\n\tthis.getChildren = function () \n\t{\n\t\treturn this.child...
javascript
chosen
[ { "from": "system", "value": "Set password in redux to empty string on successful login\n" }, { "from": "human", "value": "import { createReducer } from 'redux-starter-kit';\nimport {\n UPDATE,\n} from '../actiontypes';\n\nconst passwordReducer = createReducer(null, {\n [UPDATE]: (state, a...
javascript
chosen
[ { "from": "system", "value": "Modify key \"phone\" to \"telefone\"\n" }, { "from": "human", "value": "(function(){\n\n function close() {\n $('.md-show .md-close').click();\n }\n\n function clean() {\n $('.md-show input[name=\"name\"]').val(''),\n $('.md-show input[name=\"email\"]')....
javascript
chosen
[ { "from": "system", "value": "Delete initialization options and change variable name\n" }, { "from": "human", "value": "let pgp = require('pg-promise')({ssl: true});\n// let databaseUrl = process.env.DATABASE_URL || require('./config');\n\n// module.exports = pgp(databaseUrl);\n\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "postcss: Convert plugins object to an array.\n\nSince order matters for plugins, its better to use the Array syntax\nto pass plugins to the PostCSS instead of Object.\n\nThis also allows us to reliably add more plugins programatically if\nwe so choose.\n\n[dfdb7392591db597bc41c...
javascript
chosen
[ { "from": "system", "value": "Change padding depend on window width (the bigger the more big the width is)\n" }, { "from": "human", "value": "\nvar imgWidth = new Array();\n\nfunction imageWidth()\n{\n var width = $(window).width() - fixedPadding;\n $(\".img_flex\").each(function(index)\n ...
javascript
chosen
[ { "from": "system", "value": "Add autocomplete with icon story\n" }, { "from": "human", "value": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport Autocomplete from '../src/Autocomplete';\n\nconst stories = storiesOf('javascript/Autocomplete', module);\n\nstories...
javascript
chosen
[ { "from": "system", "value": "Integrate login & retrieve customer with Trade API\n" }, { "from": "human", "value": "/**\nThis Angular module provide interface to VNDIRECT API, include:\n- Auth API\n- Trade API\n*/\n\nangular.module('myApp.tradeapi', [])\n\n.factory('tradeapi', ['$http', function...
javascript
chosen
[ { "from": "system", "value": "Remove absolute ws link in frontend\n" }, { "from": "human", "value": "import SockJS from 'sockjs-client'\nimport Stomp from 'webstomp-client'\nconst wsURL = 'http://localhost:8080/seven-wonders-websocket'\n\nconst createConnection = (headers = {}) => new Promise((r...
javascript
chosen
[ { "from": "system", "value": "Add simple attributes test case\n" }, { "from": "human", "value": "/*\n * Copyright 2011 Rackspace\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a...
javascript
chosen
[ { "from": "system", "value": "UI: Add edit tags to statistics chart\n" }, { "from": "human", "value": "\nimport React from \"react\";\nimport { Route } from \"react-router\";\nimport {\n View as TAView\n} from \"ui-components/type_admin\";\nimport Item from \"./Item\";\nimport List from \"./L...
javascript
chosen
[ { "from": "system", "value": "Fix translation typo message info folders\n" }, { "from": "human", "value": "import React from 'react';\nimport { c } from 'ttag';\nimport { Loader, Alert, PrimaryButton, useFolders, useModals } from 'react-components';\n\nimport FolderTreeViewList from './FolderTre...
javascript
chosen
[ { "from": "system", "value": "Update local Date automatically each 60s\n" }, { "from": "human", "value": "import moment from 'moment';\nclass NavbarController {\n constructor() {\n this.name = 'navbar';\n }\n\n $onInit(){\n this.moment = moment().format('dddd HH:mm');\n\n this.update...
javascript
chosen
[ { "from": "system", "value": "Increase limit for fetching users in UI\n" }, { "from": "human", "value": "/**\n * Created by groupsky on 18.11.15.\n */\n\nrequire('../app').controller('UsersController', /* @ngInject */function ($filter, $scope, User) {\n var controller = this\n var filter = $fi...
javascript
chosen
[ { "from": "system", "value": "Remove reading config from file\n" }, { "from": "human", "value": "\"use strict\";\n\nconst path = require('path');\nconst Sails = require('sails');\nconst _ = require('lodash');\n\nmodule.exports = function (grunt) {\n grunt.registerTask('cron', async function (...
javascript
chosen
[ { "from": "system", "value": "Make directional light gizmo invisible\n" }, { "from": "human", "value": "import M_Gizmo from './M_Gizmo';\nimport Arrow from '../../../low_level/primitives/Arrow';\nimport ClassicMaterial from '../../../low_level/materials/ClassicMaterial';\nimport M_Mesh from '../...
javascript
chosen
[ { "from": "system", "value": "Allow changing the function used to extract GeoJSON features from TopoJSON.\n" }, { "from": "human", "value": "po.d3TopoJson = function(fetch) {\n if (!arguments.length) fetch = po.queue.json;\n\n var topoToGeo = function(url, callback) {\n function convert(top...
javascript
chosen
[ { "from": "system", "value": "Add mousedown/mouseup/mousemove to test suite.\n\nTo make sure that we do not clobber those events.\n" }, { "from": "human", "value": "window.addEventListener('load', function(){\n\n // touchstart\n\n module('touchstart', environment);\n\n test('should resp...
javascript
chosen
[ { "from": "system", "value": "Fix regex for template files\n\nThe regex wasn't matching dotfiles with no file extension so modify it to also include .tpl files with no additional extension.\n" }, { "from": "human", "value": "'use strict';\n\nconst Promise = require('bluebird');\n\nconst glob = P...
javascript
chosen
[ { "from": "system", "value": "Fix typo in error message\n" }, { "from": "human", "value": "'use strict';\n\nvar R = require('ramda');\n\n/**\n * Output a block (or its inverse) based on whether or not both of the suppied\n * arguments are truthy.\n *\n * @since v0.0.1\n * @param {*} left\n * @pa...
javascript
chosen
[ { "from": "system", "value": "Fix timeout error in UserContainer test.\n" }, { "from": "human", "value": "var _ = require('underscore');\nvar UserContainer = require('../lib/authentication/user-container');\nvar assert = require('chai').assert;\n\ndescribe('tests of garbage collecting of outdate...
javascript
chosen
[ { "from": "system", "value": "Make Fluxbox.Mixin only for the top-level components\n" }, { "from": "human", "value": "var React = require(\"react\");\n\nmodule.exports = {\n propTypes: {\n flux: React.PropTypes.object\n },\n\n childContextTypes: {\n flux: React.PropTypes.object\n },\n\...
javascript
chosen
[ { "from": "system", "value": "Add debug information to IRC handler\n" }, { "from": "human", "value": "/* eslint no-console: 0 */\n'use strict';\n\nconst irc = require('irc');\n\nconst server = process.env.IRC_SERVER;\nconst user = process.env.IRC_USER;\nconst channel = process.env.IRC_CHANNEL;\n...
javascript
chosen
[ { "from": "system", "value": "Remove prototype extensions. ES5.1 now required." }, { "from": "human", "value": "/**\n Contains core methods and classes for Orbit.js\n\n @module orbit\n @main orbit\n */\n\n// Prototype extensions\nif (!Array.prototype.forEach) {\n Array.prototype.forEach = funct...
javascript
chosen
[ { "from": "system", "value": "Add client-get-partner listener to hall server\n" }, { "from": "human", "value": "const program = require('commander');\n\nprogram\n .version('1.0.0')\n .option('-p, --port <port>', 'specify the websocket port to listen to [9870]', 9870)\n .parse(process.ar...
javascript
chosen
[ { "from": "system", "value": "Allow player to move up/down/right/left\n" }, { "from": "human", "value": "var game = new Phaser.Game(600, 800, Phaser.AUTO, '', {preload: preload, create: create, update: update});\r\n\r\nfunction preload() {\r\n game.load.image('player', 'assets/player.png');\r\n...
javascript
chosen
[ { "from": "system", "value": "Add consistancy to port logging\n" }, { "from": "human", "value": "var WebSocket = require('faye-websocket'),\n http = require('http'),\n reject = require('lodash/collection/reject'),\n without = require('lodash/array/without');\n\nmodule.exports ...
javascript
chosen