conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use port > 1024 in production to avoid ECONNREFUSED error\n" }, { "from": "human", "value": "var config = {\n production : {\n port : 80,\n serviceURL : 'http://wapm-service.jit.su'\n },\n development : {\n port : 9000,\n serviceURL : 'http://wapm-ser...
javascript
chosen
[ { "from": "system", "value": "Add name and isPublic to group routes\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = function(imports) {\n\n let express = imports.modules.express;\n let Promise = imports.modules.Promise;\n let util = imports.util;\n let NormalGr...
javascript
chosen
[ { "from": "system", "value": "Send log as data=logmessage format\n" }, { "from": "human", "value": "/**\n * Created by tmolnar on 3/21/15.\n */\nmodule.exports = (function () {\n var request = require('request');\n\n var logger = function(message, isProd) {\n\n if (isProd) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add method comments to test helper functions.\n" }, { "from": "human", "value": "function getMap(){\n var map = new OpenLayers.Map({\n layers: [\n new OpenLayers.Layer.WMS(\n \"OpenLayers WMS\", \n \"http://vmap0.ti...
javascript
chosen
[ { "from": "system", "value": "Add test for notice rules\n" }, { "from": "human", "value": "var test = require('tape')\nvar Linter = require('../')\n\ntest('basic', function (assert) {\n assert.equals(typeof Linter, 'function', 'require returns function')\n assert.end()\n})\n\ntest('passed erro...
javascript
chosen
[ { "from": "system", "value": "Remove methods from store that aren’t needed for this lib\n" }, { "from": "human", "value": "\nrequire('../src/client.js');\n\nvar SugarTest = {};\n\n(function(test) {\n\n test.storage = {};\n test.keyValueStore = {\n set: function(key, value) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add webkit-transform for proper Safari centering\n" }, { "from": "human", "value": "angular.module('rs.popover', []).run(function () {\n 'use strict';\n\n var styleContent, styleTag;\n\n styleContent = document.createTextNode('.rs-popover-overlay { position: fixe...
javascript
chosen
[ { "from": "system", "value": "Rename variable in test helper\n" }, { "from": "human", "value": "// Copyright 2016 Kyle E. Mitchell\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 c...
javascript
chosen
[ { "from": "system", "value": "Update contact form server method to validate schema\n" }, { "from": "human", "value": "import { Meteor } from 'meteor/meteor';\nimport { check } from 'meteor/check';\nimport { Email } from 'meteor/email';\n\nconst { ADMIN_EMAIL } = Meteor.settings;\n\nMeteor.method...
javascript
chosen
[ { "from": "system", "value": "Set NODE_ENV to production if its undefined\n" }, { "from": "human", "value": "const fs = require('fs');\nconst path = require('path');\n\nif (fs.existsSync(path.join(process.cwd(), '.env.example'))) {\n require('dotenv-safe').config();\n} else if (fs.existsSync(pa...
javascript
chosen
[ { "from": "system", "value": "Use double-merge instead of assign\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport Application from '../../app';\nimport config from '../../config/environment';\nimport registerPowerCalendarHelpers from '../../tests/helpers/ember-power-calendar...
javascript
chosen
[ { "from": "system", "value": "Connect to mongohq in prod\n" }, { "from": "human", "value": "var mongojs = require('mongojs');\n\nprocess.on('uncaughtException', function (err) {\n\tconsole.error(\"uncaught exception\", err, err.stack);\n});\n\nvar express = require('express');\nvar app = express...
javascript
chosen
[ { "from": "system", "value": "Add alternatives option to example\n" }, { "from": "human", "value": "var map = L.map('map');\n\nL.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {\n\tattribution: '&copy; <a href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors'\n}).addTo(map);\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix support forceLogout helper for IE8\n" }, { "from": "human", "value": "function forceLogout (domain, callback) {\n var endpoint = 'https://' + domain + '/logout';\n var iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n iframe.onloa...
javascript
chosen
[ { "from": "system", "value": "Remove --harmony_maths (I think all methods already work by default)\n" }, { "from": "human", "value": "'use strict';\n\nvar findup = require('findup-sync');\nvar spawnSync = require('child_process').spawnSync;\nvar gruntPath = findup('node_modules/grunt-cli/bin/gru...
javascript
chosen
[ { "from": "system", "value": "Simplify the check if a warning should be emitted.\n" }, { "from": "human", "value": "import storeModule from './store';\n\nfunction storeHas({ store, console }, url, hasFilters = false, showWarnings = true) {\n if (!hasFilters && store.includes(url)) return true;\...
javascript
chosen
[ { "from": "system", "value": "Add & implement the optional 'onClick' prop, to provide visual interaction if set\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\...
javascript
chosen
[ { "from": "system", "value": "Comment out test that does nothing and fails.\n" }, { "from": "human", "value": "const app = require('../../tools/app.js')\nconst request = require('supertest')\nconst assert = require('assert')\n\ndescribe('Sign functionality', () => {\n let sessionID\n before(()...
javascript
chosen
[ { "from": "system", "value": "Make a separate constructor for node\n" }, { "from": "human", "value": "(function () {\n \"use strict\";\n\n var Frame = function (elem) {\n if (typeof elem === 'string') {\n elem = document.getElementById(elem);\n }\n\n var hei...
javascript
chosen
[ { "from": "system", "value": "Fix Chrome headless when root on Linux\n\nFix Chrome headless when running as root by adding --no-sandbox.\n" }, { "from": "human", "value": "// Copyright (c) Martin Costello, 2017. All rights reserved.\n// Licensed under the Apache 2.0 license. See the LICENSE file...
javascript
chosen
[ { "from": "system", "value": "Connect callback now waits for initial battery status and led characteristic discovery\n" }, { "from": "human", "value": "let Nuimo = require(\"../nuimo.js\"),\n nuimo = new Nuimo();\n\nnuimo.on(\"discover\", (device) => {\n\n console.log(`Discovered Nuimo (${...
javascript
chosen
[ { "from": "system", "value": "Change default setting from 0 to false\n\nGH-514\n" }, { "from": "human", "value": "/**\n * Default user preferences. End-users can change these parameters by editing config.json\n * @param {number} version - Scheme version. (Not application version)\n */\nconst def...
javascript
chosen
[ { "from": "system", "value": "Add browsers list to Autoprefixer.\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\nvar autoprefixer = require('autoprefixer');\n\nmodule.exports = {\n\tdevtool: 'eval',\n\n\tentry: './test/specs/specs.js',\n\n\toutp...
javascript
chosen
[ { "from": "system", "value": "[tests] Define \"should not see\" as either invisible or completely absent\n" }, { "from": "human", "value": "const {client} = require('nightwatch-cucumber');\nconst {defineSupportCode} = require('cucumber');\n\ndefineSupportCode(({Then}) => {\n Then(/^the title ...
javascript
chosen
[ { "from": "system", "value": "Add ECONRESET / socket hang up handling to the proxy\n" }, { "from": "human", "value": "'use strict';\n\nvar fs = require('fs');\nvar http = require('http');\nvar httpProxy = require('http-proxy');\n\nvar hosts = {};\n\nfunction update() {\n fs.readFile('../hosts.j...
javascript
chosen
[ { "from": "system", "value": "Improve the loading button component\n" }, { "from": "human", "value": "var React = require('react/addons'),\n\tTappable = require('../../touchstone/tappable'),\n\tNavigation = require('../../touchstone/navigation');\n\nmodule.exports = React.createClass({\n\tmixins...
javascript
chosen
[ { "from": "system", "value": "Add note about RailsUjs and Turbolinks\n\nCloses #199\n" }, { "from": "human", "value": "/* eslint no-console:0 */\nimport RailsUjs from \"rails-ujs\";\nimport Turbolinks from \"turbolinks\";\n\nRailsUjs.start();\nTurbolinks.start();\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Update comparator to select based on smallest by CPU, then Memory\n" }, { "from": "human", "value": "define(function (require) {\n \"use strict\";\n\n var Backbone = require('backbone'),\n _ = require('underscore'),\n Size = require('models/Size'),\n glob...
javascript
chosen
[ { "from": "system", "value": "Use express for protractor tests.\n" }, { "from": "human", "value": "const path = require('path')\nconst httpServer = require('http-server')\nconst childprocess = require('child_process')\n\nconst server = httpServer.createServer({ root: path.join(__dirname, 'wwwroo...
javascript
chosen
[ { "from": "system", "value": "Add heartbeat and the corresponding log for daemon-trigger-skygear\n" }, { "from": "human", "value": "'use strict';\n\nconst exec = require('child_process').exec;\nconst skygear = require('skygear');\n\nconst apiKey = process.argv[2] || '';\n\nconst channel = '&chim...
javascript
chosen
[ { "from": "system", "value": "Include card count in deck directory\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar _ = require('underscore'),\n glob = require('glob'),\n fs = require('fs'),\n mkdirp = require('mkdirp'),\n path = require('path'),\n generateEntry,\n ...
javascript
chosen
[ { "from": "system", "value": "Add comments to clarify the relationship between feathers, Sequelize, and setting table relationships.\n" }, { "from": "human", "value": "'use strict';\nconst Sequelize = require('sequelize');\n\n// projects-model.js - A sequelize model\n//\n// See http://docs.seque...
javascript
chosen
[ { "from": "system", "value": "Fix JS tests for mocking modals with correct API.\n" }, { "from": "human", "value": "describe('Utils.OPAL._run', function (){\n\n it('Should add open_modal to the root scope.', function () {\n var mock_scope = { $on: function(){} };\n var mock_modal...
javascript
chosen
[ { "from": "system", "value": "Revert \"fix: initialize PFL control properly\"\n" }, { "from": "human", "value": "/* @flow */\nimport type { LaunchpadDevice, MidiMessage } from '../../'\nimport type { ChannelControl, ControlMessage } from '@mixxx-launchpad/mixxx'\n\nimport { modes } from '../Modi...
javascript
chosen
[ { "from": "system", "value": "Fix line lengths to keep Travis happy\n" }, { "from": "human", "value": "define(function () {\n // French\n return {\n errorLoading: function () {\n return 'Les résultats ne peuvent pas être chargés.';\n },\n inputTooLong: function (args) {\n va...
javascript
chosen
[ { "from": "system", "value": "Fix for capitalization bug that is breaking the build.\n" }, { "from": "human", "value": "var Q = require(\"Q\");\n\nvar PromiseUtil = module.exports = {\n\t/** \n\t * Translates a normal Promise to a simple EarlyPromise. \n\t * promise (required): the promise t...
javascript
chosen
[ { "from": "system", "value": "Fix support in IE 11\n\nRemove usage of => and `` comments that break backwards compatibility with IE" }, { "from": "human", "value": "Selectize.define('tag_limit', function (options) {\n const self = this\n options.tagLimit = options.tagLimit\n this.onBlur...
javascript
chosen
[ { "from": "system", "value": "Use the same towgs84 value (not a rounded one)\n\nhttp://spatialreference.org/ref/epsg/2056/proj4/\nhttp://spatialreference.org/ref/epsg/21781/proj4/\n" }, { "from": "human", "value": "goog.provide('ngeo.proj.EPSG21781');\n\ngoog.require('ol.proj');\n\nif (typeof pr...
javascript
chosen
[ { "from": "system", "value": "Create controller to get Post\n\n" }, { "from": "human", "value": "const User = require('../db/model').User;\nconst Post = require('../db/model').Post;\n\nvar postController = {\n index: function (req, res) {\n res.render('post', {\n page: 'post...
javascript
chosen
[ { "from": "system", "value": "Add a log line to the examples file\n" }, { "from": "human", "value": "Meteor.startup(function(){\n Meteor.Migrations.add('1', function(log) {\n // log writes to the console as well as to the database. \n\n });\n});\n\nvar migration = Meteor.Migrations.get('1')...
javascript
chosen
[ { "from": "system", "value": "Test Fenwick Tree: Check error throwing if passed anything but array\n" }, { "from": "human", "value": "/* eslint-env mocha */\nconst FenwickTree = require('../../src').DataStructures.FenwickTree;\nconst assert = require('assert');\n\ndescribe('Fenwick Tree', () => ...
javascript
chosen
[ { "from": "system", "value": "Fix a huge performance penalty by using locale comparator instance.\n" }, { "from": "human", "value": "export const initialState = { allIds: [], byIds: {} };\n\nconst ucastniciReducer = (state = initialState, action) => {\n switch (action.type) {\n case 'RECEIVE...
javascript
chosen
[ { "from": "system", "value": "Copy static properties to WithHtml helper\n" }, { "from": "human", "value": "'use strict'\n\nconst xtend = require('xtend')\nconst ReactMarkdown = require('./react-markdown')\nconst htmlParser = require('./plugins/html-parser')\n\nconst parseHtml = htmlParser()\n\nm...
javascript
chosen
[ { "from": "system", "value": "Optimize only main.js, skip all other files\n\nThe directory does not need to be optimized because only main.js is\nloaded by the end user. This saves compilation time for JS/CSS.\n" }, { "from": "human", "value": "({\n appDir: './app',\n baseUrl: 'scripts',\n ma...
javascript
chosen
[ { "from": "system", "value": "Improve rest template for get\n" }, { "from": "human", "value": "var smash = require(\"smash-js-serverless\");\nvar CONTROLLER_NAMEdb = require('../database/CONTROLLER_NAME.js');\n\nsmash.get({path: \"/CONTROLLER_NAME\", authorizations: [\"ROLE_USER\"]}, function (r...
javascript
chosen
[ { "from": "system", "value": "Remove unused ambient light shadowmap uniform" }, { "from": "human", "value": "module.exports = /* glsl */`\n#if NUM_AMBIENT_LIGHTS > 0\n\nstruct AmbientLight {\n vec4 color;\n};\n\nuniform AmbientLight uAmbientLights[NUM_AMBIENT_LIGHTS];\nuniform sampler2D uAmbien...
javascript
chosen
[ { "from": "system", "value": "Fix mistake discovered by eslint\n" }, { "from": "human", "value": "import each from 'jest-each';\n\nimport matcher from './';\n\nexpect.extend(matcher);\n\ndescribe('.toBeBoolean', () => {\n it('passes when given false', () => {\n expect(false).toBeBoolean();\n...
javascript
chosen
[ { "from": "system", "value": "Remove support for 2.4 & 2.8\n" }, { "from": "human", "value": "/* eslint-env node */\nmodule.exports = {\n scenarios: [\n {\n name: 'ember-lts-2.4',\n bower: {\n dependencies: {\n 'ember': 'components/ember#lts-2-4'\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Add theme support to app\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport {BrowserRouter as Router, Redirect, Route, Switch} from 'react-router-dom'\nimport {getAsyncComponent} from 'async-react-component';\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix bind of the switches and increase perf with the DOM\n" }, { "from": "human", "value": "function RenderClass(element) {\n var _private = this;\n\n _private.el = null;\n\n this.update = function (data) {\n if (_private.el === null) { return; }\n\n for (va...
javascript
chosen
[ { "from": "system", "value": "Stop fetching items for each killmail since they are not necessary.\n" }, { "from": "human", "value": "module.exports = (function() {\n var m = require('mithril')\n\n function zeroPad(num) {\n return num < 10 ? `0${num}` : num;\n }\n\n var zKillboard = {}\n\n...
javascript
chosen
[ { "from": "system", "value": "Add new production IP address\n" }, { "from": "human", "value": "var environments = {\n devLocal: {server:'http://localhost', port:3000},\n devDocker: {server:'http://192.168.99.100', port:3000},\n devDeployed: {server:'http://45.55.171.230', port:3000},\n produ...
javascript
chosen
[ { "from": "system", "value": "Add modules true. Fix js formatting\n" }, { "from": "human", "value": "module.exports = {\n \"extends\": \"airbnb\",\n \"plugins\": [\n \"react\"\n ],\n \"env\": {\n \"node\": true,\n \"mocha\": true,\n },\n};\n" }, { "fro...
javascript
chosen
[ { "from": "system", "value": "test(themeSpec): Move done callback to proper location\n" }, { "from": "human", "value": "import chai, { expect } from 'chai';\n\nimport sinon from 'sinon';\nimport sinonChai from 'sinon-chai';\n\nchai.use(sinonChai);\n\nimport {\n setTheme,\n setStoredThemeObserv...
javascript
chosen
[ { "from": "system", "value": "Make sure that visitors have a user id\n" }, { "from": "human", "value": "Meteor.startup(function () {\n Meteor.subscribe('music');\n Tracker.autorun(function() {\n var userId = Meteor.userId();\n if(!userId && P2P.peer) {\n } else if(!P2P...
javascript
chosen
[ { "from": "system", "value": "Disable Redux DevTools in prod\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\nvar ExtractTextPlugin = require('extract-text-webpack-plugin');\n\nmodule.exports = {\n entry: './src/index',\n\n output: {\n filen...
javascript
chosen
[ { "from": "system", "value": "Update example for more easy to understand\n" }, { "from": "human", "value": "\n\nlet name;\nlet website;\n\nconsole.log(\"Name: \", name);\nconsole.log(\"Website: \", website);\n\n// Length of string\nconsole.log();\n\n// CharAt\n// console.log(\"Character at: \", ...
javascript
chosen
[ { "from": "system", "value": "Update path resolution for scripts\n" }, { "from": "human", "value": "const path = require('path');\n\nmodule.exports = {\n\tresolve: {\n\t\tmodules: [\n\t\t\t__dirname + '/scripts',\n\t\t\tpath.resolve(__dirname, \"./node_modules\")\n\t\t]\n\t}\n};" }, { "f...
javascript
chosen
[ { "from": "system", "value": "Add additional supertest tests for /signup, /api, /contact and /login\n" }, { "from": "human", "value": "var request = require('supertest');\nvar app = require('../app.js');\n\ndescribe('GET /', function() {\n it('should return 200 OK', function(done) {\n reques...
javascript
chosen
[ { "from": "system", "value": "Add alias and payload to GH's boilerplate\n" }, { "from": "human", "value": "/*\n * Copyright 2013, All Rights Reserved.\n *\n * Code licensed under the BSD License:\n * https://github.com/eduardolundgren/blob/master/LICENSE.md\n *\n * @author Author <email@email.co...
javascript
chosen
[ { "from": "system", "value": "Fix typo for infringement link in footer\n\nFixes #1619" }, { "from": "human", "value": "const React = require(\"react\");\n\nexports.Footer = class Footer extends React.Component {\n render() {\n return (\n <div className=\"footer\">\n <div classNam...
javascript
chosen
[ { "from": "system", "value": "Test inFlowState for new gameState\n" }, { "from": "human", "value": "var GameState = require('./../gameState.js');\n\ndescribe(\"gameStateConstructor\", function() {\n it(\"Empty constructor starts state with NotFlowing\", function() {\n var gs = new Game...
javascript
chosen
[ { "from": "system", "value": "Add newest DVR video URL\n" }, { "from": "human", "value": "import React from 'react'\nimport styled from 'styled-components'\n\nconst Grid = styled.div`\n display: grid;\n grid-gap: 30px;\n min-width: 380px;\n\n @media (min-width: 960px) {\n grid-template-co...
javascript
chosen
[ { "from": "system", "value": "Clone api options to avoid always injecting a `headers` key\n" }, { "from": "human", "value": "// @ts-check\n\nimport { assign, get, defaults, compact } from \"lodash\"\nimport request from \"request\"\nimport config from \"config\"\nimport HTTPError from \"lib/http...
javascript
chosen
[ { "from": "system", "value": "Add wait to switchDateRange for stability.\n" }, { "from": "human", "value": "/**\n * Changes the currently selected date range.\n *\n * Currently only identifiable by the option values.\n *\n * @param {string} fromRange The currently selected date range.\n * @param...
javascript
chosen
[ { "from": "system", "value": "Include `config/environment.js` values into application.\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport { dasherize } from '@ember/string';\nimport { setRegistry } from '../../resolver';\nimport { setResolver, setApplication } from 'ember-test...
javascript
chosen
[ { "from": "system", "value": "Add access_token, expires_in to RedirectHandler valid keys\n" }, { "from": "human", "value": "/**\n * RedirectHandler will attempt to find\n * these keys in the URL. If found,\n * this is an indication to Torii that\n * the Ember app has loaded inside a popup\n * an...
javascript
chosen
[ { "from": "system", "value": "Revert \"BUGFIX: highlight standard code blocks\"\n\nThis reverts commit d5b1b64bb838baca3a4c9126a15cb8631ed8c791.\n" }, { "from": "human", "value": "/*global hljs:true */\n\n/**\n Helper object for syntax highlighting. Uses highlight.js which is loaded on demand.\...
javascript
chosen
[ { "from": "system", "value": "Add in model contact beforeUpdate\n" }, { "from": "human", "value": "/**\n * Contact.js\n *\n * @description :: TODO: You might write a short summary of how this model works and what it represents here.\n * @docs :: http://sailsjs.org/#!documentation/models\n...
javascript
chosen
[ { "from": "system", "value": "Allow to set lang of foreignKeys through attribute\n" }, { "from": "human", "value": "'use strict';\nangular.module('arethusa.core').directive('foreignKeys',[\n 'keyCapture',\n 'languageSettings',\n function (keyCapture, languageSettings) {\n return {\n r...
javascript
chosen
[ { "from": "system", "value": "Throw Error instead of string\n" }, { "from": "human", "value": "import VulcanEmail from 'meteor/vulcan:email';\nimport Handlebars from 'handlebars';\nimport moment from 'moment';\n\nconst postsQuery = `\n query PostsSingleQuery($documentId: String){\n PostsSing...
javascript
chosen
[ { "from": "system", "value": "Add a filter to show the duration in hour:minutes format\n" }, { "from": "human", "value": "angular.module('trexFilters', []).filter('checkmark', function() {\n return function(input) {\n return input ? '\\u2713' : '\\u2718';\n };\n});\n" }, { "...
javascript
chosen
[ { "from": "system", "value": "Fix for random sentence always displaying the same sentence in Internet Explorer 8.\n\ngit-svn-id: 776ea4b3e47339c5b8782ec5e9346c740e073fb4@1044 e0e46c49-be69-4f5a-ad62-21024a331aea\n" }, { "from": "human", "value": "/*\n Tatoeba Project, free collaborativ creati...
javascript
chosen
[ { "from": "system", "value": "Enable tests for Safari 9" }, { "from": "human", "value": "var argv = require('yargs').argv;\n\nmodule.exports = {\n registerHooks: function(context) {\n var saucelabsPlatforms = [\n // 'macOS 10.12/iphone@10.3',\n // 'macOS 10.12/ipad@10.3',\n 'W...
javascript
chosen
[ { "from": "system", "value": "Add 'force' and 'annotated' option to the gittag task\n" }, { "from": "human", "value": "'use strict';\n\nvar async = require('grunt').util.async;\nvar grunt = require('grunt');\nvar ArgUtil = require('flopmang');\n\nmodule.exports = function (task, exec, done) {\n ...
javascript
chosen
[ { "from": "system", "value": "Bring back update logic as it is in fact required." }, { "from": "human", "value": "function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (...
javascript
chosen
[ { "from": "system", "value": "Use cgeek.fr + ES store,\n" }, { "from": "human", "value": "/******\n* !! WARNING: This is a generated file !!\n*\n* PLEASE DO NOT MODIFY DIRECTLY\n*\n* => Changes should be done on file 'app/config.json'.\n******/\n\nangular.module(\"cesium.config\", [])\n\n.consta...
javascript
chosen
[ { "from": "system", "value": "Use `singleResult` for operation details query\n\n" }, { "from": "human", "value": "import React from 'react'\nimport { sparqlConnect } from 'sparql-connect'\n\n/**\n * Builds the query that retrieves the details on a given NSI.\n */\nconst queryBuilder = operatio...
javascript
chosen
[ { "from": "system", "value": "fix:dev: Fix eslint configuration for regular 'ol node\n" }, { "from": "human", "value": "module.exports = {\n \"env\": {\n \"browser\": false,\n \"node\": true,\n \"es6\": true\n },\n \"extends\": \"eslint:recommended\",\n \"parserO...
javascript
chosen
[ { "from": "system", "value": "Hide nav on document click\n" }, { "from": "human", "value": "$(function(){\n\t'use strict';\n\n\t//--- Global variables ---//\n\n\n\n\t//--- Helper functions ---//\n\n\n\t//--- In-page scroll ---//\n\t$('.scroll').on('click',function(e,target){\n\t\te.preventDefaul...
javascript
chosen
[ { "from": "system", "value": "Handle int and string quantity validation\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass Quantity extends React.Component {\n render() {\n return (\n <div className=\"container__row figure -left -...
javascript
chosen
[ { "from": "system", "value": "Add warning if CERT_PASSWORD is not defined\n" }, { "from": "human", "value": "const installer = require('electron-installer-windows');\n\nif (typeof process.env.CERT_PASSWORD !== 'string') {\n console.log('Error: The certificate password is not a string');\n thro...
javascript
chosen
[ { "from": "system", "value": "Write empty lifecycles so they can be called without guards.\n" }, { "from": "human", "value": "// @flow\n\nexport const withLifecycle = (Base: Class<any> = HTMLElement): Class<any> =>\n class extends Base {\n connectedCallback() {\n if (this.connecting) {\...
javascript
chosen
[ { "from": "system", "value": "Fix tweet hook path change\n" }, { "from": "human", "value": "var\n schedule = require('node-schedule'),\n tweet = require('./lib/tweet'),\n syncTask = require('./tasks/sync');\n\n// Tasks to run on startup\nsyncTask.run();\n\n// Update entries every 30 minutes a...
javascript
chosen
[ { "from": "system", "value": "Comment out import of inexistent file ToccoLogo.scss\n" }, { "from": "human", "value": "import ToccoLogo from './ToccoLogo'\nimport 'ToccoLogo/ToccoLogo.scss'\n\nvar exports = { ToccoLogo }\n\nmodule.exports = exports\n//\n// let render = () => {\n// const mountEl...
javascript
chosen
[ { "from": "system", "value": "Allow staff only experiment kinds\n" }, { "from": "human", "value": "define([], function() {\n \n return {\n opts: function() {\n return _.map(this.list, function(v,s) { return '<option value=\"'+v+'\">'+s+'</option>' }).join()\n },\n ...
javascript
chosen
[ { "from": "system", "value": "Add query to create user (calling immediately to test in node)\n" }, { "from": "human", "value": "const pg = require('pg')\nconst pgp = require('pg-promise')()\n\nconst dbName = 'vinyl'\nconst connectionString = process.env.DATABASE_URL || `postgres://localhost:5432...
javascript
chosen
[ { "from": "system", "value": "Fix height checks by switching to use dirty flag instead of setting height -1\n" }, { "from": "human", "value": "import React from 'react';\nimport {shouldComponentUpdate} from 'react-addons-pure-render-mixin';\n\n\nconst ReactHeight = React.createClass({\n propTyp...
javascript
chosen
[ { "from": "system", "value": "Migrate me from null to undefined, prevents corrupted state\n" }, { "from": "human", "value": "\nexport default (state) => {\n if (state.ui.shortkeys_enabled !== undefined) {\n state.ui.hotkeys_enabled = state.ui.shortkeys_enabled;\n }\n return state;\n};\n" ...
javascript
chosen
[ { "from": "system", "value": "Add visible version number in bottom corner of pages.\n" }, { "from": "human", "value": "import React from 'react';\nimport styles from '../styles/core.scss';\nimport GlobalHeader from 'components/GlobalHeader';\n\n// Note: Stateless/function components *will not* h...
javascript
chosen
[ { "from": "system", "value": "Call personfinder module properly from a public channel\n" }, { "from": "human", "value": "var Person = require('./person');\n\nfunction incomingMessage(botId, message) {\n return message.type === 'message' // check it's a message\n && Boolean(message.text...
javascript
chosen
[ { "from": "system", "value": "Use functional form of 'use strict';\n" }, { "from": "human", "value": "'use strict';\n\nchrome.runtime.onInstalled.addListener(function () {\n chrome.declarativeContent.onPageChanged.removeRules(undefined, function () {\n chrome.declarativeContent.onPageC...
javascript
chosen
[ { "from": "system", "value": "Fix removing focus from an input for touch devices\n" }, { "from": "human", "value": "var searchInputView = (function() {\n var _element = null;\n var preInputValue = '';\n var isTouchEnabled = dom.supportsTouch();\n var isFocus = false;\n function inElement(po...
javascript
chosen
[ { "from": "system", "value": "Fix ld a,[hram] -> ldh a,[offset] optimizations\n" }, { "from": "human", "value": "// Dependencies ---------------------------------------------------------------\n// ----------------------------------------------------------------------------\nvar Token = require('...
javascript
chosen
[ { "from": "system", "value": "Change pageToPdf and browserToPdf to curry function\n" }, { "from": "human", "value": "const puppeteer = require(\"puppeteer\")\n\nconst puppeteerArgs = [\n \"--no-sandbox\",\n \"--disable-setuid-sandbox\",\n \"--disable-gpu\"\n]\n\nconst pdfOptions = {\n printB...
javascript
chosen
[ { "from": "system", "value": "Make cody bot say good morning at 8:55\n" }, { "from": "human", "value": "// 'use strict';\n\nvar schedule = require('node-schedule');\nvar slack = require('./slack.js');\n\nmodule.exports = scheduler;\n\nfunction scheduler() {\n var hrr11 = slack.students.getChann...
javascript
chosen
[ { "from": "system", "value": "Fix Type Error Raised by Copy/Paste :D\n" }, { "from": "human", "value": "var accountType = require('../../config/accountType.json')\n\nmodule.exports = function (publisherAccount) {\n var accountTypeList = []\n for (var key in accountType) \n accountTypeList.p...
javascript
chosen
[ { "from": "system", "value": "Update: Debug log task dependencies to allow them to be silenced\n" }, { "from": "human", "value": "'use strict';\n\nvar log = require('gulplog');\nvar chalk = require('chalk');\nvar prettyTime = require('pretty-hrtime');\nvar formatError = require('../formatError')...
javascript
chosen
[ { "from": "system", "value": "veyron/tools/playground: Fix js testdata to use leaf dispatcher.\n\nChange-Id: I32c29cb44458ecf9ab06d0dc66576172e4189134\n" }, { "from": "human", "value": "var veyron = require('veyron');\n\nvar pingPongService = {\n ping: function(msg){\n console.log(msg);\n ...
javascript
chosen
[ { "from": "system", "value": "Use native function to valud if ipOrdomian is string\n" }, { "from": "human", "value": "/**\n * Module dependencies\n */\nvar fs = require('fs');\nvar dns = require('dns');\nvar path = require('path');\nvar util = require('util');\n\n//\nvar info = require('debug')...
javascript
chosen