conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add pass message to test script\n"
},
{
"from": "human",
"value": "//-------------------------------------------------------------------------------------------------------\r\n// Copyright (C) Microsoft. All rights reserved.\r\n// Licensed under the MIT license. See... | javascript | chosen |
[
{
"from": "system",
"value": "Replace .map with .some, get rid of intermediate array\n"
},
{
"from": "human",
"value": "import { enqueueRender } from './component';\n\nexport let i = 0;\n\n/**\n *\n * @param {any} defaultValue\n */\nexport function createContext(defaultValue) {\n\tlet context = ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow user to specify id for config\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar Objectid = mongoose.Schema.Types.ObjectId;\n\nvar ConfigSchema = new Schema({\n\tname: { type: String, unique... | javascript | chosen |
[
{
"from": "system",
"value": "Fix replace of undefined error\n"
},
{
"from": "human",
"value": "import rootDomain from '../../../lib/rootDomain';\n\nexport function isPostNSFW(post) {\n if (!post || !post.title) {\n return false;\n }\n\n return !!post.title.match(/nsf[wl]/gi) || post.over_... | javascript | chosen |
[
{
"from": "system",
"value": "Use headless Chrome for testing\n"
},
{
"from": "human",
"value": "/*jshint node:true*/\nmodule.exports = {\n \"framework\": \"qunit\",\n \"test_page\": \"tests/index.html?hidepassed\",\n \"disable_watching\": true,\n \"launch_in_ci\": [\n \"PhantomJS\"\n ],... | javascript | chosen |
[
{
"from": "system",
"value": "Add TextEncoder polyfill for test run\n"
},
{
"from": "human",
"value": "import * as languageHandler from \"../src/languageHandler\";\n\nlanguageHandler.setLanguage('en');\nlanguageHandler.setMissingEntryGenerator(key => key.split(\"|\", 2)[1]);\n\nrequire('jest-fet... | javascript | chosen |
[
{
"from": "system",
"value": "Make it more explicit and improve instructions and group it better."
},
{
"from": "human",
"value": "// 1: template strings - basics\n// To do: make all tests pass\n\ndescribe('template string, are wrapped in backticks', function() {\n \n it('prints x into a strin... | javascript | chosen |
[
{
"from": "system",
"value": "Print server response when introspection query result does not contain data\n"
},
{
"from": "human",
"value": "// Based on https://facebook.github.io/relay/docs/guides-babel-plugin.html#using-other-graphql-implementations\n\nimport fetch from 'node-fetch';\nimport f... | javascript | chosen |
[
{
"from": "system",
"value": "Add redirect to details page after creating question\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport QuestionForm from './Form';\nimport { formValuesToRequest, responseToFormValues } from './transforms';\nim... | javascript | chosen |
[
{
"from": "system",
"value": "Use version 1.2 of TLS\n"
},
{
"from": "human",
"value": "var cp = require('child_process'),\n ps = require('ps-node'),\n Q = require('q'),\n debug = require('debug')('cheapseats'),\n phantomPath = require('phantomjs').path;\n\nvar webdriverProcess;\n\nv... | javascript | chosen |
[
{
"from": "system",
"value": "Send measurement data as msg.payload\n"
},
{
"from": "human",
"value": "/**\n* Copyright 2016 Jorne Roefs\n*\n**/\n\n\nmodule.exports = function(RED) {\n \"use strict\";\n\n var fs = require('fs');\n var child_process = require('child_process');\n\n function Ths... | javascript | chosen |
[
{
"from": "system",
"value": "Use the new way of starting the Karma server.\n"
},
{
"from": "human",
"value": "var gulp = require(\"gulp\");\nvar CFG = require(\"./utils/config.js\");\nvar $ = require(\"gulp-load-plugins\")();\nvar path = require(\"path\");\nvar pkg = require(path.join(\"..\", C... | javascript | chosen |
[
{
"from": "system",
"value": "Add text field and button\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react'\nimport { connect } from 'react-redux'\nimport signOut from '../actions/sign-out-user'\nimport FlatButton from 'material-ui/FlatButton'\n\nclass CreateGa... | javascript | chosen |
[
{
"from": "system",
"value": "Create form: prevent refresh, clean forms after enter.\n"
},
{
"from": "human",
"value": "var createBetNotification = function(bet){\n var bet = Bets.findOne({ _id: bet });\n\n BetNotifications.insert({\n toNotify: bet.bettors[1],\n betBy: bet.bettors[0]\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make HTTP method of custom routing and URL redirection case insensitive\n"
},
{
"from": "human",
"value": "import { join } from 'path';\nimport Router from 'express/lib/router';\nimport cookieMiddleware from 'universal-cookie-express';\nimport createLocaleMiddleware... | javascript | chosen |
[
{
"from": "system",
"value": "Add given / when / them\n"
},
{
"from": "human",
"value": "var http = require('http');\nvar q = require('q');\nvar request = require('request');\n\ndescribe('HTTP', function() {\n\n var encode = function(command) {\n var host = 'http://localhost:13000/testSelect... | javascript | chosen |
[
{
"from": "system",
"value": "Add size parameter to chooseTasks, in case we need it\n"
},
{
"from": "human",
"value": "\n\nvar formatData = function(restaurants) {\n var formattedData = [];\n // for each restaurant element in restaurants\n // {\n // yelpId:\n // name:\n // r... | javascript | chosen |
[
{
"from": "system",
"value": "Update the .active class on the indicators that are outside the carousel\n"
},
{
"from": "human",
"value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this file,\n * You c... | javascript | chosen |
[
{
"from": "system",
"value": "Use view class directly in routing\n"
},
{
"from": "human",
"value": "define([\n 'zepto',\n 'backbone',\n 'collections/items',\n 'collections/users',\n 'collections/likes',\n 'views/create_item_page',\n 'views/show_item_page',\n 'views/search_form_page',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix var type convention conflict\n"
},
{
"from": "human",
"value": "const config = require('../../config'),\n sparqlQueryBuilder = require('../utils/sparql-query-builder'),\n sparqlClient = require('sparql-client'),\n util = require('util');\n\n/* To ... | javascript | chosen |
[
{
"from": "system",
"value": "Change tickets page with on site first\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nimport CustomTitle from '../Cards/CustomTitle';\nimport PresalesCard from '../Cards/Tickets/PresalesCard';\nimport OnSiteCard from '../Cards/Ticket... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests Resolver creation under Ember 3.3\n"
},
{
"from": "human",
"value": "import Resolver from '../../resolver';\nimport config from '../../config/environment';\n\nconst resolver = Resolver.create();\n\nresolver.namespace = {\n modulePrefix: config.modulePrefi... | javascript | chosen |
[
{
"from": "system",
"value": "[isOpen] Add reducer into the list.\n"
},
{
"from": "human",
"value": "import { combineReducers } from 'redux';\nimport notificationList from './notifications-list';\nimport visibilityFilter from './visibility-filter';\nimport isFetching from './is-fetching';\n\n//T... | javascript | chosen |
[
{
"from": "system",
"value": "Fix attempt browserify require node module path\n"
},
{
"from": "human",
"value": "require('../../node_modules/cookieconsent/build/cookieconsent.min.js');\n\n// We're using http://cookieconsent.wpengine.com/documentation/javascript-api/\n\nwindow.cookieconsent.initi... | javascript | chosen |
[
{
"from": "system",
"value": "Change let to var for node 5 support\n"
},
{
"from": "human",
"value": "// Babel required for es6 code in e2e tests\nrequire('babel-register');\n\nlet config = {\n baseUrl: 'http://localhost:8080',\n specs: ['./src/**/*.e2e.js'],\n capabilities: {\n 'browserNa... | javascript | chosen |
[
{
"from": "system",
"value": "Stop profile links from firing on the star form\n"
},
{
"from": "human",
"value": "if (typeof (Stars) === 'undefined') {Stars = {}};\n\nStars.New = (function($) {\n var init = function() {\n setSelected();\n $('form li').click(selectUser);\n };\n\n var sele... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for memleak when user callback is not truly-async."
},
{
"from": "human",
"value": "var csv = require('binary-csv');\nvar through2 = require('through2');\n\n/**\n * Parses an input stream.\n *\n * @param {object} stream\n * @param {function} item_callback\n * @p... | javascript | chosen |
[
{
"from": "system",
"value": "Add the first cut at a function to get the x and y intercepts of a hough line.\n(Needs much testing and fixing!)"
},
{
"from": "human",
"value": "/*! This Source Code Form is subject to the terms of the Mozilla Public\n* License, v. 2.0. If a copy of the MPL was not... | javascript | chosen |
[
{
"from": "system",
"value": "Enhance flush plugin to support load dependencies and require.async modules\n"
},
{
"from": "human",
"value": "/**\n * The Sea.js plugin for collecting HTTP requests and sending all at once\n */\n(function(seajs) {\n\n var Module = seajs.Module\n var _load = Modul... | javascript | chosen |
[
{
"from": "system",
"value": "Use template string and arrow functions\n"
},
{
"from": "human",
"value": "const assert = require('assert');\nconst nativeImage = require('electron').nativeImage;\nconst path = require('path');\n\ndescribe('nativeImage module', function () {\n describe('createFromP... | javascript | chosen |
[
{
"from": "system",
"value": "Fix check for content type\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nfunction abortRequest(res) {\n res.statusCode = 415;\n res.end();\n}\n\nfunction checkContentType(acceptedTypes, encoding) {\n var actualType,\n acceptedType,\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Use Cyan color (in google's color palette)\n\naccording to zz's advice\n"
},
{
"from": "human",
"value": "import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme'\nimport {merge} from 'lodash'\n\nexport default merge(lightBaseTheme, {\n palette: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Convert the data into enny\n"
},
{
"from": "human",
"value": "var flowTypes = require(\"engine-flow-types\")\n\nflowTypes.Emit.prototype.enny = function () {\n return [];\n};\n\nflowTypes.DataHandler.prototype.enny = function () {\n return [];\n};\n\nflowTypes... | javascript | chosen |
[
{
"from": "system",
"value": "fix(components/tab): Switch label prop type to node\n\nSigned-off-by: Sorin Davidoi <26079c5830d7e64e00f1acbebee386bbb15cb990@gmail.com>\n"
},
{
"from": "human",
"value": "// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP\n\nimport React, { Compon... | javascript | chosen |
[
{
"from": "system",
"value": "Add falsey arguments check to loop condition\n"
},
{
"from": "human",
"value": "(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (... | javascript | chosen |
[
{
"from": "system",
"value": ":rewind: Revert using es6 import for axios\n\nThis reverts commit 0f04f3b3cf7281eb96fa35fc6f933998bd9ec40c.\n"
},
{
"from": "human",
"value": "import axios from 'axios';\n\nexport default itemIdentifier => axios.get(`items`, {\n baseURL: `https://track.bpost.be/btr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix scrolling to the end of the current phrase\n"
},
{
"from": "human",
"value": "/*\n -- utils.js\n This file contains generic functions for other javascript files to use.\n Like returnTime(), capitalize() etc.\n\n*/\n\n/**\n * Get unix time\n * @returns {number... | javascript | chosen |
[
{
"from": "system",
"value": "Support CORS wildcard for serverless function\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst { ApolloServer } = require('apollo-server-lambda')\nconst { UnsignedIntResolver, UnsignedIntTypeDefinition, DateTimeResolver, DateTimeTypeDefinition } = require('g... | javascript | chosen |
[
{
"from": "system",
"value": "Increase test timeout again for Travis\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar assert = require('assert');\nvar path = require('path');\nvar execFileSync = require('child_process').execFileSync;\n\nvar root = path.resolve(__dirname, '..');\nvar hook ... | javascript | chosen |
[
{
"from": "system",
"value": "Test a run with PAM250\n"
},
{
"from": "human",
"value": "var data = require('../lib/data')\nvar test = require('tape')\nvar needleman = require('../lib/index')\n\ntest('run', function (t) {\n let v = 'GCATGCU'\n let w = 'GATTACA'\n let scores = { match: +1, mism... | javascript | chosen |
[
{
"from": "system",
"value": "Add a quick test to make sure the test is loading the environment var correctly in the Travis CI environment\n"
},
{
"from": "human",
"value": "const { expect } = require('chai');\nconst Plexacious = require('../src/Plexacious');\nconst config = {\n hostname: 'mace... | javascript | chosen |
[
{
"from": "system",
"value": "Allow valued to be specified for undefined\n"
},
{
"from": "human",
"value": "Array.prototype.stride = function(callback) {\n\tvar stride_length = callback.length;\n\tvar ret = [];\n\tfor (var i=0; i<this.length; i+=stride_length) {\n\t\tret.push(callback.apply(i,th... | javascript | chosen |
[
{
"from": "system",
"value": "Rename selector variable to type\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar oust = require('../index');\nvar pkg = require('../package.json');\nvar fs = require('fs');\n\nvar argv = require('minimist')(process.argv.slice(2));\n\nvar printHelp = fu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix regeneratorRuntime missing in tests\n"
},
{
"from": "human",
"value": "module.exports = api => {\n api.cache(true);\n\n const presets = [\n [\n '@babel/preset-env',\n process.env.NODE_ENV === 'test'\n ? {}\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix value output for doc.uri URIs\n"
},
{
"from": "human",
"value": "function (doc) {\n if ('document' in doc && 'link' in doc.document) {\n emit(doc.document.link[0].href, 1);\n } else if ('uri' in doc) {\n emit(doc.uri);\n }\n}\n"
},
{
"from": "gp... | javascript | chosen |
[
{
"from": "system",
"value": "Update message processor to deal with list of messages rather than requests\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar util = require('lib/util.js');\n\nmodule.exports = {\n\tgetTypeMessages: function(request, typeOptions) {\n\t\tvar result = {};\n\t\tf... | javascript | chosen |
[
{
"from": "system",
"value": "Add public/js/app.js to watched source files\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar browserify = require('browserify');\nvar gulp = require('gulp');\nvar source = require('vinyl-source-stream');\nvar buffer = require('vinyl-buffer');\nvar uglify = r... | javascript | chosen |
[
{
"from": "system",
"value": "Add tasks for asset moving on build\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar webpack = require('webpack');\n\nvar clientConfig = require('./config/webpack.prod.client.js')\nvar serverConfig = require('./config/webpack.prod.server.js')\n\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Standardize the gulp task names (build-type-name)\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar cssmin = require('gulp-cssmin');\nvar uglify = require('gulp-uglify');\nvar nodemon = require('gulp-nodemon');\nvar gif = require('gulp-if');\n\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Use a new client ID\n"
},
{
"from": "human",
"value": "define({\n \"web\": {\n \"client_id\": \"745152835189.apps.googleusercontent.com\",\n \"client_secret\": \"notasecret\",\n \"redirect_uris\": [],\n \"auth_uri\": \"https://accounts... | javascript | chosen |
[
{
"from": "system",
"value": "Call composer from the webroot\n\ncomposer.json has been moved from /concrete/composer.json to /composer.json\n"
},
{
"from": "human",
"value": "module.exports = function(grunt, config, parameters, done) {\n\tvar workFolder = parameters.releaseWorkFolder || './relea... | javascript | chosen |
[
{
"from": "system",
"value": "Update current user from props\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react';\nimport {Table} from 'react-bootstrap';\nimport {connect} from 'react-redux';\nimport _ from 'lodash';\n\nclass UsersTable extends Component {\n\n render() {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Format date when tooltip template is used.\n"
},
{
"from": "human",
"value": "define(['moment', 'nvd3', 'underscore', 'views/chart-view'],\n function(moment, nvd3, _, ChartView) {\n 'use strict';\n\n /**\n * TrendsView renders several thread... | javascript | chosen |
[
{
"from": "system",
"value": "Fix default container limit issue\n\nhttps://github.com/rancher/rancher/issues/21664\n"
},
{
"from": "human",
"value": "import { get, set, setProperties } from '@ember/object';\nimport { hash } from 'rsvp';\nimport { inject as service } from '@ember/service';\nimpor... | javascript | chosen |
[
{
"from": "system",
"value": "Add fastRender flag to pages/:_id\n"
},
{
"from": "human",
"value": "/*****************************************************************************/\n/* Client and Server Routes */\n/*****************************************************************************/\nRou... | javascript | chosen |
[
{
"from": "system",
"value": "Create separate sourcemaps file and not include into main.css\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar sourcemaps = require('gulp-sourcemaps');\n\ngulp.task('default', ['sass']);\n\ngulp.task('sass', funct... | javascript | chosen |
[
{
"from": "system",
"value": "[example] Update the example to use results.\n"
},
{
"from": "human",
"value": "import {connect as connectToState} from 'react-redux';\nimport compose from 'lodash/flowRight';\nimport Button from './components/button';\nimport React, {Component, PropTypes} from 'rea... | javascript | chosen |
[
{
"from": "system",
"value": "Use debug module to print sql for debugging purposes\n"
},
{
"from": "human",
"value": "const BaseDataview = require('./base');\n\nconst TYPE = 'list';\n\nconst listSqlTpl = ctx => `select ${ctx._columns} from (${ctx._query}) as _cdb_list`;\n\n/**\n{\n type: 'lis... | javascript | chosen |
[
{
"from": "system",
"value": "Extend task list to a nested view\n"
},
{
"from": "human",
"value": "define([\n\n 'Backbone',\n\n //Collection\n 'app/collections/tasks',\n\n //Template\n 'text!templates/project-page/taskItemTemplate.html',\n], function(\n\n Backbone,\n\n //Collection\n Tas... | javascript | chosen |
[
{
"from": "system",
"value": "test/js: Fix old style causing test to fail. "
},
{
"from": "human",
"value": "const encodings = require('encodings'),\n asserts = require('test').asserts,\n util = require('util');\n\nrequire.paths.unshift('test/js/lib');\n\nif (!this.exports) this.export... | javascript | chosen |
[
{
"from": "system",
"value": "test: Remove .only() and fix standards errors.\n"
},
{
"from": "human",
"value": "/* eslint-env jasmine, mocha, chai */\n\nimport { define, vdom } from '../../../src';\nimport afterMutations from '../../lib/after-mutations';\nimport fixture from '../../lib/fixture';... | javascript | chosen |
[
{
"from": "system",
"value": "Use asset id reference on sounds\n"
},
{
"from": "human",
"value": "const log = require('../util/log');\n\n/**\n * Load a sound's asset into memory asynchronously.\n * @param {!object} sound - the Scratch sound object.\n * @property {string} md5 - the MD5 and extens... | javascript | chosen |
[
{
"from": "system",
"value": "Change api url back to fast dawn\n"
},
{
"from": "human",
"value": "module.exports = {\n //apiUrl: 'https://fast-dawn-4805.herokuapp.com'\n apiUrl: 'http://localhost:4000'\n};"
},
{
"from": "gpt",
"value": "module.exports = {\n apiUrl: 'https://fast-d... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test name: 400 -> 404\n"
},
{
"from": "human",
"value": "/* PlayerController test */\n\ndescribe('PlayersController', function () {\n describe('#view', function() {\n it('should respond ok with valid player id', function(done) {\n request(sails.hooks.ht... | javascript | chosen |
[
{
"from": "system",
"value": "Sort mybox items by created date.\n"
},
{
"from": "human",
"value": "\napp.controller(\"ItemsController\", function($scope, $state, $window, $timeout, $modal, allItems, UserService, ItemService) {\n\n if(!UserService.isLoggedIn()) {\n $state.go(\"frontpage... | javascript | chosen |
[
{
"from": "system",
"value": "636: Add national id logic to case progress routes\n"
},
{
"from": "human",
"value": "const getCaseProgress = require('../services/get-case-progress')\nconst getSubNav = require('../services/get-sub-nav')\n\nmodule.exports = function (router) {\n router.get('/:orga... | javascript | chosen |
[
{
"from": "system",
"value": "Make CardImageHeader use imageProp from propTypes\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { StyleSheet } from 'react-native';\nimport { Thumbnail, CardItem } from 'native-base';\nimport CardImageHeaderStyle from './cardIm... | javascript | chosen |
[
{
"from": "system",
"value": "Replace validateAll with validate function\n"
},
{
"from": "human",
"value": "Tinytest.add('Validators - Order', function(test) {\n Astro.classes = [];\n\n ValidatorItem = Astro.Class({\n name: 'ValidatorItem',\n fields: [\n 'first',\n 'second',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix update model priority on api call\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n//Load dependencies\nvar async = require(\"async\");\nvar applicationStorage = require(\"core/application-storage\");\n\n/**\n * Insert an update into list\n * @param type\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move index up to single line\n"
},
{
"from": "human",
"value": "var mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar ObjectId = mongoose.Schema.Types.ObjectId;\nvar Mixed = mongoose.Schema.Types.Mixed;\n\nvar IndustrySectorSchema = n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove wrong class name from header\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { IndexLink } from 'react-router';\nimport './Header.scss';\n\nexport const Header = () => (\n <div className=\"page-header navbar navbar-default\">\n <div ... | javascript | chosen |
[
{
"from": "system",
"value": "Support style inspection in production\n"
},
{
"from": "human",
"value": "import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport StyleSheet from './StyleSheet';\n\n// allow component styles to be editable in React Dev Tools\nif (process.env.NODE_ENV !== ... | javascript | chosen |
[
{
"from": "system",
"value": "Make test task depend on lint task\n"
},
{
"from": "human",
"value": "// gulpfile.js\n\nvar gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar karma = require('gulp-karma');\n\nvar testFiles;\nrequire('./.karma.js')({set: function (config) { testFile... | javascript | chosen |
[
{
"from": "system",
"value": "chore(tools): Add src as a base directory for browser sync.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst gulp = require('gulp');\nconst browserSync = require('browser-sync');\nconst reload = browserSync.reload;\n\ngulp.task('sass:dev', requi... | javascript | chosen |
[
{
"from": "system",
"value": "Load src file as helper for jasmine\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar apigen = require('gulp-apigen');\nvar phpunit = require('gulp-phpunit');\nvar spawn = require('child_process').spawn;\nvar jasmine = require('gulp-jasmine');\nvar... | javascript | chosen |
[
{
"from": "system",
"value": "Add ci target for travis.\n"
},
{
"from": "human",
"value": "var docco, gulp, jslint, nodeunit;\n\ndocco = require('gulp-docco');\ngulp = require('gulp');\njslint = require('gulp-jslint');\nnodeunit = require('gulp-nodeunit');\n\ngulp.task('docs', function () {\n '... | javascript | chosen |
[
{
"from": "system",
"value": "Use a decorator style syntax in the event attribute\n"
},
{
"from": "human",
"value": "import UTILS from './utils';\nimport HELPERS from './helpers';\n\nconst eventAttributeName = 'jtml-event';\n\nexport default class Render {\n\tconstructor(func) {\n\t\tthis.func =... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to module pattern doc\n"
},
{
"from": "human",
"value": "// fetch api\n// https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch\n// https://blog.hospodarets.com/fetch_in_action\n\n// async/await\n// https://ponyfoo.com/articles/understandin... | javascript | chosen |
[
{
"from": "system",
"value": "Update PreviewFilter for invalid/non-returned timestamps.\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n * @ngdoc filter\n * @name dockstore.ui.filter:PreviewFilter\n * @function\n * @description\n * # PreviewFilter\n * Filter in the dockstore.ui.\n */\na... | javascript | chosen |
[
{
"from": "system",
"value": "Move license to the top of the file.\n"
},
{
"from": "human",
"value": "/* global btoa: true */\n/*!\n * Bootstrap Grunt task for generating raw-files.min.js for the Customizer\n * http://getbootstrap.com\n * Copyright 2014 Twitter, Inc.\n * Licensed under MIT (http... | javascript | chosen |
[
{
"from": "system",
"value": "LinkedIn: Hide 'Find a different [NAME]'\n\nCloses https://github.com/fureigh/unbias-me/issues/9\n"
},
{
"from": "human",
"value": "// LinkedIn:\n$('title').remove();\n$('#name-container').hide();\n$('.profile-picture').hide();\n\n// Logged out:\n$('h1#name').hide()... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to new music server\n"
},
{
"from": "human",
"value": "export const OFFICIAL_SERVER_URL = 'https://music.bemuse.ninja/live'\n\nexport async function load(serverUrl, { fetch = global.fetch } = {}) {\n const indexUrl = getServerIndexFileUrl(serverUrl)\n const... | javascript | chosen |
[
{
"from": "system",
"value": "Allow renderEvery to be passed a DOM node\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar h = require('virtual-hyperscript');\nvar VDOM = {\n diff: require('virtual-dom/diff'),\n patch: require('virtual-dom/patch')\n};\nvar DOMDelegator = require('dom-dele... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the cleaning of the message once it is sent.\n"
},
{
"from": "human",
"value": "$(window).load(function () {\n var Ector = require('ector');\n var ector = new Ector();\n var previousResponseNodes = null;\n var user = { username: \"Guy\"}\n var msg... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug when animate body get wrong height.\n"
},
{
"from": "human",
"value": "$(window).ready(function(){\n\t$(\"#config_button\").unbind().click(function(){\n\t\tif($(\"#config_button\").data('switch_flag')=='open') {\n\t\t\t$(\"#config_container\").animate({heigh... | javascript | chosen |
[
{
"from": "system",
"value": "Use a map of persons instead of new ops every time\n"
},
{
"from": "human",
"value": "// Mailin List - Entry point\n\nconst Person = require('./person.js');\nconst Group = require('./group.js');\nconst MailList = require('./maillist.js');\n\nfunction test01() {\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Use single-quotes for event handlers.\n"
},
{
"from": "human",
"value": "var Views = {};\nViews.ListingView = Backbone.View.extend({\n\tinitialise: function() {\n\t\tthis.listenTo(this.collection, \"add\", this.render);\n\t\tthis.listenTo(this.collection, \"change\"... | javascript | chosen |
[
{
"from": "system",
"value": "Add vscan uploads to the couch view\n"
},
{
"from": "human",
"value": "function(doc) {\n if (doc.type === \"SonositeUpload\") {\n emit([doc.domain, doc.case_id], doc._id);\n }\n}\n"
},
{
"from": "gpt",
"value": "function(doc) {\n if (doc.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove fade in and fade out\n"
},
{
"from": "human",
"value": "/**\n * Created by MrIggyman1234 on 19/12/2016.\n */\n\n$(document).ready(function(){\n var $nav = $(\"nav\");\n var $body = $(\"body\");\n $body.on(\"click\", \"#compare-link\", function(e){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use `runtime` in babel to avoid duplication across the compiled output\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar webpack = require(\"webpack\");\nvar config = require('./webpack.base.config.js');\n\nif (process.env['NODE_ENV'] !== 'test') {\n config.e... | javascript | chosen |
[
{
"from": "system",
"value": "Use statusCode instead of code\n"
},
{
"from": "human",
"value": "/**\n * Various HTTP helper functions and defaults.\n */\n\n'use strict';\n\n/**\n * Module dependencies.\n */\n\nvar http = require('http');\n\n/**\n * Default charset.\n */\n\nvar CHARSET = 'utf-8';... | javascript | chosen |
[
{
"from": "system",
"value": "Test Fenwick Tree: Builds the tree\n"
},
{
"from": "human",
"value": "/* eslint-env mocha */\nconst FenwickTree = require('../../src').DataStructures.FenwickTree;\nconst assert = require('assert');\n\ndescribe('Fenwick Tree', () => {\n it('should be empty when init... | javascript | chosen |
[
{
"from": "system",
"value": "Add support to the float slider\n"
},
{
"from": "human",
"value": "// Copyright (c) IPython Development Team.\n// Distributed under the terms of the Modified BSD License.\n\ndefine([\n \"widgets/js/widget\",\n \"widgets/js/widget_int\",\n], function(widget, in... | javascript | chosen |
[
{
"from": "system",
"value": "test: Update way how SpecReporter is imported\n"
},
{
"from": "human",
"value": "const Jasmine = require('jasmine');\nconst { jsdom } = require('jsdom');\nconst SpecReporter = require('jasmine-spec-reporter');\n\nconst jasmine = new Jasmine();\n\nglobal.window = jsd... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test errors caused by upgrade in Chai dependency\n"
},
{
"from": "human",
"value": "const { JSDOM } = require('jsdom');\n\nconst jsdom = new JSDOM('<!DOCTYPE html><html><body></body></html>');\nconst { window } = jsdom;\n\nfunction copyProps(src, target) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Change standard behavior for tasks, printing out all errors directly\n"
},
{
"from": "human",
"value": "// Copyright 2014, Yahoo! Inc.\n// Copyrights licensed under the Mit License. See the accompanying LICENSE file for terms.\n\nvar options = {\n\t\"taskId\": null,... | javascript | chosen |
[
{
"from": "system",
"value": "Set res.locals.template instead of res.template.\n"
},
{
"from": "human",
"value": "var _ = require('lodash');\nvar dust = require('dustjs-linkedin');\n\nmodule.exports = function(config) {\n\treturn function(req, res, next) {\n\t\tif(req.params) {\n\t\t\tres.templa... | javascript | chosen |
[
{
"from": "system",
"value": "Test fails for the right reasons."
},
{
"from": "human",
"value": "'use strict';\n\ndescribe('charm slider', function() {\n var container, Y;\n\n before(function(done) {\n Y = YUI(GlobalConfig).use(\n ['browser-charm-slider'], function(Y) {\n do... | javascript | chosen |
[
{
"from": "system",
"value": "Test for divisibility of 3 and 5 first so that \"FizzBuzz\" is actually printed\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar limit = (process.argv.length == 3) ? parseInt(process.argv[2]) : 100;\n\nfor(var i = 1; i < limit; i++) {\n if (i % 3 == 0) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Initialize texture maps with null"
},
{
"from": "human",
"value": "const Signal = require('signals')\n\nlet MaterialID = 0\n\nfunction Material (opts) {\n this.type = 'Material'\n this.id = 'Material_' + MaterialID++\n this.changed = new Signal()\n\n this._unifo... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.