conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add omitted urls to schema\n" }, { "from": "human", "value": "import { default as articles } from './articles';\nimport { default as replyrequests } from './replyrequests';\nimport { default as articlereplyfeedbacks } from './articlereplyfeedbacks';\nimport { defaul...
javascript
chosen
[ { "from": "system", "value": "Create blank layer with VectorLayer instead of TileLayer\n" }, { "from": "human", "value": "/**\n * @module app.backgroundlayer.BlankLayer\n */\n/**\n * @fileoverview This file defines the Blank Layer service. This service\n * creates an empty layer and the correspo...
javascript
chosen
[ { "from": "system", "value": "Add test to check update api key\n" }, { "from": "human", "value": "var TestHelper = require(\"../helpers/testHelper\");\n\ndescribe('app', function() {\n\n\tit('should register a user', function() {\n\t\tdriver.get(\"/\",{id:'viewEntries'});\n\t\tTestHelper.clickMe...
javascript
chosen
[ { "from": "system", "value": "Revert \"use environment variable for port\"\n\nThis reverts commit 03abed36a666e1bd0e422b3eb7a0602905d57de5.\n" }, { "from": "human", "value": "/* AIDA Source Code */\n/* Contributors located at: github.com/2nd47/CSC309-A4 */\n\n// main app\n\n// server modules\nva...
javascript
chosen
[ { "from": "system", "value": ":bug: Fix bug with yt ad companion crashing during preroll ads\n" }, { "from": "human", "value": "// listen for page navigations, detect if they're YT & include our disable\nchrome.webNavigation.onBeforeNavigate.addListener((details) => {\n if(detectYTURL(details.u...
javascript
chosen
[ { "from": "system", "value": "Change getplayer back to original with NBA module\n" }, { "from": "human", "value": "import NBA from 'nba'\n\nmodule.exports = (playerName, dispatch) => {\n const playerToAdd = NBA.findPlayer(playerName)\n if(playerToAdd) {\n dispatch({type: \"TOGGLE_PLAYER_LOA...
javascript
chosen
[ { "from": "system", "value": "Improve error message for npm start without NODE_ENV.\n" }, { "from": "human", "value": "const config = require('./config');\n\nif (config.isProduction || require('piping')(config.piping)) {\n if (!process.env.NODE_ENV)\n throw new Error('Environment variable NO...
javascript
chosen
[ { "from": "system", "value": "Fix to check match object for null and to set a recurring alarm.\n" }, { "from": "human", "value": "function printError(e) {\n chrome.alarms.clearAll();\n webkitNotifications.createNotification('', \n e, '').show(); \n}\n\nfunction checkMail() {\...
javascript
chosen
[ { "from": "system", "value": "Fix bug where reseting jobs would cause vue iso_date filter to break.\n" }, { "from": "human", "value": "const utilitiesMixin = {\n methods: {\n getStatus: function(job) {\n if (!job.pid && !job.start && !job.end && !job.message)\n ...
javascript
chosen
[ { "from": "system", "value": "Change quick set panel settings\n" }, { "from": "human", "value": "export default {\n resizers: ['lt', 't', 'rt', 'l', 'r', 'lb', 'b', 'rb'],\n axis: [{\n value: 'lt',\n name: '左上对齐'\n },\n {\n value: 'rt',\n name: '右上对齐'\n },\n {\n...
javascript
chosen
[ { "from": "system", "value": "Add test for async action creators\n\n" }, { "from": "human", "value": "jest.unmock('../../src/actions/counter')\n\nimport {\n INCREMENT_COUNTER,\n DECREMENT_COUNTER,\n incrementCounter,\n decrementCounter,\n incrementCounterAsync\n} from '../../src/actions/cou...
javascript
chosen
[ { "from": "system", "value": "Remove unused code in loose.\n" }, { "from": "human", "value": "define(['./isImmutable'], function (isImmutable) {\n\n 'use strict';\n\n /**\n * Extract meta data from a property.\n *\n * @param {Mixed} prop The property\n * @param {String} nam...
javascript
chosen
[ { "from": "system", "value": "chore: Replace id attributes with className\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { Link } from 'react-router';\n\nimport NavBar from './NavBar';\nimport Footer from './Footer';\n\n\nexport default class MainLayout exte...
javascript
chosen
[ { "from": "system", "value": "Use relative path for modules/app\n" }, { "from": "human", "value": "/**\n * Start app\n */\n\n'use strict';\n\nvar app = new (require('modules/app'))();\napp.init();\n" }, { "from": "gpt", "value": "/**\n * Start app\n */\n\n'use strict';\n\nvar app = n...
javascript
chosen
[ { "from": "system", "value": "Add controller for route /test. Template displaying.\n" }, { "from": "human", "value": "var myApp = angular.module('myApp',['ngRoute']);\n\nmyApp.config(function ($routeProvider) {\n $routeProvider.when('/',{\n controller: 'WomenController',\n templateUrl: 'v...
javascript
chosen
[ { "from": "system", "value": "Fix mistake in previous commit.\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://paperjs.org/\n * htt...
javascript
chosen
[ { "from": "system", "value": "Set fallback language and alternative keys\n" }, { "from": "human", "value": "import localeEN from \"./locales/locale-en.json\";\nimport localeDE from \"./locales/locale-de.json\";\n\nlet AppTranslate = ($translateProvider) => {\n \"ngInject\";\n $translateProvide...
javascript
chosen
[ { "from": "system", "value": "Add new form ID for Analytics setup.\n" }, { "from": "human", "value": "/**\n * Analytics Constants.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\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": "Allow falsey but not null and undefined values to come through\n" }, { "from": "human", "value": "/*\n * Copyright 2018, Emanuel Rabina (http://www.ultraq.net.nz/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this fil...
javascript
chosen
[ { "from": "system", "value": "Remove vendor and ts properties\n\nWill be handled by webpack.\n" }, { "from": "human", "value": "module.exports = function () {\n var outputPath = \"./<%= outFolder %>/\";\n var src = \"./<%= srcFolder %>/\";\n\n var config = {\n vendor: {\n ...
javascript
chosen
[ { "from": "system", "value": "Change stats port to 8200 (align with new staging and dogfood)\n" }, { "from": "human", "value": "var http = require('http'),\n express = require('express'),\n db = require('../db');\nvar user = 'codebrag',\n password = '_showmestats_';\n\nfunction configur...
javascript
chosen
[ { "from": "system", "value": "Improve empty array handling for wait for resource helper\n\nSometimes a getter returns an empty array, but a few iterations later it\nwould be filled. In order to watch for this I've added a 1 second delay\nwhen an empty array is seen to wait and see if it gets filled with dat...
javascript
chosen
[ { "from": "system", "value": "Make GroupedKatas a real ES6 class." }, { "from": "human", "value": "var loadFileOnServer = require('../src/server/http-get.js');\n\nfunction GroupedKata(katasUrl) {\n \n this.load = function(onError, onSuccess) {\n function onLoaded(err, data) {\n var par...
javascript
chosen
[ { "from": "system", "value": "Make sure to require Image. Failure to do so is not automatically caught.\n" }, { "from": "human", "value": "// Copyright 2014-2015, University of Colorado Boulder\n\n/**\n * Base class for Nodes that represent energy system elements in the view\n * that use images ...
javascript
chosen
[ { "from": "system", "value": "ADD - descriptive updates to the first test\n" }, { "from": "human", "value": "var chakram = require('chakram'),\n expect = chakram.expect;\n\ndescribe(\"mPayroll API\", function() {\n\n it(\"should support POST request\", function () {\n this.timeout(4...
javascript
chosen
[ { "from": "system", "value": "Remove trailing reference to `TagList` in the response list\n" }, { "from": "human", "value": "\nmodule.exports = {\n BranchDeleteSummary: require('./BranchDeleteSummary'),\n BranchSummary: require('./BranchSummary'),\n CommitSummary: require('./CommitSummary'...
javascript
chosen
[ { "from": "system", "value": "Fix tests in IE 11\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Test.registerAsyncHelper('pollParticipate', function(app, name, selections) {\n if (!Ember.isEmpty(name)) {\n fillIn('.participation .name input', name);\n ...
javascript
chosen
[ { "from": "system", "value": "Clone the data so we don't have weird object references.\n" }, { "from": "human", "value": "var Readable = require('stream').Readable\n , data = require('./tree.json')\n\n/*\n * Returns a new stream that will emit all the nodes from tree.json.\n * Should be used to...
javascript
chosen
[ { "from": "system", "value": "Use service to auto get stocks from express\n" }, { "from": "human", "value": "app.controller('HomeController', ['$scope', '$http', 'stocks', function($scope, $http, stocks) {\n\tstocks.getStocks().success(function(data) {\n\t\t$scope.stocks = data;\n\t});\n\n\t$sco...
javascript
chosen
[ { "from": "system", "value": "Add trace to window errors\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa').factory('GlobalErrorHandler', [\n '$window',\n '$analytics',\n function($window, $analytics) {\n var oldErrorHandler = $window.onerror;\n $window.one...
javascript
chosen
[ { "from": "system", "value": "Fix module filters not working in Firefox due to having two click events\n" }, { "from": "human", "value": "define(['backbone.marionette', 'hbs!../templates/filter'],\n function (Marionette, template) {\n 'use strict';\n\n return Marionette.ItemView.extend({\...
javascript
chosen
[ { "from": "system", "value": "Add app port and mongodb uri as env vars with defaults for local.\n" }, { "from": "human", "value": "const milieu = require('milieu');\n\nconst config = milieu('<%= serverName %>', {\n environment: 'dev',\n server: {\n port: 8080\n },\n mongo: {\n url: 'mo...
javascript
chosen
[ { "from": "system", "value": "Add method for adding new profile\n" }, { "from": "human", "value": "Ext.define('SenchaFront.controller.ProfileListController', {\n extend: 'Ext.app.Controller',\n \n config: {\n refs: {\n \n },\n control: {\n \n ...
javascript
chosen
[ { "from": "system", "value": "[Base] Rewrite button with flow and PureComponent\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport { TouchableOpacity, Text, StyleSheet, View } from 'react-native';\n\nimport appStyle from '<%= appName %>/src/appStyle';\n\nconst s...
javascript
chosen
[ { "from": "system", "value": "Make frontend refresh list every second\n" }, { "from": "human", "value": "(function(){\n \"use strict\";\n angular.module(\"noticeboard\", [])\n .controller(\"Noticeboard\", NoticeboardCtrl)\n .directive(\"noticeboard\", function(){\n return {\n ...
javascript
chosen
[ { "from": "system", "value": "Add test for nested components\n" }, { "from": "human", "value": "var tape = require(\"tape\"),\n jsdom = require(\"jsdom\"),\n d3 = Object.assign(\n require(\"../\"),\n require(\"d3-selection\")\n );\n\n// An example component.\nfunction Paragrap...
javascript
chosen
[ { "from": "system", "value": "Exit with non-zero if Whiskey exists with non-zero.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar assert = require('../lib/assert').getAssertModule();\nvar exec = require('child_process').exec;\n\nvar sprintf = require('sprintf').sprintf;\n\nvar cwd ...
javascript
chosen
[ { "from": "system", "value": "FIX option in story to hide panels\n" }, { "from": "human", "value": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\n\nstoriesOf('Addons|Options', module)\n .add('setting name', () => <div>This story should have changed the name of the s...
javascript
chosen
[ { "from": "system", "value": "Add note about the account\n" }, { "from": "human", "value": "'use strict';\n\n/* global XMPP */\nvar client = new XMPP.Client({\n websocketsURL: \"ws://localhost:5280/xmpp-websocket/\",\n jid: 'lloyd@evilprofessor.co.uk',\n password: 'password'\n})\n\nclie...
javascript
chosen
[ { "from": "system", "value": "Clean up and remove deferred callbacks\n" }, { "from": "human", "value": "$.ajax({\n\turl: chrome.extension.getURL('scripts/' + location.hostname.replace(/^www\\./, '') + '.js'),\n\tdataType: 'text',\n\tsuccess: function(data){\n\t\t$(function(){\n\t\t\teval(data);\...
javascript
chosen
[ { "from": "system", "value": "Fix menu editor (resource removal) after jquery update.\n" }, { "from": "human", "value": "// remove-resource.js\n/*\n Copyright (c) 2011 Talis Inc, Some Rights Reserved\n Licensed under the Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0...
javascript
chosen
[ { "from": "system", "value": "Fix clicking on dots bug\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport {districtColors, partyData} from './Constants';\n\nclass Precinct extends Component {\n renderDots(dots, party) {\n const color = party ? par...
javascript
chosen
[ { "from": "system", "value": "Fix translations for non present gas load and heat load\n\nFixes: #1538\n" }, { "from": "human", "value": "var D3CarrierLoadChart = (function () {\n 'use strict';\n\n D3CarrierLoadChart.prototype = $.extend({}, D3LoadChart.prototype, {\n emptyMessage: f...
javascript
chosen
[ { "from": "system", "value": "Refactor to avoid dynamic module resolution\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array/uint1...
javascript
chosen
[ { "from": "system", "value": "Fix react error in NodeDetailsControls\n" }, { "from": "human", "value": "const React = require('react');\n\nconst NodeControlButton = require('./node-control-button');\n\nconst NodeDetailsControls = React.createClass({\n\n render: function() {\n let spinnerClas...
javascript
chosen
[ { "from": "system", "value": "Pre: Make sure the frontend is setup after the websocket connection is established\n\nSigned-off-by: Victor Porof <4f672cb979ca45495d0cccc37abaefc8713fcc24@gmail.com>\n" }, { "from": "human", "value": "/*\nCopyright 2016 Mozilla\n\nLicensed under the Apache License,...
javascript
chosen
[ { "from": "system", "value": "Fix the webpack file port number.\n" }, { "from": "human", "value": "var webpack = require('webpack');\n\nmodule.exports = {\n entry: [\n 'webpack-dev-server/client?http://0.0.0.0:3000',\n 'webpack/hot/only-dev-server',\n './src/index.js'\n ],\n resolve:...
javascript
chosen
[ { "from": "system", "value": "[docs] Remove the Nimbus prefix from the index.\n" }, { "from": "human", "value": "NAVTREE[0][2] = NAVTREE[0][2][0][2];" }, { "from": "gpt", "value": "// Make the \"Modules\" section the root section.\nNAVTREE[0][2] = NAVTREE[0][2][0][2];\n\n// Remove th...
javascript
chosen
[ { "from": "system", "value": "FIX Request.isSuccess status code issue returning 304 and thus preventing Moobile to work properly\n\nSigned-off-by: Yannick Gagnon <d4b2c45cb5d34b718a9a7e841e45e36d4b2966bc@lemieuxbedard.com>\n" }, { "from": "human", "value": "\"use strict\"\n\nRequest.prototype.op...
javascript
chosen
[ { "from": "system", "value": "[major] Convert from es6 to es5\n" }, { "from": "human", "value": "\"use strict\";\n\n\n/**\n * RegExp to find placeholders in the template\n *\n * http://regexr.com/3e1o7\n * @type {RegExp}\n */\nconst _re = /{([0-9a-zA-Z]+?)}/g;\n\n\n/**\n * Micro template compile...
javascript
chosen
[ { "from": "system", "value": "Improve asset and shot indexation\n\n* Index assets on all words found in name and on asset type\n* Index shots on episode sequence and shot name\n" }, { "from": "human", "value": "export const buildNameIndex = (entries) => {\n const index = {}\n entries.forEach((...
javascript
chosen
[ { "from": "system", "value": "Use tuple methods, remove _id reference.\n" }, { "from": "human", "value": "import {Transform, ingest} from 'vega-dataflow';\nimport {inherits, isFunction} from 'vega-util';\nimport {geoGraticule} from 'd3-geo';\n\n/**\n * GeoJSON feature generator for creating grat...
javascript
chosen
[ { "from": "system", "value": "Reorganize jsdoc, add @method tag\n" }, { "from": "human", "value": "define(function () {\n \"use strict\";\n\n var Edge = function (nodes) {\n this.setNodes(nodes);\n };\n\n Edge.prototype.setNodes = function (nodes) {\n this._nodes = node...
javascript
chosen
[ { "from": "system", "value": ":arrow_up: Upgrade to ucompiler v3 API\n" }, { "from": "human", "value": "'use babel'\n\nexport const compiler = false\nexport const minifier = false\nexport function process(contents) {\n const chunks = contents.split(/\\r?\\n/)\n if (chunks[chunks.length - 1] !=...
javascript
chosen
[ { "from": "system", "value": "Add comment explaining why we check for undefined tab urls in Safari\n" }, { "from": "human", "value": "var performCommand = function(event) {\n\tif(event.command === 'hibernateTabs') {\n\t\tvar c = 0;\n\n\t\tvar xmlHttp = new XMLHttpRequest();\n\t\txmlHttp.open('GE...
javascript
chosen
[ { "from": "system", "value": "Reorder width and column when generating random position\n" }, { "from": "human", "value": "define(function() {\n function PatternBinding(pattern, controlUI, patternGenerator) {\n this.pattern = pattern;\n this.controlUI = controlUI;\n this.patternGenerato...
javascript
chosen
[ { "from": "system", "value": "Add plugin api to actions\n" }, { "from": "human", "value": "var config = require('./config');\nvar utils = require('./utils');\nvar db = require('./db');\nvar server = require('./server');\n\nmodule.exports = {\n config,\n utils,\n db,\n server\n};\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Use the module name as the module name rather than its object.\n" }, { "from": "human", "value": "import React from 'react';\nimport Match from 'react-router/Match';\nimport { connectFor } from '@folio/stripes-connect';\nimport { modules } from 'stripes-loader!';\n\...
javascript
chosen
[ { "from": "system", "value": "Fix windows path seperator for templates\n\n`rmExt` contained code to fix path separators, but it wasn't being used for templates. This fixes the path separators specifically for templates.\r\n\r\nHaving this in two places isn't a great idea, but neither is fixing path separato...
javascript
chosen
[ { "from": "system", "value": "Upgrade code for uses new api redux-logger\n" }, { "from": "human", "value": "import { compose, createStore, applyMiddleware } from 'redux';\nimport { devTools } from 'redux-devtools';\nimport rootReducer from '../reducers';\nimport thunkMiddleware from 'redux-thunk...
javascript
chosen
[ { "from": "system", "value": "Add color for Online swatch in table.\n" }, { "from": "human", "value": "export const statusColors = {\n cancelled: '#E83636',\n postponed: '#F9D95F',\n happening: '#7DF95F',\n noInfo: '#555'\n}\n" }, { "from": "gpt", "value": "export const statusCol...
javascript
chosen
[ { "from": "system", "value": "Tweak resend button for acceptance testing\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../../templates/components/nypr-accounts/resend-button';\nimport fetch from 'fetch';\nimport { task, timeout } from 'ember-concurrency';\nim...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary Loading in math previews\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport Loading from 'main/components/Loading';\nimport styles from './styles.css';\n\nexport default () => (\n <div className={styles.wrapper}...
javascript
chosen
[ { "from": "system", "value": "Hide 'other' activity on ui.\n" }, { "from": "human", "value": "'use strict';\n\n(function(isNode, isAngular) {\n\n var activities = [\n {name: 'bike', textOver: 'Велосипед'},\n {name: 'running', textOver: 'Бег'},\n {name: 'workout', textOver: 'Workout'},\...
javascript
chosen
[ { "from": "system", "value": "Use OC.webroot instead of calculating the URL\n\nCalculating the URL is error-prone as it doesn't work when for example `public.php` is requested and might even be harmful as it could leak sensitive information.\n\nSince `oc.js` is even available when maintenance mode is availa...
javascript
chosen
[ { "from": "system", "value": "Adjust code to allow use of Strict Mode\n\nReplaced use of Dojo's inherited method with plain JavaScript." }, { "from": "human", "value": "define(\n\t[\n\t\t\"dojo/_base/declare\",\n\t\t\"dojo/Evented\",\n\t\t\"dijit/layout/ContentPane\"\n\t],\n\tfunction (declare, ...
javascript
chosen
[ { "from": "system", "value": "Update usage of eslints dotnotation rule\n" }, { "from": "human", "value": "var REGEX = require('../regex');\n\nmodule.exports = function(context) {\n\treturn {\n\t\tMemberExpression: function(node) {\n\t\t\tvar propertyValue = node.property.value;\n\t\t\tvar proper...
javascript
chosen
[ { "from": "system", "value": "Allow named function in `prefer-arrow-callback`\n\nhttps://eslint.org/docs/rules/prefer-arrow-callback#allownamedfunctions\n" }, { "from": "human", "value": "'use strict';\nconst path = require('path');\n\nmodule.exports = {\n\textends: path.join(__dirname, 'index.j...
javascript
chosen
[ { "from": "system", "value": "Add label for video model.\n" }, { "from": "human", "value": "/**\n * Model for video.\n */\n\n'use strict';\n\n/**\n * Including modules.\n */\nconst mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\nconst ObjectId = Schema.Types.ObjectId;\n\nlet vi...
javascript
chosen
[ { "from": "system", "value": "Fix ETC wallet delete Api endpoint\n" }, { "from": "human", "value": "// @flow\nimport { request } from './lib/request';\nimport { ETC_API_HOST, ETC_API_PORT } from './index';\n\nexport type DeleteEtcAccountBalanceResponse = boolean;\n\nexport const deleteEtcAccount...
javascript
chosen
[ { "from": "system", "value": "Revert \"file system 1. versuch\"\n\nThis reverts commit ad743e14e70eaa51d123295a6fd4c05133718693.\n\nConflicts:\n\tjs/server.js\n" }, { "from": "human", "value": "var http = require('http');\nvar util = require('./util');\nvar file = require('.file_system.file');\n...
javascript
chosen
[ { "from": "system", "value": "Add summary output to simple reporter\n" }, { "from": "human", "value": "var through = require('through');\nvar readline = require('readline');\nvar util = require('util');\nvar path = require('path');\nmodule.exports = through(function(data) {\n process.stdout.c...
javascript
chosen
[ { "from": "system", "value": "Remove duplicate code; belongs to package\n" }, { "from": "human", "value": "(function () {\n\n 'use strict';\n\n MeteorSettings.setDefaults({ public: {\n blog: { defaultLocale: \"en\" }\n }});\n\n Router.configure({\n layoutTemplate: 'mainLayout'\n });\n...
javascript
chosen
[ { "from": "system", "value": "[previews] Simplify scroll position listener w/Observable\n" }, { "from": "human", "value": "import Observable from '@sanity/observable'\nimport {debounce} from 'lodash'\n\n// A useful pattern that can be re-used probably\nfunction createListener(target, eventTypes,...
javascript
chosen
[ { "from": "system", "value": "Allow to override a registered Node class.\n" }, { "from": "human", "value": "import { Registry } from '../util'\n\n/*\n Registry for Nodes.\n\n @class NodeRegistry\n @extends util/Registry\n */\nclass NodeRegistry extends Registry {\n /**\n Register a Node c...
javascript
chosen
[ { "from": "system", "value": "Fix for breaking change in Torii\n" }, { "from": "human", "value": "import Authenticator from 'ttz/authenticators/slack';\n\nexport default {\n name: 'slack-torii',\n before: 'simple-auth',\n after: 'torii',\n initialize(container, application) {\n let torii ...
javascript
chosen
[ { "from": "system", "value": "Add bug fix and oversights\n" }, { "from": "human", "value": "var NodeHelper = require(\"node_helper\");\nconst exec = require('child_process').exec;\n\nmodule.exports = NodeHelper.create({\n\n\n socketNotificationReceived: function(notification) {\n if (notific...
javascript
chosen
[ { "from": "system", "value": "CRM-4487: Add handle loaded content to calendar event form view\n" }, { "from": "human", "value": "define([\n 'jquery',\n 'oroui/js/mediator',\n 'oroui/js/app/views/base/view',\n 'oroform/js/app/views/datepair-view'\n], function($, mediator, BaseView, Da...
javascript
chosen
[ { "from": "system", "value": "Fix clear order in castAttribute\n" }, { "from": "human", "value": "'use strict';\n\nvar isCallable = require('es5-ext/object/is-callable')\n , isAttr = require('../../attr/is-attr')\n , element = require('../valid-element');\n\nmodule.exports = function (n...
javascript
chosen
[ { "from": "system", "value": "Add regex to validate email in user schema\n" }, { "from": "human", "value": "var mongoose = require('mongoose'),\n urlFormatter = require('../../app/models/url_formatter.server.model'),\n Schema = mongoose.Schema;\n \nvar UserSchema = new Schema({\n fir...
javascript
chosen
[ { "from": "system", "value": "Test - Is GET tasks returning json object\n" }, { "from": "human", "value": "var chai = require('chai');\nvar expect = chai.expect;\n\nvar Server = require('./../src/server');\n\ndescribe('Server', function(){\n it('getTasksOfTheDayList() should return 0', function...
javascript
chosen
[ { "from": "system", "value": "[fix] Handle errors from the incoming stream.\n" }, { "from": "human", "value": "/*\n * tar-stream.js: Checkout adapter for a tar stream.\n *\n * (C) 2012 Bradley Meck.\n * MIT LICENSE\n *\n */\n\nvar tar = require('tar');\n\n//\n// ### function download (source, ca...
javascript
chosen
[ { "from": "system", "value": "Update date prop name now that we're proxying\n" }, { "from": "human", "value": "// @flow\n\nimport * as React from 'react'\nimport moment from 'moment-timezone'\nimport {Alert} from 'react-native'\nimport {Column, Row} from '../components/layout'\nimport {ListRow, ...
javascript
chosen
[ { "from": "system", "value": "Fix bug 'error when add new image'\n" }, { "from": "human", "value": "import gulp from 'gulp';\nimport plumber from 'gulp-plumber';\nimport filter from 'gulp-filter';\nimport changed from 'gulp-changed';\nimport imagemin from 'gulp-imagemin';\nimport { plumberConfig...
javascript
chosen
[ { "from": "system", "value": "Put the version in the branch name to avoid potential conflicts with multiple updates to the same project" }, { "from": "human", "value": "import env from '../config/environment'\nimport GitHub from '../lib/github'\nimport Repo from '../lib/repo'\n\nfunction ha...
javascript
chosen
[ { "from": "system", "value": "Add `rejectUnknown` option to body parser.\r\n\r\nDefaults to `true`. Makes the behavior introduced in c7c7d4e33e19f5541d8e1e7ec5a06ba6cfb316ec optional, by explicitly setting `false`." }, { "from": "human", "value": "// Copyright 2012 Mark Cavage, Inc. All rights ...
javascript
chosen
[ { "from": "system", "value": "Hide dropdown when clicking on it one more time" }, { "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 AssetPage.in...
javascript
chosen
[ { "from": "system", "value": "Simplify songItem display and show duration\n" }, { "from": "human", "value": "import React from 'react'\nimport classes from './SongItem.css'\n\nexport const SongItem = (props) => (\n <div onClick={props.onSelectSong} className={classes.container + (props.isQueued...
javascript
chosen
[ { "from": "system", "value": "Add option to shuffle safely (at most N/2 fixed points)." }, { "from": "human", "value": "var RandomGenerator = function(initialSeed) {\n\n this.reset = function(seed) {\n this.initialSeed = seed;\n this.counter = (seed % 1000003 + 1) * 4751;\n };\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add some links for STS\n" }, { "from": "human", "value": "// --------------------------------------------------------------------------------------------------------------------\n//\n// sts-config.js - config for AWS Security Token Service\n//\n// Copyright (c) 2012...
javascript
chosen
[ { "from": "system", "value": "Fix broken webpack build for embroider tests\n\nReason is still unclear, did only happen when transpiling code for IE11, that's why it only happened in CI (where `CI=true` is set).\n" }, { "from": "human", "value": "'use strict';\n\nconst browsers = [\n 'last 1 Chr...
javascript
chosen
[ { "from": "system", "value": "Include source link for range directive\n" }, { "from": "human", "value": "angular.module('ic')\n\n .filter('range', function() {\n return function(input, total) {\n total = parseInt(total);\n for (var i=1; i<=total; i++)\n input.push(i);\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary service from route\n\nLeftover from hacking.\n" }, { "from": "human", "value": "import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport config from 'hyperchannel/config/environment';\nimport { alias }...
javascript
chosen
[ { "from": "system", "value": "Improve speed of targeting by removing unecessary asset updates\n" }, { "from": "human", "value": "import { Component } from \"react\";\nimport { withApollo } from \"react-apollo\";\nimport gql from \"graphql-tag\";\n\nconst assetPath = `${window.location.protocol}/...
javascript
chosen
[ { "from": "system", "value": "Update eslint config to use longer lines\n" }, { "from": "human", "value": "module.exports = {\n root: true,\n extends: \"airbnb-base\",\n settings: {\n \"import/resolver\": \"webpack\"\n },\n env: {\n \"browser\": true,\n \"node\": true\n },\n rules...
javascript
chosen
[ { "from": "system", "value": "Fix \"Path must be a string\" issue with jslint\n" }, { "from": "human", "value": "\nmodule.exports = function (grunt) {\n\n var DEV = \"production\" !== process.env.NODE_ENV;\n var PUBLIC_DEST = \"../public\";\n\n require('matchdep').filterDev('grunt-*').forEach...
javascript
chosen
[ { "from": "system", "value": "Set default account for deployments to main net.\n" }, { "from": "human", "value": "module.exports = {\n migrations_directory: \"./migrations\",\n networks: {\n development: {\n host: \"localhost\",\n port: 8545,\n netwo...
javascript
chosen
[ { "from": "system", "value": "Allow repo:tag arg to this example\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n/*\n * 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 o...
javascript
chosen
[ { "from": "system", "value": "Remove now useless query string in DuckDuckGo example" }, { "from": "human", "value": "module.exports = {\n\tbaseURL: 'https://duckduckgo.com/?kad=en_GB',\t// you don't need to add any query string to test your own website\n\t\t\t\t\t\t\t\t\t\t\t\t\t// passing the l...
javascript
chosen
[ { "from": "system", "value": "Include dimensions in rendered canvas" }, { "from": "human", "value": "var canvas;\n\nfunction createCanvas(width, height) {\n if (!canvas) {\n canvas = document.createElement('canvas');\n document.body.appendChild(canvas);\n }\n\n canvas.width = width;\n ...
javascript
chosen