conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add test suite for f-account component\n" }, { "from": "human", "value": "import { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('f-account', 'Integration | Component | f account', {\n integratio...
javascript
chosen
[ { "from": "system", "value": "Exclude cafes from place list\n" }, { "from": "human", "value": "import View from '../base/view';\nimport Feed from '../models/feed';\nimport {capfirst} from '../utils';\n\nimport FeedView from './feed-view';\n\nimport itemTemplate from '../../templates/feed-place.e...
javascript
chosen
[ { "from": "system", "value": "Add console.log to logs in RA with staging db\n" }, { "from": "human", "value": "const _ = require('lodash');\nconst TYPES_OF_ASSESSMENT_NEEDING_USER = ['PLACEMENT', 'CERTIFICATION'];\nconst { ObjectValidationError } = require('../errors');\n\nclass Assessment {\n\n...
javascript
chosen
[ { "from": "system", "value": "Tag API: Primary Document Format\n\nCloses #2605\n\n- Change tags browse() response to { tags: [...] }\n- Update client side collection to use nested tags document\n- Update test references to use response.tags\n" }, { "from": "human", "value": "/*global Ghost */\n(...
javascript
chosen
[ { "from": "system", "value": "Update permission to show course detail for teachers\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(app) {\n var users = require('../../app/controllers/users.server.controller');\n var courses = require('../../app/controllers/courses...
javascript
chosen
[ { "from": "system", "value": "Change display from updatedAt.toDateString to pushedAt.toTimeString\n" }, { "from": "human", "value": "import React from 'react';\nimport GithubAPI from '../../api/githubAPI';\n\nclass HomePage extends React.Component {\n constructor(props, context) {\n super(pr...
javascript
chosen
[ { "from": "system", "value": "Fix exception when one error is thrown during startup\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar argv = require('minimist')(process.argv.slice(2));\nvar injection = require('./services/injection');\nvar _ = require('lodash');\n\nvar port = argv.po...
javascript
chosen
[ { "from": "system", "value": "Add local for htmlLang into template\n" }, { "from": "human", "value": "module.exports = {\n assetPath: '{{govukAssetPath}}',\n afterHeader: '{{$afterHeader}}{{/afterHeader}}',\n bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}',\n bodyEnd: '{{$bodyEnd}}{{/bodyEnd...
javascript
chosen
[ { "from": "system", "value": "Add informational message when running server\n" }, { "from": "human", "value": "let http = require('http');\nlet url = require('url');\nlet fs = require('fs');\n\nhttp.createServer(function (req, res) {\n let q = url.parse(req.url, true);\n let filename = \"a...
javascript
chosen
[ { "from": "system", "value": "Remove `max-len` rule and fall back to AirBnb's (100 char)\n" }, { "from": "human", "value": "module.exports = {\n rules: {\n // enforce spacing inside array brackets\n 'array-bracket-spacing': [ 'error', 'always', {\n objectsInArrays: false,\n arra...
javascript
chosen
[ { "from": "system", "value": "Test with data from real localisation\n" }, { "from": "human", "value": "var expect = require('chai').expect;\nvar storage = require('../storage');\nvar utility = require('../utility');\n\ndescribe('text.localize', function() {\n var text = new storage.Localizabl...
javascript
chosen
[ { "from": "system", "value": "Adjust bindResource and allow integer query\n" }, { "from": "human", "value": "'use strict'\n\nconst resources = require('../resources')\nconst querySyntax = require('./querySyntax')\n\nmodule.exports = (propToBind, dispatch) => {\n resources.forEach(resource => {\...
javascript
chosen
[ { "from": "system", "value": "Add comment explaining what test task is\n" }, { "from": "human", "value": "var gulp = require('gulp')\nvar connect = require('gulp-connect')\nvar browserify = require('browserify')\nvar source = require('vinyl-source-stream');\nvar gulp = require('gulp');\nvar moch...
javascript
chosen
[ { "from": "system", "value": "Break chaining into different lines and change string to single quotes\n\n* Keep styling in file consistent..\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar browserify = require('browserify');\nvar source = require('vinyl-source-stream');\nvar i...
javascript
chosen
[ { "from": "system", "value": "Build gulp task for generating css and js" }, { "from": "human", "value": "var gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar sass = require('gulp-sass');\nvar minifyCSS = require('gulp-minify-css');\nvar uglify = requir...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"Revert \"Revert \"Revert \"Revert \"Revert \"kein editor\"\"\"\"\"\"\"\n\nThis reverts commit 6795b41f5129310bfe89df0ca9bb904b00913597.\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport ReactDOM from 'react-dom';\...
javascript
chosen
[ { "from": "system", "value": "QS-935: Rename compare route to use definitive one as 'compare'\n" }, { "from": "human", "value": "import { fetchAnswers, fetchQuestion, fetchComparedAnswers, postAnswer, postSkipQuestion } from '../utils/APIUtils';\n\nexport function getAnswers(url = `answers`){\n ...
javascript
chosen
[ { "from": "system", "value": "Use padding instead of margin for x-axis.\n\nThe overflow: hidden; property on the wrapper isn't taking margin into\naccount for the x-axis. By using padding instead, the x-axis overflow\nis correctly hidden.\n" }, { "from": "human", "value": "import React from 'rea...
javascript
chosen
[ { "from": "system", "value": "Allow going back up by clicking navigation toggle again\n" }, { "from": "human", "value": "document.addEventListener('DOMContentLoaded', () => {\n setTimeout(window.browserCheck, 1000);\n\n window.setupGol();\n window.navUpdate(true);\n window.setupLaptops();\n\...
javascript
chosen
[ { "from": "system", "value": "Revert it to the last state before the update" }, { "from": "human", "value": "/**\n * The LandRights layer module.\n *\n * @return LandRightsLayer class (extends CartoDBLayerClass)\n */\ndefine([\n 'abstract/layer/CartoDBLayerClass',\n 'text!map/cartocss/land_rig...
javascript
chosen
[ { "from": "system", "value": "Add route test for branch groups and set to use spec helper\n" }, { "from": "human", "value": "'use strict';\n\nlet request = require('supertest-as-promised');\nconst instance_url = process.env.INSTANCE_URL;\nlet app;\n\nlet listOfBranches = (res) => {\n if (!('b...
javascript
chosen
[ { "from": "system", "value": "Change path to reference preview\n" }, { "from": "human", "value": "import {materializeReference} from '../data/fetch'\nimport {ReferencePreview} from '../../..'\n\nexport default ReferencePreview.create(materializeReference)\n" }, { "from": "gpt", "valu...
javascript
chosen
[ { "from": "system", "value": "Allow multiple files to be loaded via eject\n" }, { "from": "human", "value": "export async function genArrayBufferFromFileReference(fileReference) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = function(e) ...
javascript
chosen
[ { "from": "system", "value": "CB-6465: Add license headers to Tizen code\n" }, { "from": "human", "value": "(function(win) {\n var cordova = require('cordova'),\n Acceleration = require('org.apache.cordova.device-motion.Acceleration'),\n accelerometerCallback = null;\n\n modu...
javascript
chosen
[ { "from": "system", "value": "Fix test, showStats was not added to test yet.\n" }, { "from": "human", "value": "'use strict';\n\ndescribe('pointcloud.service', function() {\n\n // load the module\n beforeEach(module('pattyApp.pointcloud'));\n\n var PointcloudService;\n var Potree;\n beforeE...
javascript
chosen
[ { "from": "system", "value": "Change selector to outside onclik event\n" }, { "from": "human", "value": "const basketItemViews = {\n remove: function remove(el) {\n el.addEventListener(\"click\", function() {\n el.parentNode.remove();\n });\n },\n\n addToBasket: function addToBaske...
javascript
chosen
[ { "from": "system", "value": "Handle when App.rootElement can be a node, rather than an id\n" }, { "from": "human", "value": "/*globals document */\nlet hasDOM = typeof document !== 'undefined';\n\nfunction appendContainerElement(rootElementId, id) {\n if (!hasDOM) {\n return;\n }\n\n if (...
javascript
chosen
[ { "from": "system", "value": "Remove debug code left by mistake\n" }, { "from": "human", "value": "(function () {\n var codes = [\n 38, // up\n 38, // up\n 40, // down\n 40, // down\n 37, // left\n 39, // right\n 37, // left\n 39, // right\n 66, // b\n 65 // a\n ...
javascript
chosen
[ { "from": "system", "value": "Remove authrisation token from requests\n" }, { "from": "human", "value": "/*\n Bootstrap components and api on DOM Load\n*/\n\nimport Relay from 'react-relay';\nimport {\n mountComponents,\n unmountComponents,\n} from './utils/componentMounter';\n\n/* global Tur...
javascript
chosen
[ { "from": "system", "value": "Add katex as an angular constant\n" }, { "from": "human", "value": "/*!\n * angular-katex v0.2.1\n * https://github.com/tfoxy/angular-katex\n *\n * Copyright 2015 Tomás Fox\n * Released under the MIT license\n */\n\n(function() {\n 'use strict';\n\n angular.module...
javascript
chosen
[ { "from": "system", "value": "[FEATURE] Add routes for login, registration and user admin\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('publicApp', [\n 'ngCookies',\n 'ngResource',\n 'ngSanitize',\n 'ngRoute'\n])\n .config(function ($routeProvider) {\n $routeProvide...
javascript
chosen
[ { "from": "system", "value": "Fix typo in compat mode attrs test.\n" }, { "from": "human", "value": "import View from \"ember-views/views/view\";\nimport { runAppend, runDestroy } from \"ember-runtime/tests/utils\";\nimport compile from \"ember-template-compiler/system/compile\";\nimport Registr...
javascript
chosen
[ { "from": "system", "value": "Add session key to config and update api key\n" }, { "from": "human", "value": "'use strict';\n\nlet config = {};\n\nconfig.port = 3000;\nconfig.apiKey = process.env.LFM_API_KEY;\nconfig.apiSecret = process.env.LFM_SECRET;\n\nmodule.exports = config;\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"add missing worker-php for ace editor\"\"\n" }, { "from": "human", "value": "//= require jquery\n//= require jquery_ujs\n//= require turbolinks\n//= require foundation\n\n//= require ace/ace\n//= require ace/mode-ruby\n//= require ace/mode-golang\n...
javascript
chosen
[ { "from": "system", "value": "Migrate content repo to @isaacphysics\n" }, { "from": "human", "value": "'use strict';\n\ndefine([\"angular\", \"app/services/LoginChecker\", \"app/services/FileLoader\", \"app/services/FigureUploader\", \"app/services/SnippetLoader\", \"app/services/TagLoader\", \"...
javascript
chosen
[ { "from": "system", "value": "Add key* functions to Graphics backend\n" }, { "from": "human", "value": "document.write(\"<canvas>\")\nvar Graphics = new Processing(document.querySelector('canvas'));" }, { "from": "gpt", "value": "document.write(\"<canvas>\")\nvar Graphics = new Proce...
javascript
chosen
[ { "from": "system", "value": "Add comments for cash input.\n" }, { "from": "human", "value": "importScripts('/js/sha256.js');\n\nonmessage = function(e) {\n console.log('received work!');\n\n var date = (new Date()).yyyymmdd();\n var bits = 0;\n var rand = Math.random().toString(36).replace(...
javascript
chosen
[ { "from": "system", "value": "Allow startup without setting GCM API key\n" }, { "from": "human", "value": "// Use the web-push library to hide the implementation details of the communication\n// between the application server and the push service.\n// For details, see https://tools.ietf.org/html...
javascript
chosen
[ { "from": "system", "value": "Fix word search returning the index instead of whether the word exists.\n" }, { "from": "human", "value": "var Dictionary = function() {\n var jsonURL = './json/dictionary.json';\n\n this._wordList = (function() {\n var json = null;\n $.ajax({\n 'async'...
javascript
chosen
[ { "from": "system", "value": "Change window title based on current collection\n" }, { "from": "human", "value": "// CHANGE the current collection\r\nvar changeCollection=function(new_index){\r\n\tdbIndex = new_index;\r\n\timageDB = DATABASE[dbIndex];\r\n\t$(\"#collectionFooter\").text(collection...
javascript
chosen
[ { "from": "system", "value": "Update mock server path in test helper for FF and IE\n" }, { "from": "human", "value": "(function () {\n var server = sinon.fakeServer.create();\n server.xhr.useFilters = true;\n server.xhr.addFilter(function (method, url) {\n //whenever the this ret...
javascript
chosen
[ { "from": "system", "value": "Add getContent method to markup component\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport Registry from '../utils/Registry';\n\nexport default class Markup extends Component {\n render() {\n return (\n <div dangerouslySe...
javascript
chosen
[ { "from": "system", "value": "Break watch task into separate task\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n require('load-grunt-tasks')(grunt);\n\n // Add the grunt-mocha-test tasks.\n [\n 'grunt-mocha-test',\n 'grunt-contrib-watch'\n ]\n .forEach( grun...
javascript
chosen
[ { "from": "system", "value": "Copy file permissions for all files\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n copy: {\n jquery: {\n expand: true,\n ...
javascript
chosen
[ { "from": "system", "value": "Set target on dco grunt task configuration\n" }, { "from": "human", "value": "/**\n * grunt-dco\n *\n * Copyright (c) 2014 Rafael Xavier de Souza\n * Licensed under the MIT license.\n */\n\n\"use strict\";\n\nmodule.exports = function(grunt) {\n\n // Project config...
javascript
chosen
[ { "from": "system", "value": "Add unit tests back to default grunt task\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n require('load-grunt-tasks')(grunt);\n\n // Add the grunt-mocha-test tasks.\n [\n 'grunt-mocha-test',\n 'grunt-contrib-watch'\n ]\n .forEach...
javascript
chosen
[ { "from": "system", "value": "Build before every test as a way to keep builds up to date (thanks @hodgestar)\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n var paths = require('./paths');\n\n grunt.loadNpmTasks('grunt-mocha-test');\n grunt.loadNpmTasks('grunt-c...
javascript
chosen
[ { "from": "system", "value": "Include lib/* in the build command\n" }, { "from": "human", "value": "module.exports = function( grunt ) {\n\t'use strict';\n\n\t// Project configuration.\n\tgrunt.initConfig( {\n\n\t\tpkg: grunt.file.readJSON( 'package.json' ),\n\n\t\tcopy: {\n\t\t\tmain: {\n\t\t\t...
javascript
chosen
[ { "from": "system", "value": "fix(grunt-horde): Set home dir for TravisCI\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n 'use strict';\n\n require('grunt-horde')\n .create(grunt)\n .demand('projName', 'sinon-doublist')\n .demand('instanceName', 'sinonDoublist'...
javascript
chosen
[ { "from": "system", "value": "Upgrade MetaController to ES6 syntax\n" }, { "from": "human", "value": "export default class MetaController {\n constructor(PageMetadata) {\n this.meta = PageMetadata;\n }\n}\nMetaController.$inject = ['PageMetadata'];" }, { "from": "gpt", "value": ...
javascript
chosen
[ { "from": "system", "value": "Revert \"ACalc: Increased minimum and starting calculator size.\"\n\nThis reverts commit 1747c7b05b30630358a58603da0d1878cf9b2a57.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2014 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apac...
javascript
chosen
[ { "from": "system", "value": "Comment OnlinePlayer code more thoroughly\n" }, { "from": "human", "value": "import AsyncPlayer from './async-player.js';\n\n// An online player whose moves are determined by a remote human user\nclass OnlinePlayer extends AsyncPlayer {\n\n constructor({ game }) {\...
javascript
chosen
[ { "from": "system", "value": "Deal with Substance Image -> ImageNode\n" }, { "from": "human", "value": "import Image from 'substance/packages/image/Image'\nimport ImageComponent from 'substance/packages/image/ImageComponent'\nimport ImageMarkdownComponent from './ImageMarkdownComponent'\nimport ...
javascript
chosen
[ { "from": "system", "value": "Write dynamically created messages to GUI\n" }, { "from": "human", "value": "const Discord = require('discord.js'),\n client = new Discord.Client;\n\nclient.run = ctx => {\n client.on('ready', () => {\n if (client.user.bot) {\n client.destroy();\n } els...
javascript
chosen
[ { "from": "system", "value": "Add renderDOM to Jest snapshot helpers\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOMServer from 'react-dom/server';\nimport jsBeautify from 'js-beautify';\nimport * as Settings from './settings';\n\n/*\n * Render React components to ...
javascript
chosen
[ { "from": "system", "value": "Set image to null once it has finished loading\n" }, { "from": "human", "value": "define( [ \"Ember\" ], function( Ember ) {\n\n\tvar concat = [].concat;\n\tvar makeArray = Ember.makeArray;\n\n\treturn function preload( withError, list ) {\n\t\tif ( list === undefin...
javascript
chosen
[ { "from": "system", "value": "Remove active class when .list or aside is clicked.\n" }, { "from": "human", "value": "/* PSEUDO CODE FOR LOGIN MENU\n\n1. COLLECT DATA ENTERED INTO THE <INPUT>\n2. WHEN .LOGIN-SUBMIT IS 'CLICKED' `GET/users/id` TO DATABASE TO BE VERIFIED?\n*/\n\n\n;(function(){\n ...
javascript
chosen
[ { "from": "system", "value": "Use value parser from parse-ecma\n" }, { "from": "human", "value": "/**\n * @fileOverview \n */\ndefine(['parse/parse',\n 'ecma/ast/value', \n 'khepri/parse/token_parser'],\nfunction(parse,\n astValue, \n token){\n\"use strict\";\n\n// Li...
javascript
chosen
[ { "from": "system", "value": "Fix issue causing contacts to list ALL interactions\n" }, { "from": "human", "value": "const winston = require('winston')\nconst authorisedRequest = require('../lib/authorisedrequest')\nconst config = require('../config')\n\nfunction getInteraction (token, interacti...
javascript
chosen
[ { "from": "system", "value": "fix: Set default value for `parseSectionName` name\n\nOtherwise this can lead to concat with `undefined` which results in\n`undefined`. This needs better tests.\n" }, { "from": "human", "value": "const _ = require('lodash');\n\nmodule.exports = function parseSection...
javascript
chosen
[ { "from": "system", "value": "Move pattern matching to the top\n" }, { "from": "human", "value": "function filterF(i, el) {\n var pattern = /(From|To|Subject|Cc|Date):/i;\n return el.textContent.match(pattern);\n}\n\n$($(\"blockquote\").get().reverse()).each(function(i, el) {\n var contents =...
javascript
chosen
[ { "from": "system", "value": "Revert \"tests: Use exports syntax directly\"\n\nThis reverts commit 5c2697713268ad03612e93d1c0b285a9b7f9986e.\n" }, { "from": "human", "value": "import sinon from 'sinon';\nimport config from '../config.default.json';\nimport DataStoreHolder from '../lib/data-store...
javascript
chosen
[ { "from": "system", "value": "Call destroyApp after afterEach options\n\nAs discussed in #5348, destroyApp() should be\ncalled after options.afterEach.apply(...).\n" }, { "from": "human", "value": "import { module } from 'qunit';\nimport startApp from '../helpers/start-app';\nimport destroyApp f...
javascript
chosen
[ { "from": "system", "value": "Fix flexBasis property for IE" }, { "from": "human", "value": "/* @flow */\nconst alternativeValues = {\n 'space-around': 'distribute',\n 'space-between': 'justify',\n 'flex-start': 'start',\n 'flex-end': 'end'\n}\nconst alternativeProps = {\n alignContent: 'ms...
javascript
chosen
[ { "from": "system", "value": "Fix broken select all command.\n" }, { "from": "human", "value": "'use strict';\n\nvar Command = require('./command');\n\nvar SelectAll = Command.extend({\n static: {\n name: 'selectAll'\n },\n\n execute: function() {\n var ctrl = this.getController();\n ...
javascript
chosen
[ { "from": "system", "value": "[ReactNative] Remove all the flow errors\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directo...
javascript
chosen
[ { "from": "system", "value": "Use explicit json url on user autocomplete\n" }, { "from": "human", "value": "$(function () {\n $.get(\"/point_types.json\", function (typeList) {\n $(\"#point_type\").autocomplete({\n source: typeList, delay: 0, minLength: 0, autoFocus: true\n });\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add a quick hack for broken Iltalehti titles\n\nNeeds more testing.\n" }, { "from": "human", "value": "$(function() {\n // Body headings\n $('h1.juttuotsikko span.otsikko:last-of-type').satanify();\n\n // Left\n $('#container_vasen p a:not(.palstakuva)').satanif...
javascript
chosen
[ { "from": "system", "value": "Make it cleaner to read\n" }, { "from": "human", "value": "/* @flow */\nvar React = require('react');\nvar FlexCell: any = require('./FlexCell.react');\nvar FlexDetail = require('./FlexDetail.react');\n\nclass FlexGrid extends React.Component{\n state: {detail: s...
javascript
chosen
[ { "from": "system", "value": "Create closure around enclosing object instead of local variables referencing enclosing object properties.\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2015 Steven Soloff\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy...
javascript
chosen
[ { "from": "system", "value": "Check if request is a built-in module\n" }, { "from": "human", "value": "var Module = require('module')\nvar path = require('path')\nvar fs = require('fs')\n\nfunction exists (target, extensions) {\n if (fs.existsSync(target)) {\n return target\n }\n\n if (pat...
javascript
chosen
[ { "from": "system", "value": "Swap key and options params to correct order in fxo validators functions.\n" }, { "from": "human", "value": "'use strict';\n\nvar validate = require('validate.js');\n\nvar validateFxoObject = function(type, value, key, options) {\n if(options.required) {\n if(!v...
javascript
chosen
[ { "from": "system", "value": "Use current element for widget instead" }, { "from": "human", "value": "'use strict';\n\n/**\n * @ngdoc directive\n * @name angular-uploadcare.directive:UploadCare\n * @description Provides a directive for the Uploadcare widget.\n * # UploadCare\n */\nangular.module...
javascript
chosen
[ { "from": "system", "value": "fix(test): Use force true for clicking menu\n" }, { "from": "human", "value": "context('Form', () => {\n\tbefore(() => {\n\t\tcy.login('Administrator', 'qwe');\n\t\tcy.visit('/desk');\n\t});\n\n\tit('add custom column in report', () => {\n\t\tcy.visit('/desk#query-r...
javascript
chosen
[ { "from": "system", "value": "Remove JQuery from EnableAriaControls module\n\nWe're using an old and unsupported version of jQuery for browser support\nreasons. Rather than upgrade, it's far better to remove our dependence.\n\njQuery makes writing JavaScript easier, but it doesn't do anything that\nyou can'...
javascript
chosen
[ { "from": "system", "value": "Make the locations view the homepage\n\nThis is our main base.\n" }, { "from": "human", "value": "/* ---------------------------------------------------- +/\n\n## Client Router ##\n\nClient-side Router.\n\n/+ ---------------------------------------------------- */\n...
javascript
chosen
[ { "from": "system", "value": "Remove support for parsing legacy interfaces\n\nReviewed By: kassens\n\nDifferential Revision: D6972027\n\nfbshipit-source-id: 6af12e0fad969b8f0a8348c17347cec07f2047b2\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This...
javascript
chosen
[ { "from": "system", "value": "[DDW-608] Implement new About dialog design\n" }, { "from": "human", "value": "// @flow\nimport React, { Component } from 'react';\nimport { inject, observer } from 'mobx-react';\nimport ReactModal from 'react-modal';\nimport About from '../../components/static/Abou...
javascript
chosen
[ { "from": "system", "value": "Set %%cpp highlighting for root --notebook\n" }, { "from": "human", "value": "/* JupyROOT JS */\n\n// Terminal button\n$(document).ready(function() {\n var terminalURL = \"/terminals/1\";\n var re = new RegExp(\".+\\/user\\/([a-z0-9]+)\\/.+\", \"g\");\n if ...
javascript
chosen
[ { "from": "human", "value": "Add basic outline to Backbone question view\n-define template\n-empty events\n-empty initialize\n-empty render\n" }, { "from": "gpt", "value": "app = app || {};\n\napp.QuestionView = Backbone.View.extend({\n\n template: _.template( $('#question_template').html() ),\...
javascript
chosen
[ { "from": "system", "value": "Use buffer() instead of arrayBuffer()\n" }, { "from": "human", "value": "import fetch from '../io/fetch.js'\nimport decodeBuffer from './decode-buffer.js'\n\nexport default function loadData3d (url, options) {\n return fetch(url, options).then(function(res){\n r...
javascript
chosen
[ { "from": "system", "value": "Add config object to JSON schema.\n" }, { "from": "human", "value": "export default {\n \"defs\": {\n \"spec\": {\n \"title\": \"Vega visualization specification\",\n \"type\": \"object\",\n \"allOf\": [\n {\"$ref\": \"#/defs/scope\"},\n ...
javascript
chosen
[ { "from": "system", "value": "Update SettingsCtrl test after EvaluationSettings changes\n\ngit-svn-id: https://svn.apache.org/repos/asf/incubator/climate/trunk@1504017 13f79535-47bb-0310-9956-ffa450edef68\n\nFormer-commit-id: 92957b0f0e6bba13073b75fe9692f1b1b425f626" }, { "from": "human", "value...
javascript
chosen
[ { "from": "system", "value": "Update REST adapter to work with loopback errors\n" }, { "from": "human", "value": "import DS from 'ember-data';\nimport Ember from 'ember';\n\nexport default DS.RESTAdapter.extend({\n defaultSerializer: 'ember-loopback/serializers/ember-loopback',\n\n /**\n * S...
javascript
chosen
[ { "from": "system", "value": "Use length instead of property iteration\n" }, { "from": "human", "value": "/* global exports */\n\"use strict\";\n\n// module Data.Foreign\n\n// jshint maxparams: 3\nexports.parseJSONImpl = function (left, right, str) {\n try {\n return right(JSON.parse(str));\...
javascript
chosen
[ { "from": "system", "value": "Clean up spacing + use document ready\n" }, { "from": "human", "value": "jQuery.fn.extend({\n coverVid: function(width, height) {\n\n var $this = this;\n\n $(window).on('resize load', function(){\n\n // Get parent element height and width\n var pare...
javascript
chosen
[ { "from": "system", "value": "Fix infinite scrolling in firefox\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('webClientApp')\n .directive('scrollSpy', ['$window', '$interval',\n function ($window, $interval) {\n var didScroll;\n var lastScroll = 0;\n\n return...
javascript
chosen
[ { "from": "system", "value": "Remove task completion callback from the `coverage` task\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n istanbul = require('gulp-istanbul'),\n jasmine = require('gulp-jasmine'),\n jshint = require('gulp-jshint'),\n plumber = require('gu...
javascript
chosen
[ { "from": "system", "value": "Rename bootstrap-sass Gulp task to 'sass'\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar sass = require('gulp-sass');\n\n// Common paths.\nvar paths = {\n BootstrapSCSS: 'priv/assets/bootstrap-custom/bootstrap-custom.scss',\n BootstrapIncl...
javascript
chosen
[ { "from": "system", "value": "Use replaceWith to redirect to dashboard on login\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n beforeModel: function() {\n this.transitionTo('dashboard');\n }\n});\n" }, { "from": "gpt", "val...
javascript
chosen
[ { "from": "system", "value": "Fix typo in template definition\n" }, { "from": "human", "value": "function maReferenceManyField(ReferenceRefresher) {\n 'use strict';\n\n return {\n scope: {\n 'field': '&',\n 'value': '=',\n 'entry': '=?',\n ...
javascript
chosen
[ { "from": "system", "value": "Clone the element without using addons\n" }, { "from": "human", "value": "let { isArray } = require('../mindash');\nlet findApp = require('../core/findApp');\n\nmodule.exports = function (React) {\n let ApplicationContainer = React.createClass({\n childContextTy...
javascript
chosen
[ { "from": "system", "value": "Add basic page1 2 with routing\n" }, { "from": "human", "value": "function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) {\n 'ngInject';\n\n $locationProvider.html5Mode(true);\n\n $stateProvider\n .state('Home', {\n url: '/',\n controller...
javascript
chosen
[ { "from": "system", "value": "Revert regression by capitalizing constructor again\n" }, { "from": "human", "value": "/* eslint-disable no-new-func */\n'use strict';\n\n/**\n* Test if the global scope is bound to the \"window\" variable present in browser environments. When creating a new functio...
javascript
chosen
[ { "from": "system", "value": "Use $log in error service\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular.module('chaise.errors', [])\n\n // Factory for each error type\n .factory('ErrorService', [function ErrorService() {\n\n function error409(error...
javascript
chosen
[ { "from": "system", "value": "Revert \"finished backend for healthify\"\n\nThis reverts commit 6903c2baf7a2716f81add8fcc3b3dd42b1dfb65e.\n\nTrying to fix nodemon crash\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies.\n */\nvar recipesPolicy = require('../policies/...
javascript
chosen
[ { "from": "system", "value": "Update test: sort arraies before expecting\n" }, { "from": "human", "value": "var prepare = require('../../lib/prepare');\nvar expect = require('expect');\n\nvar samples = {\n 'copy': {\n 'assets': require('../samples/copy/assets'),\n 'report': require('../sa...
javascript
chosen
[ { "from": "system", "value": "Add getLanguage method to languages mixin.\n\nThis is more suitable for passing to JST template\n" }, { "from": "human", "value": "window.ModelWithLanguageMixin = {\n\n LANGUAGE_CHOICES: {\n en: 'English',\n es: 'Spanish',\n hi: 'Hindi',\n pt: '...
javascript
chosen
[ { "from": "system", "value": "Fix initial user rating display\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n model(params) {\n return Ember.RSVP.hash({\n movie: Ember.$.getJSON(\"https://api.themoviedb.org/3/movie/\" + ...
javascript
chosen
[ { "from": "system", "value": "Fix dev port at 3000 again\n" }, { "from": "human", "value": "const path = require('path')\nconst NODE_ENV = process.env.NODE_ENV || 'production'\nconst KF_USER_PATH = process.env.KF_USER_PATH || __dirname\nconst KF_SERVER_PORT = parseInt(process.env.KF_SERVER_PORT,...
javascript
chosen